/* ============================================================================
   SANKET KADAM — DESIGN SYSTEM
   "Le Générique" — cinematic title-sequence meets fashion contact-sheet
   ----------------------------------------------------------------------------
   This file is the FOUNDATION ONLY: tokens, reset, base type, utilities.
   No sections. No components. Those arrive in later steps.
   ============================================================================ */

/* ----------------------------------------------------------------------------
   1. TOKENS
---------------------------------------------------------------------------- */
:root {

  /* --- COLOR ------------------------------------------------------------- */
  --ink:            #0C0C0D;   /* page background — rich off-black, never pure */
  --ink-deep:       #000000;   /* filmic device only: letterbox bars, vignette */
  --surface:        #141416;   /* cards, letterbox frames */
  --surface-2:      #1A1A1D;   /* raised surface, hover elevation */

  --paper:          #EFEAE1;   /* primary type — warm white, "the light" */
  --paper-dim:      #8C877D;   /* secondary type, labels, credits (neutral gray) */
  --paper-faint:    #55524C;   /* tertiary / decorative — never essential copy */

  --line:           rgba(239, 234, 225, 0.12);  /* hairline rules */
  --line-strong:    rgba(239, 234, 225, 0.22);  /* emphasized dividers */

  --overlay:        rgba(8, 8, 9, 0.60);         /* scrim (menu, modal) */
  --overlay-strong: rgba(6, 6, 7, 0.82);
  --img-veil:       linear-gradient(180deg, rgba(12,12,13,0) 38%, rgba(12,12,13,0.55) 100%);
  --hover-tint:     rgba(239, 234, 225, 0.04);   /* barely-there warm wash on hover */

  /* NO accent color. The photography is the only color. */

  /* --- ELEVATION (subtle on dark) --------------------------------------- */
  --shadow-sm: 0 2px 12px rgba(0,0,0,0.40);
  --shadow-md: 0 20px 55px rgba(0,0,0,0.45);
  --shadow-lg: 0 40px 90px rgba(0,0,0,0.55);

  /* --- GLASS (nav / HUD only, used sparingly) --------------------------- */
  --glass-bg:     rgba(12, 12, 13, 0.55);
  --glass-border: rgba(239, 234, 225, 0.10);
  --glass-blur:   18px;

  /* --- TYPEFACES --------------------------------------------------------- */
  --font-display: "Fraunces", "Times New Roman", Georgia, serif;
  --font-body:    "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:    "Space Mono", "SFMono-Regular", ui-monospace, monospace;

  /* --- WEIGHTS ----------------------------------------------------------- */
  --fw-light:    300;
  --fw-regular:  400;
  --fw-medium:   500;
  --fw-semibold: 600;
  --fw-black:    900;

  /* --- FLUID TYPE SCALE (16px base) ------------------------------------- */
  --fs-hero:       clamp(4rem, 15vw, 19rem);      /* the name — a film title card */
  --fs-display-1:  clamp(2.75rem, 8vw, 7rem);     /* section titles */
  --fs-display-2:  clamp(2rem, 5vw, 4rem);        /* sub-display / pull quotes */
  --fs-headline:   clamp(1.5rem, 3vw, 2.25rem);
  --fs-title:      clamp(1.25rem, 1.6vw, 1.6rem);
  --fs-body-lg:    clamp(1.0625rem, 1.1vw, 1.25rem);
  --fs-body:       1rem;                            /* 16px min — no iOS zoom */
  --fs-caption:    0.8125rem;
  --fs-label:      0.75rem;                         /* mono, uppercase */
  --fs-micro:      0.6875rem;

  /* --- LINE HEIGHT ------------------------------------------------------- */
  --lh-hero:    0.86;
  --lh-display: 0.95;
  --lh-tight:   1.08;
  --lh-snug:    1.28;
  --lh-body:    1.55;
  --lh-label:   1;

  /* --- LETTER SPACING ---------------------------------------------------- */
  --ls-hero:   -0.03em;
  --ls-display:-0.02em;
  --ls-tight:  -0.01em;
  --ls-body:    0em;
  --ls-label:   0.22em;   /* mono uppercase */
  --ls-wide:    0.34em;

  /* --- SPACING SCALE (8pt base, spacious) ------------------------------- */
  --space-3xs: 0.25rem;   /* 4  */
  --space-2xs: 0.5rem;    /* 8  */
  --space-xs:  0.75rem;   /* 12 */
  --space-sm:  1rem;      /* 16 */
  --space-md:  1.5rem;    /* 24 */
  --space-lg:  2.5rem;    /* 40 */
  --space-xl:  4rem;      /* 64 */
  --space-2xl: 6rem;      /* 96 */
  --space-3xl: clamp(6rem, 12vw, 12rem);
  --space-4xl: clamp(8rem, 18vw, 16rem);
  --section-y: clamp(6rem, 14vw, 14rem);  /* vertical rhythm between sections */

  /* --- LAYOUT / GRID ----------------------------------------------------- */
  --margin:      clamp(1.25rem, 5vw, 4rem);   /* outer page gutter: 20 → 64px */
  --gutter:      clamp(1rem, 1.5vw, 1.5rem);  /* column gap */
  --content-max: 1600px;
  --columns:     4;                            /* mobile default; scales up below */

  /* --- RADIUS (editorial = near-zero) ----------------------------------- */
  --radius-none: 0;
  --radius-sm:   2px;
  --radius-md:   6px;

  /* --- MOTION ------------------------------------------------------------ */
  --dur-fast:      0.30s;
  --dur:           0.60s;
  --dur-slow:      1.00s;
  --dur-cinematic: 1.40s;
  --ease-out:    cubic-bezier(0.16, 1, 0.30, 1);     /* signature reveal (expo out) */
  --ease-in-out: cubic-bezier(0.83, 0, 0.17, 1);     /* cinematic (expo in-out)     */
  --ease-power:  cubic-bezier(0.60, 0.01, 0.05, 0.95);
  --ease-ui:     cubic-bezier(0.40, 0, 0.20, 1);     /* micro-interactions          */

  /* --- Z-INDEX SCALE ----------------------------------------------------- */
  --z-base:      1;
  --z-content:   10;
  --z-overlay:   100;
  --z-nav:       200;
  --z-hud:       300;
  --z-cursor:    900;
  --z-preloader: 1000;
}

/* Breakpoint column steps (margins scale fluidly via --margin) */
@media (min-width: 768px)  { :root { --columns: 8;  } }
@media (min-width: 1024px) { :root { --columns: 12; } }

/* ----------------------------------------------------------------------------
   2. RESET
---------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-size: 100%;
  scroll-behavior: auto;              /* Lenis owns smooth scrolling */
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100dvh;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
  font-weight: var(--fw-regular);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--fw-light);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-display);
  text-wrap: balance;
}

p { text-wrap: pretty; max-width: 68ch; }

a { color: inherit; text-decoration: none; }

button, input, textarea, select {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  letter-spacing: inherit;
}

button { cursor: pointer; }
ul, ol { list-style: none; }

/* ----------------------------------------------------------------------------
   3. SELECTION / FOCUS / SCROLLBAR
---------------------------------------------------------------------------- */
::selection { background: var(--paper); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb {
  background: var(--paper-faint);
  border-radius: 99px;
  border: 2px solid var(--ink);
}
html { scrollbar-width: thin; scrollbar-color: var(--paper-faint) var(--ink); }

/* ----------------------------------------------------------------------------
   4. TYPOGRAPHIC UTILITIES
---------------------------------------------------------------------------- */
.u-display   { font-family: var(--font-display); }
.u-body      { font-family: var(--font-body); }
.u-mono      { font-family: var(--font-mono); }

/* Credits / timecode / metadata voice — the cinematographer's technical layer */
.u-label {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: var(--fw-regular);
  line-height: var(--lh-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--paper-dim);
}

.u-dim   { color: var(--paper-dim); }
.u-faint { color: var(--paper-faint); }
.u-italic{ font-style: italic; }

/* ----------------------------------------------------------------------------
   5. LAYOUT PRIMITIVES
---------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--margin);
}

/* ----------------------------------------------------------------------------
   6. ACCESSIBILITY
---------------------------------------------------------------------------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: var(--space-sm);
  left: var(--space-sm);
  z-index: var(--z-preloader);
  padding: var(--space-2xs) var(--space-sm);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  transform: translateY(-160%);
  transition: transform var(--dur-fast) var(--ease-out);
}
.skip-link:focus { transform: translateY(0); }

/* Reduced motion: strip the cinema, keep the content */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================================
   HERO  ·  "Le Générique" title card   (Step 3)
   ============================================================================ */
.hero {
  position: relative;
  color: var(--paper);   /* resolve type colour INSIDE the hero's token scope
                            (keeps hero text warm-white in light mode too)   */
  width: 100%;
  height: 100vh;      /* fallback for older browsers */
  height: 100svh;     /* small-viewport units: correct on mobile URL bars */
  min-height: 600px;
  overflow: hidden;
  background: var(--ink);
  isolation: isolate;
}

/* --- Full-bleed media (parallax layer) -------------------------------- */
.hero__media {
  position: absolute;
  inset: -12%;                     /* overscan for mouse + scroll parallax headroom */
  z-index: 0;
  will-change: transform, opacity, filter;
}
.hero__backdrop {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 72% 18%, rgba(70,67,62,0.30), transparent 58%),
    radial-gradient(120% 120% at 18% 92%, rgba(16,16,18,0.85), transparent 55%),
    linear-gradient(180deg, #141416 0%, #0C0C0D 58%, #080809 100%);
}
.hero__glow {
  position: absolute; inset: -20%;
  background: radial-gradient(circle at 50% 42%, rgba(122,118,110,0.20), transparent 55%);
  filter: blur(20px);
  will-change: transform;
  animation: heroGlow 20s var(--ease-in-out) infinite alternate;
}
.hero__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.05) brightness(0.9);
}

/* --- Dark cinematic overlay ------------------------------------------- */
.hero__overlay {
  position: absolute; inset: 0; z-index: 1;
  pointer-events: none;
  /* Editorial scrim: protects the type zone (left) and the chrome (top/bottom)
     while letting the photograph breathe on the right. */
  background:
    linear-gradient(90deg,  rgba(12,12,13,0.86) 0%, rgba(12,12,13,0.52) 44%, rgba(12,12,13,0.18) 100%),
    linear-gradient(180deg, rgba(12,12,13,0.62) 0%, rgba(12,12,13,0.10) 30%, rgba(12,12,13,0.14) 62%, rgba(12,12,13,0.82) 100%),
    radial-gradient(125% 125% at 50% 38%, transparent 42%, rgba(0,0,0,0.5) 100%);
}
.hero__grain {
  position: absolute; inset: 0; z-index: 2;
  pointer-events: none;
  opacity: 0.06;
  mix-blend-mode: overlay;
  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.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
  animation: heroGrain 0.5s steps(4) infinite;
}

/* --- Viewfinder frame ------------------------------------------------- */
.hero__frame { position: absolute; inset: 0; z-index: 3; pointer-events: none; will-change: transform; }
.hero__bracket {
  position: absolute;
  width: 26px; height: 26px;
  border: 1px solid var(--line-strong);
}
.hero__bracket--tl { top: var(--margin); left: var(--margin);  border-right: 0; border-bottom: 0; }
.hero__bracket--tr { top: var(--margin); right: var(--margin); border-left: 0;  border-bottom: 0; }
.hero__bracket--bl { bottom: var(--margin); left: var(--margin);  border-right: 0; border-top: 0; }
.hero__bracket--br { bottom: var(--margin); right: var(--margin); border-left: 0;  border-top: 0; }

/* --- Content shell ---------------------------------------------------- */
.hero__inner {
  position: relative; z-index: 10;
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  padding-block:
    calc(var(--space-2xl) + env(safe-area-inset-top))
    calc(var(--space-lg) + env(safe-area-inset-bottom));
}

/* Name block sits vertically centered in the upper region; slate anchors bottom */
.hero__center { align-self: center; }
.hero__bottom { align-self: end; }
.hero__slate  { display: flex; flex-direction: column; gap: var(--space-2xs); }
.hero__tc {
  font-family: var(--font-mono);
  font-size: var(--fs-label); letter-spacing: 0.12em; color: var(--paper-dim);
}

/* Name */
.hero__center { display: flex; flex-direction: column; gap: clamp(1rem, 2.4vw, 2.4rem); }
.hero__name {
  --fs-name: clamp(3.25rem, 13vw, 15rem);
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--fw-regular);
  font-size: var(--fs-name);
  line-height: 0.86;
  letter-spacing: var(--ls-hero);
  font-variation-settings: 'opsz' 144;
}
.hero__line {
  display: block;
  overflow: hidden;
  padding-block: 0.12em;
  margin-block: -0.12em;
}
.hero__line--upper { text-transform: uppercase; }
.hero__word { display: inline-block; }
.hero__name .char { display: inline-block; will-change: transform; }

/* Roles */
.hero__roles {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 0.7em;
  max-width: none;
  font-family: var(--font-mono);
  font-size: clamp(0.75rem, 1.1vw, 0.95rem);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--paper-dim);
}
.hero__amp {
  font-family: var(--font-display);
  font-style: italic; font-weight: var(--fw-regular);
  font-size: 1.7em; line-height: 1;
  letter-spacing: 0; text-transform: none;
  color: var(--paper);
}

/* Bottom */
.hero__bottom {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--space-lg);
}
.hero__place {
  max-width: none;
  font-family: var(--font-mono);
  font-size: var(--fs-label); letter-spacing: var(--ls-label);
  text-transform: uppercase; color: var(--paper); line-height: 1.75;
}
.hero__actions { display: flex; align-items: center; gap: var(--space-md); }

/* Buttons */
.btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 0.7em;
  padding: 0.95em 1.5em;
  font-family: var(--font-mono);
  font-size: var(--fs-label); letter-spacing: var(--ls-label);
  text-transform: uppercase; color: var(--paper);
  border-radius: var(--radius-sm);
  overflow: hidden; white-space: nowrap;
  will-change: transform;
  transition: color var(--dur-fast) var(--ease-ui);
}
.btn__label, .btn__icon { position: relative; z-index: 1; }
.btn__icon { width: 0.9em; height: 0.9em; transition: transform var(--dur-fast) var(--ease-out); }

.btn--primary { border: 1px solid var(--line-strong); }
.btn--primary::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: var(--paper);
  transform: translateY(101%);
  transition: transform var(--dur) var(--ease-out);
}
.btn--primary:hover { color: var(--ink); }
.btn--primary:hover::before { transform: translateY(0); }
.btn--primary:hover .btn__icon { transform: translate(2px, -2px); }

.btn--ghost { padding-inline: 0.2em; color: var(--paper); }
.btn--ghost::after {
  content: ""; position: absolute; left: 0.2em; right: 0.2em; bottom: 0.5em; height: 1px;
  background: var(--paper-dim);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur) var(--ease-out);
}
.btn--ghost:hover::after { transform: scaleX(1); }
.btn--ghost:hover .btn__icon { transform: translateX(3px); }

/* Scroll cue */
.hero__scroll {
  position: absolute; left: 50%; bottom: calc(var(--space-md) + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 10;
  display: flex; flex-direction: column; align-items: center; gap: var(--space-xs);
}
.hero__scroll .u-label { color: var(--paper-dim); }
.hero__scroll-track {
  position: relative; width: 1px; height: 46px;
  background: var(--line-strong); overflow: hidden;
}
.hero__scroll-dot {
  position: absolute; top: 0; left: 0; width: 1px; height: 14px;
  background: var(--paper);
  animation: heroScroll 2.2s var(--ease-in-out) infinite;
}

/* --- Keyframes -------------------------------------------------------- */
@keyframes heroGrain {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-4%, 2%); }
  50%  { transform: translate(3%, -3%); }
  75%  { transform: translate(-2%, 4%); }
  100% { transform: translate(2%, -2%); }
}
@keyframes heroGlow {
  0%   { transform: translate(-3%, -2%) scale(1); }
  100% { transform: translate(4%, 3%) scale(1.12); }
}
@keyframes heroScroll {
  0%   { transform: translateY(-100%); }
  50%  { transform: translateY(230%); }
  100% { transform: translateY(-100%); }
}

/* --- Reveal states (only with JS; disabled for reduced motion) -------- */
html.js .hero__media,
html.js .hero__name,
html.js [data-reveal],
html.js .hero__bracket { opacity: 0; }

html.hero-shown .hero__media,
html.hero-shown .hero__name,
html.hero-shown [data-reveal],
html.hero-shown .hero__bracket { opacity: 1 !important; }

@media (prefers-reduced-motion: reduce) {
  html.js .hero__media,
  html.js .hero__name,
  html.js [data-reveal],
  html.js .hero__bracket { opacity: 1 !important; }
  .hero__glow, .hero__grain, .hero__scroll-dot { animation: none !important; }
}

/* --- Responsive ------------------------------------------------------- */
@media (max-width: 767px) {
  .hero__bottom  { flex-direction: column; align-items: flex-start; gap: var(--space-md); }
  .hero__actions { width: 100%; }
  .hero__bracket { width: 18px; height: 18px; }
  .hero__amp     { font-size: 1.5em; }
  .hero__scroll  { display: none; }
}

/* ============================================================================
   NAVIGATION  ·  floating glass bar + fullscreen menu   (Step 4)
   ============================================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: var(--z-nav);
  pointer-events: none;
  will-change: transform, opacity;
}
.nav::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: rgba(12, 12, 13, 0.12);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  backdrop-filter: blur(10px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: background-color var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out);
}
.nav.is-scrolled::before {
  background: var(--glass-bg);
  border-bottom-color: var(--glass-border);
}

.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-md);
  padding-block: clamp(1.15rem, 2.2vw, 1.75rem);
  transition: padding-block var(--dur) var(--ease-out);
}
.nav.is-scrolled .nav__inner { padding-block: clamp(0.7rem, 1.3vw, 1rem); }

/* Logo */
.nav__logo { pointer-events: auto; display: inline-block; }
.nav__logo-name {
  font-family: var(--font-display);
  font-weight: var(--fw-regular);
  font-size: clamp(1.05rem, 1.5vw, 1.4rem);
  letter-spacing: -0.01em;
  color: var(--paper);
  transition: font-size var(--dur) var(--ease-out), opacity var(--dur-fast) var(--ease-ui);
}
.nav.is-scrolled .nav__logo-name { font-size: clamp(0.95rem, 1.2vw, 1.15rem); }
.nav__logo:hover .nav__logo-name { opacity: 0.68; }

/* Links — rolling text on hover */
.nav__links {
  pointer-events: auto;
  display: flex; align-items: center;
  gap: clamp(1.5rem, 2.6vw, 2.75rem);
}
.nav__link {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
}
.nav__link-roll { display: flex; flex-direction: column; height: 1em; overflow: hidden; }
.nav__link-roll span {
  display: block; line-height: 1; color: var(--paper-dim);
  transition: transform var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
}
.nav__link-roll span:last-child { color: var(--paper); }
.nav__link:hover .nav__link-roll span { transform: translateY(-100%); }

/* Toggle (mobile) */
.nav__toggle {
  pointer-events: auto;
  display: none;
  align-items: center; gap: var(--space-sm);
  color: var(--paper);
}
.nav__toggle-label {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--paper);
}
.nav__toggle-lines { position: relative; display: block; width: 26px; height: 8px; }
.nav__toggle-lines i {
  position: absolute; left: 0; width: 100%; height: 1.5px;
  background: var(--paper); transform-origin: center;
  transition: transform var(--dur) var(--ease-out);
}
.nav__toggle-lines i:nth-child(1) { top: 0; }
.nav__toggle-lines i:nth-child(2) { bottom: 0; }
.nav.is-menu-open .nav__toggle-lines i:nth-child(1) { transform: translateY(3.25px) rotate(45deg); }
.nav.is-menu-open .nav__toggle-lines i:nth-child(2) { transform: translateY(-3.25px) rotate(-45deg); }

/* --- Fullscreen menu --- */
.menu { position: fixed; inset: 0; z-index: var(--z-overlay); visibility: hidden; }
.menu__bg {
  position: absolute; inset: 0;
  background: var(--ink);
  transform: scaleY(0); transform-origin: 50% 0%;
  transition: transform var(--dur) var(--ease-in-out);
}
.menu.is-open { visibility: visible; }
.menu.is-open .menu__bg { transform: scaleY(1); }

.menu__panel {
  position: relative; height: 100%;
  display: flex; flex-direction: column; justify-content: space-between;
  padding-block:
    calc(var(--space-4xl) + env(safe-area-inset-top))
    calc(var(--space-2xl) + env(safe-area-inset-bottom));
}
.menu__list {
  display: flex; flex-direction: column;
  gap: clamp(0.4rem, 1.6vh, 1.1rem);
  margin-block: auto;
}
.menu__link {
  display: inline-flex; align-items: baseline; gap: var(--space-md);
  color: var(--paper);
  transition: transform var(--dur) var(--ease-out);
}
.menu__link:hover { transform: translateX(0.4em); }
.menu__index {
  font-family: var(--font-mono);
  font-size: var(--fs-label); letter-spacing: var(--ls-label);
  color: var(--paper-dim);
}
.menu__mask { display: block; overflow: hidden; padding: 0.08em 0.14em; margin: -0.08em -0.14em; }
.menu__word {
  display: block;
  font-family: var(--font-display); font-weight: var(--fw-regular);
  font-size: clamp(2.75rem, 13vw, 6.5rem);
  line-height: 0.95; letter-spacing: -0.02em;
}
.menu__link:hover .menu__word { font-style: italic; }
.menu__footer {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--space-lg);
  border-top: 1px solid var(--line);
  padding-top: var(--space-md);
}
.menu__footer-col { display: flex; flex-direction: column; gap: var(--space-3xs); }
.menu__mail { transition: opacity var(--dur-fast) var(--ease-ui); }
.menu__mail:hover { opacity: 0.68; }

/* Lock background scroll when the fullscreen menu is open (no-Lenis fallback) */
html.menu-open, html.menu-open body { overflow: hidden; }

/* Breakpoint swap */
@media (max-width: 767px) {
  .nav__links  { display: none; }
  .nav__toggle { display: inline-flex; }
}

/* ============================================================================
   SELECTED WORK  ·  editorial asymmetric grid   (Step 5)
   ============================================================================ */
.work {
  position: relative;
  padding-block: clamp(7rem, 16vh, 16rem);
  overflow: hidden;            /* contain full-bleed feature + parallax overscan */
}

/* --- Section header --- */
.work__head { max-width: 72ch; margin-bottom: clamp(4rem, 9vh, 9rem); }
.work__eyebrow { display: block; color: var(--paper-dim); margin-bottom: var(--space-md); }
.work__heading {
  font-size: var(--fs-display-1);
  line-height: 0.95; letter-spacing: var(--ls-display);
}
.work__heading .line { display: block; overflow: hidden; padding-block: 0.06em; margin-block: -0.06em; }
.work__heading [data-title] { display: block; }
.work__intro {
  margin-top: var(--space-lg);
  max-width: 46ch;
  color: var(--paper-dim);
  font-size: var(--fs-body-lg);
}
.work__legend {
  display: flex; flex-wrap: wrap; gap: var(--space-lg);
  margin-top: var(--space-xl);
  color: var(--paper-dim);
}
.work__legend li { position: relative; padding-left: 1.25em; }
.work__legend li::before {
  content: ""; position: absolute; left: 0; top: 0.35em;
  width: 6px; height: 6px; border: 1px solid var(--paper-dim); border-radius: 50%;
}

/* --- Grid (mobile-first: single column, gently varied) --- */
.work__grid { display: grid; grid-template-columns: 1fr; gap: clamp(3.5rem, 9vw, 6rem); }

.work-item { position: relative; }
.work-item__link { display: block; color: inherit; perspective: 1600px; }

.work-item__media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: linear-gradient(150deg, #1B1B1F 0%, #111113 72%, #161618 100%);
  box-shadow: inset 0 0 0 1px var(--line);
  aspect-ratio: 3 / 4;         /* default; overridden per item */
}

/* placeholder plate (shows until a real image is dropped in) */
.work-item__plate { position: absolute; inset: 0; z-index: 0; display: grid; place-items: center; }
.work-item__plate-num {
  font-family: var(--font-display); font-weight: var(--fw-regular);
  font-size: clamp(4rem, 10vw, 9rem);
  color: rgba(239, 234, 225, 0.12);
  line-height: 1;
}

/* layered transforms: parallax(scroll) › track(mouse) › img(zoom) — no conflicts */
.work-item__parallax { position: absolute; inset: -8% 0; z-index: 1; will-change: transform; }
.work-item__track    { position: absolute; inset: -6%;   will-change: transform; }
.work-item__img {
  width: 100%; height: 100%; object-fit: cover;
  will-change: transform, filter;
  filter: grayscale(1) contrast(1.02);          /* B&W by default */
  transition: transform 0.9s var(--ease-out), filter 0.9s var(--ease-out);
}
.work-item__img.is-broken { opacity: 0; }
.work-item__link:hover .work-item__img { transform: scale(1.05); filter: grayscale(0) brightness(1.03); }  /* true colour on hover */
.work-item__link { cursor: pointer; }
/* Touch devices have no hover — show colour by default */
@media (hover: none) { .work-item__img { filter: grayscale(0); } }

.work-item__num {
  position: absolute; top: var(--space-sm); left: var(--space-sm); z-index: 2;
  color: var(--paper); mix-blend-mode: difference;
}

/* Caption */
.work-item__caption { margin-top: var(--space-md); }
.work-item__meta {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-md);
  padding-top: var(--space-sm); border-top: 1px solid var(--line);
}
.work-item__cat  { color: var(--paper-dim); }
.work-item__year { color: var(--paper-dim); }
.work-item__title {
  margin-top: var(--space-xs);
  font-family: var(--font-display); font-weight: var(--fw-regular);
  font-size: clamp(1.5rem, 2.6vw, 2.5rem);
  line-height: 1; letter-spacing: -0.02em;
}
.work-item__title .line { display: block; overflow: hidden; padding-block: 0.1em; margin-block: -0.1em; }
.work-item__title [data-title] { display: block; }
.work-item__view {
  display: inline-flex; align-items: center; gap: 0.55em;
  margin-top: var(--space-sm); color: var(--paper-dim);
  opacity: 0; transform: translateY(6px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out), color 0.5s var(--ease-out);
}
.work-item__view .btn__icon { width: 0.85em; height: 0.85em; }
.work-item__link:hover .work-item__view { opacity: 1; transform: translateY(0); color: var(--paper); }

/* Per-item aspect ratios — mixed orientations */
.wi--1 .work-item__media { aspect-ratio: 3 / 4; }
.wi--2 .work-item__media { aspect-ratio: 16 / 10; }  /* landscape — film card */
.wi--3 .work-item__media { aspect-ratio: 16 / 9; }
.wi--4 .work-item__media { aspect-ratio: 4 / 5; }
.wi--5 .work-item__media { aspect-ratio: 21 / 9; }  /* cinematic — it's a film card */
.wi--6 .work-item__media { aspect-ratio: 3 / 2; }
.wi--7 .work-item__media { aspect-ratio: 16 / 10; }

/* Gentle asymmetry on small screens */
@media (max-width: 1023px) {
  .wi--2, .wi--4, .wi--7 { margin-left: 12%; }
  .wi--5, .wi--6 { margin-right: 12%; }
}

/* --- Desktop: hand-placed asymmetric composition --- */
@media (min-width: 1024px) {
  .work__grid {
    grid-template-columns: repeat(12, 1fr);
    column-gap: var(--gutter);
    row-gap: clamp(5rem, 11vh, 11rem);
    align-items: start;
  }
  .wi--1 { grid-column: 1 / 6;  z-index: 2; }
  .wi--2 { grid-column: 8 / 13; margin-top: 13vh; z-index: 1; }
  .wi--3 { grid-column: 3 / 12; margin-top: -7vh; z-index: 3; }
  .wi--4 { grid-column: 8 / 13; margin-top: 9vh;  z-index: 2; }
  .wi--5 { grid-column: 1 / 6;  margin-top: -5vh; z-index: 1; }
  .wi--6 { grid-column: 1 / 7;  margin-top: 8vh;  z-index: 2; }
  .wi--7 { grid-column: 8 / 13; margin-top: -3vh; z-index: 1; }
  .work-item:hover { z-index: 5; }
}

/* --- Full-bleed feature (breaks the grid) --- */
.work__feature { position: relative; margin-top: clamp(6rem, 13vh, 13rem); }
.work-item__media--feature { aspect-ratio: 21 / 9; border-radius: 0; }
.work-item__media--feature::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, rgba(12,12,13,0) 40%, rgba(12,12,13,0.75) 100%);
}
.work-item__feature-cap {
  position: absolute; left: 0; bottom: 0; z-index: 3;
  width: 100%;
  padding: clamp(2rem, 5vw, 4.5rem) var(--margin);
  display: flex; flex-direction: column; gap: var(--space-sm);
}
.work-item__title--feature { font-size: clamp(2.5rem, 6.5vw, 6rem); letter-spacing: var(--ls-display); }
.work-item__link--feature:hover .work-item__view { opacity: 1; transform: translateY(0); color: var(--paper); }
@media (max-width: 767px) { .work-item__media--feature { aspect-ratio: 4 / 5; } }

/* --- Follow-cursor "View" affordance --- */
.work-cursor {
  position: fixed; top: 0; left: 0; z-index: var(--z-cursor);
  pointer-events: none;
}
.work-cursor__inner {
  display: grid; place-items: center;
  width: 88px; height: 88px; border-radius: 50%;
  background: var(--paper); color: var(--ink);
  font-family: var(--font-mono); font-size: var(--fs-label);
  letter-spacing: 0.12em; text-transform: uppercase;
  transform: scale(0); transition: transform 0.4s var(--ease-out);
}
.work-cursor.is-active .work-cursor__inner { transform: scale(1); }
@media (hover: none) { .work-cursor { display: none; } }

/* ============================================================================
   ABOUT + CAPABILITIES  ·  editorial statement · disciplines · workflow  (Step 7)
   ============================================================================ */

/* Shared hairline (animated on reveal) */
.rule {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 1px;
  background: var(--line);
  transform: scaleX(1); transform-origin: left;
}
.rule--end { position: relative; display: block; }

/* --- About --- */
.about { position: relative; padding-block: clamp(7rem, 16vh, 16rem); }

.about__top { display: grid; grid-template-columns: 1fr; gap: var(--space-lg); }
.about__eyebrow { display: block; color: var(--paper-dim); }
.about__statement {
  font-family: var(--font-display); font-weight: var(--fw-regular);
  font-size: clamp(2.5rem, 7vw, 6rem);
  line-height: 0.98; letter-spacing: -0.02em;
}
.about__statement .line { display: block; overflow: hidden; padding-block: 0.06em; margin-block: -0.06em; }
.about__statement em { font-style: italic; }
.about__lede { max-width: 42ch; color: var(--paper-dim); font-size: var(--fs-body-lg); line-height: 1.55; }

.about__disc { margin-top: clamp(4rem, 10vh, 10rem); }
.about__disc-label { display: block; color: var(--paper-dim); margin-bottom: var(--space-lg); }

.disc__item {
  position: relative;
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: baseline; column-gap: var(--space-lg);
  padding-block: clamp(1.5rem, 3.5vw, 3rem);
}
.disc__index { color: var(--paper-dim); align-self: start; padding-top: 0.55em; }
.disc__name {
  font-family: var(--font-display); font-weight: var(--fw-regular);
  font-size: clamp(1.9rem, 5.5vw, 4.75rem);
  line-height: 0.95; letter-spacing: -0.02em;
  transition: opacity var(--dur) var(--ease-out);
}
.disc__name .line { display: block; overflow: hidden; padding-block: 0.08em; margin-block: -0.08em; }
.disc__name em, .disc__item:hover .disc__name { font-style: italic; }
.disc__tag { color: var(--paper-dim); align-self: start; padding-top: 0.55em; text-align: right; white-space: nowrap; }
.disc__item:hover ~ .disc__item .disc__name,
.disc:hover .disc__item:not(:hover) .disc__name { opacity: 0.4; }

/* --- Capabilities --- */
.cap { position: relative; padding-block: clamp(4rem, 8vh, 8rem) clamp(7rem, 16vh, 16rem); }
.cap__head { margin-bottom: clamp(4rem, 8vh, 8rem); }
.cap__eyebrow { display: block; color: var(--paper-dim); margin-bottom: var(--space-lg); }
.cap__heading {
  font-family: var(--font-display); font-weight: var(--fw-regular);
  font-size: clamp(2rem, 5.5vw, 4.5rem);
  line-height: 0.98; letter-spacing: -0.02em; max-width: 16ch;
}
.cap__heading .line { display: block; overflow: hidden; padding-block: 0.05em; margin-block: -0.05em; }
.cap__heading em { font-style: italic; }

.cap__row {
  position: relative;
  display: grid; grid-template-columns: 1fr 2.2fr;
  align-items: baseline; gap: var(--space-lg);
  padding-block: clamp(1.35rem, 3vw, 2.75rem);
}
.cap__cat { color: var(--paper-dim); align-self: start; padding-top: 0.4em; }
.cap__tools {
  max-width: none;
  font-family: var(--font-display); font-weight: var(--fw-regular);
  font-size: clamp(1.35rem, 2.8vw, 2.4rem);
  line-height: 1.15; letter-spacing: -0.01em; color: var(--paper);
}

/* --- Editorial two-column spread on desktop --- */
@media (min-width: 1024px) {
  .about__top { grid-template-columns: 1.5fr 1fr; column-gap: var(--space-3xl); align-items: end; }
  .about__eyebrow { grid-column: 1 / -1; margin-bottom: var(--space-md); }
  .about__statement { grid-column: 1; }
  .about__lede { grid-column: 2; }
}

/* --- Mobile refinements --- */
@media (max-width: 767px) {
  .disc__item { grid-template-columns: auto 1fr; column-gap: var(--space-md); }
  .disc__tag { display: none; }
  .disc__name .line { overflow: visible; }
  .cap__row { grid-template-columns: 1fr; gap: var(--space-2xs); }
  .cap__cat { padding-top: 0; }
}

/* ============================================================================
   CONTACT + FOOTER  ·  the closer   (Step 8)
   ============================================================================ */
.contact { position: relative; padding-bottom: clamp(3rem, 6vh, 6rem); }

/* Moving keyword ribbon */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding-block: clamp(1.1rem, 2.5vw, 2rem); }
.marquee__track { display: flex; width: max-content; will-change: transform; }
.marquee__group {
  flex-shrink: 0; white-space: nowrap;
  font-family: var(--font-display); font-weight: var(--fw-regular);
  font-size: clamp(1.6rem, 3.8vw, 3.25rem); letter-spacing: -0.01em;
  color: var(--paper-dim);
}

.contact__inner { padding-block: clamp(5rem, 13vh, 13rem); }
.contact__title {
  font-family: var(--font-display); font-weight: var(--fw-regular);
  font-size: clamp(3rem, 12vw, 11rem);
  line-height: 0.9; letter-spacing: -0.03em;
}
.contact__title .line { display: block; overflow: hidden; padding-block: 0.05em; margin-block: -0.05em; }
.contact__title em { font-style: italic; }
.contact__sub {
  margin-top: clamp(1.75rem, 4vw, 3rem); max-width: 46ch;
  color: var(--paper-dim); font-size: var(--fs-body-lg); line-height: 1.55;
}
.contact__actions { margin-top: clamp(2.5rem, 5vw, 4rem); display: flex; flex-wrap: wrap; gap: var(--space-md); }
.contact__actions .btn { padding: 1.15em 2em; font-size: var(--fs-caption); }
/* Footer */
.footer { border-top: 1px solid var(--line); }
.footer__inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: var(--space-sm) var(--space-lg);
  padding-block: clamp(1.5rem, 3vw, 2.5rem);
}
.footer__copy, .footer__mid, .footer__top { color: var(--paper-dim); }
.footer__top { transition: color var(--dur-fast) var(--ease-ui); }
.footer__top:hover { color: var(--paper); }
@media (max-width: 767px) { .footer__mid { order: 3; flex-basis: 100%; } }

@media (prefers-reduced-motion: reduce) { .marquee__track { transform: none !important; } }

/* ============================================================================
   LIGHTBOX  ·  click-to-view full image / video   (Step 9)
   ============================================================================ */
.lightbox {
  position: fixed; inset: 0; z-index: var(--z-preloader);
  display: grid; place-items: center;
  padding: clamp(1.5rem, 5vw, 4rem);
  background: rgba(6, 6, 7, 0.92);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  opacity: 0; visibility: hidden;
  transition: opacity var(--dur) var(--ease-out), visibility var(--dur) var(--ease-out);
}
.lightbox.is-open { opacity: 1; visibility: visible; }

.lightbox__close {
  position: absolute; top: clamp(1.25rem, 3vw, 2rem); right: clamp(1.25rem, 3vw, 2rem);
  z-index: 2; display: inline-flex; align-items: center; gap: 0.6em;
  font-family: var(--font-mono); font-size: var(--fs-label);
  letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--paper);
  transition: opacity var(--dur-fast) var(--ease-ui);
}
.lightbox__close:hover { opacity: 0.65; }

.lightbox__frame {
  display: flex; flex-direction: column; gap: var(--space-md);
  max-width: min(1100px, 100%); width: 100%;
  transform: scale(0.96); opacity: 0;
  transition: transform var(--dur) var(--ease-out), opacity var(--dur) var(--ease-out);
}
.lightbox.is-open .lightbox__frame { transform: scale(1); opacity: 1; }

.lightbox__media {
  position: relative; overflow: hidden; border-radius: var(--radius-sm);
  background: linear-gradient(150deg, #1B1B1F, #111113);
  box-shadow: var(--shadow-lg);
  display: grid; place-items: center; min-height: 40vh;
}
.lightbox__media img, .lightbox__media video {
  display: block; width: 100%; max-height: 78vh; object-fit: contain;
}
.lightbox__soon {
  display: grid; place-items: center; width: 100%; aspect-ratio: 16 / 9;
  font-family: var(--font-mono); font-size: var(--fs-label);
  letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--paper-dim);
}
.lightbox__cap { display: flex; align-items: baseline; gap: var(--space-md); flex-wrap: wrap; }
.lightbox__cat, .lightbox__year { color: var(--paper-dim); }
.lightbox__title {
  font-family: var(--font-display); font-weight: var(--fw-regular);
  font-size: var(--fs-title); letter-spacing: -0.01em; color: var(--paper);
}

/* ============================================================================
   LARGE-MONITOR SCALING  ·  give ultra-wide screens more presence
   ============================================================================ */
@media (min-width: 1920px) {
  :root { --content-max: 1800px; --margin: clamp(4rem, 6vw, 8rem); }
}

/* ============================================================================
   CHAMPAGNE GOLD ACCENT  ·  the single luxury colour   (Step 10)
   ----------------------------------------------------------------------------
   Rolex / Tom Ford / Saint Laurent restraint: the page stays ~95% black & white.
   Gold appears ONLY in micro-details — never fills or dominates.
   ============================================================================ */
:root {
  /* Champagne gold, built like a watch bezel: shadowed base → body → highlight.
     Inspired by brushed 18k finishing — never flat, never yellow. */
  --gold-deep:   #8A7245;                       /* shadowed edge of the metal    */
  --gold:        #C6A96C;                       /* champagne body — the accent   */
  --gold-light:  #EDD9A3;                       /* polished highlight            */
  --gold-line:   rgba(198, 169, 108, 0.38);     /* thin dividers / borders       */
  --gold-faint:  rgba(198, 169, 108, 0.14);     /* barely-there washes           */
  --gold-glow:   rgba(198, 169, 108, 0.30);     /* soft luminosity               */
  /* The metal itself: light raking across a brushed surface */
  --gold-metal:  linear-gradient(105deg,
                   var(--gold-deep) 0%, var(--gold) 28%,
                   var(--gold-light) 50%,
                   var(--gold) 72%, var(--gold-deep) 100%);
}

/* --- Typography highlights: the couture italics become metal ------------- */
.hero__amp,
.about__statement em,
.cap__heading em,
.contact__title em { color: var(--gold); }             /* fallback: flat gold */

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero__amp,
  .about__statement em,
  .cap__heading em,
  .contact__title em {
    background: var(--gold-metal);
    background-size: 200% 100%;
    background-position: 35% 50%;
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
  /* One animated shimmer only — the closing word of the site.
     A slow rake of light across "Create?", like a watch face turning. */
  .contact__title em { animation: goldSheen 7s var(--ease-in-out) infinite; }
}
@keyframes goldSheen {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* --- Navigation: hover rolls to gold; active section holds it ------------ */
.nav__link-roll span:last-child { color: var(--gold-light); }
.nav__link.is-active .nav__link-roll span:first-child { color: var(--gold); }
.nav.is-scrolled::before { border-bottom-color: var(--gold-line); }

/* --- Cursor: a gold viewfinder ring with a soft halo --------------------- */
.work-cursor__inner {
  background: rgba(12, 12, 13, 0.5);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  border: 1px solid var(--gold);
  color: var(--gold-light);
  box-shadow: 0 0 0 1px rgba(198,169,108,0.15) inset, 0 0 32px var(--gold-glow);
}

/* --- Hover states & micro-interactions ----------------------------------- */
.work-item__link:hover .work-item__view { color: var(--gold); }
.btn--ghost::after { background: var(--gold-metal); }   /* metallic underline draw */
.btn--primary:hover {
  border-color: var(--gold-line);
  box-shadow: 0 10px 40px rgba(198,169,108,0.12);        /* warm lift, not a glow bath */
}
.menu__index { color: var(--gold); }                     /* 01 / 02 / 03 in the menu */
.footer__top:hover { color: var(--gold); }
.hero__scroll-dot { background: var(--gold); box-shadow: 0 0 8px var(--gold-glow); }
.lightbox__close:hover { color: var(--gold); opacity: 1; }

/* --- Loading / progress: a hairline of brushed metal at the top ---------- */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px;
  z-index: var(--z-preloader);
  background: var(--gold-metal);
  box-shadow: 0 0 10px var(--gold-glow);
  transform: scaleX(0); transform-origin: left;
  will-change: transform;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) { .progress { display: none; } }

/* ============================================================================
   PROJECT EXPERIENCE  ·  "Le Dossier"   (Step 12)
   ----------------------------------------------------------------------------
   A fullscreen editorial layer rendered from js/projects.js. Inherits every
   token of the homepage: off-black, warm white, gold accents, mono credits.
   ============================================================================ */
.project {
  position: fixed; inset: 0;
  z-index: 250;                        /* above nav (200), below lightbox (1000) */
  background: var(--ink);
  visibility: hidden; opacity: 0;
}
.project.is-open { visibility: visible; opacity: 1; }

/* Top bar — index + close, mono, hairline under */
.project__bar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(1rem, 2vw, 1.5rem) var(--margin);
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)); backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid var(--gold-line);
}
.project__index { color: var(--gold); letter-spacing: var(--ls-label); }
.project__close {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-family: var(--font-mono); font-size: var(--fs-label);
  letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--paper);
  transition: color var(--dur-fast) var(--ease-ui);
}
.project__close:hover { color: var(--gold); }

/* The scrolling document */
.project__scroll {
  position: absolute; inset: 0;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.project__inner { padding-block: clamp(7rem, 14vh, 10rem) clamp(4rem, 8vh, 6rem); }

/* Header — same editorial voice as the homepage sections */
.project__head { max-width: 72ch; margin-bottom: clamp(2.5rem, 6vh, 4.5rem); }
.project__meta { color: var(--paper-dim); margin-bottom: var(--space-md); }
.project__meta em { font-style: normal; color: var(--gold); }
.project__title {
  font-family: var(--font-display); font-weight: var(--fw-regular);
  font-size: clamp(3rem, 9vw, 8rem);
  line-height: 0.92; letter-spacing: var(--ls-display);
  overflow: hidden;                    /* mask for the rise animation */
}
.project__title > span { display: block; }
.project__blurb {
  margin-top: var(--space-lg); max-width: 52ch;
  color: var(--paper-dim); font-size: var(--fs-body-lg); line-height: 1.55;
}

/* Hero — cover image, with the film button when a film exists */
.project__hero {
  position: relative; overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  margin-bottom: clamp(3rem, 7vh, 5rem);
}
.project__hero-img { width: 100%; height: auto; display: block; }
.project__hero--film .project__hero-img { filter: grayscale(1); transition: filter 0.9s var(--ease-out); }
.project__hero--film:hover .project__hero-img { filter: grayscale(0); }
.project__play[hidden] { display: none; }   /* photo projects have no film */
.project__play {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-sm);
  width: 100%; color: var(--paper);
  background: linear-gradient(180deg, rgba(12,12,13,0.10), rgba(12,12,13,0.45));
  transition: background-color var(--dur) var(--ease-out);
}
.project__play-ring {
  display: grid; place-items: center;
  width: clamp(64px, 9vw, 92px); height: clamp(64px, 9vw, 92px);
  border: 1px solid var(--gold); border-radius: 50%;
  color: var(--gold-light); font-size: 1.1rem;
  background: rgba(12,12,13,0.45);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  box-shadow: 0 0 32px var(--gold-glow);
  transition: transform var(--dur) var(--ease-out);
}
.project__play:hover .project__play-ring { transform: scale(1.08); }
.project__play .u-label { color: var(--paper); }

/* Gallery — editorial two-column flow, B&W → colour on hover, zoom on click */
.project__gallery { column-count: 2; column-gap: var(--gutter); }
.project__shot {
  display: block; width: 100%; margin: 0 0 var(--gutter);
  break-inside: avoid; overflow: hidden;
  border-radius: var(--radius-sm); background: var(--surface);
  cursor: pointer; padding: 0; border: 0;
}
.project__shot img {
  width: 100%; height: auto; display: block;
  filter: grayscale(1);
  transition: filter 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.project__shot:hover img { filter: grayscale(0); transform: scale(1.02); }
.project__shot:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
@media (hover: none) { .project__shot img, .project__hero--film .project__hero-img { filter: grayscale(0); } }
@media (max-width: 767px) { .project__gallery { column-count: 1; } }

/* Credits — mono, gold roles, hairlines: the film-credits voice */
.project__credits {
  max-width: 620px;
  margin-top: clamp(3rem, 7vh, 5rem);
  border-top: 1px solid var(--line);
}
.project__credits > div {
  display: flex; justify-content: space-between; gap: var(--space-lg);
  padding-block: var(--space-sm);
  border-bottom: 1px solid var(--line);
}
.project__credits dt {
  font-family: var(--font-mono); font-size: var(--fs-label);
  letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--gold);
}
.project__credits dd {
  margin: 0; font-family: var(--font-mono); font-size: var(--fs-label);
  letter-spacing: 0.08em; color: var(--paper);
  text-align: right;
}

/* Prev / Home / Next */
.project__nav {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-md);
  margin-top: clamp(3.5rem, 8vh, 6rem);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--gold-line);
}
.project__nav-link { display: flex; flex-direction: column; gap: var(--space-3xs); max-width: 38%; }
.project__nav-link .u-label { color: var(--paper-dim); transition: color var(--dur-fast) var(--ease-ui); }
.project__nav-link:hover .u-label { color: var(--gold); }
.project__nav-title {
  font-family: var(--font-display); font-size: clamp(1.15rem, 2.4vw, 1.75rem);
  line-height: 1.05; letter-spacing: -0.01em; color: var(--paper);
}
.project__nav-link--next { text-align: right; align-items: flex-end; }
.project__nav-home { color: var(--paper-dim); transition: color var(--dur-fast) var(--ease-ui); }
.project__nav-home:hover { color: var(--gold); }
@media (max-width: 767px) {
  .project__nav { flex-wrap: wrap; }
  .project__nav-home { order: 3; flex-basis: 100%; text-align: center; margin-top: var(--space-md); }
}

/* Hide the page scroll-progress bar while a dossier is open */
html.project-open .progress { opacity: 0; }

/* ============================================================================
   CONTACT TITLE '?' REPAIR
   The italic Fraunces '?' in "Create?" overhangs its glyph box; the line mask
   (overflow:hidden) and the text background-clip were shaving its edge.
   Widen the mask and keep the sheen away from the darkest gradient stops.
   ============================================================================ */
.contact__title .line { padding-inline: 0.12em; margin-inline: -0.12em; }
.contact__title em { padding-right: 0.1em; }
@keyframes goldSheen {
  0%, 100% { background-position: 18% 50%; }
  50%      { background-position: 82% 50%; }
}

/* ============================================================================
   THEME  ·  pastel light mode   (Step 13)
   ----------------------------------------------------------------------------
   Dark stays the default. Light mode is a champagne-blush pastel drawn from
   the photography itself (golden-hour sand, the Pranisha pink, warm paper).
   Media surfaces (hero, lightbox) keep their cinematic dark tokens so films
   and photographs always sit on black, like prints in a bright studio.
   ============================================================================ */
html.light {
  --ink:          #F2EAE1;                      /* champagne paper            */
  --ink-deep:     #E9DED2;
  --surface:      #EAE0D4;
  --surface-2:    #E3D6C7;
  --paper:        #23201C;                      /* warm near-black type       */
  --paper-dim:    #6E655B;
  --paper-faint:  #A2968A;
  --line:         rgba(35, 32, 28, 0.14);
  --line-strong:  rgba(35, 32, 28, 0.28);
  --overlay:      rgba(242, 234, 225, 0.65);
  --overlay-strong: rgba(242, 234, 225, 0.85);
  --hover-tint:   rgba(35, 32, 28, 0.04);
  --glass-bg:     rgba(242, 234, 225, 0.60);
  --glass-border: rgba(35, 32, 28, 0.12);
  --shadow-sm: 0 2px 12px rgba(120, 95, 60, 0.10);
  --shadow-md: 0 20px 55px rgba(120, 95, 60, 0.14);
  --shadow-lg: 0 40px 90px rgba(120, 95, 60, 0.18);
  /* deeper champagne so gold keeps contrast on light paper */
  --gold-deep:   #6E5628;
  --gold:        #94743C;
  --gold-light:  #B8945A;
  --gold-line:   rgba(148, 116, 60, 0.45);
  --gold-faint:  rgba(148, 116, 60, 0.12);
  --gold-glow:   rgba(148, 116, 60, 0.22);
}

/* Media stays cinematic-dark in both themes */
html.light .hero,
html.light .lightbox {
  --ink: #0C0C0D; --ink-deep: #000;
  --surface: #141416; --surface-2: #1A1A1D;
  --paper: #EFEAE1; --paper-dim: #8C877D; --paper-faint: #55524C;
  --line: rgba(239, 234, 225, 0.12); --line-strong: rgba(239, 234, 225, 0.22);
  --gold-deep: #8A7245; --gold: #C6A96C; --gold-light: #EDD9A3;
  --gold-line: rgba(198, 169, 108, 0.38); --gold-glow: rgba(198, 169, 108, 0.30);
  --shadow-md: 0 20px 55px rgba(0,0,0,0.45); --shadow-lg: 0 40px 90px rgba(0,0,0,0.55);
}

/* Selection + grain read correctly on pastel */
html.light ::selection { background: var(--paper); color: var(--ink); }
html.light .hero__grain { opacity: 0.05; }

/* The floating nav sits over the dark hero until you scroll — keep its type
   light there, then let it adopt the pastel theme once the glass appears. */
html.light .nav:not(.is-scrolled) {
  --paper: #EFEAE1; --paper-dim: #8C877D;
  --gold: #C6A96C; --gold-light: #EDD9A3;
}

/* Text that sits ON photographs must stay light in both themes
   (feature caption, project hero play button). */
html.light .work-item__media--feature,
html.light .project__hero {
  --paper: #EFEAE1; --paper-dim: #B9B2A6;
  --gold: #C6A96C; --gold-light: #EDD9A3; --gold-line: rgba(198,169,108,0.38); --gold-glow: rgba(198,169,108,0.30);
}

/* ============================================================================
   BOTTOM-RIGHT CONTROLS  ·  language / sound / theme
   ============================================================================ */
.fab-stack {
  position: fixed;
  right: calc(var(--space-md) + env(safe-area-inset-right));
  bottom: calc(var(--space-md) + env(safe-area-inset-bottom));
  z-index: var(--z-hud);
  display: flex; flex-direction: column; gap: 10px;
}
.fab {
  display: grid; place-items: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  color: var(--paper-dim);
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)); backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--line-strong);
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease-ui),
              border-color var(--dur-fast) var(--ease-ui),
              transform var(--dur-fast) var(--ease-out);
}
.fab:hover { color: var(--gold); border-color: var(--gold-line); transform: scale(1.06); }
.fab__txt { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.14em; }
.fab svg { transition: transform var(--dur) var(--ease-out); }
html.light #theme-toggle svg { transform: rotate(180deg); }
#sound-toggle .fab__wave { opacity: 0.25; transition: opacity var(--dur-fast) var(--ease-ui); }
#sound-toggle[aria-pressed="true"] { color: var(--gold); }
#sound-toggle[aria-pressed="true"] .fab__wave { opacity: 1; }

/* ============================================================================
   ABOUT PORTRAIT  ·  appears when web-assets/images/portrait.jpg exists
   ============================================================================ */
.about__portrait {
  margin-top: var(--space-lg);
  overflow: hidden; border-radius: var(--radius-sm);
  max-width: 340px;
  box-shadow: var(--shadow-md);
}
.about__portrait img {
  width: 100%; display: block;
  filter: grayscale(1);
  transition: filter 0.8s var(--ease-out);
}
.about__portrait:hover img { filter: grayscale(0); }
@media (min-width: 1024px) { .about__portrait { grid-column: 2; } }

/* ============================================================================
   WORK VIEWS  ·  Grid ⁄ Index toggle + the typographic index
   ============================================================================ */
.work__views { display: flex; align-items: center; gap: 0.9em; margin-top: var(--space-lg); color: var(--paper-faint); }
.work__view-btn {
  font: inherit; letter-spacing: inherit; text-transform: inherit;
  color: var(--paper-dim); cursor: pointer;
  padding-bottom: 0.35em; border-bottom: 1px solid transparent;
  transition: color var(--dur-fast) var(--ease-ui), border-color var(--dur-fast) var(--ease-ui);
}
.work__view-btn:hover { color: var(--paper); }
.work__view-btn.is-active { color: var(--gold); border-bottom-color: var(--gold-line); }

.work--index .work__grid, .work--index .work__feature { display: none; }

.work-index { border-top: 1px solid var(--line); }
.work-index li { border-bottom: 1px solid var(--line); }
.work-index a {
  display: grid; grid-template-columns: auto 1fr auto auto;
  align-items: baseline; column-gap: var(--space-lg);
  padding-block: clamp(1.1rem, 2.6vw, 2rem);
  transition: padding-left var(--dur) var(--ease-out);
}
.work-index a:hover { padding-left: 0.6em; }
.work-index .ix-num { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: var(--ls-label); color: var(--gold); }
.work-index .ix-title {
  font-family: var(--font-display); font-weight: var(--fw-regular);
  font-size: clamp(1.6rem, 4.5vw, 3.5rem); line-height: 1; letter-spacing: -0.02em;
  color: var(--paper); transition: font-style 0s;
}
.work-index a:hover .ix-title { font-style: italic; }
.work-index .ix-cat, .work-index .ix-year {
  font-family: var(--font-mono); font-size: var(--fs-label);
  letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--paper-dim);
}
@media (max-width: 767px) { .work-index .ix-cat { display: none; } }

/* floating preview that follows the cursor over index rows */
.index-preview {
  position: fixed; top: 0; left: 0; z-index: var(--z-content);
  width: min(300px, 26vw); aspect-ratio: 3 / 2; object-fit: cover;
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  pointer-events: none; opacity: 0; transform: scale(0.94);
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}
.index-preview.is-on { opacity: 1; transform: scale(1); }
@media (hover: none) { .index-preview { display: none; } }

/* ============================================================================
   FILM CARD WHISPERS  ·  3s muted loops on hover (fine pointers only)
   ============================================================================ */
.work-item__peek {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 0.45s var(--ease-out);
  pointer-events: none;
}
.work-item__peek.is-on { opacity: 1; }

/* ============================================================================
   PROJECT EXTRAS  ·  context line + prev/next cover teasers
   ============================================================================ */
.project__context { margin-top: var(--space-md); color: var(--gold); }
.project__context:empty { display: none; }

.project__nav-thumb {
  width: min(180px, 22vw); aspect-ratio: 21 / 9; object-fit: cover;
  border-radius: var(--radius-sm);
  filter: grayscale(1); opacity: 0.85;
  transition: filter 0.6s var(--ease-out), opacity 0.6s var(--ease-out);
  margin-bottom: var(--space-2xs);
}
.project__nav-link:hover .project__nav-thumb { filter: grayscale(0); opacity: 1; }
.project__nav-link--next .project__nav-thumb { margin-left: auto; }

/* --- The toggle itself — bottom right, quiet, gold on hover -------------- */
.theme-toggle {
  position: fixed;
  right: calc(var(--space-md) + env(safe-area-inset-right));
  bottom: calc(var(--space-md) + env(safe-area-inset-bottom));
  z-index: var(--z-hud);
  display: grid; place-items: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  color: var(--paper-dim);
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)); backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--line-strong);
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease-ui),
              border-color var(--dur-fast) var(--ease-ui),
              transform var(--dur-fast) var(--ease-out);
}
.theme-toggle:hover { color: var(--gold); border-color: var(--gold-line); transform: scale(1.06); }
.theme-toggle svg { transition: transform var(--dur) var(--ease-out); }
html.light .theme-toggle svg { transform: rotate(180deg); }

/* Theme change feels like a lighting change, not a glitch */
body, .nav::before, .work-item__caption, .footer, .menu__bg {
  transition: background-color 0.5s var(--ease-ui), color 0.5s var(--ease-ui);
}
@media (prefers-reduced-motion: reduce) { body, .nav::before { transition: none; } }
