/* ==========================================================================
   HYVAX immersive 3D site
   Original HYVAX hero (brand green), then a black void with white type and the brand green as the accent.
   Bebas Neue / DM Sans / Space Mono
   ========================================================================== */

:root {
  --accent: #9dc220;
  --accent-dim: rgba(157, 194, 32, 0.55);
  --accent-ghost: rgba(157, 194, 32, 0.12);
  --white: #f2f7f6;
  --white-dim: rgba(242, 247, 246, 0.72);
  --white-faint: rgba(242, 247, 246, 0.42);
  --line: rgba(242, 247, 246, 0.12);
  --black: #000;
  --panel: rgba(0, 0, 0, 0.62);
  --danger: #ff5c6c;

  /* Original hero and loader */
  --ink: #000;
  --green: #8aa91e;
  --green-bright: #9dc220;
  --aqua: #6fd0d8;
  --bone: #f5f5f0;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.77, 0, 0.18, 1);

  --font-display: 'Bebas Neue', 'Impact', sans-serif;
  --font-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Space Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --gutter: clamp(16px, 5vw, 80px);
  --nav-h: 72px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: clip; /* clip, not hidden: hidden would break the sticky hero */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, textarea { font: inherit; color: inherit; }
em { font-style: normal; color: var(--accent); }
::selection { background: var(--accent); color: #000; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.mono { font-family: var(--font-mono); }

/* ---------- lenis ---------- */
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; }
body.is-locked { overflow: hidden; }

/* ---------- fixed layers ---------- */
.gl {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100lvh;
  z-index: 0;
  display: block;
  pointer-events: none;
}
.vignette {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 45%, transparent 45%, rgba(0, 0, 0, 0.55) 100%),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.35), transparent 18%, transparent 82%, rgba(0, 0, 0, 0.45));
}
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.05;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.5) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}
.no-webgl .gl { display: none; }
.no-webgl body {
  background:
    radial-gradient(circle at 70% 30%, rgba(157, 194, 32, 0.08), transparent 45%),
    radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.04), transparent 40%), #000;
  background-attachment: fixed;
}

/* ---------- cursor (fine pointers only) ---------- */
.cursor { display: none; }
.has-cursor, .has-cursor * { cursor: none !important; }
.has-cursor .cursor { display: block; position: fixed; inset: 0; pointer-events: none; z-index: 300; mix-blend-mode: difference; }
.cursor__dot, .cursor__ring { position: fixed; top: 0; left: 0; border-radius: 50%; will-change: transform; }
.cursor__dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--accent); }
.cursor__ring {
  width: 38px; height: 38px; margin: -19px 0 0 -19px;
  border: 1px solid var(--accent); opacity: 0.7;
  transition: width 0.3s var(--ease-out), height 0.3s var(--ease-out), margin 0.3s var(--ease-out), opacity 0.3s;
}
.cursor.is-hover .cursor__ring { width: 64px; height: 64px; margin: -32px 0 0 -32px; opacity: 1; }

/* ---------- loader + page transition (original HYVAX design) ---------- */
/* Loader: the HYVAX mark draws itself in white and green on black, exactly where the hero logo
   will appear, then the loader fades and the logo intro takes over in the same spot. */
#loader {
  --p: 0;
  position: fixed; inset: 0; z-index: 9998;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding-bottom: max(48px, 9vh);
  background: var(--ink);
  transition: opacity 0.9s ease, visibility 0.9s ease;
}
#loader.hidden { opacity: 0; visibility: hidden; }
.loader__glyph {
  position: absolute; left: var(--gx, 50%); top: var(--gy, 42%);
  height: var(--gh, 34vh); width: auto; aspect-ratio: var(--ga, 0.9);
  transform: translate(-50%, -50%);
  overflow: visible;
  filter: drop-shadow(0 0 22px rgba(157, 194, 32, calc(var(--p) * 0.35)));
}
.loader__glyph path {
  fill: rgba(242, 247, 246, calc(var(--p) * 0.08));
  stroke: rgba(242, 247, 246, 0.85);
  stroke-width: 1.2;
  stroke-dasharray: 1;
  stroke-dashoffset: calc(1 - var(--p));
  vector-effect: non-scaling-stroke;
}
.loader__glyph path.is-accent { stroke: var(--green-bright); fill: rgba(157, 194, 32, calc(var(--p) * 0.3)); }
.loader__meta { position: relative; display: flex; flex-direction: column; align-items: center; }
.loader__percent { font: 400 12px var(--font-mono); letter-spacing: 0.3em; color: var(--white); font-variant-numeric: tabular-nums; }
.loader__bar { position: relative; width: min(240px, 60vw); height: 1px; margin: 14px 0; overflow: hidden; background: var(--line); }
.loader__bar span { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--green-bright); box-shadow: 0 0 10px rgba(157, 194, 32, 0.7); transition: width 0.2s linear; }
.loader__tag { padding: 0 16px; text-align: center; font: 400 10px var(--font-mono); letter-spacing: 0.32em; text-transform: uppercase; color: var(--white-faint); }
@keyframes spin { to { transform: rotate(360deg); } }

#page-transition { position: fixed; inset: 0; z-index: 9997; pointer-events: none; visibility: hidden; }
#page-transition .pt-panel { position: absolute; top: 0; width: 25%; height: 100%; background: var(--ink); transform: translateY(-100%); transition: transform 0.7s var(--ease-io); }
.pt-panel:nth-child(1) { left: 0; }
.pt-panel:nth-child(2) { left: 25%; transition-delay: 0.08s; }
.pt-panel:nth-child(3) { left: 50%; transition-delay: 0.16s; }
.pt-panel:nth-child(4) { left: 75%; transition-delay: 0.24s; }
.pt-center { position: absolute; top: 50%; left: 50%; width: 220px; height: 220px; display: grid; place-items: center; transform: translate(-50%, -50%); opacity: 0; transition: opacity 0.4s ease 0.5s; }
.pt-ring { position: absolute; inset: 0; border: 1px solid rgb(138 169 30 / 0.3); border-top-color: var(--green); border-radius: 50%; animation: spin 1.2s linear infinite; }
.pt-ring--inner { inset: 30px; border-color: rgb(138 169 30 / 0.12); border-bottom-color: var(--green-bright); animation-duration: 1.8s; animation-direction: reverse; }
.pt-label { position: relative; font: 400 10px var(--font-mono); letter-spacing: 0.4em; text-transform: uppercase; color: var(--green); }
#page-transition.is-active { visibility: visible; pointer-events: all; }
#page-transition.is-active .pt-panel { transform: translateY(0); }
#page-transition.is-active .pt-center { opacity: 1; }
#page-transition.is-entering { visibility: visible; }
#page-transition.is-entering .pt-panel { transform: translateY(0); transition: none; }
#page-transition.is-entering .pt-center { opacity: 1; transition: none; }
#page-transition.is-entering.is-leaving .pt-panel { transform: translateY(100%); transition: transform 0.7s var(--ease-io); }
#page-transition.is-entering.is-leaving .pt-panel:nth-child(2) { transition-delay: 0.08s; }
#page-transition.is-entering.is-leaving .pt-panel:nth-child(3) { transition-delay: 0.16s; }
#page-transition.is-entering.is-leaving .pt-panel:nth-child(4) { transition-delay: 0.24s; }
#page-transition.is-entering.is-leaving .pt-center { opacity: 0; transition: opacity 0.25s; }


/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 0 var(--gutter);
  transition: background 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled { background: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.55)); border-bottom-color: var(--line); }
@supports (backdrop-filter: blur(1px)) { .nav.scrolled { backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); } }
.nav__brand { display: flex; align-items: center; gap: 12px; }
.nav__logo img { width: 34px; height: 34px; }
.nav__brand-text { font-family: var(--font-display); font-size: 26px; letter-spacing: 0.12em; line-height: 1; }
.nav__brand-text .accent { color: var(--accent); }
.nav__menu { display: flex; align-items: center; gap: 40px; }
.nav__links { display: flex; gap: 32px; }
.nav__links a, .nav__cta { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; }
.nav__links a { color: var(--white-dim); position: relative; padding: 6px 0; transition: color 0.3s; }
.nav__links a::after { content: ''; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform 0.4s var(--ease-out); }
.nav__links a:hover { color: var(--white); }
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__cta { border: 1px solid var(--accent); color: var(--accent); padding: 11px 20px; transition: background 0.3s, color 0.3s; }
.nav__cta:hover { background: var(--accent); color: #000; }
.nav__toggle { display: none; width: 44px; height: 44px; background: none; border: 1px solid var(--line); position: relative; }
.nav__toggle span { position: absolute; left: 12px; right: 12px; height: 1px; background: var(--white); transition: transform 0.35s var(--ease-out); }
.nav__toggle span:first-child { top: 17px; }
.nav__toggle span:last-child { top: 25px; }
.nav.is-open .nav__toggle span:first-child { transform: translateY(4px) rotate(45deg); }
.nav.is-open .nav__toggle span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- chapter rail ---------- */
.rail { position: fixed; right: calc(var(--gutter) * 0.45); top: 50%; transform: translateY(-50%); z-index: 40; display: flex; gap: 14px; align-items: stretch; }
.rail__track { width: 1px; background: var(--line); position: relative; }
.rail__fill { position: absolute; inset: 0; background: var(--accent); transform-origin: top; transform: scaleY(0); box-shadow: 0 0 8px var(--accent); }
.rail__list { display: flex; flex-direction: column; gap: 6px; }
.rail__list a { display: block; font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em; color: var(--white-faint); transition: color 0.3s, transform 0.3s var(--ease-out); }
.rail__list a:hover { color: var(--white); }
.rail__list a.is-active { color: var(--accent); transform: translateX(-4px); }

/* ---------- HUD (Section 04) ---------- */
.hud { position: fixed; inset: 0; z-index: 3; pointer-events: none; opacity: 0; visibility: hidden; }
.hud.is-on { visibility: visible; }
.hud__frame i { position: absolute; width: 28px; height: 28px; border: 1px solid var(--accent-dim); }
.hud__frame i:nth-child(1) { top: calc(var(--nav-h) + 16px); left: var(--gutter); border-right: 0; border-bottom: 0; }
.hud__frame i:nth-child(2) { top: calc(var(--nav-h) + 16px); right: calc(var(--gutter) + 40px); border-left: 0; border-bottom: 0; }
.hud__frame i:nth-child(3) { bottom: 24px; left: var(--gutter); border-right: 0; border-top: 0; }
.hud__frame i:nth-child(4) { bottom: 24px; right: calc(var(--gutter) + 40px); border-left: 0; border-top: 0; }
.hud__scanline { position: absolute; left: 0; right: 0; height: 1px; top: 0; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: 0.45; animation: scan 4s linear infinite; }
@keyframes scan { from { transform: translateY(10vh); } to { transform: translateY(95vh); } }
.hud__reticle { position: absolute; top: 0; left: 0; will-change: transform; }
.hud__reticle-box {
  position: absolute; width: 150px; height: 110px; left: -75px; top: -55px;
  background:
    linear-gradient(var(--accent), var(--accent)) top left / 18px 1px no-repeat,
    linear-gradient(var(--accent), var(--accent)) top left / 1px 18px no-repeat,
    linear-gradient(var(--accent), var(--accent)) top right / 18px 1px no-repeat,
    linear-gradient(var(--accent), var(--accent)) top right / 1px 18px no-repeat,
    linear-gradient(var(--accent), var(--accent)) bottom left / 18px 1px no-repeat,
    linear-gradient(var(--accent), var(--accent)) bottom left / 1px 18px no-repeat,
    linear-gradient(var(--accent), var(--accent)) bottom right / 18px 1px no-repeat,
    linear-gradient(var(--accent), var(--accent)) bottom right / 1px 18px no-repeat;
  animation: reticle 2.4s ease-in-out infinite;
}
.hud__reticle-box::after { content: ''; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
@keyframes reticle { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
.hud__reticle-label, .hud__reticle-coords { position: absolute; left: 84px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em; color: var(--accent); white-space: nowrap; }
.hud__reticle-label { top: -56px; }
.hud__reticle-coords { top: -40px; color: var(--white-faint); }
.hud__panel {
  position: absolute; right: calc(var(--gutter) + 56px); bottom: 56px; width: 320px;
  padding: 18px 20px; border: 1px solid var(--accent-ghost);
  background: linear-gradient(135deg, rgba(12, 18, 4, 0.75), rgba(0, 0, 0, 0.6));
  font-family: var(--font-mono);
}
.hud__title { font-size: 10px; letter-spacing: 0.22em; color: var(--accent); }
.hud__sub { font-size: 10px; letter-spacing: 0.14em; color: var(--white-faint); margin-bottom: 12px; text-transform: uppercase; }
.hud__row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px dashed var(--line); font-size: 11px; letter-spacing: 0.06em; }
.hud__row-label { color: var(--white-dim); }
.hud__row-value { color: var(--white-faint); text-transform: uppercase; }
.hud__row[data-state='done'] .hud__row-value { color: var(--accent); text-shadow: 0 0 8px rgba(157, 194, 32, 0.6); }
.hud__row[data-state='done'] .hud__row-label::before { content: '✓ '; color: var(--accent); }
.hud__telemetry { display: flex; justify-content: space-between; margin-top: 10px; font-size: 9px; letter-spacing: 0.12em; color: var(--white-faint); }
.hud__telemetry b { color: var(--white); font-weight: 400; }

/* ---------- typography primitives ---------- */
.label {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
}
.label::before { content: ''; width: 28px; height: 1px; background: currentColor; }
.label__dim { color: var(--white-faint); letter-spacing: 0.14em; }
.title-xl {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(48px, 6.6vw, 108px); line-height: 0.9; letter-spacing: 0.01em;
  margin-bottom: 22px;
}
.title-xl span { color: var(--accent); }
.body { color: var(--white-dim); font-size: 16px; line-height: 1.75; max-width: 46ch; }
.body + .body { margin-top: 14px; }

/* ---------- reveal states ---------- */
.js [data-reveal] { opacity: 0; visibility: hidden; transform: translateY(40px); }
.reveal-all [data-reveal] { opacity: 1 !important; visibility: visible !important; transform: none !important; }

/* ---------- story layout ---------- */
#story { position: relative; z-index: 2; overflow-x: clip; } /* clip keeps the sticky hero working */
.chapter {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: calc(var(--nav-h) + 48px) calc(var(--gutter) + 48px) 72px var(--gutter);
}
.chapter--left { justify-content: flex-start; }
.chapter--right { justify-content: flex-end; }
.chapter--center { justify-content: center; }
.svc { min-height: 140vh; min-height: 140svh; }

.panel {
  position: relative;
  width: min(540px, 100%);
  padding: clamp(28px, 3.2vw, 44px);
  background: linear-gradient(160deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.58));
  border: 1px solid var(--line);
}
.panel::before { content: ''; position: absolute; top: -1px; left: -1px; width: 48px; height: 48px; border-top: 1px solid var(--accent); border-left: 1px solid var(--accent); pointer-events: none; }
@media (min-width: 900px) and (hover: hover) {
  @supports (backdrop-filter: blur(1px)) { .panel { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); } }
}

/* hero (original HYVAX design) */
.hero-wrap { position: relative; z-index: 2; height: 230vh; }
.hero-marker { position: absolute; left: 0; top: 45vh; width: 1px; height: 1px; pointer-events: none; }
#hero {
  --f: 0; /* 0 = original hero, 1 = fully handed over to the particles */
  position: sticky; top: 0;
  height: 100vh; width: 100%;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
#hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(ellipse at center, #0a1a0a 0%, #000 70%);
  opacity: calc(1 - var(--f));
}
#hero.is-gone { visibility: hidden; }
.hero-canvas { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; opacity: calc(1 - var(--f) * 1.6); }

.hero-content {
  position: relative; z-index: 10;
  display: flex; flex-direction: column; align-items: center;
  padding: 0 24px; text-align: center;
  opacity: 0; transition: opacity 1s ease;
}
.hero-content.visible { opacity: 1; }
.hero-fade { display: flex; flex-direction: column; align-items: center; opacity: calc(1 - var(--f) * 1.8); }
.hero-mark .hm-stage { opacity: calc(1 - var(--f)); }

.hero-tagline {
  position: relative; margin-bottom: 12px;
  font: 400 12px 'Space Mono', monospace; letter-spacing: 0.34em; text-transform: uppercase; color: var(--green);
  opacity: 0; transform: translateY(20px); animation: fadeUp 0.8s ease 1.4s forwards;
}
.hero-tagline::before, .hero-tagline::after {
  content: ''; display: inline-block; width: 28px; height: 1px; margin: 0 14px; vertical-align: middle;
  background: var(--green); opacity: 0.6; animation: tagLine 2.4s ease-in-out infinite;
}
.hero-desc {
  margin-top: 4px; font: 400 14px/1.6 'DM Sans', sans-serif; letter-spacing: 0.22em; text-transform: uppercase; color: rgb(245 245 240 / 0.5);
  opacity: 0; transform: translateY(20px); animation: fadeUp 0.8s ease 4.1s forwards;
}
.hero-scroll-hint { position: absolute; bottom: 14px; left: 50%; z-index: 10; transform: translateX(-50%); opacity: calc(1 - var(--f) * 3); }
.hero-scroll-hint__inner { display: flex; flex-direction: column; align-items: center; gap: 8px; opacity: 0; animation: fadeUp 0.8s ease 4.5s forwards; }
.scroll-line { width: 1px; height: 36px; background: linear-gradient(to bottom, transparent, var(--green), transparent); animation: scrollPulse 2s ease infinite; }

/* A hairline frame with two quiet captions: the only additions to the original hero. */
.hero-frame { position: absolute; inset: calc(var(--nav-h) + 16px) var(--gutter) 22px; z-index: 9; pointer-events: none; opacity: calc(1 - var(--f) * 2.5); }
.hero-frame > * { opacity: 0; animation: heroFrameIn 1.4s ease 4.4s forwards; }
.hero-frame i { position: absolute; width: 22px; height: 22px; border: 0 solid rgba(245, 245, 240, 0.28); }
.hero-frame i:nth-child(1) { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.hero-frame i:nth-child(2) { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.hero-frame i:nth-child(3) { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.hero-frame i:nth-child(4) { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }
.hero-frame__meta { position: absolute; bottom: 4px; font: 400 10px/1 var(--font-mono); letter-spacing: 0.3em; text-transform: uppercase; color: rgba(245, 245, 240, 0.42); }
.hero-frame__meta--left { left: 36px; }
.hero-frame__meta--right { right: 36px; }
@keyframes heroFrameIn { from { opacity: 0; } to { opacity: 1; } }

.hero-mark { position: relative; width: clamp(280px, 48vmin, 480px); aspect-ratio: 1; margin: 0 auto; perspective: 1100px; cursor: pointer; }
.hm-stage {
  position: absolute; inset: 0; display: grid; place-items: center;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.25s ease-out;
}
.hm-pulse {
  position: absolute; top: 50%; left: 50%; z-index: 1; width: 60%; aspect-ratio: 1; border-radius: 50%;
  transform: translate(-50%, -50%); opacity: 0; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(circle, rgb(138 169 30 / 0.5) 0%, transparent 65%);
}
.hm-ripple {
  position: absolute; top: 50%; left: 50%; z-index: 1; width: 34%; aspect-ratio: 1; border-radius: 50%;
  transform: translate(-50%, -50%); opacity: 0; pointer-events: none;
  border: 1.5px solid rgb(111 208 216 / 0.7);
}
.hm-logo-host { position: relative; z-index: 3; width: 50%; display: grid; place-items: center; filter: drop-shadow(0 18px 40px rgb(0 0 0 / 0.55)); }
.hm-logo-host svg { width: 100%; height: auto; display: block; overflow: visible; }
.hm-glow {
  position: absolute; inset: 0; z-index: 2; border-radius: 50%; opacity: 0; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(circle at 50% 50%, var(--green) 0%, transparent 60%);
}
.hm-droplet {
  position: absolute; left: 50%; top: 50%; z-index: 2; width: 9px; height: 9px; opacity: 0; pointer-events: none;
  background: radial-gradient(circle at 35% 30%, #eafff2, var(--aqua) 55%, rgb(111 208 216 / 0.2) 100%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  transform: translate(-50%, -50%);
}
.hm-logo-host #outer, .hm-logo-host #drop { transform-box: fill-box; transform-origin: center; opacity: 0; }
.hero-mark.is-playing #outer { animation: hmSpiral 2.2s cubic-bezier(0.34, 0.01, 0.27, 1) 0.3s forwards; }
.hero-mark.is-playing #drop { animation: hmDrop 1s cubic-bezier(0.22, 1, 0.36, 1) 2.5s forwards; }
.hero-mark.is-playing .hm-glow { animation: hmGlow 1.6s ease 2.4s forwards; }
.hero-mark.is-settled .hm-pulse { animation: hmBreathe 5s ease-in-out 0.5s infinite; }
.hero-mark.is-settled .hm-ripple.r1 { animation: hmRipple 5s ease-out 1s infinite; }
.hero-mark.is-settled .hm-ripple.r2 { animation: hmRipple 5s ease-out 2.5s infinite; }
.hero-mark.is-settled .hm-ripple.r3 { animation: hmRipple 5s ease-out 4s infinite; }
.hero-mark.is-settled .hm-droplet.d1 { animation: hmDroplet 4s ease-in 1.5s infinite; }
.hero-mark.is-settled .hm-droplet.d2 { animation: hmDroplet 4s ease-in 3s infinite; }
.hero-mark.is-settled .hm-droplet.d3 { animation: hmDroplet 4s ease-in 4.5s infinite; }

.hero-wordmark {
  margin-top: 8px;
  font-family: 'Bebas Neue', sans-serif; font-size: clamp(48px, 10vw, 128px); letter-spacing: 0.05em; line-height: 1;
  color: var(--bone); text-shadow: 0 4px 30px rgb(0 0 0 / 0.5);
}
.hw-letter { display: inline-block; opacity: 0; transform: translateY(20px) scale(0.9); }
.hw-x {
  position: relative; color: var(--green); -webkit-text-stroke: 2px #fff;
  text-shadow: 0 0 22px rgb(138 169 30 / 0.55), 0 0 4px rgb(138 169 30 / 0.8);
}
.hero-mark.is-playing ~ .hero-fade .hw-letter { animation: hwIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.hero-mark.is-playing ~ .hero-fade .hw-letter:nth-child(1) { animation-delay: 3.05s; }
.hero-mark.is-playing ~ .hero-fade .hw-letter:nth-child(2) { animation-delay: 3.14s; }
.hero-mark.is-playing ~ .hero-fade .hw-letter:nth-child(3) { animation-delay: 3.23s; }
.hero-mark.is-playing ~ .hero-fade .hw-letter:nth-child(4) { animation-delay: 3.32s; }
.hero-mark.is-playing ~ .hero-fade .hw-letter:nth-child(5) { animation-delay: 3.41s; }


@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
@keyframes scrollPulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }
@keyframes tagLine { 0%, 100% { transform: scaleX(0.6); opacity: 0.4; } 50% { transform: scaleX(1); opacity: 1; } }
@keyframes hmSpiral { 0% { opacity: 0; transform: rotate(-405deg) scale(0.05); filter: blur(7px); } 55% { opacity: 1; filter: blur(0); } 85% { transform: rotate(6deg) scale(1.05); } 100% { opacity: 1; transform: rotate(0) scale(1); filter: blur(0); } }
@keyframes hmDrop { 0% { opacity: 0; transform: translateY(8px) scale(0.3); } 60% { opacity: 1; transform: translateY(0) scale(1.15); } 80% { transform: translateY(-2px) scale(1.02); } 100% { opacity: 1; transform: none; } }
@keyframes hmGlow { 0% { opacity: 0; transform: scale(0.6); } 60% { opacity: 0.65; } 100% { opacity: 0.35; transform: scale(1); } }
@keyframes hmBreathe { 0%, 100% { opacity: 0.2; transform: translate(-50%, -50%) scale(0.88); } 50% { opacity: 0.5; transform: translate(-50%, -50%) scale(1.06); } }
@keyframes hmRipple { 0% { opacity: 0.5; transform: translate(-50%, -50%) scale(0.3); } 80% { opacity: 0; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(2.8); } }
@keyframes hmDroplet { 0% { opacity: 0; transform: translate(-50%, -260%) scale(0.5); } 18% { opacity: 1; } 72% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -30%) scale(0.15); } }
@keyframes hwIn { to { opacity: 1; transform: none; } }

@media (max-width: 768px) {
  .hero-frame { inset: calc(var(--nav-h) + 10px) 14px 14px; }
  .hero-frame__meta { display: none; }
  .hero-mark { width: clamp(200px, 42vmin, 320px); }
  .hero-tagline { font-size: 10px; letter-spacing: 0.25em; }
  .hero-desc { font-size: 11px; letter-spacing: 0.15em; padding: 0 12px; }
  .hero-wordmark { font-size: clamp(36px, 14vw, 72px); }
  .hero-content { padding: 0 16px; }
}
@media (max-width: 480px) {
  .hero-mark { width: clamp(160px, 38vmin, 260px); }
  .hero-wordmark { font-size: clamp(32px, 16vw, 56px); }
  .hero-tagline { font-size: 9px; letter-spacing: 0.2em; }
  .hero-tagline::before, .hero-tagline::after { width: 16px; margin: 0 8px; }
  .hero-desc { font-size: 10px; letter-spacing: 0.12em; }
}


/* marquee */
.marquee { position: relative; z-index: 2; overflow: hidden; border-block: 1px solid var(--line); background: rgba(0, 0, 0, 0.55); padding: 16px 0; }
.marquee__track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee__item { font-family: var(--font-display); font-size: clamp(22px, 2.6vw, 34px); letter-spacing: 0.06em; padding: 0 28px; white-space: nowrap; }
.marquee__sep { color: var(--accent); font-size: 10px; align-self: center; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* fleet / wheel */
.all-services { margin-top: 26px; }
.wheel { position: relative; width: 140px; height: 140px; margin-top: 28px; }
.wheel__svg { width: 100%; height: 100%; animation: spin 40s linear infinite; }
.wheel__ring { fill: none; stroke: var(--accent-ghost); stroke-width: 1.5; }
.wheel__ring--faint { stroke: rgba(242, 247, 246, 0.06); stroke-dasharray: 3 8; }
.wheel__arc { fill: none; stroke: var(--accent); stroke-width: 3; }
.wheel__center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.wheel__center strong { font-family: var(--font-display); font-weight: 400; font-size: 44px; line-height: 1; }
.wheel__center span { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.25em; color: var(--accent); }

/* service chapters */
.svc__bignum {
  position: absolute; right: 18px; top: -0.45em;
  font-family: var(--font-display); font-size: clamp(120px, 14vw, 220px); line-height: 1;
  color: transparent; -webkit-text-stroke: 1px var(--accent-dim); pointer-events: none; opacity: 0.7;
}
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 28px; }
.tag { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; padding: 7px 12px; border: 1px solid var(--line); color: var(--white-dim); }
.explore { display: inline-flex; align-items: center; gap: 12px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--accent); padding-bottom: 6px; border-bottom: 1px solid var(--accent-ghost); transition: border-color 0.3s, gap 0.3s var(--ease-out); }
.explore:hover { border-color: var(--accent); gap: 18px; }
.explore__arrow svg { display: block; }

/* industries */
.nodes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 26px 0; }
.node { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px; border: 1px solid var(--line); text-align: center; background: rgba(157, 194, 32, 0.03); transition: border-color 0.3s, background 0.3s; }
.node:hover { border-color: var(--accent-dim); background: var(--accent-ghost); }
.node__icon { font-size: 22px; line-height: 1; }
.node__label { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.08em; line-height: 1.4; color: var(--white-dim); text-transform: uppercase; }
.checklist { display: grid; gap: 10px; margin-top: 8px; }
.checklist li { position: relative; padding-left: 26px; color: var(--white-dim); font-size: 15px; }
.checklist li::before { content: ''; position: absolute; left: 0; top: 0.62em; width: 12px; height: 1px; background: var(--accent); box-shadow: 0 0 6px var(--accent); }

/* process */
.chapter--wide { justify-content: center; }
.wide { width: min(1240px, 100%); position: relative; }
.wide__head { text-align: center; margin: 0 auto 56px; max-width: 760px; }
.wide__head .label { justify-content: center; }
.wide__head .body { margin: 0 auto; }
.bg-word { position: absolute; left: 50%; top: 50%; transform: translateX(-50%); translate: 0 -50%; font-family: var(--font-display); font-size: clamp(160px, 30vw, 460px); line-height: 1; color: transparent; -webkit-text-stroke: 1px rgba(242, 247, 246, 0.07); pointer-events: none; white-space: nowrap; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.step { position: relative; padding: 32px 26px 36px; background: rgba(0, 0, 0, 0.78); transition: background 0.4s; }
.step:hover { background: rgba(14, 20, 5, 0.85); }
.step__index { position: absolute; top: 18px; right: 20px; font-family: var(--font-display); font-size: 54px; line-height: 1; color: transparent; -webkit-text-stroke: 1px var(--accent-ghost); }
.step__num { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--accent); margin-bottom: 40px; }
.step__title { font-family: var(--font-display); font-weight: 400; font-size: 34px; line-height: 0.95; margin-bottom: 14px; }
.step__desc { color: var(--white-dim); font-size: 14px; line-height: 1.7; }
.flow { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 14px 18px; margin-top: 40px; }
.flow__item { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.flow__icon { width: 58px; height: 58px; display: grid; place-items: center; border: 1px solid var(--accent-ghost); border-radius: 50%; font-size: 22px; background: rgba(0, 0, 0, 0.6); }
.flow__label { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; text-align: center; line-height: 1.4; color: var(--white-dim); }
.flow__arrow { color: var(--accent); font-size: 18px; }

/* advantages / big type */
#why-hydrovac { position: relative; z-index: 2; }
.bigtype { position: relative; min-height: 100vh; min-height: 100svh; display: grid; place-items: center; overflow: hidden; padding: 100px var(--gutter); }
.bigtype__bg { position: absolute; right: -2vw; bottom: -6vh; font-family: var(--font-display); font-size: clamp(240px, 46vw, 720px); line-height: 0.8; color: transparent; -webkit-text-stroke: 1px rgba(157, 194, 32, 0.1); pointer-events: none; }
.bigtype__content { position: relative; text-align: center; }
.bigtype__num { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; }
.bigtype__word { display: block; font-family: var(--font-display); font-size: clamp(64px, 14vw, 230px); line-height: 0.84; letter-spacing: 0.01em; text-shadow: 0 0 40px rgba(0, 0, 0, 0.6); }
.bigtype__word.is-accent { color: var(--accent); text-shadow: 0 0 40px rgba(157, 194, 32, 0.35); }
.bigtype__sub { margin-top: 26px; font-size: 16px; color: var(--white-dim); }

/* commitment */
.commit { width: min(1240px, 100%); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: start; }
.commit__left, .commit__right { padding: clamp(24px, 3vw, 40px); background: rgba(0, 0, 0, 0.66); border: 1px solid var(--line); }
.commit__visual { font-family: var(--font-display); font-size: clamp(90px, 12vw, 180px); line-height: 0.82; color: transparent; -webkit-text-stroke: 1px var(--accent-dim); margin-bottom: 28px; }
.commit__icons { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.cicon { padding: 20px; background: #000; }
.cicon__icon { font-size: 22px; display: block; margin-bottom: 10px; }
.cicon__label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.cicon__text { color: var(--white-dim); font-size: 13px; line-height: 1.6; }
.pillars { display: grid; gap: 0; }
.pillar { display: grid; grid-template-columns: 56px 1fr; gap: 12px; padding: 20px 0; border-top: 1px solid var(--line); }
.pillar__num { font-family: var(--font-display); font-size: 32px; line-height: 1; color: var(--accent); }
.pillar h3 { font-family: var(--font-display); font-weight: 400; font-size: 28px; line-height: 1; margin-bottom: 8px; letter-spacing: 0.02em; }
.pillar p { color: var(--white-dim); font-size: 14px; line-height: 1.7; }

/* about */
.about__emblem img { width: 64px; height: auto; margin-bottom: 22px; filter: drop-shadow(0 0 14px rgba(157, 194, 32, 0.25)); }
.about__title { font-size: clamp(48px, 5.6vw, 92px); }
#about .checklist { margin-top: 24px; }

/* cta */
#cta { padding-bottom: 96px; }
.cta { width: min(1240px, 100%); display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.cta__left .body { max-width: 52ch; }
.cta__details { margin-top: 30px; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.cta__details li { padding: 16px 18px; background: rgba(0, 0, 0, 0.75); display: flex; flex-direction: column; gap: 4px; }
.cta__dlabel { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); }
.cta__dvalue { font-size: 16px; color: var(--white); word-break: break-word; }
a.cta__dvalue:hover { color: var(--accent); }
.form-card { padding: clamp(24px, 3vw, 40px); border: 1px solid var(--accent-ghost); background: linear-gradient(160deg, rgba(11, 16, 4, 0.85), rgba(0, 0, 0, 0.75)); position: relative; }
.form-card::before { content: ''; position: absolute; inset: -1px auto auto -1px; width: 56px; height: 56px; border-top: 1px solid var(--accent); border-left: 1px solid var(--accent); }
.form-card__heading { font-family: var(--font-display); font-size: 40px; line-height: 1; }
.form-card__note { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; color: var(--white-faint); margin: 6px 0 24px; text-transform: uppercase; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.field label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--white-dim); }
.field__req { color: var(--accent); }
.field input, .field textarea {
  width: 100%; padding: 14px 16px; font-size: 16px; /* 16px prevents iOS zoom */
  background: rgba(0, 0, 0, 0.6); border: 1px solid var(--line); border-radius: 0;
  transition: border-color 0.3s, box-shadow 0.3s; resize: vertical;
}
.field input::placeholder, .field textarea::placeholder { color: rgba(242, 247, 246, 0.3); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ghost); }
.field .cta-field-invalid { border-color: var(--danger); }
.cta-form-status { margin: 0 0 14px; font-size: 14px; }
.cta-form-status[data-kind='error'] { color: var(--danger); }
.cta-form-status[data-kind='success'] { color: var(--accent); }
.cta-form-status[data-kind='pending'] { color: var(--white-dim); }
.cta-submit {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 18px 24px; border: 0; background: var(--accent); color: #000;
  font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: 0.24em; text-transform: uppercase;
  transition: box-shadow 0.3s, transform 0.3s var(--ease-out), opacity 0.3s;
}
.cta-submit:hover { box-shadow: 0 0 32px rgba(157, 194, 32, 0.45); transform: translateY(-2px); }
.cta-submit:disabled { opacity: 0.55; pointer-events: none; }

/* footer */
.footer { position: relative; z-index: 2; background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.82) 40%); border-top: 1px solid var(--line); padding: 64px var(--gutter) 28px; }
.footer__inner { display: grid; grid-template-columns: 1.3fr 2fr; gap: 48px; max-width: 1240px; margin: 0 auto; }
.footer__logo img { width: 136px; height: auto; margin-bottom: 18px; }
.footer__brand p { color: var(--white-faint); font-size: 14px; max-width: 42ch; }
.footer__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer__col h3 { font-family: var(--font-mono); font-weight: 400; font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px; }
.footer__col li + li { margin-top: 10px; }
.footer__col a { color: var(--white-dim); font-size: 14px; transition: color 0.3s; word-break: break-word; }
.footer__col a:hover { color: var(--white); }
.footer__bottom { max-width: 1240px; margin: 48px auto 0; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--white-faint); }
.footer__bottom .mono { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .nav__links { gap: 22px; }
  .hud__panel { width: 290px; }
}

@media (max-width: 900px) {
  :root { --nav-h: 64px; }
  .nav__toggle { display: block; z-index: 2; }
  .nav__menu {
    position: fixed; inset: 0; z-index: 1;
    flex-direction: column; justify-content: center; gap: 36px;
    background: rgba(0, 0, 0, 0.96);
    opacity: 0; visibility: hidden; transition: opacity 0.35s, visibility 0.35s;
  }
  .nav.is-open .nav__menu { opacity: 1; visibility: visible; }
  .nav__links { flex-direction: column; align-items: center; gap: 22px; }
  .nav__links a { font-size: 14px; }
  .nav__brand { z-index: 2; }

  .rail__list { display: none; }
  .rail { right: 8px; height: 40vh; }

  /* Story panels sit low; the 3D subject is framed in the upper viewport */
  .chapter { padding: calc(var(--nav-h) + 24px) var(--gutter) 40px; align-items: flex-end; }
  .chapter--left, .chapter--right, .chapter--center { justify-content: center; }
  .svc { min-height: 150svh; }
  .panel { width: 100%; background: linear-gradient(180deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.82)); }
  .svc__bignum { right: 12px; }

  .chapter--wide { align-items: center; }
  .hero-wrap { height: 210vh; }
  .commit, .cta { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; }

  .hud__panel { left: var(--gutter); right: var(--gutter); width: auto; top: calc(var(--nav-h) + 12px); bottom: auto; padding: 12px 14px; }
  .hud__row { padding: 5px 0; font-size: 10px; }
  .hud__reticle-box { width: 110px; height: 80px; left: -55px; top: -40px; }
  .hud__reticle-label, .hud__reticle-coords { left: 62px; }
  .hud__frame i:nth-child(1), .hud__frame i:nth-child(2) { display: none; }
  .hud__frame i:nth-child(4) { right: var(--gutter); }
}

@media (max-width: 600px) {
  body { font-size: 15px; }
  .title-xl { font-size: clamp(44px, 13vw, 64px); }
  .body { font-size: 15px; }
  .nodes { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .step { padding: 24px 20px 26px; }
  .step__num { margin-bottom: 20px; }
  .flow { gap: 10px; }
  .flow__arrow { display: none; }
  .flow__icon { width: 48px; height: 48px; font-size: 18px; }
  .cta__details { grid-template-columns: 1fr; }
  .footer__cols { grid-template-columns: 1fr 1fr; }
  .hud__telemetry { display: none; }
  .commit__icons { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .marquee__track { animation: none; }
}
