/* ═══════════════════════════════════════════════════════════
   SITE — Third i public site v2 (DESIGN.md v2.0.0)
   Cinematic sticky-scene system on the void canvas. Colors come only from
   styles/tokens.css primitives (enforced by `npm run design:check`).
   Sections: fonts · base · nav · buttons · scenes (S1 hero, S2 beats,
   S3 library, S4 steps, S5 portal, founder) · chapters · content blocks ·
   forms · footer · motion control · responsive · reduced motion
   ═══════════════════════════════════════════════════════════ */

/* ─── Fonts (self-hosted, OFL) ─── */
@font-face { font-family: "Space Grotesk"; src: url("/public/fonts/space-grotesk-latin-var.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/public/fonts/inter-latin-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("/public/fonts/instrument-serif-italic.woff2") format("woff2"); font-style: italic; font-weight: 400; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/public/fonts/jetbrains-mono-latin-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }

/* ─── Site tokens (aliases of tokens.css primitives) ─── */
:root {
  --ink: var(--ghost-white);
  --ink-muted: rgba(248, 242, 255, 0.72);
  --ink-soft: rgba(248, 242, 255, 0.56);
  --line: rgba(248, 242, 255, 0.14);
  --accent: var(--lavender);
  --nav-h: 72px;
  --gutter: clamp(20px, 5vw, 72px);
  --wrap: 1200px;
  --display-xl: clamp(3rem, 8.2vw, 7.4rem);
  --display: clamp(2.4rem, 5.6vw, 4.6rem);
  --h2: clamp(1.8rem, 3.4vw, 2.6rem);
}

/* ─── Base ─── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--nav-h); }
body { margin: 0; padding-top: var(--nav-h); background: var(--void); color: var(--ink); font: 400 1rem/1.75 "Inter", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
img, video { display: block; max-width: 100%; }
a { color: var(--accent); }
h1, h2, h3, h4 { margin: 0; font-family: "Space Grotesk", sans-serif; font-weight: 500; line-height: 1.05; }
p { margin: 0; }
em.accent, .accent-word { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-weight: 400; letter-spacing: 0; color: var(--accent); }
:focus-visible { outline: 2px solid var(--steel-blue); outline-offset: 3px; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; padding: 10px 16px; border-radius: 9999px; background: var(--lavender); color: var(--deep-purple); font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; }
.wrap { width: min(var(--wrap), 100% - var(--gutter) * 2); margin-inline: auto; }
.eyebrow { display: inline-block; font: 500 0.75rem/1 "Space Grotesk", sans-serif; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); }
.lede { font-size: clamp(1.05rem, 1.5vw, 1.3rem); line-height: 1.6; color: var(--ink-muted); max-width: 60ch; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ─── Navigation: full bar ≥ 960px; logo + CTA + menu button below ─── */
.site-nav { position: fixed; inset: 0 0 auto; z-index: 100; height: var(--nav-h); display: flex; align-items: center; gap: 28px;
  padding: 0 var(--gutter); transition: background 300ms var(--ease-out), border-color 300ms; background: var(--void); border-bottom: 1px solid var(--line); }
.site-nav.is-scrolled, .site-nav.is-open { background: rgba(11, 0, 22, 0.78); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-bottom-color: var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; flex: none; color: var(--ink); text-decoration: none; font: 500 1.1rem/1 "Space Grotesk", sans-serif; letter-spacing: 0.02em; }
.brand img { width: 40px; height: 40px; object-fit: contain; border-radius: var(--radius-sm, 4px); }
.nav-links { display: none; align-items: center; gap: 28px; margin: 0 0 0 auto; padding: 0; list-style: none; }
.nav-links a { position: relative; color: var(--ink); text-decoration: none; font: 500 0.75rem/1 "Space Grotesk", sans-serif; letter-spacing: 0.14em; text-transform: uppercase; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 300ms var(--ease-out); }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-links .login { color: var(--ink); }
.nav-cta { margin-left: auto; }
.menu-button { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 9999px; background: transparent; color: var(--ink); cursor: pointer; }
.menu-button span, .menu-button span::before, .menu-button span::after { display: block; width: 18px; height: 1.5px; background: currentColor; position: relative; transition: transform 300ms var(--ease-out), opacity 200ms; }
.menu-button span::before, .menu-button span::after { content: ""; position: absolute; left: 0; }
.menu-button span::before { top: -6px; } .menu-button span::after { top: 6px; }
.site-nav.is-open .menu-button span { background: transparent; }
.site-nav.is-open .menu-button span::before { transform: translateY(6px) rotate(45deg); }
.site-nav.is-open .menu-button span::after { transform: translateY(-6px) rotate(-45deg); }
.mobile-menu { position: fixed; inset: var(--nav-h) 0 0; z-index: 99; display: flex; flex-direction: column; gap: 6px; padding: 32px var(--gutter);
  background: var(--void); transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity 250ms var(--ease-out), transform 300ms var(--ease-out), visibility 0s 300ms; }
.mobile-menu.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.mobile-menu a { padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font: 500 clamp(1.8rem, 7vw, 2.4rem)/1.1 "Space Grotesk", sans-serif; }
.mobile-menu .login-group { margin-top: auto; display: flex; gap: 16px; font-size: 0.9rem; color: var(--ink-soft); }
.mobile-menu .login-group { flex-wrap: wrap; }
.mobile-menu .login-group a { padding: 12px 0; border: 0; font: inherit; color: var(--ink); }
@media (min-width: 960px) {
  .nav-links { display: flex; }
  .nav-cta { margin-left: 0; }
  .menu-button, .mobile-menu { display: none; }
}

/* Client login disclosure (desktop) */
.login-menu { position: relative; }
.login-menu summary { list-style: none; cursor: pointer; color: var(--ink); font: 500 0.75rem/1 "Space Grotesk", sans-serif; letter-spacing: 0.14em; text-transform: uppercase; }
.login-menu summary::-webkit-details-marker { display: none; }
.login-menu[open] .login-panel { display: grid; }
.login-panel { display: none; position: absolute; right: 0; top: calc(100% + 16px); min-width: 200px; gap: 4px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: rgba(27, 0, 51, 0.96); }
.login-panel a { padding: 10px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font: 500 0.9rem/1.2 "Inter", sans-serif; letter-spacing: 0; text-transform: none; }
.login-panel a:hover { background: rgba(184, 192, 255, 0.12); }
.login-panel a::after { display: none; }

/* ─── Buttons: a complete lavender → steel-blue fill on every screen ─── */
.btn { --h: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: var(--h); padding: 0 26px; border-radius: 9999px;
  border: 1px solid var(--lavender); color: var(--deep-purple); text-decoration: none; cursor: pointer; white-space: nowrap;
  font: 600 0.75rem/1 "Space Grotesk", sans-serif; letter-spacing: 0.14em; text-transform: uppercase;
  background: linear-gradient(110deg, var(--lavender), var(--steel-blue));
  transition: filter 300ms var(--ease-out), box-shadow 300ms; }
.btn:hover, .btn:focus-visible { color: var(--deep-purple); filter: brightness(1.06); box-shadow: 0 0 28px rgba(184, 192, 255, 0.28); }
.btn.quiet { color: var(--ghost-white); border-color: rgba(248, 242, 255, 0.4); background: transparent; }
.btn.quiet:hover, .btn.quiet:focus-visible { border-color: var(--lavender); color: var(--ghost-white); box-shadow: none; filter: none; }
.nav-cta.btn { --h: 44px; padding: 0 20px; }
.btn .arrow { transition: transform 300ms var(--ease-out); }
.btn:hover .arrow { transform: translateX(4px); }

/* ─── Scenes: a tall section with a pinned viewport ─── */
.scene { position: relative; height: var(--scene-h, 300vh); }
.scene .pin { position: sticky; top: var(--nav-h); height: calc(100svh - var(--nav-h)); overflow: hidden; }
.scene video, .scene .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.scene video[data-scrub-video]:not(.beat) { opacity: 0; transition: opacity 400ms var(--ease-out); }
.scene video[data-scrub-video]:not(.beat).is-ready { opacity: 1; }
.scrim { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(11, 0, 22, 0.55) 0%, rgba(11, 0, 22, 0.05) 38%, rgba(11, 0, 22, 0.05) 62%, rgba(11, 0, 22, 0.7) 100%); }
.scene-cta { position: absolute; right: var(--gutter); bottom: 6vh; z-index: 3; opacity: 0; transform: translateY(12px); transition: opacity 500ms var(--ease-out), transform 600ms var(--ease-out); }
.scene.is-ending .scene-cta { opacity: 1; transform: none; }
.scene-continue { scroll-margin-top: var(--nav-h); }
.scene-continue:focus { outline: none; }

/* S1 — hero: text group travels top → bottom with the camera (R1 Q06) */
.s1 { --scene-h: 220vh; }
.hero-copy { position: absolute; left: var(--gutter); right: var(--gutter); top: 0; z-index: 2; max-width: 1150px; will-change: transform; padding-top: 5vh; }
.hero-emphasis { display: inline-block; color: var(--accent); font-family: "Space Grotesk", sans-serif; }
.hero-copy h1 { font-size: var(--display-xl); font-weight: 500; line-height: 0.98; letter-spacing: 0.005em; text-shadow: 0 2px 30px rgba(11, 0, 22, 0.5); }
.hero-copy p { margin-top: 18px; font-size: clamp(1.05rem, 1.6vw, 1.4rem); color: rgba(248, 242, 255, 0.88); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-proof { margin-top: 22px; font-size: 0.85rem; color: var(--ink-soft); letter-spacing: 0.02em; }
.scroll-hint { position: absolute; left: 50%; bottom: 4vh; z-index: 2; transform: translateX(-50%); font: 500 0.7rem/1 "Space Grotesk", sans-serif; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-soft); }

/* S2 — high-impact beats (scrubbed) */
.s2 { --scene-h: 420vh; }
.s2 .scrim { z-index: 1; background: linear-gradient(0deg, rgba(11,0,22,0.96), rgba(11,0,22,0.75) 24%, rgba(11,0,22,0.05) 65%); }
.beat { z-index: 1; opacity: 0; transition: opacity 600ms var(--ease-out); }
.beat.is-active.is-ready { opacity: 1; }
.beat-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity 400ms var(--ease-out); }
.beat-poster.is-active { opacity: 1; }
.beat-captions { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 15vh; z-index: 2; }
.beat-caption { position: absolute; left: 0; bottom: 0; width: min(100%, 980px); opacity: 0; transform: translateY(36px); transition: opacity 600ms var(--ease-out), transform 800ms var(--ease-out); }
.beat-caption.is-active { opacity: 1; transform: none; }
.beat-caption .eyebrow { display: block; margin-bottom: 14px; }
.beat-caption h2 { max-width: 16ch; font-size: clamp(1.9rem, 4.4vw, 4rem); line-height: 1.04; text-shadow: 0 2px 24px rgba(11, 0, 22, 0.55); }
.beat-dots { position: absolute; left: var(--gutter); top: 24px; z-index: 2; display: flex; gap: 8px; }
.beat-dots span { width: 28px; height: 2px; background: rgba(248, 242, 255, 0.3); transition: background 300ms; }
.beat-dots span.is-active { background: var(--accent); }

/* S3 — asset library flight */
.s3 { --scene-h: 300vh; }
.s3 .pin { perspective: 900px; background: radial-gradient(ellipse at 55% 60%, rgba(46, 10, 79, 0.95), var(--void) 72%); }
.field { position: absolute; inset: 0; transform-style: preserve-3d; }
.tile { position: absolute; left: 50%; top: 50%; width: 136px; aspect-ratio: 16 / 9; margin: -38px 0 0 -68px; border-radius: 6px; will-change: transform, opacity;
  background-color: var(--midnight); background-image: var(--atlas, none); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); }
.library-copy { position: absolute; left: var(--gutter); bottom: 9vh; z-index: 2; max-width: 540px; padding: 28px; border-radius: 16px; background: rgba(11, 0, 22, 0.74); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid var(--line); }
.library-copy h2 { margin: 12px 0 10px; font-size: clamp(2rem, 4vw, 3.4rem); }
.library-copy .count { font-family: "Space Grotesk", sans-serif; font-variant-numeric: tabular-nums; }
.library-copy p { color: var(--ink-muted); }
.library-copy .btn { margin-top: 18px; }

/* S4 — workflow steps with a pinned visual per step */
.s4 { position: relative; padding: 4vh 0 16vh; }
.steps-grid { display: grid; gap: 0 6vw; grid-template-columns: 1fr; }
.step-panel { position: sticky; top: calc(var(--nav-h) + 12px); height: 44svh; z-index: 2; margin-bottom: 4vh; border: 1px solid var(--line); border-radius: 16px; background: rgba(27, 0, 51, 0.82); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); overflow: hidden; }
.step-visual { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: clamp(18px, 3vw, 40px); opacity: 0; transform: translateY(16px); transition: opacity 500ms var(--ease-out), transform 600ms var(--ease-out); }
.step-visual.is-active { opacity: 1; transform: none; }
.step-visual h4 { font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); }
.step-list { list-style: none; margin: 0; padding: 0; counter-reset: step; }
/* Inactive steps dim to 0.7 — the lowest value that keeps body text ≥ 4.5:1 on void. */
.step { min-height: 70svh; display: flex; flex-direction: column; justify-content: center; opacity: 0.7; transition: opacity 500ms var(--ease-out); }
.step.is-active, .step.is-past { opacity: 1; }
.step .n { font: 500 0.8rem/1 "JetBrains Mono", monospace; color: var(--accent); }
.step h3 { margin: 12px 0 12px; font-size: clamp(1.8rem, 3.6vw, 3rem); }
.step p { max-width: 44ch; font-size: 1.1rem; color: var(--ink-muted); }
.steps-rail { position: absolute; left: calc(var(--gutter) - 22px); top: 0; bottom: 0; width: 2px; background: rgba(248, 242, 255, 0.1); }
.steps-rail span { position: sticky; top: 30vh; display: block; width: 2px; height: 40vh; background: var(--accent); transform-origin: top; transform: scaleY(var(--rail, 0)); }
@media (min-width: 960px) {
  .steps-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .step-panel { top: calc(50svh - 30svh); height: 60svh; margin-bottom: 0; }
}
/* Step visual primitives */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 9999px; font-size: 0.85rem; color: var(--ink); }
.swatch { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.model-grid { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; font-size: 0.95rem; }
.model-grid dt { color: var(--ink-soft); font: 500 0.75rem/1.8 "Space Grotesk", sans-serif; letter-spacing: 0.14em; text-transform: uppercase; }
.model-grid dd { margin: 0; color: var(--ink); }
.orchestrator { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; background: rgba(184, 192, 255, 0.1); font-size: 0.9rem; }
.orchestrator img { width: 28px; height: 28px; flex: none; object-fit: contain; border-radius: 4px; }
.phase-track { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 0.92rem; }
.phase-track li { display: flex; align-items: center; gap: 10px; color: var(--ink-muted); }
.phase-track li::before { content: ""; width: 16px; height: 16px; flex: none; border-radius: 50%; border: 1.5px solid var(--accent); }
.phase-track li.done { color: var(--ink); }
.phase-track li.done::before { background: var(--accent); box-shadow: inset 0 0 0 3px var(--midnight); }
.bars { display: grid; gap: 12px; }
.bar { display: grid; gap: 6px; font-size: 0.85rem; color: var(--ink-muted); }
.bar span { display: block; height: 12px; border-radius: 9999px; background: rgba(248, 242, 255, 0.18); }
.bar.latest span { background: var(--accent); }
.big-metric { font: 400 clamp(2.6rem, 5vw, 4rem)/1 "JetBrains Mono", monospace; color: var(--accent); }
.formats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.format { display: grid; place-items: center; gap: 6px; padding: 12px 6px; border: 1px solid var(--line); border-radius: 10px; font-size: 0.78rem; color: var(--ink-muted); text-align: center; }
.format i { display: block; border: 1.5px solid var(--accent); border-radius: 3px; }

/* S5 — client portal showcase (illustrative tenant themes in portal-showcase.css) */
.s5 { --scene-h: 300vh; }
.s5 .pin { display: grid; align-items: center; padding: 4vh var(--gutter) 7vh; background: radial-gradient(ellipse at 70% 40%, rgba(46, 10, 79, 0.9), var(--void) 70%); }
.portal-stage { display: grid; gap: 4vh; align-items: center; grid-template-columns: 1fr; }
.portal-copy h2 { margin: 14px 0 14px; font-size: var(--h2); }
.portal-copy p { color: var(--ink-muted); max-width: 42ch; }
.portal-tenants { display: flex; gap: 8px; margin-top: 18px; }
.portal-tenants span { padding: 6px 12px; border-radius: 9999px; border: 1px solid var(--line); font-size: 0.8rem; color: var(--ink-soft); transition: color 300ms, border-color 300ms; }
.portal-tenants span.is-active { color: var(--ink); border-color: var(--accent); }
.portal-note { margin-top: 14px; font-size: 0.75rem; color: var(--ink-soft); }
@media (min-width: 960px) { .portal-stage { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); } }

/* Founder note — R2 Q08: normal flow, compact portrait, approved quote. */
.founder { border-top: 1px solid var(--line); }
.founder-layout { display: grid; gap: 32px 64px; }
.founder-profile { display: grid; justify-items: center; text-align: center; gap: 18px; align-self: start; min-width: 0; }
.portrait-frame { position: relative; width: min(var(--portrait-size, 240px), 100%); aspect-ratio: 1; overflow: hidden; border-radius: 50%; }
.founder .portrait { position: absolute; width: auto; max-width: none; height: var(--portrait-zoom, 103%); left: var(--portrait-x, 88%); top: var(--portrait-y, 0%); transform: translate(calc(-1 * var(--portrait-x, 88%)), calc(-1 * var(--portrait-y, 0%))); }
.founder-note { max-width: 720px; }
.founder-note blockquote { margin: 20px 0 28px; font: 400 clamp(1.25rem, 2vw, 1.8rem)/1.55 "Space Grotesk", sans-serif; }
.signature { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-size: 1.9rem; color: var(--accent); line-height: 1.2; }
.signature-role { margin: 6px auto 0; font-size: 0.85rem; color: var(--ink-muted); max-width: 22ch; }
@media (min-width: 960px) { .founder-layout { grid-template-columns: 0.7fr 1.3fr; } }

/* ─── Template chapters: giant tracked title + four columns ─── */
.chapter { padding: clamp(96px, 14vh, 160px) 0 clamp(64px, 10vh, 112px); }
.chapter-head { display: grid; gap: 22px; }
.chapter-title { font-size: var(--display-xl); font-weight: 500; letter-spacing: 0.03em; line-height: 0.96; }
.grid-4 { display: grid; gap: 36px 40px; margin-top: clamp(40px, 7vh, 72px); grid-template-columns: 1fr; }
.grid-4 h3 { font-size: 1.2rem; letter-spacing: 0.02em; line-height: 1.4; margin-bottom: 10px; }
.grid-4 p { color: var(--ink-muted); font-size: 0.98rem; }
.grid-4 .col { padding-top: 18px; border-top: 1px solid var(--line); }
@media (min-width: 640px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

/* ─── Content blocks ─── */
.section { padding: clamp(72px, 12vh, 140px) 0; }
.section-head { display: grid; gap: 16px; margin-bottom: clamp(32px, 6vh, 56px); }
.section-head h2 { font-size: var(--h2); }
.metrics { display: grid; gap: 28px; grid-template-columns: repeat(2, 1fr); padding: 36px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metric b { display: block; font: 400 clamp(2.2rem, 4.4vw, 3.6rem)/1 "JetBrains Mono", monospace; color: var(--accent); }
.metric span { display: block; margin-top: 10px; font-size: 0.92rem; color: var(--ink-muted); max-width: 26ch; }
@media (min-width: 1024px) { .metrics { grid-template-columns: repeat(2, 1fr); } }
.engage { display: grid; gap: 20px; grid-template-columns: 1fr; counter-reset: engage; }
.engage li { list-style: none; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: rgba(27, 0, 51, 0.45); }
.engage .n { font: 400 0.85rem/1 "JetBrains Mono", monospace; color: var(--accent); }
.engage h3 { margin: 12px 0 8px; font-size: 1.35rem; }
.engage p { color: var(--ink-muted); }
@media (min-width: 900px) { .engage { grid-template-columns: repeat(3, 1fr); } }
.cta-band { padding: clamp(80px, 14vh, 150px) 0; text-align: left; border-top: 1px solid var(--line); }
.cta-band h2 { font-size: var(--display); max-width: 18ch; }
.cta-band .hero-actions { margin-top: 32px; }
.case { display: grid; gap: 28px; padding: clamp(48px, 8vh, 88px) 0; border-top: 1px solid var(--line); }
.case video, .case img.case-media { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; border-radius: 12px; background: var(--midnight); }
.case h3 { margin: 12px 0 14px; font-size: var(--h2); }
.case dl { display: grid; gap: 14px; margin: 18px 0 0; }
.case dt { font: 500 0.72rem/1 "Space Grotesk", sans-serif; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.case dd { margin: 6px 0 0; color: var(--ink-muted); }
@media (min-width: 1024px) { .case { grid-template-columns: 1.25fr 1fr; align-items: center; } .case:nth-of-type(even) .case-body { order: -1; } }
.faq details { border-top: 1px solid var(--line); padding: 20px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 20px; font: 500 1.15rem/1.4 "Space Grotesk", sans-serif; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.4rem; line-height: 1; transition: transform 300ms var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin-top: 12px; color: var(--ink-muted); max-width: 70ch; }
.prose p + p { margin-top: 1.1em; }
.prose p { color: var(--ink-muted); font-size: 1.08rem; max-width: 66ch; }
.two-col { display: grid; gap: 40px; }
@media (min-width: 960px) { .two-col { grid-template-columns: 1fr 1fr; gap: 6vw; } }
.panel-list { display: grid; gap: 14px; }
.panel-list li { list-style: none; padding: 20px 22px; border: 1px solid var(--line); border-radius: 14px; background: rgba(27, 0, 51, 0.4); }
.panel-list strong { display: block; font: 500 1.05rem/1.4 "Space Grotesk", sans-serif; margin-bottom: 4px; }
.panel-list span { color: var(--ink-muted); font-size: 0.95rem; }
.offer { padding: clamp(40px, 7vh, 72px) 0; border-top: 1px solid var(--line); display: grid; gap: 22px; }
.offer h3 { font-size: var(--h2); }
.offer ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.offer li { padding-left: 22px; position: relative; color: var(--ink-muted); }
.offer li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 10px; height: 1.5px; background: var(--accent); }
@media (min-width: 960px) { .offer { grid-template-columns: 0.9fr 1.1fr; } }

/* ─── Forms ─── */
.contact { display: grid; gap: 48px; }
@media (min-width: 960px) { .contact { grid-template-columns: 1.2fr 0.8fr; } }
.form { display: grid; gap: 18px; }
.form .row { display: grid; gap: 18px; }
@media (min-width: 640px) { .form .row { grid-template-columns: 1fr 1fr; } }
.field-group { display: grid; gap: 8px; }
.field-group label, .field-group legend { font: 500 0.75rem/1 "Space Grotesk", sans-serif; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-muted); }
.form input[type="text"], .form input[type="email"], .form select, .form textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--midnight); color: var(--ink); font: inherit; }
.form textarea { min-height: 140px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--lavender); box-shadow: 0 0 0 3px rgba(184, 192, 255, 0.22); }
fieldset.field-group { border: 0; padding: 0; margin: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.checks label { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 9999px; cursor: pointer; font: 400 0.92rem/1 "Inter", sans-serif; letter-spacing: 0; text-transform: none; color: var(--ink); }
.checks input { accent-color: var(--lavender); }
.checks label:has(input:checked) { border-color: var(--lavender); background: rgba(184, 192, 255, 0.12); }
.honeypot { position: absolute; left: -9999px; }
.contact-aside { display: grid; gap: 22px; align-content: start; }
.contact-aside .card { padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: rgba(27, 0, 51, 0.45); }
.contact-aside h3 { font-size: 1.2rem; margin-bottom: 8px; }
.contact-aside p, .contact-aside li { color: var(--ink-muted); }
.contact-aside ol { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 6px; }

/* ─── Footer ─── */
.site-footer { padding: 56px 0 40px; border-top: 1px solid var(--line); }
.footer-grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
.footer-grid nav { display: flex; flex-wrap: wrap; gap: 18px 28px; }
.footer-grid a:not(.btn) { color: var(--ink-muted); text-decoration: none; font-size: 0.92rem; }
.footer-grid a:not(.btn):hover { color: var(--ink); }
.footer-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 36px; font-size: 0.8rem; color: var(--ink-soft); }
@media (min-width: 900px) { .footer-grid { grid-template-columns: auto 1fr auto; align-items: center; } .footer-grid nav { justify-content: center; } }

/* ─── Motion control (WCAG 2.2.2) and reveals ─── */
.motion-toggle { position: fixed; left: 16px; bottom: 16px; z-index: 90; height: 36px; padding: 0 14px; border-radius: 9999px; border: 1px solid var(--line);
  background: rgba(11, 0, 22, 0.78); color: var(--ink-muted); font: 500 0.7rem/1 "Space Grotesk", sans-serif; letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.motion-toggle:hover { color: var(--ink); border-color: var(--lavender); }
.reveal { opacity: 1; visibility: hidden; transform: translateY(24px); transition: opacity var(--duration-reveal) var(--ease-out), transform var(--duration-reveal) var(--ease-out); }
.reveal.is-visible { opacity: 1; visibility: visible; transform: none; }

/* ─── Small screens ─── */
@media (max-width: 720px) {
  .tile { width: 92px; margin: -26px 0 0 -46px; }
  .scene-cta { left: var(--gutter); right: auto; bottom: calc(76px + env(safe-area-inset-bottom)); }
  .library-copy { right: var(--gutter); bottom: 12vh; padding: 20px; }

  /* Portal scene: compact copy so the whole mock fits one mobile screen */
  .s5 .pin { align-items: start; padding-top: 20px; }
  .portal-stage { gap: 16px; }
  .portal-copy h2 { font-size: 1.7rem; margin: 8px 0; }
  .portal-copy p { font-size: 0.92rem; line-height: 1.55; }
  .portal-tenants { margin-top: 10px; }
  .portal-note { margin-top: 8px; }
  .pm-row .pm-card:last-child { display: none; }
  .brand span { font-size: 1rem; }
  .nav-cta.btn { padding: 0 16px; }
}

/* ─── Reduced motion: static compositions, no scrub/flight/autoplay ─── */
.reduce-motion .scene { height: auto; }
.reduce-motion .scene .pin { position: relative; top: 0; height: calc(100svh - var(--nav-h)); }
.reduce-motion .reveal, .reduce-motion .beat-caption, .reduce-motion .step, .reduce-motion .step-visual, .reduce-motion .founder-note .line { opacity: 1; transform: none; transition: none; }
.reduce-motion .scene-cta { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .reveal, .beat, .beat-caption, .step, .step-visual { transition: none; }
}

/* Mobile/tablet workflow: one card directly after its corresponding step. */
@media (max-width: 959px) {
  .s4 { padding: 48px 0 64px; }
  .step-panel, .steps-rail { display: none; }
  .step { min-height: 0; padding: 28px 0; opacity: 1; }
  .step + .step { border-top: 1px solid var(--line); }
  .step h3 { font-size: clamp(1.65rem, 5vw, 2.25rem); }
  .step p { font-size: 1rem; }
  .step .step-visual { position: relative; inset: auto; opacity: 1; visibility: visible; transform: none; transition: none; margin-top: 24px; gap: 14px; padding: 24px;
    border: 1px solid var(--line); border-radius: 16px; background: var(--midnight); }
  .model-grid { grid-template-columns: auto minmax(0, 1fr); gap: 10px 12px; }
  .orchestrator { flex-wrap: wrap; }
  .phase-track { gap: 6px; font-size: 0.85rem; }
  .phase-track li::before { width: 12px; height: 12px; }
}
@media (max-width: 380px) {
  .site-nav { gap: 12px; padding-inline: 16px; }
  .brand span { display: none; }
  .brand { gap: 6px; }
  .brand img { width: 30px; height: 30px; }
  .nav-cta.btn { padding: 0 16px; }
  .menu-button { width: 44px; height: 44px; flex: none; }
}
/* Useful content remains visible while scripts are disabled. */
.no-js .reveal { opacity: 1; transform: none; }
.no-js .hero-copy { transform: none; }
.reduce-motion .step-panel { position: relative; top: 0; }
.reduce-motion .step { min-height: auto; padding: 32px 0; }
.reduce-motion .step-visual:not(.is-active) { visibility: hidden; }

@media (max-width: 959px) {
  .s5 .pin { align-items: start; padding-top: 20px; padding-bottom: 72px; }
  .portal-stage { gap: 14px; }
  .portal-copy h2 { font-size: 1.7rem; margin: 8px 0; }
  .portal-copy p { font-size: 0.9rem; line-height: 1.5; }
  .portal-tenants { margin-top: 10px; }
  .portal-note { margin-top: 8px; }
}

.reduce-motion .beat-caption:not(.is-active) { opacity: 0; visibility: hidden; }

/* Readable type across bright hero frames without covering the whole film. */
.s1 .scrim { background: linear-gradient(90deg, rgba(11,0,22,0.66), rgba(11,0,22,0.42) 55%, rgba(11,0,22,0.08)), linear-gradient(0deg, rgba(11,0,22,0.45), transparent 60%); }

.reduce-motion .reveal, .no-js .reveal { visibility: visible; }

/* Round 03 approved official logo roles; dark is the default. */
.brand .brand-mark { width: 64px; height: 44px; border-radius: 0; }

.footer-brand img { width: 150px; height: auto; border-radius: 0; }
@media (max-width: 719px) { .brand .brand-mark { width: 36px; height: 36px; } .footer-brand img { width: 150px; height: auto; } }

/* Owner corrections during Round 04: complete frames at every viewport width. */
.reduce-motion video[data-scrub-video] { opacity: 0 !important; }
.hero-followup:empty { display: none; }
@media (max-width: 959px) {
  .scene video, .scene .poster, .beat-poster, .case video, .case img.case-media { object-fit: contain; }
  .s1 .scrim, .s2 .scrim { background: linear-gradient(180deg, var(--void), transparent 38%, transparent 80%, var(--void)); }
  .hero-copy { top: 24px; padding-top: 0; transform: none !important; will-change: auto; }
  .s1 { --mobile-title-space: 164px; }
  .s2 { --mobile-title-space: 210px; }
  .s1 video, .s1 .poster, .s2 video, .beat-poster { top: var(--mobile-title-space); height: calc(100% - var(--mobile-title-space) - 100px); }
  .hero-copy h1 { font-size: clamp(2.3rem, 9vw, 3rem); }
  .hero-followup { padding: 32px var(--gutter) 64px; background: var(--void); }
  .hero-details p { font-size: 1rem; color: var(--ink-muted); max-width: 46ch; }
  .hero-details .hero-proof { margin-top: 24px; font-size: 0.85rem; }
  .hero-actions { margin-top: 24px; gap: 16px; }
  .beat-captions { top: 24px; bottom: auto; }
  .beat-caption { top: 0; bottom: auto; transform: none; transition: opacity 400ms var(--ease-out); }
  .beat-caption .eyebrow { min-height: 2.6em; line-height: 1.3; margin-bottom: 12px; }
  .beat-caption h2 { font-size: clamp(1.8rem, 7vw, 2.35rem); }
  .beat-dots { top: auto; bottom: calc(24px + env(safe-area-inset-bottom)); }
  .scroll-hint { bottom: 80px; }
  .motion-toggle { bottom: calc(16px + env(safe-area-inset-bottom)); min-height: 44px; }
  .site-footer { padding-bottom: 88px; }
}
/* Inline cards remain visible when motion is paused or JavaScript is absent. */
@media (max-width: 959px) {
  .reduce-motion .step .step-visual { visibility: visible; }
}
.no-js .step-panel:empty { display: none; }
.no-js .steps-grid { grid-template-columns: 1fr; }
.no-js .step .step-visual { position: relative; opacity: 1; transform: none; margin-top: 24px; }
@media (max-width: 959px) {
  .no-js .s1 { height: auto; }
  .no-js .s1 .pin { position: relative; height: auto; min-height: calc(100svh - var(--nav-h)); }
  .no-js .hero-copy { position: relative; left: auto; right: auto; top: auto; padding: 24px var(--gutter) 88px; }
}

@media (max-width: 959px) and (max-height: 600px) and (orientation: landscape) {
  .s1 { --mobile-title-space: 100px; }
  .s2 { --mobile-title-space: 112px; }
  .hero-copy { top: 16px; }
  .hero-copy h1 { font-size: 1.8rem; }
  .hero-copy h1 br { display: none; }
  .hero-emphasis { margin-left: 0.2em; }
  .beat-captions { top: 16px; }
  .beat-caption .eyebrow { min-height: 1.3em; margin-bottom: 8px; }
  .beat-caption h2 { max-width: 32ch; font-size: 1.6rem; }
  .s1 video, .s1 .poster, .s2 video, .beat-poster { height: calc(100% - var(--mobile-title-space) - 76px); }
  .scroll-hint { display: none; }
}
