/* ==========================================================================
   Frank — shared design system
   Design tokens, base resets, navigation, and glass/hero utilities shared
   across index.html, frank-riders.html and frank-drivers.html.
   ========================================================================== */

/* ---- Design tokens ---- */
:root {
  --accent: oklch(0.72 0.17 165);
  --accent-deep: oklch(0.62 0.16 165);
  --accent-deeper: oklch(0.5 0.14 165);
  --accent-darkest: oklch(0.46 0.13 165);
  --accent-soft: oklch(0.72 0.17 165 / 0.16);
  --ink: #0E0F12;
  --muted: #6E7378;
  --muted-2: #3A3D42;
  --surface: #F5F5F7;
}

/* ---- Base ---- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; } /* keep #anchors clear of the fixed pill */
body {
  margin: 0;
  background: #FFFFFF;
  color: var(--ink);
  font-family: 'Sora', sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: clip;
}
::selection { background: var(--accent); color: var(--ink); }
a { color: inherit; }

@keyframes frise { from { opacity:0; transform:translateY(16px);} to { opacity:1; transform:translateY(0);} }
@keyframes fpulse { 0%,100% { opacity:1;} 50% { opacity:0.3;} }

/* ---- Shared "vista" scene primitives ---- */
.vista-scene { position:absolute; inset:0; overflow:hidden; background:#0B0C12; }
/* Standalone so they can be reused outside .vista-scene (e.g. the cinematic
   hero). Existing <div class="grain"/"vignette"> inside .vista-scene still match. */
.grain { position:absolute; inset:0; background-image:radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px); background-size:3px 3px; mix-blend-mode:overlay; pointer-events:none; }
.vignette { position:absolute; inset:0; background:radial-gradient(120% 90% at 50% 26%, transparent 44%, rgba(8,9,14,0.34) 100%); pointer-events:none; }

/* ==========================================================================
   Navigation — floating frosted-glass pill (Humalike-inspired)
   A fixed, gutter-inset pill that floats over Frank's sections. Its theme
   adapts to the content behind it: light frosted-white glass with dark ink
   over light sections, and translucent dark glass with white text over the
   dark cinematic hero / dark bands. nav.js toggles .nav--light / .nav--dark.
   Mobile: brand + hamburger in the pill; the menu drops as a LIGHT frosted
   panel below it. The page stays scrollable while it is open (no scroll lock,
   no full-page dark scrim).
   ========================================================================== */
.nav {
  position: fixed;
  top: 12px; left: 16px; right: 16px;
  z-index: 100;
  border-radius: 20px;
  border: 1px solid transparent;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 12px 32px -16px rgba(0,0,0,0.28),
              0 2px 6px -3px rgba(0,0,0,0.16);
}
/* Cross-fade colours as the pill passes over light/dark sections. nav.js adds
   .nav--ready only after the first theme resolve, so the initial theme snaps in
   instead of visibly fading from the default. Disabled under reduced-motion. */
.nav--ready { transition: background-color .3s ease, color .3s ease, border-color .3s ease; }
@media (prefers-reduced-motion: reduce) {
  .nav--ready { transition: none; }
}

/* Light context (white sections, open menu) — frosted white glass, dark ink.
   Also the default before nav.js resolves a theme. */
.nav--light,
.nav:not(.nav--dark):not(.nav--light) {
  background: rgba(255,255,255,0.78);
  border-color: rgba(0,0,0,0.08);
  color: var(--ink);
}
/* Dark context (cinematic hero, dark bands) — translucent dark glass, white
   text. Still glass, not a solid black bar. */
.nav--dark {
  background: rgba(18,20,26,0.50);
  border-color: rgba(255,255,255,0.16);
  color: #FFFFFF;
}
/* No-backdrop-filter browsers: solidify so text stays legible over content. */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .nav--light,
  .nav:not(.nav--dark):not(.nav--light) { background: rgba(255,255,255,0.94); }
  .nav--dark { background: rgba(18,20,26,0.86); }
}

.nav-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 10px 18px;
}

/* Brand identity preserved: lowercase frank. + mint dot. Colour follows theme. */
.brand { text-decoration: none; color: inherit; font-weight: 800; font-size: 22px; letter-spacing: -0.04em; line-height: 1; white-space: nowrap; }
.brand .dot { color: var(--accent); }

/* On desktop the wrapper dissolves so brand / links / cta lay out as three
   direct flex children of .nav-inner (preserving the original spacing). */
.nav-menu { display: contents; }

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { text-decoration: none; color: inherit; font-size: 15px; transition: opacity .18s ease; }
.nav-links a:not(.active) { font-weight: 500; opacity: 0.72; }
.nav-links a.active { font-weight: 600; opacity: 1; }
.nav-links a:hover { opacity: 1; }

.nav-cta { display: flex; align-items: center; gap: 8px; }
/* Secondary CTA — ghost text; colour + hover wash adapt to the theme. */
.link-btn {
  text-decoration: none; color: inherit; font-weight: 600; font-size: 15px;
  padding: 10px 14px; border-radius: 999px;
  transition: background .18s ease, color .18s ease;
}
.nav--dark .link-btn { color: rgba(255,255,255,0.92); }
.nav--dark .link-btn:hover { color: #FFFFFF; background: rgba(255,255,255,0.10); }
.nav--light .link-btn,
.nav:not(.nav--dark):not(.nav--light) .link-btn { color: var(--muted-2); }
.nav--light .link-btn:hover { color: var(--ink); background: rgba(0,0,0,0.05); }
/* Primary CTA — mint pill with dark ink text (reads on both themes). */
.pill-btn {
  text-decoration: none; background: var(--accent); color: var(--ink);
  font-weight: 600; font-size: 15px; padding: 11px 20px; border-radius: 999px;
  white-space: nowrap; transition: background .18s ease;
}
.pill-btn:hover { background: var(--accent-deep); }

/* Hamburger — bars inherit the theme colour (hidden until <=768px). */
.nav-toggle {
  display: none;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  width: 42px; height: 42px; padding: 0;
  background: none; border: none; cursor: pointer; color: inherit;
}
.nav-toggle-bar {
  display: block; width: 22px; height: 2px; border-radius: 2px;
  background: currentColor;
  transition: transform .25s ease, opacity .2s ease;
}
.nav-open .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Keyboard focus — visible and theme-adaptive (currentColor is white on the
   dark pill, ink on the light pill); the mint primary uses a dark outline. */
.brand:focus-visible,
.nav-links a:focus-visible,
.link-btn:focus-visible,
.nav-toggle:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 6px;
}
.pill-btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* Desktop (>768px): cap and centre the pill so it reads as a pill, not a
   full-width bar at large viewports. */
@media (min-width: 769px) {
  .nav {
    left: 50%; right: auto;
    transform: translateX(-50%);
    width: calc(100% - 24px);
    max-width: 1180px;
  }
  /* A touch more horizontal padding so brand / links / CTAs spread to the
     pill's wider edges (Humalike-style) instead of clustering centre. */
  .nav-inner { padding: 10px 24px; }
}

/* Mobile (<=768px): only "frank." + hamburger show in the pill; the menu drops
   below as a LIGHT frosted panel. The page stays scrollable while it is open
   (no scroll lock) and there is no full-page dark scrim. */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  /* Opening the menu solidifies the whole header into one frosted sheet (pill +
     dropdown), opaque enough that the page beneath is NOT readable through it,
     and themed to the section behind it (same .nav--dark / .nav--light that
     drives the logo): dark glass + light text over the dark hero, light glass +
     dark ink over white sections. */
  .nav.nav-open {
    backdrop-filter: blur(48px) saturate(160%);
    -webkit-backdrop-filter: blur(48px) saturate(160%);
  }
  .nav--dark.nav-open {
    background: rgba(18,20,26,0.98);
    border-color: rgba(255,255,255,0.14);
  }
  .nav--light.nav-open,
  .nav:not(.nav--dark):not(.nav--light).nav-open {
    background: rgba(255,255,255,0.98);
    border-color: rgba(0,0,0,0.08);
  }

  .nav-menu {
    display: flex; flex-direction: column; align-items: stretch; gap: 20px;
    position: absolute; top: calc(100% + 10px); left: 0; right: 0;
    padding: 20px 18px 22px;
    border-radius: 20px;
    backdrop-filter: blur(48px) saturate(160%);
    -webkit-backdrop-filter: blur(48px) saturate(160%);
    border: 1px solid transparent;
    box-shadow: 0 24px 48px -24px rgba(0,0,0,0.45);
    color: inherit;
    /* Smooth open/close: opacity + translateY. */
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
  }
  /* Frosted panel fill — high opacity so hero/page text cannot be read through
     it; the blur keeps it reading as glass. */
  .nav--dark .nav-menu {
    background: rgba(18,20,26,0.98);
    border-color: rgba(255,255,255,0.14);
    color: #FFFFFF;
  }
  .nav--light .nav-menu,
  .nav:not(.nav--dark):not(.nav--light) .nav-menu {
    background: rgba(255,255,255,0.98);
    border-color: rgba(0,0,0,0.08);
    color: var(--ink);
  }
  .nav-open .nav-menu { opacity: 1; visibility: visible; transform: translateY(0); }

  .nav-links { flex-direction: column; align-items: flex-start; gap: 16px; }
  .nav-links a { font-size: 17px; color: inherit; }   /* follows the panel theme */
  /* Full opacity in the panel so links never read faint. */
  .nav-links a:not(.active) { opacity: 1; }

  .nav-cta {
    flex-direction: column; align-items: stretch; gap: 10px;
    padding-top: 16px; border-top: 1px solid rgba(0,0,0,0.08);
  }
  .nav--dark .nav-cta { border-top-color: rgba(255,255,255,0.14); }

  .link-btn { text-align: center; padding: 13px 18px; color: inherit; }
  /* Secondary CTA wash, themed to the panel (wins over the global .nav--* rules). */
  .nav--dark .nav-menu .link-btn { color: #FFFFFF; background: rgba(255,255,255,0.10); }
  .nav--light .nav-menu .link-btn,
  .nav:not(.nav--dark):not(.nav--light) .nav-menu .link-btn { color: var(--ink); background: rgba(0,0,0,0.05); }
  .pill-btn { text-align: center; padding: 14px 18px; }

  /* No-backdrop-filter browsers: solidify the panel + open pill to fully opaque. */
  @supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .nav--dark .nav-menu, .nav--dark.nav-open { background: rgb(18,20,26); }
    .nav--light .nav-menu, .nav--light.nav-open,
    .nav:not(.nav--dark):not(.nav--light) .nav-menu,
    .nav:not(.nav--dark):not(.nav--light).nav-open { background: rgb(255,255,255); }
  }
  /* Respect reduced-motion: keep the fade, drop the slide (panel + hamburger). */
  @media (prefers-reduced-motion: reduce) {
    .nav-menu { transition: opacity .22s ease, visibility .22s ease; transform: none; }
    .nav-open .nav-menu { transform: none; }
    .nav-toggle-bar { transition: none; }
  }
}

/* ==========================================================================
   Trust strip — pill-separated label row (e.g. driver page ticker)
   Dots are ::after on each item so they stay attached when the row wraps
   on mobile; separate bullet spans would orphan and misalign.
   ========================================================================== */
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 0;
  list-style: none;
  margin: 0 auto;
  padding: 22px 28px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
}
.trust-strip li {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.trust-strip li:not(:last-child)::after {
  content: '';
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  margin: 0 14px;
  flex-shrink: 0;
}
@media (max-width: 480px) {
  .trust-strip { padding: 20px 20px; gap: 12px 0; }
  .trust-strip li:not(:last-child)::after { margin: 0 12px; }
}

/* ==========================================================================
   Skip link — first focusable element on every page; visible only on focus.
   ========================================================================== */
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 200;
  background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px;
  font-size: 14px; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 16px; outline: 2px solid var(--accent); outline-offset: 2px; }

/* ==========================================================================
   Footer — shared across every page. Company column carries the legal links
   (privacy / terms / contact) that Apple + GDPR require to be reachable.
   Bottom-row and column-heading opacities sit at >= 4.5:1 on ink (AA).
   ========================================================================== */
.footer { background: var(--ink); color: #fff; }
.footer-inner { max-width: 1180px; margin: 0 auto; padding: 60px 28px 44px; }
.footer-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 40px; flex-wrap: wrap; margin-bottom: 44px; }
.footer-about { max-width: 300px; }
.footer-brand { text-decoration: none; color: #fff; font-weight: 800; font-size: 24px; letter-spacing: -0.04em; display: inline-block; margin-bottom: 14px; }
.footer-brand .dot { color: var(--accent); }
.footer-about p { font-size: 14px; line-height: 1.5; color: rgba(255,255,255,0.62); margin: 0; }
.footer-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 13px; }
.footer-col .h { font-size: 12px; letter-spacing: 0.1em; color: rgba(255,255,255,0.58); font-weight: 600; }
.footer-col a { text-decoration: none; color: rgba(255,255,255,0.82); font-size: 15px; transition: color .15s ease; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12); padding-top: 24px; display: flex;
  justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: 13px; color: rgba(255,255,255,0.6);
}
.footer-bottom .tag { letter-spacing: 0.1em; }
@media (max-width: 480px) { .footer-cols { gap: 32px 40px; } }

/* ==========================================================================
   Legal pages (privacy, terms) + 404 — plain reading column under the nav.
   ========================================================================== */
.legal { max-width: 720px; margin: 0 auto; padding: 132px 24px 96px; color: var(--ink); }
.legal h1 { font-size: clamp(34px, 5vw, 46px); letter-spacing: -0.03em; line-height: 1.02; margin: 0 0 10px; }
.legal .updated { color: var(--muted); font-size: 14px; margin: 0 0 36px; }
.legal h2 { font-size: 20px; letter-spacing: -0.02em; margin: 40px 0 12px; }
.legal p, .legal li { color: var(--muted-2); line-height: 1.7; font-size: 16px; }
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 8px; }
.legal a { color: var(--accent-deeper); text-underline-offset: 3px; }
.legal a:hover { color: var(--accent-darkest); }
.legal .lede { font-size: 18px; color: var(--ink); }
.legal .legal-note {
  background: var(--surface); border: 1px solid rgba(0,0,0,0.06); border-radius: 14px;
  padding: 16px 18px; font-size: 15px; color: var(--muted-2); margin: 0 0 8px;
}
.legal .back { display: inline-block; margin-top: 48px; font-weight: 600; text-decoration: none; }
@media (min-width: 769px) { .legal { padding-top: 150px; } }

/* ==========================================================================
   Glass utilities (available for upcoming sections — not yet wired into pages)
   ========================================================================== */
.glass-nav-dark {
  background: rgba(14,15,18,0.55);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.glass-nav-light {
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.glass-card {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 24px;
}
.glass-pill {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
}

/* ==========================================================================
   Hero media utilities (for future video-backed heroes)
   ========================================================================== */
.hero-video-wrap { position: relative; overflow: hidden; }
.hero-video-wrap > video,
.hero-video-wrap > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero-scrim {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(0deg, rgba(11,12,18,0.88) 0%, transparent 52%);
  pointer-events: none;
}
