/* =========================================================================
   DecisionCast — marketing site styles
   Dark navy, election-night, data-broadcast. Tokens lifted from the app.
   ========================================================================= */

:root {
  --navy-0:      #081026;  /* page background (deepest) */
  --navy-1:      #0b1838;
  --navy-2:      #102350;
  --panel:       #0f1c40;  /* card background */
  --panel-2:     #14264f;
  --line:        #243a6b;  /* borders / hairlines */
  --text:        #eef3ff;  /* primary text */
  --muted:       #93a3c9;  /* secondary text */
  --rep:         #e81b23;  /* red accent */
  --dem:         #1f8fe0;  /* blue accent */
  --blue-bright: #2ea3f2;  /* primary brand blue / links */
  --gold:        #ffd54a;  /* highlight: race-call checks, eyebrows */
  --live-green:  #35d07f;  /* "live" status dot */

  --maxw: 1140px;
  --radius: 14px;
  --header-h: 68px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* offset anchored sections so the sticky header doesn't cover them */
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  line-height: 1.55;
  background: var(--navy-0);
  -webkit-font-smoothing: antialiased;
}

/* --- Ambient backdrop ---------------------------------------------------
   The deck's dome/stars art is not in /brand, so this is a CSS-only
   approximation: a red-lit dome glow bottom-left, a cool blue glow,
   and a faint starfield — under the readable top-to-bottom gradient.
   To use real art later, drop /brand/backdrop.png and add it as the
   middle layer of the `background` shorthand (see commented line below). */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 600px at 12% 100%, rgba(232,27,35,0.20), transparent 60%),
    radial-gradient(1000px 700px at 88% 8%, rgba(46,163,242,0.16), transparent 55%),
    /* starfield */
    radial-gradient(1.5px 1.5px at 20% 30%, rgba(255,255,255,0.35), transparent),
    radial-gradient(1.5px 1.5px at 70% 20%, rgba(255,255,255,0.25), transparent),
    radial-gradient(1px 1px at 40% 60%, rgba(255,255,255,0.30), transparent),
    radial-gradient(1px 1px at 85% 50%, rgba(255,255,255,0.22), transparent),
    radial-gradient(1.5px 1.5px at 55% 80%, rgba(255,255,255,0.20), transparent),
    radial-gradient(1px 1px at 10% 75%, rgba(255,255,255,0.20), transparent),
    /* readable overlay + base */
    linear-gradient(180deg, rgba(8,16,38,0.74), rgba(8,16,38,0.90) 55%, rgba(8,16,38,0.985) 90%),
    var(--navy-0);
  /* With real art:
  background:
    linear-gradient(180deg, rgba(8,16,38,0.74), rgba(8,16,38,0.90) 55%, rgba(8,16,38,0.985) 90%),
    url('/brand/backdrop.png') center top / cover no-repeat,
    var(--navy-0);
  */
}

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

a { color: var(--blue-bright); text-decoration: none; }
a:hover { color: #5bbcff; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--blue-bright); color: #fff; padding: 10px 16px; z-index: 100;
  border-radius: 0 0 8px 0; font-weight: 700;
}
.skip-link:focus { left: 0; }

/* --- Eyebrow label ------------------------------------------------------ */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.78rem;
  font-weight: 700; color: var(--muted); margin: 0 0 14px;
}
.eyebrow .tick { width: 22px; height: 3px; background: var(--rep); border-radius: 2px; }
.eyebrow-center { justify-content: center; }

/* --- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-block; background: var(--blue-bright); color: #fff;
  font-weight: 800; letter-spacing: 0.01em; padding: 14px 24px;
  border-radius: 10px; border: 1px solid rgba(255,255,255,0.08);
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover {
  color: #fff; background: #45b1f7;
  box-shadow: 0 8px 28px rgba(46,163,242,0.45);
  transform: translateY(-1px);
}
.btn:active { transform: translateY(0); }
.btn-sm { padding: 9px 16px; font-size: 0.9rem; border-radius: 8px; }
.btn-lg { padding: 16px 30px; font-size: 1.05rem; }

/* =========================================================================
   HEADER
   ========================================================================= */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(8,16,38,0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .2s ease, background .2s ease;
}
.site-header.scrolled { box-shadow: 0 6px 24px rgba(0,0,0,0.35); background: rgba(8,16,38,0.88); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.brand { display: flex; align-items: center; }
.brand-mark { height: 30px; width: auto; }

.nav { display: flex; align-items: center; gap: 26px; }
.nav a { color: var(--text); font-weight: 600; font-size: 0.95rem; }
.nav a:not(.btn):hover { color: var(--blue-bright); }

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  width: 42px; height: 42px; padding: 9px; flex-direction: column; justify-content: space-between;
}
.nav-toggle span { display: block; height: 2px; width: 100%; background: var(--text); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(11px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-11px) rotate(-45deg); }

/* =========================================================================
   HERO
   ========================================================================= */
.hero { padding: 90px 0 70px; }
.hero-inner { max-width: 820px; }
.hero-logo { height: clamp(46px, 8vw, 72px); width: auto; margin: 0 0 26px; }
.hero-title {
  font-size: clamp(2.6rem, 8vw, 5rem);
  font-weight: 900; letter-spacing: -0.02em; line-height: 1.02;
  margin: 0 0 22px;
}
.hero-title em { font-style: italic; color: var(--blue-bright); }
.hero-sub { font-size: clamp(1.05rem, 2.4vw, 1.3rem); color: var(--muted); max-width: 640px; margin: 0 0 30px; }
.hero-cta { margin-bottom: 40px; }

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 14px; margin: 0; padding: 0; }
.chip {
  background: rgba(15,28,64,0.6); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 18px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  min-width: 180px;
}
.chip strong { display: block; font-weight: 800; font-size: 0.98rem; letter-spacing: 0.01em; }
.chip span { display: block; color: var(--muted); font-size: 0.82rem; margin-top: 3px; }

/* =========================================================================
   SECTIONS
   ========================================================================= */
.section { padding: 72px 0; }
.section-alt { background: rgba(11,24,56,0.55); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-title { font-size: clamp(1.7rem, 4.2vw, 2.6rem); font-weight: 900; letter-spacing: -0.015em; line-height: 1.08; margin: 0 0 16px; max-width: 22ch; }
.section-lead { font-size: clamp(1.02rem, 2vw, 1.18rem); color: var(--muted); max-width: 62ch; margin: 0 0 36px; }

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

.card {
  background: rgba(15,28,64,0.62); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: transform .15s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); border-color: #335090; }
.card-title { margin: 0 0 8px; font-size: 1.2rem; font-weight: 800; }
.card p { margin: 0; color: var(--muted); }

.accent-rep .card-title, .accent-rep > h4 { color: var(--rep); }
.accent-dem .card-title, .accent-dem > h4 { color: var(--blue-bright); }
.accent-gold .card-title, .accent-gold > h4 { color: var(--gold); }

/* =========================================================================
   PLATFORM FLOW
   ========================================================================= */
.flow { margin-top: 8px; }
.flow-row { display: flex; align-items: stretch; gap: 16px; justify-content: center; flex-wrap: wrap; }
.flow-row-out { margin-top: 0; }
.flow-node {
  flex: 1 1 240px; max-width: 320px;
  background: rgba(15,28,64,0.62); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-top-width: 3px;
}
.accent-rep.flow-node { border-top-color: var(--rep); }
.accent-dem.flow-node { border-top-color: var(--blue-bright); }
.accent-gold.flow-node { border-top-color: var(--gold); }
.flow-node h4 { margin: 0 0 6px; font-size: 1.05rem; }
.flow-node p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.flow-arrow { display: flex; align-items: center; color: var(--blue-bright); font-size: 1.6rem; font-weight: 700; }

.flow-fan { display: flex; justify-content: center; gap: 18%; height: 36px; margin: 4px 0; }
.flow-fan span { width: 2px; background: linear-gradient(var(--blue-bright), transparent); opacity: 0.6; }

.security-boundary {
  margin: 32px 0 0; padding: 16px 20px; border-radius: 12px;
  background: rgba(15,28,64,0.6); border: 1px solid var(--line);
  color: var(--muted); display: flex; align-items: center; gap: 10px;
}
.security-boundary strong { color: var(--text); }

/* =========================================================================
   FEATURE SECTIONS
   ========================================================================= */
.feature-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.feature-reverse .feature-copy { order: 2; }
.feature-reverse .feature-media { order: 1; }
.feature-copy .section-lead { margin-bottom: 24px; }

.feature-list { margin: 0; padding: 0; list-style: none; }
.feature-list li { position: relative; padding-left: 28px; margin-bottom: 12px; color: var(--text); }
.feature-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--gold); font-weight: 900;
}

.feature-media {
  margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: var(--navy-1); box-shadow: 0 18px 50px rgba(0,0,0,0.4);
}
.feature-media img { width: 100%; }
.feature-media figcaption {
  font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted); padding: 10px 14px; border-top: 1px solid var(--line);
}
.feature-media-phone { background: transparent; border: 0; box-shadow: none; text-align: center; }
.feature-media-phone img { max-width: 300px; margin: 0 auto; filter: drop-shadow(0 24px 50px rgba(0,0,0,0.55)); }
.feature-media-phone figcaption { border: 0; }

.stat-row { display: flex; gap: 30px; margin-top: 28px; }
.stat { display: flex; flex-direction: column; }
.stat-num { font-size: 2.4rem; font-weight: 900; color: var(--blue-bright); line-height: 1; letter-spacing: -0.02em; }
.stat-label { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-top: 6px; }

/* --- Audience steps ----------------------------------------------------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; }
.step {
  background: rgba(15,28,64,0.62); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 20px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); position: relative;
}
.step-num { font-size: 0.95rem; font-weight: 800; color: var(--gold); letter-spacing: 0.04em; }
.step h4 { margin: 8px 0 6px; font-size: 1.15rem; }
.step p { margin: 0; color: var(--muted); font-size: 0.92rem; }

/* =========================================================================
   CLOSING CTA BAND
   ========================================================================= */
.cta-band {
  padding: 84px 0; text-align: center;
  background:
    radial-gradient(700px 300px at 50% 0%, rgba(46,163,242,0.18), transparent 70%),
    rgba(11,24,56,0.7);
  border-top: 1px solid var(--line);
}
.cta-inner { max-width: 720px; }
.cta-title { font-size: clamp(1.8rem, 4.5vw, 2.8rem); font-weight: 900; letter-spacing: -0.02em; margin: 0 0 14px; }
.cta-sub { color: var(--muted); font-size: 1.1rem; margin: 0 0 32px; }

/* =========================================================================
   FOOTER
   ========================================================================= */
.site-footer { border-top: 1px solid var(--line); background: rgba(8,16,38,0.9); padding: 44px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 30px; flex-wrap: wrap; }
.footer-mark { height: 28px; width: auto; }
.footer-powered { color: var(--muted); font-size: 0.85rem; margin: 12px 0 0; }
.footer-meta { text-align: right; }
.footer-email { font-weight: 700; font-size: 1.05rem; }
.footer-note { color: var(--muted); font-size: 0.8rem; margin: 12px 0 4px; max-width: 42ch; }
.footer-copy { color: var(--muted); font-size: 0.8rem; margin: 0; }

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 860px) {
  .nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(8,16,38,0.97); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    padding: 8px 20px 18px;
    transform: translateY(-130%); transition: transform .25s ease;
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  .nav.open { transform: translateY(0); }
  .nav a { padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .nav a.btn { margin-top: 14px; text-align: center; border-bottom: 0; }
  .nav-toggle { display: flex; }

  .feature-inner { grid-template-columns: 1fr; gap: 30px; }
  .feature-reverse .feature-copy { order: 1; }
  .feature-reverse .feature-media { order: 2; }

  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { flex-direction: column; }
  .footer-meta { text-align: left; }
}

@media (max-width: 540px) {
  .hero { padding: 60px 0 50px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .chip { min-width: 0; flex: 1 1 100%; }
  .flow-arrow { transform: rotate(90deg); width: 100%; justify-content: center; }
  .flow-row { flex-direction: column; align-items: stretch; }
  .flow-node { max-width: none; }
  .stat-row { gap: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
