:root {
  --bg:        #12140f;
  --bg-soft:   #1b1d17;
  --fg:        #ffffff;
  --muted:     rgba(255,255,255,0.62);
  --dim:       rgba(255,255,255,0.32);
  --hair:      rgba(255,255,255,0.12);
  --amber:     #f59e0b;
  --amber-dim: rgba(245,158,11,0.55);
  --maxw:      1440px;
  --pad:       clamp(20px, 4vw, 56px);
  --nav-h:     72px;
  --ease:      cubic-bezier(.2,.7,.2,1);
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  /* Smooth scrolling is applied per-click in app.js, NOT via CSS scroll-behavior:
     the CSS property also animates browser scroll restoration on reload, which
     reads as the page scrolling by itself. overflow-anchor off for the same
     reason — everything here moves with transforms, anchoring has nothing
     useful to hold onto. */
  overflow-anchor: none;
  background: var(--bg);
  color: var(--fg);
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  scrollbar-width: none;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar { display: none; }

a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}
button:focus { outline: none; }
button:focus-visible { outline: 1px solid var(--amber); outline-offset: 3px; }

/* ---------- Background: single WebGL canvas, fixed fullscreen ---------- */
#stage {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  display: block;
  pointer-events: none;
}

#stage-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 50% at 20% 20%, rgba(152,158,130,0.10), transparent 60%),
    radial-gradient(55% 55% at 80% 30%, rgba(245,158,11,0.06), transparent 60%),
    radial-gradient(80% 60% at 50% 100%, rgba(17,19,14,0.8), transparent 70%),
    var(--bg);
  pointer-events: none;
}


#glitch {
  position: fixed;
  inset: 0;
  z-index: 55;
  pointer-events: none;
  opacity: 0;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255,255,255,0.06) 0 1px,
      transparent 1px 3px
    );
  mix-blend-mode: screen;
}
@keyframes glitch-flash {
  0%   { opacity: 0; }
  25%  { opacity: 0.4; }
  50%  { opacity: 0; }
  75%  { opacity: 0.25; }
  100% { opacity: 0; }
}
#glitch.is-flashing {
  animation: glitch-flash 0.14s steps(2) forwards;
}

/* ---------- Nav ---------- */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 50;
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}
#nav > * { pointer-events: auto; }
/* Top scrim so content scrolling under the fixed nav fades out behind it
   instead of colliding with the brand and links */
#nav::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: calc(var(--nav-h) + 48px);
  background: linear-gradient(180deg, rgba(15,17,12,0.92) 0%, rgba(15,17,12,0.55) 55%, transparent 100%);
  pointer-events: none;
  z-index: -1;
}
.brand {
  font-weight: 500;
  letter-spacing: 0.02em;
  font-size: 15px;
  display: inline-flex;
  gap: 10px;
  align-items: center;
}
.brand-mark {
  height: 26px;
  width: auto;
  display: block;
  flex-shrink: 0;
  overflow: visible;
  color: var(--amber);
  transform-origin: 50% 50%;
  filter: drop-shadow(0 0 10px var(--amber-dim));
  animation: brand-sway 4s ease-in-out infinite alternate;
}
.brand-mark #brand-orbit {
  fill: none;
  stroke: currentColor;
  stroke-width: 6;
  stroke-linecap: butt;
}
.brand-mark .brand-slice,
.brand-mark .brand-cursor { fill: currentColor; }
.brand-mark .brand-cursor { animation: brand-cursor-blink 1.2s steps(1, end) infinite; }
.brand-mark .slice-1 { animation: brand-glitch-a 6.1s steps(1, end) infinite; }
.brand-mark .slice-2 { animation: brand-glitch-b 3.1s steps(1, end) infinite; }
.brand-mark .slice-3 { animation: brand-glitch-c 4.7s steps(1, end) infinite; }

@keyframes brand-sway {
  from { transform: rotate(-9deg); }
  to   { transform: rotate(9deg); }
}

@keyframes brand-cursor-blink {
  0%, 55%  { opacity: 1; }
  56%, 100% { opacity: 0; }
}
@keyframes brand-glitch-a {
  0%, 55%   { transform: translateX(0); }
  56%       { transform: translateX(3px); }
  57.5%, 100% { transform: translateX(0); }
}
@keyframes brand-glitch-b {
  0%, 80%   { transform: translateX(0); }
  81.5%     { transform: translateX(6px); }
  83%       { transform: translateX(-4px); }
  84.5%, 100% { transform: translateX(0); }
}
@keyframes brand-glitch-c {
  0%, 28%   { transform: translateX(0); }
  29%       { transform: translateX(-7px); }
  30.2%     { transform: translateX(5px); }
  31.5%, 100% { transform: translateX(0); }
}

/* Stronger burst, retriggered in sync with the page glitch flash */
@keyframes brand-burst {
  0%   { transform: translateX(0); }
  20%  { transform: translateX(6px); }
  45%  { transform: translateX(-5px); }
  70%  { transform: translateX(3px); }
  100% { transform: translateX(0); }
}
.brand-mark.is-glitching .slice-1 { animation: brand-burst 0.18s steps(1, end) reverse both; }
.brand-mark.is-glitching .slice-2 { animation: brand-burst 0.18s steps(1, end) both; }
.brand-mark.is-glitching .slice-3 { animation: brand-burst 0.14s steps(1, end) reverse both; }
.brand-mark.is-glitching .brand-cursor { animation: brand-burst 0.14s steps(1, end) both; }

@media (prefers-reduced-motion: reduce) {
  .brand-mark,
  .brand-mark .brand-slice,
  .brand-mark .brand-cursor { animation: none !important; }
}
.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
  font-size: 14px;
  color: var(--muted);
}
.nav-link { position: relative; }
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .4s var(--ease);
}
.nav-link:hover { color: var(--fg); }
.nav-link:hover::after { transform: scaleX(1); }

/* ---------- Content flow ---------- */
#content {
  position: relative;
  width: 100%;
  z-index: 10;
}

/* ---------- Scenes: full-height sections in normal flow ---------- */
.scene {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-h) + 40px) var(--pad) 80px;
  contain: layout style;
}
.scene::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse 90% 80% at 50% 50%,
    rgba(0, 0, 0, 0.68) 0%,
    rgba(0, 0, 0, 0.44) 45%,
    rgba(0, 0, 0, 0.18) 75%,
    transparent 100%
  );
  z-index: 0;
}
@media (max-width: 640px) {
  .scene::before {
    background: radial-gradient(
      ellipse 100% 90% at 50% 50%,
      rgba(0, 0, 0, 0.78) 0%,
      rgba(0, 0, 0, 0.55) 50%,
      rgba(0, 0, 0, 0.22) 80%,
      transparent 100%
    );
  }
}
.scene-inner {
  width: 100%;
  max-width: var(--maxw);
  position: relative;
  z-index: 1;
}

/* ---------- Panel scenes ----------
   Opaque slabs that cover the particle field, with slanted top/bottom
   edges so the open sections around them show through the cut corners.
   ::before becomes a tapered amber hairline tracing the slant;
   ::after is the surface itself, inset 2px so the hairline shows. */
.scene-panel {
  --slant: clamp(32px, 5vw, 80px);
  padding-top: calc(var(--nav-h) + 40px + var(--slant));
  padding-bottom: calc(80px + var(--slant));
}
.scene.scene-panel::before {
  background: linear-gradient(90deg,
    rgba(245,158,11,0) 2%,
    var(--amber-dim) 30% 70%,
    rgba(245,158,11,0) 98%);
}
.scene.scene-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.016) 0 1px, transparent 1px 4px),
    radial-gradient(120% 90% at 85% 0%, rgba(245,158,11,0.05), transparent 55%),
    radial-gradient(100% 80% at 12% 100%, rgba(152,158,130,0.09), transparent 60%),
    linear-gradient(172deg, #23261e 0%, #1b1d17 55%, #161711 100%);
}
/* Edges rise toward the right */
.scene-panel.panel-rise::before {
  clip-path: polygon(0 var(--slant), 100% 0, 100% calc(100% - var(--slant)), 0 100%);
}
.scene-panel.panel-rise::after {
  clip-path: polygon(0 calc(var(--slant) + 2px), 100% 2px, 100% calc(100% - var(--slant) - 2px), 0 calc(100% - 2px));
}
/* Edges fall toward the right */
.scene-panel.panel-fall::before {
  clip-path: polygon(0 0, 100% var(--slant), 100% 100%, 0 calc(100% - var(--slant)));
}
.scene-panel.panel-fall::after {
  clip-path: polygon(0 2px, 100% calc(var(--slant) + 2px), 100% calc(100% - 2px), 0 calc(100% - var(--slant) - 2px));
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 28px;
}

.reveal-wrap {
  display: block;
  overflow: hidden;
  line-height: inherit;
  padding: 0.05em 0.02em 0.22em;
  margin: -0.05em -0.02em -0.22em;
}
/* Masked line reveal — each line swings up from behind a clipped edge with a
   slight tilt and settles level. Hidden state is gated on html.js so content
   is never invisible if scripts fail to load. */
.reveal {
  display: inline-block;
  padding-bottom: 0.02em;
  transform-origin: 0% 100%;
  transition: transform 0.8s var(--ease-out), opacity 0.5s var(--ease-out);
}
html.js .reveal {
  transform: translateY(120%) rotate(2.5deg);
  opacity: 0;
}
html.js .reveal.is-in {
  transform: none;
  opacity: 1;
}

/* Block fade-rise for supporting content (stats, service copy, quote meta, CTAs) */
.rise {
  transition: transform 0.7s var(--ease-out), opacity 0.7s var(--ease-out);
}
html.js .rise {
  transform: translateY(26px);
  opacity: 0;
}
html.js .rise.is-in {
  transform: none;
  opacity: 1;
}

/* ---------- Scene: Hero ---------- */
.scene-hero .title {
  font-size: clamp(38px, 10vw, 160px);
  font-weight: 300;
  line-height: 0.9;
  letter-spacing: -0.02em;
  margin: 0;
  overflow-wrap: break-word;
  text-shadow: 0 0 60px rgba(0,0,0,0.9), 0 2px 12px rgba(0,0,0,0.7);
}
.scene-hero .title .word { display: inline-block; margin-right: 0.08em; }
.scene-hero .kicker {
  margin-top: 40px;
  font-size: 18px;
  color: var(--muted);
  max-width: 640px;
  line-height: 1.5;
}
.scene-hero .hint {
  margin-top: 56px;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--dim);
}

/* ---------- Scene: Statement ---------- */
.scene-statement .statement {
  font-size: clamp(36px, 7vw, 104px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.015em;
  margin: 0;
  max-width: 1200px;
  text-shadow: 0 0 60px rgba(0,0,0,0.9), 0 2px 12px rgba(0,0,0,0.7);
}
.scene-statement .amber-rule {
  display: block;
  height: 1px;
  background: var(--amber);
  width: 100%;
  margin: 48px 0 40px;
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 0.5s var(--ease);
}
.scene-statement.in-view .amber-rule {
  transform: scaleX(1);
  transition-delay: 0.35s;
}
.scene-statement .support {
  font-size: 18px;
  color: var(--muted);
  max-width: 680px;
  line-height: 1.6;
  display: grid;
  gap: 14px;
}

/* ---------- Scene: Stats ---------- */
.scene-stats .label {
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 60px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 48px;
}
.stat {
  border-top: 1px solid var(--hair);
  padding-top: 24px;
  position: relative;
}
.stat::before {
  content: "";
  position: absolute;
  top: -1px; left: 0;
  height: 1px; width: 100%;
  background: var(--amber);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 1.4s var(--ease);
}
.scene-stats.in-view .stat:nth-child(1)::before { transform: scaleX(1); transition-delay: 0.05s; }
.scene-stats.in-view .stat:nth-child(2)::before { transform: scaleX(1); transition-delay: 0.25s; }
.scene-stats.in-view .stat:nth-child(3)::before { transform: scaleX(1); transition-delay: 0.45s; }
.scene-stats.in-view .stat:nth-child(4)::before { transform: scaleX(1); transition-delay: 0.65s; }
.stat-value {
  font-size: clamp(64px, 8vw, 128px);
  font-weight: 300;
  line-height: 1;
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.stat-value .unit {
  font-size: 0.45em;
  color: var(--amber);
  margin-left: 6px;
}
.stat-label {
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}
@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 36px; }
}

/* ---------- Scene: Services ---------- */
.scene-services .label {
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 40px;
}
.services {
  display: grid;
  gap: 36px;
}
.service {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 2fr;
  gap: 40px;
  padding: 28px 0;
  border-top: 1px solid var(--hair);
  position: relative;
}
.service::before {
  content: "";
  position: absolute;
  top: -1px; left: 0;
  height: 1px; width: 0;
  background: var(--fg);
  transform-origin: left;
}
.service-title {
  font-size: clamp(28px, 3.4vw, 52px);
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1.05;
  margin: 0;
}
.service-copy {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.55;
  max-width: 620px;
  margin: 0 0 14px;
}
.service-tags {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
}
@media (max-width: 900px) {
  .scene-services .label { margin-bottom: 24px; }
  .services { gap: 18px; }
  .service {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 14px 0;
  }
  .service-title { font-size: clamp(20px, 5.2vw, 28px); line-height: 1.1; }
  .service-copy {
    font-size: 13.5px;
    line-height: 1.45;
    margin: 0 0 8px;
  }
  .service-tags { font-size: 10px; }
}

/* ---------- Scene: Proof ---------- */
.scene-proof .label {
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 40px;
}
.quotes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}
.quote-body {
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 300;
  line-height: 1.25;
  margin: 0 0 20px;
}
.quote-meta {
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--amber);
}
.scene-proof blockquote {
  margin: 0;
}
.quote-body::before,
.quote-body::after {
  color: var(--amber);
  font-weight: 300;
  font-size: 2.2em;
  line-height: 0;
  vertical-align: -0.32em;
  pointer-events: none;
}
.quote-body::before {
  content: "\201C";
  margin-right: 0.06em;
}
.quote-body::after {
  content: "\201D";
  margin-left: 0.04em;
}
@media (max-width: 900px) {
  .quotes { grid-template-columns: 1fr; gap: 40px; }
  .quote-body::before,
  .quote-body::after { font-size: 1.9em; vertical-align: -0.28em; }
}

/* ---------- Scene: CTA ---------- */
.scene-cta .cta-title {
  font-size: clamp(40px, 7.5vw, 116px);
  font-weight: 300;
  line-height: 0.92;
  letter-spacing: -0.02em;
  margin: 0;
  text-shadow: 0 0 60px rgba(0,0,0,0.9), 0 2px 12px rgba(0,0,0,0.7);
}
.cta-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
  margin-top: 48px;
}
/* The particle field runs behind this column. No panel — just a soft dark
   pool bleeding out behind the text, edgeless, plus the same text-shadow the
   headlines use. */
.cta-lead {
  position: relative;
}
.cta-lead > * {
  position: relative;
  z-index: 1;
}
.cta-lead::before {
  content: "";
  position: absolute;
  inset: -56px -80px -48px -64px;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(68% 60% at 32% 48%,
    rgba(9,10,7,0.72) 0%,
    rgba(9,10,7,0.56) 42%,
    rgba(9,10,7,0.26) 68%,
    transparent 84%);
}
.scene-cta .cta-copy {
  margin: 0;
  font-size: 18px;
  color: rgba(255,255,255,0.78);
  max-width: 520px;
  line-height: 1.55;
  text-shadow: 0 0 30px rgba(0,0,0,0.9), 0 2px 10px rgba(0,0,0,0.8);
}
.cta-points {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  font-size: 14px;
  color: var(--muted);
  text-shadow: 0 0 24px rgba(0,0,0,0.9), 0 2px 8px rgba(0,0,0,0.8);
}
.cta-points li {
  position: relative;
  padding: 12px 0 12px 22px;
  border-top: 1px solid var(--hair);
}
.cta-points li::before {
  content: "";
  position: absolute;
  left: 0; top: 20px;
  width: 6px; height: 6px;
  background: var(--amber);
}

/* ---------- Consultation form ---------- */
/* The shell is a slab in the same language as the panel scenes: tapered amber
   hairline (::before) with the surface inset 2px over it (::after), both cut
   on the same slant. The chrome lives on the shell, not the form, so it stays
   put while the form swaps for the confirmation — one slab changing state.
   Form and success share a single grid cell, so nothing collapses mid-swap. */
.form-shell {
  --card-slant: clamp(18px, 2.4vw, 34px);
  --card-pad: clamp(24px, 3vw, 36px);
  position: relative;
  display: grid;
  isolation: isolate;
}
.form-shell::before,
.form-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.form-shell::before {
  background: linear-gradient(90deg,
    rgba(245,158,11,0) 2%,
    var(--amber-dim) 30% 70%,
    rgba(245,158,11,0) 98%);
  clip-path: polygon(0 var(--card-slant), 100% 0, 100% calc(100% - var(--card-slant)), 0 100%);
}
.form-shell::after {
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.016) 0 1px, transparent 1px 4px),
    radial-gradient(120% 90% at 85% 0%, rgba(245,158,11,0.05), transparent 55%),
    radial-gradient(100% 80% at 12% 100%, rgba(152,158,130,0.09), transparent 60%),
    linear-gradient(172deg, #23261e 0%, #1b1d17 55%, #161711 100%);
  clip-path: polygon(0 calc(var(--card-slant) + 2px), 100% 2px, 100% calc(100% - var(--card-slant) - 2px), 0 calc(100% - 2px));
}
.form-shell > * {
  grid-area: 1 / 1;
  position: relative;
  z-index: 1;
  /* clear the cut corners */
  padding: calc(var(--card-pad) + var(--card-slant)) var(--card-pad);
}

.consult-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-content: start;
  transition: opacity 0.25s cubic-bezier(0.4, 0, 1, 1), transform 0.25s cubic-bezier(0.4, 0, 1, 1);
}
.field-wide { grid-column: 1 / -1; }

.field { display: flex; flex-direction: column; }
.field label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 10px;
  transition: color 0.15s cubic-bezier(0.2, 0, 0, 1);
}
.field:focus-within label { color: var(--amber); }
.field .optional {
  letter-spacing: 0.06em;
  text-transform: none;
  color: rgba(255,255,255,0.22);
}

.consult-form input,
.consult-form textarea {
  width: 100%;
  font: inherit;
  font-size: 15px;
  color: var(--fg);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--hair);
  border-radius: 0;
  padding: 10px 2px;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.consult-form textarea {
  resize: vertical;
  min-height: 104px;
  line-height: 1.5;
}
.consult-form input:hover,
.consult-form textarea:hover { border-bottom-color: rgba(255,255,255,0.28); }
.consult-form input:focus,
.consult-form textarea:focus {
  outline: none;
  border-bottom-color: var(--amber);
  background: rgba(245,158,11,0.05);
}
.field.is-invalid input,
.field.is-invalid textarea { border-bottom-color: #e5484d; }

.field-error {
  margin: 0;
  font-size: 12px;
  color: #ff9a9d;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.3s var(--ease-out), opacity 0.3s var(--ease-out), padding-top 0.3s var(--ease-out);
}
.field.is-invalid .field-error {
  max-height: 3em;
  opacity: 1;
  padding-top: 8px;
}

.form-foot {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.form-error {
  margin: 0;
  font-size: 13px;
  color: #ff9a9d;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.form-error.is-shown { opacity: 1; transform: none; }

/* Honeypot — off-screen rather than display:none, which some bots skip */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

.btn-spinner {
  width: 0; height: 13px;
  margin-left: -4px;
  border: 1.5px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  box-sizing: content-box;
  opacity: 0;
  transition: width 0.3s var(--ease-out), opacity 0.3s var(--ease-out), margin 0.3s var(--ease-out);
}
.btn.is-sending {
  pointer-events: none;
  opacity: 0.75;
}
.btn.is-sending .btn-spinner {
  width: 13px;
  opacity: 1;
  margin-left: 0;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Success state ---------- */
.form-success {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity 0.4s var(--ease-out) 0.12s, transform 0.4s var(--ease-out) 0.12s, visibility 0s linear 0.4s;
}
.form-success h3 {
  margin: 22px 0 0;
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 300;
  letter-spacing: -0.01em;
}
.form-success p {
  margin: 12px 0 0;
  font-size: 15px;
  color: var(--muted);
  max-width: 34ch;
  line-height: 1.55;
}
.success-mark {
  width: 48px; height: 48px;
  fill: none;
  stroke: var(--amber);
  stroke-width: 2;
  stroke-linecap: square;
  stroke-linejoin: miter;
}
.success-ring {
  stroke: var(--amber-dim);
  stroke-dasharray: 132;
  stroke-dashoffset: 132;
}
.success-tick {
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
}

.form-shell.is-sent .consult-form {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.985);
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.4, 0, 1, 1), transform 0.25s cubic-bezier(0.4, 0, 1, 1), visibility 0s linear 0.25s;
}
.form-shell.is-sent .form-success {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.4s var(--ease-out) 0.12s, transform 0.4s var(--ease-out) 0.12s;
}
/* Ring draws, then the tick lands — the pause is the whole point */
.form-shell.is-sent .success-ring {
  animation: draw 0.6s var(--ease-out) 0.2s forwards;
}
.form-shell.is-sent .success-tick {
  animation: draw 0.35s var(--ease-out) 0.62s forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

@media (max-width: 980px) {
  .cta-grid { grid-template-columns: 1fr; gap: 36px; }
  .cta-points { margin-top: 24px; }
}
@media (max-width: 560px) {
  .consult-form { grid-template-columns: 1fr; }
  .form-foot .btn { width: 100%; justify-content: center; }
}

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 18px 32px;
  font-size: 14px;
  letter-spacing: 0.04em;
  border: 1px solid var(--hair);
  border-radius: 999px;
  color: var(--fg);
  transition: border-color .3s var(--ease), background .3s var(--ease), color .3s var(--ease);
}
.btn .label { position: relative; z-index: 1; }
.btn.primary {
  background: var(--amber);
  color: #1a1004;
  border-color: var(--amber);
}
.btn:hover {
  border-color: var(--amber);
  background: rgba(245,158,11,0.12);
}
.btn.primary:hover {
  background: #ffbd3a;
}

/* ---------- Progress rail ---------- */
#progress {
  position: fixed;
  right: 22px; top: 50%;
  transform: translateY(-50%);
  width: 2px; height: 200px;
  background: rgba(255,255,255,0.08);
  z-index: 40;
  pointer-events: none;
}
@media (max-width: 640px) {
  #progress { right: 6px; }
}
#progress > span {
  display: block;
  width: 100%; height: 100%;
  background: var(--amber);
  transform: scaleY(0);
  transform-origin: top center;
  will-change: transform;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  #stage { display: none; }
  .reveal, .rise { transform: none !important; opacity: 1 !important; transition: none !important; }
  .amber-rule { transform: scaleX(1) !important; transition: none !important; }
  .stat::before { transform: scaleX(1) !important; transition: none !important; }
  #glitch { display: none; }
  .consult-form, .form-success { transition: opacity .01s !important; transform: none !important; }
  .success-ring, .success-tick { stroke-dashoffset: 0; animation: none !important; }
  .btn.is-sending .btn-spinner { animation: none !important; }
}

/* ---------- Mobile nav: hamburger + full-screen overlay ---------- */
#nav-toggle {
  display: none;
  position: relative;
  width: 36px;
  height: 36px;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  z-index: 2;
}
#nav-toggle span {
  position: absolute;
  left: 8px;
  right: 8px;
  height: 1px;
  background: var(--fg);
  transition: top .3s var(--ease), transform .3s var(--ease);
}
#nav-toggle span:first-child { top: 13px; }
#nav-toggle span:last-child  { top: 22px; }
body.menu-open #nav-toggle span:first-child { top: 17px; transform: rotate(45deg); }
body.menu-open #nav-toggle span:last-child  { top: 17px; transform: rotate(-45deg); }

#nav-menu {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(14, 16, 11, 0.86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s var(--ease);
}
body.menu-open #nav-menu {
  opacity: 1;
  pointer-events: auto;
}
#nav-menu nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 0 24px;
}
#nav-menu a {
  position: relative;
  font-size: clamp(26px, 6.4vw, 38px);
  font-weight: 300;
  letter-spacing: -0.01em;
  color: var(--fg);
  padding: 4px 12px;
  transform: translateY(18px);
  opacity: 0;
  transition: transform .45s var(--ease), opacity .45s var(--ease), color .25s var(--ease);
}
#nav-menu a::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 0;
  height: 1px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .35s var(--ease);
}
#nav-menu a:hover::after,
#nav-menu a:active::after { transform: scaleX(1); }
/* Primary CTA inside the mobile menu — filled amber pill so the hierarchy
   (primary action vs. secondary nav) is unambiguous. */
#nav-menu a.menu-cta {
  margin-top: 14px;
  padding: 16px 36px;
  background: var(--amber);
  color: #1a1004;
  border-radius: 999px;
  font-size: clamp(15px, 3.4vw, 18px);
  letter-spacing: 0.04em;
  transition: transform .45s var(--ease), opacity .45s var(--ease), background .25s var(--ease);
}
#nav-menu a.menu-cta::after { display: none; }
#nav-menu a.menu-cta:hover,
#nav-menu a.menu-cta:active { background: #ffbd3a; }
body.menu-open #nav-menu a {
  transform: translateY(0);
  opacity: 1;
}
body.menu-open #nav-menu a:nth-child(1) { transition-delay: .08s; }
body.menu-open #nav-menu a:nth-child(2) { transition-delay: .14s; }
body.menu-open #nav-menu a:nth-child(3) { transition-delay: .20s; }

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
  .nav-links { display: none; }
  #nav-toggle { display: block; }
}
