/* ==========================================================================
   SnapSense — shared styles
   Design tokens mirror the iOS app for one consistent system.
   ========================================================================== */

:root {
  /* Brand — iOS system blue, matching the app's accent + icon */
  --brand:      #0A84FF;
  --brand-dark: #0060DF;
  --brand-2:    #4AA0FF;

  /* Neutrals — light */
  --bg:        #ffffff;
  --bg-soft:   #f5f7fa;
  --bg-elev:   #ffffff;
  --border:    #e6e9ef;
  --ink:       #101623;
  --ink-soft:  #4a5566;
  --ink-faint: #7a8598;

  --shadow-sm: 0 1px 2px rgba(16, 22, 35, .05), 0 2px 8px rgba(16, 22, 35, .04);
  --shadow-md: 0 6px 24px rgba(16, 22, 35, .08), 0 2px 6px rgba(16, 22, 35, .05);
  --shadow-lg: 0 24px 60px rgba(16, 22, 35, .12), 0 8px 24px rgba(16, 22, 35, .06);

  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --maxw: 1120px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #0b0f16;
    --bg-soft:   #111722;
    --bg-elev:   #141b27;
    --border:    #232c3b;
    --ink:       #eef2f8;
    --ink-soft:  #aeb8c7;
    --ink-faint: #7c8698;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
    --shadow-md: 0 6px 24px rgba(0,0,0,.45);
    --shadow-lg: 0 24px 60px rgba(0,0,0,.55);
  }
}

/* ---------- Reset / base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  font-size: 17px;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.025em; font-weight: 700; margin: 0; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 650; letter-spacing: .08em;
  text-transform: uppercase; color: var(--brand); margin-bottom: 14px;
}
.accent { color: var(--brand); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 1rem; padding: 14px 26px;
  border-radius: var(--radius); border: 1px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 22px rgba(10,132,255,.32); }
.btn-primary:hover { background: var(--brand-dark); box-shadow: 0 10px 28px rgba(10,132,255,.42); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg-soft); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.site-header.scrolled { border-bottom-color: var(--border); box-shadow: var(--shadow-sm); }
.nav { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em; }
.logo { width: 34px; height: 34px; border-radius: 9px; box-shadow: var(--shadow-sm); }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a { color: var(--ink-soft); font-weight: 500; font-size: .96rem; transition: color .15s ease; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { margin-left: 22px; }
.nav-cta .btn { padding: 10px 20px; }
.menu-btn { display: none; }

/* ---------- Hero ---------- */
.hero { padding: 74px 0 40px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto -10%; height: 620px; z-index: -1;
  background:
    radial-gradient(58% 60% at 78% 8%, rgba(10,132,255,.16), transparent 70%),
    radial-gradient(46% 52% at 10% 4%, rgba(74,160,255,.14), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.badge-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--bg-soft); border: 1px solid var(--border);
  color: var(--ink-soft); font-size: .82rem; font-weight: 550;
  padding: 7px 13px; border-radius: 999px;
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
h1 { font-size: clamp(2.5rem, 5.5vw, 4rem); }
.hero .lead { font-size: 1.22rem; color: var(--ink-soft); margin: 20px 0 30px; max-width: 33ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-note { display: flex; align-items: center; gap: 8px; margin-top: 22px; font-size: .92rem; color: var(--ink-faint); }

/* ---------- Phone mockup ---------- */
.phone-stage { display: flex; justify-content: center; perspective: 1400px; }
.phone {
  width: 300px; background: #0b0f16; border-radius: 46px; padding: 12px;
  box-shadow: var(--shadow-lg), inset 0 0 0 2px rgba(255,255,255,.06);
  position: relative; transform: rotateY(-9deg) rotateX(3deg); transition: transform .5s ease;
}
.phone:hover { transform: rotateY(0deg) rotateX(0deg); }
.notch { position: absolute; top: 22px; left: 50%; transform: translateX(-50%); width: 110px; height: 26px; background: #0b0f16; border-radius: 999px; z-index: 3; }
.screen { background: var(--bg-soft); border-radius: 36px; overflow: hidden; height: 600px; }
.scr-top { padding: 44px 18px 10px; }
.scr-eyebrow { font-size: .72rem; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-faint); }
.scr-shot {
  margin: 6px 18px 0; background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(0,0,0,.05);
}
.scr-shot .band { background: #12245a; color: #fff; padding: 10px 12px; }
.scr-shot .band b { display: block; font-size: .82rem; }
.scr-shot .band span { font-size: .64rem; opacity: .85; }
.scr-shot .body { padding: 11px 12px 14px; color: #101623; }
.scr-shot .fno { font-size: 1.05rem; font-weight: 700; }
.scr-shot .route { font-size: .82rem; font-weight: 600; margin-top: 2px; }
.scr-shot .muted { font-size: .64rem; color: #7a8598; margin-top: 3px; }
.detect { margin: 14px 18px 0; display: flex; align-items: center; gap: 8px; }
.detect .pill { font-size: .68rem; font-weight: 600; color: #0a7d3a; background: rgba(16,185,90,.14); padding: 4px 9px; border-radius: 999px; }
.detect .lbl { font-size: .8rem; color: var(--ink-soft); font-weight: 600; }
.scr-title { margin: 8px 18px 0; font-size: 1.25rem; font-weight: 700; }
.scr-sub { margin: 2px 18px 0; font-size: .86rem; color: var(--ink-soft); }
.scr-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 18px; }
.scr-actions .act { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; color: var(--brand); background: rgba(10,132,255,.12); padding: 8px 12px; border-radius: 999px; }

/* ---------- Sections ---------- */
section { padding: 66px 0; }
.section-head { max-width: 640px; margin: 0 auto 46px; text-align: center; }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
.section-head p { color: var(--ink-soft); font-size: 1.1rem; margin-top: 14px; }

.features { background: var(--bg-soft); }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card .ico {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: rgba(10,132,255,.12); color: var(--brand); margin-bottom: 16px;
}
.card h3 { font-size: 1.18rem; margin-bottom: 8px; }
.card p { color: var(--ink-soft); font-size: .98rem; margin: 0; }

/* ---------- How it works ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; counter-reset: step; }
.step { position: relative; padding-top: 8px; }
.step .num {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand); color: #fff; font-weight: 700; font-size: 1.05rem; margin-bottom: 16px;
  box-shadow: 0 6px 16px rgba(10,132,255,.35);
}
.step h3 { font-size: 1.2rem; margin-bottom: 8px; }
.step p { color: var(--ink-soft); margin: 0; }

/* ---------- Privacy band ---------- */
.privacy-band { background: linear-gradient(180deg, var(--bg), var(--bg-soft)); }
.privacy-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.privacy-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 14px; }
.privacy-list li { display: flex; gap: 12px; align-items: flex-start; }
.privacy-list .check { flex: none; width: 24px; height: 24px; border-radius: 50%; background: rgba(16,185,90,.14); color: #12a150; display: grid; place-items: center; margin-top: 2px; }
.privacy-list b { display: block; }
.privacy-list span { color: var(--ink-soft); font-size: .96rem; }
.privacy-card {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 32px; box-shadow: var(--shadow-md); text-align: center;
}
.privacy-card .big { font-size: 3.4rem; line-height: 1; margin-bottom: 10px; }
.privacy-card h3 { font-size: 1.4rem; font-family: var(--serif); font-weight: 600; }
.privacy-card p { color: var(--ink-soft); margin: 10px 0 0; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 780px; margin: 0 auto; display: grid; gap: 12px; }
details.qa {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 4px 22px; box-shadow: var(--shadow-sm);
}
details.qa summary {
  list-style: none; cursor: pointer; padding: 18px 0; font-weight: 600; font-size: 1.05rem;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary::after { content: "+"; font-size: 1.4rem; color: var(--brand); font-weight: 400; transition: transform .2s ease; }
details.qa[open] summary::after { transform: rotate(45deg); }
details.qa p { color: var(--ink-soft); margin: 0 0 18px; }

/* ---------- Download CTA ---------- */
.cta { text-align: center; }
.cta-box {
  background: linear-gradient(135deg, var(--brand), #3f97ff);
  border-radius: var(--radius-xl); padding: 60px 32px; color: #fff; box-shadow: var(--shadow-lg);
  position: relative; overflow: hidden;
}
.cta-box::after { content: ""; position: absolute; inset: auto -10% -60% -10%; height: 300px; background: radial-gradient(50% 60% at 50% 0, rgba(255,255,255,.25), transparent 70%); }
.cta-box h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); color: #fff; }
.cta-box p { color: rgba(255,255,255,.9); font-size: 1.12rem; margin: 14px auto 28px; max-width: 46ch; }
.cta-box .btn-primary { background: #fff; color: var(--brand); box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.cta-box .btn-primary:hover { background: #f2f6ff; }
.store-badge { display: inline-flex; align-items: center; gap: 10px; }

/* ---------- Footer ---------- */
footer.site-footer { background: var(--bg-soft); border-top: 1px solid var(--border); padding: 54px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 36px; }
.footer-grid .about p { color: var(--ink-soft); font-size: .95rem; margin: 12px 0 0; max-width: 30ch; }
.fcol h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); margin: 0 0 14px; }
.fcol a { display: block; color: var(--ink-soft); font-size: .96rem; margin-bottom: 10px; transition: color .15s ease; }
.fcol a:hover { color: var(--brand); }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 24px; border-top: 1px solid var(--border); color: var(--ink-faint); font-size: .88rem; }

/* ---------- Legal pages ---------- */
.legal { padding: 54px 0 40px; }
.legal-wrap { max-width: 760px; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.7rem); }
.legal .updated { color: var(--ink-faint); font-size: .92rem; margin: 8px 0 24px; }
.legal .intro { font-size: 1.12rem; color: var(--ink-soft); }
.legal h2 { font-size: 1.35rem; margin: 38px 0 12px; scroll-margin-top: 90px; }
.legal h3 { font-size: 1.08rem; margin: 22px 0 8px; }
.legal p, .legal li { color: var(--ink-soft); }
.legal ul, .legal ol { padding-left: 22px; margin: 0 0 1em; }
.legal li { margin-bottom: 8px; }
.legal a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.callout { background: var(--bg-soft); border: 1px solid var(--border); border-left: 3px solid var(--brand); border-radius: var(--radius); padding: 18px 22px; margin: 24px 0; }
.callout p { margin: 0; color: var(--ink); }
.toc { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px; margin: 28px 0; }
.toc h4 { margin: 0 0 12px; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin-bottom: 6px; }
.toc a { color: var(--ink-soft); text-decoration: none; }
.toc a:hover { color: var(--brand); }
.back-top { display: inline-block; margin-top: 30px; font-size: .92rem; color: var(--brand); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none; }
  html { scroll-behavior: auto; }
  .phone { transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .privacy-wrap { grid-template-columns: 1fr; gap: 40px; }
  .phone-stage { order: -1; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; gap: 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .nav-links { display: none; }
  .feature-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 48px; }
  .hero .lead { max-width: none; }
}
