/* =============================================================================
 * ReImagine Ranch — Master Plan Landing Page
 * Visual language: Maplable "Deep Space Operations" HUD, retuned for land /
 * terra. Mint operator accent (#64ffda) + a warm "terra" amber for ranch soul.
 * Self-contained. No build step. Drop the folder on a web server and it runs.
 * ============================================================================= */

:root {
  /* Deep space ops base */
  --void: #04070d;
  --base: #080d16;
  --surface: #0f1623;
  --surface-2: #151f30;
  --line: rgba(100, 255, 218, 0.1);
  --line-strong: rgba(100, 255, 218, 0.22);

  /* Operator mint accent */
  --mint: #64ffda;
  --mint-dim: rgba(100, 255, 218, 0.62);
  --mint-faint: rgba(100, 255, 218, 0.16);
  --mint-glow: rgba(100, 255, 218, 0.38);

  /* Terra warmth — ranch / land soul */
  --terra: #f5b969;
  --terra-deep: #c8893c;
  --terra-faint: rgba(245, 185, 105, 0.16);

  /* Secondary data accents */
  --blue: #5fb8f8;
  --violet: #b794f6;
  --red: #ef5350;

  /* Text */
  --text: #e7eef7;
  --text-dim: #9aa9bd;
  --text-faint: #5f6f85;

  /* Type */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;

  --tight: -0.035em;
  --wide: 0.06em;
  --mono-wide: 0.18em;

  --radius: 0.6rem;
  --radius-lg: 1rem;
  --radius-xl: 1.4rem;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 600ms;

  --maxw: 1240px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--void);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--mint);
  color: var(--void);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* Subtle film grain + scanline overlay on the whole page (operator feel) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9000;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.014) 0px,
    rgba(255, 255, 255, 0.014) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay;
  opacity: 0.5;
}

/* ----------------------------------------------------------------------------- */
/* Shared primitives                                                             */
/* ----------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(1.2rem, 4vw, 3rem);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: var(--mono-wide);
  text-transform: uppercase;
  color: var(--mint-dim);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 10px var(--mint);
  animation: pulse 2.4s var(--ease) infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.7);
  }
}

h1,
h2,
h3 {
  font-weight: 700;
  letter-spacing: var(--tight);
  line-height: 1.05;
}

.section-head {
  max-width: 720px;
  margin-bottom: clamp(2.4rem, 5vw, 4rem);
}

.section-head h2 {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  margin: 1rem 0 1.1rem;
}

.section-head p {
  font-size: clamp(1.02rem, 1.6vw, 1.22rem);
  color: var(--text-dim);
  max-width: 60ch;
}

.grad {
  background: linear-gradient(100deg, var(--mint) 0%, #bafff0 40%, var(--terra) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

section {
  position: relative;
  padding: clamp(4.5rem, 10vw, 9rem) 0;
}

/* Hairline separators between sections */
section + section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(92%, var(--maxw));
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}

/* ----------------------------------------------------------------------------- */
/* Nav                                                                           */
/* ----------------------------------------------------------------------------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(0px);
}

.nav.scrolled {
  background: rgba(8, 13, 22, 0.72);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 700;
  letter-spacing: var(--tight);
  font-size: 1.05rem;
}

.brand .mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

.brand small {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: var(--mono-wide);
  color: var(--text-faint);
  text-transform: uppercase;
  font-weight: 400;
  margin-top: 1px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  font-size: 0.86rem;
  color: var(--text-dim);
}

.nav-links a {
  transition: color var(--dur) var(--ease);
  position: relative;
}

.nav-links a:not(.btn):hover {
  color: var(--mint);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: var(--wide);
  text-transform: uppercase;
  padding: 0.7rem 1.3rem;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  color: var(--mint);
  background: var(--mint-faint);
  cursor: pointer;
  transition: all var(--dur) var(--ease);
  white-space: nowrap;
}

.btn:hover {
  background: var(--mint);
  color: var(--void);
  box-shadow: 0 0 26px var(--mint-glow);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--mint);
  background: var(--mint-faint);
  color: var(--mint);
  box-shadow: none;
}

.btn-lg {
  padding: 0.95rem 1.8rem;
  font-size: 0.84rem;
}

/* ----------------------------------------------------------------------------- */
/* Hero + 3D canvas                                                              */
/* ----------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 70px;
}

#scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

/* Radial + horizon gradient sitting behind / blended with the canvas */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(100, 255, 218, 0.08), transparent 55%),
    radial-gradient(90% 60% at 80% 110%, rgba(245, 185, 105, 0.07), transparent 60%),
    linear-gradient(180deg, var(--void) 0%, var(--base) 60%, #060a12 100%);
}

/* Vignette + bottom fade so the canvas melts into the page */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(130% 90% at 50% 40%, transparent 55%, rgba(4, 7, 13, 0.6) 100%),
    linear-gradient(180deg, rgba(4, 7, 13, 0.5) 0%, transparent 22%, transparent 70%, var(--void) 100%);
}

.hero-content {
  position: relative;
  z-index: 3;
  width: 100%;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: center;
}

@media (max-width: 980px) {
  .hero-content {
    grid-template-columns: 1fr;
  }
}

.hero-copy h1 {
  font-size: clamp(2.8rem, 8vw, 6.2rem);
  margin: 1.4rem 0;
  line-height: 0.96;
}

.hero-copy .lede {
  font-size: clamp(1.05rem, 1.9vw, 1.35rem);
  color: var(--text-dim);
  max-width: 42ch;
  margin-bottom: 2.2rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.hero-stats {
  display: flex;
  gap: 2.4rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.stat .num {
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: var(--mint);
  font-weight: 600;
  letter-spacing: var(--tight);
}

.stat .lbl {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: var(--mono-wide);
  text-transform: uppercase;
  color: var(--text-faint);
  margin-top: 0.3rem;
}

/* Floating HUD telemetry card on the right of hero */
.hud-card {
  justify-self: end;
  width: min(360px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(15, 22, 35, 0.72), rgba(8, 13, 22, 0.55));
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

@media (max-width: 980px) {
  .hud-card {
    display: none;
  }
}

.hud-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: var(--mono-wide);
  text-transform: uppercase;
  color: var(--text-dim);
}

.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--mint);
}

.live-dot::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 8px var(--mint);
  animation: pulse 1.6s var(--ease) infinite;
}

.hud-rows {
  padding: 0.6rem 0;
}

.hud-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.hud-row .k {
  color: var(--text-faint);
  letter-spacing: var(--wide);
  text-transform: uppercase;
  font-size: 0.66rem;
}

.hud-row .v {
  color: var(--text);
}

.hud-row .v.mint {
  color: var(--mint);
}

.hud-row .v.terra {
  color: var(--terra);
}

/* Layer toggles (drives the 3D scene) */
.layer-toggles {
  border-top: 1px solid var(--line);
  padding: 0.9rem 1.1rem 1.1rem;
}

.layer-toggles .lt-title {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: var(--mono-wide);
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.7rem;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.32rem 0;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-dim);
  user-select: none;
  transition: color var(--dur) var(--ease);
}

.toggle:hover {
  color: var(--text);
}

.toggle .box {
  width: 15px;
  height: 15px;
  border-radius: 4px;
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
  transition: all var(--dur) var(--ease);
  flex-shrink: 0;
}

.toggle .box::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--mint);
  transform: scale(0);
  transition: transform var(--dur) var(--ease);
  box-shadow: 0 0 8px var(--mint);
}

.toggle input {
  display: none;
}

.toggle input:checked + .box {
  border-color: var(--mint);
}

.toggle input:checked + .box::after {
  transform: scale(1);
}

.toggle input:checked ~ .lbl {
  color: var(--text);
}

/* Scroll cue */
.scroll-cue {
  position: absolute;
  bottom: 1.6rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: var(--mono-wide);
  text-transform: uppercase;
  color: var(--text-faint);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  animation: float 2.6s var(--ease) infinite;
}

.scroll-cue .line {
  width: 1px;
  height: 34px;
  background: linear-gradient(var(--mint), transparent);
}

@keyframes float {
  0%,
  100% {
    transform: translate(-50%, 0);
    opacity: 0.7;
  }
  50% {
    transform: translate(-50%, 6px);
    opacity: 1;
  }
}

/* DOM-projected PoI labels over the canvas */
#poi-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.poi {
  position: absolute;
  transform: translate(-50%, -100%);
  will-change: transform, opacity;
  white-space: nowrap;
}

.poi .tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: var(--wide);
  text-transform: uppercase;
  padding: 0.3rem 0.6rem;
  border-radius: 0.4rem;
  border: 1px solid var(--line-strong);
  background: rgba(8, 13, 22, 0.8);
  backdrop-filter: blur(6px);
  color: var(--mint);
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.5);
}

.poi .tag.terra {
  color: var(--terra);
  border-color: var(--terra-faint);
}

.poi .tag::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.poi .stem {
  width: 1px;
  height: 22px;
  margin: 2px auto 0;
  background: linear-gradient(var(--mint-dim), transparent);
}

/* ----------------------------------------------------------------------------- */
/* Marquee strip                                                                 */
/* ----------------------------------------------------------------------------- */
.strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--base);
  padding: 1.1rem 0;
  overflow: hidden;
  position: relative;
  z-index: 4;
}

.strip-track {
  display: flex;
  gap: 3rem;
  width: max-content;
  animation: marquee 38s linear infinite;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: var(--wide);
  color: var(--text-faint);
  text-transform: uppercase;
}

.strip-track span {
  display: inline-flex;
  align-items: center;
  gap: 3rem;
}

.strip-track b {
  color: var(--mint-dim);
  font-weight: 500;
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* ----------------------------------------------------------------------------- */
/* Generic card grids                                                            */
/* ----------------------------------------------------------------------------- */
.grid {
  display: grid;
  gap: 1.2rem;
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 900px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--surface), rgba(8, 13, 22, 0.6));
  padding: 1.7rem;
  overflow: hidden;
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(160deg, var(--mint-faint), transparent 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.card:hover::before {
  opacity: 1;
}

.card .ico {
  width: 44px;
  height: 44px;
  border-radius: 0.6rem;
  display: grid;
  place-items: center;
  background: var(--mint-faint);
  border: 1px solid var(--line);
  margin-bottom: 1.1rem;
  color: var(--mint);
}

.card .ico.terra {
  background: var(--terra-faint);
  color: var(--terra);
}

.card .ico svg {
  width: 22px;
  height: 22px;
}

.card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.55rem;
}

.card p {
  color: var(--text-dim);
  font-size: 0.95rem;
}

.card .idx {
  position: absolute;
  top: 1.2rem;
  right: 1.3rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-faint);
  letter-spacing: var(--wide);
}

/* ----------------------------------------------------------------------------- */
/* Process timeline                                                              */
/* ----------------------------------------------------------------------------- */
.timeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

@media (max-width: 900px) {
  .timeline {
    grid-template-columns: 1fr;
  }
}

.phase {
  background: var(--surface);
  padding: 1.8rem 1.4rem;
  position: relative;
  transition: background var(--dur) var(--ease);
}

.phase:hover {
  background: var(--surface-2);
}

.phase .ph-no {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: var(--mono-wide);
  color: var(--mint-dim);
}

.phase .ph-bar {
  height: 3px;
  border-radius: 3px;
  margin: 0.9rem 0 1.2rem;
  background: linear-gradient(90deg, var(--mint), var(--terra));
  opacity: 0.55;
  transform-origin: left;
}

.phase h3 {
  font-size: 1.05rem;
  margin-bottom: 0.7rem;
}

.phase ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.phase li {
  font-size: 0.84rem;
  color: var(--text-dim);
  padding-left: 1rem;
  position: relative;
}

.phase li::before {
  content: "›";
  position: absolute;
  left: 0;
  color: var(--mint-dim);
}

/* ----------------------------------------------------------------------------- */
/* Audiences split                                                               */
/* ----------------------------------------------------------------------------- */
.aud {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

@media (max-width: 900px) {
  .aud {
    grid-template-columns: 1fr;
  }
}

.aud-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem 1.8rem;
  background: linear-gradient(180deg, var(--surface), rgba(8, 13, 22, 0.5));
  position: relative;
  overflow: hidden;
}

.aud-card .role {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: var(--mono-wide);
  text-transform: uppercase;
  color: var(--terra);
  margin-bottom: 1rem;
  display: block;
}

.aud-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.9rem;
}

.aud-card p {
  color: var(--text-dim);
  font-size: 0.96rem;
}

.aud-card .big {
  position: absolute;
  bottom: -1.4rem;
  right: 0.4rem;
  font-family: var(--font-mono);
  font-size: 6rem;
  font-weight: 700;
  color: var(--mint);
  opacity: 0.05;
  line-height: 1;
}

/* ----------------------------------------------------------------------------- */
/* Deliverables / file list                                                      */
/* ----------------------------------------------------------------------------- */
.files {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.file {
  background: var(--surface);
  padding: 1.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: background var(--dur) var(--ease);
}

.file:hover {
  background: var(--surface-2);
}

.file .ext {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: var(--wide);
  color: var(--mint);
  border: 1px solid var(--line-strong);
  border-radius: 0.3rem;
  padding: 0.15rem 0.45rem;
  width: max-content;
  margin-bottom: 0.5rem;
}

.file .fname {
  font-weight: 600;
  font-size: 1rem;
}

.file .fdesc {
  font-size: 0.84rem;
  color: var(--text-faint);
}

/* ----------------------------------------------------------------------------- */
/* Add-ons list                                                                  */
/* ----------------------------------------------------------------------------- */
.addons {
  display: flex;
  flex-direction: column;
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--line);
}

.addon {
  background: var(--surface);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.4rem;
  padding: 1.4rem 1.8rem;
  transition: background var(--dur) var(--ease);
}

.addon:hover {
  background: var(--surface-2);
}

.addon .tier {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: var(--mono-wide);
  text-transform: uppercase;
  color: var(--terra);
  border: 1px solid var(--terra-faint);
  border-radius: 0.4rem;
  padding: 0.35rem 0.6rem;
  white-space: nowrap;
}

.addon .body h3 {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.addon .body p {
  font-size: 0.9rem;
  color: var(--text-dim);
}

.addon .plus {
  font-family: var(--font-mono);
  color: var(--mint);
  font-size: 1.4rem;
}

@media (max-width: 700px) {
  .addon {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }
  .addon .plus {
    display: none;
  }
}

/* ----------------------------------------------------------------------------- */
/* CTA                                                                           */
/* ----------------------------------------------------------------------------- */
.cta {
  text-align: center;
}

.cta-panel {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl);
  padding: clamp(2.5rem, 6vw, 5rem);
  background:
    radial-gradient(80% 120% at 50% 0%, rgba(100, 255, 218, 0.1), transparent 60%),
    linear-gradient(180deg, var(--surface), rgba(8, 13, 22, 0.6));
  position: relative;
  overflow: hidden;
}

.cta-panel h2 {
  font-size: clamp(2rem, 5vw, 3.6rem);
  margin-bottom: 1.2rem;
}

.cta-panel p {
  color: var(--text-dim);
  font-size: 1.1rem;
  max-width: 52ch;
  margin: 0 auto 2.2rem;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ----------------------------------------------------------------------------- */
/* Footer                                                                        */
/* ----------------------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 3rem 0 4rem;
  background: var(--base);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.4rem;
}

.footer .brand {
  font-size: 1rem;
}

.footer .meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-faint);
  letter-spacing: var(--wide);
  text-align: right;
}

.footer .meta a:hover {
  color: var(--mint);
}

/* ----------------------------------------------------------------------------- */
/* Scroll reveal                                                                 */
/* ----------------------------------------------------------------------------- */
/* Only hide reveal elements when JS is active (see the .js flag set in <head>).
   If scripts are blocked, content renders normally instead of stuck invisible. */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  will-change: opacity, transform;
}

.js .reveal.in {
  opacity: 1;
  transform: none;
}

.reveal[data-d="1"] {
  transition-delay: 0.08s;
}
.reveal[data-d="2"] {
  transition-delay: 0.16s;
}
.reveal[data-d="3"] {
  transition-delay: 0.24s;
}
.reveal[data-d="4"] {
  transition-delay: 0.32s;
}

/* ----------------------------------------------------------------------------- */
/* Accessibility — skip link, focus, mobile nav                                  */
/* ----------------------------------------------------------------------------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 10001;
  padding: 0.65rem 1rem;
  background: var(--mint);
  color: var(--void);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: var(--wide);
  text-transform: uppercase;
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 1rem;
}

:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(8, 13, 22, 0.6);
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--mint);
  border-radius: 1px;
}

@media (max-width: 880px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem;
    background: rgba(8, 13, 22, 0.96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
  }

  .nav-links:not([hidden]) {
    display: flex;
  }

  /* Must be inside this breakpoint: on desktop the panel keeps the [hidden]
     attribute but should stay visible. The base `.nav-links{display:flex}`
     rule overrides the UA `[hidden]` default, so we re-assert it here. */
  .nav-links[hidden] {
    display: none;
  }

  .nav-links a:not(.btn) {
    display: block;
    padding: 0.85rem 0.5rem;
    border-bottom: 1px solid var(--line);
  }

  .nav-links .btn {
    margin-top: 0.75rem;
    justify-content: center;
  }

  body.nav-open {
    overflow: hidden;
  }
}

/* ----------------------------------------------------------------------------- */
/* Lead wizard / scope builder                                                   */
/* ----------------------------------------------------------------------------- */
.lead-wizard {
  max-width: 720px;
  margin: 2rem auto 0;
  text-align: left;
}

.lead-progress {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: var(--mono-wide);
  text-transform: uppercase;
  color: var(--text-faint);
  text-align: center;
  margin-bottom: 1.2rem;
}

.lead-step-indicators {
  display: flex;
  justify-content: center;
  gap: 0.5rem 1rem;
  flex-wrap: wrap;
  list-style: none;
  margin-bottom: 1.8rem;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: var(--wide);
  text-transform: uppercase;
  color: var(--text-faint);
}

.lead-step-indicator {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.lead-step-indicator span {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 0.65rem;
}

.lead-step-indicator.is-active {
  color: var(--mint);
}

.lead-step-indicator.is-active span,
.lead-step-indicator.is-done span {
  border-color: var(--mint);
  background: var(--mint-faint);
  color: var(--mint);
}

.lead-step-title {
  font-size: 1.15rem;
  margin-bottom: 1.2rem;
  color: var(--text);
}

.lead-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.2rem;
}

.lead-field-full {
  grid-column: 1 / -1;
}

.lead-field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: var(--wide);
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.35rem;
}

.lead-field .req {
  color: var(--terra);
}

.lead-field input,
.lead-field select,
.lead-field textarea {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(4, 7, 13, 0.55);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: border-color var(--dur) var(--ease);
}

.lead-field input:focus,
.lead-field select:focus,
.lead-field textarea:focus {
  border-color: var(--mint);
}

.lead-field input[aria-invalid="true"],
.lead-field select[aria-invalid="true"] {
  border-color: var(--red);
}

.lead-field-error {
  display: block;
  min-height: 1.2em;
  margin-top: 0.25rem;
  font-size: 0.78rem;
  color: var(--red);
}

.lead-honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

.scope-count {
  font-size: 0.88rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.scope-builder {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  max-height: min(52vh, 420px);
  overflow-y: auto;
  padding-right: 0.25rem;
}

.scope-group {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 0;
}

.scope-group legend {
  padding: 0 0.25rem;
  margin-bottom: 0.6rem;
}

.scope-phase {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--mint);
}

.scope-desc {
  display: block;
  font-size: 0.78rem;
  color: var(--text-faint);
  margin-top: 0.15rem;
}

.scope-items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.scope-item {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.45rem 0.35rem;
  font-size: 0.84rem;
  color: var(--text-dim);
  cursor: pointer;
  border-radius: 4px;
  transition: background var(--dur) var(--ease);
}

.scope-item:hover {
  background: var(--mint-faint);
}

.scope-item input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.scope-box {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: rgba(4, 7, 13, 0.5);
}

.scope-item input:checked + .scope-box {
  background: var(--mint);
  border-color: var(--mint);
  box-shadow: inset 0 0 0 2px var(--void);
}

.scope-item input:focus-visible + .scope-box {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
}

.lead-review-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.45rem 1.2rem;
  font-size: 0.88rem;
  margin-bottom: 1.2rem;
}

.lead-review-list dt {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: var(--wide);
  text-transform: uppercase;
  color: var(--text-faint);
}

.lead-review-list dd {
  color: var(--text-dim);
  margin: 0;
}

.lead-consent {
  font-size: 0.78rem;
  color: var(--text-faint);
  line-height: 1.5;
}

.lead-consent a {
  color: var(--mint);
  text-decoration: underline;
}

.lead-nav {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.6rem;
}

.lead-nav-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

/* Submit sits on its own row below Back/Continue, full-width. */
.lead-nav .btn[data-action="submit"] {
  width: 100%;
  justify-content: center;
}

.lead-status {
  min-height: 1.4em;
  margin-top: 1rem;
  text-align: center;
  font-size: 0.88rem;
}

.lead-status.is-error {
  color: var(--red);
}

.lead-status.is-success,
.lead-status.is-info {
  color: var(--mint);
}

.lead-success {
  max-width: 520px;
  margin: 2rem auto 0;
}

.lead-success h3 {
  font-size: 1.6rem;
  color: var(--mint);
  margin-bottom: 0.8rem;
}

.lead-success p {
  color: var(--text-dim);
  margin-bottom: 1.5rem;
}

.lead-fallback {
  margin-top: 1.5rem;
  font-size: 0.82rem;
  color: var(--text-faint);
}

.lead-fallback a {
  color: var(--mint);
  text-decoration: underline;
}

@media (max-width: 640px) {
  .lead-grid,
  .scope-items {
    grid-template-columns: 1fr;
  }

  /* iOS Safari auto-zooms the page when focusing an input whose font-size is
     < 16px. Force 16px on touch layout so the form doesn't jump on focus. */
  .lead-field input,
  .lead-field select,
  .lead-field textarea {
    font-size: 16px;
  }

  /* Drop the inner scroll region on phones — a nested scroll box inside the
     page scroll is a mobile UX trap. Let the whole page scroll instead. */
  .scope-builder {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* shadow token used above */
:root {
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}
