/* ==========================================================================
   VOID by MKA — design system
   Build One: THRESHOLD / HERO / APERTURE / PROOF
   ========================================================================== */

:root{
  /* surface */
  --bg:#050505;
  --bg-raise:#0a0a0a;
  --fg:#f2f0ea;
  --muted:#8d8b85;
  --dim:#56544f;
  --line:rgba(242,240,234,.14);
  --line-soft:rgba(242,240,234,.07);

  /* type */
  --display:"Anybody",Arial Narrow,Arial,sans-serif;
  --body:"Archivo",Helvetica,Arial,sans-serif;
  --mono:"Martian Mono",ui-monospace,SFMono-Regular,Menlo,monospace;

  --d0:clamp(120px,20vw,420px);
  --d1:clamp(56px,8vw,148px);
  --d2:clamp(28px,4vw,64px);
  --t-body:clamp(17px,1.4vw,22px);
  --t-meta:10px;

  /* motion */
  --t-micro:180ms;
  --t-ui:420ms;
  --t-scene:900ms;
  --t-cine:1400ms;
  --e-enter:cubic-bezier(.16,1,.3,1);
  --e-camera:cubic-bezier(.65,0,.35,1);

  /* grid */
  --pad:clamp(20px,3.2vw,56px);
  --max:1680px;
}

*,*::before,*::after{box-sizing:border-box}

html{
  background:var(--bg);
  color-scheme:dark;
  scroll-behavior:smooth;
  -webkit-text-size-adjust:100%;
}

body{
  margin:0;
  background:var(--bg);
  color:var(--fg);
  font-family:var(--body);
  font-size:16px;
  line-height:1.4;
  font-synthesis-weight:none;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

a{color:inherit;text-decoration:none}
img,svg{display:block;max-width:100%}
h1,h2,h3,p{margin:0}
button{font:inherit;color:inherit;background:none;border:0;padding:0}

.wrap{width:min(var(--max),100%);margin-inline:auto;padding-inline:var(--pad)}

.mono{
  font-family:var(--mono);
  font-size:var(--t-meta);
  font-weight:400;
  letter-spacing:.18em;
  text-transform:uppercase;
  line-height:1.6;
}
.muted{color:var(--muted)}
.dim{color:var(--dim)}

/* --------------------------------------------------------------------------
   Accessibility primitives
   -------------------------------------------------------------------------- */

.skip{
  position:absolute;left:var(--pad);top:-100px;z-index:200;
  background:var(--fg);color:var(--bg);
  padding:12px 18px;font-family:var(--mono);font-size:10px;
  letter-spacing:.16em;text-transform:uppercase;
  transition:top var(--t-micro) var(--e-enter);
}
.skip:focus{top:16px}

:focus-visible{
  outline:1px solid var(--fg);
  outline-offset:6px;
}

.sr{
  position:absolute;width:1px;height:1px;padding:0;margin:-1px;
  overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0;
}

/* --------------------------------------------------------------------------
   Atmosphere — film grain over the whole document
   -------------------------------------------------------------------------- */

.grain{
  position:fixed;inset:-50px;z-index:90;
  pointer-events:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size:180px 180px;
  opacity:.055;
}
.js .grain{animation:grainShift 700ms steps(1,end) infinite}

@keyframes grainShift{
  0%  {transform:translate3d(0,0,0)}
  25% {transform:translate3d(-14px,8px,0)}
  50% {transform:translate3d(9px,-11px,0)}
  75% {transform:translate3d(-6px,-5px,0)}
  100%{transform:translate3d(11px,6px,0)}
}

/* --------------------------------------------------------------------------
   Custom cursor — desktop, fine pointer only. Subordinate by design.
   -------------------------------------------------------------------------- */

.cursor{
  position:fixed;top:0;left:0;z-index:120;
  width:6px;height:6px;margin:-3px 0 0 -3px;
  border-radius:50%;
  background:var(--fg);
  mix-blend-mode:difference;
  pointer-events:none;
  opacity:0;
  transition:opacity var(--t-ui) linear,
             width var(--t-micro) var(--e-enter),
             height var(--t-micro) var(--e-enter),
             margin var(--t-micro) var(--e-enter);
}
.cursor__ring{
  position:fixed;top:0;left:0;z-index:119;
  width:34px;height:34px;margin:-17px 0 0 -17px;
  border:1px solid rgba(242,240,234,.34);
  border-radius:50%;
  pointer-events:none;
  opacity:0;
  transition:opacity var(--t-ui) linear,
             width var(--t-ui) var(--e-enter),
             height var(--t-ui) var(--e-enter),
             margin var(--t-ui) var(--e-enter),
             border-color var(--t-ui) linear;
}
.cursor-on .cursor,.cursor-on .cursor__ring{opacity:1}

.cursor-on.is-link .cursor{width:3px;height:3px;margin:-1.5px 0 0 -1.5px}
.cursor-on.is-link .cursor__ring{width:52px;height:52px;margin:-26px 0 0 -26px;border-color:rgba(242,240,234,.6)}
.cursor-on.is-plate .cursor{width:2px;height:2px;margin:-1px 0 0 -1px}
.cursor-on.is-plate .cursor__ring{width:76px;height:76px;margin:-38px 0 0 -38px;border-color:rgba(242,240,234,.22)}

@media (hover:none),(pointer:coarse){
  .cursor,.cursor__ring{display:none!important}
}

/* --------------------------------------------------------------------------
   THRESHOLD — atmospheric entrance. Not a loading screen.
   -------------------------------------------------------------------------- */

.threshold{
  position:fixed;inset:0;z-index:110;
  background:#000;
  pointer-events:none;
  opacity:1;
}
.js .threshold{transition:opacity 1100ms var(--e-camera)}
.threshold.is-open{opacity:0}
.threshold.is-done{display:none}
html:not(.js) .threshold{display:none}

/* --------------------------------------------------------------------------
   VOID SPACE — environment layer, fixed behind the document
   -------------------------------------------------------------------------- */

.env{
  position:fixed;inset:0;z-index:0;
  background:#000;
  overflow:hidden;
  pointer-events:none;
  contain:layout paint style;
}
.env__still,.env__video{
  position:absolute;inset:0;
  width:100%;height:100%;
  object-fit:cover;
  object-position:66% 50%;
  /* object-position alone has no visible effect here: the media is ~16:9,
     matching most desktop viewports, so cover-fit crops almost nothing.
     The extra scale from a focal point inside the light manufactures the
     overflow .env already clips, and pulls the architecture toward the
     mark without moving the mark or adding a layer. Reset on mobile below. */
  transform:scale(1.2);
  transform-origin:80% 36%;
}
/* the approved 9s cinematic environment. It plays on its own clock and is
   never scrubbed, sampled, filtered or scaled with the identity. */
.env__video{
  opacity:0;
  transition:opacity 900ms linear;
  pointer-events:none;
}
.env.video-live .env__video{opacity:1}
/* while the video loads the environment holds black: its opening frames are
   near black, so the threshold and the first frame are the same darkness. */
.env.video-pending .env__still,
.env.video-live .env__still{opacity:0;transition:opacity 600ms linear}

/* Over the video the left mass reads 0.7-2.5/255 unaided, so the treatment is
   reduced to what the navigation and the foot actually need. The heavier stack
   below stays for the still fallback, whose left side is lighter. */
.env.video-live::after{
  background:
    linear-gradient(180deg,rgba(5,5,5,.58) 0%,rgba(5,5,5,.14) 13%,transparent 28%,
                    transparent 72%,rgba(5,5,5,.38) 100%),
    radial-gradient(132% 104% at 74% 30%,transparent 0%,rgba(5,5,5,.08) 58%,rgba(5,5,5,.46) 100%);
}

/* depth falloff so the environment never competes with content */
.env::after{
  content:"";position:absolute;inset:0;
  background:
    /* the dark mass the identity sits in, extended just past the wordmark */
    linear-gradient(101deg,rgba(5,5,5,.72) 0%,rgba(5,5,5,.5) 30%,rgba(5,5,5,.16) 48%,transparent 62%),
    radial-gradient(120% 90% at 74% 26%,transparent 0%,rgba(5,5,5,.2) 58%,rgba(5,5,5,.7) 100%),
    linear-gradient(180deg,rgba(5,5,5,.44) 0%,rgba(5,5,5,.05) 34%,rgba(5,5,5,.56) 100%);
}

/* --------------------------------------------------------------------------
   Navigation — ONE fixed element. Mark and links cannot drift apart.
   -------------------------------------------------------------------------- */

.nav{
  position:fixed;top:0;left:0;right:0;z-index:100;
  display:flex;align-items:center;justify-content:space-between;
  gap:24px;
  padding:20px var(--pad);
  pointer-events:none;
}
.nav > *{pointer-events:auto}

.nav__brand{
  display:block;width:104px;
  opacity:0;
  transform:translateY(-6px);
  transition:opacity var(--t-ui) linear,transform var(--t-ui) var(--e-enter);
}
.nav__brand svg,.nav__brand img{width:100%;height:auto;fill:var(--fg)}
.nav.is-marked .nav__brand{opacity:1;transform:none}
html:not(.js) .nav__brand{opacity:1;transform:none}

.nav__links{display:flex;gap:clamp(16px,2vw,34px)}
.nav__links a{
  font-family:var(--mono);font-size:var(--t-meta);
  letter-spacing:.16em;text-transform:uppercase;
  color:var(--fg);
  position:relative;
  padding:4px 0;
  transition:color var(--t-ui) linear;
}
.nav__links a::after{
  content:"";position:absolute;left:0;right:0;bottom:0;height:1px;
  background:currentColor;
  transform:scaleX(0);transform-origin:left;
  transition:transform var(--t-ui) var(--e-enter);
}
.nav__links a:hover::after,.nav__links a:focus-visible::after{transform:scaleX(1)}

/* --------------------------------------------------------------------------
   THE STAGE — HERO and APERTURE are one continuous shot, one mark.
   The mark is never duplicated and never re-anchored, so it cannot drift.
   -------------------------------------------------------------------------- */

.stage-scroll{position:relative;z-index:2}
.js .stage-scroll{height:340svh}

.stage{
  --stage-pt:clamp(96px,14vh,168px);
  --stage-pb:clamp(28px,4vh,48px);
  min-height:100svh;
  display:grid;
  grid-template-rows:1fr auto;
  padding:var(--stage-pt) var(--pad) var(--stage-pb);
}
.js .stage{
  position:sticky;top:0;
  height:100svh;min-height:0;
  overflow:hidden;
}

.stage__mark{
  align-self:center;
  justify-self:start;
  margin:0 0 0 clamp(0px,4vw,76px);
  font:inherit;font-weight:inherit;
}
.stage__markbox{
  display:block;
  /*
    The homepage hero uses the supplied horizontal lockup as the primary
    visual field. Keep the SVG at its native ratio; the JS camera reads the
    actual viewBox, so this width is purely presentation geometry.
  */
  width:88vw;
}
.stage__markbox svg{
  width:100%;height:auto;
  transform-origin:50% 50%;
  backface-visibility:hidden;
}
.stage__markbox path{fill:var(--fg)}

/* entrance: the mark resolves upward out of the dark. No logo gymnastics. */
.js .stage__markbox{
  opacity:0;
  -webkit-clip-path:inset(0 0 100% 0);
          clip-path:inset(0 0 100% 0);
}
.js .stage__mark.is-in .stage__markbox{
  opacity:1;
  -webkit-clip-path:inset(0 0 0 0);
          clip-path:inset(0 0 0 0);
  transition:opacity 1200ms linear,clip-path 1700ms var(--e-camera),-webkit-clip-path 1700ms var(--e-camera);
}

.stage__foot{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:end;
  gap:clamp(24px,4vw,64px);
  will-change:opacity,transform;
}
.stage__lede{
  max-width:34ch;
  font-size:var(--t-body);
  letter-spacing:-.018em;
  line-height:1.35;
}
.stage__meta{
  display:grid;grid-auto-flow:column;gap:clamp(20px,3vw,52px);
  text-align:right;
}
.stage__meta b{
  display:block;margin-top:6px;
  font-family:var(--body);font-size:13px;font-weight:500;
  letter-spacing:0;text-transform:none;color:var(--fg);
}

.js .stage__foot > *{opacity:0;transform:translateY(14px)}
.js .stage__foot.is-in > *{
  opacity:1;transform:none;
  transition:opacity var(--t-scene) linear,transform var(--t-scene) var(--e-enter);
}
.js .stage__foot.is-in > *:nth-child(2){transition-delay:60ms}

/* The opening in the counter. Black, because what is inside the mark is the
   void itself; PROOF shares the same surface colour so there is no seam. */
.stage__veil{
  position:absolute;
  top:calc(-1 * var(--stage-pt));
  bottom:calc(-1 * var(--stage-pb));
  left:calc(-1 * var(--pad));
  right:calc(-1 * var(--pad));
  background:var(--bg);
  opacity:1;
  pointer-events:none;
  z-index:3;
  visibility:hidden;
}
.stage__veil.is-scrubbing{visibility:visible}
.stage__veil.is-scrubbing{
  -webkit-clip-path:url(#void-aperture-veil);
          clip-path:url(#void-aperture-veil);
}
.js.no-clip .stage__veil{opacity:0}
.js.no-clip .stage__veil.is-scrubbing{-webkit-clip-path:none;clip-path:none}
html:not(.js) .stage__veil{display:none}

/* --------------------------------------------------------------------------
   PROOF — the plate room
   -------------------------------------------------------------------------- */

.proof{
  position:relative;z-index:4;
  background:var(--bg);
  padding:clamp(96px,16vh,200px) 0 clamp(110px,16vh,220px);
}
.js .proof{margin-top:-100svh}
.js .proof.is-scrubbing{
  -webkit-clip-path:url(#void-aperture);
          clip-path:url(#void-aperture);
}
/* where url() clipping is unavailable the same scrub drives a straight dissolve */
.js.no-clip .proof{margin-top:0}
.js.no-clip .proof.is-scrubbing{-webkit-clip-path:none;clip-path:none}

/* rows only become live once the aperture has fully opened */
.proof .row{pointer-events:none}
.proof.is-open .row,html:not(.js) .proof .row{pointer-events:auto}

.proof__head{
  display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.4fr);
  gap:clamp(24px,5vw,90px);
  align-items:end;
  margin-bottom:clamp(56px,9vh,120px);
}
.proof__head h2{
  font-family:var(--display);
  font-size:var(--d1);
  font-weight:800;
  font-stretch:112%;
  letter-spacing:-.07em;
  line-height:.78;
  margin-top:18px;
}
.proof__head p{
  max-width:46ch;color:var(--muted);
  font-size:var(--t-body);letter-spacing:-.012em;
}

/* the plate: one reused element, GPU transform only */
.plate{
  position:fixed;z-index:1;
  top:50%;left:72%;
  width:min(30vw,420px);
  aspect-ratio:4/5;
  margin:-0 0 0 0;
  translate:-50% -50%;
  pointer-events:none;
  opacity:0;
  perspective:1400px;
  will-change:transform,opacity;
  transition:opacity 520ms var(--e-camera);
}
.plate.is-live{opacity:1}
.plate__inner{
  position:relative;width:100%;height:100%;
  transform-style:preserve-3d;
  box-shadow:0 40px 90px -30px rgba(0,0,0,.9),0 4px 22px rgba(0,0,0,.6);
  background:#0a0a0a;
}
.plate img{width:100%;height:100%;object-fit:cover;opacity:0}
.plate img.is-shown{opacity:1}
.plate.is-entering{
  transition:transform 460ms var(--e-camera),opacity 460ms linear;
  transform:translate3d(-50%,-50%,0) scale(2.6)!important;
  opacity:0;
}
.plate__sheen{
  position:absolute;inset:0;
  background:linear-gradient(105deg,transparent 34%,rgba(242,240,234,.1) 48%,transparent 62%);
  mix-blend-mode:screen;
  opacity:.85;
}
@media (hover:none),(pointer:coarse){.plate{display:none}}

.proof__index{
  position:relative;z-index:2;
  border-top:1px solid var(--line);
}

.row{
  position:relative;
  display:grid;
  grid-template-columns:82px minmax(0,1fr) minmax(0,auto) 72px;
  align-items:baseline;
  gap:clamp(12px,2vw,32px);
  padding:clamp(20px,3vh,34px) 0;
  border-bottom:1px solid var(--line);
  transition:opacity var(--t-ui) linear;
}
.row__num{
  font-family:var(--mono);font-size:var(--t-meta);
  letter-spacing:.16em;color:var(--dim);
  transition:color var(--t-ui) linear;
}
.row__title{
  font-family:var(--display);
  font-size:var(--d2);
  font-weight:700;
  font-stretch:105%;
  letter-spacing:-.05em;
  line-height:.9;
  display:block;
  transform:translateX(0);
  transition:transform 520ms var(--e-enter);
}
.row__cat{
  font-family:var(--mono);font-size:9px;letter-spacing:.14em;
  text-transform:uppercase;color:var(--muted);
  opacity:.55;
  transition:opacity var(--t-ui) linear;
}
.row__year{
  font-family:var(--mono);font-size:9px;letter-spacing:.14em;
  color:var(--dim);text-align:right;
}

/* hover / focus are equivalent states */
.proof__index.is-engaged .row{opacity:.24}
.proof__index.is-engaged .row.is-active{opacity:1}
.row.is-active .row__title{transform:translateX(clamp(8px,1vw,18px))}
.row.is-active .row__num{color:var(--accent,var(--fg))}
.row.is-active .row__cat{opacity:1}
.row:focus-visible{outline-offset:-2px}

body.is-leaving .proof__index,
body.is-leaving .proof__head,
body.is-leaving .nav{opacity:0;transition:opacity 420ms linear}

/* geometry definitions — the official monogram counter lives here */
.defs{position:absolute;width:0;height:0;overflow:hidden;pointer-events:none}

/* --------------------------------------------------------------------------
   Carried forward from V1 — not redesigned in Build One
   -------------------------------------------------------------------------- */

.close{
  position:relative;z-index:4;
  background:var(--bg);
  padding:0 0 clamp(60px,9vh,110px);
}
.close__grid{
  display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:clamp(24px,5vw,90px);
  border-top:1px solid var(--line);
  padding-top:28px;
}
.close__grid h2{
  font-family:var(--display);font-size:var(--d1);font-weight:800;
  font-stretch:112%;letter-spacing:-.075em;line-height:.76;margin-top:18px;
}
.close__body p{max-width:48ch;color:var(--muted);font-size:var(--t-body);letter-spacing:-.012em}
.close__body p + p{margin-top:1.1em}

.contact{
  margin-top:clamp(56px,9vh,120px);
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
}
.contact__row{
  display:flex;flex-wrap:wrap;gap:16px clamp(20px,4vw,60px);
  align-items:baseline;justify-content:space-between;
  padding:22px 0;
}
.contact__row + .contact__row{border-top:1px solid var(--line-soft)}
.contact__value{
  font-family:var(--display);
  font-size:clamp(22px,3.4vw,52px);
  font-weight:700;letter-spacing:-.045em;line-height:1;
  position:relative;
}
.contact__value::after{
  content:"";position:absolute;left:0;right:0;bottom:-6px;height:1px;
  background:currentColor;transform:scaleX(0);transform-origin:left;
  transition:transform 520ms var(--e-enter);
}
.contact__value:hover::after,.contact__value:focus-visible::after{transform:scaleX(1)}

.footer{
  position:relative;z-index:4;
  background:var(--bg);
  display:flex;flex-wrap:wrap;gap:14px 30px;
  align-items:center;justify-content:space-between;
  padding:24px var(--pad) 30px;
  color:var(--dim);
  border-top:1px solid var(--line-soft);
}
.footer__mark{width:78px}
.footer__mark path{fill:var(--dim)}

/* --------------------------------------------------------------------------
   Project pages — structurally preserved, quality corrected only
   -------------------------------------------------------------------------- */

.project{position:relative;z-index:4;background:var(--bg)}

.project__hero{padding:clamp(128px,20vh,220px) var(--pad) clamp(40px,6vh,80px)}
.project__top{
  display:flex;flex-wrap:wrap;gap:12px 30px;justify-content:space-between;
  border-bottom:1px solid var(--line);padding-bottom:16px;
}
.project__hero h1{
  font-family:var(--display);
  font-size:clamp(64px,13vw,220px);
  font-weight:800;font-stretch:112%;
  letter-spacing:-.085em;line-height:.74;
  margin:clamp(36px,6vh,72px) 0 clamp(28px,4vh,52px);
}
.project__desc{
  font-size:clamp(19px,2vw,30px);max-width:42ch;
  letter-spacing:-.022em;line-height:1.3;
}
.project__meta{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
  gap:20px;border-top:1px solid var(--line);
  margin-top:clamp(40px,6vh,80px);padding-top:16px;
}
.project__meta b{display:block;margin-top:8px;font-family:var(--body);font-size:13px;font-weight:500;letter-spacing:0;text-transform:none;color:var(--fg)}

.project__plate{padding:0 var(--pad)}
.project__plate figure{margin:0;max-width:min(860px,72vw)}
.project__plate img{width:100%;height:auto}

.project__gallery{
  padding:clamp(80px,14vh,180px) var(--pad);
  display:grid;grid-template-columns:repeat(12,1fr);
  gap:clamp(12px,1.6vw,26px);
  align-items:start;
}
.project__gallery figure{margin:0}
.project__gallery img{width:100%;height:auto}
.project__gallery figure:nth-child(3n+1){grid-column:1/span 6}
.project__gallery figure:nth-child(3n+2){grid-column:8/span 5;margin-top:clamp(40px,10vh,140px)}
.project__gallery figure:nth-child(3n){grid-column:3/span 7;margin-top:clamp(30px,6vh,90px)}

.js .reveal{opacity:0;transform:translateY(22px)}
.js .reveal.is-in{opacity:1;transform:none;transition:opacity var(--t-scene) linear,transform var(--t-scene) var(--e-enter)}

.next{
  display:flex;flex-wrap:wrap;gap:16px 40px;
  align-items:baseline;justify-content:space-between;
  border-top:1px solid var(--line);
  margin:0 var(--pad);
  padding:22px 0 clamp(80px,12vh,160px);
}
.next strong{
  font-family:var(--display);font-size:clamp(36px,6vw,104px);
  font-weight:700;letter-spacing:-.06em;line-height:.85;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width:900px){
  /* Mobile project proof: keep the complete 4:5 artwork inside the viewport.
     The figure itself is explicitly width-constrained so no parent/layout
     intrinsic sizing can make the artwork wider than the content column. */
  .project__plate{
    width:100%;
    min-width:0;
  }
  .project__plate figure{
    width:100%;
    max-width:100%;
    min-width:0;
    overflow:visible;
  }
  .project__plate img{
    display:block;
    width:100%;
    max-width:100%;
    height:auto;
  }

  /* the desktop focal-point zoom is tuned against a ~16:9 viewport, where
     cover-fit crops almost nothing on its own. On a narrow/tall viewport
     cover-fit already crops the 16:9 media hard to fill the screen, so
     stacking the desktop zoom on top would over-crop; this restores the
     original object-position framing untouched. */
  .env__still,.env__video{transform:none}
  .stage{--stage-pt:clamp(88px,12vh,130px)}
  .stage__mark{margin-left:0}
  .stage__markbox{width:88vw}
  .stage__foot{grid-template-columns:1fr;gap:26px}
  .stage__meta{grid-auto-flow:row;grid-template-columns:repeat(3,minmax(0,1fr));text-align:left;gap:16px}
  .js .stage-scroll{height:280svh}
  .proof__head{grid-template-columns:1fr;gap:20px}
  .row{grid-template-columns:48px minmax(0,1fr) 54px}
  .row__cat{display:none}
  .close__grid{grid-template-columns:1fr;gap:26px}
  .project__meta{grid-template-columns:1fr 1fr}
  .project__plate figure{max-width:100%}
  .project__gallery{grid-template-columns:1fr;gap:clamp(16px,4vw,32px)}
  .project__gallery figure:nth-child(n){grid-column:auto;margin-top:0}
  .nav__brand{width:78px}
}

@media (max-width:520px){
  .stage__meta{grid-template-columns:1fr 1fr}
  .contact__row{flex-direction:column;align-items:flex-start;gap:8px}
}

/* --------------------------------------------------------------------------
   Reduced motion — the still environment, no camera, no scrub
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{
    animation-duration:1ms!important;
    animation-iteration-count:1!important;
    transition-duration:1ms!important;
  }
  .js .stage__markbox{opacity:1;-webkit-clip-path:none;clip-path:none}
  .js .stage__foot > *{opacity:1;transform:none}
  .js .reveal{opacity:1;transform:none}
  .js .stage-scroll{height:auto}
  .js .stage{position:static;height:auto;min-height:100svh;overflow:visible}
  .js .proof{margin-top:0;-webkit-clip-path:none!important;clip-path:none!important;opacity:1!important}
  .plate{display:none}
  .stage__veil{display:none}
  .env__video{display:none!important}
  .env.video-live .env__still,.env.video-pending .env__still{opacity:1}
  .grain{animation:none}
}

/* --------------------------------------------------------------------------
   Phase 04 — polish: mobile ergonomics, media stability, focus, and touch
   -------------------------------------------------------------------------- */

html{overflow-x:clip}
body{overflow-x:clip}

.nav__links a{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
}

.row{
  min-height:44px;
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
}

.contact__value,.next{
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
}

.project__gallery figure{
  content-visibility:auto;
  contain-intrinsic-size:720px 900px;
}

.project__plate figure{
  overflow:hidden;
}

img,video{
  -webkit-user-drag:none;
}

@media (max-width:900px){
  .nav{
    padding-top:14px;
    padding-bottom:14px;
    gap:14px;
  }
  .nav__links{gap:clamp(8px,2.5vw,20px)}
  .nav__links a{letter-spacing:.12em}

  .stage__markbox{max-width:none}
  .stage__lede{max-width:38ch}

  .proof{padding-top:clamp(80px,13vh,150px)}
  .proof__head h2{font-size:clamp(64px,16vw,120px)}
  .proof__head p{max-width:40ch}
  .row{padding-block:18px}
  .row__title{font-size:clamp(28px,7vw,54px)}

  .project__hero{padding-top:clamp(104px,16vh,170px)}
  .project__hero h1{font-size:clamp(58px,15vw,150px);line-height:.78}
  .project__desc{font-size:clamp(18px,3.5vw,25px);max-width:34ch}
  .project__meta{gap:16px}
  .project__gallery{padding-top:clamp(64px,12vh,140px)}

  .next{padding-bottom:clamp(64px,12vh,120px)}
}

@media (max-width:520px){
  .nav{padding-inline:16px}
  .nav__brand{width:72px}
  .nav__links{gap:4px}
  .nav__links a{font-size:9px;letter-spacing:.1em}

  .stage{--stage-pt:84px;--stage-pb:24px}
  .stage__markbox{width:88vw}
  .stage__foot{gap:22px}
  .stage__meta{gap:12px}
  .stage__meta b{font-size:12px}

  .proof__head{margin-bottom:56px}
  .row{grid-template-columns:36px minmax(0,1fr) 46px;gap:10px;padding-block:17px}
  .row__title{font-size:clamp(26px,9vw,42px)}
  .row__year{font-size:8px}

  .project__hero{padding-top:96px}
  .project__top{gap:8px 16px}
  .project__hero h1{font-size:clamp(52px,17vw,100px);margin-block:32px 28px}
  .project__desc{font-size:18px;line-height:1.34}
  .project__meta{grid-template-columns:1fr 1fr;gap:18px 12px;margin-top:42px}
  .project__meta b{font-size:12px}
  .project__gallery{padding-inline:16px;gap:20px}

  .close{padding-bottom:72px}
  .close__grid{gap:30px}
  .close__grid h2{font-size:clamp(58px,17vw,100px)}
  .contact{margin-top:64px}
  .contact__value{font-size:clamp(22px,7vw,34px);overflow-wrap:anywhere}

  .footer{padding-inline:16px}
  .next{margin-inline:16px}
  .next strong{font-size:clamp(34px,10vw,58px)}
}

@media (prefers-reduced-motion:reduce){
  .project__gallery figure{content-visibility:visible}
}

/* --------------------------------------------------------------------------
   Mobile project gallery — full frames, never cropped
   Cause: `.project__gallery figure` is content-visibility:auto with
   contain-intrinsic-size:720px 900px. While a figure is off-screen, that
   720px intrinsic width fed the single `1fr` (= minmax(auto,1fr)) grid
   track, widening it to 720px on phones. Frames 02+ then overflowed the
   viewport and html/body overflow-x:clip cut them off on the right.
   Fix: the track can no longer be sized by its content, and the
   intrinsic-size placeholder is off at this width, so figures use natural
   image sizing (width:100%, height:auto — original aspect ratio kept).
   Scoped to <=900px; desktop rules above are untouched.
   -------------------------------------------------------------------------- */
@media (max-width:900px){
  .project__gallery{grid-template-columns:minmax(0,1fr)}
  .project__gallery figure{
    min-width:0;
    content-visibility:visible;
    contain-intrinsic-size:none;
  }
  .project__gallery img{
    width:100%;
    max-width:100%;
    height:auto;
    object-fit:contain;
  }
}
