/* Steero shared base: tokens, type, nav, buttons, motion, footer, toast.
   Every page loads this first; home.css and page.css add their own parts.
   Was: Steero home page.
   Brand: blue for the one action (as in the app, DECISIONS.md D20). Road-sign yellow belongs to the road:
   the icon, the hero road, your car and the lane timer. Asphalt for the drive, light blue for eyes.
   Motion: iOS springs as CSS linear() curves (scratch generator: response 0.5 s, damping 1 / 0.85 / 0.7). */

:root {
  --sign: #F6C744; --sign-ink: #1D1B16; --asphalt: #24272C; --look: #2A6FDB; --caught: #23864F; --skipped: #C93C3C;
  /* action: fills behind white text (4.5:1 in both modes). accent: blue text, dots and bars. */
  --action: #2A6FDB; --accent: #2A6FDB; --accent-on-dark: #6FA6FF;
  --bg: #F5F5F7; --surface: #FFFFFF; --surface-2: #ECECF0; --text: #1D1D1F; --text-2: #6E6E73; --hairline: rgba(0, 0, 0, .1);
  --material: rgba(250, 250, 252, .72);
  --hero-bg: var(--sign); --hero-ink: var(--sign-ink); --road: var(--asphalt); --dash: #FFFFFF;
  --on-road: #F5F5F7; --on-road-2: rgba(245, 245, 247, .62);
  --scene-ground: #2E3431; --scene-road: #24272C; --scene-curb: #4A4E56;

  --spring-smooth: linear(0, .024, .082, .16, .245, .332, .415, .494, .565, .629, .685, .734, .776, .812, .843, .87, .892, .91, .926, .939, .95, .959, .966, .972, .977, .981, .985, .988, .99, .992, .993, .995, .996, .996, .997, .998, .998, .998, .999, .999, 1);
  --spring-snappy: linear(0, .023, .079, .157, .245, .337, .428, .514, .593, .664, .727, .781, .827, .866, .898, .924, .945, .962, .975, .984, .992, .997, 1.001, 1.004, 1.005, 1.006, 1.006, 1.006, 1.006, 1.005, 1.005, 1.004, 1.004, 1.003, 1.003, 1.002, 1.002, 1.001, 1.001, 1.001, 1);
  --spring-bouncy: linear(0, .031, .108, .212, .33, .45, .565, .67, .761, .838, .9, .949, .986, 1.012, 1.03, 1.04, 1.045, 1.046, 1.044, 1.04, 1.035, 1.029, 1.024, 1.019, 1.014, 1.01, 1.007, 1.004, 1.002, 1, .999, .998, .998, .998, .998, .998, .998, .998, .999, .999, 1);
  --t-smooth: .75s; --t-snappy: .6s; --t-bouncy: .84s;
  --ease-ios: cubic-bezier(.32, .72, 0, 1);

  --max: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --nav-h: 52px;
  --r-tile: 28px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --sign: #F2C14E; --look: #6FA6FF; --caught: #4CC17E; --skipped: #F06A6A;
    --action: #2C6FE0; --accent: #6FA6FF;
    --bg: #000; --surface: #1C1C1E; --surface-2: #2C2C2E; --text: #F5F5F7; --text-2: #A1A1A6; --hairline: rgba(255, 255, 255, .14);
    --material: rgba(22, 22, 23, .72);
    --hero-bg: #0E0F11; --hero-ink: #F5F5F7; --road: #1F2226;
    --scene-ground: #1E2321; --scene-road: #14161A; --scene-curb: #3A3E46;
  }
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.47 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, system-ui, sans-serif;
  letter-spacing: -.012em; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip;
}
h1, h2, h3 { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, system-ui, sans-serif; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
svg { display: block; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--look); outline-offset: 3px; border-radius: 8px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--surface); padding: 10px 14px; border-radius: 10px; }
.skip:focus { top: 12px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.kicker { font-size: 17px; font-weight: 600; color: var(--text-2); margin-bottom: 10px; }
.h2 { font-size: clamp(34px, 5.2vw, 60px); line-height: 1.04; letter-spacing: -.028em; font-weight: 700; }
.section-lede { font-size: clamp(19px, 1.6vw, 22px); color: var(--text-2); max-width: 640px; margin-top: 16px; letter-spacing: -.016em; }
.mark { width: 26px; height: 26px; border-radius: 7px; flex: none; }

/* Pressable: iOS press-down on every tappable surface */
.press { transition: transform var(--t-snappy) var(--spring-snappy), background-color .3s, box-shadow .3s; -webkit-tap-highlight-color: transparent; }
.press:active { transform: scale(.96); transition-duration: .12s; transition-timing-function: ease-out; }

/* Reveal on scroll (only when JS runs, so nothing hides without it) */
.js .reveal { opacity: 0; transform: translateY(28px); filter: blur(10px); }
.js .reveal.in {
  opacity: 1; transform: none; filter: none;
  transition: opacity .8s var(--ease-ios), transform 1s var(--spring-smooth), filter .8s var(--ease-ios);
  transition-delay: calc(var(--i, 0) * 80ms);
}

/* Navigation: clear over the hero, frosted material once you scroll */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50; padding-top: env(safe-area-inset-top);
  color: var(--hero-ink);
  transition: background-color .45s var(--ease-ios), color .45s var(--ease-ios), box-shadow .45s;
}
.nav.is-scrolled { background: var(--material); color: var(--text); box-shadow: 0 .5px 0 var(--hairline);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
.nav.is-scrolled.on-dark { background: rgba(30, 32, 36, .72); color: #F5F5F7; box-shadow: 0 .5px 0 rgba(255, 255, 255, .1); }
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) { .nav.is-scrolled { background: var(--bg); } .nav.is-scrolled.on-dark { background: var(--road); } }
.nav-inner { height: var(--nav-h); max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: -.02em; }
.nav-links { display: flex; gap: 28px; margin: 0 auto; font-size: 14px; }
.nav-links a, .nav-link { text-decoration: none; opacity: .78; transition: opacity .2s; }
.nav-links a:hover, .nav-link:hover { opacity: 1; }
.nav-actions { display: flex; align-items: center; gap: 18px; font-size: 14px; margin-left: auto; }
.nav-links + .nav-actions { margin-left: 0; }
.pill {
  display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: 999px; text-decoration: none;
  font-weight: 600; font-size: 14px; background: var(--sign-ink); color: #fff;
}
.nav.is-scrolled .pill { background: var(--action); color: #fff; }
@media (prefers-color-scheme: dark) { .pill { background: var(--action); color: #fff; } }
@media (max-width: 860px) { .nav-links { display: none; } }
@media (max-width: 360px) { .brand span { display: none; } }

/* App Store badge (PLACEHOLDER until the listing exists, DECISIONS.md D13) */
.appstore {
  display: inline-flex; align-items: center; gap: 10px; height: 54px; padding: 0 20px 0 15px; border-radius: 13px;
  background: #000; color: #fff; text-decoration: none; box-shadow: inset 0 0 0 1px #A6A6A6;
}
.appstore svg { width: 26px; height: 26px; margin-top: -3px; fill: currentColor; }
.appstore span { display: flex; flex-direction: column; line-height: 1; text-align: left; }
.appstore small { font-size: 11px; font-weight: 500; letter-spacing: .01em; }
.appstore b { font-size: 23px; font-weight: 600; letter-spacing: -.03em; margin-top: 2px; }
.btn-soft {
  display: inline-flex; align-items: center; gap: 6px; height: 54px; padding: 0 20px; border-radius: 13px; text-decoration: none;
  font-weight: 600; font-size: 17px; border: 0; cursor: pointer; background: color-mix(in srgb, currentColor 9%, transparent);
}
.btn-soft svg { width: 14px; height: 14px; transition: transform var(--t-snappy) var(--spring-snappy); }
.btn-soft:hover svg { transform: translateX(3px); }
.placard {
  display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 26px; border-radius: 18px; border: 0;
  background: var(--action); color: #fff; font-weight: 700; font-size: 18px; text-decoration: none; cursor: pointer;
}

/* Free web drill band */
.drill-band { position: relative; display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 24px; min-height: 380px; border-radius: 36px; overflow: hidden; background: var(--road); color: var(--on-road); isolation: isolate; }
.drill-band .copy { padding: clamp(32px, 5vw, 64px); }
.drill-band .h2 { font-size: clamp(32px, 4.2vw, 50px); }
.drill-band p { margin-top: 14px; font-size: 19px; color: var(--on-road-2); max-width: 440px; }
.drill-band .placard { margin-top: 28px; }
.drill-band .road-mini { position: relative; align-self: stretch; min-height: 260px; }
.drill-band canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
@media (max-width: 760px) { .drill-band { grid-template-columns: 1fr; border-radius: 28px; } .drill-band .copy { padding-bottom: 0; } .drill-band .road-mini { min-height: 220px; } }

/* Footer */
.foot { border-top: 1px solid var(--hairline); padding: 36px 0 calc(40px + env(safe-area-inset-bottom)); font-size: 13px; color: var(--text-2); }
.foot-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.foot-top .brand { color: var(--text); font-size: 16px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 22px; }
.foot-links a { text-decoration: none; color: var(--text); opacity: .8; }
.foot-links a:hover { opacity: 1; }
.foot p { margin-top: 18px; max-width: 820px; line-height: 1.55; }

/* Toast: grows out of the Dynamic Island like an iOS notice */
.toast { position: fixed; z-index: 60; left: 50%; top: calc(10px + env(safe-area-inset-top)); translate: -50% 0;
  width: 128px; height: 36px; border-radius: 22px; background: #000; color: #fff; overflow: hidden;
  opacity: 0; transform: scale(.7); pointer-events: none; box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .45);
  transition: width var(--t-bouncy) var(--spring-bouncy), height var(--t-bouncy) var(--spring-bouncy), border-radius var(--t-bouncy) var(--spring-bouncy),
    transform var(--t-bouncy) var(--spring-bouncy), opacity .25s; }
.toast.is-on { width: min(380px, calc(100vw - 24px)); height: 76px; border-radius: 38px; opacity: 1; transform: none; pointer-events: auto; }
.toast-in { display: flex; align-items: center; gap: 12px; height: 76px; padding: 0 12px 0 14px; white-space: nowrap; opacity: 0; filter: blur(6px); transition: opacity .3s, filter .3s; }
.toast.is-on .toast-in { opacity: 1; filter: none; transition-delay: .14s; }
.toast .mark { width: 46px; height: 46px; border-radius: 12px; }
.toast-text { flex: 1; min-width: 0; line-height: 1.25; }
.toast-text b { display: block; font-size: 15px; }
.toast-text span { display: block; font-size: 13px; color: rgba(255, 255, 255, .62); overflow: hidden; text-overflow: ellipsis; }
.toast a { flex: none; padding: 9px 14px; border-radius: 999px; background: var(--action); color: #fff; font-weight: 700; font-size: 14px; text-decoration: none; }

/* Utilities */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wide { width: 100%; }
.nav-links a[aria-current="page"], .nav-link[aria-current="page"] { opacity: 1; font-weight: 600; }

/* Reduced motion: keep fades, drop movement */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { transform: none; filter: none; }
  *, *::before, *::after { animation-duration: 0s !important; animation-iteration-count: 1 !important; }
}
