/* ─────────────────────────────────────────────────────────────
   Safe Driving NYC — shared design tokens & components
   Built on Darter type/spacing foundation, swapped to a
   blue accent system per brand direction (deep navy + cobalt).
   ───────────────────────────────────────────────────────────── */

:root {
  /* ── Brand: deep navy + cobalt blue (Stripe/Linear-leaning) ── */
  --brand-ink:       #0B1220;     /* darkest — hero bg, dark surfaces */
  --brand-ink-2:     #111A2E;     /* slightly lifted dark */
  --brand-ink-3:     #1A2540;     /* dark surface card */
  --brand-blue:      #2D6CFF;     /* primary CTA / accent */
  --brand-blue-2:    #4D86FF;     /* lighter hover */
  --brand-blue-3:    #1E4FCC;     /* pressed */
  --brand-sky:       #6FAFE1;     /* highlight */
  --brand-cyan:      #4FD4E5;     /* secondary accent / status */
  --brand-violet:    #7C6DFF;     /* tertiary accent */
  --brand-soft:      #EAF1FF;     /* tint */

  /* ── Neutrals (light surfaces) ── */
  --paper:           #FAFBFD;
  --paper-2:         #F4F6FA;
  --line:            #E5E9F2;
  --line-2:          #CFD6E4;
  --ink:             #0B1220;
  --ink-2:           #1F2A44;
  --ink-3:           #4A5772;
  --ink-4:           #6D7794;
  --muted:           #98A1B8;

  /* ── Dark surface tokens ── */
  --d-line:          rgba(255,255,255,0.08);
  --d-line-2:        rgba(255,255,255,0.14);
  --d-text:          #E6ECF7;
  --d-text-2:        #AAB4CC;
  --d-text-3:        #7782A0;

  /* ── Semantic ── */
  --success:         #22C55E;
  --success-bg:      #DCFCE7;
  --warning:         #F59E0B;
  --warning-bg:      #FEF3C7;
  --danger:          #EF4444;
  --danger-bg:       #FEE2E2;
  --info:            #2D6CFF;
  --info-bg:         #EAF1FF;

  /* ── Type ── */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, Monaco, Consolas, monospace;

  /* ── Spacing (4px) ── */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px;
  --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-16: 64px;
  --s-20: 80px; --s-24: 96px;

  /* ── Radii ── */
  --r-xs: 4px; --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-xl: 20px; --r-2xl: 28px; --r-pill: 999px;

  /* ── Shadows ── */
  --shadow-xs: 0 1px 2px rgba(11,18,32,0.05);
  --shadow-sm: 0 1px 2px rgba(11,18,32,0.05), 0 1px 3px rgba(11,18,32,0.05);
  --shadow-md: 0 4px 12px -2px rgba(11,18,32,0.08), 0 2px 6px -2px rgba(11,18,32,0.04);
  --shadow-lg: 0 16px 40px -12px rgba(11,18,32,0.18), 0 4px 12px -4px rgba(11,18,32,0.06);
  --shadow-xl: 0 32px 80px -20px rgba(11,18,32,0.30), 0 8px 20px -8px rgba(11,18,32,0.10);
  --shadow-glow: 0 0 0 1px rgba(45,108,255,0.12), 0 12px 40px -8px rgba(45,108,255,0.45);
  --inset-cta: inset 0 -2px 0 rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.16);

  /* ── Layout ── */
  --max-w: 1240px;
  --nav-h: 72px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-2);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ── Type ── */
.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--brand-blue);
  display: inline-flex; align-items: center; gap: 8px;
}
.eyebrow.on-dark { color: var(--brand-sky); }
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgba(45,108,255,0.18); }

h1, h2, h3, h4, h5 { margin: 0; color: var(--ink); font-weight: 700; letter-spacing: -0.02em; line-height: 1.08; text-wrap: balance; }
h1 { font-size: clamp(40px, 5.6vw, 72px); font-weight: 800; }
h2 { font-size: clamp(28px, 3.4vw, 44px); letter-spacing: -0.025em; }
h3 { font-size: clamp(20px, 1.6vw, 24px); line-height: 1.25; letter-spacing: -0.01em; }
h4 { font-size: 17px; line-height: 1.3; }
p  { margin: 0; color: var(--ink-3); text-wrap: pretty; }
.lead { font-size: clamp(17px, 1.4vw, 20px); line-height: 1.55; color: var(--ink-3); max-width: 60ch; }

/* ── Container ── */
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 28px; }
@media (max-width: 720px){ .container { padding: 0 20px; } }

/* ── Nav ── */
.nav {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  background: rgba(250,251,253,0.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav.is-dark {
  background: rgba(11,18,32,0.72);
  border-bottom: 1px solid var(--d-line);
}
.nav-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; letter-spacing: -0.015em; }
.is-dark .brand { color: #fff; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand-blue) 0%, #1840AA 100%);
  position: relative; display: grid; place-items: center;
  box-shadow: var(--inset-cta), 0 4px 14px -4px rgba(45,108,255,0.5);
}
.brand-mark svg { width: 18px; height: 18px; color: #fff; }
.brand-name { font-size: 16px; font-weight: 700; white-space: nowrap; }
.brand-sub { font-size: 11px; color: var(--ink-4); font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; margin-left: 6px; }
.is-dark .brand-sub { color: var(--d-text-3); }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 8px 14px; font-size: 14px; font-weight: 500; color: var(--ink-3);
  border-radius: var(--r-pill); transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--ink); background: rgba(11,18,32,0.04); }
.is-dark .nav-links a { color: var(--d-text-2); }
.is-dark .nav-links a:hover { color: #fff; background: rgba(255,255,255,0.06); }
.nav-cta { margin-left: 8px; }

.mobile-toggle { display: none; background: transparent; border: 1px solid var(--line-2); border-radius: var(--r-md); width: 40px; height: 40px; align-items: center; justify-content: center; color: var(--ink); }
.is-dark .mobile-toggle { color: #fff; border-color: var(--d-line-2); }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .mobile-toggle { display: inline-flex; }
  .nav-links.is-open {
    display: flex; flex-direction: column; align-items: stretch; gap: 4px;
    position: absolute; top: 100%; right: 16px; left: 16px;
    padding: 12px; margin-top: 8px;
    background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
  }
  .nav-links.is-open a { padding: 12px 14px; font-size: 15px; }
  .is-dark .nav-links.is-open { background: var(--brand-ink-2); border-color: var(--d-line-2); }
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  height: 44px; padding: 0 18px; border: 0; border-radius: var(--r-pill);
  font-size: 14.5px; font-weight: 600; letter-spacing: -0.005em;
  white-space: nowrap; transition: transform .12s ease, box-shadow .15s, background .15s, color .15s;
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(180deg, var(--brand-blue-2) 0%, var(--brand-blue) 55%, var(--brand-blue-3) 100%);
  color: #fff; box-shadow: var(--inset-cta), 0 6px 18px -6px rgba(45,108,255,0.55);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--inset-cta), 0 10px 24px -6px rgba(45,108,255,0.6); }
.btn-primary:active { transform: translateY(0); }
.btn-secondary {
  background: #fff; color: var(--ink); border: 1px solid var(--line-2);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover { border-color: var(--ink-4); box-shadow: var(--shadow-sm); }
.on-dark .btn-secondary, .btn-secondary.on-dark {
  background: rgba(255,255,255,0.06); color: #fff; border-color: var(--d-line-2);
}
.on-dark .btn-secondary:hover, .btn-secondary.on-dark:hover { background: rgba(255,255,255,0.12); }

.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--paper-2); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13.5px; }
.btn-lg { height: 52px; padding: 0 24px; font-size: 15.5px; }

/* ── Pill / chip ── */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 10px; border-radius: var(--r-pill);
  background: var(--brand-soft); color: var(--brand-blue-3);
  font-size: 12.5px; font-weight: 600; letter-spacing: -0.005em;
  border: 1px solid rgba(45,108,255,0.18);
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-blue); box-shadow: 0 0 0 4px rgba(45,108,255,0.18); }
.pill.on-dark {
  background: rgba(125,156,255,0.12); color: #B7CBFF;
  border-color: rgba(125,156,255,0.22);
}
.pill.on-dark .dot { background: var(--brand-cyan); box-shadow: 0 0 0 4px rgba(79,212,229,0.14); }

/* ── Cards ── */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 24px; box-shadow: var(--shadow-xs);
}
.card-dark {
  background: linear-gradient(180deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%);
  border: 1px solid var(--d-line-2); border-radius: var(--r-lg); padding: 24px;
}

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 32px;
  background: var(--paper);
  margin-top: 96px;
}
.footer.on-dark { background: var(--brand-ink); border-top: 1px solid var(--d-line); margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 48px; }
.footer-col h5 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-4); font-weight: 600; margin-bottom: 16px; }
.on-dark .footer-col h5 { color: var(--d-text-3); }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 14px; color: var(--ink-3); }
.footer-col a:hover { color: var(--brand-blue); }
.on-dark .footer-col a { color: var(--d-text-2); }
.on-dark .footer-col a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-4); }
.on-dark .footer-bottom { border-top-color: var(--d-line); color: var(--d-text-3); }
.social { display: flex; gap: 10px; }
.social a {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink-3);
  transition: color .15s, border-color .15s, background .15s;
}
.social a:hover { color: var(--brand-blue); border-color: var(--brand-blue); background: var(--brand-soft); }
.on-dark .social a { border-color: var(--d-line-2); color: var(--d-text-2); }
.on-dark .social a:hover { border-color: var(--brand-sky); color: #fff; background: rgba(255,255,255,0.06); }

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; }
}
@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ── Section utilities ── */
.section { padding: 96px 0; }
.section-sm { padding: 64px 0; }
@media (max-width: 720px) { .section { padding: 64px 0; } .section-sm { padding: 48px 0; } }

.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head .eyebrow { margin-bottom: 16px; }
.section-head h2 { margin-bottom: 16px; }
.section-head p { font-size: 17px; }

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.6); }
  50%      { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

/* Reveal — runs on load. Use .no-reveal on body to disable. */
[data-reveal] { animation: fadeUp .7s cubic-bezier(.22,1,.36,1) both; }
[data-reveal][data-i="1"] { animation-delay: .08s; }
[data-reveal][data-i="2"] { animation-delay: .16s; }
[data-reveal][data-i="3"] { animation-delay: .24s; }
[data-reveal][data-i="4"] { animation-delay: .32s; }
[data-reveal][data-i="5"] { animation-delay: .40s; }
[data-reveal][data-i="6"] { animation-delay: .48s; }

/* ── Live status dot ── */
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--success); animation: pulse-dot 2s infinite;
}
.status-dot.is-warning { background: var(--warning); animation-name: pulse-warning; }
.status-dot.is-blue { background: var(--brand-blue); }
@keyframes pulse-warning {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245,158,11,0.6); }
  50%      { box-shadow: 0 0 0 8px rgba(245,158,11,0); }
}

/* ── Form ── */
.field { display: block; margin-bottom: 18px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; }
.field label .req { color: var(--brand-blue); }
.input, .textarea, .select {
  width: 100%; height: 48px; padding: 0 14px;
  background: #fff; border: 1px solid var(--line-2); border-radius: var(--r-md);
  font-family: inherit; font-size: 14.5px; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 140px; padding: 14px; resize: vertical; line-height: 1.55; }
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--brand-blue);
  box-shadow: 0 0 0 4px rgba(45,108,255,0.16);
}
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 540px){ .field-row { grid-template-columns: 1fr; } }

/* ── Selection ── */
::selection { background: rgba(45,108,255,0.22); color: var(--ink); }
