/* ============================================================
   Hexera — Hero with in-hero product demo (chat → rendered mesh)
   Palette: obsidian / teal / gold / champagne
   Type:    Big Shoulders Display (headline) + Geist (body) + Geist Mono (data)
   ============================================================ */

:root {
  --bg:        #060402;   /* warm amber-black — the site's single dark canvas */
  --bg-2:      #0b0905;
  --ink:       oklch(0.93 0 0);
  --muted:     oklch(0.80 0 0);
  --faint:     oklch(0.60 0.01 95);

  --teal:      #0fb6ac;
  --teal-deep: #0a8b84;
  --gold:      #ffba00;
  --gold-soft: #ffce4d;
  --gold-ink:  #211800;
  --crimson:      #d83a30;
  --crimson-soft: #ff6b5e;
  --green:     #0d0a06;   /* warm raised panel — a sibling of --bg, not cool graphite (kept name for compatibility) */

  --line:      rgba(238, 235, 225, 0.10);
  --line-2:    rgba(238, 235, 225, 0.20);

  /* canvas render colors as raw r,g,b triplets — the wireframe scenes
     (airfoil, industries chamber) read these so a palette change is CSS-only */
  --mesh-line-rgb:   15,182,172;
  --mesh-accent-rgb: 255,186,0;
  --mesh-ink-rgb:    236,234,229;

  --font-display: "Saira Semi Condensed", "Helvetica Neue", Arial, sans-serif;
  --font-body:    "Geist", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-mono:    "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --nav-h: 4.5rem;
  --pad-x: clamp(1.25rem, 4vw, 4rem);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);

  --z-canvas: 0; --z-content: 10; --z-nav: 20;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100svh;
  background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-weight: 400;
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.0625rem); line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
::selection { background: var(--teal); color: var(--bg); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 2px; }

/* ---------- Background ---------- */
.hero-art {
  position: fixed; inset: 0; z-index: var(--z-canvas);
  background: var(--bg) url("assets/hero-bg.jpg") center / cover no-repeat;
  filter: saturate(1.12) contrast(1.06);   /* original vivid colors */
  transform: scale(1.06); will-change: transform;
}
.fluid {
  position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%;
  pointer-events: none;          /* never blocks clicks/scroll */
  opacity: 1;                    /* full strength — original */
  mix-blend-mode: screen;        /* only adds light, never covers the image */
}
.vignette {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(130% 100% at 70% 50%, transparent 0%, transparent 40%, rgba(11,9,3,0.4) 72%, rgba(6,5,2,0.88) 100%),
    linear-gradient(100deg, rgba(7,6,2,0.92) 0%, rgba(11,9,3,0.6) 32%, rgba(11,9,3,0.1) 58%, transparent 72%),
    linear-gradient(0deg, rgba(7,6,2,0.5) 0%, transparent 26%);
}
.grain {
  position: fixed; inset: 0; z-index: 2; pointer-events: none; opacity: 0.04; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h); z-index: var(--z-nav);
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 0 var(--pad-x);
  border-bottom: 1px solid transparent;
  transition: background 0.4s var(--ease-expo), border-color 0.4s var(--ease-expo), backdrop-filter 0.4s var(--ease-expo);
}
.nav.is-stuck { background: rgba(8,6,2,0.74); backdrop-filter: blur(14px) saturate(1.1); border-bottom-color: var(--line); }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--ink); }
.brand__mark { flex: none; display: block; height: 24px; width: auto; }
.brand__word { font-family: var(--font-body); font-weight: 600; letter-spacing: 0.24em; font-size: 0.95rem; padding-left: 0.05em; }
/* standalone nav link (Contact), sits in nav__end left of the CTA; visible at all sizes */
.nav__link {
  position: relative; padding: 0.4rem 0; color: var(--muted);
  font-family: var(--font-mono); font-weight: 500; font-size: 0.595rem;
  letter-spacing: 0.16em; text-transform: uppercase; transition: color 0.25s var(--ease-expo);
}
.nav__link::after { content: ""; position: absolute; left: 0; bottom: -0.1rem; width: 100%; height: 1px; background: var(--teal); transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--ease-expo); }
.nav__link:hover { color: var(--ink); }
.nav__link:hover::after { transform: scaleX(1); }
/* centre nav cluster: primary pages, dead-centre of the bar */
.nav__center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: flex; gap: clamp(1.2rem, 2.5vw, 2.4rem); }
@media (max-width: 760px) { .nav__center { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  --brd: var(--line-2);
  display: inline-flex; align-items: center; gap: 0.55em;
  font-family: var(--font-body); font-weight: 500; font-size: 0.95rem; line-height: 1;
  padding: 0.9em 1.4em; border: 1px solid var(--brd); border-radius: 4px; cursor: pointer; white-space: nowrap;
  transition: transform 0.3s var(--ease-expo), background 0.3s var(--ease-expo), border-color 0.3s var(--ease-expo), box-shadow 0.3s var(--ease-expo), color 0.3s var(--ease-expo);
}
.btn span { transition: transform 0.3s var(--ease-expo); }
.btn:hover { transform: translateY(-2px); }
.btn:hover span { transform: translate(2px, -2px); }
.btn--ghost { font-size: 0.9rem; padding: 0.7em 1.1em; color: var(--ink); background: rgba(8,6,2,0.42); backdrop-filter: blur(6px); }
.btn--ghost:hover { border-color: var(--teal); box-shadow: 0 0 0 1px rgba(15,182,172,0.4), 0 8px 30px rgba(15,182,172,0.12); }
/* Mono nav CTA — sets the label in the same data-readout voice as the nav links */
.nav__cta.cta-mono { font-family: var(--font-mono); font-weight: 500; font-size: 0.682rem; letter-spacing: 0.16em; text-transform: uppercase; padding-right: 1.1em; }
.nav__cta.cta-mono > span { font-size: 1.05em; letter-spacing: 0; margin-left: -0.35em; opacity: 0.85; }
.btn--gold { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); font-weight: 600; }
.btn--gold:hover { background: var(--gold-soft); box-shadow: 0 10px 40px rgba(221,171,70,0.32), 0 0 0 1px rgba(232,200,121,0.6); }

/* ---------- Hero (two-column) ---------- */
.hero {
  position: relative; z-index: var(--z-content); min-height: 100svh;
  display: grid; place-items: center; align-content: center;
  padding: calc(var(--nav-h) + clamp(1.5rem, 5vh, 3rem)) var(--pad-x) clamp(3rem, 7vh, 5rem);
}
/* fade the hero's background down to the section black so there's no hard seam */
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 42vh;
  background: linear-gradient(to bottom, rgba(13,10,4,0), var(--black));
  z-index: -1; pointer-events: none;
}
.hero__grid {
  width: min(92vw, 1600px);
  display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  align-items: center; gap: clamp(2.5rem, 5.5vw, 7.5rem);
}
.hero__text { min-width: 0; }

.hero__title {
  margin: 0; font-family: var(--font-display); font-weight: 300;
  font-size: clamp(2.4rem, 1.4rem + 2.4vw, 4.5rem); line-height: 1.05; letter-spacing: 0; text-wrap: balance;
}
.hero__title em { font-style: normal; color: var(--gold); }

.hero__sub { margin: clamp(1.25rem, 3vh, 1.85rem) 0 0; max-width: 52ch; color: var(--muted); font-size: clamp(1rem, 0.96rem + 0.3vw, 1.08rem); line-height: 1.6; text-wrap: pretty; }
.hero__sub .num { font-family: var(--font-mono); font-weight: 500; font-size: 0.9em; color: var(--gold-soft); letter-spacing: 0.01em; white-space: nowrap; word-spacing: -0.28em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: clamp(1.75rem, 4vh, 2.5rem); }

/* ---------- Product window ---------- */
.hero__demo { min-width: 0; display: flex; justify-content: center; }
.win {
  position: relative; width: 100%; max-width: 745px;
  background: #211e17; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden;
  box-shadow: 0 40px 110px rgba(3,2,1,0.66), 0 0 0 1px rgba(0,0,0,0.3);
}
.win__bar {
  display: flex; align-items: center; gap: 1rem; height: 42px; padding: 0 0.9rem;
  background: #0a0703; border-bottom: 1px solid var(--line-2);
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.04em; color: var(--faint);
}
.win__dots { display: inline-flex; gap: 6px; }
.win__dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.16); }
.win__url { flex: 1; text-align: center; color: var(--muted); }
.win__tag { color: var(--teal); }

.win__stage { position: relative; height: clamp(365px, 49vh, 490px); }
.chat { position: absolute; inset: 0; }

/* chat */
.chat { display: flex; flex-direction: column; background: #19160f; min-height: 0; }
.chat__log { flex: 1; min-height: 0; overflow: hidden; padding: 1.1rem 1.1rem 0.4rem; display: flex; flex-direction: column; gap: 0.85rem; scroll-behavior: smooth; }
.msg { max-width: 90%; opacity: 0; transform: translateY(8px); animation: msg-in 0.45s var(--ease-expo) forwards; }
@keyframes msg-in { to { opacity: 1; transform: translateY(0); } }
.msg--ai { align-self: flex-start; }
.msg--user { align-self: flex-end; }
.msg__who { font-family: var(--font-mono); font-size: 0.56rem; letter-spacing: 0.2em; color: var(--teal); margin: 0 0 0.35rem; }
.msg__body { font-size: 0.86rem; line-height: 1.5; color: var(--ink); }
.msg--user .msg__body { background: rgba(221,171,70,0.13); border: 1px solid rgba(221,171,70,0.28); color: var(--gold-soft); padding: 0.55rem 0.8rem; border-radius: 12px 12px 3px 12px; }
.msg__body b { color: var(--ink); font-weight: 600; }

@keyframes spin { to { transform: rotate(360deg); } }

.gen-btn { margin-top: 0.8rem; display: inline-flex; align-items: center; gap: 0.5em; font-family: var(--font-body); font-weight: 600; font-size: 0.82rem; background: var(--gold); color: var(--gold-ink); border: none; border-radius: 6px; padding: 0.55em 0.95em; cursor: pointer; }

.chat__bar { display: flex; align-items: center; gap: 0.5rem; margin: 0.4rem 0.9rem 0.9rem; padding: 0.5rem 0.6rem 0.5rem 0.85rem; border: 1px solid var(--line-2); border-radius: 10px; background: rgba(255,255,255,0.025); min-height: 42px; }
.chat__field { flex: 1; font-size: 0.85rem; color: var(--ink); white-space: nowrap; overflow: hidden; }
.chat__field:empty::before { content: "Describe your simulation…"; color: var(--faint); }
.chat__caret { width: 1.5px; height: 1.05em; background: var(--teal); opacity: 0; }
.chat__caret.on { animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.chat__send { flex: none; width: 28px; height: 28px; border-radius: 7px; background: var(--gold); color: var(--gold-ink); border: none; cursor: pointer; font-size: 0.9rem; display: grid; place-items: center; }

/* ----- requirements summary table ----- */
.sumtable { width: 100%; border-collapse: collapse; margin-top: 0.6rem; }
.sumtable th { text-align: left; vertical-align: top; white-space: nowrap; padding: 0.3rem 0.9rem 0.3rem 0; font-family: var(--font-mono); font-weight: 500; font-size: 0.6rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.sumtable td { padding: 0.3rem 0; font-size: 0.76rem; color: var(--ink); border-bottom: 1px solid var(--line); }
.sumtable tr:last-child td { border-bottom: none; }

/* ----- agent pipeline ----- */
.pipe { margin-top: 0.3rem; }
.pipe__head { display: flex; align-items: center; gap: 0.55rem; font-family: var(--font-mono); font-size: 0.82rem; color: var(--ink); }
.pipe__spin { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid var(--line-2); border-top-color: var(--teal); animation: spin 0.85s linear infinite; flex: none; }
.pipe__spin.is-done { border-color: var(--teal); background: rgba(15,182,172,0.18); animation: none; position: relative; }
.pipe__spin.is-done::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 0.6rem; color: var(--teal); }
.pipe__state { margin-left: auto; font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.1em; color: var(--faint); }
.pipe__head.is-done .pipe__state { color: var(--teal); }
.pipe__rows { margin-top: 0.7rem; display: flex; flex-direction: column; gap: 0.5rem; }

.agent { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.55rem; font-family: var(--font-mono); font-size: 0.74rem; color: var(--muted); }
.agent__ic { width: 15px; height: 15px; border-radius: 50%; border: 1px solid var(--line-2); display: inline-grid; place-items: center; font-size: 0.58rem; flex: none; }
.agent.is-run { color: var(--ink); }
.agent.is-run .agent__ic { border-color: var(--teal); border-top-color: transparent; animation: spin 0.85s linear infinite; }
.agent.is-done .agent__ic { border-color: var(--teal); background: rgba(15,182,172,0.16); color: var(--teal); }
.agent__count { font-size: 0.62rem; color: var(--faint); letter-spacing: 0.04em; }
.agent__think { grid-column: 2 / -1; margin-top: 0.28rem; display: flex; flex-direction: column; gap: 0.3rem; }
.tline { font-size: 0.66rem; line-height: 1.45; opacity: 0; transform: translateY(3px); animation: tline-in 0.35s var(--ease-expo) forwards; }
@keyframes tline-in { to { opacity: 1; transform: none; } }
.tline--think { color: var(--muted); font-style: italic; }
.tline--tool { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.45em; }
.tchip { font-family: var(--font-mono); font-size: 0.5rem; letter-spacing: 0.12em; color: var(--teal); border: 1px solid rgba(15,182,172,0.4); border-radius: 4px; padding: 0.05em 0.4em; flex: none; }
.tline--tool code { font-family: var(--font-mono); font-size: 0.66rem; color: var(--ink); }
.tnote { font-size: 0.6rem; color: var(--faint); }

/* ----- result + export bundle ----- */
.result { margin-top: 0.3rem; }
.result__tag { display: flex; align-items: center; gap: 0.5em; font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.2em; color: var(--teal); }
.result__tag i { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 8px var(--teal); }
.result__text { margin: 0.5rem 0 0; font-size: 0.78rem; line-height: 1.55; color: var(--muted); }
.result__text b { color: var(--ink); font-weight: 600; }
.result__text code { font-family: var(--font-mono); font-size: 0.92em; color: var(--gold-soft); }
.exports { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.45rem; margin-top: 0.75rem; }
.exp { border: 1px solid var(--line-2); border-radius: 7px; padding: 0.45rem 0.55rem; background: rgba(255,255,255,0.02); opacity: 0; transform: translateY(6px); transition: opacity 0.4s var(--ease-expo), transform 0.4s var(--ease-expo); }
.exp.is-in { opacity: 1; transform: none; }
.exp__fmt { display: block; font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink); }
.exp__sz { display: block; font-size: 0.56rem; color: var(--faint); margin-top: 0.12rem; }

.msg__body .dim { color: var(--faint); }

@media (max-width: 620px) {
  .exports { grid-template-columns: repeat(2, 1fr); }
}

/* cursor */
.cursor {
  position: absolute; top: 0; left: 0; z-index: 30; width: 22px; height: 22px; pointer-events: none; opacity: 0;
  transform: translate(40px, 300px); transition: transform 0.7s cubic-bezier(0.5,0,0.2,1), opacity 0.3s;
  background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 2 4 20 9 15 12.5 22 15 21 11.5 14 18 14 Z' fill='white' stroke='black' stroke-width='1.2' stroke-linejoin='round'/%3E%3C/svg%3E");
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}
.cursor.show { opacity: 1; }
.demo__replay {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 12px; z-index: 25; display: inline-flex; align-items: center; gap: 0.4em;
  font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.1em; background: rgba(8,6,2,0.7); color: var(--muted);
  border: 1px solid var(--line-2); border-radius: 99px; padding: 0.4em 0.8em; cursor: pointer;
  opacity: 0; pointer-events: none; transition: opacity 0.4s, color 0.25s, border-color 0.25s; backdrop-filter: blur(6px);
}
.demo__replay.show { opacity: 1; pointer-events: auto; }
.demo__replay:hover { color: var(--ink); border-color: var(--teal); }

/* ---------- Entrance ---------- */
.hero__title, .hero__sub, .hero__actions, .hero__demo {
  opacity: 0; transform: translateY(1.1rem); animation: rise 0.95s var(--ease-expo) forwards;
}
.hero__title { animation-delay: 0.16s; }
.hero__sub { animation-delay: 0.40s; }
.hero__actions { animation-delay: 0.54s; }
.hero__demo { animation-delay: 0.34s; transform: translateY(1.6rem); }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

/* Hero CTA entrance — the two buttons clip-wipe in left-to-right, staggered */
@keyframes ha-wipe-in {
  from { opacity: 0; clip-path: inset(0 100% 0 0); filter: blur(3px); }
  60%  { opacity: 1; }
  to   { opacity: 1; clip-path: inset(0 0 0 0); filter: blur(0); }
}
.hero__actions.ha-wipe { opacity: 1; transform: none; animation: none; }
.hero__actions.ha-wipe .btn {
  opacity: 0; clip-path: inset(0 100% 0 0);
  animation: ha-wipe-in 720ms var(--ease-expo) both;
  animation-delay: calc(0.45s + var(--i, 0) * 0.12s);
}
.hero__actions.ha-wipe .btn:nth-child(1) { --i: 0; }
.hero__actions.ha-wipe .btn:nth-child(2) { --i: 1; }
@media (prefers-reduced-motion: reduce) {
  .hero__actions.ha-wipe .btn { animation: none; opacity: 1; clip-path: none; filter: none; }
}

/* ---------- The mesh experience (ported verbatim from HEXARA, themed teal) ---------- */
.mesh-experience { position: relative; z-index: var(--z-content); height: 1000vh; background: var(--black); }
.mesh-experience-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: var(--black); }   /* plain black — matches the section before it */
#meshCanvas3D { position: absolute; inset: 0; width: 100%; height: 100%; }
.mesh-experience-sticky::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 150px; background: linear-gradient(to bottom, var(--black), rgba(13,10,4,0)); z-index: 10; pointer-events: none; }
.mesh-experience-sticky::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 150px; background: linear-gradient(to top, var(--black), rgba(13,10,4,0)); z-index: 10; pointer-events: none; }
.mesh-loading { position: absolute; inset: 0; z-index: 30; background: var(--black); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.25rem; transition: opacity 0.8s ease; }
.mesh-loading.hidden { opacity: 0; pointer-events: none; }
.mesh-loading-spinner { width: 32px; height: 32px; border: 3px solid rgba(15,182,172,0.15); border-top-color: var(--teal); border-radius: 50%; animation: spin 0.7s linear infinite; }
.mesh-loading-text { font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }

/* ---- embedded process narrative (Send / Mesh / Export), middle-left ---- */
.mesh-steps {
  position: absolute; left: var(--pad-x); top: 50%; transform: translateY(-50%);
  width: min(38vw, 32ch); height: clamp(170px, 24vh, 240px); z-index: 20; pointer-events: none;
  opacity: 0; transition: opacity 0.5s ease;
}
.mesh-steps.visible { opacity: 1; }
.mstep {
  position: absolute; left: 0; right: 0; top: 50%;
  transform: translateY(-50%) translateY(16px); opacity: 0;
  transition: opacity 0.55s var(--ease-expo), transform 0.55s var(--ease-expo);
}
.mstep.active { opacity: 1; transform: translateY(-50%); }
.mstep__tag { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); }
.mstep__h {
  margin: 0.7rem 0 0; font-family: var(--font-display); font-weight: 400; letter-spacing: -0.01em;
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.6rem); line-height: 1.02; color: var(--ink);
}
.mstep__p { margin: 0.85rem 0 0; color: var(--muted); font-size: clamp(0.9rem, 0.86rem + 0.2vw, 1rem); line-height: 1.55; max-width: 30ch; }

/* ---- live mesh tally (nodes / elements), middle-right — counts up as the mesh forms ---- */
.mesh-tally {
  position: absolute; right: var(--pad-x); top: 50%; z-index: 20;
  transform: translateY(-50%) translateX(14px); text-align: right; pointer-events: none;
  display: flex; flex-direction: column; gap: clamp(1rem, 3vh, 1.9rem);
  opacity: 0; transition: opacity 0.55s ease, transform 0.6s var(--ease-expo);
}
.mesh-tally.visible { opacity: 1; transform: translateY(-50%) translateX(0); }
.mtally__row { display: flex; flex-direction: column; align-items: flex-end; gap: 0.5rem; }
.mtally__label {
  font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold);
}
.mtally__num {
  font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 500;
  font-size: clamp(1.6rem, 1rem + 1.9vw, 2.5rem); line-height: 0.95; letter-spacing: -0.01em; color: var(--ink);
}
.mtally__desc { font-family: var(--font-body); font-size: 0.8rem; line-height: 1.45; color: var(--muted); max-width: 24ch; }
@media (max-width: 880px) { .mesh-tally { display: none; } }

@media (max-width: 640px) {
  .mesh-steps {
    left: var(--pad-x); right: var(--pad-x); width: auto; top: auto;
    bottom: clamp(3.6rem, 12vh, 6rem); transform: none; height: clamp(88px, 15vh, 120px);
  }
  .mstep { top: auto; bottom: 0; transform: translateY(14px); }
  .mstep.active { transform: none; }
  .mstep__h { font-size: 1.3rem; margin-top: 0.5rem; }
  .mstep__p { display: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .hero { padding-top: calc(var(--nav-h) + 2rem); }
  .hero__grid { grid-template-columns: 1fr; gap: 2.5rem; width: 100%; max-width: 620px; }  /* 92vw bled past --pad-x on phones */
  .hero__sub { max-width: 52ch; }
}
@media (max-width: 560px) {
  /* the bare .nav__cta override lost font-size/padding-right to
     .nav__cta.cta-mono (0,2,0) — match its specificity so the CTA really
     shrinks, and give it a ~41px touch box. The Contact link hides: it
     duplicates the CTA's destination and the row overflows 360px with it. */
  .nav { gap: 0.75rem; }
  .nav__link { display: none; }
  .nav__cta.cta-mono { font-size: 0.64rem; padding: 1.4em 0.9em 1.4em 1em; }
  .hero__actions .btn { flex: 1 1 auto; justify-content: center; }
  .win__stage { height: clamp(340px, 46svh, 420px); }  /* svh: stable through the iOS URL-bar collapse */
  .cursor { display: none; }
  .demo__replay { min-height: 40px; padding: 0 1.1em; }
}

/* phones: the demo window is the hero's main visual, but its micro-type is
   desktop-scaled (8-11px) — lift it to a readable floor */
@media (max-width: 640px) {
  .tline { font-size: 0.72rem; }
  .tline--tool code { font-size: 0.72rem; }
  .tchip { font-size: 0.56rem; }
  .tnote, .sumtable th { font-size: 0.66rem; }
  .msg__who, .exp__sz { font-size: 0.62rem; }
  .sumtable td { font-size: 0.8rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .hero__title, .hero__sub, .hero__actions, .hero__demo { opacity: 1; transform: none; }
  .hero-art { will-change: auto; }
  .cursor { display: none; }
  .msg { opacity: 1; transform: none; }
}

/* ============================================================
   SITE SYSTEM — shared page chrome + scroll set-pieces.
   Used by the inner pages (technology / aerospace / company /
   contact) and the home teaser sections. Built to sit on the
   same obsidian/teal/gold language as the hero.
   ============================================================ */
:root {
  --black:      #060402;   /* warm amber-black canvas (mesh, sections, fades) */
}

/* inner-page background (no fluid canvas — a calm static field) */
.page-bg {
  position: fixed; inset: 0; z-index: var(--z-canvas); pointer-events: none;
  background:
    radial-gradient(115% 80% at 82% -12%, rgba(15,182,172,0.12), transparent 56%),
    radial-gradient(95% 70% at -5% 6%, rgba(255,186,0,0.07), transparent 52%),
    var(--bg);
}

/* home: opaque "studio" background for everything below the hero + mesh,
   so the marble hero image no longer bleeds down the whole page. A clean
   deep obsidian with the faintest teal/gold depth — distinct from the hero. */
.home-flow {
  position: relative; z-index: var(--z-content); isolation: isolate;
  background: var(--black);   /* brutalist: flat neutral black, no glows */
}

/* Lenis smooth-scroll plumbing */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* ============================================================
   INTERLUDE — a full-page, brutalist statement that bridges the
   hero into the mesh scroll. Flat black, one accent, restrained.
   The line fades + drifts on scroll ([data-parallax-fade], pages.js).
   ============================================================ */
.interlude {
  position: relative; z-index: var(--z-content);
  min-height: 68vh; display: grid; place-items: center;
  padding: clamp(2rem, 5vh, 4rem) var(--pad-x);
  background: var(--black);
}
/* interlude statement — instrument-readout typeset: display setup + mono answer line */
.il2 { max-width: min(92vw, 52rem); margin: 0 auto; text-align: center; text-wrap: balance; will-change: opacity, transform; }
.il2__pre { display: block; font-family: var(--font-display); font-weight: 300; line-height: 1.04; letter-spacing: 0; color: var(--ink); font-size: clamp(1.8rem, calc(1.4rem + 2.6vw), 3.4rem); }
.il2__pre b { font-weight: 500; color: var(--gold-soft); }
.il2__punch { display: block; margin-top: 1.05em; font-family: var(--font-mono); font-weight: 500; text-transform: uppercase; letter-spacing: 0.14em; color: var(--gold); font-size: clamp(0.85rem, calc(0.72rem + 0.6vw), 1.05rem); }

/* ---- Our ambition: ghosted scrolling list of the simulation frontier ---- */
.amb { position: relative; z-index: var(--z-content); height: 900vh; background: var(--green); }
.amb__stage { position: fixed; top: 0; left: 0; right: 0; height: 100vh; height: 100svh; overflow: hidden; z-index: 2; pointer-events: none;
  /* JS clips this to the slice of on-screen black, so the rising black edge "uncovers" the fixed content */
  clip-path: inset(100% 0 0 0);
  /* soft top/bottom edge fade for the scrolling list (no colour band) */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22%, #000 78%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 22%, #000 78%, transparent 100%); }

/* the giant ghosted list */
.amb__list {
  --amb-pad: clamp(1.25rem, 24vw, 22rem);
  position: absolute; left: 0; right: 0; top: 0; margin: 0;
  padding: 0 var(--pad-x) 0 var(--amb-pad);
  list-style: none; z-index: 2; will-change: transform;
  transform-origin: var(--amb-pad) 0;   /* fills from the top; scroll carries it up through the centre line */
}
.amb__item {
  font-family: var(--font-body); font-weight: 600; letter-spacing: -0.02em; line-height: 1.14;
  font-size: clamp(2rem, 1.3rem + 3.6vw, 4.8rem); white-space: nowrap;
  color: rgba(236, 234, 227, 0.13);
}

/* the fixed centre line + framing */
.amb__line { position: absolute; left: 0; right: 0; top: 50vh; height: 1px; background: rgba(236, 234, 227, 0.2); z-index: 5; }
.amb__label { position: absolute; left: var(--pad-x); bottom: 0.7rem; max-width: 18ch; }
.amb__label-t { display: block; font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; font-size: clamp(1.8rem, 1.2rem + 2.1vw, 3rem); line-height: 1.04; color: var(--ink); }
.amb__ambition { position: absolute; right: var(--pad-x); top: 1.1rem; max-width: 36ch; }
.amb__eyebrow { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }
.amb__copy { margin: 0.7rem 0 0; color: var(--muted); font-size: 0.92rem; line-height: 1.6; }

@media (max-width: 760px) {
  .amb__list { --amb-pad: var(--pad-x); }
  /* phones: the ambition copy goes full-width, tucked right below the centre
     line (it is a child of .amb__line, so top is measured from the line) —
     label above the line, copy below it, one tight stack */
  .amb__ambition { right: var(--pad-x); left: var(--pad-x); top: 1.2rem; max-width: 34ch; }
  .amb__label { right: var(--pad-x); }
}

.nav__end { display: flex; align-items: center; gap: 0.75rem; }
.h2 { font-family: var(--font-display); font-weight: 300; font-size: clamp(2rem, 1.3rem + 2.4vw, 3.6rem); line-height: 1.04; letter-spacing: 0; margin: 1rem 0 0; text-wrap: balance; }
.h2 em { font-style: normal; color: var(--gold); }
/* ============================================================
   ORBITAL PROCESS RING — pinned section; a marker travels the
   ring as you scroll, the left copy + bottom tabs track phase.
   ============================================================ */
/* no overflow clipping here at any width where .ring-sticky is sticky — an
   overflow-clip ancestor drops the sticky off the scrolling thread and it
   judders on touch. The oversized dial art only needs clipping in the
   761-1100px band, and that is exactly the band where .ring-sticky is
   position: static (see the 1100px block), so the two never overlap. */
.ring-sec { position: relative; height: 360vh; z-index: var(--z-content); }
@media (min-width: 761px) and (max-width: 1100px) { .ring-sec { overflow-x: clip; } }
.ring-sticky { position: sticky; top: 0; min-height: 100vh; display: flex; align-items: center; padding: var(--nav-h) var(--pad-x) clamp(4rem,8vh,6rem); }
/* streamline backdrop: static artwork with the site background color baked
   into everything except the smoke, painted plainly — no blend modes, no
   ramps. Stretched to the box so the baked edges land exactly on the
   section edges; every seam is the same #0d0d0c meeting itself. */
.ring-sticky::before { content: ""; position: absolute; inset: 0; z-index: 0;
  background: url("assets/ring-bg5.png") center / 100% 100% no-repeat; }
.ring-grid { position: relative; z-index: 1; width: min(100%, 1280px); margin-inline: auto; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }

.ring-copy { max-width: 30ch; }
.ring-lede { margin: 1.25rem 0 0; color: var(--muted); line-height: 1.6; font-size: clamp(1rem, 0.95rem + 0.3vw, 1.12rem); }
.ring-stage { position: relative; display: grid; place-items: center; }
.ring-dial { position: relative; width: min(100%, 360px); margin-inline: auto; }
.ring-svg { display: block; width: 100%; height: auto; overflow: visible; }

/* four labels around the dial — exactly two type sizes: a title and a description */
.ring-label { position: absolute; display: flex; flex-direction: column; gap: 0.35rem; width: 11rem; opacity: 0.4; transition: opacity 0.45s var(--ease-expo); pointer-events: none; }
.ring-label.active { opacity: 1; }
.ring-label__t { font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; line-height: 1.05; color: var(--ink); }
.ring-label.active .ring-label__t { color: var(--gold); }
.ring-label__d { font-size: 0.9rem; line-height: 1.5; color: var(--muted); }
.ring-label--top    { left: 50%; bottom: 100%; transform: translateX(-50%); margin-bottom: 0.6rem; align-items: center; text-align: center; }
.ring-label--bottom { left: 50%; top: 100%; transform: translateX(-50%); margin-top: 0.6rem; align-items: center; text-align: center; }
.ring-label--right  { left: 100%; top: 50%; transform: translateY(-50%); margin-left: 0.6rem; align-items: flex-start; text-align: left; }
.ring-label--left   { right: 100%; top: 50%; transform: translateY(-50%); margin-right: 0.6rem; align-items: flex-end; text-align: right; }
.ring-track { fill: none; stroke: var(--line-2); stroke-width: 1; }
.ring-prog { fill: none; stroke: var(--teal-deep); stroke-width: 2; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(10,139,132,0.55)); transition: stroke-dashoffset 0.3s linear; }
.ring-node { fill: var(--bg); stroke: var(--line-2); stroke-width: 1.5; transition: stroke 0.4s, fill 0.4s; }
.ring-node.active { stroke: var(--teal); fill: rgba(15,182,172,0.15); }
.ring-marker { fill: var(--gold); filter: drop-shadow(0 0 8px rgba(255,186,0,0.8)); }

/* Rehaan's phase console: demo-mesh log under the copy, phases light up
   in step with the dial */
.ring-console { margin-top: 2.2rem; max-width: 21rem; border-top: 3px solid #2a2319; border-bottom: 3px solid #2a2319;
  padding: 1rem 0 0.95rem; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; }
.ring-console__head { margin: 0 0 0.8rem; color: var(--faint); }
.ring-log { display: flex; flex-direction: column; gap: 0.5rem; }
.ring-log__ln { margin: 0; display: flex; gap: 1em; color: var(--muted); }
.ring-log__ln .idx { color: var(--faint); }
.ring-log__ln.on .nm { color: var(--ink); }
.ring-log__ln.on .idx { color: var(--gold); }
.ring-console__strip { margin: 0.9rem 0 0; display: flex; gap: 1.8rem; }
.ring-console__strip .k { color: var(--faint); }
.ring-console__strip .v { color: var(--ink); }
@media (max-width: 900px) { .ring-console { display: none; } }
.footer { position: relative; z-index: var(--z-content); padding: clamp(2.5rem, 5vh, 4rem) var(--pad-x) clamp(2.5rem, 5vh, 4rem); background: var(--black); overflow: hidden; }
/* ===== footer (home): full-page closing — pitch + access + nav, on the amber-black canvas ===== */
.footer--end {
  min-height: 100vh; min-height: 100svh; background: var(--bg); color: var(--ink);
  display: flex; flex-direction: column; overflow: hidden;
  padding: clamp(2.5rem, 6vh, 5rem) var(--pad-x);
  font-family: var(--font-mono);
}
.fend__lead { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: clamp(1.6rem, 4vh, 2.6rem); }
.fend__h {
  font-family: var(--font-display); font-weight: 300; letter-spacing: 0; line-height: 1.05;
  font-size: clamp(2.1rem, 1.1rem + 4vw, 4.6rem); color: var(--ink); margin: 0;
  max-width: 18ch; text-wrap: balance;
}
.fend__h em { color: var(--gold); font-style: normal; }
.fend__capture {
  display: flex; align-items: center; gap: 0.5rem; width: min(100%, 540px);
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line-2); border-radius: 14px;
  padding: 0.45rem 0.45rem 0.45rem 1.15rem;
}
.fend__email { flex: 1; min-width: 0; background: transparent; border: none; outline: none; font-family: var(--font-mono); font-size: 1rem; color: var(--ink); }  /* ≥16px: no iOS zoom-on-focus */
.fend__email::placeholder { color: var(--faint); }
.fend__submit {
  flex: none; display: inline-flex; align-items: center; gap: 0.5em; cursor: pointer; white-space: nowrap;
  background: var(--gold); color: var(--gold-ink); border: none; border-radius: 10px;
  padding: 0.8em 1.15em; font-family: var(--font-mono); font-weight: 600; font-size: 0.72rem;
  letter-spacing: 0.1em; text-transform: uppercase; transition: background 0.25s var(--ease-expo), transform 0.25s var(--ease-expo);
}
.fend__submit:hover { background: var(--gold-soft); transform: translateY(-1px); }
.fend__note { min-height: 1.1em; margin: 0; font-size: 0.78rem; letter-spacing: 0.02em; color: var(--muted); }
.fend__note[data-state="ok"] { color: var(--teal); }
.fend__note[data-state="err"] { color: var(--crimson); }

.fend__foot { width: min(100%, 1280px); margin-inline: auto; display: flex; flex-direction: column; gap: clamp(1.8rem, 4vh, 2.6rem); }
.fend__nav { display: flex; flex-wrap: wrap; gap: clamp(1.6rem, 5vw, 4.5rem); }
.fend__col { display: flex; flex-direction: column; gap: 0.5rem; min-width: 8rem; }
.fend__col-h { font-size: 0.64rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--faint); margin-bottom: 0.35rem; }
.fend__col a { font-size: 0.85rem; color: var(--muted); transition: color 0.2s; }
.fend__col a:hover { color: var(--gold); }
.fend__bar {
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center;
  padding-top: 1.4rem; border-top: 1px solid var(--line);
  font-size: 0.7rem; letter-spacing: 0.08em; color: var(--faint);
}
.fend__legal { display: flex; gap: 1.6rem; }
.fend__legal a { color: var(--faint); transition: color 0.2s; }
.fend__legal a:hover { color: var(--ink); }
@media (max-width: 640px) {
  .fend__capture { flex-wrap: wrap; padding: 0.6rem; }
  .fend__email { flex-basis: 100%; padding: 0.3rem 0.5rem 0.6rem; }
  .fend__submit { width: 100%; justify-content: center; padding: 1em 1.15em; }
  /* touch: vertical padding on the inline links grows the hit box to ~40px
     without moving the line boxes */
  .fend__col a { padding: 0.5em 0; }
  .fend__legal a { padding: 0.6em 0.2em; }
}

/* ---- responsive for the site system ---- */
@media (max-width: 1000px) {
  .ring-grid { grid-template-columns: 1fr; }
  .ring-sec { height: auto; }
  .ring-sticky { position: static; min-height: auto; }
  .ring-stage { margin-top: 2.5rem; }
  .ring-dial { width: min(100%, 300px); }
  /* no room to orbit on narrow screens: the four phases drop below the ring as a stacked legend */
  .ring-label { position: static; transform: none; width: 100%; opacity: 1; margin: 1.25rem 0 0; text-align: left; align-items: flex-start; }
  .ring-label__t { font-size: 1.2rem; }
  .ring-label__d { font-size: 0.88rem; }
}

/* the process ring sits on the warm canvas on the home page (covers the fixed hero
   art); taller than the inner-page default so the wheel loop scrubs slower */
.home-flow .ring-sec { background: var(--bg); height: 600vh; }

/* dial detailing on the home ring: minor/major ticks, motion arrows, live centre word */
.ring-tick { stroke-linecap: round; transition: stroke 0.35s, opacity 0.35s; }
.ring-tick--min { stroke: var(--teal); stroke-width: 1.4; opacity: 0.45; }
.ring-tick--maj { stroke: var(--gold); stroke-width: 2; opacity: 0.85; }
.ring-arrow { fill: none; stroke: var(--faint); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; opacity: 0.55; }
.ring-center-word { font-family: var(--font-mono); font-weight: 500; font-size: 21px; letter-spacing: 0.24em; fill: var(--ink); text-transform: uppercase; }
.ring-center-count { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.28em; fill: var(--gold); }

/* mid-width screens: the orbit labels hang outside the dial and clip the
   viewport edge below ~1460px — scale the dial + labels with the viewport */
@media (max-width: 1460px) and (min-width: 1101px) {
  .ring-label { width: clamp(7.5rem, 8vw + 2rem, 11rem); }
  .ring-label__t { font-size: clamp(1.2rem, 1vw + 0.55rem, 1.5rem); }
  .ring-dial { width: min(100%, clamp(290px, 24vw, 360px)); }
}
/* no horizontal room to orbit below ~1100px: the four phases stack below
   the ring (same treatment the 900px block gives phones). Placed after the
   .home-flow height override so `height: auto` wins on the home page too —
   without it the home ring keeps its 600vh scrub runway while unpinned and
   phones scroll through five screens of black. */
@media (max-width: 1100px) {
  .ring-grid { grid-template-columns: 1fr; }
  .ring-sec, .home-flow .ring-sec { height: auto; }
  .ring-sticky { position: static; min-height: auto; }
  /* the backdrop art is baked for a pinned 100vh box; stretched over the
     tall stacked section it smears ~5:1. Move it behind the dial instead:
     natural 1.7917 aspect, oversized, centred on the wheel, sides run out
     off-screen, painted under the text (negative z). */
  .ring-sticky::before { content: none; }
  .ring-stage { position: relative; }
  .ring-stage::before { content: ""; position: absolute; z-index: -1;
    left: 50%; top: 150px; transform: translate(-50%, -50%);
    width: min(170vw, 720px); height: calc(min(170vw, 720px) / 1.7917);
    background: url("assets/ring-bg5.png") center / 100% 100% no-repeat;
    pointer-events: none; }
  .ring-stage { margin-top: 2.5rem; }
  .ring-dial { width: min(100%, 300px); }
  .ring-label { position: static; transform: none; width: 100%; opacity: 1; margin: 1.25rem 0 0; text-align: left; align-items: flex-start; }
  .ring-label__t { font-size: 1.2rem; }
  .ring-label__d { font-size: 0.88rem; }
}
/* phones: pin the loop again on a shorter runway — the dot orbits over ~2
   screens of scroll and the four labels collapse into ONE crossfading
   description box under the dial (same grid cell, .active fades in) that
   updates at each checkpoint. 761-1100px keeps the static stacked list. */
@media (max-width: 760px) {
  /* the marker's speed is set by this height alone (the scrub normalises by
     offsetHeight), so a taller runway = a slower orbit */
  .ring-sec, .home-flow .ring-sec { height: 460vh; }
  .ring-sticky { position: sticky; top: 0; min-height: auto; height: 100vh; height: 100svh;
    align-items: flex-start; padding: calc(var(--nav-h) + 0.75rem) var(--pad-x) 1.25rem; overflow: hidden; }
  .ring-stage { margin-top: 1.25rem; }
  .ring-dial { width: min(100%, 300px, 38svh); display: grid; }
  .ring-svg { grid-column: 1; grid-row: 1; }
  .ring-label { grid-column: 1; grid-row: 2; width: 100%; min-height: 6.5rem; opacity: 0; margin: 0.75rem 0 0;
    text-align: center; align-items: center; transition: opacity 0.45s var(--ease-expo); }
  .ring-label.active { opacity: 1; }
}
/* short viewports: shrink the dial + label type so the top/bottom phase
   labels clear the nav and the viewport bottom while the section is pinned */
@media (max-height: 720px) and (min-width: 1101px) {
  .ring-dial { width: min(100%, 296px); }
  .ring-label__t { font-size: 1.25rem; }
  .ring-label__d { font-size: 0.82rem; }
}

/* ============================================================
   INDUSTRIES — four workbenches. One full-viewport sticky stage;
   each phase dresses it as that discipline's software viewport.
   Text lives inside the environment; scroll crossfades phases.
   ============================================================ */
/* section header (canonical rules from 2cd5596 — do not let a splice eat
   these again; the header renders unstyled without them) */
/* The oversized smoke plate used to be held in by `overflow-x: clip` on
   .indx. That is CORRECT about layout — clip creates no scroll container, so
   .spec__sticky did keep pinning — but it is wrong about compositing, and
   that cost us: an overflow-clip ANCESTOR makes WebKit position the sticky
   stage on the main thread instead of the scrolling thread, which judders
   badly on iOS. The plate is now clipped on .indx::before itself. */
/* NO overflow clipping here: .spec__sticky is a sticky descendant at every
   width, and an overflow-clip ancestor forces WebKit to position it on the
   main thread instead of the scrolling thread — which on iOS makes the whole
   pinned stage judder against the page. The oversized header smoke that this
   used to clip is now clipped on .indx::before itself (see the 640px block);
   a pseudo-element has no descendants, so it can never be a sticky ancestor.
   Do NOT "fix" this with overflow:hidden or contain:paint — hidden would make
   this section the sticky's scroll container and the pin would stop working. */
.indx { position: relative; z-index: var(--z-content); background: var(--bg); padding: clamp(7rem, 16vh, 11rem) var(--pad-x) 0; }
.indx__head { width: min(100%, 1280px); margin-inline: auto; max-width: 42ch; margin-bottom: clamp(10rem, 22vh, 17rem); }
.indx__eyebrow { font-family: var(--font-mono); font-weight: 500; font-size: 0.7rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); }
.indx__title { margin: 1rem 0 0; font-family: var(--font-display); font-weight: 500; font-size: clamp(2rem, 1.4rem + 2.6vw, 3.4rem); line-height: 1.02; color: var(--ink); text-wrap: balance; }
.indx__title em { font-style: normal; color: var(--gold); }
.indx__lede { margin: 1.1rem 0 0; color: var(--muted); font-size: clamp(1rem, 0.95rem + 0.3vw, 1.1rem); line-height: 1.6; text-wrap: pretty; }

/* smoke behind the section header: the FULL generated frame at its natural
   aspect — the smoke's fade-out lives inside the artwork with ~25% runout
   on every side, so there is no box edge anywhere near visible pixels.
   Never cropped, never distorted. Text sits above. */
.indx::before { content: ""; position: absolute; left: 0; right: 0;
  /* top dead space is cropped out of the artwork itself, so the plate
     starts exactly at the section boundary — zero overhang above it,
     nothing can ever cover the loop section's exit. Bloom (~38% of the
     cropped frame) lands behind the heading. */
  top: 0;
  height: calc(100vw / 2.3683);
  background: url("assets/header-smoke3.png") center / 100% 100% no-repeat;
  pointer-events: none; }
.indx__head { position: relative; z-index: 1; }
/* phones: the smoke plate is only ~150-180px tall (height tracks vw), so the
   desktop 16vh top pad pushes the heading below the bloom and 22vh leaves a
   dead black gap — tighten both so the art lands behind the heading again */
@media (max-width: 640px) {
  .indx { padding: clamp(3.5rem, 9vh, 5.5rem) var(--pad-x) 0; }
  .indx__head { margin-bottom: clamp(6rem, 14vh, 9rem); }
  /* at 100vw the natural-aspect plate is only ~150px tall and the smoke dies
     above the heading — oversize it (aspect intact, sides run out off-screen)
     and centre its bloom on the title + lede so the burst sits dead behind
     "gets hard." / "One meshing core" (plate half-height = 40.11vw) */
  /* clip-path replaces the section-level overflow-x: clip that used to hold
     this plate in. The box spans -45vw..145vw, so trimming (190vw-100vw)/2
     = 45vw off each side leaves exactly 0..100vw — the same visible pixels,
     with no clipping ancestor above the sticky stage. */
  .indx::before { left: 50%; right: auto; width: 190vw; margin-left: -95vw; height: calc(190vw / 2.3683);
    top: max(0px, calc(clamp(3.5rem, 9vh, 5.5rem) + 145px - 40.11vw));
    clip-path: inset(0 calc((100% - 100vw) / 2)); }
}

/* tall scroll runway: ~215vh of scrolling per industry before the
   crossfade to the next — the scrub p normalizes, so only this number
   sets the pacing */
.spec { position: relative; height: 960vh; margin-inline: calc(var(--pad-x) * -1); }
/* no opaque background: the section behind is the same flat color, and an
   opaque plate here slices the header smoke mid-wisp at the stage's top
   edge — transparent lets the smoke finish its own fade into the stage */
.spec__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }  /* svh: no iOS URL-bar jump */
.spec-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.spec-rail { position: absolute; top: calc(var(--nav-h) + 0.75rem); right: var(--pad-x); z-index: 3;
  display: flex; gap: 1.5rem; }
.spec-rail button { all: unset; cursor: pointer; font-family: var(--font-mono); font-size: 0.68rem;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); }
.spec-rail button:hover { color: var(--muted); }
.spec-rail button.active { color: var(--ink); }
.spec-rail button:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

/* biomedical cross-section frames: real interior slices of the artery
   volume, lumen in red with the wall ring, framed like a hemodynamics
   report next to the surface mesh */
/* bio + auto envs: the full-width panel row owns the lower half, so the
   copy rides higher than the other benches to stay clear of it */
.spec-env--bio .spec-env__text,
.spec-env--auto .spec-env__text { top: 31%; }

/* gaming env: copy on the RIGHT (the scene assembly sits left) */
.spec-env--game .spec-env__text { left: auto; right: var(--pad-x); text-align: right; }
.spec-env--game .spec-env__list li { border-bottom-color: var(--line); }
@media (max-width: 760px) { .spec-env--game .spec-env__text { right: auto; left: var(--pad-x); text-align: left; } }

/* aerospace env: copy in the BOTTOM-RIGHT (two-view diagram fills the rest) */
.spec-env--aero .spec-env__text { left: auto; right: var(--pad-x); text-align: right;
  top: auto; bottom: 7vh; transform: none; }
/* bottom: matches the phone value on .spec-env__text — the desktop rule
   above is (0,2,0), so without restating it here aero alone kept 7vh */
@media (max-width: 760px) { .spec-env--aero .spec-env__text { right: auto; left: var(--pad-x); text-align: left; bottom: 3vh; } }

.xsec { position: absolute; left: var(--pad-x); right: var(--pad-x); bottom: 4vh; z-index: 3;
  display: flex; gap: 1rem; align-items: flex-end; }
.xsec--nocap { bottom: 7vh; }
.xsec__panel { margin: 0; flex: 1; min-width: 0; }
.xsec__panel img { display: block; width: 100%; height: auto;
  border: 1px solid var(--line-2); background: var(--black); }
.xsec__panel figcaption { margin-top: 0.5rem; font-family: var(--font-mono); font-size: 0.6rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
@media (max-width: 900px) { .xsec { display: none; } }

/* the panels are width-driven (height ≈ width/2.15) while the copy rides at
   a %-of-height, so on wide-but-short viewports they climb into the copy.
   Tiered height caps, centered row; each cap is a no-op whenever it exceeds
   the natural half-row width (50% - half the 1rem gap), so tall screens are
   pixel-identical to the uncapped layout. */
.xsec { justify-content: center; }
.xsec__panel { flex: 0 1 auto; width: min(calc(50% - 0.5rem), calc(45vh * 2.1)); }
@media (max-height: 930px) and (min-width: 761px) {
  .xsec__panel { width: min(calc(50% - 0.5rem), calc(40vh * 2.1)); }
}
/* small laptops (1366x768-class): tightest cap, and pin the copy just below
   the nav — at 31%-with-translate its mode line rides under the nav here.
   Guarded ≥761px: mobile hides .xsec and moves the copy to the bottom. */
@media (max-height: 860px) and (min-width: 761px) {
  .xsec__panel { width: min(calc(50% - 0.5rem), calc(30vh * 2.1)); }
  .spec-env--bio .spec-env__text,
  .spec-env--auto .spec-env__text { top: calc(var(--nav-h) + 1.5rem); transform: none; }
}
@media (max-height: 740px) and (min-width: 761px) {
  .spec-env--bio .spec-env__p,
  .spec-env--auto .spec-env__p { display: none; }
}

/* one environment per industry; the active one owns the stage */
.spec-env { position: absolute; inset: 0; z-index: 2; opacity: 0; pointer-events: none;
  transition: opacity 0.55s var(--ease-expo); }
.spec-env.is-active { opacity: 1; pointer-events: auto; }

.spec-env__text { position: absolute; left: var(--pad-x); top: 50%; transform: translateY(-50%);
  max-width: 23rem; }
.spec-env__mode { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--faint); }
.spec-env__name { margin: 0.55rem 0 0; font-family: var(--font-body); font-weight: 700;
  letter-spacing: -0.01em; font-size: clamp(1.8rem, 1.3rem + 1.8vw, 2.6rem); color: var(--ink); }
.spec-env__list { list-style: none; margin: 1.5rem 0 0; padding: 0; }
.spec-env__list li { padding: 0.55rem 0; border-bottom: 1px solid var(--line); color: var(--muted);
  font-size: clamp(0.88rem, 0.85rem + 0.15vw, 0.95rem); }
.spec-env__p { margin: 1.15rem 0 0; color: var(--muted); font-size: 0.9rem; line-height: 1.6;
  max-width: 40ch; text-wrap: pretty; }

@media (max-width: 760px) {
  /* sit the copy nearer the bottom edge: 7vh left a dead band under the
     last list row, and the reclaimed space widens the gap between the
     rail and the render above */
  .spec-env__text { top: auto; bottom: 3vh; transform: none; max-width: min(85vw, 21rem); }
  /* bio/auto keep their (0,2,0) desktop top:31% unless matched here — on
     phones .xsec is hidden, so they bottom-anchor like the other envs */
  .spec-env--bio .spec-env__text,
  .spec-env--auto .spec-env__text { top: auto; }
  .spec-env__p { display: none; }
  /* tuck the switcher up under the nav so it reads as chrome, not as a
     label attached to the render — the models park lower via mcy in pages.js */
  .spec-rail { gap: 1rem; top: calc(var(--nav-h) + 0.25rem); }
  /* phone scroll pacing: desktop runways read as scroll traps on a thumb —
     the scrub JS normalises p by offsetHeight, so height alone sets pacing */
  .spec { height: 560vh; }
  .mesh-experience { height: 550vh; }
  .amb { height: 450vh; }
  /* the report panels come back on phones as a compact two-up row tucked
     between the render and the copy (the render parks higher on these two
     phases via the portrait fit in pages.js). Stays hidden 761-900px. */
  .xsec, .xsec--nocap { display: flex; bottom: calc(3vh + 250px); gap: 0.6rem; }
  .xsec__panel figcaption { display: none; }
  /* touch: the rail buttons are the only industry switcher on phones —
     grow the hit area to 44px without moving the text baseline */
  .spec-rail button { min-height: 44px; padding: 0 0.35em; display: inline-flex; align-items: center; font-size: 0.72rem; }
}
@media (prefers-reduced-motion: reduce) { .spec-env, .spec__sticky { transition: none; } }

/* static fallback (reduced motion / no canvas): unpin, stack all four */
.spec--static { height: auto; }
.spec--static .spec__sticky { position: static; height: auto; }
.spec--static .spec-canvas { position: static; width: 100%; height: 46vh; }
.spec--static .spec-rail { display: none; }
.spec--static .spec-env { position: static; opacity: 1; pointer-events: auto; padding: 2.2rem var(--pad-x); }
.spec--static .spec-env__text { position: static; transform: none; }
/* reduced-motion phones get no scrub — keep the only descriptive copy */
.spec--static .spec-env__p { display: block; }
/* static mode unpins the stage, so the absolutely-anchored panel row has
   nothing to anchor to — hide it there */
.spec--static .xsec { display: none; }

html.wl-lock, html.wl-lock body { overflow: hidden; }

.wl-overlay {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center; place-items: safe center; padding: var(--pad-x);
  /* scrollable: gives iOS somewhere to bring the submit above the keyboard */
  overflow-y: auto; overscroll-behavior: contain;
  background: rgba(4, 3, 1, 0.6);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  opacity: 0; transition: opacity 0.24s var(--ease-expo);
}
.wl-overlay.is-open { opacity: 1; }
.wl-overlay[hidden] { display: none; }

.wl-panel {
  position: relative; width: min(100%, 26rem);  /* 100% honours the overlay's --pad-x gutter */
  background:
    linear-gradient(rgba(238, 235, 225, 0.022) 1px, transparent 1px) 0 0 / 100% 28px,
    var(--bg-2);
  border: 1px solid var(--line-2); border-radius: 10px;
  padding: 2.2rem 2rem 1.9rem; box-shadow: 0 40px 90px rgba(0, 0, 0, 0.65);
  transform: translateY(14px); transition: transform 0.3s var(--ease-expo);
}
.wl-overlay.is-open .wl-panel { transform: none; }

/* corner registration marks — the CAD-viewport frame */
.wl-corner { position: absolute; width: 13px; height: 13px; border: 0 solid rgba(15, 182, 172, 0.55); transition: transform 0.45s var(--ease-expo) 0.05s; }
.wl-corner--tl { top: 8px; left: 8px; border-top-width: 1px; border-left-width: 1px; transform: translate(4px, 4px); }
.wl-corner--tr { top: 8px; right: 8px; border-top-width: 1px; border-right-width: 1px; transform: translate(-4px, 4px); }
.wl-corner--bl { bottom: 8px; left: 8px; border-bottom-width: 1px; border-left-width: 1px; transform: translate(4px, -4px); }
.wl-corner--br { bottom: 8px; right: 8px; border-bottom-width: 1px; border-right-width: 1px; transform: translate(-4px, -4px); }
.wl-overlay.is-open .wl-corner { transform: none; }

.wl-close {
  position: absolute; top: 0.4rem; right: 0.5rem; z-index: 1;
  background: none; border: none; cursor: pointer;
  font-size: 1.35rem; line-height: 1; color: var(--faint);
  width: 2.75rem; height: 2.75rem; padding: 0; display: grid; place-items: center;  /* 44px touch box, same glyph */
}
.wl-close:hover { color: var(--ink); }

.wl-title { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 1.9rem; line-height: 1.05; color: var(--ink); text-wrap: balance; }
.wl-title em { font-style: normal; color: var(--gold); }
.wl-sub { margin: 0.6rem 0 1.8rem; font-size: 0.88rem; line-height: 1.6; color: var(--muted); text-wrap: pretty; }

/* ruled fields — instrument form lines, not boxes */
.wl-label { display: block; margin: 0 0 0.1rem; font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
.wl-input {
  display: block; width: 100%; margin-bottom: 1.35rem;
  background: transparent; border: none; border-bottom: 1px solid var(--line-2); border-radius: 0;
  padding: 0.5em 0; font-family: var(--font-body); font-size: 1rem; color: var(--ink);
  caret-color: var(--teal); transition: border-color 0.2s ease;
}
.wl-input::placeholder { color: var(--faint); }
.wl-input:focus { outline: none; border-bottom-color: var(--teal); }
.wl-label:has(+ .wl-input:focus) { color: var(--teal); }
.wl-input:disabled { opacity: 0.45; }

.wl-submit {
  display: block; width: 100%; margin-top: 0.4rem;
  background: var(--gold); color: var(--gold-ink); border: none; border-radius: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 0.95rem;
  padding: 0.85em; cursor: pointer; transition: background 0.2s ease, box-shadow 0.2s ease;
}
.wl-submit:hover { background: var(--gold-soft); box-shadow: 0 10px 40px rgba(221, 171, 70, 0.28); }
.wl-submit:disabled { opacity: 0.6; cursor: default; box-shadow: none; }

.wl-note { margin: 0.85rem 0 0; min-height: 1.2em; font-family: var(--font-mono); font-size: 0.78rem; line-height: 1.5; }
.wl-note[data-state="ok"] { color: var(--teal); }
.wl-note[data-state="err"] { color: var(--crimson-soft); }

@media (max-width: 480px) {
  .wl-panel { padding: 1.25rem 1.4rem 1.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  .wl-overlay, .wl-panel, .wl-corner { transition: none; }
}
