/* ==========================================================================
   shopmate — landing page
   Color: OKLCH ramps (Radix-style 1–12 roles). Neutral is a warm cream,
   hue 80; accent is a leafy green, hue 152. Contrast pairs measured with culori.
   ========================================================================== */

:root {
  color-scheme: light;

  /* Primitives: neutral (warm), hue 80 */
  --neutral-1: oklch(0.985 0.011 80);  /* #fef9f2 */
  --neutral-2: oklch(0.962 0.012 80);  /* #f7f2ea */
  --neutral-3: oklch(0.925 0.012 80);  /* #eae5dd */
  --neutral-4: oklch(0.885 0.012 80);  /* #ddd8d0 */
  --neutral-5: oklch(0.835 0.012 80);  /* #cdc8c0 */
  --neutral-7: oklch(0.69 0.011 80);   /* #9f9b94 */
  --neutral-9: oklch(0.52 0.008 80);   /* #6b6864 */
  --neutral-10: oklch(0.46 0.007 80);  /* #5a5854 */
  --neutral-12: oklch(0.25 0.005 80);  /* #23211f */

  /* Primitives: green, hue 152 */
  --green-2: oklch(0.962 0.037 152);   /* #e1fae6 */
  --green-3: oklch(0.925 0.065 152);   /* #c7f3d1 */
  --green-4: oklch(0.885 0.088 152);   /* #adebbd */
  --green-5: oklch(0.835 0.112 152);   /* #8fdea5 */
  --green-7: oklch(0.69 0.156 152);    /* #3bb669 */
  --green-9: oklch(0.52 0.137 152);    /* #007e3f */
  --green-10: oklch(0.46 0.121 152);   /* #006a34 */
  --green-11: oklch(0.39 0.103 152);   /* #005427 */
  --green-12: oklch(0.25 0.066 152);   /* #002a11 */

  /* Primitives: orange, the driver's color */
  --orange-4: oklch(0.9 0.06 60);
  --orange-10: oklch(0.48 0.1 50);
  --orange-11: oklch(0.4 0.09 50);

  /* Semantic tokens — the only tier components use */
  --color-bg-page: var(--neutral-1);
  --color-bg-subtle: var(--neutral-2);
  --color-bg-surface: #fff;
  --color-bg-muted: var(--neutral-3);
  --color-bg-chat: var(--neutral-3);
  --color-border-subtle: var(--neutral-4);
  --color-border: var(--neutral-5);
  --color-icon-muted: var(--neutral-7);

  --color-text-primary: var(--neutral-12);   /* 15.3:1 on page */
  --color-text-secondary: var(--neutral-10); /* 6.8:1 on page, 5.7:1 on chat */
  --color-text-tertiary: var(--neutral-9);   /* 5.3:1 on page / white only */

  --color-accent-subtle: var(--green-2);
  --color-accent-muted: var(--green-3);
  --color-accent-border: var(--green-5);
  --color-accent-solid: var(--green-9);       /* white text 5.2:1 */
  --color-accent-solid-hover: var(--green-10);
  --color-accent-text: var(--green-11);       /* 8.8:1 on page */
  --color-accent-vivid: var(--green-7);       /* decorative only */
  --color-accent-text-strong: var(--green-12);
  --color-text-on-accent: #fff;               /* 5.2:1 on accent-solid */

  --color-driver-subtle: var(--orange-4);
  --color-driver-text: var(--orange-11);      /* 7:1 on driver-subtle */
  --color-driver-label: var(--orange-10);     /* 6.8:1 on white */

  --color-device: var(--neutral-12);
  --color-map-street: var(--neutral-1);
  --color-map-marker: var(--neutral-9);

  --color-bubble-in: #fff;
  --color-bubble-out: var(--green-3);

  --color-bg-inverse: var(--green-12);
  --color-text-inverse: var(--neutral-1);     /* 15:1 */
  --color-text-inverse-secondary: var(--green-4); /* 11.5:1 */
  --color-accent-on-inverse: var(--green-5);

  --color-focus: var(--green-9);

  /* Type */
  --font-display: "Fraunces", ui-serif, Georgia, "Times New Roman", serif;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Motion */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);

  /* Surfaces */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --shadow-sm:
    0 0 0 1px oklch(0.25 0.01 80 / 0.06),
    0 1px 2px oklch(0.25 0.01 80 / 0.06);
  --shadow-md:
    0 0 0 1px oklch(0.25 0.01 80 / 0.05),
    0 1px 2px oklch(0.25 0.01 80 / 0.05),
    0 6px 16px -4px oklch(0.25 0.01 80 / 0.08);
  --shadow-lg:
    0 0 0 1px oklch(0.25 0.01 80 / 0.05),
    0 2px 4px oklch(0.25 0.01 80 / 0.04),
    0 12px 24px -6px oklch(0.25 0.01 80 / 0.1),
    0 32px 64px -16px oklch(0.25 0.03 152 / 0.16);

  --container: 1180px;
  --gutter: clamp(20px, 5vw, 40px);
  --section-y: clamp(56px, 7vw, 96px);
}

/* ---------- Base ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  interpolate-size: allow-keywords;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--color-bg-page);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  font-feature-settings: "cv11" 1, "ss01" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img, svg { display: block; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
a { color: inherit; }

::selection { background: var(--color-accent-muted); color: var(--color-accent-text-strong); }

:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: 6px;
}

a, button, summary { -webkit-tap-highlight-color: transparent; }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.tnum { font-variant-numeric: tabular-nums; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--color-text-primary);
  color: var(--color-bg-page);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus-visible { top: 16px; }

/* ---------- Type ---------- */

.display,
.h2 {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 60;
  font-weight: 500;
  text-wrap: balance;
  color: var(--color-text-primary);
}

.display {
  font-size: clamp(2.75rem, 1.55rem + 4.6vw, 5.25rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
}

.display em,
.h2 em {
  font-style: italic;
  font-weight: 500;
  color: var(--color-accent-text);
}

.h2 {
  font-size: clamp(2rem, 1.35rem + 2.5vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.h3 {
  font-size: 1.25rem;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.h3--display {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 60;
  font-weight: 500;
  font-size: clamp(1.625rem, 1.3rem + 1vw, 2.125rem);
  line-height: 1.15;
  letter-spacing: -0.018em;
}

.lead {
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  line-height: 1.55;
  color: var(--color-text-secondary);
  text-wrap: pretty;
  max-width: 34em;
}

.eyebrow {
  font-size: 0.8125rem;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent-text);
}

p { text-wrap: pretty; }

/* ---------- Buttons ---------- */

.btn {
  --btn-h: 44px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--btn-h);
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.9375rem;
  line-height: 1;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition:
    transform 150ms var(--ease-out),
    background-color 150ms ease,
    box-shadow 150ms ease,
    color 150ms ease;
}

.btn:not(:disabled):active { transform: scale(0.96); }

.btn__icon { width: 20px; height: 20px; flex: none; }
.btn__icon--end { margin-right: -4px; }
.btn:has(.btn__icon:first-child) { padding-left: 18px; }

.btn--sm { --btn-h: 40px; padding: 0 16px; font-size: 0.875rem; }
.btn--sm:has(.btn__icon:first-child) { padding-left: 14px; }
.btn--sm .btn__icon { width: 18px; height: 18px; }
.btn--lg { --btn-h: 56px; padding: 0 28px; font-size: 1.0625rem; }
.btn--lg:has(.btn__icon:first-child) { padding-left: 24px; }

.btn--primary {
  background: var(--color-accent-solid);
  color: var(--color-text-on-accent);
  box-shadow:
    inset 0 1px 0 oklch(1 0 0 / 0.16),
    0 1px 2px oklch(0.25 0.06 152 / 0.2),
    0 4px 12px -2px oklch(0.39 0.1 152 / 0.28);
}

.btn--ghost {
  background: var(--color-bg-surface);
  color: var(--color-text-primary);
  box-shadow: var(--shadow-sm);
}

.btn--light {
  background: var(--color-text-inverse);
  color: var(--color-accent-text-strong);
}

.btn--quiet {
  background: var(--color-bg-muted);
  color: var(--color-text-primary);
}

@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { background: var(--color-accent-solid-hover); }
  .btn--ghost:hover { box-shadow: var(--shadow-md); }
  .btn--light:hover { background: var(--color-bg-surface); }
  .btn--quiet:hover { background: var(--color-border-subtle); }
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-block: 14px;
  transition: background-color 200ms ease, box-shadow 200ms ease;
}

.nav[data-scrolled] {
  background: color-mix(in oklch, var(--color-bg-page) 82%, transparent);
  box-shadow: 0 1px 0 oklch(0.25 0.01 80 / 0.07);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--color-text-primary);
}
.brand__mark { width: 32px; height: 32px; color: var(--color-accent-solid); }
.brand__name {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 100;
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}

.nav__links {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.nav__links a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 150ms ease, background-color 150ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .nav__links a:hover { color: var(--color-text-primary); background: oklch(0.25 0.01 80 / 0.05); }
}

@media (max-width: 1023px) {
  .nav__cta-extra {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

@media (max-width: 880px) {
  .nav__links { display: none; }
  .nav__inner > .btn { margin-left: auto; }
}

@media (max-width: 374px) {
  .nav__inner { gap: 12px; }
  .nav .brand__name { font-size: 1.125rem; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding-top: clamp(32px, 6vw, 72px);
  padding-bottom: clamp(24px, 3vw, 40px);
  isolation: isolate;
}

.hero__glow {
  position: absolute;
  inset: -120px 0 0;
  z-index: -1;
  background:
    radial-gradient(52% 58% at 78% 30%, oklch(0.925 0.065 152 / 0.55), transparent 70%),
    radial-gradient(40% 40% at 10% 0%, oklch(0.95 0.04 80 / 0.9), transparent 70%);
  pointer-events: none;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}

.hero__copy { display: grid; gap: 24px; justify-items: start; }
.hero__copy .lead { margin-top: -4px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  border-radius: 999px;
  background: var(--color-bg-surface);
  box-shadow: var(--shadow-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-primary);
}
.pill__icon {
  width: 22px;
  height: 22px;
  padding: 3px;
  border-radius: 999px;
  background: var(--color-accent-subtle);
  color: var(--color-accent-solid);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}
.hero__facts li { display: inline-flex; align-items: center; gap: 6px; }
.hero__facts svg { width: 16px; height: 16px; color: var(--color-accent-solid); }

.hero__stage {
  position: relative;
  display: grid;
  place-items: center;
  padding-block: 24px;
}

/* Floating produce chips — decorative */
.float {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 8px;
  border-radius: 999px;
  background: var(--color-bg-surface);
  box-shadow: var(--shadow-md);
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
}
.float__emoji {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--color-bg-subtle);
  font-size: 1rem;
}
.float--a { top: 24%; left: -2%; }
.float--b { top: 42%; right: -2%; }
.float--c { bottom: 24%; left: 4%; }

@media (prefers-reduced-motion: no-preference) {
  .float { animation: bob 6s ease-in-out 2; }
  .float--b { animation-delay: -2s; animation-duration: 7s; }
  .float--c { animation-delay: -4s; animation-duration: 6.5s; }
}

@keyframes bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -8px; }
}

/* ---------- Phone ---------- */

.phone {
  position: relative;
  z-index: 1;
  width: min(100%, 340px);
  padding: 10px;
  border-radius: 50px;
  background: var(--color-device);
  box-shadow:
    inset 0 0 0 1.5px oklch(0.45 0.01 80),
    var(--shadow-lg);
  rotate: 2deg;
}

.phone__screen {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 640px;
  border-radius: 40px;
  overflow: hidden;
  background: var(--color-bg-chat);
}

.phone__status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 26px 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  background: var(--color-bg-surface);
}
.phone__notch {
  width: 92px;
  height: 26px;
  border-radius: 999px;
  background: var(--color-device);
  margin-top: -2px;
}
.phone__sys { display: flex; gap: 3px; align-items: flex-end; }
.phone__sys i { display: block; width: 4px; border-radius: 1px; background: currentColor; }
.phone__sys i:nth-child(1) { height: 5px; }
.phone__sys i:nth-child(2) { height: 8px; }
.phone__sys i:nth-child(3) { height: 11px; }

.chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 12px 10px;
  background: var(--color-bg-surface);
  box-shadow: 0 1px 0 var(--color-border-subtle);
  position: relative;
  z-index: 2;
}
.chat-head__back { width: 22px; height: 22px; color: var(--color-accent-solid); }
.chat-head__who { display: grid; line-height: 1.25; flex: 1; }
.chat-head__who strong { font-size: 0.9375rem; font-weight: 600; }
.chat-head__who small { font-size: 0.75rem; color: var(--color-text-tertiary); }
.chat-head__icon { width: 22px; height: 22px; color: var(--color-accent-solid); }

.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 600;
}
.avatar--brand { background: var(--color-accent-subtle); color: var(--color-accent-solid); }
.avatar--brand svg { width: 22px; height: 22px; }
.avatar--driver { background: var(--color-driver-subtle); color: var(--color-driver-text); }
.avatar--lg { width: 88px; height: 88px; }
.avatar--lg svg { width: 52px; height: 52px; }
.avatar--xs { width: 20px; height: 20px; font-size: 0.75rem; }

/* Chat wallpaper + list */
.chat {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 12px 12px 8px;
  background-color: var(--color-bg-chat);
  background-image: radial-gradient(oklch(0.25 0.01 80 / 0.06) 1px, transparent 1.2px);
  background-size: 14px 14px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.chat__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chat__list > li { display: flex; flex-direction: column; }

.chat-input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 18px;
  background: var(--color-bg-chat);
}
.chat-input__field {
  flex: 1;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--color-bg-surface);
  font-size: 0.875rem;
  color: var(--color-text-tertiary);
}
.chat-input__mic {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--color-accent-solid);
  color: var(--color-text-on-accent);
}
.chat-input__mic svg { width: 20px; height: 20px; }

/* Bubbles */
.bubble {
  position: relative;
  max-width: 84%;
  padding: 7px 10px 6px;
  border-radius: 14px;
  font-size: 0.875rem;
  line-height: 1.42;
  box-shadow: 0 1px 1px oklch(0.25 0.01 80 / 0.08);
  overflow-wrap: break-word;
  text-wrap: pretty;
}
.bubble--in {
  align-self: flex-start;
  background: var(--color-bubble-in);
  border-top-left-radius: 4px;
  transform-origin: 0% 100%;
}
.bubble--out {
  align-self: flex-end;
  background: var(--color-bubble-out);
  border-top-right-radius: 4px;
  transform-origin: 100% 100%;
}
.bubble strong { font-weight: 600; }

.meta {
  float: right;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin: 6px 0 -2px 10px;
  font-size: 0.75rem;
  line-height: 1;
  color: var(--color-text-secondary);
  font-variant-numeric: tabular-nums;
}
.meta svg { width: 16px; height: 11px; color: var(--color-accent-solid); }

.bubble__label {
  display: block;
  margin-bottom: 2px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-accent-text);
}
.bubble__from {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-driver-label);
}
.bubble__list { margin: 2px 0 4px; }
.bubble__list li { position: relative; padding-left: 14px; }
.bubble__list li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.6em;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--color-accent-solid);
}

/* Order card inside a bubble */
.bubble--card { padding: 4px; width: 84%; }
.bubble--card .meta { margin-right: 6px; margin-bottom: 4px; }
.mini-driver {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  background: var(--color-bg-subtle);
}
.mini-driver span:last-child { display: grid; line-height: 1.3; }
.mini-driver strong { font-size: 0.8125rem; }
.mini-driver small { font-size: 0.75rem; color: var(--color-text-secondary); }
.bubble--card p { padding: 8px 6px 2px; }

/* Typing indicator */
.typing {
  display: inline-flex;
  gap: 4px;
  padding: 12px 14px;
}
.typing i {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--color-icon-muted);
}
@media (prefers-reduced-motion: no-preference) {
  .typing i { animation: typing 1s ease-in-out infinite; }
  .typing i:nth-child(2) { animation-delay: 0.15s; }
  .typing i:nth-child(3) { animation-delay: 0.3s; }
}
@keyframes typing {
  0%, 60%, 100% { translate: 0 0; opacity: 0.5; }
  30% { translate: 0 -3px; opacity: 1; }
}

/* Voice note */
.voice {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 190px;
  padding: 2px 0;
}
.voice__play {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 999px;
  background: var(--color-accent-solid);
  color: var(--color-text-on-accent);
}
.voice__play svg { width: 14px; height: 14px; margin-left: 2px; }
.voice__wave {
  position: relative;
  flex: 1;
  height: 26px;
}
.voice__bars {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: 2px;
}
.voice__bars i {
  flex: 1;
  min-width: 1px;
  border-radius: 2px;
  background: color-mix(in oklch, var(--color-accent-text) 35%, transparent);
}
.voice__bars--played i { background: var(--color-accent-text); }
.voice__bars--played {
  clip-path: inset(0 100% 0 0);
}
.voice[data-playing] .voice__bars--played {
  clip-path: inset(0 0 0 0);
  transition: clip-path var(--voice-duration, 2.6s) linear;
}
.voice__time {
  flex: none;
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  font-variant-numeric: tabular-nums;
}

/* Bubble entrance (hero chat) */
.chat__list > li.is-new > * {
  animation: bubble-in 420ms var(--ease-out) both;
}
@keyframes bubble-in {
  from { opacity: 0; transform: translateY(6px) scale(0.94); }
}

/* Driver chip */
.driver-chip {
  position: absolute;
  z-index: 3;
  right: -4%;
  bottom: 10%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 12px 12px;
  border-radius: 20px;
  background: var(--color-bg-surface);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  filter: blur(4px);
  transform-origin: 80% 100%;
  transition:
    opacity 300ms var(--ease-out),
    transform 500ms var(--ease-out),
    filter 300ms var(--ease-out);
  pointer-events: none;
}
.driver-chip[data-show] { opacity: 1; transform: none; filter: none; }
.driver-chip__text { display: grid; line-height: 1.3; }
.driver-chip__text strong { font-size: 0.875rem; font-weight: 600; }
.driver-chip__text small { font-size: 0.8125rem; color: var(--color-text-secondary); font-variant-numeric: tabular-nums; }
.driver-chip__dot {
  position: relative;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--color-accent-vivid);
}
@media (prefers-reduced-motion: no-preference) {
  .driver-chip__dot::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: inherit;
    animation: ping 1.8s var(--ease-out) 3;
  }
}
@keyframes ping {
  from { transform: scale(1); opacity: 0.6; }
  to { transform: scale(3); opacity: 0; }
}

.hero__stage .replay--hero {
  position: relative;
  inset: auto;
  z-index: 3;
  margin-top: 20px;
}
.hero__stage .replay--hero[hidden] { display: none; }
/* Keep the driver chip on the phone, above the control */
.hero__stage:has(.replay--hero:not([hidden])) .driver-chip { bottom: calc(10% + 52px); }

@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__copy { justify-items: center; text-align: center; }
  .hero__actions, .hero__facts { justify-content: center; }
  .hero__copy .lead { margin-inline: auto; }
  .hero__stage { margin-top: 8px; }
}

@media (max-width: 560px) {
  .hero__actions { width: 100%; flex-direction: column; }
  .hero__actions .btn { width: 100%; }
  .phone { rotate: 0deg; width: min(100%, 320px); }
  .phone__screen { height: 580px; }
  .float { display: none; }
  .driver-chip { right: 0; bottom: 4%; }
  .hero__stage:has(.replay--hero:not([hidden])) .driver-chip { bottom: calc(4% + 52px); }
}

/* ---------- Sections ---------- */

.section { padding-block: var(--section-y); }
.section--subtle { background: var(--color-bg-subtle); }

.section__head {
  display: grid;
  gap: 16px;
  max-width: 760px;
  margin: 0 auto clamp(32px, 4.5vw, 56px);
  text-align: center;
  justify-items: center;
}
.section__head--start { text-align: start; justify-items: start; margin-inline: 0; }

/* ---------- Steps ---------- */

.steps {
  display: grid;
  gap: clamp(40px, 5.5vw, 72px);
  counter-reset: step;
}

.step {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}
.step:nth-child(even) .step__copy { order: 2; }

.step__copy { display: grid; gap: 14px; max-width: 30rem; }
.step__copy p { color: var(--color-text-secondary); font-size: 1.0625rem; line-height: 1.6; }

.step__num {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--color-accent-subtle);
  color: var(--color-accent-text);
  font-weight: 600;
  font-size: 0.9375rem;
  box-shadow: inset 0 0 0 1px var(--color-accent-muted);
}

.step__visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 420px;
  padding: clamp(20px, 4vw, 40px);
  border-radius: var(--radius-xl);
  background: var(--color-bg-subtle);
  box-shadow: inset 0 0 0 1px oklch(0.25 0.01 80 / 0.05);
  overflow: hidden;
}

@media (max-width: 860px) {
  .step { grid-template-columns: 1fr; }
  .step:nth-child(even) .step__copy { order: 0; }
  .step__visual { min-height: 360px; }
}

/* Step 1: modes */
.modes { display: grid; gap: 20px; width: 100%; max-width: 400px; }

.tabs { position: relative; justify-self: center; }
.tabs__list {
  display: flex;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: var(--color-bg-surface);
  box-shadow: var(--shadow-sm);
}
.tabs__list--active {
  position: absolute;
  inset: 0;
  box-shadow: none;
  pointer-events: none;
  background: var(--color-accent-solid);
  clip-path: inset(4px var(--clip-r, 66%) 4px var(--clip-l, 4px) round 999px);
}
.tabs[data-ready] .tabs__list--active { transition: clip-path 280ms var(--ease-out); }
.tabs__list--active .tabs__tab { color: var(--color-text-on-accent); }

.tabs__tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  white-space: nowrap;
  cursor: pointer;
  transition: transform 150ms var(--ease-out);
}
button.tabs__tab:active { transform: scale(0.96); }
.tabs__tab svg { width: 17px; height: 17px; }
.tabs__list--active .tabs__tab { transition: none; }

@media (max-width: 400px) {
  .voice { min-width: 160px; }
  .tabs__tab { padding: 0 14px; }
  .tabs__tab svg { display: none; }
}

.modes__stage {
  position: relative;
  display: grid;
  min-height: 270px;
  padding: 16px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  justify-content: stretch;
  align-content: end;
}

.modes__panel {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
}
.modes__panel[hidden] { display: none; }

.modes__panel[data-entering] > * {
  animation: panel-in 150ms ease-out both;
}

@keyframes panel-in {
  from { opacity: 0; }
}

/* Step 2: map */
.map {
  position: relative;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 480 / 340;
  container: map / inline-size;
  border-radius: var(--radius-lg);
  background: var(--color-bg-muted);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.map__svg { width: 100%; height: 100%; }
.map__park { fill: var(--color-accent-muted); opacity: 0.7; }
.map__streets path {
  fill: none;
  stroke: var(--color-map-street);
  stroke-width: 14;
  stroke-linecap: round;
}
.map__streets .map__street--minor { stroke-width: 7; }

.map__ring {
  fill: color-mix(in oklch, var(--color-accent-vivid) 15%, transparent);
  stroke: var(--color-accent-vivid);
  stroke-width: 1.5;
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
}

.map__route {
  fill: none;
  stroke: var(--color-accent-solid);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.map__driver circle {
  fill: var(--color-map-marker);
  stroke: var(--color-bg-surface);
  stroke-width: 3;
  transform-box: fill-box;
  transform-origin: center;
  transition: fill 300ms ease, opacity 400ms ease, transform 400ms var(--ease-out);
}

.map__store,
.map__home,
.map__tag {
  position: absolute;
  left: var(--x);
  top: var(--y);
  translate: -50% -50%;
}
.map__store,
.map__home {
  display: grid;
  place-items: center;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}
.map__store { width: 38px; height: 38px; background: var(--color-bg-surface); color: var(--color-text-primary); }
.map__home { width: 44px; height: 44px; border-radius: 999px; background: var(--color-accent-solid); color: var(--color-text-on-accent); }
.map__store svg { width: 20px; height: 20px; }
.map__home svg { width: 22px; height: 22px; }

.map__tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 5px;
  border-radius: 999px;
  background: var(--color-bg-surface);
  box-shadow: var(--shadow-md);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 300ms var(--ease-out), transform 400ms var(--ease-out);
}
.map__tag--driver { translate: -50% -175%; transform: translateY(6px) scale(0.94); transform-origin: 50% 100%; }
.map__tag--eta { translate: -50% 85%; padding-left: 8px; transform: translateY(-6px) scale(0.94); transform-origin: 50% 0%; color: var(--color-accent-text); }
.map__tag--eta svg { width: 14px; height: 14px; }

/* On a narrow map the centered tag would run past the left edge */
@container map (max-width: 420px) {
  .map__tag--driver { translate: -12px -175%; transform-origin: 12px 100%; }
}

/* Played state — also the static end state */
.map[data-played] .map__driver--far circle { opacity: 0.3; }
.map[data-played] .map__driver--near circle { fill: var(--color-accent-solid); transform: scale(1.3); }
.map[data-played] .map__route { stroke-dashoffset: 0; }
.map[data-played] .map__tag { opacity: 1; transform: none; }

@media (prefers-reduced-motion: no-preference) {
  .map[data-played] .map__ring { animation: radar 1.6s var(--ease-out) 2 both; }
  .map[data-played] .map__ring--2 { animation-delay: 0.4s; }
  .map[data-played] .map__driver--far circle { transition-delay: 0.7s; }
  .map[data-played] .map__driver--near circle { transition-delay: 0.9s; }
  .map[data-played] .map__route { transition: stroke-dashoffset 1.5s var(--ease-in-out) 1.1s; }
  .map[data-played] .map__tag--driver { transition-delay: 1s; }
  .map[data-played] .map__tag--eta { transition-delay: 2.5s; }
}
@keyframes radar {
  0% { transform: scale(0.6); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: scale(4.2); opacity: 0; }
}

.replay {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px 0 9px;
  border: 0;
  border-radius: 999px;
  background: oklch(1 0 0 / 0.9);
  box-shadow: var(--shadow-sm);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: transform 150ms var(--ease-out), color 150ms ease;
}
.replay svg { width: 15px; height: 15px; }
.replay:active { transform: scale(0.96); }
@media (hover: hover) and (pointer: fine) {
  .replay:hover { color: var(--color-text-primary); }
}

/* Step 3: shopping checklist */
.shop { display: grid; gap: 8px; width: 100%; max-width: 380px; }
.shop__card {
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--color-bg-surface);
  box-shadow: var(--shadow-md);
}
.shop__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--color-border-subtle);
}
.shop__head > span:nth-child(2) { display: grid; flex: 1; line-height: 1.3; }
.shop__head strong { font-size: 0.9375rem; }
.shop__head small { font-size: 0.8125rem; color: var(--color-text-secondary); }
.shop__badge {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--color-accent-subtle);
  color: var(--color-accent-solid);
}
.shop__badge svg { width: 22px; height: 22px; }
.shop__count {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--color-bg-subtle);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  transition: background-color 200ms ease, color 200ms ease;
}
.shop[data-complete] .shop__count { background: var(--color-accent-subtle); color: var(--color-accent-text); }

.checklist li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 2px;
  font-size: 0.9375rem;
}
.checklist__box {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 7px;
  box-shadow: inset 0 0 0 1.5px var(--color-border);
  color: var(--color-text-on-accent);
  transition: background-color 200ms ease, box-shadow 200ms ease;
}
.checklist__box svg {
  width: 15px;
  height: 15px;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 200ms var(--ease-out), transform 300ms var(--ease-out);
}
.checklist__label {
  color: var(--color-text-primary);
  transition: color 200ms ease;
}
.checklist__label s {
  margin-left: 4px;
  color: var(--color-text-tertiary);
  font-size: 0.8125rem;
}
.checklist li[data-done] .checklist__box { background: var(--color-accent-solid); box-shadow: inset 0 0 0 1.5px var(--color-accent-solid); }
.checklist li[data-done] .checklist__box svg { opacity: 1; transform: none; }
.checklist li[data-done] .checklist__label { color: var(--color-text-secondary); }

.shop__msg {
  max-width: 88%;
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  transition: opacity 300ms var(--ease-out), transform 420ms var(--ease-out);
}
.shop__msg[data-show] { opacity: 1; transform: none; }

/* Step 4: delivered */
.done {
  display: grid;
  justify-items: center;
  gap: 4px;
  width: 100%;
  max-width: 360px;
  text-align: center;
}
.done__badge {
  display: grid;
  place-items: center;
  width: 120px;
  height: 120px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: var(--color-bg-surface);
  box-shadow: var(--shadow-lg);
}
.done__check { width: 72px; height: 72px; }
.done__circle {
  fill: var(--color-accent-subtle);
  stroke: var(--color-accent-solid);
  stroke-width: 3;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transform: rotate(-90deg);
  transform-origin: center;
}
.done__tick {
  fill: none;
  stroke: var(--color-accent-solid);
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.done__title {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 60;
  font-size: 1.75rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.done__sub { font-size: 0.875rem; color: var(--color-text-secondary); font-variant-numeric: tabular-nums; }
.done__msg {
  margin-top: 20px;
  text-align: start;
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  transition: opacity 300ms var(--ease-out), transform 420ms var(--ease-out);
}
.done[data-played] .done__circle,
.done[data-played] .done__tick { stroke-dashoffset: 0; }
.done[data-played] .done__msg { opacity: 1; transform: none; }

@media (prefers-reduced-motion: no-preference) {
  .done[data-played] .done__circle { transition: stroke-dashoffset 700ms var(--ease-in-out); }
  .done[data-played] .done__tick { transition: stroke-dashoffset 420ms var(--ease-out) 550ms; }
  .done[data-played] .done__msg { transition-delay: 900ms; }
  .done[data-played] .done__badge { animation: pop 600ms var(--ease-out) 500ms both; }
}
@keyframes pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

/* ---------- Bento ---------- */

.bento {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.tile {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: clamp(24px, 3vw, 32px);
  border-radius: var(--radius-xl);
  background: var(--color-bg-surface);
  box-shadow: var(--shadow-sm);
}
.tile p { color: var(--color-text-secondary); font-size: 0.9375rem; line-height: 1.6; }
.tile .h3 { margin-top: 8px; }

.tile__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--color-accent-subtle);
  color: var(--color-accent-solid);
}
.tile__icon svg { width: 22px; height: 22px; }

.tile--wide {
  grid-column: span 3;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 32px;
}
.tile__copy { display: grid; gap: 12px; max-width: 30rem; }

.tile--feature { grid-column: span 2; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }

.homescreen {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 52px));
  gap: 14px;
  justify-content: center;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg in oklab, var(--color-bg-subtle), var(--color-bg-muted));
}
.homescreen__app {
  aspect-ratio: 1;
  border-radius: 14px;
  background: oklch(0.25 0.01 80 / 0.07);
}
.homescreen__app--wa {
  display: grid;
  place-items: center;
  background: var(--color-accent-solid);
  color: var(--color-text-on-accent);
  box-shadow: 0 6px 16px -4px oklch(0.39 0.1 152 / 0.45);
}
.homescreen__app--wa svg { width: 28px; height: 28px; }
.homescreen__app--ghost {
  display: grid;
  place-items: center;
  background: transparent;
  box-shadow: inset 0 0 0 1.5px oklch(0.25 0.01 80 / 0.12);
  color: var(--color-icon-muted);
}
.homescreen__app--ghost svg { width: 20px; height: 20px; }
@media (prefers-reduced-motion: no-preference) {
  .tile--feature[data-revealed] .homescreen__app--wa { animation: pop 700ms var(--ease-out) 400ms both; }
}

.tile--love { grid-column: span 3; }
.moments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
}
.moments li {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--color-bg-subtle);
  box-shadow: inset 0 0 0 1px oklch(0.25 0.01 80 / 0.05);
  font-size: 0.9375rem;
  font-weight: 500;
  white-space: nowrap;
}

@media (max-width: 960px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile--feature, .tile--love { grid-column: span 2; }
  .bento > .tile:nth-child(4) { grid-column: span 2; }
}
@media (max-width: 680px) {
  .bento { grid-template-columns: minmax(0, 1fr); }
  .bento > .tile { grid-column: auto !important; }
  .tile--wide, .tile--feature { grid-template-columns: minmax(0, 1fr); }
  .homescreen { grid-template-columns: repeat(4, minmax(0, 48px)); gap: 12px; padding: 20px; }
}

/* ---------- Drivers ---------- */

.drivers {
  background: var(--color-bg-inverse);
  color: var(--color-text-inverse);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.drivers::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(45% 60% at 85% 40%, color-mix(in oklch, var(--color-accent-solid-hover) 55%, transparent), transparent 70%),
    radial-gradient(30% 40% at 0% 100%, color-mix(in oklch, var(--color-accent-text) 50%, transparent), transparent 70%);
}
.drivers .h2 { color: var(--color-text-inverse); }
.drivers .lead { color: var(--color-text-inverse-secondary); }
.eyebrow--inverse { color: var(--color-accent-on-inverse); }

.drivers__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(48px, 7vw, 96px);
  align-items: center;
}
.drivers__copy {
  /* green-9 reaches only 1.9–3:1 on this background; green-5 reaches 9.8:1 */
  --color-focus: var(--color-accent-on-inverse);
  display: grid;
  gap: 20px;
  justify-items: start;
}
.drivers__list { display: grid; gap: 14px; margin: 8px 0 12px; }
.drivers__list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  color: var(--color-text-inverse-secondary);
  line-height: 1.5;
}
.drivers__list strong { color: var(--color-text-inverse); font-weight: 600; }
.drivers__list svg {
  width: 36px;
  height: 36px;
  padding: 8px;
  flex: none;
  margin-top: -6px;
  border-radius: 12px;
  background: oklch(1 0 0 / 0.08);
  color: var(--color-accent-on-inverse);
}

.drivers__visual { display: grid; justify-items: center; gap: 16px; }

.order-card {
  width: 100%;
  max-width: 400px;
  padding: 22px;
  border-radius: var(--radius-xl);
  background: var(--color-bg-surface);
  color: var(--color-text-primary);
  box-shadow:
    0 0 0 1px oklch(1 0 0 / 0.1),
    0 24px 48px -12px oklch(0.15 0.05 152 / 0.6);
  rotate: -1.5deg;
  transition: rotate 500ms var(--ease-out);
}
.order-card[data-accepted] { rotate: 0deg; }
.order-card__top { display: flex; align-items: center; justify-content: space-between; }
.order-card__live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-accent-text);
}
.order-card__live span {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--color-accent-vivid);
}
@media (prefers-reduced-motion: no-preference) {
  .order-card:not([data-accepted]) .order-card__live span::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: inherit;
    animation: ping 1.8s var(--ease-out) 3;
  }
}
.order-card__dist {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--color-bg-subtle);
  font-size: 0.8125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.order-card__addr {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 14px;
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 60;
  font-size: 1.375rem;
  font-weight: 500;
  letter-spacing: -0.012em;
  line-height: 1.25;
}
.order-card__addr svg { width: 22px; height: 22px; flex: none; color: var(--color-accent-solid); }
.order-card__items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-bottom: 20px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--color-border-subtle);
}
.order-card__items li {
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--color-bg-subtle);
  font-size: 0.8125rem;
  font-weight: 500;
}
.order-card__actions { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; }
.order-card__actions .btn { --btn-h: 48px; }

.order-card__hint {
  font-size: 0.875rem;
  color: var(--color-text-inverse-secondary);
}

/* Swap: label crossfade with blur, both in the DOM */
.swap { display: grid; place-items: center; }
.swap__item {
  grid-area: 1 / 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition:
    opacity 300ms cubic-bezier(0.2, 0, 0, 1),
    transform 300ms cubic-bezier(0.2, 0, 0, 1),
    filter 300ms cubic-bezier(0.2, 0, 0, 1),
    visibility 300ms;
}
.swap__item svg { width: 18px; height: 18px; }
.swap__item--done { opacity: 0; transform: scale(0.25); filter: blur(4px); visibility: hidden; }
.swap[data-state="done"] .swap__item--idle { opacity: 0; transform: scale(0.25); filter: blur(4px); visibility: hidden; }
.swap[data-state="done"] .swap__item--done { opacity: 1; transform: none; filter: none; visibility: visible; }

@media (prefers-reduced-motion: reduce) {
  .swap__item { transform: none !important; filter: none !important; }
}

@media (max-width: 880px) {
  .drivers__grid { grid-template-columns: 1fr; }
}

/* ---------- FAQ ---------- */

.faq {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.faq .section__head { margin-bottom: 0; position: sticky; top: 112px; }
.faq__aside { color: var(--color-text-secondary); }
.faq__aside a {
  color: var(--color-accent-text);
  font-weight: 600;
  text-decoration-line: underline;
  text-decoration-thickness: from-font;
  text-underline-offset: 3px;
  text-decoration-color: var(--color-accent-border);
  transition: text-decoration-color 150ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .faq__aside a:hover { text-decoration-color: currentColor; }
}

.faq__list {
  border-radius: var(--radius-xl);
  background: var(--color-bg-surface);
  box-shadow: var(--shadow-sm);
  padding: 8px 28px;
}
.faq__item + .faq__item { border-top: 1px solid var(--color-border-subtle); }
.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary svg {
  width: 22px;
  height: 22px;
  flex: none;
  padding: 3px;
  border-radius: 999px;
  background: var(--color-bg-subtle);
  color: var(--color-text-secondary);
  transition: rotate 250ms var(--ease-out), background-color 150ms ease, color 150ms ease;
}
.faq__item[open] summary svg { rotate: 45deg; background: var(--color-accent-subtle); color: var(--color-accent-solid); }
.faq__body p { padding: 0 40px 24px 0; color: var(--color-text-secondary); max-width: 38rem; }

@supports selector(::details-content) {
  .faq__item::details-content {
    block-size: 0;
    overflow-y: clip;
    opacity: 0;
    transition:
      block-size 300ms var(--ease-out),
      opacity 200ms ease,
      content-visibility 300ms allow-discrete;
  }
  .faq__item[open]::details-content { block-size: auto; opacity: 1; }
  @media (prefers-reduced-motion: reduce) {
    .faq__item::details-content { transition: opacity 200ms ease, content-visibility 200ms allow-discrete; }
  }
}

@media (max-width: 860px) {
  .faq { grid-template-columns: 1fr; }
  .faq .section__head { position: static; }
  .faq__list { padding: 4px 20px; }
  .faq__body p { padding-right: 0; }
}

/* ---------- CTA ---------- */

.cta { padding-bottom: var(--section-y); }
.cta__panel {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 20px;
  padding: clamp(56px, 9vw, 112px) 24px;
  border-radius: 40px;
  background:
    radial-gradient(60% 80% at 50% 0%, color-mix(in oklch, var(--color-accent-muted) 90%, transparent), transparent 75%),
    var(--color-accent-subtle);
  box-shadow: inset 0 0 0 1px var(--color-accent-muted);
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}
.cta__panel .lead { margin-bottom: 8px; color: var(--color-accent-text); }
.display--cta { font-size: clamp(2.5rem, 1.5rem + 4vw, 4.5rem); }

.cta__bubbles { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.cta__bubble {
  position: absolute;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 22px;
  background: var(--color-bg-surface);
  box-shadow: var(--shadow-md);
  font-size: 1.75rem;
}
.cta__bubble--1 { left: 8%; top: 18%; rotate: -10deg; }
.cta__bubble--2 { right: 9%; top: 14%; rotate: 8deg; }
.cta__bubble--3 { left: 13%; bottom: 14%; rotate: 6deg; }
.cta__bubble--4 { right: 12%; bottom: 18%; rotate: -8deg; }
@media (prefers-reduced-motion: no-preference) {
  .cta__bubble { animation: bob 7s ease-in-out 2; }
  .cta__bubble--2 { animation-delay: -1.5s; }
  .cta__bubble--3 { animation-delay: -3s; }
  .cta__bubble--4 { animation-delay: -4.5s; }
}
@media (max-width: 720px) {
  .cta__bubble { width: 48px; height: 48px; border-radius: 16px; font-size: 1.25rem; }
  .cta__bubble--1 { left: 5%; top: 6%; }
  .cta__bubble--2 { right: 5%; top: 5%; }
  .cta__bubble--3 { left: 6%; bottom: 5%; }
  .cta__bubble--4 { right: 6%; bottom: 6%; }
}

/* ---------- Footer ---------- */

.footer {
  padding-block: 40px 56px;
  border-top: 1px solid var(--color-border-subtle);
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 32px;
}
.footer .brand__mark { width: 26px; height: 26px; }
.footer .brand__name { font-size: 1.125rem; }
.footer__links { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-left: auto; }
.footer__links a,
.footer__legal {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  text-decoration: none;
}
@media (hover: hover) and (pointer: fine) {
  .footer__links a:hover { color: var(--color-text-primary); }
}
@media (max-width: 640px) {
  .footer__links { margin-left: 0; width: 100%; }
}

/* ---------- Entrance + reveal ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js [data-enter] {
    animation: enter 700ms var(--ease-out) both;
    animation-delay: calc(var(--i, 0) * 90ms + 80ms);
  }
  .js .hero__stage[data-enter] { animation-duration: 1000ms; }

  .js [data-reveal] {
    opacity: 0;
    transform: translateY(12px);
    filter: blur(4px);
    transition:
      opacity 300ms var(--ease-out),
      transform 300ms var(--ease-out),
      filter 300ms var(--ease-out);
    transition-delay: var(--reveal-delay, 0ms);
  }
  .js [data-reveal][data-revealed] { opacity: 1; transform: none; filter: none; }
}

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 0; transition: opacity 400ms ease; }
  .js [data-reveal][data-revealed] { opacity: 1; }
}

@keyframes enter {
  from { opacity: 0; transform: translateY(12px); filter: blur(4px); }
}

/* Reduced motion: state changes still land, without movement */
@media (prefers-reduced-motion: reduce) {
  .tabs[data-ready] .tabs__list--active,
  .map__tag,
  .map__driver circle,
  .done__msg,
  .order-card,
  .faq__item summary svg {
    transition-property: opacity, fill, background-color, color;
  }
}

/* Forced colors drops shadows and backgrounds: keep edges and the selected tab */
@media (forced-colors: active) {
  .pill, .float, .tile, .faq__list, .shop__card, .map, .modes__stage,
  .order-card, .driver-chip, .done__badge, .cta__bubble, .replay, .tabs__list {
    outline: 1px solid CanvasText;
  }
  .tabs__list--active { display: none; }
  .tabs__tab[aria-selected="true"] { outline: 2px solid Highlight; outline-offset: -2px; }
}

/* Replay helper: snap back to the start state without transitions */
[data-reset],
[data-reset] * { transition: none !important; animation: none !important; }

/* Legal pages (privacy.html, terms.html) */
.legal { padding-block: clamp(32px, 6vw, 72px) var(--section-y); }
.legal__inner { max-width: calc(44rem + var(--gutter) * 2); }
.legal h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.25rem, 6vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 8px 0 8px;
}
.legal__meta { color: var(--color-text-tertiary); font-size: 0.9375rem; margin-bottom: 32px; }
.legal h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.25;
  margin: 40px 0 12px;
}
.legal h3 { font-size: 1.0625rem; font-weight: 600; margin: 24px 0 8px; }
.legal p, .legal li { color: var(--color-text-secondary); line-height: 1.65; }
.legal p + p { margin-top: 12px; }
.legal ul { list-style: disc; padding-left: 1.25em; display: grid; gap: 8px; }
.legal ul + p { margin-top: 16px; }
.legal li::marker { color: var(--color-accent-solid); }
.legal strong { color: var(--color-text-primary); font-weight: 600; }
.legal a { color: var(--color-accent-text); text-underline-offset: 3px; }
