/* ============================================================
   Valley Sceneworks — Design System
   Brand: Navy #1b355e + Orange #d85e29
   Aesthetic: precise, technical, authoritative (survey + forensic)
   ============================================================ */

/* ---------- Type scale ---------- */
:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.8125rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 0.95rem);
  --text-base: clamp(1rem, 0.95rem + 0.2vw, 1.0625rem);
  --text-lg: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.1vw, 2.125rem);
  --text-2xl: clamp(2rem, 1.3rem + 2.4vw, 3.25rem);
  --text-3xl: clamp(2.5rem, 1.2rem + 4vw, 4.5rem);

  /* Spacing */
  --space-1: 0.25rem;  --space-2: 0.5rem;  --space-3: 0.75rem;
  --space-4: 1rem;     --space-5: 1.25rem; --space-6: 1.5rem;
  --space-8: 2rem;     --space-10: 2.5rem; --space-12: 3rem;
  --space-16: 4rem;    --space-20: 5rem;   --space-24: 6rem; --space-32: 8rem;

  --radius-sm: 0.25rem; --radius-md: 0.5rem; --radius-lg: 0.75rem;
  --radius-xl: 1rem; --radius-full: 9999px;

  --content-narrow: 680px;
  --content-default: 1000px;
  --content-wide: 1240px;

  --transition-interactive: 200ms cubic-bezier(0.16, 1, 0.3, 1);

  --font-display: 'Space Grotesk', 'Helvetica Neue', sans-serif;
  --font-body: 'Inter', 'Helvetica Neue', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

/* ---------- Light mode (default) ---------- */
:root, [data-theme="light"] {
  --navy: #1b355e;
  --navy-deep: #102b56;
  --navy-800: #16315b;
  --orange: #d85e29;
  --orange-hover: #c04f1f;

  --color-bg: #ffffff;
  --color-surface: #f8fafc;
  --color-surface-2: #f1f5fa;
  --color-surface-offset: #eaf0f7;
  --color-border: #e0e7f1;
  --color-divider: #edf1f7;

  --color-text: #1a2b47;
  --color-text-muted: #5b6b82;
  --color-text-faint: #97a3b4;
  --color-text-inverse: #f6f8fb;

  --color-primary: #1b355e;
  --color-primary-hover: #102b56;
  --color-accent: #d85e29;
  --color-accent-hover: #c04f1f;

  --hero-bg: #1b355e;
  --hero-bg-2: #24467a;
  --grid-line: rgba(255,255,255,0.07);

  --shadow-sm: 0 1px 2px rgba(27,53,94,0.05);
  --shadow-md: 0 8px 24px rgba(27,53,94,0.07);
  --shadow-lg: 0 20px 50px rgba(27,53,94,0.12);
  --grid-line-soft: rgba(27,53,94,0.05);
  --stage-glow: rgba(216,94,41,0.10);
  --stage-a: #f4f7fb;
  --stage-b: #e9eff7;
}

/* ---------- Dark mode ---------- */
[data-theme="dark"] {
  --color-bg: #0c1626;
  --color-surface: #111f34;
  --color-surface-2: #16273f;
  --color-surface-offset: #1b2e49;
  --color-border: #253c5c;
  --color-divider: #1d3150;

  --color-text: #e4ebf5;
  --color-text-muted: #9aabc4;
  --color-text-faint: #64758f;
  --color-text-inverse: #0c1626;

  --color-primary: #4f7fc0;
  --color-primary-hover: #6f9ad6;
  --color-accent: #f0743c;
  --color-accent-hover: #ff8a52;

  --hero-bg: #0e1c30;
  --hero-bg-2: #14243c;
  --grid-line: rgba(255,255,255,0.05);

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 6px 20px rgba(0,0,0,0.4);
  --shadow-lg: 0 18px 44px rgba(0,0,0,0.5);
  --grid-line-soft: rgba(255,255,255,0.05);
  --stage-glow: rgba(216,94,41,0.14);
  --stage-a: #142338;
  --stage-b: #0e1c30;
}

/* Light is the default theme. Dark applies only when the visitor toggles it
   (JS sets data-theme="dark"), so we intentionally do not auto-apply the
   system prefers-color-scheme here. */

/* ============================================================
   Base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: none; text-size-adjust: none;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility; scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  min-height: 100dvh; line-height: 1.65;
  font-family: var(--font-body); font-size: var(--text-base);
  color: var(--color-text); background-color: var(--color-bg);
  overflow-x: hidden;
}

img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
ul[role="list"], ol[role="list"] { list-style: none; }
input, button, textarea, select { font: inherit; color: inherit; }

h1, h2, h3, h4, h5, h6 {
  text-wrap: balance; line-height: 1.1; font-family: var(--font-display);
  font-weight: 600; letter-spacing: -0.02em; color: var(--color-text);
}
p, li { text-wrap: pretty; }
a { color: inherit; text-decoration: none; }

::selection { background: rgba(216,94,41,0.22); color: var(--color-text); }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; border-radius: var(--radius-sm); }

button { cursor: pointer; background: none; border: none; }

a, button, [role="button"], input, textarea, select {
  transition: color var(--transition-interactive), background var(--transition-interactive),
    border-color var(--transition-interactive), box-shadow var(--transition-interactive),
    transform var(--transition-interactive);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; scroll-behavior: auto !important;
  }
}

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

/* ============================================================
   Layout helpers
   ============================================================ */
.wrap { width: 100%; max-width: var(--content-wide); margin-inline: auto; padding-inline: var(--space-6); }
.wrap--default { max-width: var(--content-default); }
.wrap--narrow { max-width: var(--content-narrow); }
.section { padding-block: clamp(var(--space-16), 8vw, var(--space-32)); }
.section--tight { padding-block: clamp(var(--space-12), 6vw, var(--space-20)); }

.eyebrow {
  font-family: var(--font-mono); font-size: var(--text-xs);
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--color-accent); font-weight: 500; margin-bottom: var(--space-4);
  display: inline-flex; align-items: center; gap: var(--space-2);
}
.eyebrow::before { content: ""; width: 24px; height: 1px; background: var(--color-accent); }

.lead { font-size: var(--text-lg); color: var(--color-text-muted); max-width: 60ch; line-height: 1.6; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  font-family: var(--font-display); font-size: var(--text-sm); font-weight: 600;
  letter-spacing: 0.01em; padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md); border: 1.5px solid transparent; text-align: center;
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn--primary { background: var(--color-accent); color: #fff; }
.btn--primary:hover { background: var(--color-accent-hover); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--ghost { background: transparent; color: var(--color-text); border-color: var(--color-border); }
.btn--ghost:hover { border-color: var(--color-accent); color: var(--color-accent); }
.btn--on-dark { background: transparent; color: #fff; border-color: rgba(255,255,255,0.35); }
.btn--on-dark:hover { background: rgba(255,255,255,0.1); border-color: #fff; }
.btn--lg { padding: var(--space-4) var(--space-8); font-size: var(--text-base); }

/* ============================================================
   Header / nav
   ============================================================ */
.header {
  position: sticky; top: 0; z-index: 100; overflow: visible;
  background: color-mix(in oklab, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(14px); border-bottom: 1px solid var(--color-divider);
  transition: box-shadow var(--transition-interactive), background var(--transition-interactive);
}
.header--scrolled { box-shadow: var(--shadow-sm); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); height: 4.75rem; }
.nav__logo { display: flex; align-items: center; align-self: stretch; }
/* Oversized brand mark that overhangs the bar so it reads as a focal element */
.nav__logo img { height: 5.5rem; width: auto; margin-block: -0.6rem; transition: height var(--transition-interactive), margin var(--transition-interactive); }
.header--scrolled .nav__logo img { height: 4.5rem; margin-block: -0.2rem; }
.nav__logo .logo-dark { display: block; }
.nav__logo .logo-light { display: none; }
[data-theme="dark"] .nav__logo .logo-dark { display: none; }
[data-theme="dark"] .nav__logo .logo-light { display: block; }

.nav__links { display: flex; align-items: center; gap: var(--space-6); }
.nav__link {
  font-size: var(--text-sm); font-weight: 500; color: var(--color-text-muted);
  position: relative; padding-block: var(--space-2);
}
.nav__link:hover, .nav__link[aria-current="page"] { color: var(--color-text); }
.nav__link[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px; background: var(--color-accent);
}
.nav__actions { display: flex; align-items: center; gap: var(--space-3); }
.theme-toggle {
  display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem;
  border-radius: var(--radius-md); color: var(--color-text-muted); border: 1px solid var(--color-border);
}
.theme-toggle:hover { color: var(--color-accent); border-color: var(--color-accent); }
.nav__toggle { display: none; }

/* Dropdown */
.has-dropdown { position: relative; }
.dropdown {
  position: absolute; top: calc(100% + 0.5rem); left: 50%; transform: translateX(-50%) translateY(8px);
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: var(--space-3); min-width: 260px;
  opacity: 0; visibility: hidden; transition: all var(--transition-interactive); z-index: 120;
}
.has-dropdown:hover .dropdown, .has-dropdown:focus-within .dropdown {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
.dropdown__item { display: block; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); }
.dropdown__item:hover { background: var(--color-surface-2); }
.dropdown__item strong { display: block; font-family: var(--font-display); font-size: var(--text-sm); color: var(--color-text); }
.dropdown__item span { display: block; font-size: var(--text-xs); color: var(--color-text-muted); margin-top: 2px; }

@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__toggle {
    display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem;
    border-radius: var(--radius-md); border: 1px solid var(--color-border); color: var(--color-text);
  }
  .nav__links--open {
    display: flex; flex-direction: column; align-items: flex-start; position: fixed;
    top: 4.5rem; left: 0; right: 0; background: var(--color-bg); border-bottom: 1px solid var(--color-border);
    padding: var(--space-6); gap: var(--space-4); box-shadow: var(--shadow-lg); z-index: 99;
  }
  .nav__links--open .dropdown { position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: none; padding: var(--space-2) 0 0 var(--space-4); min-width: 0; background: transparent;
    transition: none; }
  .nav__links--open .has-dropdown:hover .dropdown,
  .nav__links--open .has-dropdown:focus-within .dropdown { transform: none; opacity: 1; visibility: visible; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero { position: relative;
  background: linear-gradient(140deg, var(--hero-bg) 0%, var(--hero-bg-2) 100%);
  color: #fff; overflow: hidden; }
.hero::after { content: ""; position: absolute; top: -30%; right: -10%; width: 60%; height: 130%;
  background: radial-gradient(closest-side, rgba(216,94,41,0.14), transparent 70%); pointer-events: none; }
.hero__grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px; pointer-events: none;
}
.hero__inner { position: relative; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: var(--space-16);
  align-items: center; padding-block: clamp(var(--space-20), 10vw, var(--space-32)); }
.hero__eyebrow { color: var(--color-accent); }
.hero h1 { font-size: var(--text-3xl); color: #fff; margin-bottom: var(--space-6); line-height: 1.04; }
.hero h1 .accent { color: var(--color-accent); }
.hero__lead { font-size: var(--text-lg); color: rgba(233,240,251,0.88); max-width: 52ch; margin-bottom: var(--space-8); }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-bottom: var(--space-10); }
.hero__meta { display: flex; flex-wrap: wrap; gap: var(--space-6); font-family: var(--font-mono);
  font-size: var(--text-xs); letter-spacing: 0.05em; color: rgba(230,238,250,0.6); }
.hero__meta span { display: inline-flex; align-items: center; gap: var(--space-2); }
.hero__meta span::before { content: ""; width: 6px; height: 6px; background: var(--color-accent); border-radius: 2px; }

.hero__visual { position: relative; }
.hero__frame {
  position: relative; border: 1px solid rgba(255,255,255,0.15); border-radius: var(--radius-md);
  overflow: hidden; box-shadow: var(--shadow-lg);
}
.hero__frame img { width: 100%; aspect-ratio: 3/2; object-fit: cover; display: block; }
.hero__corner {
  position: absolute; font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.08em;
  color: rgba(255,255,255,0.85); background: rgba(16,38,71,0.6); padding: 3px 8px; border-radius: 3px; z-index: 2;
}
.hero__corner--tl { top: 10px; left: 10px; }
.hero__corner--br { bottom: 10px; right: 10px; }

@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; gap: var(--space-10); }
  .hero__visual { order: -1; }
}

/* ============================================================
   Trust bar
   ============================================================ */
.trustbar { background: var(--color-surface); border-block: 1px solid var(--color-divider); }
.trustbar__inner { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: var(--space-6);
  padding-block: var(--space-10); }
.trust__item { text-align: center; min-width: 0; }
.trust__item strong { display: block; font-family: var(--font-display); font-size: var(--text-xl);
  color: var(--color-primary); white-space: nowrap; }
.trust__item span { display: block; font-size: var(--text-sm); color: var(--color-text-muted); margin-top: var(--space-1); overflow-wrap: break-word; }
@media (max-width: 720px) { .trustbar__inner { grid-template-columns: repeat(2, minmax(0,1fr)); gap: var(--space-6); }
  .trust__item strong { font-size: var(--text-lg); }
  /* At the narrowest widths the labels can wrap rather than clip */
  .trust__item strong { white-space: normal; overflow-wrap: break-word; } }

/* ============================================================
   Section headers
   ============================================================ */
.section__head { max-width: 60ch; margin-bottom: var(--space-12); }
.section__head h2 { font-size: var(--text-2xl); margin-bottom: var(--space-4); }
.section__head.center { margin-inline: auto; text-align: center; }
.section__head.center .eyebrow { justify-content: center; }

/* ============================================================
   Path cards (3-audience)
   ============================================================ */
.paths { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.path-card {
  position: relative; display: flex; flex-direction: column; padding: 0;
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  overflow: hidden; transition: transform var(--transition-interactive), border-color var(--transition-interactive), box-shadow var(--transition-interactive);
}
.path-card::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 3px; background: var(--color-accent);
  transform: scaleX(0); transform-origin: left; transition: transform var(--transition-interactive); }
.path-card:hover { transform: translateY(-4px); border-color: var(--color-accent); box-shadow: var(--shadow-md); }
.path-card:hover::before { transform: scaleX(1); }
.path-card__img { overflow: hidden; aspect-ratio: 3/2; }
.path-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform var(--transition-interactive); }
.path-card:hover .path-card__img img { transform: scale(1.03); }
.path-card__num { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-text-faint); letter-spacing: 0.1em; padding: var(--space-6) var(--space-6) 0; }
.path-card h3 { font-size: var(--text-lg); margin: var(--space-3) var(--space-6) var(--space-3); }
.path-card p { font-size: var(--text-sm); color: var(--color-text-muted); flex: 1; margin: 0 var(--space-6) var(--space-6); }
.path-card__link { font-family: var(--font-display); font-size: var(--text-sm); font-weight: 600; color: var(--color-accent);
  display: inline-flex; align-items: center; gap: var(--space-2); margin: 0 var(--space-6) var(--space-6); }
.path-card__link svg { width: 16px; height: 16px; flex-shrink: 0; }
.path-card:hover .path-card__link { gap: var(--space-3); }
.about-headshot { float: left; width: 200px; margin: 0 var(--space-6) var(--space-4) 0; border-radius: var(--radius-lg); }
@media (max-width: 600px) {
  .about-headshot { width: 120px; margin: 0 var(--space-4) 0 0; }
  .about-lead + p { clear: left; }
}
@media (max-width: 860px) { .paths { grid-template-columns: 1fr; } }

/* ============================================================
   Services grid
   ============================================================ */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.svc { padding: var(--space-6); background: var(--color-bg); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); }
.svc__icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--radius-md);
  background: color-mix(in oklab, var(--color-accent) 14%, transparent); color: var(--color-accent); margin-bottom: var(--space-4); }
.svc__icon svg { width: 22px; height: 22px; }
.svc h3 { font-size: var(--text-base); font-family: var(--font-display); margin-bottom: var(--space-4); padding-bottom: var(--space-3); border-bottom: 1px solid var(--color-divider); }
.svc p { font-size: var(--text-sm); color: var(--color-text); }
@media (max-width: 860px) { .svc-grid { grid-template-columns: 1fr; } }

/* ============================================================
   Split / feature rows
   ============================================================ */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-16); align-items: center; }
.split--reverse .split__media { order: 2; }
.split__media img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border); }
.split h2 { font-size: var(--text-xl); margin-bottom: var(--space-4); }
.split p { color: var(--color-text-muted); margin-bottom: var(--space-4); }
.split ul { list-style: none; display: grid; gap: var(--space-3); margin-top: var(--space-6); }
.split ul li { position: relative; padding-left: var(--space-6); font-size: var(--text-sm); }
.split ul li::before { content: "▸"; position: absolute; left: 0; color: var(--color-accent); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: var(--space-10); }
  .split--reverse .split__media { order: 0; } }

/* ============================================================
   Portfolio strip
   ============================================================ */
.portfolio { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: 220px; gap: var(--space-4); }
.pf-item { position: relative; overflow: hidden; border-radius: var(--radius-md); border: 1px solid var(--color-border); }
.pf-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms cubic-bezier(0.16,1,0.3,1); }
.pf-item:hover img { transform: scale(1.05); }
.pf-item__label { position: absolute; left: 0; bottom: 0; right: 0; padding: var(--space-4);
  background: linear-gradient(transparent, rgba(16,38,71,0.85)); color: #fff;
  font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.05em; }
.pf-item--lg { grid-column: span 6; grid-row: span 2; }
.pf-item--sm { grid-column: span 3; }
.pf-item--md { grid-column: span 6; }
@media (max-width: 860px) { .portfolio { grid-auto-rows: 200px; } .pf-item--lg, .pf-item--sm, .pf-item--md { grid-column: span 12; grid-row: auto; } }

/* ============================================================
   Interactive 3D embed (legacy, single)
   ============================================================ */
.embed-3d { position: relative; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--color-border);
  background: linear-gradient(140deg, var(--hero-bg) 0%, var(--hero-bg-2) 100%); box-shadow: var(--shadow-lg); }
.embed-3d iframe { width: 100%; height: 520px; border: 0; display: block; }
.embed-3d__placeholder { position: relative; height: 520px; display: grid; place-items: center; text-align: center;
  color: rgba(255,255,255,0.85); background:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    linear-gradient(140deg, var(--hero-bg) 0%, var(--hero-bg-2) 100%);
  background-size: 40px 40px, 40px 40px, 100%; }
.embed-3d__placeholder svg { width: 48px; height: 48px; color: var(--color-accent); margin-bottom: var(--space-4); }
.embed-3d__placeholder p { max-width: 40ch; margin-inline: auto; font-size: var(--text-sm); color: rgba(230,238,250,0.7); }
@media (max-width: 720px) { .embed-3d iframe, .embed-3d__placeholder { height: 380px; } }

/* ============================================================
   3D model showcase (horizontal, tabbed) — modern & light
   ============================================================ */
.model-showcase { margin-top: var(--space-10);
  border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  background: var(--color-bg); box-shadow: var(--shadow-md); overflow: hidden; }
.model-tabs { display: flex; gap: var(--space-1); flex-wrap: wrap; justify-content: center;
  padding: var(--space-3) var(--space-3) 0; border-bottom: 1px solid var(--color-divider);
  background: var(--color-surface); }
.model-tab { appearance: none; border: 0; background: none; cursor: pointer;
  font-family: var(--font-display); font-size: var(--text-sm); font-weight: 500;
  color: var(--color-text-muted); padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0; position: relative;
  transition: color var(--transition-interactive), background var(--transition-interactive); }
.model-tab:hover { color: var(--color-text); }
.model-tab.is-active { color: var(--color-primary); background: var(--color-bg); }
.model-tab.is-active::after { content: ""; position: absolute; left: var(--space-4); right: var(--space-4);
  bottom: -1px; height: 2px; background: var(--color-accent); border-radius: 2px; }
.model-panels { position: relative; }
.model-panel { display: none; }
.model-panel.is-active { display: block; }
.model-stage { position: relative; min-height: 600px; display: grid; place-items: center; text-align: center;
  padding: var(--space-10);
  background:
    linear-gradient(var(--grid-line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line-soft) 1px, transparent 1px),
    radial-gradient(120% 120% at 70% 10%, var(--stage-glow) 0%, transparent 55%),
    linear-gradient(160deg, var(--stage-a) 0%, var(--stage-b) 100%);
  background-size: 38px 38px, 38px 38px, 100%, 100%; }
.model-stage__inner { max-width: 52ch; }
.model-stage svg { width: 44px; height: 44px; color: var(--color-accent); margin: 0 auto var(--space-4); }
.model-stage p { margin-inline: auto; font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.6; }
.model-stage p strong { display: block; margin-bottom: var(--space-2);
  font-family: var(--font-display); font-size: var(--text-lg); color: var(--color-text); }
.model-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 720px) { .model-stage { min-height: 450px; } .model-tab { padding: var(--space-3); } }
.model-disclaimer { text-align: center; font-size: var(--text-xs); color: var(--color-text-muted);
  padding: var(--space-3) var(--space-4); margin: 0 auto; max-width: 780px; border-top: 1px solid var(--color-divider); }

/* ============================================================
   Credential / trust list
   ============================================================ */
.cred-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-4); }
.cred { display: flex; gap: var(--space-4); padding: var(--space-5); background: var(--color-surface);
  border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.cred__ico { flex-shrink: 0; width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--radius-md);
  background: color-mix(in oklab, var(--color-primary) 12%, transparent); color: var(--color-primary); }
[data-theme="dark"] .cred__ico { background: color-mix(in oklab, var(--color-accent) 16%, transparent); color: var(--color-accent); }
.cred__ico svg { width: 20px; height: 20px; }
.cred strong { display: block; font-family: var(--font-display); font-size: var(--text-sm); }
.cred span { font-size: var(--text-sm); color: var(--color-text-muted); }
@media (max-width: 720px) { .cred-list { grid-template-columns: 1fr; } }

/* ============================================================
   FAQ / accordion
   ============================================================ */
.faq { display: grid; gap: var(--space-3); max-width: 780px; }
.faq__item { border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-bg); overflow: hidden; }
.faq__q { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: var(--space-4);
  padding: var(--space-5); font-family: var(--font-display); font-weight: 600; font-size: var(--text-base); text-align: left; }
.faq__q:hover { color: var(--color-accent); }
.faq__icon { flex-shrink: 0; transition: transform var(--transition-interactive); color: var(--color-accent); }
.faq__icon svg { width: 18px; height: 18px; }
.faq__item[open] .faq__icon { transform: rotate(45deg); }
.faq__a { padding: 0 var(--space-5) var(--space-5); color: var(--color-text-muted); font-size: var(--text-sm); }

/* ============================================================
   CTA band
   ============================================================ */
.cta-band { background: linear-gradient(140deg, var(--hero-bg) 0%, var(--hero-bg-2) 100%);
  color: #fff; position: relative; overflow: hidden; }
.cta-band__grid { position: absolute; inset: 0; background-image:
  linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px; }
.cta-band__inner { position: relative; text-align: center; padding-block: clamp(var(--space-16), 8vw, var(--space-24)); }
.cta-band h2 { font-size: var(--text-2xl); color: #fff; margin-bottom: var(--space-4); }
.cta-band p { color: rgba(230,238,250,0.8); max-width: 50ch; margin: 0 auto var(--space-8); }
.cta-band__actions { display: flex; gap: var(--space-4); justify-content: center; flex-wrap: wrap; }

/* ============================================================
   Contact / form
   ============================================================ */
.contact-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.2fr); gap: var(--space-16); align-items: start; }
.contact-grid > * { min-width: 0; }
.contact-detail a, .contact-detail span { overflow-wrap: anywhere; }
.contact-info h2 { font-size: var(--text-2xl); margin-bottom: var(--space-4); }
.contact-detail { display: flex; gap: var(--space-4); margin-top: var(--space-6); }
.contact-detail svg { flex-shrink: 0; width: 22px; height: 22px; color: var(--color-accent); }
.contact-detail strong { display: block; font-family: var(--font-display); font-size: var(--text-sm); }
.contact-detail a, .contact-detail span { color: var(--color-text-muted); font-size: var(--text-sm); }
.contact-detail a:hover { color: var(--color-accent); }

.form { display: grid; gap: var(--space-4); background: var(--color-surface); padding: var(--space-8);
  border: 1px solid var(--color-border); border-radius: var(--radius-lg); }
.form__row { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: var(--space-4); }
.field { display: grid; gap: var(--space-2); min-width: 0; }
.field label { font-size: var(--text-sm); font-weight: 500; }
.field label .req { color: var(--color-accent); }
.field input, .field select, .field textarea {
  padding: var(--space-3) var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-md);
  background: var(--color-bg); font-size: var(--text-sm); width: 100%; min-width: 0; box-sizing: border-box; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(216,94,41,0.15); }
.field textarea { resize: vertical; min-height: 120px; }
.form__note { font-size: var(--text-xs); color: var(--color-text-faint); }
@media (max-width: 860px) { .contact-grid { grid-template-columns: minmax(0,1fr); gap: var(--space-10); }
  .form__row { grid-template-columns: 1fr; } }

/* ============================================================
   Page hero (interior)
   ============================================================ */
.page-hero { background: var(--color-surface); border-bottom: 1px solid var(--color-divider); }
.page-hero__inner { padding-block: clamp(var(--space-16), 8vw, var(--space-24)); max-width: 62ch; }
.page-hero--split { display: flex; align-items: stretch; }
.page-hero--split .page-hero__inner { flex: 1; max-width: 50ch; }
.page-hero__media { flex: 0 0 45%; display: flex; align-items: center; padding-right: var(--space-8); }
.page-hero__media img { width: 100%; height: auto; border-radius: var(--radius-lg); }
@media (max-width: 860px) { .page-hero--split { flex-direction: column; }
  .page-hero--split .page-hero__inner { max-width: 62ch; }
  .page-hero__media { padding: 0 var(--space-8) var(--space-12); flex: none; } }
.page-hero h1 { font-size: var(--text-2xl); margin-bottom: var(--space-4); }
.page-hero p { font-size: var(--text-lg); color: var(--color-text-muted); }
.breadcrumb { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-text-faint);
  letter-spacing: 0.05em; margin-bottom: var(--space-5); }
.breadcrumb a:hover { color: var(--color-accent); }

/* answer-first blocks */
.answer-block { border-left: 3px solid var(--color-accent); padding: var(--space-2) 0 var(--space-2) var(--space-6);
  margin-bottom: var(--space-8); }
.answer-block h3 { font-size: var(--text-lg); margin-bottom: var(--space-3); }
.answer-block p { color: var(--color-text-muted); }
.answer-block .why { display: block; margin-top: var(--space-3); font-size: var(--text-sm);
  font-family: var(--font-mono); color: var(--color-text-faint); }

/* glossary */
.glossary { display: grid; gap: var(--space-4); }
.term { padding: var(--space-5); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
.term dt { font-family: var(--font-display); font-weight: 600; font-size: var(--text-base); margin-bottom: var(--space-2); color: var(--color-primary); }
[data-theme="dark"] .term dt { color: var(--color-accent); }
.term dd { font-size: var(--text-sm); color: var(--color-text-muted); }

/* ============================================================
   Footer
   ============================================================ */
.footer { background: var(--color-surface); border-top: 1px solid var(--color-divider); }
.footer__inner { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: var(--space-8); padding-block: var(--space-16); }
.footer__brand img { height: 3.5rem; margin-bottom: var(--space-4); }
.footer__brand .logo-light { display: none; }
[data-theme="dark"] .footer__brand .logo-dark { display: none; }
[data-theme="dark"] .footer__brand .logo-light { display: block; }
.footer__brand p { font-size: var(--text-sm); color: var(--color-text-muted); max-width: 32ch; }
.footer h3 { font-family: var(--font-display); font-size: var(--text-sm); text-transform: uppercase;
  letter-spacing: 0.08em; margin-bottom: var(--space-4); color: var(--color-text-muted); font-weight: 600; }
.footer ul { list-style: none; display: grid; gap: var(--space-2); }
.footer a { font-size: var(--text-sm); color: var(--color-text-muted); }
.footer a:hover { color: var(--color-accent); }
.footer__bottom { border-top: 1px solid var(--color-divider); padding-block: var(--space-6);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-4);
  font-size: var(--text-xs); color: var(--color-text-faint); }
@media (max-width: 860px) { .footer__inner { grid-template-columns: 1fr 1fr; gap: var(--space-10); }
  .footer__brand { grid-column: 1 / -1; } }

/* ============================================================
   Reveal on scroll
   ============================================================ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1), transform 0.7s cubic-bezier(0.16,1,0.3,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }
