/* ═══════════ TAYE SHUAYB / THE QUIET ARCHITECT · v4 ═══════════
   Built to REDESIGN-BRIEF.md. The site starts quiet; the work does the moving.
   Tokens per brief §2. Content is visible by default — JS only enhances. */

@font-face { font-family: 'Syne'; src: url('assets/syne-800.woff2') format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Syne'; src: url('assets/syne-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Cormorant Garamond'; src: url('assets/cormorant-italic.woff2') format('woff2'); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: 'Cormorant Garamond'; src: url('assets/cormorant-600i.woff2') format('woff2'); font-weight: 600; font-style: italic; font-display: swap; }
@font-face { font-family: 'Space Grotesk'; src: url('assets/space-grotesk.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Space Grotesk'; src: url('assets/space-grotesk-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('assets/jetbrains-mono.woff2') format('woff2'); font-weight: 400; font-display: swap; }

:root {
  --bg: #0a0a0a;
  --cream: #f0ead9;
  --text: #fff;
  --text-muted: #888;
  --gold: #c9a227;
  --gold-light: #e8d48b;
  --gold-dark: #8a6d14;      /* 4.08:1 on cream — large text only (3:1) */
  --gold-dark-aa: #7a600f;   /* 4.98:1 on cream — safe for small text (4.5:1) */
  --gold-line: rgba(201, 162, 39, 0.55);
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Space Grotesk', sans-serif;
  --display: 'Syne', 'Arial Narrow', sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', monospace;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);   /* expo.out family — reveals */
  --ease-inout: cubic-bezier(0.645, 0.045, 0.355, 1); /* power2.inOut family — camera/breathing */
}

* { margin: 0; padding: 0; box-sizing: border-box; }
/* No CSS smooth-scroll: Lenis smooths wheel input; programmatic scrolls pick
   their own behavior. CSS smooth would also swallow jumps in throttled tabs. */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

html { overflow-x: clip; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--gold); color: var(--bg); }
em { font-family: var(--serif); font-style: italic; font-weight: 500; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
img, video { max-width: 100%; }
/* iOS stamps a native play glyph on autoplay-blocked videos (Low Power Mode):
   every video here is decor — blocked playback must read as a still,
   never as a tappable player that implies sound. */
video::-webkit-media-controls-start-playback-button { display: none !important; -webkit-appearance: none; }

/* visually hidden, exposed to assistive tech */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* section label: identical wording to rail + nav */
.sec-label { display: none; }

.link-underline {
  display: inline-block; margin-top: 2rem;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.26em;
  color: var(--gold-light); text-decoration: none;
  border-bottom: 1px solid var(--gold-line); padding-bottom: 0.4rem;
  transition: color 0.15s var(--ease-out), border-color 0.15s var(--ease-out);
}
.link-underline:hover, .link-underline:focus-visible { color: var(--text); border-color: var(--text); }

/* ── BEAT 0 · LOADER "Quiet on set." ── */
.qloader {
  position: fixed; inset: 0; z-index: 300; background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.1rem;
  cursor: pointer;
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.8s;
}
.qloader.done { opacity: 0; visibility: hidden; pointer-events: none; }
.ql-line {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(1.6rem, 3.4vw, 2.8rem); color: var(--cream);
  animation: ql-breathe 1.8s var(--ease-inout) infinite alternate;
}
@keyframes ql-breathe { from { opacity: 0.55; } to { opacity: 1; } }
.ql-skip { font-family: var(--mono); font-size: 10px; letter-spacing: 0.3em; color: rgba(240,234,217,0.4); text-transform: uppercase; }

/* ── WORLD · ambient layer ── */
#ambient { position: fixed; inset: 0; z-index: 1; pointer-events: none; }
main, .footer { position: relative; z-index: 2; }

/* ── HUD · year + level meter + sound ── */
.hud {
  position: fixed; right: 2vw; bottom: 2.4vh; z-index: 120;
  display: flex; align-items: center; gap: 0.9rem;
  padding: 0.55rem 0.8rem;
  background: rgba(10, 10, 10, 0.55); backdrop-filter: blur(8px);
  border: 1px solid rgba(201, 162, 39, 0.28);
}
.hud-meter { display: flex; align-items: flex-end; gap: 3px; height: 16px; }
.hud-meter span { width: 3px; background: rgba(240, 234, 217, 0.16); transition: background 0.25s var(--ease-out), height 0.25s var(--ease-out); }
.hud-meter span:nth-child(1) { height: 4px; } .hud-meter span:nth-child(2) { height: 7px; }
.hud-meter span:nth-child(3) { height: 10px; } .hud-meter span:nth-child(4) { height: 12px; }
.hud-meter span:nth-child(5) { height: 14px; } .hud-meter span:nth-child(6) { height: 15px; }
.hud-meter span:nth-child(7) { height: 16px; }
.hud-meter span.lit { background: var(--gold); }
.hud-year { font-family: var(--mono); font-size: 13px; letter-spacing: 0.18em; color: var(--gold-light); min-width: 4.2ch; text-align: center; }
.hud-sound {
  background: none; border: none; border-left: 1px solid rgba(240, 234, 217, 0.18);
  padding: 0.2rem 0 0.2rem 0.9rem; cursor: pointer;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.22em; color: rgba(240, 234, 217, 0.7);
  transition: color 0.15s var(--ease-out);
}
.hud-sound:hover, .hud-sound:focus-visible { color: var(--gold-light); }
/* R7.2 — the toggle exists at EVERY width; on touch or narrow viewports it
   earns a 44px tap target (WCAG 2.5.5). Wide fine-pointer desktop untouched. */
@media (pointer: coarse), (max-width: 700px) {
  .hud { padding-top: 0; padding-bottom: 0; }
  .hud-sound { display: flex; align-items: center; min-height: 44px; min-width: 44px; }
}
/* R7.2 directive — narrow chip is meter + toggle only; the 2006→2026 year arc
   is desktop grammar (still enacted by the meter fall on mobile) */
@media (max-width: 700px) { .hud { right: 3vw; bottom: 2vh; gap: 0.6rem; } .hud-year { display: none; } }

/* ── Sound ask · art-directed, in voice ── */
.sound-ask {
  position: fixed; right: 2vw; bottom: calc(2.4vh + 64px); z-index: 120;
  background: rgba(10, 10, 10, 0.82); backdrop-filter: blur(10px);
  border: 1px solid rgba(201, 162, 39, 0.35);
  padding: 1rem 1.2rem; max-width: 260px;
}
.sound-ask p { font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--cream); }
.sa-actions { display: flex; gap: 0.7rem; margin-top: 0.8rem; }
.sa-actions button {
  background: none; cursor: pointer;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; padding: 0.5rem 0.8rem;
}
#soundYes { border: 1px solid var(--gold); color: var(--gold-light); }
#soundYes:hover, #soundYes:focus-visible { background: var(--gold); color: var(--bg); }
#soundNo { border: 1px solid rgba(240, 234, 217, 0.25); color: rgba(240, 234, 217, 0.7); }
#soundNo:hover, #soundNo:focus-visible { border-color: rgba(240, 234, 217, 0.5); color: var(--cream); }

/* ── GRAIN (luminance-only) ── */
.grain {
  position: fixed; inset: -50%; z-index: 150; pointer-events: none;
  width: 200%; height: 200%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.045;
  animation: grain-shift 0.9s steps(4) infinite;
}
@keyframes grain-shift {
  0% { transform: translate(0,0); } 25% { transform: translate(-2%,1.5%); }
  50% { transform: translate(1.5%,-2%); } 75% { transform: translate(-1%,-1%); } 100% { transform: translate(2%,2%); }
}

/* ── SIDE RAIL (12px, AA, labels = headings, never overlaps content) ── */
.rail {
  position: fixed; left: 1.4vw; top: 50%; transform: translateY(-50%);
  z-index: 110; display: flex; flex-direction: column; gap: 0.35rem;
  padding-left: 16px;
}
.rail-line { position: absolute; left: 0; top: 2%; bottom: 2%; width: 1px; background: rgba(240, 234, 217, 0.16); }
.rail-progress { position: absolute; left: 0; top: 0; width: 1px; height: 0%; background: var(--gold); display: block; }
.rail-tick {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.18em;
  color: rgba(240, 234, 217, 0.62); text-decoration: none;
  padding: 0.5rem; position: relative; min-height: 24px; box-sizing: border-box;
  display: flex; align-items: center;
  transition: color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.rail-tick::before {
  content: ''; position: absolute; left: -16px; top: 50%; transform: translateY(-50%);
  width: 6px; height: 1px; background: rgba(240, 234, 217, 0.4);
  transition: width 0.3s var(--ease-out), background 0.3s;
}
.rail-tick:hover { color: var(--text); transform: translateX(3px); }
.rail-tick.active { color: var(--gold-light); }
.rail-tick.active::before { width: 12px; background: var(--gold); }
.rail.rail--on-cream .rail-tick { color: rgba(10, 10, 10, 0.62); }
.rail.rail--on-cream .rail-tick.active { color: var(--gold-dark-aa); }
.rail.rail--on-cream .rail-line { background: rgba(10, 10, 10, 0.18); }
.rail { transition: opacity 0.5s var(--ease-out); }
.rail.rail--ghost { opacity: 0.14; pointer-events: none; }

/* ── TOP NAV ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.4rem 3.5vw;
}
.nav::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to bottom, rgba(10,10,10,0.97) 62%, rgba(10,10,10,0));
  opacity: 0; transition: opacity 0.35s var(--ease-out); pointer-events: none;
}
.nav.nav--scrolled::before { opacity: 1; }
.nav.nav--on-cream::before { background: linear-gradient(to bottom, rgba(240,234,217,0.97) 62%, rgba(240,234,217,0)); }
.nav-mark { font-family: var(--display); font-weight: 800; font-size: 1rem; letter-spacing: 0.06em; color: var(--text); text-decoration: none; line-height: 1.25; }
.nav-sub { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: 0.34em; color: var(--gold-light); }
.nav-links { display: flex; align-items: center; gap: 2.1rem; }
.nav-links a { font-family: var(--mono); font-size: 12px; letter-spacing: 0.2em; color: var(--text); text-decoration: none; position: relative; padding: 0.4rem 0; }
.nav-links a:not(.nav-cta)::after {
  content: ''; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px;
  background: var(--gold); transform: scaleX(0); transform-origin: right;
  transition: transform 0.45s var(--ease-out);
}
.nav-links a:not(.nav-cta):hover::after { transform: scaleX(1); transform-origin: left; }
.nav-cta { border: 1px solid var(--gold); padding: 0.55rem 1.15rem !important; color: var(--gold-light) !important; transition: background 0.35s var(--ease-out), color 0.35s var(--ease-out); }
.nav-cta:hover, .nav-cta:focus-visible { background: var(--gold); color: var(--bg) !important; }
.nav.nav--on-cream .nav-mark, .nav.nav--on-cream .nav-links a:not(.nav-cta) { color: #0a0a0a; }
.nav.nav--on-cream .nav-sub { color: var(--gold-dark-aa); }
.nav.nav--on-cream .nav-cta { color: var(--gold-dark-aa) !important; border-color: var(--gold-dark-aa); }
.nav.nav--on-cream .nav-cta:hover, .nav.nav--on-cream .nav-cta:focus-visible { background: var(--gold-dark-aa); color: var(--cream) !important; }

/* Rail clearance lives at the END of this file — it must stay last to beat
   the section padding shorthands below. Do not re-add clearance rules here. */
/* ── HOME · quiet chrome, moving work ── */
.home {
  min-height: 100dvh; background: var(--bg);
  display: flex; align-items: center;
  padding: 14vh 5vw 10vh;
  position: relative; overflow: hidden;
}
.home-env {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0.5; z-index: 0;
}
.home-inner { position: relative; z-index: 2; }
.home-inner { width: 100%; max-width: 1500px; margin: 0 auto; position: relative; }
.reel {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem;
}
.reel-cell {
  position: relative; overflow: hidden;
  border: 1px solid rgba(240, 234, 217, 0.14);
  background: #111;
  aspect-ratio: 16/9;
  opacity: 0; transform: translateY(26px);
  animation: cell-in 0.6s var(--ease-out) forwards;
}
.reel-cell:nth-child(1) { animation-delay: 0.05s; }
.reel-cell:nth-child(2) { animation-delay: 0.15s; }
.reel-cell:nth-child(3) { animation-delay: 0.25s; }
.reel-cell:nth-child(4) { animation-delay: 0.35s; }
.reel-cell:nth-child(5) { animation-delay: 0.45s; }
.reel-cell:nth-child(6) { animation-delay: 0.55s; }
@keyframes cell-in { to { opacity: 1; transform: translateY(0); } }
@keyframes cell-fade { to { opacity: 1; } }
.reel-cell video { width: 100%; height: 100%; object-fit: cover; display: block; }
.monitors .reel-cell {
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(201, 162, 39, 0.1);
  background: #050505;
  will-change: transform;
  transform: none;
  animation:
    cell-fade 0.6s cubic-bezier(0.22, 1, 0.36, 1) calc(var(--i, 0) * 0.1s) forwards,
    monitor-float 9s var(--ease-inout) calc(var(--i, 0) * -1.6s) infinite alternate;
}
.monitors .reel-cell:nth-child(1) { --i: 0; } .monitors .reel-cell:nth-child(2) { --i: 1; }
.monitors .reel-cell:nth-child(3) { --i: 2; } .monitors .reel-cell:nth-child(4) { --i: 3; }
.monitors .reel-cell:nth-child(5) { --i: 4; } .monitors .reel-cell:nth-child(6) { --i: 5; }
@keyframes monitor-float {
  from { transform: translateY(-5px); }
  to { transform: translateY(7px); }
}
.reel-cell figcaption {
  position: absolute; left: 0.8rem; bottom: 0.65rem;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.24em;
  color: var(--cream); text-shadow: 0 1px 4px rgba(0,0,0,0.85);
}
.home-copy { text-align: center; margin-top: 5vh; position: relative; z-index: 3; }
.home-roles {
  font-family: var(--mono); font-size: clamp(10px, 0.85vw, 13px);
  letter-spacing: 0.28em; color: rgba(240, 234, 217, 0.7);
  margin-bottom: 1.8rem;
}
.home-title {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(3.2rem, 9.5vw, 9rem);
  line-height: 0.94; text-transform: uppercase; letter-spacing: -0.01em;
}
.ht-line { display: block; }
.ht-taste { font-family: var(--serif); font-weight: 600; font-style: italic; text-transform: none; color: var(--gold); font-size: 1.05em; }
.home-thesis { margin-top: 1.6rem; font-size: clamp(0.95rem, 1.3vw, 1.2rem); color: rgba(240, 234, 217, 0.75); }
.home-thesis em { color: var(--gold-light); }

/* ── CREDO · cream interlude ── */
.credo { /* ASSET: S9 — until the plate lands, a light wash plays the "lights up" beat */
  background: var(--cream); color: #0a0a0a; padding: 16vh 6vw 0; }
.credo .sec-label { margin-left: 0; }
.credo-inner { max-width: 1500px; margin: 0 auto; padding-top: 32vh; } /* headline starts below the 44vh light band */
.credo-words {
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(2rem, 8vw, 8rem); line-height: 1.02; letter-spacing: -0.01em; /* floor fits "Restraint." at 390px */
  display: flex; flex-wrap: wrap; column-gap: 0.35em;
}
.credo-words .cw { opacity: 1; } /* visible by default; JS scrub enhances */
.credo-words .cw-gold { color: var(--gold-dark); } /* gold on cream: --gold is ~2:1, gold-dark passes large-text 3:1 */
.credo-record {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(1.3rem, 2.3vw, 2rem); line-height: 1.6;
  max-width: 32ch; margin: 6vh 0 0 auto; color: rgba(10, 10, 10, 0.85);
}
.credo-record em { font-weight: 600; color: var(--gold-dark); }
.credo-record strong { font-family: var(--sans); font-style: normal; font-weight: 500; font-size: 0.82em; }
.credo-marquee { overflow: hidden; padding: 9vh 0 8vh; }
.marquee-track {
  display: flex; white-space: nowrap; width: max-content;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.1rem, 2.4vw, 2rem); letter-spacing: 0.06em;
  color: rgba(10, 10, 10, 0.45); /* ≥3:1 on cream at marquee size — axe-clean */
}

/* ── SYSTEM ── */
.system { background: var(--bg); padding: 16vh 6vw; }
.system > * { max-width: 1240px; margin-left: auto; margin-right: auto; }
.pov-title {
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(2.2rem, 5.4vw, 5rem); line-height: 1.02; max-width: 16ch;
}
.pov-title em { color: var(--gold); text-transform: none; font-weight: 600; }
.pov-body { margin-top: 2rem; font-size: clamp(1rem, 1.35vw, 1.2rem); line-height: 1.75; color: rgba(240, 234, 217, 0.82); max-width: 62ch; }
.pov-punch { margin-top: 1.6rem; font-size: clamp(1.15rem, 1.8vw, 1.6rem); }
.pov-punch em { color: var(--gold-light); }

/* three points: exactly one legible state at a time */
.points { position: relative; margin-top: 12vh; min-height: 300px; }
.point { max-width: 58ch; }
/* each point lands in a different spot so a fast scroll still reads as new messaging */
.point[data-point="0"] { margin-right: auto; }
.point[data-point="1"] { margin-left: auto; margin-right: auto; text-align: center; }
.point[data-point="1"] .point-copy { margin-left: auto; margin-right: auto; }
.point[data-point="2"] { margin-left: auto; text-align: right; }
.point[data-point="2"] .point-copy { margin-left: auto; }
.point[data-point]:not(.active) { display: none; }
.point.active { display: block; animation: point-in 0.3s var(--ease-out); }
.point.active[data-point="0"] { animation-name: point-in-l; }
.point.active[data-point="2"] { animation-name: point-in-r; }
@keyframes point-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes point-in-l { from { opacity: 0; transform: translateX(-36px); } to { opacity: 1; transform: none; } }
@keyframes point-in-r { from { opacity: 0; transform: translateX(36px); } to { opacity: 1; transform: none; } }
.point-num { font-family: var(--serif); font-style: italic; font-size: 2.2rem; color: var(--gold); }
.point-title { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: clamp(1.7rem, 3.4vw, 3rem); margin-top: 0.4rem; }
.point-copy { margin-top: 1rem; font-size: clamp(1rem, 1.3vw, 1.15rem); line-height: 1.7; color: rgba(240, 234, 217, 0.8); }
.point-nav { display: flex; gap: 0.9rem; margin-top: 2.2rem; }
.pn-dot {
  width: 34px; height: 3px; border: none; cursor: pointer;
  background: rgba(240, 234, 217, 0.22);
  transition: background 0.15s var(--ease-out);
  padding: 10px 0; background-clip: content-box;
}
.pn-dot.on { background: var(--gold); background-clip: content-box; }

.pull-quote { margin-top: 12vh; border-left: 2px solid var(--gold); padding-left: clamp(1.4rem, 3vw, 2.6rem); }
.pull-quote p { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(1.4rem, 2.6vw, 2.3rem); line-height: 1.55; max-width: 34ch; }
.pull-quote cite { display: block; margin-top: 1.2rem; font-family: var(--mono); font-style: normal; font-size: 11px; letter-spacing: 0.28em; color: var(--text-muted); }

.products { margin-top: 12vh; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; }
.product {
  border: 1px solid rgba(240, 234, 217, 0.14);
  padding: 1.6rem 1.4rem 1.5rem;
  display: flex; flex-direction: column;
  background: rgba(240, 234, 217, 0.02);
  transition: border-color 0.4s var(--ease-out), background 0.4s;
}
.product:hover, .product:focus-within { border-color: var(--gold-line); background: rgba(201, 162, 39, 0.05); }
.product-brand {
  width: 100%;
  height: auto;
  margin-bottom: 1.3rem;
  border: 1px solid rgba(201, 162, 39, 0.3);
  object-fit: contain;
}
.product-kicker { font-family: var(--mono); font-size: 10px; letter-spacing: 0.3em; color: var(--gold); }
.product-name { font-family: var(--display); font-weight: 700; font-size: clamp(1.1rem, 1.5vw, 1.4rem); margin-top: 0.8rem; line-height: 1.15; }
.product-copy {
  margin-top: 0.8rem; font-size: 0.88rem; line-height: 1.6; color: rgba(240, 234, 217, 0.72);
  flex-grow: 1; margin-bottom: 1rem;
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden;
}
.product-link {
  margin-top: 1.3rem; font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold-light); text-decoration: none; border-bottom: 1px solid var(--gold-line);
  padding-bottom: 0.3rem; align-self: flex-start;
  transition: color 0.15s var(--ease-out), border-color 0.15s var(--ease-out);
}
.product-link:hover, .product-link:focus-visible { color: var(--text); border-color: var(--text); }

/* ── ARCHIVE ── */
.archive { background: #14110b; padding: 14vh 0 10vh; }
.archive-head { padding: 0 6vw; max-width: 1500px; margin: 0 auto; position: relative; }
.arch-title { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: clamp(2rem, 4.4vw, 4rem); line-height: 1.02; }
.arch-title em { color: var(--gold); text-transform: none; font-weight: 600; }
.arch-sub { margin-top: 1.2rem; color: rgba(240, 234, 217, 0.7); max-width: 52ch; line-height: 1.7; }
.archive-hint {
  position: absolute; right: 6vw; bottom: 0;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.26em; color: rgba(240, 234, 217, 0.6);
  display: flex; align-items: center; gap: 0.6rem;
}
.ah-icon { color: var(--gold); }

.archive-stage { margin-top: 6vh; overflow: hidden; }
.archive-track {
  display: flex; align-items: flex-start; gap: 5vw;
  padding: 0 8vw 0 max(9vw, 150px); width: max-content;
  cursor: grab;
  -webkit-user-select: none; user-select: none;
}
.archive-track.dragging { cursor: grabbing; }
.artwork { flex-shrink: 0; width: min(52vw, 720px); }
.art-img { position: relative; overflow: hidden; background: #111; border: 1px solid rgba(240, 234, 217, 0.1); display: flex; justify-content: center; }
/* portrait artworks height-cap and matte-center so captions never leave the stage */
.art-img img, .art-img video { display: block; width: auto; max-width: 100%; height: auto; max-height: 46vh; -webkit-user-drag: none; }
/* R7.2b — portraits keep a cap on mobile too: uncapped, Douglass (9:16) alone
   overflows the pinned stage and its caption can never scroll into view.
   Landscape art still fills the card width (max-width binds first). */
@media (max-width: 900px) { .art-img img, .art-img video { max-height: 52vh; } }
.arch-teaser { margin-bottom: 1.6rem; }
.arch-teaser-link { display: block; text-decoration: none; cursor: pointer; }
.arch-teaser-link:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.arch-teaser-link:hover .arch-teaser, .arch-teaser-link:focus-visible .arch-teaser { opacity: 0.92; }
.arch-teaser video { aspect-ratio: 16/9; object-fit: cover; }
.art-shield { position: absolute; inset: 0; z-index: 2; } /* drag/save shield; the seal is baked into the pixels */
.artwork figcaption { padding-top: 1.1rem; }
.art-scene { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: 0.28em; color: var(--gold); }
.art-name { display: block; font-family: var(--serif); font-style: italic; font-weight: 600; font-size: clamp(1.5rem, 2.2vw, 2rem); margin-top: 0.5rem; }
.art-note { display: block; margin-top: 0.6rem; font-size: 0.95rem; color: rgba(240, 234, 217, 0.75); max-width: 62ch; line-height: 1.7; }
.arch-outro { flex-shrink: 0; width: min(38vw, 480px); padding-top: 4vh; }
.arch-outro-line { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: clamp(1.8rem, 3.2vw, 3rem); line-height: 1.05; }
.arch-outro-line em { color: var(--gold); text-transform: none; font-weight: 600; }
.arch-protection { margin-top: 1.4rem; font-size: 0.9rem; line-height: 1.7; color: rgba(240, 234, 217, 0.65); max-width: 42ch; }
.archive-progress {
  margin: 5vh 8vw 0; height: 2px; background: rgba(240, 234, 217, 0.12);
  position: relative; max-width: 1500px;
}
.archive-progress span { position: absolute; left: 0; top: 0; height: 100%; width: 0%; background: var(--gold); display: block; }

/* Lights-down: a stage-dim veil that settles over CREDO's tail (§10A) */
.credo { position: relative; overflow: hidden; }
.credo-env {
  position: absolute; top: 0; left: 0; right: 0; height: 44vh;
  width: 100%; object-fit: cover; z-index: 0; opacity: 0.9;
  -webkit-mask-image: linear-gradient(to bottom, black 30%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 30%, transparent 100%);
}
.credo-inner, .credo-marquee { position: relative; z-index: 2; }
.lights-down {
  position: absolute; left: 0; right: 0; bottom: 0; height: 46vh;
  /* terminal color = PROOF's background (the section that follows credo) */
  background: linear-gradient(to bottom, rgba(13,12,8,0) 0%, rgba(13,12,8,0.55) 55%, #0d0c08 100%);
  pointer-events: none; opacity: 0; z-index: 3;
}

/* ── SECTION ENVIRONMENTS (WORK layer behind every stage) ── */
.system, .record, .connect, .proof { position: relative; overflow: hidden; }
.sec-env { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.38; z-index: 0; }
.sec-env--dim { opacity: 0.5; }
.sec-scrim { position: absolute; inset: 0; z-index: 1; background: linear-gradient(100deg, rgba(10,10,10,0.92) 30%, rgba(10,10,10,0.55) 70%, rgba(10,10,10,0.75) 100%); }
.sec-scrim--heavy { background: linear-gradient(to top, rgba(10,10,10,0.94) 12%, rgba(10,10,10,0.6) 60%, rgba(10,10,10,0.8) 100%); }
.system > *:not(.sec-env):not(.sec-scrim):not(.develop-wall), .record > *:not(.sec-env):not(.sec-scrim), .connect > *:not(.sec-env):not(.sec-scrim), .proof > *:not(.sec-env):not(.sec-scrim) { position: relative; z-index: 2; }

/* ── SYSTEM develop wall: six moving worlds develop under the cursor light ── */
.develop-wall { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.dw-grid {
  position: absolute; inset: 0; background: #0a0a0a;
  display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); gap: 6px;
}
.dw-grid video { width: 100%; height: 100%; object-fit: cover; display: block; }
/* the dimmer carries the gray; the mask cuts a hole where the light stands */
.dw-dim {
  position: absolute; inset: 0; background: rgba(10, 10, 10, 0.3);
  -webkit-backdrop-filter: grayscale(0.9) brightness(0.5);
  backdrop-filter: grayscale(0.9) brightness(0.5);
  -webkit-mask-image: radial-gradient(circle 320px at var(--mx, -600px) var(--my, -600px), transparent 0%, rgba(0, 0, 0, 0.6) 45%, black 74%);
  mask-image: radial-gradient(circle 320px at var(--mx, -600px) var(--my, -600px), transparent 0%, rgba(0, 0, 0, 0.6) 45%, black 74%);
}
@media (pointer: coarse), (prefers-reduced-motion: reduce) {
  .dw-dim { -webkit-mask-image: none; mask-image: none; -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(10, 10, 10, 0.45); }
  .dw-grid video { filter: grayscale(0.55) brightness(0.6); }
}

/* ── RECORD ── */
.record { background: var(--bg); padding: 16vh 6vw; }
.record > * { max-width: 1400px; margin-left: auto; margin-right: auto; }
.record-title { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: clamp(2rem, 4.4vw, 4rem); line-height: 1.02; }
.record-title em { color: var(--gold); text-transform: none; font-weight: 600; }
.record-cards { margin-top: 6vh; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.rcard { border: 1px solid rgba(240, 234, 217, 0.13); background: rgba(240, 234, 217, 0.02); overflow: hidden; transition: border-color 0.15s var(--ease-out); }
.rcard:hover, .rcard:focus-within { border-color: var(--gold-line); }
.rcard:nth-child(4), .rcard:nth-child(5) { grid-column: span 1; }
.rcard-media { aspect-ratio: 16/9; overflow: hidden; }
.rcard-media img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.01); transition: transform 0.8s var(--ease-out); }
.rcard:hover .rcard-media img, .rcard:focus-within .rcard-media img { transform: scale(1.07); }
.rcard-body { padding: 1.1rem 1.2rem 1.3rem; }
.chip {
  display: inline-block; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.22em;
  color: var(--gold-light); border: 1px solid var(--gold-line);
  padding: 0.32rem 0.6rem; margin-bottom: 0.7rem;
}
.chip--win { background: var(--gold); color: var(--bg); border-color: var(--gold); font-weight: 500; }
.chip--plain { color: rgba(240, 234, 217, 0.75); border-color: rgba(240, 234, 217, 0.3); }
.rcard-title { font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: clamp(1.1rem, 1.6vw, 1.5rem); line-height: 1.05; }
.rcard-meta { margin-top: 0.5rem; font-size: 0.85rem; color: rgba(240, 234, 217, 0.68); line-height: 1.55; }
.record-also { margin-top: 3rem; font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; color: rgba(240, 234, 217, 0.65); line-height: 2; }

/* ── PROOF ── */
.proof { background: #0d0c08; padding: 16vh 6vw; border-top: 1px solid rgba(201, 162, 39, 0.16); }
.proof > * { max-width: 1400px; margin-left: auto; margin-right: auto; }
.proof-title { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: clamp(2rem, 4.4vw, 4rem); }
.proof-title em { color: var(--gold); text-transform: none; font-weight: 600; }
.proof-grid { margin-top: 6vh; display: grid; grid-template-columns: 1.1fr 1fr; gap: 4vw; }
.honor { display: flex; align-items: baseline; gap: 1.2rem; padding: 1.1rem 0; border-bottom: 1px solid rgba(240, 234, 217, 0.1); }
.honor:first-child { padding-top: 0; }
.honor .chip { margin-bottom: 0; flex-shrink: 0; }
.honor p { font-size: 0.95rem; color: rgba(240, 234, 217, 0.78); line-height: 1.6; }
.proof-certs { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; align-content: start; }
.cert { border: 1px solid rgba(240, 234, 217, 0.13); background: rgba(240, 234, 217, 0.02); padding: 0.7rem; }
.cert img { width: 100%; display: block; }
.cert figcaption { padding-top: 0.7rem; font-family: var(--mono); font-size: 10px; letter-spacing: 0.22em; color: rgba(240, 234, 217, 0.6); }
.current { margin-top: 8vh; border: 1px solid rgba(201, 162, 39, 0.3); display: flex; flex-wrap: wrap; align-items: stretch; }
.current-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.3em; color: var(--bg);
  background: var(--gold); display: flex; align-items: center; padding: 1rem 1.3rem;
}
.current-item { flex: 1 1 260px; padding: 1rem 1.4rem; text-decoration: none; border-left: 1px solid rgba(201, 162, 39, 0.25); transition: background 0.15s var(--ease-out); }
.current-item:hover, .current-item:focus-visible { background: rgba(201, 162, 39, 0.07); }
.ci-kicker { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: 0.26em; color: var(--gold); }
.ci-title { display: block; margin-top: 0.35rem; color: rgba(240, 234, 217, 0.85); font-size: 0.92rem; line-height: 1.5; }

/* ── CONNECT ── */
.connect { background: var(--bg); padding: 16vh 6vw 12vh; }
.connect > * { max-width: 980px; margin-left: auto; margin-right: auto; }
.connect-statement {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(1.4rem, 2.9vw, 2.5rem); line-height: 1.6;
}
.connect-gold { color: var(--gold); font-weight: 600; }
.connect-route { margin-top: 2rem; font-family: var(--mono); font-size: 12px; letter-spacing: 0.24em; color: rgba(240, 234, 217, 0.6); }
.contact { margin-top: 4vh; }
.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.f-field { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.1rem; }
.f-field label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.24em; color: rgba(240, 234, 217, 0.75); }
.f-opt { color: rgba(240, 234, 217, 0.4); }
.f-field input, .f-field select, .f-field textarea {
  background: rgba(240, 234, 217, 0.04);
  border: 1px solid rgba(240, 234, 217, 0.22);
  color: var(--text); font-family: var(--sans); font-size: 1rem;
  padding: 0.9rem 1rem; border-radius: 0;
  transition: border-color 0.15s var(--ease-out);
  min-height: 44px;
}
.f-field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23c9a227'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; }
.f-field input:focus, .f-field select:focus, .f-field textarea:focus { border-color: var(--gold); outline: none; }
.hp-wrap { position: absolute; left: -9999px; }
.f-actions { display: flex; gap: 1.1rem; flex-wrap: wrap; margin-top: 1.4rem; }
.btn {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase;
  text-decoration: none; padding: 1.15rem 2.6rem; cursor: pointer; border: none;
  transition: transform 0.35s var(--ease-out), background 0.35s var(--ease-out), color 0.35s var(--ease-out), border-color 0.35s var(--ease-out);
  min-height: 44px;
}
.btn--gold { background: var(--gold); color: var(--bg); }
.btn--gold:hover, .btn--gold:focus-visible { background: var(--gold-light); transform: translateY(-2px); }
.btn--ghost { border: 1px solid rgba(240, 234, 217, 0.4); color: var(--text); background: transparent; }
.btn--ghost:hover, .btn--ghost:focus-visible { border-color: var(--gold); color: var(--gold-light); transform: translateY(-2px); }
.f-note { margin-top: 1.4rem; font-size: 0.88rem; color: rgba(240, 234, 217, 0.6); }
.f-note a { color: var(--gold-light); }

/* ── FOOTER ── */
.footer {
  background: var(--bg); border-top: 1px solid rgba(201, 162, 39, 0.2);
  padding: 2.2rem 3.5vw;
  /* the HUD is fixed at right:2vw bottom:2.4vh (~40px tall): this clearance
     lands the social links above its band at max scroll, not underneath it */
  padding-bottom: calc(2.4vh + 72px);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1.2rem;
}
.footer-mark, .footer-protection { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.24em; color: rgba(240, 234, 217, 0.55); }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.6rem; }
.footer-links a { font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; color: rgba(240, 234, 217, 0.85); text-decoration: none; padding: 0.55rem 0; display: inline-block; transition: color 0.15s var(--ease-out); }
.footer-links a:hover, .footer-links a:focus-visible { color: var(--gold); }

/* ── RESPONSIVE ── */
@media (max-width: 1100px) { .rail { display: none; } }
@media (max-width: 900px) {
  /* all six monitors stay — 2×3 grid, nothing cropped */
  .reel { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
  .products { grid-template-columns: repeat(2, 1fr); }
  .record-cards { grid-template-columns: repeat(2, 1fr); }
  .proof-grid { grid-template-columns: 1fr; }
  .artwork { width: 80vw; }
  .arch-outro { width: 74vw; }
  .credo-record { margin-left: 0; }
  .f-row { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 600px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .reel { grid-template-columns: repeat(2, 1fr); gap: 0.55rem; }
  .reel-cell figcaption { font-size: 8.5px; letter-spacing: 0.16em; left: 0.5rem; bottom: 0.4rem; }
  .products, .record-cards { grid-template-columns: 1fr; }
  .honor { align-items: flex-start; flex-wrap: wrap; gap: 0.65rem 1rem; }
  .honor .chip { max-width: 100%; white-space: normal; }
  .honor p { flex: 1 1 170px; }
  .home-roles { font-size: 9px; letter-spacing: 0.2em; }
  .artwork { width: 86vw; }
}

/* ── SHORT VIEWPORTS ── */
@media (max-height: 560px) {
  .home { min-height: auto; padding-top: 16vh; }
}

/* ── PRINT ── */
@media print {
  .grain, .rail, .nav, video, .archive-hint, .art-shield, .archive-progress { display: none !important; }
  body { background: #fff; color: #111; }
  .archive-track { width: auto; flex-wrap: wrap; }
  .point[data-point]:not(.active) { display: block; }
  .home-title, .record-title, .arch-title, .pov-title, .proof-title { color: #111; }
}

/* ── REDUCED MOTION: fade-only, no pins, posters + play buttons ── */
@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  .qloader { display: none; }
  #ambient { display: none; }
  .monitors .reel-cell { animation: none; }
  .ql-line { animation: none; }
  .reel-cell { animation-duration: 0.01s; }
  .marquee-track { animation: none !important; }
  .archive-track { width: auto; flex-wrap: wrap; cursor: default; padding: 0 6vw; gap: 4rem; }
  .point[data-point]:not(.active) { display: block; margin-bottom: 3rem; }
  html { scroll-behavior: auto; }
}
.vid-play {
  position: absolute; inset: 0; display: none;
  align-items: center; justify-content: center;
  background: rgba(10, 10, 10, 0.35); border: none; cursor: pointer;
  color: var(--cream); font-family: var(--mono); font-size: 12px; letter-spacing: 0.3em;
}
@media (prefers-reduced-motion: reduce) { .vid-play { display: flex; } }

/* ── RESPONSE LAYER (ROUND-6 §B) · one hover language sitewide ── */
.cursor-light {
  position: fixed; top: 0; left: 0; width: 600px; height: 600px;
  border-radius: 50%; pointer-events: none; z-index: 90;
  background: radial-gradient(circle, rgba(232, 212, 139, 0.04) 0%, rgba(201, 162, 39, 0.02) 45%, transparent 70%);
  transition: opacity 0.4s var(--ease-out); will-change: transform;
}
@media (pointer: coarse), (prefers-reduced-motion: reduce) { .cursor-light { display: none; } }

/* idle breathing: environment videos ease 1.00→1.015 over 6s, alternating */
@keyframes env-breathe { from { scale: 1; } to { scale: 1.015; } }
.sec-env.breathing, .home-env.breathing { animation: env-breathe 6s var(--ease-inout) infinite alternate; }
@media (prefers-reduced-motion: reduce) { .sec-env.breathing, .home-env.breathing { animation: none; } }

/* cards: 1.02 scale + rim-light lift, 150ms ease-out; parity on focus-visible */
.rcard, .product, .cert, .artwork .art-img, .current-item {
  transition: transform 0.15s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.15s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.15s cubic-bezier(0.22, 1, 0.36, 1);
}
.rcard:hover, .rcard:focus-within, .product:hover, .product:focus-within,
.cert:hover, .current-item:hover, .current-item:focus-visible {
  transform: scale(1.02);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(201, 162, 39, 0.45);
}
@media (prefers-reduced-motion: reduce) {
  .rcard:hover, .product:hover, .cert:hover, .current-item:hover { transform: none; }
}

/* text links: gold underline draw (150ms) + focus parity with hover */
.footer-links a, .record-also + .link-underline, .product-link {
  transition: color 0.15s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.15s cubic-bezier(0.22, 1, 0.36, 1);
}
.footer-links a { position: relative; }
.footer-links a::after {
  content: ''; position: absolute; left: 0; bottom: 0.3rem; width: 100%; height: 1px;
  background: var(--gold); transform: scaleX(0); transform-origin: right;
  transition: transform 0.15s cubic-bezier(0.22, 1, 0.36, 1);
}
.footer-links a:hover::after, .footer-links a:focus-visible::after { transform: scaleX(1); transform-origin: left; }
.nav-links a:not(.nav-cta):focus-visible::after { transform: scaleX(1); transform-origin: left; }
.rail-tick:focus-visible { color: var(--text); transform: translateX(3px); }
.nav-cta, #contactSubmit { transition: background 0.35s var(--ease-out), color 0.35s var(--ease-out), transform 0.15s cubic-bezier(0.22, 1, 0.36, 1); }

/* reduced-motion fallback for the CREDO exit: static veil instead of travel */
@media (prefers-reduced-motion: reduce) { .lights-down { opacity: 1; } }

/* ── RAIL CLEARANCE (must stay LAST: overrides section padding shorthands) ── */
@media (min-width: 1101px) {
  .home { padding-left: max(10vw, 170px); padding-right: max(5vw, 60px); }
  .credo, .system, .record, .proof, .connect { padding-left: max(10vw, 170px); }
  .archive-head { padding-left: max(10vw, 170px); }
  .archive-track { padding-left: max(11vw, 200px) !important; }
}
