/* =========================================================
   2 JACK GOOD — minimal editorial portfolio (v2)
   Type:  Helvetica Neue (ERD register; condensed-bold for
          listings) + Bodoni Moda reserved for hero & contact
   Color: black ink, warm white, neutrals only
   ========================================================= */

:root {
  --paper:   #F7F5EF;
  --ink:     #15130F;
  --ink-2:   #736B5E;
  --line:    #DED8CB;
  --stone-1: #ECE8DD;
  --stone-2: #DCD3C3;
  --stone-3: #C4B6A1;

  --serif: "Bodoni Moda", Georgia, "Times New Roman", serif;
  --sans:  "Helvetica Neue", Helvetica, Arial, sans-serif;
  --cond:  "Helvetica Neue", "Arial Narrow", Helvetica, Arial, sans-serif;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --mx: clamp(1.25rem, 5vw, 6rem);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-optical-sizing: auto;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--ink); color: var(--paper); }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

/* condensed-bold Helvetica — the ERD menu register */
.cond {
  font-family: var(--cond);
  font-weight: 700;
  font-stretch: condensed;
  text-transform: uppercase;
  letter-spacing: -0.005em;
}

/* small functional labels */
.label, .meta {
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.label { font-size: 0.7rem; }
.meta  { font-size: 0.66rem; color: var(--ink-2); }
.label--muted { color: var(--ink-2); }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 1.3rem var(--mx) 0;
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
  border-top: 1px solid var(--line);
}

/* =========================================================
   CUSTOM CURSOR
   ========================================================= */
.cursor {
  position: fixed; top: 0; left: 0;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ink);
  pointer-events: none; z-index: 9500;
  transform: translate(-50%, -50%);
  transition: width 0.4s var(--ease), height 0.4s var(--ease), background 0.4s var(--ease);
  display: grid; place-items: center;
}
.cursor__label {
  font-family: var(--sans);
  font-size: 0.58rem; font-weight: 500; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--paper);
  opacity: 0; transform: scale(0.6);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  white-space: nowrap;
}
.cursor.is-media { width: 76px; height: 76px; }
.cursor.is-media .cursor__label { opacity: 1; transform: scale(1); }
.cursor.is-link { width: 34px; height: 34px; background: rgba(21,19,15,0.12); }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* =========================================================
   ARCHIVE HOVER PREVIEW
   ========================================================= */
.preview {
  position: fixed; top: 0; left: 0;
  width: clamp(170px, 20vw, 260px);
  aspect-ratio: 4 / 5;
  z-index: 7000; pointer-events: none;
  overflow: hidden; background: var(--stone-2);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.96);
  transition: opacity 0.45s var(--ease), transform 0.55s var(--ease);
}
.preview.is-on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.preview img { width: 100%; height: 100%; object-fit: cover; }
@media (hover: none), (pointer: coarse) { .preview { display: none; } }

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: fixed; top: 0; left: 0; width: 100%;
  display: flex; justify-content: space-between; align-items: center;
  padding: clamp(1rem, 2.2vw, 1.6rem) var(--mx);
  z-index: 8000; mix-blend-mode: difference; color: #fff;
}
.nav__mark { font-size: 0.76rem; font-weight: 500; letter-spacing: 0.14em; }
.nav__links { display: flex; gap: clamp(1rem, 2.4vw, 2.4rem); }
.nav__links a {
  font-size: 0.7rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
  position: relative;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -4px;
  width: 100%; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform 0.5s var(--ease);
}
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  min-height: 100svh;
  padding: 0 var(--mx);
  display: flex; flex-direction: column; justify-content: center;
}
.hero__role {
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--ink-2);
  margin-bottom: clamp(1rem, 2vw, 1.6rem);
}
.hero__name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(4.2rem, 19vw, 18rem);
  line-height: 0.84; letter-spacing: -0.02em;
  margin-left: -0.04em;
}
.hero__name .line { display: block; overflow: hidden; }
.hero__name .line span { display: block; }
.hero__name .line:last-child { text-indent: 0.06em; }
.hero__foot {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 2rem; flex-wrap: wrap;
  margin-top: clamp(2.5rem, 6vw, 5rem);
}
.hero__statement {
  max-width: 32ch; font-size: clamp(0.95rem, 1.1vw, 1.1rem); line-height: 1.5;
}
.hero__cue {
  font-size: 0.7rem; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase;
  white-space: nowrap; padding-bottom: 0.35rem; border-bottom: 1px solid var(--ink);
  transition: opacity 0.4s var(--ease);
}
.hero__cue:hover { opacity: 0.5; }

/* =========================================================
   WORK
   ========================================================= */
.work { padding: clamp(6rem, 13vw, 11rem) 0 clamp(3rem, 6vw, 5rem); }

.feature { display: block; padding: 0 var(--mx); margin-bottom: clamp(4.5rem, 10vw, 9rem); }
.feature__media {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--stone-2);
}
.feature__media img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.04);
  transition: transform 1.1s var(--ease), filter 1.1s var(--ease);
  filter: saturate(0.94);
}
.feature:hover .feature__media img { transform: scale(1.005); filter: saturate(1); }
.feature__meta {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 1rem; flex-wrap: wrap; margin-top: 1.2rem;
}
.feature__title { font-size: clamp(1.8rem, 5vw, 4.2rem); line-height: 0.95; }

.work-list {
  display: grid; grid-template-columns: repeat(12, 1fr);
  column-gap: clamp(1.5rem, 3vw, 3rem);
  row-gap: clamp(3rem, 7vw, 7rem);
  padding: 0 var(--mx);
}
.work-item:nth-child(6n+1) { grid-column: 1 / 8; }
.work-item:nth-child(6n+2) { grid-column: 9 / 13; margin-top: clamp(2rem, 10vw, 9rem); }
.work-item:nth-child(6n+3) { grid-column: 2 / 8; }
.work-item:nth-child(6n+4) { grid-column: 9 / 13; margin-top: clamp(1.5rem, 6vw, 5rem); }
.work-item:nth-child(6n+5) { grid-column: 1 / 7; }
.work-item:nth-child(6n+0) { grid-column: 8 / 13; margin-top: clamp(1.5rem, 5vw, 4rem); }

.work-item__media {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--stone-2);
}
.work-item__media img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.05);
  transition: transform 1.05s var(--ease), filter 1.05s var(--ease);
  filter: saturate(0.92);
}
.work-item:hover .work-item__media img { transform: scale(1.01); filter: saturate(1.02); }
.work-item__row {
  display: grid; grid-template-columns: auto 1fr auto; align-items: baseline;
  gap: 0.8rem; margin-top: 0.9rem; padding-bottom: 0.85rem; border-bottom: 1px solid var(--line);
}
.work-item__no { font-size: 0.66rem; font-weight: 500; color: var(--ink-2); font-feature-settings: "tnum"; }
.work-item__title { font-size: clamp(1.1rem, 2vw, 1.8rem); line-height: 1; }
.work-item__title em { font-style: normal; font-weight: 700; color: var(--ink-2); }
.work-item .meta { text-align: right; }

/* =========================================================
   INDEX / ARCHIVE
   ========================================================= */
.index { padding: clamp(4rem, 9vw, 8rem) 0 clamp(5rem, 11vw, 10rem); }
.archive { padding: 0 var(--mx); }
.archive__cat {
  display: block;
  font-size: 0.7rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-2);
  margin: clamp(2.2rem, 4.5vw, 3.6rem) 0 0.2rem;
}
.archive__cat:first-child { margin-top: 0; }
.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 11rem 6rem;
  align-items: center; gap: 1rem;
  padding: clamp(0.85rem, 1.5vw, 1.25rem) 0;
  border-top: 1px solid var(--line);
  position: relative;
}
.row > * { transition: transform 0.55s var(--ease); }
.row:hover > * { transform: translateX(clamp(0.5rem, 1.2vw, 1.2rem)); }
.row:hover .row__title { color: var(--ink-2); }
.row__title { font-size: clamp(1.4rem, 3vw, 2.6rem); line-height: 1; transition: transform 0.55s var(--ease), color 0.45s var(--ease); }
.row__tag { justify-self: end; text-align: right; }

/* =========================================================
   INFO
   ========================================================= */
.info { padding: clamp(5rem, 11vw, 10rem) var(--mx); border-top: 1px solid var(--line); }
.info .label { display: block; margin-bottom: clamp(1.8rem, 3.5vw, 3rem); }
.info__body {
  font-family: var(--sans); font-weight: 400;
  font-size: clamp(1.25rem, 2.6vw, 2.1rem);
  line-height: 1.32; letter-spacing: -0.01em; max-width: 26ch;
}
.info__cols {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: clamp(2rem, 4vw, 4rem);
  margin-top: clamp(3rem, 6vw, 5rem); max-width: 58rem;
}
.info__col-h {
  display: block; font-size: 0.68rem; font-weight: 500; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-2); margin-bottom: 0.8rem;
}
.info__col p { font-size: clamp(0.92rem, 1.05vw, 1.05rem); line-height: 1.55; max-width: 34ch; }

/* =========================================================
   CONTACT
   ========================================================= */
.contact { padding: clamp(5rem, 11vw, 10rem) var(--mx) clamp(3rem, 6vw, 5rem); border-top: 1px solid var(--line); }
.contact .label { display: block; margin-bottom: clamp(1.3rem, 2.5vw, 2.2rem); }
.contact__cta {
  display: block; font-family: var(--serif); font-weight: 400;
  font-size: clamp(3rem, 13vw, 12rem); line-height: 0.86; letter-spacing: -0.02em;
}
.contact__cta .line { display: block; overflow: hidden; }
.contact__cta .line span { display: block; transition: transform 0.6s var(--ease); }
.contact__cta:hover .line span { transform: translateX(0.05em); }
.contact__cta .line:last-child { font-style: italic; }
.contact__links { display: flex; gap: clamp(1.5rem, 4vw, 4rem); flex-wrap: wrap; margin-top: clamp(2.2rem, 4vw, 3.5rem); }
.contact__links a {
  font-size: 0.74rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
  padding-bottom: 0.35rem; border-bottom: 1px solid var(--ink); transition: opacity 0.4s var(--ease);
}
.contact__links a:hover { opacity: 0.5; }

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 1.5rem; flex-wrap: wrap;
  padding: clamp(2.5rem, 5vw, 4rem) var(--mx); border-top: 1px solid var(--line);
}
.footer__mark { font-size: clamp(2.5rem, 11vw, 9rem); line-height: 0.8; }
.footer__right {
  display: flex; flex-direction: column; align-items: flex-end; gap: 0.4rem;
  font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2);
}
.footer__credit { position: relative; }
.footer__credit::after {
  content: ""; position: absolute; left: 0; bottom: -3px; width: 100%; height: 1px;
  background: var(--ink-2); transform: scaleX(0); transform-origin: right; transition: transform 0.5s var(--ease);
}
.footer__credit:hover::after { transform: scaleX(1); transform-origin: left; }

/* =========================================================
   REVEAL STATES — owned by GSAP via opacity (no transform in CSS)
   ========================================================= */
[data-reveal], [data-reveal-y] { will-change: transform, opacity; }
.js [data-reveal], .js [data-reveal-y] { opacity: 0; }
.js [data-reveal-clip] { clip-path: inset(0 0 100% 0); }
/* failsafe (fires only if JS/GSAP never boots) */
.reveal-all [data-reveal], .reveal-all [data-reveal-y] { opacity: 1 !important; transform: none !important; }
.reveal-all [data-reveal-clip] { clip-path: none !important; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 860px) {
  .work-list { display: flex; flex-direction: column; gap: clamp(2.5rem, 9vw, 4rem); }
  .work-item { margin-top: 0 !important; }
  .hero__name { font-size: clamp(3.6rem, 22vw, 9rem); }
  .row { grid-template-columns: 1fr auto; gap: 0.25rem 1rem; }
  .row .meta:not(.row__tag) { grid-column: 1; }
  .row__tag { grid-column: 2; grid-row: 1; }
}
@media (max-width: 560px) {
  .nav__links { gap: 0.85rem; }
  .nav__links a { font-size: 0.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  .js [data-reveal], .js [data-reveal-y] { opacity: 1; }
  .js [data-reveal-clip] { clip-path: none; }
}
