/* HeadsUp Bike — site styles. Night-map look: dark ground, the app's own route colours as accents.
   Route colours match the app's dark map (HeadsUpBike/tools/make_styles.py). */

:root {
  --ground: #121518;
  --ground-2: #1a1e23;
  --panel: #20252b;
  --line: #2e353d;
  --text: #eef2f5;
  --text-soft: #a9b3bd;
  --text-faint: #7d8893;

  --cycleway: #2df27a;   /* green  — bike paths */
  --lane: #c77dff;       /* purple — bike lanes */
  --path: #ffb52e;       /* amber  — walking paths & connectors */
  --route: #4f8ff7;      /* blue   — signed cycling routes */
  --steps: #ff5a52;      /* red    — stairs */
  --dot: #3fa9ff;        /* the blue "you are here" dot */

  --radius: 18px;
  --max: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; color-scheme: dark; }
body { margin: 0; font-family: var(--font); font-size: 18px; line-height: 1.65; color: var(--text); background: var(--ground); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cycleway); text-underline-offset: 3px; }
a:hover { color: #7dffb0; }
h1, h2, h3 { line-height: 1.1; letter-spacing: -.025em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 6.4vw, 4.6rem); font-weight: 850; }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 750; letter-spacing: -.01em; }
p { margin: 0 0 1.1em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 740px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: var(--ground); padding: 8px 12px; z-index: 100; }

/* Route-line motif: three stripes in the map's colours */
.stripes { display: flex; gap: 6px; height: 6px; width: 120px; margin-bottom: 22px; }
.stripes i { flex: 1; border-radius: 3px; }
.stripes i:nth-child(1) { background: var(--cycleway); }
.stripes i:nth-child(2) { background: var(--lane); }
.stripes i:nth-child(3) { background: repeating-linear-gradient(90deg, var(--path) 0 10px, transparent 10px 15px); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(18, 21, 24, .82); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 800; font-size: 1.1rem; white-space: nowrap; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand:hover { color: var(--text); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { text-decoration: none; color: var(--text-soft); font-size: .95rem; font-weight: 600; padding: 8px 12px; border-radius: 999px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--panel); }
.nav a.cta { background: var(--cycleway); color: #06210f; margin-left: 6px; }
.nav a.cta:hover { background: #7dffb0; color: #06210f; }
.menu { display: none; position: relative; }
.menu summary { list-style: none; cursor: pointer; padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: .95rem; border: 1px solid var(--line); }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { background: var(--panel); }
.menu .nav { position: absolute; right: 0; top: calc(100% + 8px); flex-direction: column; align-items: stretch; min-width: 220px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 8px; box-shadow: 0 20px 40px rgba(0,0,0,.5); }
.menu .nav a { border-radius: 10px; }
.menu .nav a.cta { margin: 6px 0 0; text-align: center; }
@media (max-width: 820px) { .site-header .nav.desktop { display: none; } .menu { display: block; } }

/* ---------- Buttons & pills ---------- */
.btn { display: inline-block; text-decoration: none; font-weight: 750; padding: 14px 24px; border-radius: 999px; background: var(--cycleway); color: #06210f; }
.btn:hover { background: #7dffb0; color: #06210f; }
.btn.ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--text-soft); color: var(--text); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.pill { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 700; letter-spacing: .02em; padding: 6px 14px; border-radius: 999px; background: rgba(45, 242, 122, .12); color: var(--cycleway); margin-bottom: 22px; }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--cycleway); box-shadow: 0 0 0 4px rgba(45, 242, 122, .25); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 72px 0 40px; }
.hero::before { /* faint glow from the map colours */
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 70%; height: 120%;
  background: radial-gradient(closest-side, rgba(199,125,255,.18), transparent 70%), radial-gradient(closest-side at 30% 70%, rgba(45,242,122,.14), transparent 70%);
  pointer-events: none;
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero-icon { width: 76px; height: 76px; border-radius: 18px; margin-bottom: 24px; box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.hero .lede { font-size: clamp(1.1rem, 2.2vw, 1.32rem); color: var(--text-soft); max-width: 32em; margin-bottom: 1.8em; }
.hero-media { position: relative; display: flex; justify-content: center; }
.hero-media .phone { max-width: 300px; transform: rotate(2.5deg); }
.hero-media .watch { position: absolute; left: 2%; bottom: -4%; width: 150px; transform: rotate(-5deg); }
@media (max-width: 860px) {
  .hero { padding-top: 48px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .hero-media .phone { max-width: 250px; }
  .hero-media .watch { width: 120px; left: 6%; }
}

/* ---------- Device frames ---------- */
.phone { width: 100%; max-width: 280px; border-radius: 44px; padding: 9px; background: #050607; box-shadow: 0 0 0 1.5px #3a4149, 0 30px 60px rgba(0,0,0,.55); }
.phone img { border-radius: 36px; width: 100%; }
.watch { border-radius: 46px; padding: 10px; background: #050607; box-shadow: 0 0 0 1.5px #3a4149, 0 20px 40px rgba(0,0,0,.55); }
.watch img { border-radius: 36px; width: 100%; }

/* ---------- Sections ---------- */
section { padding: 88px 0; }
.band { background: var(--ground-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.feature { display: grid; grid-template-columns: .85fr 1.15fr; gap: 64px; align-items: center; }
.feature + .feature { margin-top: 100px; }
.feature.flip .feature-media { order: 2; }
.feature-media { display: flex; justify-content: center; }
.feature-text p { color: var(--text-soft); font-size: 1.08rem; }
.eyebrow { display: block; font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; margin-bottom: .9em; }
.eyebrow.g { color: var(--cycleway); } .eyebrow.p { color: var(--lane); } .eyebrow.a { color: var(--path); } .eyebrow.b { color: var(--route); }
@media (max-width: 760px) {
  section { padding: 60px 0; }
  .feature { grid-template-columns: 1fr; gap: 32px; }
  .feature.flip .feature-media { order: 0; }
  .feature + .feature { margin-top: 70px; }
}

/* Legend */
.legend { list-style: none; padding: 0; margin: 1.4em 0 0; display: grid; gap: 4px; }
.legend li { display: grid; grid-template-columns: 54px 1fr; gap: 14px; align-items: center; padding: 10px 14px; border-radius: 12px; background: var(--panel); }
.legend b { display: block; color: var(--text); font-weight: 700; font-size: 1rem; }
.legend span { color: var(--text-soft); font-size: .92rem; }
.swatch { height: 6px; border-radius: 3px; }
.swatch.cycleway { background: var(--cycleway); height: 8px; }
.swatch.lane { background: var(--lane); height: 7px; }
.swatch.lane-paint { background: var(--lane); height: 4px; }
.swatch.shared { background: repeating-linear-gradient(90deg, var(--lane) 0 8px, transparent 8px 13px); }
.swatch.path { background: var(--path); height: 7px; }
.swatch.walk { background: repeating-linear-gradient(90deg, var(--path) 0 8px, transparent 8px 13px); }
.swatch.route { background: var(--route); }
.swatch.steps { background: repeating-linear-gradient(90deg, var(--steps) 0 3px, transparent 3px 7px); height: 5px; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 2.2em; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.card p { color: var(--text-soft); margin: 0; font-size: 1rem; }
.card .dot { width: 12px; height: 12px; border-radius: 50%; margin-bottom: 16px; }
@media (max-width: 860px) { .cards { grid-template-columns: 1fr; } }

.watch-row { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; }
.watch-row .watch { width: 190px; }
.watch-row .watch:nth-child(2) { transform: translateY(28px); }
@media (max-width: 520px) { .watch-row .watch { width: 150px; } .watch-row .watch:nth-child(3) { display: none; } }

.center { text-align: center; }
.center .stripes { margin-left: auto; margin-right: auto; }
.center .actions { justify-content: center; }
.soft { color: var(--text-soft); }

/* Signup / coming-soon panel */
.soon { position: relative; overflow: hidden; border-radius: 28px; padding: 56px 32px; background: linear-gradient(135deg, #1c2a22, #251c33); border: 1px solid var(--line); }
.soon p { color: var(--text-soft); max-width: 34em; margin-left: auto; margin-right: auto; }

/* ---------- Inner pages ---------- */
.page-head { padding: 72px 0 24px; }
.page-head p { color: var(--text-soft); font-size: 1.2rem; }
.prose { font-size: 1.06rem; }
.prose h2 { font-size: 1.6rem; margin-top: 1.8em; }
.prose h3 { margin-top: 1.6em; }
.prose p, .prose li { color: #d3d9df; }
.prose ul { padding-left: 1.2em; }
.prose li { margin: .35em 0; }
.prose blockquote { margin: 1.6em 0; padding: 18px 22px; border-radius: 14px; background: var(--panel); border-left: 4px solid var(--path); color: var(--text-soft); }
.prose .figure-row { display: flex; gap: 24px; justify-content: center; margin: 2.2em 0; flex-wrap: wrap; }
.prose .figure-row .phone { max-width: 230px; }
.updated { color: var(--text-faint); font-size: .95rem; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 40px; font-size: .95rem; color: var(--text-soft); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; }
.site-footer h3 { color: var(--text); font-size: 1rem; margin-bottom: .8em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: .35em 0; }
.site-footer a { color: var(--text-soft); text-decoration: none; }
.site-footer a:hover { color: var(--cycleway); text-decoration: underline; }
.credits { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font-size: .82rem; color: var(--text-faint); }
.credits a { color: var(--text-faint); text-decoration: underline; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }
