/* ─────────────────────────────────────────────────────────────────────────
   Route Pacer — marketing site styles
   Shares the app's palette (purple accent, cream surfaces, deer backdrop) and
   its light/dark handling. Edit this one file to restyle the whole site.
   ───────────────────────────────────────────────────────────────────────── */

:root {
  --bg: #ffffff;
  --bg2: #f5f5f0;
  --bg3: #eeeee8;
  --text: #1a1a1a;
  --text2: #666;
  --border: rgba(0,0,0,0.1);
  --accent: #7F77DD;          /* Route Pacer purple */
  --accent-bg: rgba(127,119,221,0.08);
  --pace: #1D9E75;            /* "pace" green */
  --warm: #D85A30;            /* HR / effort orange */
  --card-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 8px 24px rgba(0,0,0,0.04);
  --radius: 14px;
  --maxw: 960px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1a1a;
    --bg2: #242424;
    --bg3: #2e2e2e;
    --text: #e8e8e8;
    --text2: #9a9a9a;
    --border: rgba(255,255,255,0.1);
    --accent: #AFA9EC;
    --accent-bg: rgba(175,169,236,0.12);
    --pace: #5DCAA5;
    --warm: #F0997B;
    --card-shadow: 0 1px 3px rgba(0,0,0,0.3), 0 8px 24px rgba(0,0,0,0.25);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* The deer, hosted locally — a fixed, faint backdrop on every page (like the app). */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url('/static/img/deer-bg.jpg') center/cover no-repeat;
  opacity: 0.12;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ── Site header / nav ─────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 18px;
  height: 60px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px;
  color: var(--text); letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand .mark {
  width: 30px; height: 30px; border-radius: 9px; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--accent), var(--pace));
  display: grid; place-items: center; color: #fff; font-size: 16px;
}
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.site-nav a {
  color: var(--text2); font-size: 14px; font-weight: 500;
  padding: 7px 12px; border-radius: 9px;
}
.site-nav a:hover { color: var(--text); background: var(--bg2); text-decoration: none; }
.site-nav a.current { color: var(--text); background: var(--accent-bg); }

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero { padding: 74px 0 44px; text-align: center; }
.eyebrow {
  display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent);
  background: var(--accent-bg); padding: 5px 12px; border-radius: 999px; margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(32px, 5.5vw, 52px); line-height: 1.08; font-weight: 600;
  letter-spacing: -0.02em; margin: 0 auto 18px; max-width: 16ch;
}
.hero h1 .grad {
  background: linear-gradient(115deg, var(--accent), var(--pace));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lede { font-size: clamp(17px, 2.2vw, 20px); color: var(--text2);
  max-width: 56ch; margin: 0 auto; }
.hero .cta-row { margin-top: 30px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 11px; font-size: 15px; font-weight: 600;
  border: 1px solid var(--border); background: var(--bg2); color: var(--text); cursor: pointer;
}
.btn:hover { text-decoration: none; border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: transparent; color: #fff; }
.btn.primary:hover { filter: brightness(1.05); }

/* ── Generic section ───────────────────────────────────────────────────── */
section { padding: 40px 0; }
.section-head { text-align: center; max-width: 60ch; margin: 0 auto 34px; }
.section-head h2 { font-size: clamp(24px, 3.4vw, 32px); font-weight: 600; letter-spacing: -0.02em; margin: 0 0 10px; }
.section-head p { color: var(--text2); font-size: 16px; margin: 0; }

/* ── Feature cards ─────────────────────────────────────────────────────── */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(205px, 1fr)); gap: 18px; }
.card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px 22px; box-shadow: var(--card-shadow);
}
.card .ic { font-size: 26px; line-height: 1; margin-bottom: 14px; display: block; }
.card h3 { font-size: 18px; font-weight: 600; margin: 0 0 7px; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--text2); font-size: 14.5px; }

/* ── Alternating feature rows ──────────────────────────────────────────── */
.feature {
  display: grid; grid-template-columns: 1fr 1fr; gap: 42px; align-items: center;
  padding: 36px 0; border-top: 1px solid var(--border);
}
.feature:first-of-type { border-top: none; }
.feature .tag { font-size: 12px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--pace); margin-bottom: 10px; }
.feature.warm .tag { color: var(--warm); }
.feature.cool .tag { color: var(--accent); }
.feature h3 { font-size: clamp(21px, 3vw, 27px); font-weight: 600; letter-spacing: -0.02em; margin: 0 0 12px; }
.feature p { color: var(--text2); font-size: 16px; margin: 0 0 12px; }
.feature ul { margin: 14px 0 0; padding: 0; list-style: none; }
.feature li { position: relative; padding-left: 26px; margin-bottom: 9px; color: var(--text); font-size: 15px; }
.feature li::before { content: '→'; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.feature.reverse .feature-media { order: -1; }

/* ── Media frame (screenshots / video — placeholder today) ─────────────── */
.media {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); background: var(--bg3); box-shadow: var(--card-shadow);
  aspect-ratio: 16 / 10; display: grid; place-items: center; text-align: center;
}
.media.phone { aspect-ratio: 9 / 16; max-width: 280px; margin: 0 auto; border-radius: 26px; }
.media img, .media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media .ph {
  padding: 20px; color: var(--text2);
}
.media .ph .ph-ic { font-size: 30px; display: block; margin-bottom: 8px; opacity: 0.8; }
.media .ph .ph-t { font-size: 13px; font-weight: 600; }
.media .ph .ph-s { font-size: 12px; margin-top: 3px; opacity: 0.8; }
.media::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(140deg, rgba(127,119,221,0.10), rgba(29,158,117,0.08));
}

/* ── Sport focus strip ─────────────────────────────────────────────────── */
.sports { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.sport {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 999px;
  padding: 11px 20px; font-weight: 600; font-size: 15px;
}
.sport .se { font-size: 20px; }

/* ── CTA band ──────────────────────────────────────────────────────────── */
.band {
  text-align: center; background: var(--accent-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 44px 28px; margin: 20px 0;
}
.band h2 { font-size: clamp(22px, 3vw, 28px); margin: 0 0 10px; font-weight: 600; letter-spacing: -0.02em; }
.band p { color: var(--text2); margin: 0 auto; max-width: 52ch; font-size: 16px; }

/* ── Prose (privacy / terms / faq) ─────────────────────────────────────── */
.prose { max-width: 760px; margin: 0 auto; padding: 50px 0 20px; }
.prose .doc-title { font-size: clamp(28px, 4vw, 38px); font-weight: 600; letter-spacing: -0.02em; margin: 0 0 6px; }
.prose .updated { color: var(--text2); font-size: 14px; margin: 0 0 32px; }
.prose h2 { font-size: 21px; font-weight: 600; margin: 34px 0 10px; letter-spacing: -0.01em; }
.prose h3 { font-size: 16px; font-weight: 600; margin: 22px 0 6px; }
.prose p, .prose li { color: var(--text); font-size: 16px; }
.prose p { margin: 0 0 14px; }
.prose ul { padding-left: 22px; margin: 0 0 16px; }
.prose li { margin-bottom: 7px; }
.prose strong { font-weight: 600; }
.prose .callout {
  background: var(--bg2); border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: 10px; padding: 14px 18px; margin: 0 0 20px; font-size: 15px; color: var(--text2);
}

/* ── FAQ accordion ─────────────────────────────────────────────────────── */
.faq { max-width: 760px; margin: 0 auto; }
.faq details {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 12px;
  padding: 2px 18px; margin-bottom: 12px;
}
.faq details[open] { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 0; font-weight: 600; font-size: 16.5px;
  display: flex; align-items: center; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  content: '+'; color: var(--accent); font-weight: 700; font-size: 20px; width: 18px; flex: 0 0 auto;
  transition: transform 0.2s;
}
.faq details[open] summary::before { content: '−'; }
.faq .ans { padding: 0 0 18px 30px; color: var(--text2); font-size: 15.5px; }
.faq .ans p { margin: 0 0 10px; }
.faq .ans p:last-child { margin-bottom: 0; }

/* ── Footer ────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border); margin-top: 40px; padding: 34px 0;
  background: color-mix(in srgb, var(--bg2) 60%, transparent);
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; }
.site-footer .brand { font-size: 15px; }
.site-footer nav { margin-left: auto; display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer nav a { color: var(--text2); font-size: 14px; }
.site-footer nav a:hover { color: var(--text); }
.site-footer .copy { width: 100%; color: var(--text2); font-size: 13px; margin-top: 4px; }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .feature { grid-template-columns: 1fr; gap: 22px; }
  .feature.reverse .feature-media { order: 0; }
  .hero { padding: 54px 0 32px; }
  .site-nav a { padding: 7px 9px; }
}
