/* Traffic Control Companion — landing page
   Palette mirrors the app: navy ground, blueprint cyan lines, hi-vis orange CTA,
   sign-yellow accents from the retro badge. */

:root {
  --bg: #070b14;
  --bg-2: #0b1220;
  --surface: rgba(17, 24, 39, 0.72);
  --surface-2: rgba(30, 41, 59, 0.55);
  --line: rgba(148, 163, 184, 0.16);
  --line-strong: rgba(148, 163, 184, 0.32);
  --ink: #f8fafc;
  --muted: #a8b3c4;
  --muted-2: #7c8799;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --orange: #ff8a3d;
  --orange-deep: #f26a12;
  --yellow: #f4e824;
  --good: #34d399;
  --bad: #f87171;
  --radius: 16px;
  --font-head: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --wrap: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan); }
h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  margin: 0 0 14px;
}
h1 { font-size: clamp(40px, 6.2vw, 74px); }
h2 { font-size: clamp(32px, 4.6vw, 54px); }
h3 { font-size: 24px; font-weight: 700; margin-bottom: 6px; }
p { margin: 0 0 14px; }

.wrap { width: min(var(--wrap), calc(100% - 40px)); margin: 0 auto; }
.wrap.narrow { max-width: 720px; }
.section { padding: clamp(64px, 9vw, 120px) 0; position: relative; }
.kicker {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 10px;
}
.lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); max-width: 60ch; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--orange); color: #000; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* ── Nav ─────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 20px;
  background: rgba(7, 11, 20, 0.72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.nav-brand img { width: 52px; height: auto; }
.nav-brand span { font-family: var(--font-head); font-weight: 800; text-transform: uppercase; font-size: 20px; letter-spacing: 0.04em; line-height: 1; }
.nav-brand em { font-style: normal; color: var(--yellow); }

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: linear-gradient(180deg, var(--orange), var(--orange-deep));
  color: #130a02;
  font: 600 16px/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(255, 138, 61, 0.28), inset 0 1px 0 rgba(255,255,255,0.35);
  transition: transform .12s ease, box-shadow .2s ease, filter .2s ease;
}
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
.btn[disabled] { cursor: progress; filter: saturate(.6); }
.btn-sm { padding: 10px 16px; font-size: 14px; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); box-shadow: none; }
.btn-ghost:hover { background: rgba(255,255,255,0.06); }
.btn-spinner {
  display: none; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(0,0,0,.25); border-top-color: #000;
  animation: spin .7s linear infinite;
}
.btn.is-busy .btn-spinner { display: inline-block; }
.btn.is-busy .btn-label { opacity: .7; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Forms ───────────────────────────────────────────── */
.field-row { display: flex; gap: 10px; }
.field-row input {
  flex: 1; min-width: 0;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(7, 11, 20, 0.7);
  color: var(--ink);
  font: 500 16px/1.2 var(--font-body);
}
.field-row input::placeholder { color: var(--muted-2); }
.field-row input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.22); }
.field-row input[aria-invalid="true"] { border-color: var(--bad); }
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.fine { font-size: 13px; color: var(--muted-2); margin: 10px 0 0; }
.form-msg { min-height: 20px; font-size: 14px; margin: 6px 0 0; color: var(--muted); }
.form-msg.is-error { color: var(--bad); }
.form-msg.is-ok { color: var(--good); }

/* ── Success / prefs ─────────────────────────────────── */
.wl-success {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 20px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  animation: rise .35s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(8px);} to { opacity: 1; transform: none; } }
.success-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.success-head p { margin: 2px 0 0; color: var(--muted); font-size: 15px; }
.check {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: var(--good); color: #052e1c; font-weight: 800;
}
.wl-success.compact { padding: 16px 20px; }
.wl-success.compact p { margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wl-success.compact .check { width: 24px; height: 24px; font-size: 13px; }
fieldset { border: 0; padding: 0; margin: 0 0 14px; }
legend { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 12px; border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,0.03);
  color: var(--ink); font: 500 14px/1 var(--font-body);
  cursor: pointer; transition: background .15s, border-color .15s;
}
.chip:hover { border-color: var(--cyan); }
.chip.is-on { background: rgba(34, 211, 238, 0.16); border-color: var(--cyan); color: #e0fbff; }
.chip:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.prefs-row { display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; margin-bottom: 14px; }
.prefs-row label { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.prefs-row .opt { color: var(--muted-2); font-weight: 400; }
.prefs-row select, .prefs-row input {
  padding: 11px 12px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: rgba(7, 11, 20, 0.7);
  color: var(--ink); font: 500 15px/1.2 var(--font-body);
}
.prefs-row select:focus, .prefs-row input:focus { outline: none; border-color: var(--cyan); }
.prefs-actions { display: flex; gap: 10px; }
.share { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.share p { margin: 0; font-size: 14px; color: var(--muted); }

/* ── Hero ────────────────────────────────────────────── */
.hero { position: relative; padding: clamp(48px, 7vw, 96px) 0 clamp(56px, 7vw, 96px); overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background: var(--bg) url("/assets/bg-blueprint-wide.webp") center / cover no-repeat;
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(7,11,20,0.82) 0%, rgba(7,11,20,0.55) 45%, rgba(7,11,20,0.15) 100%),
    linear-gradient(180deg, rgba(7,11,20,0.35), rgba(7,11,20,0.9) 100%);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--cyan); margin-bottom: 18px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px rgba(52,211,153,.2); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(52,211,153,0); } }
.hero .wl-form { margin-top: 26px; max-width: 540px; }
.trust { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--muted-2); }
.trust li::before { content: "•"; color: var(--orange); margin-right: 8px; }

.hero-art { position: relative; display: flex; justify-content: center; }
.phone {
  width: min(300px, 70vw);
  border-radius: 44px;
  padding: 10px;
  background: linear-gradient(160deg, #2a3446, #0d1320);
  box-shadow: 0 40px 90px rgba(0,0,0,0.65), 0 0 0 1px rgba(148,163,184,0.25), 0 0 60px rgba(59,130,246,0.18);
  transform: rotate(-3deg);
}
.phone img { border-radius: 34px; }
.badge {
  position: absolute; right: -8px; bottom: -14px;
  width: 170px;
  filter: drop-shadow(0 12px 28px rgba(0,0,0,0.6));
  transform: rotate(6deg);
}

/* ── Benefits ────────────────────────────────────────── */
.benefits { background: linear-gradient(180deg, var(--bg), var(--bg-2)); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 30px; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: border-color .2s, transform .2s;
}
.card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.card p { color: var(--muted); margin: 0; font-size: 15px; }
.icon {
  width: 46px; height: 46px; border-radius: 12px; margin-bottom: 16px;
  display: grid; place-items: center;
  background: rgba(34, 211, 238, 0.12); border: 1px solid rgba(34, 211, 238, 0.35);
}
.icon svg { width: 24px; height: 24px; fill: none; stroke: var(--cyan); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ── Highway ─────────────────────────────────────────── */
.highway { overflow: hidden; }
.highway-bg {
  position: absolute; inset: 0; z-index: -1;
  background: var(--bg-2) url("/assets/bg-night-taper.webp") center 62% / cover no-repeat;
}
.highway-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7,11,20,0.86) 0%, rgba(7,11,20,0.6) 55%, rgba(7,11,20,0.3) 100%); }
.highway-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.ticks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; color: var(--muted); }
.ticks li { padding-left: 28px; position: relative; }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--good); font-weight: 800; }
.spec {
  background: rgba(7, 11, 20, 0.7);
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: var(--radius);
  padding: 22px 24px;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 0 40px rgba(34, 211, 238, 0.08) inset;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.spec-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed rgba(148,163,184,0.2); font-size: 15px; }
.spec-row span { color: var(--muted); }
.spec-row strong { font-family: var(--font-head); font-size: 20px; letter-spacing: .02em; color: var(--yellow); }
.spec-note { font-size: 12px; color: var(--muted-2); margin: 12px 0 0; }

/* ── Perks ───────────────────────────────────────────── */
.perks { background: var(--bg); }
.perk-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 30px; }
.perk { border-top: 2px solid var(--orange); padding-top: 16px; }
.perk .num { font-family: var(--font-head); font-weight: 800; font-size: 34px; color: var(--orange); line-height: 1; display: block; margin-bottom: 10px; }
.perk h3 { font-size: 22px; }
.perk p { color: var(--muted); font-size: 15px; margin: 0; }

/* ── FAQ ─────────────────────────────────────────────── */
.faq { background: linear-gradient(180deg, var(--bg), var(--bg-2)); }
details { border-top: 1px solid var(--line); padding: 4px 0; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary {
  cursor: pointer; list-style: none;
  padding: 16px 40px 16px 0;
  font-weight: 600; font-size: 17px;
  position: relative;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+"; position: absolute; right: 4px; top: 12px;
  font-family: var(--font-head); font-size: 28px; color: var(--cyan); transition: transform .2s;
}
details[open] summary::after { transform: rotate(45deg); }
details p { color: var(--muted); padding: 0 0 16px; max-width: 65ch; }

/* ── CTA + footer ────────────────────────────────────── */
.cta { text-align: center; background: radial-gradient(60% 80% at 50% 0%, rgba(59,130,246,0.18), transparent 70%), var(--bg-2); }
.cta .lede { margin-left: auto; margin-right: auto; }
.cta-logo { width: 220px; margin: 0 auto 18px; filter: drop-shadow(0 12px 30px rgba(0,0,0,.5)); }
.cta .wl-form { max-width: 520px; margin: 22px auto 0; }
.cta .wl-success { text-align: left; max-width: 520px; margin: 22px auto 0; }
.footer { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 13px; color: var(--muted-2); }
.footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 10px 24px; align-items: center; }
.footer nav { display: flex; gap: 18px; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--ink); }
.footer p { margin: 0; }
.disclaimer { grid-column: 1 / -1; max-width: 70ch; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 960px) {
  .cards, .perk-grid { grid-template-columns: repeat(2, 1fr); }
  .highway-grid { grid-template-columns: 1fr; }
}
@media (max-width: 759px) {
  .hero-bg { background-image: url("/assets/bg-blueprint-tall.webp"); background-position: center top; }
  .hero-bg::after { background: linear-gradient(180deg, rgba(7,11,20,0.55), rgba(7,11,20,0.85) 60%, var(--bg) 100%); }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-art { order: -1; margin-top: 8px; }
  .phone { width: min(220px, 60vw); transform: rotate(-2deg); }
  .badge { width: 130px; right: 6%; bottom: -10px; }
  .field-row { flex-direction: column; }
  .field-row .btn { width: 100%; }
  .cards, .perk-grid { grid-template-columns: 1fr; }
  .prefs-row { grid-template-columns: 1fr; }
  .nav-brand span { font-size: 17px; }
  .nav-brand img { width: 42px; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .dot, .btn, .card, .wl-success { animation: none; transition: none; }
}
