/* ========================================
   NECTR LANE — Shared Styles
   ======================================== */

/* Metric-matched local fallbacks (T-09, 2026-10-12): while the Google Fonts load,
   text is set in a local face scaled to the web font's width and vertical metrics,
   so the swap barely moves the layout. Values measured in Chromium against
   Liberation Serif/Sans/Mono, which are metric-compatible with Times New Roman,
   Arial and Courier New; the serif widths are tuned to the site's display headlines.
   No new hosts or files.
   Android (fix-2026-10-12-framework-T-04): Android ships none of the faces above, so
   Roboto and Noto/Droid Sans Mono are added to the sans and mono src lists (their widths
   match Arial/Courier New within 1%, and the overrides are absolute, so the same values
   hold), and Noto/Droid Serif gets its own "Android" faces with its own size-adjust.
   Measured in Chromium against the Google Fonts copies of Roboto, Noto Serif and
   Noto Sans Mono; not yet checked on a real Android device. */
/* Metric-matched fallback for headings (moved from nectarine.css, 2026-10-13) while Hanken Grotesk loads (T-09).
   Measured in Chromium against Liberation Sans Bold (metric-compatible with Arial Bold). */
@font-face {
  font-family: "Hanken Grotesk Fallback";
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"), local("Arimo Bold");
  font-weight: 700 900;
  size-adjust: 95.4%;
  ascent-override: 104.8%;
  descent-override: 31.4%;
  line-gap-override: 0%;
}
/* Android has no Arial Bold: Roboto Black, measured against the Google Fonts copy (T-04). */
@font-face {
  font-family: "Hanken Grotesk Fallback Android";
  src: local("Roboto Black"), local("Roboto-Black");
  font-weight: 700 900;
  size-adjust: 101.8%;
  ascent-override: 98.2%;
  descent-override: 29.5%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Instrument Serif Fallback";
  src: local("Times New Roman"), local("TimesNewRomanPSMT"), local("Liberation Serif"), local("Tinos");
  font-style: normal;
  size-adjust: 81%;
  ascent-override: 122.2%;
  descent-override: 38.3%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Instrument Serif Fallback Android";
  src: local("Noto Serif"), local("NotoSerif-Regular"), local("NotoSerif"), local("Droid Serif"), local("DroidSerif");
  font-style: normal;
  size-adjust: 70.2%;
  ascent-override: 141%;
  descent-override: 44.2%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Geist Fallback";
  src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("Arimo"), local("Roboto"), local("Roboto-Regular");
  size-adjust: 102.8%;
  ascent-override: 98.3%;
  descent-override: 29.2%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "JetBrains Mono Fallback";
  src: local("Courier New"), local("CourierNewPSMT"), local("Liberation Mono"), local("Cousine"), local("Noto Sans Mono"), local("NotoSansMono-Regular"), local("Droid Sans Mono"), local("DroidSansMono");
  size-adjust: 100%;
  ascent-override: 102%;
  descent-override: 30%;
  line-gap-override: 0%;
}

:root {
  /* Palette — warm espresso with nectarine */
  --bg: #0a0807;
  --bg-elev: #14100e;
  --ink: #f6efe5;
  --ink-dim: #a89c8e;
  --ink-faint: #8a7d6e; /* small text: 4.99:1 on --bg, 4.72:1 on --bg-elev (was #857869, 4.40:1 on --bg-elev; T-11) */
  --line: rgba(246, 239, 229, 0.10);
  --line-strong: rgba(246, 239, 229, 0.22);
  --line-field: #73675b; /* form field underline (non-text): 3.64:1 on --bg, 3.44:1 on --bg-elev (T-01) */
  --dim-row: 0.75;      /* opacity of sibling work rows on hover: --accent 3.19:1, --ink-dim 4.56:1, --ink 9.84:1 on --bg (T-14) */

  /* Nectarine — juicy graded accent */
  --nectr-1: #ffd29a;   /* highlight (yellow flesh) */
  --nectr-2: #ff9d5a;   /* mid (warm orange) */
  --nectr-3: #ff6b3d;   /* core (nectarine) */
  --nectr-4: #d83a2a;   /* deep blush */
  --nectr-5: #8c1f1a;   /* shadow */
  --brand: #ab1e1e;     /* Nectr Lane brand colour (decided 2026-10-11) */
  --accent: #e04848;    /* brand tint for accent text on dark: 4.9:1 on --bg (--brand itself is 2.8:1) */
  --accent-fill: var(--brand); /* buttons, play dots and other solid fills */
  --on-accent: #ffffff; /* text on --accent-fill: 7.2:1 */

  /* Type: three families, one per role (decided 2026-10-13). Every font-family uses one of these. */
  --font-display: "Hanken Grotesk", "Hanken Grotesk Fallback", "Hanken Grotesk Fallback Android", system-ui, -apple-system, "Segoe UI", sans-serif; /* headings, titles, footer CTA */
  --font-body: "Geist", "Geist Fallback", system-ui, -apple-system, "Segoe UI", sans-serif; /* paragraphs, descriptions, form fields */
  --font-label: "JetBrains Mono", "JetBrains Mono Fallback", ui-monospace, "SFMono-Regular", Menlo, monospace; /* eyebrows, numbers, nav, buttons, form labels, meta */
  --font-wordmark: "Instrument Serif", "Instrument Serif Fallback", "Instrument Serif Fallback Android", serif; /* the NECTR LANE logo wordmark only */

  /* Type scale: page title > section > card > lead > body > label */
  --fs-display: clamp(44px, 8vw, 128px);   /* home hero, footer CTA */
  --fs-title: clamp(40px, 6.5vw, 104px);   /* page H1s */
  --fs-section: clamp(30px, 4.6vw, 72px);  /* section H2s, Work index names, next project, stats */
  --fs-card: clamp(20px, 1.9vw, 28px);     /* card, item, step and FAQ titles */
  --fs-lead: clamp(19px, 1.6vw, 23px);     /* lead paragraphs and quotes */
  --fs-body: 16px;
  --fs-label: 11px;
  --ls-display: -0.045em;
  --ls-card: -0.025em;
  --ls-label: 0.14em;
  --lh-display: 0.95;
  --lh-card: 1.1;
  --lh-body: 1.6;

  /* Layout */
  --container: 1440px;
  --pad-x: clamp(20px, 4vw, 56px);
  --section: clamp(80px, 12vw, 160px);

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html {
  font-synthesis: none; /* never fake bold or italic (2026-10-13) */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  overflow-x: hidden;
  transition: background 0.6s var(--ease), color 0.6s var(--ease);
}
/* Fade-in only when JS is running, so a script failure never blanks the page */
.js body { opacity: 0; }
.js body.is-ready {
  opacity: 1;
  transition: opacity 0.65s var(--ease-out), background 0.6s var(--ease), color 0.6s var(--ease);
}
@media (prefers-reduced-motion: reduce) {
  body { opacity: 1; }
}

/* Tabular numerals globally so the 01/02/03 numbering aligns perfectly */
.mono, .eyebrow, .nav-links, .num, [class*="-num"], .footer-bottom {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

::selection { background: var(--accent); color: var(--bg); }

a { color: inherit; text-decoration: none; }
img, video, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; } /* form controls use the body font, never the browser default (2026-10-13) */
.num, .toggle { font-weight: 400; } /* label-font numbers stay regular inside bold headings */

/* ========================================
   Typography
   ======================================== */

.display {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 0.9;
  text-wrap: balance;
  font-style: normal;
}
em, i, cite { font-style: normal; } /* no italics anywhere; accents are colour-only (2026-10-13) */
h1 em, h2 em, h3 em, h4 em,
.display em { font-style: normal; color: var(--accent); font-weight: inherit; } /* accent words in headings stay upright, same weight (2026-10-13) */

.mono {
  font-family: var(--font-label);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  font-weight: 400;
}

.eyebrow {
  font-family: var(--font-label);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--ink-dim);
}

h1, h2, h3, h4 { font-weight: 400; }

/* ========================================
   Layout primitives
   ======================================== */

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

.section { padding: var(--section) 0; }

.rule {
  height: 1px;
  background: var(--line);
  width: 100%;
}

/* ========================================
   Navigation
   ======================================== */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--pad-x);
  color: var(--ink);
  background: color-mix(in oklab, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), padding 0.3s var(--ease);
}
.nav.scrolled {
  background: color-mix(in oklab, var(--bg) 92%, transparent);
  border-bottom-color: var(--line);
  padding-top: 14px;
  padding-bottom: 14px;
}

.nav-brand {
  font-family: var(--font-wordmark);
  font-size: 22px;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  flex: 1;
  /* 44px hit area without changing the bar's height (T-13) */
  padding-block: 6px;
  margin-block: -6px;
}

.nav-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
}
@media (max-width: 720px) {
  .nav-right { gap: 8px; }
}
.nav-brand-mark {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--nectr-1), var(--nectr-3) 55%, var(--nectr-5));
  box-shadow: 0 0 22px rgba(255, 107, 61, 0.45);
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  font-family: var(--font-label);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
}
.nav-links a {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  opacity: 0.75;
  transition: opacity 0.25s var(--ease);
  position: relative;
  /* 44px hit area, layout unchanged (T-13) */
  padding-block: 14px;
  margin-block: -14px;
}
.nav-links a:hover, .nav-links a.is-active { opacity: 1; }
.nav-links a.is-active::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 8px; /* 6px under the text, inside the 14px hit-area padding */
  height: 1px;
  background: currentColor;
}
.nav-links .num { color: var(--accent); opacity: 0.9; }

.nav-cta {
  white-space: nowrap;
  font-family: var(--font-label);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-block: 14px;
  margin-block: -14px;
}

@media (max-width: 720px) {
  .nav-links { display: none; }
}

/* ========================================
   Buttons / links
   ======================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--font-label);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
  background: transparent;
  color: var(--ink);
}
.btn:hover {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.btn-primary {
  background: var(--accent-fill);
  color: var(--on-accent);
  border-color: var(--accent-fill);
}
.btn .arrow {
  display: inline-block;
  transition: transform 0.3s var(--ease);
}
.btn:hover .arrow { transform: translate(3px, -3px); }
.btn:active { transform: scale(0.97); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-label);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  padding-bottom: 6px;
  position: relative;
  transition: color 0.3s var(--ease);
}
.link-arrow::before,
.link-arrow::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
}
.link-arrow::before { background: var(--line-strong); }
.link-arrow::after {
  background: var(--accent);
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 0.5s var(--ease-out);
}
/* 44px hit area on real links: extra space above the text, cancelled by a negative margin (T-13) */
a.link-arrow { padding-top: 22px; margin-top: -22px; }
.link-arrow:hover { color: var(--accent); }
.link-arrow:hover::after { transform: scaleX(1); }
.link-arrow .arrow { transition: transform 0.3s var(--ease); }
.link-arrow:hover .arrow { transform: translate(3px, -3px); }

/* ========================================
   Reveal on scroll
   ======================================== */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}
.js .reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.reveal[data-delay="1"] { transition-delay: 80ms; }
.reveal[data-delay="2"] { transition-delay: 160ms; }
.reveal[data-delay="3"] { transition-delay: 240ms; }
.reveal[data-delay="4"] { transition-delay: 320ms; }
.reveal[data-delay="5"] { transition-delay: 400ms; }

/* Section-level subtle settle — much lighter than before, no opacity gate.
   The page is always painted; sections only nudge up on first paint. */
section:not(.hero),
footer.footer {
  transform: translateY(14px);
  transition: transform 0.9s var(--ease-out);
  will-change: transform;
}
section.in-view,
footer.footer.in-view {
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  section, footer.footer { transform: none !important; transition: none !important; }
}

/* ========================================
   Footer
   ======================================== */

.footer {
  border-top: 1px solid var(--line);
  padding: 80px var(--pad-x) 40px;
}
.footer-cta {
  font-family: var(--font-display);
  font-size: var(--fs-display);
  line-height: 0.92;
  letter-spacing: var(--ls-display);
  margin-bottom: 80px;
  text-wrap: balance;
  font-weight: 800;
}
.footer-cta a { display: inline-flex; align-items: flex-start; gap: 0.1em; }
.footer-cta em { font-style: normal; color: var(--accent); }
.footer-cta .arrow {
  font-size: 0.4em;
  display: inline-block;
  margin-top: 0.2em;
  transition: transform 0.4s var(--ease);
}
.footer-cta a:hover .arrow { transform: translate(0.15em, -0.15em); }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}
.footer-col h4, .footer-col .footer-h {
  font-family: var(--font-label);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 16px;
  font-weight: 400;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0; }
/* 44px rows instead of 21px links + 10px gaps (T-13) */
.footer-col a { color: var(--ink); opacity: 0.8; transition: opacity 0.2s; display: inline-flex; align-items: center; min-height: 44px; }
.footer-col ul { margin-top: -12px; } /* keeps the first link's text in line with the column text */
.footer-col a:hover { opacity: 1; color: var(--accent); }
.footer-col p { color: var(--ink-dim); font-size: var(--fs-body); line-height: 1.6; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  margin-top: 56px;
  border-top: 1px solid var(--line);
  font-family: var(--font-label);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--ink-dim);
}

@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ========================================
   Custom cursor (optional)
   ======================================== */

.cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.3s var(--ease), height 0.3s var(--ease), opacity 0.3s;
  mix-blend-mode: difference;
  opacity: 0;
}
.cursor-dot.active { opacity: 1; }
.cursor-dot.hover { width: 36px; height: 36px; background: transparent; border: 1px solid var(--accent); }

@media (hover: none) { .cursor-dot { display: none; } }


/* ========================================
   Scroll progress bar
   ======================================== */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  z-index: 200;
  pointer-events: none;
  transition: width 0.12s linear, opacity 0.4s var(--ease);
  opacity: 0.85;
}
.scroll-progress.is-idle { opacity: 0.35; }

/* ========================================
   Magnetic CTA wrapper (subtle pull on hover)
   ======================================== */
[data-magnetic] {
  display: inline-block;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}
[data-magnetic] > * {
  display: inline-block;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ========================================
   Work list focus-dim
   When hovering one project row, dim siblings.
   ======================================== */
.work-list:hover .project { opacity: var(--dim-row); transition: opacity 0.4s var(--ease); }
.work-list .project:hover { opacity: 1; }

/* ========================================
   Stat counter — keep stable width while counting
   ======================================== */
.stat-num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.stat-num em { display: inline-block; min-width: 1ch; }

/* ========================================
   Mobile hamburger button
   ======================================== */
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-burger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.35s var(--ease), opacity 0.2s;
  transform-origin: center;
}
.nav-burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav-burger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}
.nav.menu-open {
  background: var(--bg);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-bottom-color: transparent;
}

@media (max-width: 720px) {
  .nav-burger { display: flex; }
  .nav-cta { display: none; }
}
@media (max-width: 960px) {
  .nav-cta { display: none; } /* CTA stays in page content + footer; nav links need the room */
}

/* ========================================
   Mobile nav overlay
   ======================================== */
.nav-mobile {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 100px var(--pad-x) 52px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease);
  overflow-y: auto;
}
.nav-mobile.is-open {
  opacity: 1;
  pointer-events: all;
}
.nav-mobile-links {
  list-style: none;
  margin-bottom: 40px;
}
.nav-mobile-links a {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: var(--fs-section);
  line-height: var(--lh-display);
  letter-spacing: var(--ls-display);
  color: var(--ink);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), color 0.2s;
  font-weight: 800;
}
.nav-mobile-links li:first-child a { border-top: 1px solid var(--line); }
.nav-mobile.is-open .nav-mobile-links a {
  opacity: 1;
  transform: translateY(0);
}
.nav-mobile.is-open .nav-mobile-links li:nth-child(1) a { transition-delay: 50ms; }
.nav-mobile.is-open .nav-mobile-links li:nth-child(2) a { transition-delay: 100ms; }
.nav-mobile.is-open .nav-mobile-links li:nth-child(3) a { transition-delay: 150ms; }
.nav-mobile.is-open .nav-mobile-links li:nth-child(4) a { transition-delay: 200ms; }
.nav-mobile.is-open .nav-mobile-links li:nth-child(5) a { transition-delay: 250ms; }
.nav-mobile-links .num {
  font-family: var(--font-label);
  font-size: var(--fs-label);
  color: var(--accent);
  letter-spacing: var(--ls-label);
  flex-shrink: 0;
}
.nav-mobile-links a:hover { color: var(--accent); }
.nav-mobile-foot {
  display: flex;
  gap: 0 32px;
  flex-wrap: wrap;
  opacity: 0;
  transition: opacity 0.4s var(--ease) 270ms;
}
.nav-mobile.is-open .nav-mobile-foot { opacity: 1; }
.nav-mobile-foot a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-label);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--ink-dim);
  transition: color 0.2s;
}
.nav-mobile-foot a:hover { color: var(--accent); }

/* ========================================
   Accessibility (added in the 2026-10 rebuild, see DESIGN.md)
   ======================================== */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}
.skip-link {
  position: absolute;
  left: var(--pad-x);
  top: -100px;
  z-index: 300;
  padding: 13px 16px;
  min-height: 44px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
}
.skip-link:focus { top: 12px; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.nav-links a[aria-current="page"] { opacity: 1; }

/* Marquee pause control (WCAG 2.2.2) */
.marquee-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  font-family: var(--font-label);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--ink-dim);
}
.marquee-toggle:hover { color: var(--accent); }
.is-paused, .is-paused * { animation-play-state: paused !important; }

/* ========================================
   Media: real assets + labelled placeholders
   Swap a placeholder by replacing the inner .media-ph with <img> or <video>
   (see docs/media/manifest.md for every slot).
   ======================================== */
.media {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  margin: 0;
}
/* Scroll glow: a soft brand-red light from the bottom of the viewport that builds as you
   scroll. Opt in per page with <body data-scroll-glow>; main.js sets --glow (0 → 1).
   Peak opacity 0.24 (about 19% red at the brightest point, the bottom centre) keeps
   --ink-faint 4.56:1 and --accent 4.52:1 at worst, so all text stays WCAG AA (decided 2026-10-13). */
body[data-scroll-glow]::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(130% 60% at 50% 110%, var(--brand) 0%, transparent 72%);
  opacity: calc(0.06 + var(--glow, 0) * 0.18);
}
@media (prefers-reduced-motion: reduce) {
  body[data-scroll-glow]::before { opacity: 0.08; }
}

.media > iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.media > img, .media > video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ratio-16x9 { aspect-ratio: 16 / 9; }
.ratio-4x3  { aspect-ratio: 4 / 3; }
.ratio-4x5  { aspect-ratio: 4 / 5; }
.ratio-2x3  { aspect-ratio: 2 / 3; }
.ratio-9x16 { aspect-ratio: 9 / 16; }
.ratio-1x1  { aspect-ratio: 1; }
.ratio-5x3  { aspect-ratio: 5 / 3; }
.media-ph {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  padding: 16px 18px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand) 22%, transparent), transparent 55%),
    repeating-linear-gradient(-45deg, transparent 0 14px, rgba(246,239,229,0.025) 14px 15px),
    var(--bg-elev);
  color: var(--ink-dim);
  font-family: var(--font-label);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  line-height: 1.5;
}
.media-ph::before {
  content: "Placeholder";
  position: absolute;
  top: 14px; left: 18px;
  color: var(--accent);
}
.media-ph small { color: var(--ink-faint); font-size: 10px; }
.media figcaption, .media-caption {
  font-family: var(--font-label);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--ink-dim);
}
.reel-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-family: var(--font-label);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--ink);
}
.reel-btn:hover { color: var(--accent); }
/* Inactive reel (no data-video yet, C-22): dashed outline, faint text, and the
   existing "(coming soon)" text shown instead of visually hidden. */
.reel-btn[aria-disabled="true"] {
  color: var(--ink-faint);
  cursor: not-allowed;
  padding: 6px 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 999px;
  /* C-04 (fix-2026-10-12-framework): when the pill is too narrow (360px), "(coming soon)"
     drops to its own line, left-aligned with the label, instead of squeezing the label
     into a two-line column beside it. */
  flex-wrap: wrap;
  row-gap: 2px;
  text-align: left;
}
@media (max-width: 720px) {
  .reel-btn[aria-disabled="true"] { border-radius: 22px; }
}
.reel-btn[aria-disabled="true"]:hover { color: var(--ink-faint); }
.reel-btn[aria-disabled="true"] .visually-hidden {
  position: static !important;
  width: auto; height: auto;
  margin: 0;
  overflow: visible; clip: auto;
  white-space: nowrap;
  color: var(--ink-dim);
}

/* Video modal */
.video-modal {
  position: fixed; inset: 0; z-index: 400;
  display: none;
  align-items: center; justify-content: center;
  padding: var(--pad-x);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
}
.video-modal.is-open { display: flex; }
.video-modal-frame { width: min(1200px, 100%); aspect-ratio: 16 / 9; background: var(--bg); }
.video-modal-frame iframe, .video-modal-frame video { width: 100%; height: 100%; border: 0; }
.video-modal-close {
  position: absolute; top: 16px; right: var(--pad-x);
  min-width: 44px; min-height: 44px;
  font-family: var(--font-label); font-size: 12px; letter-spacing: var(--ls-label); text-transform: uppercase;
  color: var(--ink);
}
@media (prefers-reduced-motion: reduce) {
  .js body, .js .reveal { opacity: 1 !important; transform: none !important; }
  /* Mobile menu: no fade, slide or burger morph (T-20) */
  .nav-mobile, .nav-mobile-links a, .nav-mobile-foot, .nav-burger span { transition: none; }
  .nav-mobile-links a { transform: none; }
  .work-list:hover .project, .link-arrow::after, .btn, .btn .arrow, .link-arrow .arrow { transition: none; }
}
