/* =============================================================================
   layout.css — shell: cursor, nav, hero, sections, footer, edge label
   ============================================================================= */

/* ---- custom cursor (restrained; disabled on coarse pointers via base.css) -- */
.cursor {
  position: fixed; top: 0; left: 0; z-index: var(--z-cursor);
  width: 30px; height: 30px; margin: -15px 0 0 -15px;
  border: 1px solid var(--c-line-2);
  border-radius: 50%;
  pointer-events: none;
  transform: translate3d(-100px, -100px, 0) scale(1);
  transition: width .35s var(--ease-soft), height .35s var(--ease-soft),
              margin .35s var(--ease-soft), border-color .35s var(--ease-soft),
              opacity .35s var(--ease-soft), background-color .35s var(--ease-soft);
  mix-blend-mode: difference;
  will-change: transform;
}
.cursor-dot {
  position: fixed; top: 0; left: 0; z-index: var(--z-cursor);
  width: 4px; height: 4px; margin: -2px 0 0 -2px;
  background: var(--c-light); border-radius: 50%;
  pointer-events: none;
  transform: translate3d(-100px, -100px, 0);
  mix-blend-mode: difference;
}
.cursor.is-view { width: 74px; height: 74px; margin: -37px 0 0 -37px; border-color: var(--c-steel); }
.cursor.is-view::after {
  content: "VIEW"; position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.3em; color: var(--c-light);
}
.cursor.is-link { width: 46px; height: 46px; margin: -23px 0 0 -23px; background: var(--c-line-2); }
.cursor.is-hidden { opacity: 0; }
/* Custom cursor only hides the native pointer AFTER JS establishes it (js-cursor class).
   Form fields keep the native caret so typing is never ambiguous. If JS is slow/blocked,
   the visitor always has a normal pointer. */
@media (pointer: fine) {
  html.js-cursor,
  html.js-cursor a,
  html.js-cursor button,
  html.js-cursor [role="button"],
  html.js-cursor .plate,
  html.js-cursor .lb-close,
  html.js-cursor .lb-prev,
  html.js-cursor .lb-next,
  html.js-cursor .nav-current { cursor: none; }
}

/* ---- top progress hairline ---- */
.page-progress {
  position: fixed; top: 0; left: 0; height: 1px; width: 100%;
  transform: scaleX(0); transform-origin: left; z-index: var(--z-nav);
  background: var(--c-steel); opacity: 0.5; pointer-events: none;
}

/* ---- nav ---- */
.site-nav {
  position: fixed; inset: 0 0 auto 0; z-index: var(--z-nav);
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(1rem, 2.4vw, 1.8rem) var(--gutter);
  font-family: var(--f-mono); font-size: var(--step--2);
  letter-spacing: 0.26em; text-transform: uppercase;
  transition: transform .6s var(--ease-cine), opacity .6s var(--ease-cine);
  mix-blend-mode: difference;
}
.site-nav.is-hidden { transform: translateY(-120%); opacity: 0; }
.nav-brand { display: flex; align-items: baseline; gap: 0.8rem; color: var(--c-light); }
.nav-brand .mark { font-weight: 400; }
.nav-brand .role { color: var(--c-muted); display: none; }
.nav-links { display: flex; gap: clamp(1.2rem, 2.5vw, 2.4rem); }
.nav-links a {
  position: relative; color: var(--c-text); padding: 0.2rem 0;
  font-size: var(--step--2); letter-spacing: 0.22em;
  transition: color .4s var(--ease-soft);
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 1px; width: 100%;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .5s var(--ease-cine);
}
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.nav-links a[aria-current="page"] { color: var(--c-light); }
.nav-toggle { display: none; }
.nav-panel { display: none; }

/* ---- edge label (editorial section marker, desktop) ---- */
.edge-label {
  position: fixed; left: 0.6rem; top: 50%; z-index: 40;
  transform: translateY(-50%) rotate(180deg); writing-mode: vertical-rl;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.4em;
  text-transform: uppercase; color: var(--c-faint);
  pointer-events: none; opacity: 0; transition: opacity .8s var(--ease-soft);
  mix-blend-mode: difference;
}
.edge-label.is-on { opacity: 1; }
@media (max-width: 900px) { .edge-label { display: none; } }

/* ============================ HERO ============================ */
/* FIXED cinematic hero layer — sits behind the scrolling site and gets covered by it.
   The film stays put and scrubs with scroll; the site (main, z above) scrolls up over it. */
.hero {
  --hero-bar: clamp(2.6rem, 8.5vh, 8.5rem);
  position: fixed; inset: 0;
  height: 100svh; min-height: 500px;
  z-index: 1;
  background: var(--c-void);
  overflow: hidden;
}
.hero__media {
  position: absolute; inset: 0; z-index: 0;
  will-change: opacity;
}
.hero__film { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; }
.hero__video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; background: var(--c-void); opacity: 0; pointer-events: none;
}
.hero.has-video .hero__video { opacity: 1; }
.hero.has-video .hero__film { opacity: 0; }

/* The scrolling site must sit ABOVE the fixed hero and be opaque,
   so once the video finishes and you keep scrolling, the site covers the film. */
main {
  display: block;
  position: relative;
  z-index: 2;                 /* above the fixed hero (z:1) */
  background: var(--c-void);  /* opaque — hides the hero beneath it */
  margin-top: 170svh;         /* the film scrubs across ~1.7 screens before the site covers it */
}

/* cinematic letterbox — stays at the frame edges while the film recedes */
.hero__bars {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  box-shadow:
    inset 0 var(--hero-bar) 0 0 var(--c-void),
    inset 0 calc(-1 * var(--hero-bar)) 0 0 var(--c-void),
    inset 0 calc(var(--hero-bar) - 1px) 0 0 rgba(232,230,224,0.10),
    inset 0 calc(-1 * var(--hero-bar) + 1px) 0 0 rgba(232,230,224,0.10);
}

.hero__scrim {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 38%, transparent 42%, rgba(4,5,8,0.55) 100%),
    linear-gradient(to top, var(--c-void) 2%, transparent 24%, transparent 68%, rgba(4,5,8,0.42) 100%);
}
.hero__grain {
  position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
.hero__content {
  position: absolute; inset: 0; z-index: 4;
  display: grid; grid-template-rows: 1fr auto 1fr;
  padding: var(--gutter);
}
.hero__name {
  align-self: center; justify-self: start;
  font-family: var(--f-display); font-weight: 800; font-stretch: 115%;
  font-size: var(--step-6); line-height: 0.86; letter-spacing: -0.035em;
  text-transform: uppercase; color: var(--c-light);
  text-shadow: 0 2px 60px rgba(0,0,0,0.55);
  max-width: 100%;
  opacity: 1;                 /* always visible over the hero */
}
.hero__name .nm-line { display: block; }
.hero__name .nm-line > span { display: inline-block; padding-right: 0.06em; will-change: transform; }
.hero__role {
  position: absolute; left: var(--gutter); bottom: calc(var(--hero-bar) + 1.6rem);
  opacity: 1;
  font-family: var(--f-mono); letter-spacing: 0.5em; font-size: var(--step--1);
  color: var(--c-light); text-transform: uppercase;
  text-shadow: 0 1px 14px rgba(0,0,0,0.7);
}
.hero__cue {
  position: absolute; left: 50%; bottom: calc(var(--hero-bar) + 1.4rem);
  transform: translateX(-50%); display: grid; justify-items: center; gap: 0.7rem;
  color: var(--c-faint); font-family: var(--f-mono);
  font-size: 10px; letter-spacing: 0.4em; text-transform: uppercase;
}
.hero__cue .bar { width: 1px; height: 46px; background: linear-gradient(var(--c-faint), transparent);
  transform-origin: top; animation: cueScroll 2.4s var(--ease-soft) infinite; }
@keyframes cueScroll {
  0% { transform: scaleY(0); opacity: 0; }
  35% { opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}
.hero__clock {
  position: absolute; right: var(--gutter); bottom: calc(var(--hero-bar) + 1.6rem);
  text-align: right; font-family: var(--f-mono); font-size: var(--step--2);
  letter-spacing: 0.3em; color: var(--c-light); text-shadow: 0 1px 14px rgba(0,0,0,0.7);
}
.hero__progress {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: var(--gutter);
  height: 1px; background: var(--c-line);
}
.hero__progress > i { display: block; height: 100%; width: 0; background: var(--c-steel); }

/* reduced motion: a calm static hero (video still shown, no scrub) */
html.reduced .hero { position: fixed; height: 100svh; }
html.reduced .hero__name { opacity: 1 !important; }
@media (max-width: 720px) {
  .hero { height: 100svh; }
}

/* ============================ SECTION SHELL ============================ */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { position: relative; padding-block: clamp(5rem, 12vw, 11rem); }
.section--tight { padding-block: clamp(3rem, 7vw, 6rem); }
.section-head { display: flex; flex-direction: column; gap: 1.4rem; margin-bottom: clamp(2.5rem, 6vw, 5rem); }

.statement {
  display: grid; grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
}
@media (min-width: 900px) {
  .statement { grid-template-columns: 0.9fr 1.4fr; align-items: start; }
  .statement .bignum { justify-self: start; }
}
.statement__body p {
  font-family: var(--f-serif); font-weight: 300; font-size: var(--step-2);
  line-height: 1.42; color: var(--c-text); letter-spacing: -0.01em;
  max-width: 30ch;
}
.statement__meta { display: flex; flex-wrap: wrap; gap: 1.4rem 2.4rem; margin-top: 2.2rem; }
.statement__meta div { max-width: 22ch; }
.statement__meta .label { display: block; margin-bottom: 0.4rem; }
.statement__meta p { font-family: var(--f-mono); font-size: var(--step--1); color: var(--c-muted); line-height: 1.5; }

/* footer */
.site-footer {
  position: relative; z-index: 2;        /* same plane as main — must sit ABOVE the fixed hero (z:1) */
  padding: clamp(4rem, 9vw, 8rem) var(--gutter) 2.4rem;
  border-top: 1px solid var(--c-line); background: var(--c-void);
}
.site-footer__grid { display: grid; gap: 2.4rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .site-footer__grid { grid-template-columns: 1.6fr 1fr 1fr; } }
.footer-name {
  font-family: var(--f-display); font-weight: 800; font-stretch: 110%;
  font-size: var(--step-4); line-height: 0.9; letter-spacing: -0.03em;
  text-transform: uppercase; color: var(--c-light);
}
.footer-col h4 { font-family: var(--f-mono); font-size: var(--step--2); letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--c-muted); margin-bottom: 1rem; }
.footer-col a, .footer-col p { display: block; font-family: var(--f-mono); font-size: var(--step--1);
  color: var(--c-text); margin-bottom: 0.55rem; transition: color .35s; }
.footer-col a:hover { color: var(--c-light); }
.footer-base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  margin-top: clamp(2.5rem, 6vw, 4.5rem); padding-top: 1.6rem;
  border-top: 1px solid var(--c-line);
  font-family: var(--f-mono); font-size: var(--step--2); letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--c-faint);
}

/* ---- mobile / narrow art direction (deliberate, not a shrunk desktop) ----
   Placed LAST so these win over same-specificity base rules. ---- */
@media (max-width: 720px) {
  /* ---- mobile nav: hamburger + full-screen overlay panel ---- */
  .nav-links { display: none; }
  .nav-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 30px; height: 22px; padding: 0; background: none; border: 0; cursor: pointer; z-index: 70;
  }
  .nav-toggle span {
    display: block; height: 1.5px; width: 100%; background: var(--c-light);
    transition: transform .4s var(--ease-cine), opacity .3s; transform-origin: center;
  }
  body.is-menu-open .nav-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  body.is-menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.is-menu-open .nav-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

  .nav-panel {
    display: grid; align-content: center; gap: 0.4rem;
    position: fixed; inset: 0; z-index: 65;
    background: var(--c-void);
    padding: var(--gutter); padding-top: 22vh;
    transform: translateY(-100%); transition: transform .6s var(--ease-cine);
    visibility: hidden;
  }
  .nav-panel.is-open { transform: none; visibility: visible; }
  .nav-panel a {
    font-family: var(--f-display); font-weight: 800; font-stretch: 110%;
    font-size: clamp(2.4rem, 11vw, 4rem); line-height: 1.05; letter-spacing: -0.02em;
    text-transform: uppercase; color: var(--c-light); padding: 0.4rem 0;
  }
  .nav-panel a.nav-current { color: var(--c-muted); }

  /* ---- hero scaling ---- */
  .hero__name { font-size: clamp(2.4rem, 12vw, 5rem); letter-spacing: -0.03em; }
  .hero__role { letter-spacing: 0.30em; font-size: var(--step--2); }
  .hero__cue { font-size: 9px; letter-spacing: 0.34em; }
  .hero__cue .bar { height: 30px; }
  .h-display { font-size: clamp(2.2rem, 11vw, 4rem); }
  .h-serif { font-size: var(--step-2); }
  .bignum { font-size: clamp(4rem, 22vw, 9rem); }

  /* ---- layouts collapse to single column (already done in components, reinforce) ---- */
  .statement { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-name { font-size: clamp(2.4rem, 12vw, 4rem); }
  .site-footer__grid { grid-template-columns: 1fr; gap: 2rem; }

  /* ---- nav + footer safe-area padding for notched phones ---- */
  .site-nav { padding: calc(0.9rem + env(safe-area-inset-top)) var(--gutter) 0.9rem; }
  .site-footer { padding-bottom: calc(2.4rem + env(safe-area-inset-bottom)); }
}
@media (max-width: 420px) {
  .hero__name { font-size: clamp(2.1rem, 11.5vw, 4rem); }
  .h-display { font-size: clamp(2rem, 10vw, 3.4rem); }
  .nav-panel a { font-size: clamp(2rem, 12vw, 3.2rem); }
}
