/* =========================================================================
   ATLAS — atlastrace.ai
   Premium dark "intelligence platform" design system.
   Vanilla CSS. System fonts. CSS gradients/shapes over images.
   ========================================================================= */

/* ------------------------------ Tokens ---------------------------------- */
:root {
  /* Surfaces (near-black, controlled) */
  --bg:        #06080b;
  --bg-2:      #090c11;
  --surface:   #0d1119;
  --surface-2: #11161f;
  --elevated:  #141b26;

  /* Lines & text */
  --border:      rgba(255, 255, 255, 0.08);
  --border-str:  rgba(255, 255, 255, 0.14);
  --text:        #eef2f7;
  --text-soft:   #c2ccd8;
  --muted:       #8b95a4;
  --muted-dim:   #616b7a;

  /* Signal accent (controlled steel-blue → cyan) */
  --accent:      #4ea8ff;
  --accent-2:    #38e1c6;
  --accent-deep: #2a6fd6;
  --accent-glow: rgba(78, 168, 255, 0.35);

  /* Status */
  --ok:   #35d6a4;
  --warn: #f0b64b;
  --live: #4ea8ff;

  /* Metallic text gradient */
  --metal: linear-gradient(180deg, #ffffff 0%, #cdd6e2 55%, #97a3b3 100%);
  --signal-grad: linear-gradient(120deg, #4ea8ff 0%, #38e1c6 100%);

  /* Geometry */
  --radius:    14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --maxw:      1180px;
  --shadow:    0 20px 50px -20px rgba(0, 0, 0, 0.75);
  --shadow-glow: 0 0 0 1px var(--border), 0 20px 60px -25px rgba(78, 168, 255, 0.25);

  /* Type */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
          "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  --mono: "SF Mono", ui-monospace, "Cascadia Code", "Segoe UI Mono", Menlo, Consolas, monospace;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Ambient backdrop */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 600px at 15% -5%, rgba(78, 168, 255, 0.10), transparent 60%),
    radial-gradient(800px 500px at 100% 0%, rgba(56, 225, 198, 0.06), transparent 55%),
    var(--bg);
}

h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 0.5em; font-weight: 650; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.18rem; }
p  { margin: 0 0 1rem; }

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-2); }

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

/* ------------------------------ A11y ------------------------------------ */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--accent); color: #04121f; padding: 10px 16px;
  border-radius: 0 0 8px 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

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

/* ------------------------------ Layout ---------------------------------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 820px; }

.section { padding: clamp(64px, 9vw, 120px) 0; position: relative; }
.section-alt { background:
  linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.015) 12%, rgba(255, 255, 255, 0.015) 88%, transparent);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head { max-width: 760px; margin: 0 0 48px; }
.section-head.center, .section-head { }
.eyebrow {
  display: inline-block;
  font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin-bottom: 14px;
}
.section-lead { color: var(--text-soft); font-size: 1.08rem; max-width: 62ch; }

.text-gradient {
  background: var(--signal-grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.fine-note { color: var(--muted-dim); font-size: 0.85rem; margin-top: 28px; }
.fine-note.center { text-align: center; }

/* ------------------------------ Buttons --------------------------------- */
.btn {
  --btn-py: 12px; --btn-px: 22px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: var(--btn-py) var(--btn-px);
  border-radius: 999px;
  font-weight: 600; font-size: 0.98rem;
  border: 1px solid transparent;
  cursor: pointer; transition: transform 0.15s ease, box-shadow 0.2s, background 0.2s, border-color 0.2s;
  text-align: center; white-space: nowrap; font-family: inherit;
}
.btn:active { transform: translateY(1px); }
.btn-sm { --btn-py: 9px; --btn-px: 16px; font-size: 0.9rem; }
.btn-lg { --btn-py: 15px; --btn-px: 30px; font-size: 1.02rem; }
.btn-block { width: 100%; }

.btn-primary {
  background: var(--signal-grad);
  color: #04121f;
  box-shadow: 0 10px 30px -10px var(--accent-glow), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.btn-primary:hover { color: #04121f; box-shadow: 0 14px 40px -10px var(--accent-glow); transform: translateY(-2px); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border-color: var(--border-str);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover { color: var(--text); border-color: var(--accent); background: rgba(78, 168, 255, 0.08); transform: translateY(-2px); }

/* ------------------------------ Header ---------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(6, 8, 11, 0.55);
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
}
.site-header.scrolled {
  background: rgba(6, 8, 11, 0.82);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 20px; }

.brand { display: flex; align-items: center; color: var(--text); }
.brand:hover { color: var(--text); }
/* atlas-logo-white.png is the AtlasWhite lockup with its black canvas keyed out
   to true transparency (luminance -> alpha), so it drops onto the dark header cleanly. */
.brand-logo {
  height: 48px; width: auto; display: block;
  filter: drop-shadow(0 0 10px var(--accent-glow));
  transition: transform 0.25s ease, filter 0.25s ease;
}
.brand:hover .brand-logo { transform: translateY(-1px); filter: drop-shadow(0 0 14px var(--accent-glow)); }
/* Legacy footer brand text */
.brand-name { font-weight: 750; letter-spacing: 0.22em; font-size: 1.05rem; }

.main-nav { display: flex; align-items: center; }
.nav-menu {
  display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0;
}
.nav-menu a:not(.btn) {
  color: var(--text-soft); font-size: 0.92rem; font-weight: 500;
  padding: 8px 12px; border-radius: 8px; display: inline-block;
}
.nav-menu a:not(.btn):hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav-cta-item { margin-left: 8px; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; justify-content: center;
  width: 44px; height: 44px; background: transparent; border: 1px solid var(--border-str);
  border-radius: 10px; cursor: pointer; padding: 0;
}
.nav-toggle-bar { width: 20px; height: 2px; background: var(--text); margin: 0 auto; transition: transform 0.25s, opacity 0.25s; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ------------------------------ Hero ------------------------------------ */
.hero { position: relative; overflow: hidden; padding: clamp(60px, 10vw, 120px) 0 clamp(70px, 9vw, 110px); }
.hero-radar { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: 0.55; }
.hero-glow {
  position: absolute; top: -10%; right: -5%; width: 640px; height: 640px; z-index: -1;
  background: radial-gradient(circle, rgba(78, 168, 255, 0.18), transparent 62%);
  filter: blur(20px); pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }

/* Brand identity watermark — the ATLAS signal mark as a fixed parallax layer
   pinned to the viewport, so it stays put while the page scrolls beneath it.
   logoTransparent.png has a dark sphere, so brighten + desaturate it to read on the dark bg. */
.hero-watermark {
  position: fixed; z-index: 0; pointer-events: none; user-select: none;
  left: 20%; top: 50%;
  /* --wm-shift (scroll parallax drift) and --wm-opacity (hero fade) are driven by script.js */
  transform: translate(-50%, calc(-50% + var(--wm-shift, 0px)));
  will-change: transform, opacity;
  width: min(520px, 46vw); height: auto;
  opacity: var(--wm-opacity, 0.16);
  filter: brightness(2.6) grayscale(1) drop-shadow(0 0 50px var(--accent-glow));
  transition: opacity 0.35s ease;
}
@media (max-width: 820px) {
  .hero-watermark { left: 30%; top: 44%; width: min(360px, 70vw); }
}

.badge {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 15px; border-radius: 999px;
  background: rgba(78, 168, 255, 0.08); border: 1px solid rgba(78, 168, 255, 0.3);
  color: var(--accent); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; margin-bottom: 24px;
}
.badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent-glow); animation: pulse 2.4s infinite; }

.hero-content h1 { max-width: 15ch; }
.hero-sub { font-size: 1.16rem; color: var(--text-soft); max-width: 54ch; margin: 20px 0 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 26px; }
.hero-domain { font-size: 0.9rem; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 10px var(--accent-2); }

/* Hero orb visual */
.hero-visual { display: grid; place-items: center; }
.orb { position: relative; width: min(360px, 78vw); aspect-ratio: 1; display: grid; place-items: center; }
.orb-ring { position: absolute; border-radius: 50%; border: 1px solid rgba(78, 168, 255, 0.25); inset: 0; }
.orb-ring-2 { inset: 16%; border-color: rgba(78, 168, 255, 0.32); }
.orb-ring-3 { inset: 32%; border-color: rgba(56, 225, 198, 0.3); }
.orb-core {
  width: 22%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #eaf4ff, var(--accent) 45%, var(--accent-deep) 100%);
  box-shadow: 0 0 40px var(--accent-glow), 0 0 90px rgba(56, 225, 198, 0.25);
  animation: breathe 4s ease-in-out infinite;
}
.orb-sweep {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(78, 168, 255, 0.28) 40deg, transparent 80deg);
  animation: sweep 6s linear infinite;
}
.orb-blip { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 12px var(--accent-2); }
.orb-blip-a { top: 22%; left: 30%; animation: blip 3s ease-in-out infinite; }
.orb-blip-b { top: 62%; left: 68%; animation: blip 3s ease-in-out infinite 1s; }
.orb-blip-c { top: 70%; left: 26%; background: var(--accent); box-shadow: 0 0 12px var(--accent); animation: blip 3s ease-in-out infinite 2s; }

@keyframes sweep  { to { transform: rotate(360deg); } }
@keyframes breathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@keyframes blip   { 0%,100% { opacity: 0.2; transform: scale(0.7); } 50% { opacity: 1; transform: scale(1); } }
@keyframes pulse  { 0% { box-shadow: 0 0 0 0 var(--accent-glow); } 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ------------------------------ Trust strip ----------------------------- */
.trust-strip { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: rgba(255,255,255,0.015); }
.trust-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px 30px; padding: 22px 24px; }
.trust-item { display: flex; align-items: center; gap: 10px; color: var(--text-soft); font-size: 0.92rem; font-weight: 500; }
.trust-ico { color: var(--accent); font-size: 1rem; }

/* ------------------------------ Cards / grids --------------------------- */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  position: relative;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-str); box-shadow: var(--shadow-glow); }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 0.96rem; margin: 0; }
.card-ico { font-size: 1.6rem; margin-bottom: 14px; }

.card-who .pain { color: var(--text-soft); font-size: 0.92rem; margin: 0 0 8px; }
.card-who .help { color: var(--muted); font-size: 0.92rem; margin: 0; }
.card-who .pain strong { color: var(--warn); font-weight: 600; }
.card-who .help strong { color: var(--accent); font-weight: 600; }

.card-cap h3 { font-size: 1.02rem; }
.card-cap::before {
  content: ""; position: absolute; top: 0; left: 26px; width: 34px; height: 2px;
  background: var(--signal-grad); border-radius: 2px;
}
.card-cap { padding-top: 30px; }

.card-sec h3 { font-size: 1.05rem; }

/* ------------------------------ Problem --------------------------------- */
.problem-layout { display: grid; grid-template-columns: 1fr 0.9fr; gap: 48px; align-items: center; }
.problem-head { margin-bottom: 0; }
.problem-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.problem-list li {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 16px 18px; color: var(--text-soft); font-size: 0.98rem;
}
.problem-list li span { color: var(--warn); font-size: 1.1rem; flex-shrink: 0; }

/* ------------------------------ Steps ----------------------------------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.step {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 24px; position: relative;
}
.step::after {
  content: ""; position: absolute; top: 50%; right: -13px; width: 20px; height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent); z-index: 1;
}
.steps .step:last-child::after { display: none; }
.step-num { font-family: var(--mono); font-size: 0.85rem; color: var(--accent); letter-spacing: 0.1em; }
.step h3 { margin: 14px 0 8px; }
.step p { color: var(--muted); font-size: 0.94rem; margin: 0; }

/* ------------------------------ Dashboard preview ----------------------- */
.dashboard {
  border: 1px solid var(--border-str); border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface-2), var(--bg));
  box-shadow: var(--shadow); overflow: hidden;
}
.dash-topbar {
  display: flex; align-items: center; gap: 8px; padding: 14px 20px;
  border-bottom: 1px solid var(--border); background: rgba(255,255,255,0.02);
}
.dash-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted-dim); }
.dash-dot:nth-child(1) { background: #ff5f57; } .dash-dot:nth-child(2) { background: #febc2e; } .dash-dot:nth-child(3) { background: #28c840; }
.dash-title { font-family: var(--mono); font-size: 0.82rem; color: var(--text-soft); margin-left: 10px; }
.dash-status { margin-left: auto; font-size: 0.75rem; color: var(--accent-2); display: flex; align-items: center; gap: 6px; }
.dash-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 8px var(--accent-2); }

.dash-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 20px;
}
.dash-card { background: linear-gradient(180deg, var(--surface), var(--bg-2)); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 18px; }
.dash-card-head { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.dash-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 0.88rem; padding: 5px 0; color: var(--text-soft); }
.dash-row span { color: var(--muted); }
.dash-row strong { color: var(--text); font-weight: 600; }

.dash-overview { grid-row: span 1; }
.dash-map { grid-column: span 1; }

.tag { font-size: 0.72rem; padding: 3px 9px; border-radius: 999px; font-style: normal; font-weight: 600; }
.tag-ok   { color: var(--ok);   background: rgba(53, 214, 164, 0.12); }
.tag-warn { color: var(--warn); background: rgba(240, 182, 75, 0.12); }
.tag-live { color: var(--live); background: rgba(78, 168, 255, 0.12); }

/* Confidence ring */
.dash-score { text-align: center; }
.score-ring {
  width: 120px; height: 120px; border-radius: 50%; margin: 6px auto 12px; display: grid; place-items: center;
  background:
    radial-gradient(closest-side, var(--surface) 78%, transparent 79%),
    conic-gradient(var(--accent) calc(var(--pct) * 1%), rgba(255,255,255,0.08) 0);
}
.score-ring-inner { display: flex; align-items: baseline; gap: 1px; }
.score-num { font-size: 2rem; font-weight: 700; color: var(--text); font-family: var(--mono); }
.score-pct { font-size: 1rem; color: var(--accent); }
.score-label { font-size: 0.82rem; color: var(--ok); margin: 0; }

/* Signals */
.sig { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 10px; margin-bottom: 12px; }
.sig-bar { grid-column: 1 / -1; order: 3; height: 6px; border-radius: 6px; background: rgba(255,255,255,0.07); position: relative; overflow: hidden; }
.sig-bar::after { content: ""; position: absolute; inset: 0; width: var(--w); background: var(--signal-grad); border-radius: 6px; }
.sig-t { font-size: 0.85rem; color: var(--text-soft); order: 1; }
.sig-v { font-size: 0.8rem; color: var(--accent); font-family: var(--mono); order: 2; }

/* Mini map */
.mini-map { position: relative; height: 130px; border-radius: 8px; overflow: hidden; background: radial-gradient(circle at 50% 120%, rgba(78,168,255,0.12), transparent 60%), var(--bg); border: 1px solid var(--border); }
.map-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px); background-size: 22px 22px; }
.map-pin { position: absolute; top: 42%; left: 54%; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(78,168,255,0.2), 0 0 16px var(--accent); }
.map-ping { position: absolute; border-radius: 50%; border: 1px solid var(--accent-2); }
.map-ping-1 { top: 30%; left: 30%; width: 26px; height: 26px; animation: ping 3s ease-out infinite; }
.map-ping-2 { top: 60%; left: 68%; width: 20px; height: 20px; animation: ping 3s ease-out infinite 1.5s; }
@keyframes ping { 0% { transform: scale(0.6); opacity: 0.9; } 100% { transform: scale(1.8); opacity: 0; } }

.action-text { font-size: 0.92rem; color: var(--text-soft); margin: 0 0 12px; }
.action-text strong { color: var(--accent); }

/* ------------------------------ Waitlist -------------------------------- */
.waitlist-layout { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 48px; align-items: start; }
.waitlist-points { list-style: none; margin: 22px 0; padding: 0; display: grid; gap: 12px; }
.waitlist-points li { position: relative; padding-left: 28px; color: var(--text-soft); }
.waitlist-points li::before { content: "✓"; position: absolute; left: 0; color: var(--accent-2); font-weight: 700; }
.waitlist-aspen { color: var(--muted); font-size: 0.9rem; border-left: 2px solid var(--accent); padding-left: 14px; }

.waitlist-form {
  background: linear-gradient(180deg, var(--surface-2), var(--bg-2));
  border: 1px solid var(--border-str); border-radius: var(--radius-lg);
  padding: 30px; box-shadow: var(--shadow);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 18px; display: flex; flex-direction: column; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--text-soft); margin-bottom: 7px; }
.field .req { color: var(--accent); }
.field .opt, .field-consent .opt { color: var(--muted-dim); font-weight: 400; }

input, select, textarea {
  font-family: inherit; font-size: 0.96rem; color: var(--text);
  background: rgba(0, 0, 0, 0.3); border: 1px solid var(--border-str);
  border-radius: var(--radius-sm); padding: 12px 14px; width: 100%; transition: border-color 0.2s, box-shadow 0.2s;
}
input::placeholder, textarea::placeholder { color: var(--muted-dim); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(78, 168, 255, 0.18); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238b95a4' d='M6 8L0 0h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
textarea { resize: vertical; min-height: 96px; }

input.invalid, select.invalid, textarea.invalid { border-color: #ff6b6b; box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.15); }
.field-error { color: #ff8686; font-size: 0.8rem; margin-top: 6px; min-height: 0; }

.field-consent .consent { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; color: var(--text-soft); font-size: 0.9rem; cursor: pointer; display: flex; }
.field-consent input[type="checkbox"] { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; accent-color: var(--accent); }

/* Honeypot — visually hidden, still in layout for bots */
.hp-field { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }

.turnstile-container:not(:empty) { margin: 4px 0 18px; }
#submitBtn { margin-top: 6px; position: relative; }
.btn-spinner { display: none; width: 16px; height: 16px; border: 2px solid rgba(4,18,31,0.35); border-top-color: #04121f; border-radius: 50%; animation: spin 0.7s linear infinite; }
.btn.loading .btn-spinner { display: inline-block; }
.btn.loading { opacity: 0.85; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-status { margin: 16px 0 0; font-size: 0.92rem; min-height: 1.2em; }
.form-status.success { color: var(--ok); }
.form-status.error { color: #ff8686; }
.form-privacy { font-size: 0.8rem; color: var(--muted-dim); margin: 10px 0 0; }

/* ------------------------------ FAQ ------------------------------------- */
.faq { display: grid; gap: 12px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); background: linear-gradient(180deg, var(--surface), var(--bg-2)); overflow: hidden; }
.faq-q {
  width: 100%; text-align: left; background: transparent; border: none; color: var(--text);
  font-size: 1.02rem; font-weight: 600; font-family: inherit; padding: 20px 22px; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.faq-q:hover { color: var(--accent); }
.faq-icon { position: relative; width: 16px; height: 16px; flex-shrink: 0; }
.faq-icon::before, .faq-icon::after { content: ""; position: absolute; background: var(--accent); border-radius: 2px; transition: transform 0.25s; }
.faq-icon::before { top: 7px; left: 0; width: 16px; height: 2px; }
.faq-icon::after { top: 0; left: 7px; width: 2px; height: 16px; }
.faq-q[aria-expanded="true"] .faq-icon::after { transform: scaleY(0); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-a p { padding: 0 22px 20px; margin: 0; color: var(--muted); font-size: 0.96rem; }

/* ------------------------------ Final CTA ------------------------------- */
.final-cta {
  text-align: center; padding: clamp(70px, 10vw, 130px) 0;
  background:
    radial-gradient(700px 340px at 50% 0%, rgba(78, 168, 255, 0.14), transparent 65%),
    var(--bg-2);
  border-top: 1px solid var(--border);
}
.final-inner h2 { max-width: 20ch; margin: 0 auto 30px; }
.final-domain { font-family: var(--mono); color: var(--accent-2); letter-spacing: 0.12em; margin-top: 22px; }

/* ------------------------------ Footer ---------------------------------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg); padding: 60px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid var(--border); }
.footer-logo { height: 84px; width: auto; display: block; margin: 0 0 14px; filter: drop-shadow(0 0 12px var(--accent-glow)); }
.footer-domain { font-family: var(--mono); color: var(--accent); font-size: 0.85rem; margin: 0 0 12px; }
.footer-aspen { color: var(--muted); font-size: 0.85rem; max-width: 34ch; }
.footer-links h3 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); margin-bottom: 16px; }
.footer-links ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-links a { color: var(--text-soft); font-size: 0.92rem; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-top: 24px; color: var(--muted-dim); font-size: 0.82rem; }
.footer-bottom p { margin: 0; }

/* ------------------------------ Back to top ----------------------------- */
.back-to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 90;
  width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
  background: var(--elevated); border: 1px solid var(--border-str); color: var(--text);
  font-size: 1.1rem; display: grid; place-items: center;
  box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); transition: opacity 0.25s, transform 0.25s, background 0.2s;
}
.back-to-top.show { opacity: 1; transform: translateY(0); }
.back-to-top:hover { background: var(--accent); color: #04121f; border-color: var(--accent); }
.back-to-top[hidden] { display: none; }

/* ------------------------------ Reveal anim ----------------------------- */
[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
[data-reveal].revealed { opacity: 1; transform: none; }

/* ------------------------------ Responsive ------------------------------ */
@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step::after { display: none; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .orb { width: min(280px, 60vw); }
  .problem-layout { grid-template-columns: 1fr; gap: 32px; }
  .waitlist-layout { grid-template-columns: 1fr; gap: 34px; }
  .dash-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Collapse the primary nav into a hamburger before it gets cramped */
@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: fixed; top: 72px; right: 0; left: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: rgba(9, 12, 17, 0.97); backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border); padding: 14px 20px 22px;
    transform: translateY(-120%); transition: transform 0.3s ease; z-index: -1;
  }
  .nav-menu.open { transform: translateY(0); }
  .nav-menu a:not(.btn) { padding: 12px 10px; font-size: 1rem; }
  .nav-cta-item { margin: 8px 0 0; }
  .nav-cta-item .btn { width: 100%; }
  .brand-logo { height: 40px; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .dash-grid { grid-template-columns: 1fr; }
  .trust-inner { justify-content: flex-start; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .waitlist-form { padding: 22px; }
}

/* ------------------------------ Reduced motion -------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
  .orb-sweep, .orb-core, .badge-dot, .map-ping { animation: none !important; }
  .hero-radar { display: none; }
}
