/* Rally — marketing site
   Vintage racing badge brand: navy field, cream/red racing stripe, script wordmark.
   Warm neutrals + coral action color, carried from the app's design system. */

:root {
  --cream: #FBF8F3;
  --cream-2: #F5F1EA;
  --paper: #FFFFFF;
  --ink: #1A1713;
  --ink-2: rgba(26,23,19,0.66);
  --ink-3: rgba(26,23,19,0.44);
  --line: rgba(26,23,19,0.10);
  --line-2: rgba(26,23,19,0.16);

  --navy: #0C2D49;
  --navy-2: #123f63;
  --navy-ink: #EAF1F7;
  --navy-dim: rgba(234,241,247,0.66);
  --navy-line: rgba(234,241,247,0.14);

  --coral: #FF6B35;
  --coral-hover: #F25A23;
  --red: #C0322A;

  --sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --wrap: 1160px;
  --r-sm: 12px;
  --r-md: 8px;
  --r-lg: 8px;
  --shadow: 0 1px 2px rgba(26,23,19,0.05), 0 10px 30px rgba(26,23,19,0.08);
  --shadow-lg: 0 30px 80px rgba(12,45,73,0.22), 0 8px 24px rgba(26,23,19,0.10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--red); text-decoration: none; }
a:hover { color: var(--coral-hover); }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.04;
  text-wrap: balance;
}
p { margin: 0; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }

/* ---------- Racing stripe device ---------- */
.stripes {
  display: inline-flex; gap: 3px; align-items: stretch;
}
.stripes i { width: 4px; border-radius: 2px; }
.stripes i:nth-child(1), .stripes i:nth-child(3) { background: var(--cream-2); }
.stripes i:nth-child(2) { background: var(--red); }
.stripes.on-navy i:nth-child(1), .stripes.on-navy i:nth-child(3) { background: #EFE7D3; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-3);
}
.eyebrow .stripes { height: 13px; }
.eyebrow.light { color: var(--navy-dim); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-weight: 650; font-size: 16px;
  letter-spacing: 0;
  padding: 14px 22px; border-radius: 999px;
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease, color .15s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--coral); color: #fff; box-shadow: 0 8px 20px rgba(255,107,53,0.28); }
.btn-primary:hover { background: var(--coral-hover); color: #fff; box-shadow: 0 12px 26px rgba(255,107,53,0.34); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { color: var(--ink); background: rgba(26,23,19,0.04); }
.btn-ghost.light { color: var(--navy-ink); border-color: var(--navy-line); }
.btn-ghost.light:hover { background: rgba(255,255,255,0.08); color: #fff; }

/* App store pill button */
.store {
  display: inline-flex; align-items: center; gap: 11px;
  padding: 11px 18px 11px 16px; border-radius: 14px;
  background: var(--ink); color: #fff;
  transition: transform .15s ease, background .15s;
}
.store:hover { transform: translateY(-1px); background: #000; color: #fff; }
.store svg { width: 22px; height: 22px; flex-shrink: 0; }
.store .st-t { line-height: 1.1; }
.store .st-t small { display: block; font-size: 10px; opacity: .8; letter-spacing: 0.04em; }
.store .st-t b { display: block; font-size: 16px; font-weight: 650; letter-spacing: 0; }
.store.on-navy { background: var(--cream); color: var(--ink); }
.store.on-navy:hover { background: #fff; }

/* ---------- Top nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251,248,243,0.82);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand img.badge { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 2px 6px rgba(12,45,73,0.25); }
.brand img.mark { height: 22px; width: auto; margin-top: 2px; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { color: var(--ink-2); font-size: 15px; font-weight: 550; letter-spacing: 0; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 68px 0 40px; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center;
}
.hero h1 {
  font-size: 72px;
  letter-spacing: 0;
}
.hero h1 .script {
  font-style: italic;
}
.hero .lede {
  margin-top: 24px; font-size: 20px; line-height: 1.5; color: var(--ink-2); max-width: 30ch;
}
.hero-actions { margin-top: 32px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hero-meta { margin-top: 22px; display: flex; align-items: center; gap: 10px 18px; flex-wrap: wrap; color: var(--ink-3); font-size: 13.5px; font-weight: 550; }
.hero-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--ink-3); }

/* phone cluster */
.phones { position: relative; height: 620px; }
.phone {
  position: absolute;
  border-radius: 42px; overflow: hidden;
  background: #000;
  border: 8px solid #14181f;
  box-shadow: var(--shadow-lg);
}
.phone img { width: 100%; display: block; }
.phone.p1 { width: 290px; left: 8%; top: 24px; z-index: 3; transform: rotate(-4deg); }
.phone.p2 { width: 262px; right: 4%; top: 96px; z-index: 2; transform: rotate(5deg); }
.hero-badge {
  position: absolute; z-index: 4; left: 50%; top: 8px; transform: translateX(-50%) rotate(-3deg);
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 16px 8px 10px;
  display: inline-flex; align-items: center; gap: 9px;
  box-shadow: var(--shadow); font-size: 13.5px; font-weight: 600;
}
.hero-badge .live {
  width: 9px; height: 9px; border-radius: 50%; background: var(--coral);
  box-shadow: 0 0 0 0 rgba(255,107,53,0.5); animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,107,53,0.5); }
  70% { box-shadow: 0 0 0 10px rgba(255,107,53,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,107,53,0); }
}

/* ---------- Section scaffolding ---------- */
section { position: relative; }
.section-pad { padding: 84px 0; }
.section-head { max-width: 620px; }
.section-head h2 { font-size: 46px; letter-spacing: 0; }
.section-head p { margin-top: 18px; font-size: 19px; color: var(--ink-2); }
.section-head.center { margin: 0 auto; text-align: center; }

/* ---------- How it works ---------- */
.steps { margin-top: 54px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.step {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 28px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.step .num {
  font-size: 13px; font-weight: 750; letter-spacing: 0.1em; color: var(--coral);
  font-variant-numeric: tabular-nums;
}
.step h3 { margin-top: 14px; font-size: 23px; letter-spacing: 0; }
.step p { margin-top: 10px; color: var(--ink-2); font-size: 16px; }
.step .step-ico {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: #FFE8DD; margin-bottom: 18px;
}
.step .step-ico svg { width: 24px; height: 24px; stroke: var(--coral); }

/* ---------- Feature rows ---------- */
.feature {
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center;
  padding: 40px 0;
}
.feature.reverse .f-media { order: 2; }
.feature .f-copy .eyebrow { margin-bottom: 16px; }
.feature .f-copy h2 { font-size: 40px; letter-spacing: 0; }
.feature .f-copy p { margin-top: 16px; font-size: 18px; color: var(--ink-2); max-width: 46ch; }
.f-list { margin-top: 24px; display: grid; gap: 12px; }
.f-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 16.5px; color: var(--ink); list-style: none; }
.f-list { padding: 0; }
.f-list .tick {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; margin-top: 1px;
  background: var(--coral); display: grid; place-items: center;
}
.f-list .tick svg { width: 13px; height: 13px; stroke: #fff; stroke-width: 3; }

/* framed device for feature media */
.f-media { display: flex; justify-content: center; }
.device {
  width: 300px; border-radius: 44px; overflow: hidden;
  background: #000; border: 9px solid #14181f;
  box-shadow: var(--shadow-lg);
}
.device.tilt-l { transform: rotate(-3deg); }
.device.tilt-r { transform: rotate(3deg); }
.device img { width: 100%; }

/* ---------- Privacy (navy) ---------- */
.privacy {
  background:
    radial-gradient(120% 120% at 80% -10%, #16496f 0%, transparent 55%),
    linear-gradient(180deg, var(--navy-2) 0%, var(--navy) 60%);
  color: var(--navy-ink);
  position: relative; overflow: hidden;
}
.privacy::before {
  /* subtle center racing stripe */
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 120px;
  background: linear-gradient(90deg,
    transparent 0, transparent 30px,
    rgba(239,231,211,0.06) 30px, rgba(239,231,211,0.06) 46px,
    rgba(192,50,42,0.22) 46px, rgba(192,50,42,0.22) 74px,
    rgba(239,231,211,0.06) 74px, rgba(239,231,211,0.06) 90px,
    transparent 90px);
  pointer-events: none;
}
.privacy .wrap { position: relative; z-index: 1; }
.privacy .section-head h2 { color: #fff; }
.privacy .section-head p { color: var(--navy-dim); }
.privacy-grid { margin-top: 52px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pcard {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--navy-line);
  border-radius: var(--r-md); padding: 26px;
  backdrop-filter: blur(4px);
}
.pcard .pico { width: 44px; height: 44px; border-radius: 12px; background: rgba(255,255,255,0.09); display: grid; place-items: center; margin-bottom: 18px; }
.pcard .pico svg { width: 23px; height: 23px; stroke: #fff; }
.pcard h3 { font-size: 20px; color: #fff; letter-spacing: 0; }
.pcard p { margin-top: 9px; color: var(--navy-dim); font-size: 15.5px; }

/* ---------- Stats strip ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 46px; }
.stat { text-align: center; }
.stat .v { font-size: 52px; font-weight: 750; letter-spacing: 0; }
.stat .k { margin-top: 4px; font-size: 14px; color: var(--navy-dim); font-weight: 550; }

/* ---------- Final CTA ---------- */
.cta-final { text-align: center; padding: 96px 0; }
.cta-final h2 { font-size: 60px; letter-spacing: 0; }
.cta-final .script { font-style: italic; color: var(--red); }
.cta-final p { margin: 20px auto 0; max-width: 44ch; font-size: 20px; color: var(--ink-2); }
.cta-final .hero-actions { justify-content: center; margin-top: 34px; }
.cta-badge-icon { width: 78px; height: 78px; border-radius: 20px; margin: 0 auto 26px; box-shadow: var(--shadow-lg); }

/* ---------- Footer ---------- */
.foot { background: var(--navy); color: var(--navy-dim); padding: 56px 0 40px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.foot .brand img.mark { height: 26px; filter: brightness(0) invert(1); opacity: 0.95; }
.foot p.blurb { margin-top: 16px; font-size: 15px; max-width: 30ch; color: var(--navy-dim); }
.foot h4 { color: #fff; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; margin-bottom: 14px; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.foot ul a { color: var(--navy-dim); font-size: 15px; }
.foot ul a:hover { color: #fff; }
.foot-bottom {
  margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--navy-line);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-size: 13.5px; color: var(--navy-dim);
}

/* reveal on scroll */
.reveal { opacity: 1; transform: none; }
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal,
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-badge .live { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Policy pages ---------- */
.doc { max-width: 760px; margin: 0 auto; padding: 56px 28px 96px; }
.doc .eyebrow { margin-bottom: 18px; }
.doc h1 { font-size: 52px; letter-spacing: 0; }
.doc .updated { margin-top: 16px; color: var(--ink-3); font-size: 14.5px; font-weight: 550; }
.doc .lead { margin-top: 26px; font-size: 19px; color: var(--ink-2); line-height: 1.5; }
.doc h2 { margin-top: 44px; font-size: 25px; letter-spacing: 0; }
.doc h3 { margin-top: 26px; font-size: 18px; letter-spacing: 0; }
.doc p, .doc li { font-size: 16.5px; color: var(--ink-2); line-height: 1.62; }
.doc p { margin-top: 14px; }
.doc ul { margin-top: 14px; padding-left: 22px; display: grid; gap: 8px; }
.doc ul li { padding-left: 4px; }
.doc .toc {
  margin-top: 30px; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 22px 24px; box-shadow: var(--shadow);
}
.doc .toc h4 { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 12px; font-weight: 700; }
.doc .toc ol { margin: 0; padding-left: 20px; display: grid; gap: 7px; }
.doc .toc ol li { font-size: 15.5px; }
.doc .toc a { color: var(--ink); font-weight: 550; }
.doc .toc a:hover { color: var(--coral-hover); }
.doc .callout {
  margin-top: 22px; border-left: 3px solid var(--coral);
  background: #FFF3EC; border-radius: 0 12px 12px 0; padding: 16px 20px;
}
.doc .callout p { margin: 0; color: var(--ink); font-size: 16px; }
.doc-back { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 15px; color: var(--ink-2); }
.doc-back:hover { color: var(--coral-hover); }
.doc-back svg { width: 16px; height: 16px; stroke: currentColor; }

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .hero { padding-top: 52px; }
  .hero h1 { font-size: 58px; }
  .hero-grid { grid-template-columns: 1fr; gap: 8px; }
  .phones { height: 540px; margin-top: 10px; }
  .section-head h2 { font-size: 40px; }
  .feature .f-copy h2 { font-size: 36px; }
  .feature { grid-template-columns: 1fr; gap: 34px; }
  .feature.reverse .f-media { order: 0; }
  .steps { grid-template-columns: 1fr; }
  .privacy-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 30px 20px; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .hero { padding-top: 44px; }
  .hero h1 { font-size: 44px; line-height: 1.07; }
  .hero .lede { font-size: 18px; max-width: none; }
  .hero-meta .dot { display: none; }
  .nav-links, .nav-cta .btn-ghost { display: none; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: 11px; border: 1px solid var(--line-2);
    background: var(--paper); cursor: pointer;
  }
  .nav-toggle svg { width: 20px; height: 20px; stroke: var(--ink); }
  .section-pad { padding: 60px 0; }
  .section-head h2,
  .feature .f-copy h2 { font-size: 32px; }
  .phones { height: 480px; }
  .phone.p1 { width: 240px; left: 2%; }
  .phone.p2 { width: 214px; right: 0; top: 130px; }
  .wrap { padding: 0 20px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 460px) {
  .hero h1 { font-size: 39px; }
  .hero-actions { align-items: stretch; }
  .store { width: 100%; justify-content: center; }
  .phone.p1 { width: 210px; }
  .phone.p2 { width: 188px; top: 150px; }
  .device {
    width: min(260px, calc(100vw - 56px));
    border-width: 7px;
  }
  .stats { grid-template-columns: 1fr; }
  .stat .v { font-size: 42px; }
  .cta-final h2,
  .doc h1 { font-size: 36px; }
  .foot-grid { grid-template-columns: 1fr; }
}

/* mobile menu */
.mobile-menu {
  display: none; position: fixed; inset: 68px 0 0; z-index: 90;
  background: var(--cream); padding: 24px 28px;
}
.mobile-menu.open { display: block; }
.mobile-menu a { display: block; padding: 16px 0; font-size: 20px; font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--line); letter-spacing: 0; }
.mobile-menu .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 24px;
  width: 100%;
  padding: 14px 22px;
}
