/* ============================================================
   Polaris Business Builders Group
   Design tokens — dark is the origin, light is the inversion.
   ============================================================ */

:root {
  --navy-900: #060F1E;
  --navy-800: #0B1B33;
  --navy-700: #12294A;
  --navy-600: #1B3A63;
  --gold-400: #F2C14E;
  --gold-500: #D9A32E;
  --ice-100:  #E8EEF7;
  --ice-300:  #A9BBD3;
  --ice-500:  #6F86A6;

  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --step--1: clamp(0.82rem, 0.79rem + 0.14vw, 0.9rem);
  --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.09rem);
  --step-1:  clamp(1.2rem, 1.12rem + 0.4vw, 1.45rem);
  --step-2:  clamp(1.5rem, 1.34rem + 0.8vw, 2rem);
  --step-3:  clamp(1.9rem, 1.6rem + 1.5vw, 2.9rem);
  --step-4:  clamp(2.4rem, 1.85rem + 2.7vw, 4.3rem);

  --measure: 63ch;
  --radius: 14px;
  --radius-sm: 9px;
  --gutter: clamp(1.15rem, 5vw, 2.75rem);
  --section-y: clamp(3.75rem, 9vw, 7.5rem);
  --shell: 1180px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Dark theme (default) ---------- */
:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg: var(--navy-900);
  --bg-raise: #0C1A30;
  --bg-sunken: #040A15;
  --surface: rgba(255, 255, 255, 0.038);
  --surface-strong: rgba(255, 255, 255, 0.062);
  --border: rgba(169, 187, 211, 0.17);
  --border-strong: rgba(169, 187, 211, 0.32);
  --text: #EEF3FA;
  --text-muted: #A3B5CE;
  --text-faint: #74879F;
  --accent: var(--gold-400);
  --accent-ink: #1A1204;
  --accent-soft: rgba(242, 193, 78, 0.13);
  --logo-core: var(--gold-400);
  --shadow: 0 18px 44px -22px rgba(0, 0, 0, 0.85);
  --starfield-opacity: 1;
}

/* ---------- Light theme ---------- */
[data-theme="light"] {
  color-scheme: light;
  --bg: #FBFCFE;
  --bg-raise: #FFFFFF;
  --bg-sunken: #F1F5FA;
  --surface: #FFFFFF;
  --surface-strong: #F4F8FD;
  --border: rgba(18, 41, 74, 0.14);
  --border-strong: rgba(18, 41, 74, 0.28);
  --text: #0A1729;
  --text-muted: #47607F;
  --text-faint: #6B819C;
  --accent: #A9761A;
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(169, 118, 26, 0.1);
  --logo-core: var(--gold-500);
  --shadow: 0 16px 38px -24px rgba(10, 23, 41, 0.4);
  --starfield-opacity: 0;
}

/* ============================================================
   Base
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}

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

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.021em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.7rem 1.15rem;
  z-index: 999;
  font-weight: 600;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

.shell {
  width: min(100% - (var(--gutter) * 2), var(--shell));
  margin-inline: auto;
}

.section { padding-block: var(--section-y); position: relative; }

/* ============================================================
   Starfield — ambient, dark mode only
   ============================================================ */

.starfield {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: var(--starfield-opacity);
  transition: opacity 0.5s var(--ease);
  background-image:
    radial-gradient(1.4px 1.4px at 12% 18%, rgba(255,255,255,0.5) 50%, transparent 51%),
    radial-gradient(1px 1px at 34% 8%, rgba(255,255,255,0.35) 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 68% 22%, rgba(242,193,78,0.5) 50%, transparent 51%),
    radial-gradient(1px 1px at 86% 12%, rgba(255,255,255,0.3) 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 22% 46%, rgba(255,255,255,0.3) 50%, transparent 51%),
    radial-gradient(1px 1px at 54% 62%, rgba(255,255,255,0.22) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 78% 54%, rgba(255,255,255,0.28) 50%, transparent 51%),
    radial-gradient(1px 1px at 8% 74%, rgba(255,255,255,0.25) 50%, transparent 51%),
    radial-gradient(1.3px 1.3px at 44% 88%, rgba(242,193,78,0.32) 50%, transparent 51%),
    radial-gradient(1px 1px at 92% 82%, rgba(255,255,255,0.2) 50%, transparent 51%);
}

/* ============================================================
   Header
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background-color 0.4s var(--ease);
}
.site-header[data-scrolled="true"] { border-bottom-color: var(--border); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  min-height: 4.6rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  text-decoration: none;
  color: var(--text);
  margin-right: auto;
}
.brand svg { width: 34px; height: 34px; flex: none; color: var(--text); }
.brand-text { display: flex; flex-direction: column; line-height: 1.06; }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.14rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.brand-sub {
  font-size: 0.62rem;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 500;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: var(--step--1);
  font-weight: 500;
  padding: 0.5rem 0.78rem;
  border-radius: 100px;
  transition: color 0.2s, background-color 0.2s;
  white-space: nowrap;
}
.nav a:hover { color: var(--text); background: var(--surface-strong); }

/* ---------- Theme switch ---------- */

.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  padding: 3px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 100px;
  flex: none;
}
.theme-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-faint);
  width: 31px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 100px;
  cursor: pointer;
  transition: color 0.2s, background-color 0.25s var(--ease);
}
.theme-switch button svg { width: 15px; height: 15px; }
.theme-switch button:hover { color: var(--text); }
.theme-switch button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-ink);
}

.nav-toggle {
  display: none;
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--text);
  width: 40px;
  height: 36px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  place-items: center;
}
.nav-toggle svg { width: 18px; height: 18px; }

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.88rem 1.5rem;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.005em;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.18s var(--ease), background-color 0.2s, border-color 0.2s, color 0.2s;
  text-align: center;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, var(--text)); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { background: var(--surface-strong); border-color: var(--accent); }

.btn-block { width: 100%; }

/* ============================================================
   Hero
   ============================================================ */

.hero {
  position: relative;
  padding-block: clamp(3.5rem, 8vw, 6.5rem) clamp(3.5rem, 8vw, 6rem);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -30%;
  left: 50%;
  width: min(115vw, 1100px);
  aspect-ratio: 1;
  transform: translateX(-50%);
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 62%);
  pointer-events: none;
  z-index: 0;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 0.45rem 0.95rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
}
.eyebrow span[aria-hidden] { color: var(--accent); }

.hero h1 {
  font-size: var(--step-4);
  font-weight: 600;
  max-width: 17ch;
  margin-bottom: 1.35rem;
}
.hero h1 em {
  font-style: italic;
  color: var(--accent);
}

.hero-lede {
  font-size: var(--step-1);
  color: var(--text-muted);
  max-width: 46ch;
  line-height: 1.55;
  margin-bottom: 2.1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.6rem;
}

.hero-note {
  font-size: var(--step--1);
  color: var(--text-faint);
  max-width: 52ch;
  line-height: 1.6;
  border-left: 2px solid var(--border-strong);
  padding-left: 1rem;
}

/* ---------- Hero panel: the signature element ---------- */

.hero-panel {
  position: relative;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 8px);
  background:
    linear-gradient(165deg, var(--surface-strong), transparent 65%),
    var(--bg-raise);
  padding: clamp(1.75rem, 3.5vw, 2.5rem);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hero-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 78% 8%, var(--accent-soft), transparent 55%);
  pointer-events: none;
}

.panel-mark {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding-bottom: 1.4rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.panel-mark svg { width: 52px; height: 52px; color: var(--text); flex: none; }
.panel-mark-text { display: flex; flex-direction: column; gap: 0.15rem; }
.panel-mark-title {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.015em;
}
.panel-mark-sub {
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.stat-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat {
  background: var(--bg-raise);
  padding: 1.15rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  font-weight: 600;
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.stat-label {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ============================================================
   Section headings
   ============================================================ */

.section-head { max-width: var(--measure); margin-bottom: clamp(2.2rem, 4.5vw, 3.4rem); }
.section-head.center { margin-inline: auto; text-align: center; }

.section-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.section-head h2 { font-size: var(--step-3); margin-bottom: 1.05rem; }
.section-head p { color: var(--text-muted); font-size: var(--step-1); line-height: 1.55; }

/* ============================================================
   Problem section — leak list
   ============================================================ */

.problem { background: var(--bg-sunken); border-block: 1px solid var(--border); }

.leak-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0.7rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.leak {
  display: flex;
  align-items: center;
  gap: 0.72rem;
  padding: 0.95rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--step--1);
  color: var(--text-muted);
  transition: border-color 0.25s, color 0.25s, transform 0.25s var(--ease);
}
.leak:hover { border-color: var(--border-strong); color: var(--text); transform: translateY(-2px); }
.leak::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
  opacity: 0.65;
}

/* ============================================================
   Services
   ============================================================ */

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  gap: 1.1rem;
}
.service {
  padding: 1.85rem 1.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.25s, transform 0.25s var(--ease), box-shadow 0.25s;
}
.service:hover {
  border-color: var(--border-strong);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.service-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 1.15rem;
}
.service-icon svg { width: 20px; height: 20px; }
.service h3 { font-size: var(--step-1); margin-bottom: 0.6rem; }
.service p { color: var(--text-muted); font-size: var(--step--1); line-height: 1.62; }

.aside-note {
  margin-top: 1.6rem;
  padding: 1.6rem 1.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  background: var(--surface);
}
.aside-note h3 { font-size: var(--step-1); margin-bottom: 0.6rem; }
.aside-note p { color: var(--text-muted); font-size: var(--step-0); max-width: var(--measure); }

/* ============================================================
   Packages
   ============================================================ */

.packages { background: var(--bg-sunken); border-block: 1px solid var(--border); }

.package-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(272px, 1fr));
  gap: 1.15rem;
  align-items: start;
}

.package {
  display: flex;
  flex-direction: column;
  padding: 1.9rem 1.65rem;
  background: var(--bg-raise);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  height: 100%;
  transition: border-color 0.25s, transform 0.25s var(--ease), box-shadow 0.25s;
}
.package:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}
.package[data-featured] {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft), var(--shadow);
}

.package-flag {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 100px;
  padding: 0.3rem 0.7rem;
  margin-bottom: 0.9rem;
}

.package h3 { font-size: var(--step-1); margin-bottom: 0.75rem; }

.price {
  display: flex;
  align-items: baseline;
  gap: 0.22rem;
  margin-bottom: 0.9rem;
}
.price-amount {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.5vw, 2.7rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
}
.price-period { font-size: var(--step--1); color: var(--text-faint); font-weight: 500; }

.package-best {
  font-size: var(--step--1);
  color: var(--text-muted);
  line-height: 1.6;
  padding-bottom: 1.3rem;
  margin-bottom: 1.3rem;
  border-bottom: 1px solid var(--border);
}

.feature-list {
  list-style: none;
  margin: 0 0 1.7rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.68rem;
  flex: 1;
}
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.62rem;
  font-size: var(--step--1);
  color: var(--text-muted);
  line-height: 1.5;
}
.feature-list svg {
  width: 15px;
  height: 15px;
  flex: none;
  margin-top: 0.18rem;
  color: var(--accent);
}

.fineprint {
  margin-top: 1.7rem;
  font-size: var(--step--1);
  color: var(--text-faint);
  max-width: var(--measure);
  line-height: 1.6;
}

/* ============================================================
   Snapshot
   ============================================================ */

.snapshot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 3.75rem);
  align-items: start;
}

.chip-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.9rem;
}
.chip {
  font-size: var(--step--1);
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 100px;
  padding: 0.44rem 0.9rem;
  transition: border-color 0.2s, color 0.2s;
}
.chip:hover { border-color: var(--accent); color: var(--text); }

.fit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 1.1rem;
  margin-top: clamp(2.4rem, 5vw, 3.4rem);
}
.fit-card {
  padding: 1.65rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}
.fit-card h3 {
  font-size: var(--step-1);
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.fit-card h3 svg { width: 18px; height: 18px; flex: none; }
.fit-card[data-tone="yes"] h3 svg { color: var(--accent); }
.fit-card[data-tone="no"] h3 svg { color: var(--text-faint); }
.fit-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.62rem;
}
.fit-card li {
  font-size: var(--step--1);
  color: var(--text-muted);
  line-height: 1.55;
  padding-left: 1.05rem;
  position: relative;
}
.fit-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--border-strong);
}
.fit-card[data-tone="yes"] li::before { background: var(--accent); }

/* ============================================================
   Service area
   ============================================================ */

.area { background: var(--bg-sunken); border-block: 1px solid var(--border); }

.town-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.65rem;
  margin-top: 2.2rem;
}
.town {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: var(--step--1);
  color: var(--text-muted);
  transition: border-color 0.25s, color 0.25s, transform 0.25s var(--ease);
}
.town:hover { border-color: var(--accent); color: var(--text); transform: translateY(-2px); }
.town svg { width: 13px; height: 13px; flex: none; color: var(--accent); opacity: 0.8; }

/* ============================================================
   Form section
   ============================================================ */

.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 2.75rem);
  align-items: start;
}

.notice {
  padding: 1.2rem 1.35rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: var(--step--1);
  color: var(--text-muted);
  line-height: 1.6;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-top: 1.6rem;
}
.notice svg { width: 17px; height: 17px; flex: none; margin-top: 0.15rem; color: var(--accent); }
.notice a { color: var(--accent); font-weight: 600; }

.form-card {
  padding: clamp(1.75rem, 3.5vw, 2.4rem);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-raise);
  box-shadow: var(--shadow);
}
.form-card h3 { font-size: var(--step-2); margin-bottom: 0.8rem; }
.form-card > p { color: var(--text-muted); font-size: var(--step--1); line-height: 1.6; margin-bottom: 1.5rem; }

.form-list {
  list-style: none;
  margin: 0 0 1.9rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.72rem;
}
.form-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: var(--step--1);
  color: var(--text-muted);
  line-height: 1.5;
}
.form-list svg { width: 15px; height: 15px; flex: none; margin-top: 0.18rem; color: var(--accent); }

/* ============================================================
   Referral
   ============================================================ */

.referral-card {
  padding: clamp(1.9rem, 4vw, 2.75rem);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  background: var(--surface);
  max-width: 860px;
}
.referral-card h2 { font-size: var(--step-2); margin-bottom: 1rem; }
.referral-card p { color: var(--text-muted); font-size: var(--step-0); line-height: 1.62; }
.referral-card p + p { margin-top: 0.85rem; font-size: var(--step--1); color: var(--text-faint); }

/* ============================================================
   Final CTA
   ============================================================ */

.final-cta {
  position: relative;
  background: var(--bg-sunken);
  border-top: 1px solid var(--border);
  overflow: hidden;
  text-align: center;
}
.final-cta::before {
  content: "";
  position: absolute;
  bottom: -55%;
  left: 50%;
  width: min(120vw, 1000px);
  aspect-ratio: 1;
  transform: translateX(-50%);
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 60%);
  pointer-events: none;
}
.final-cta .shell { position: relative; z-index: 1; }
.final-cta h2 { font-size: var(--step-3); max-width: 22ch; margin-inline: auto; margin-bottom: 1.15rem; }
.final-cta p {
  color: var(--text-muted);
  font-size: var(--step-1);
  max-width: 52ch;
  margin-inline: auto;
  margin-bottom: 2.1rem;
  line-height: 1.55;
}
.final-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }

/* ============================================================
   Footer
   ============================================================ */

.site-footer {
  background: var(--bg-sunken);
  border-top: 1px solid var(--border);
  padding-block: clamp(2.75rem, 6vw, 4rem) 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(1.75rem, 5vw, 3.5rem);
  align-items: start;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.1rem;
  text-decoration: none;
  color: var(--text);
}
.footer-brand svg { width: 40px; height: 40px; flex: none; }
.footer-name { font-family: var(--font-display); font-size: 1.06rem; font-weight: 700; line-height: 1.2; }
.footer-domain { font-size: var(--step--1); color: var(--text-faint); }
.footer-disclaimer {
  color: var(--text-muted);
  font-size: var(--step--1);
  line-height: 1.65;
  max-width: 54ch;
}
.footer-contact { display: flex; flex-direction: column; gap: 0.7rem; }
.footer-heading {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.35rem;
}
.footer-contact a {
  color: var(--text);
  text-decoration: none;
  font-size: var(--step-1);
  font-family: var(--font-display);
  font-weight: 600;
  transition: color 0.2s;
}
.footer-contact a:hover { color: var(--accent); }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.35rem 1.15rem; margin-top: 0.4rem; }
.footer-links a {
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--text-muted);
}
.footer-links a:hover { color: var(--accent); }

.footer-base {
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  align-items: center;
  font-size: var(--step--1);
  color: var(--text-faint);
}

/* ============================================================
   Reveal animation
   ============================================================ */

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 940px) {
  .hero-grid,
  .snapshot-grid,
  .form-grid,
  .footer-grid { grid-template-columns: 1fr; }
  .hero h1 { max-width: 20ch; }
  .hero-panel { order: -1; }
}

@media (max-width: 760px) {
  .nav-toggle { display: grid; }
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.6rem var(--gutter) 1.1rem;
    background: var(--bg-raise);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: none;
  }
  .nav[data-open="true"] { display: flex; }
  .nav a { padding: 0.85rem 0.4rem; border-radius: var(--radius-sm); }
  .site-header { position: sticky; }
  .header-inner { position: relative; }
  .btn { width: 100%; }
  .hero-actions, .final-actions { flex-direction: column; align-items: stretch; }
  .footer-base { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 420px) {
  .stat-grid { grid-template-columns: 1fr; }
  .brand-sub { display: none; }
}

/* ============================================================
   Motion / print
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

@media print {
  .site-header, .starfield, .nav-toggle, .theme-switch { display: none; }
  body { background: #fff; color: #000; }
}
