/* Thatzal website — Round 2. Tokens, type scale, spacing and components per
   reviews/round-2/ui-brief.md. Contrast ratios noted against the surface
   each token is used on; every text pairing is >= 4.5:1. */

/* ==========================================================================
   1. Tokens
   ========================================================================== */

:root {
  /* Brand */
  --brand: #29B5B5;      /* decorative only (icons, rules, dots). 2.51:1 on white — never text on light. 5.30:1 on --brand-900. */
  --brand-700: #1B7676;  /* primary actionable colour: buttons, links, focus ring. 5.39:1 white-on-it. */
  --brand-800: #176464;  /* hover/active for --brand-700. */
  --brand-100: #EAF8F8;  /* light tint: icon circles, blobs, glow. 4.94:1 with --brand-700 text. */
  --brand-50:  #F2FAFA;  /* tinted bands. --brand-700 5.09:1, --ink-muted 6.90:1. */
  --brand-900: #0E3535;  /* dark band surface. White 13.3:1. */
  --brand-950: #0A2626;  /* footer. White 15.9:1. */
  --accent:    #F2B544;  /* amber, decorative only: fare pill fill, eyebrow dot. Never text colour. */
  --mock-brand: #1F8282; /* the app's teal, darkened just enough for white 13px text (4.59:1) inside phone mocks. */

  /* Neutrals */
  --surface: #FFFFFF;
  --surface-alt: #F4FBFB;
  --ink: #14201F;        /* 16.72:1 on white */
  --ink-muted: #4C5957;  /* 7.31:1 on white, 6.90:1 on --brand-50 */
  --border: #DCE6E4;

  /* On dark */
  --on-dark: #FFFFFF;
  --on-dark-muted: #A9D3D1; /* 8.18:1 on --brand-900, 9.81:1 on --brand-950 */

  /* Type */
  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --text-h1: 38px;
  --text-h2: 30px;
  --text-h3: 20px;
  --text-lead: 18px;
  --text-body: 16px;
  --text-small: 14px;
  --text-micro: 12px;
  --measure: 27em; /* ~58 real characters in Plus Jakarta Sans at any size (ch = width of '0', ~0.62em, overshoots) */

  /* Spacing (4px base) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 80px;
  --space-10: 96px;
  --space-11: 128px;

  /* Layout rhythm */
  --section-pad: 64px;
  --gutter: 20px;
  --head-gap: 40px;
  --badge-h: 48px;

  /* Radius & elevation */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(14, 53, 53, 0.05), 0 6px 20px rgba(14, 53, 53, 0.06);
  --shadow-md: 0 8px 24px rgba(20, 32, 31, 0.12);
  --shadow-lg: 0 24px 60px rgba(14, 53, 53, 0.18);
}

@media (min-width: 768px) {
  :root {
    --section-pad: 96px;
    --gutter: 32px;
    --badge-h: 52px;
  }
}

@media (min-width: 1024px) {
  :root {
    --text-h1: 60px;
    --text-h2: 42px;
    --text-h3: 22px;
    --text-lead: 20px;
    --text-body: 17px;
    --section-pad: 120px;
    --gutter: 40px;
    --head-gap: 56px;
    --badge-h: 56px;
  }
}

/* ==========================================================================
   2. Base
   ========================================================================== */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font: 400 var(--text-body)/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-700); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--brand-700); outline-offset: 3px; border-radius: 4px; }
figure { margin: 0; }

h1, h2, h3 { margin: 0; font-family: var(--font-sans); color: var(--ink); }
h1 { font-size: var(--text-h1); font-weight: 800; line-height: 1.05; letter-spacing: -0.025em; }
h2 { font-size: var(--text-h2); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
h3 { font-size: var(--text-h3); font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; }
h1, h2, h3 { text-wrap: balance; }
/* Plus Jakarta Sans gives the comma a wide left bearing; pull it back in display sizes. */
h1 .cm, h2 .cm, h3 .cm { margin-left: -0.08em; }
/* Town eyebrow: one line from 640px, two clean lines below it. */
.sep-lg { display: none; }
@media (min-width: 640px) { .sep-lg { display: inline; } .br-sm { display: none; } }
p { margin: 0; max-width: var(--measure); text-wrap: pretty; }
.qr-block .micro { text-wrap: balance; }
.lead { font-size: var(--text-lead); line-height: 1.55; color: var(--ink-muted); }
.small { font-size: var(--text-small); line-height: 1.55; color: var(--ink-muted); }
.micro { font-size: var(--text-micro); line-height: 1.45; color: var(--ink-muted); }
.eyebrow {
  font-size: 13px;
  max-width: none;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-700);
}
.icon { width: 16px; height: 16px; flex: none; }

/* ==========================================================================
   3. Layout: container, sections, bands, section head
   ========================================================================== */

.container {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

main > section { padding-block: var(--section-pad); scroll-margin-top: 64px; }

.bg-tint { background: var(--brand-50); }
.bg-dark { background: var(--brand-900); color: var(--on-dark); }

.section-head { margin-bottom: var(--head-gap); }
.section-head .eyebrow { margin-bottom: 12px; }
.section-head h2 + .lead { margin-top: 16px; }

/* ==========================================================================
   4. Buttons and links
   ========================================================================== */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 14px 28px;
  background: var(--brand-700);
  color: #fff;
  font: 700 16px/1 var(--font-sans);
  border: none;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: background-color 0.15s ease;
}
.btn-primary:hover { background: var(--brand-800); }
.btn-primary:focus-visible { outline: 2px solid var(--brand-700); outline-offset: 3px; }
.btn-sm { min-height: 44px; padding: 0 20px; font-size: 14px; }

.text-link {
  color: var(--brand-700);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.text-link:hover { text-decoration-thickness: 2px; }

/* ==========================================================================
   5. Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  height: 64px;
}
.brand {
  margin-right: auto;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--brand-700);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.nav-links {
  display: none;
  gap: var(--space-6);
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}
.nav-links a:hover, .nav-links a:focus-visible { color: var(--ink); }
@media (min-width: 1024px) {
  .nav-links { display: flex; }
}

/* ==========================================================================
   6. Store badges + QR (shared by hero, drive and footer)
   ========================================================================== */

.hero-actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-5);
}
.store-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}
.store { display: inline-flex; border-radius: 10px; }
.store[hidden] { display: none; }
.store img { height: var(--badge-h); width: auto; max-width: none; display: block; }
/* The official Play badge PNG carries 41px of transparent padding on every
   side (pill = 564x168 of 646x250). Scale it so the visible pill matches the
   App Store badge height, and pull the padding back with negative margins. */
.store-play img {
  height: calc(var(--badge-h) * 250 / 168);
  margin: calc(var(--badge-h) * -41 / 168);
}

.action-rule { display: none; width: 1px; height: 72px; background: var(--border); }
@media (min-width: 768px) { .action-rule { display: block; } }

.qr-block { display: none; flex-direction: column; align-items: center; gap: 8px; max-width: 140px; text-align: center; }
.hero .qr-block, .drive .qr-block { max-width: 156px; }
.hero .hero-actions-row, .drive .hero-actions-row { column-gap: 20px; }
.qr {
  display: none;
  width: 104px;
  height: 104px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
}
@media (min-width: 768px) {
  .qr { display: block; }
  .qr-block { display: flex; }
  /* Centre the badges and the rule on the 104px QR image, not on QR + caption. */
  .hero .hero-actions-row, .drive .hero-actions-row { align-items: flex-start; }
  .hero .hero-actions-row .store-buttons, .drive .hero-actions-row .store-buttons { margin-top: calc((104px - var(--badge-h)) / 2); }
  .hero .hero-actions-row .action-rule, .drive .hero-actions-row .action-rule { margin-top: 16px; }
}

/* ==========================================================================
   7. Phone mock (.phone) — HTML/CSS driver mock (variant D) and image shots (.shot).
   Every internal size is expressed in --u, one design pixel at a 300px-wide
   phone, so the mock scales as one picture at any placement width.
   ========================================================================== */

.phone {
  --phone-w: 300px;
  /* iPhone 15/16 proportions at a 300px-wide body: 14u bezel each side,
     272u screen at 393:852, screen corner 38u, body corner 52u. */
  --phone-body: #121214;
  --phone-rim: #3E3E42;
  width: var(--phone-w);
  max-width: 100%;
  container-type: inline-size;
  position: relative;
  z-index: 1;
}
/* Side buttons: action + two volume on the left, power on the right.
   Sized in % of the body so they need no container units. */
.phone::before, .phone::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 1.2%;
  border-radius: 1px;
  background: var(--phone-rim);
}
.phone::before {
  left: -1%;
  top: 17%;
  height: 24%;
  background: linear-gradient(to bottom,
    var(--phone-rim) 0 12%, transparent 12% 26%,
    var(--phone-rim) 26% 56%, transparent 56% 66%,
    var(--phone-rim) 66% 96%, transparent 96%);
}
.phone::after { right: -1%; top: 24%; height: 11%; }
.phone-frame {
  --u: calc(100cqw / 300);
  position: relative;
  aspect-ratio: 300 / 617.7;
  border-radius: calc(52 * var(--u));
  background: var(--phone-body);
  padding: calc(14 * var(--u));
  box-shadow: var(--shadow-lg), inset 0 0 0 calc(2 * var(--u)) var(--phone-rim);
}
/* Dynamic Island */
.phone-frame::before {
  content: "";
  position: absolute;
  z-index: 2;
  left: 50%;
  top: calc(21.5 * var(--u));
  width: calc(87 * var(--u));
  height: calc(25.5 * var(--u));
  border-radius: calc(13 * var(--u));
  background: #000;
  transform: translateX(-50%);
}
.screen {
  height: 100%;
  border-radius: calc(38 * var(--u));
  background: #F7FBFB;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  font-size: calc(12.5 * var(--u));
  line-height: 1.35;
  letter-spacing: 0;
}
.ps-status {
  flex: none;
  height: calc(28 * var(--u));
  padding: calc(4 * var(--u)) calc(22 * var(--u)) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: calc(11 * var(--u));
  font-weight: 700;
  background: var(--mock-brand);
  color: #fff;
}
.ps-sys { display: inline-flex; align-items: center; gap: calc(5 * var(--u)); }
.ps-bars { display: inline-flex; align-items: flex-end; gap: calc(1.5 * var(--u)); height: calc(8 * var(--u)); }
.ps-bars span { width: calc(2.5 * var(--u)); background: #fff; border-radius: calc(1 * var(--u)); }
.ps-bars span:nth-child(1) { height: 40%; }
.ps-bars span:nth-child(2) { height: 70%; }
.ps-bars span:nth-child(3) { height: 100%; }
.ps-batt {
  width: calc(18 * var(--u));
  height: calc(9 * var(--u));
  border-radius: calc(3 * var(--u));
  border: calc(1.25 * var(--u)) solid #fff;
  background: linear-gradient(90deg, #fff 70%, transparent 70%) content-box;
  padding: calc(1 * var(--u));
}
.ps-appbar {
  flex: none;
  height: calc(44 * var(--u));
  display: flex;
  align-items: center;
  padding-inline: calc(18 * var(--u));
  background: var(--mock-brand);
  color: #fff;
  font-size: calc(14.5 * var(--u));
  font-weight: 700;
}
.ps-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: calc(11 * var(--u));
  padding: calc(14 * var(--u));
}
.ps-home {
  flex: none;
  align-self: center;
  width: calc(96 * var(--u));
  height: calc(4 * var(--u));
  border-radius: calc(2 * var(--u));
  background: #14201F;
  opacity: 0.85;
  margin-block: calc(4 * var(--u)) calc(9 * var(--u));
}

/* Mock primitives */
.ps-card {
  position: relative;
  background: #fff;
  border: calc(1 * var(--u)) solid var(--border);
  border-radius: calc(12 * var(--u));
  padding: calc(12 * var(--u));
}
.ps-label {
  font-size: calc(11 * var(--u));
  font-weight: 600;
  color: var(--ink-muted);
  letter-spacing: 0.01em;
}
.ps-value { font-size: calc(14 * var(--u)); font-weight: 700; }
.ps-sub { font-size: calc(11.5 * var(--u)); color: var(--ink-muted); }
.ps-row { display: flex; align-items: center; justify-content: space-between; gap: calc(8 * var(--u)); }
.ps-row .ps-value { font-size: calc(13 * var(--u)); }
.ps-meta { font-size: calc(12 * var(--u)); font-weight: 600; color: var(--ink-muted); }
.ps-route {
  font-size: calc(12 * var(--u));
  font-weight: 600;
  color: var(--ink-muted);
  padding: calc(2 * var(--u)) calc(2 * var(--u)) 0;
}
.ps-note {
  font-size: calc(11.5 * var(--u));
  color: var(--ink-muted);
  text-align: center;
  padding-inline: calc(8 * var(--u));
  text-wrap: balance;
}
.ps-note.ps-push {
  padding: calc(10 * var(--u)) calc(12 * var(--u));
  border-radius: calc(10 * var(--u));
  background: var(--brand-50);
  border: calc(1 * var(--u)) dashed #BFDCDA;
  color: var(--ink);
}
.ps-push { margin-top: auto; }
/* B (Offers) and C (Confirmed) carry less content than A and D: open up the
   in-screen rhythm so the body fills the screen instead of leaving a dead band. */

.ps-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: calc(40 * var(--u));
  padding-inline: calc(14 * var(--u));
  border-radius: calc(10 * var(--u));
  background: var(--mock-brand);
  color: #fff;
  font-size: calc(13 * var(--u));
  font-weight: 700;
  border: calc(1.5 * var(--u)) solid var(--mock-brand);
}
.ps-btn-block { width: 100%; flex: none; }
.ps-btn-sm { height: calc(30 * var(--u)); font-size: calc(12 * var(--u)); flex: 1; border-radius: calc(8 * var(--u)); }
.ps-btn-outline { background: #fff; color: var(--brand-700); border-color: var(--brand-700); }

/* Places (From / To) with a dotted connector */
.ps-places { display: flex; flex-direction: column; gap: calc(12 * var(--u)); padding-block: calc(10 * var(--u)); }
.ps-place { position: relative; display: flex; align-items: center; gap: calc(12 * var(--u)); }
.ps-field { display: flex; flex-direction: column; gap: calc(1 * var(--u)); }
.ps-dot {
  flex: none;
  width: calc(10 * var(--u));
  height: calc(10 * var(--u));
  border-radius: 50%;
  border: calc(2.5 * var(--u)) solid var(--mock-brand);
  background: #fff;
}
.ps-dot-end { background: var(--mock-brand); border-radius: calc(2.5 * var(--u)); }
.ps-place:first-child::after {
  content: "";
  position: absolute;
  left: calc(4 * var(--u));
  top: calc(50% + 7 * var(--u));
  height: calc(100% - 2 * var(--u));
  border-left: calc(2 * var(--u)) dotted #9FB5B3;
}

/* Pills and vehicle chips */
.ps-pills { display: flex; gap: calc(8 * var(--u)); }
.ps-pill, .ps-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: calc(28 * var(--u));
  padding-inline: calc(12 * var(--u));
  border-radius: calc(14 * var(--u));
  border: calc(1 * var(--u)) solid var(--border);
  background: #fff;
  font-size: calc(12 * var(--u));
  font-weight: 600;
}
.ps-pill { flex: 1; }
.ps-pill-on, .ps-chip-on { background: var(--mock-brand); border-color: var(--mock-brand); color: #fff; }
.ps-chips { display: flex; flex-wrap: wrap; gap: calc(6 * var(--u)); margin-top: calc(-4 * var(--u)); }
.ps-chip { padding-inline: calc(10 * var(--u)); }

/* Offer cards */
.ps-offer { display: flex; align-items: center; gap: calc(10 * var(--u)); }
.ps-avatar {
  flex: none;
  width: calc(32 * var(--u));
  height: calc(32 * var(--u));
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-100);
  color: var(--brand-700);
  font-size: calc(13 * var(--u));
  font-weight: 800;
}
.ps-who { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ps-name { font-size: calc(13 * var(--u)); font-weight: 700; }
.ps-car { font-size: calc(12 * var(--u)); color: var(--ink-muted); }
.ps-fare { font-size: calc(16 * var(--u)); font-weight: 800; letter-spacing: -0.01em; }
.ps-actions { display: flex; gap: calc(8 * var(--u)); margin-top: calc(10 * var(--u)); }
.ps-card-best { border: calc(2 * var(--u)) solid var(--brand); padding: calc(11 * var(--u)); }
.ps-card-best .ps-fare { color: var(--brand-700); }
.ps-pill-best {
  position: absolute;
  top: calc(-9 * var(--u));
  right: calc(12 * var(--u));
  height: calc(18 * var(--u));
  padding-inline: calc(8 * var(--u));
  display: inline-flex;
  align-items: center;
  border-radius: calc(9 * var(--u));
  background: var(--accent);
  color: var(--ink);
  font-size: calc(10 * var(--u));
  font-weight: 800;
  letter-spacing: 0.02em;
}

/* Confirmed: fare block + OTP */
.ps-farebox {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(2 * var(--u));
  padding-block: calc(14 * var(--u));
  background: var(--brand-50);
  border-color: #D3ECEB;
}
.ps-bigfare { font-size: calc(28 * var(--u)); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; color: var(--brand-700); }
.ps-otp { display: flex; flex-direction: column; gap: calc(8 * var(--u)); }
.ps-otp-row { display: flex; align-items: center; gap: calc(6 * var(--u)); }
.ps-otp-tag { font-size: calc(11 * var(--u)); font-weight: 800; color: var(--ink-muted); margin-right: auto; letter-spacing: 0.06em; }
.ps-otp-digit {
  width: calc(28 * var(--u));
  height: calc(32 * var(--u));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: calc(8 * var(--u));
  background: var(--brand-50);
  border: calc(1 * var(--u)) solid #D3ECEB;
  font-size: calc(15 * var(--u));
  font-weight: 800;
}

/* Driver: trip card + fare input */
.ps-trip { display: flex; flex-direction: column; gap: calc(4 * var(--u)); }
.ps-tripline { font-size: calc(16 * var(--u)); font-weight: 800; letter-spacing: -0.01em; }
.ps-tag {
  align-self: flex-start;
  margin-top: calc(6 * var(--u));
  padding: calc(3 * var(--u)) calc(8 * var(--u));
  border-radius: calc(6 * var(--u));
  background: var(--brand-50);
  color: var(--brand-700);
  font-size: calc(11 * var(--u));
  font-weight: 700;
}
.ps-fareinput { display: flex; flex-direction: column; gap: calc(6 * var(--u)); }
.ps-input {
  display: flex;
  align-items: center;
  height: calc(44 * var(--u));
  padding-inline: calc(12 * var(--u));
  border-radius: calc(10 * var(--u));
  border: calc(2 * var(--u)) solid var(--brand);
  background: #fff;
  font-size: calc(18 * var(--u));
  font-weight: 800;
}

/* Map tile (decorative): grows to fill spare height so no screen has a dead region */
.ps-map {
  flex: 1 1 0;
  min-height: calc(84 * var(--u));
  max-height: calc(180 * var(--u));
  border-radius: calc(12 * var(--u));
  overflow: hidden;
  background: #E8F4F2;
  border: calc(1 * var(--u)) solid var(--border);
}
.ps-map svg { display: block; width: 100%; height: 100%; }
.ps-rows { display: flex; flex-direction: column; gap: calc(10 * var(--u)); }
.ps-rows .ps-row + .ps-row { padding-top: calc(10 * var(--u)); border-top: calc(1 * var(--u)) solid var(--border); }
.ps-tripfoot {
  display: flex;
  justify-content: space-between;
  margin-top: calc(2 * var(--u));
  padding-top: calc(10 * var(--u));
  border-top: calc(1 * var(--u)) solid var(--border);
  font-size: calc(11.5 * var(--u));
  font-weight: 600;
  color: var(--ink-muted);
}

/* Image shot: the user's design mockup, already placed on a 786x1704 iPhone
   screen canvas by scripts/optimise-images.mjs, IS the screen. The frame
   takes its height from the image's width/height attributes (same ratio as
   the CSS frame), so the frame never crops the canvas; content taller than
   the screen is cut at the canvas bottom by the image pipeline. */
.phone.shot .phone-frame { aspect-ratio: auto; }
.phone.shot picture { display: block; }
.shot-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(38 * var(--u));
  background: #F7FBFB;
}

/* Decorative blob behind a phone (desktop only) */
.hero-shot, .drive-shot { position: relative; }
.hero-shot::before, .drive-shot::before {
  content: "";
  position: absolute;
  z-index: 0;
  width: 420px;
  height: 420px;
  left: 50%;
  top: 50%;
  transform: translate(-42%, -60%);
  border-radius: 48% 52% 45% 55% / 55% 45% 55% 45%;
  background: var(--brand-100);
  display: none;
}
.hero-shot::before {
  transform: translate(-30%, -66%);
  background: color-mix(in srgb, var(--brand-100) 80%, var(--brand) 20%);
}

/* ==========================================================================
   8. Hero
   ========================================================================== */

main > .hero {
  padding-block: 40px 32px;
  background:
    radial-gradient(60% 50% at 85% 20%, var(--brand-100) 0%, transparent 70%),
    var(--surface);
}
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; }
.hero .eyebrow-dot { font-size: 12px; line-height: 1.5; letter-spacing: 0.06em; margin-bottom: 20px; }
.eyebrow-dot { display: flex; align-items: flex-start; gap: 10px; }
.eyebrow-dot::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  margin-top: calc(0.75em - 3px); /* centre on the first line when the town list wraps */
  border-radius: 50%;
  background: var(--accent);
}
.hero h1 { margin-bottom: 20px; }
.hero .lead { max-width: 26em; margin-bottom: 32px; }
.hero .hero-actions-row { margin-bottom: 28px; }
.hero .hero-driver { margin: -8px 0 24px; }

.trust {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.trust li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.trust .icon { color: var(--brand-700); }
/* One row only where all three fit; otherwise a clean column, never a 2+1 wrap. */
@media (min-width: 1200px) {
  .trust { flex-direction: row; flex-wrap: nowrap; column-gap: 20px; }
  .trust li { white-space: nowrap; }
}

/* Mobile: the phone sits under the copy and the section edge cuts its
   bottom ~20%, so the hero stays close to one screen. */
.hero-shot {
  display: flex;
  justify-content: center;
  margin-top: 40px;
  overflow: hidden;
  max-height: 460px;
  /* Dissolve the clipped phone into the band instead of hard-cutting it. */
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
}
.hero-shot .phone { --phone-w: 248px; }
.hero-shot .phone-frame { box-shadow: 0 16px 40px rgba(14, 53, 53, 0.16), inset 0 0 0 calc(2 * var(--u)) var(--phone-rim); }

@media (min-width: 1024px) {
  main > .hero { padding-block: 56px 96px; }
  .hero { --badge-h: 52px; }
  .hero-grid {
    display: grid;
    grid-template-columns: 1.12fr 0.88fr;
    column-gap: 64px;
    align-items: start; /* phone never moves when the web font swaps in (CLS) */
  }
  .hero-copy { padding-top: 12px; }
  .hero .eyebrow-dot { font-size: 13px; letter-spacing: 0.08em; }
  .hero h1 { max-width: 16ch; text-wrap: balance; }
  .hero-shot { margin-top: 0; overflow: visible; max-height: none; -webkit-mask-image: none; mask-image: none; }
  .hero-shot .phone { --phone-w: 280px; }
  .hero-shot .phone-frame { box-shadow: var(--shadow-lg), inset 0 0 0 calc(2 * var(--u)) var(--phone-rim); }
  .hero-shot::before { display: block; }
}

/* 1024-1199: the copy column is ~490px, so 60px breaks the h1 into five
   ragged lines; one step down keeps it at four. */
@media (min-width: 1024px) and (max-width: 1199px) {
  .hero h1 { font-size: 52px; }
}

/* ==========================================================================
   9. How it works
   ========================================================================== */

ol.steps {
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
ol.steps > li {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  padding: 28px 28px 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
ol.steps > li::before {
  counter-increment: step;
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  background: var(--brand-100);
  color: var(--brand-700);
  font: 700 15px/1 var(--font-sans);
}
ol.steps h3 { margin-top: 12px; margin-bottom: 8px; }
ol.steps p { color: var(--ink-muted); }
.step-shot {
  margin-top: auto;
  padding-top: 24px;
  height: 276px; /* 24px gap + 252px mock viewport */
  overflow: hidden;
  display: flex;
  justify-content: center;
  flex: none;
  /* The phone dissolves into the card, so the rounded card edge never slices a glyph. */
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
}
.step-shot .phone { --phone-w: 240px; }
.step-shot .phone-frame { box-shadow: 0 10px 30px rgba(14, 53, 53, 0.14), inset 0 0 0 calc(2 * var(--u)) var(--phone-rim); }
.steps-note { margin-top: 32px; max-width: var(--measure); }

@media (min-width: 1024px) {
  ol.steps { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .step-shot { height: 324px; } /* 24px gap + 300px mock viewport */
}

/* ==========================================================================
   10. Why Thatzal
   ========================================================================== */

.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 768px) {
  .features { grid-template-columns: 1fr 1fr; gap: 40px 48px; }
  .feature { padding-top: 24px; border-top: 1px solid var(--border); }
}
@media (min-width: 1024px) {
  main > #why { padding-block: 80px; } /* compact scene like Towns: four short items need no 120px frame */
  .features { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
  .feature p { max-width: none; font-size: 16px; }
  .feature { padding-top: 20px; }
  .feature h3 { font-size: 19px; margin-top: 14px; min-height: 2.6em; } /* two lines, so bodies align across the row */
  .feature-icon { width: 44px; height: 44px; }
  .feature-icon svg { width: 20px; height: 20px; }
  /* Head as a two-column band: h2 left, lead right, so the lead fills the
     space beside the headline instead of stacking under it. */
  #why .section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 64px;
    align-items: end;
    margin-bottom: 40px;
  }
  #why .section-head .eyebrow { grid-column: 1; }
  #why .section-head h2 { grid-column: 1; }
  #why .section-head .lead { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; }
}
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--brand-100);
  color: var(--brand-700);
}
.feature-icon svg { width: 22px; height: 22px; }
.feature h3 { margin-top: 16px; }
.feature p { margin-top: 8px; max-width: 36ch; color: var(--ink-muted); }

/* ==========================================================================
   10b. Customer voices (dark band): a carousel of equal cards. Quotes and
   names come from FACTS.md "Testimonials". Avatars are inline SVG drawings.
   ========================================================================== */

main > .voices {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(60% 50% at 0% 0%, rgba(41, 181, 181, 0.22), transparent 70%),
    radial-gradient(40% 40% at 100% 100%, rgba(242, 181, 68, 0.14), transparent 70%),
    var(--brand-900);
}
.voices h2 { color: var(--on-dark); }
.voices .eyebrow { color: var(--brand); }
.voices .lead { color: var(--on-dark-muted); }

/* The track: one row, snapping card by card. Cards per view: 1 (+ peek) on
   phones, 2 from 768px, 3 from 1024px. The side padding leaves room for the
   card shadows, which overflow: auto would otherwise clip. */
.voices-list {
  --per-view-gap: 16px;
  list-style: none;
  margin: -16px calc(var(--gutter) * -1);
  padding: 16px var(--gutter) 28px;
  display: flex;
  gap: var(--per-view-gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.voices-list::-webkit-scrollbar { display: none; }
@media (prefers-reduced-motion: no-preference) { .voices-list { scroll-behavior: smooth; } }
.voices-list:focus-visible { outline: 2px solid var(--brand); outline-offset: -4px; border-radius: var(--radius-lg); }
.voice { flex: 0 0 84%; max-width: 340px; scroll-snap-align: start; display: flex; }
.voice figure {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px;
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius-lg);
  border-top: 5px solid var(--accent);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}
.voice-mark { width: 30px; height: 22px; fill: var(--accent); flex: none; }
.voice blockquote { margin: 0; }
.voice blockquote p { font-size: 17px; line-height: 1.55; font-weight: 600; letter-spacing: -0.005em; max-width: none; }
.voice figcaption {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.avatar {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--brand-100);
}
.avatar svg { display: block; width: 100%; height: 100%; }
.voice-who { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.voice-name { font-weight: 800; font-size: 16px; line-height: 1.25; letter-spacing: -0.01em; }
.voice-trip {
  font-size: var(--text-micro);
  line-height: 1.4;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--brand-100);
  color: var(--brand-700);
  white-space: nowrap;
}

/* Controls: dots left, arrows right. Shown only once site.js is running. */
.voices-controls { display: none; align-items: center; justify-content: space-between; gap: 16px; margin-top: 12px; }
.voices.is-carousel .voices-controls { display: flex; }
.voices-dots { display: flex; gap: 8px; }
.voices-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
  transition: width 0.25s ease, background-color 0.25s ease;
}
.voices-dot[aria-current="true"] { width: 28px; background: var(--accent); }
.voices-arrows { display: flex; gap: 12px; }
.voices-arrow {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: var(--on-dark);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}
.voices-arrow svg { width: 20px; height: 20px; }
.voices-arrow:hover { background: var(--accent); border-color: var(--accent); color: var(--brand-950); }
.voices button:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

@media (min-width: 768px) {
  .voices-list { --per-view-gap: 24px; margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px; }
  .voice { flex-basis: calc((100% - var(--per-view-gap)) / 2); max-width: none; }
}
@media (min-width: 1024px) {
  .voice { flex-basis: calc((100% - 2 * var(--per-view-gap)) / 3); }
  .voices .section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 64px;
    align-items: end;
  }
  .voices .section-head .lead { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; }
}

/* ==========================================================================
   11. Where we are (compact tinted band)
   ========================================================================== */

main > .towns { padding-block: 56px; }
.towns-copy .eyebrow { margin-bottom: 12px; }
.towns-copy .lead { margin-top: 16px; }
.towns-copy .small { margin-top: 12px; }
.towns-copy .lead + .small { margin-top: 20px; }
.town-tiles {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.town-tile {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  min-height: 96px;
}
.town-tile .icon { width: 18px; height: 18px; color: var(--brand-700); }
.town-name { font-size: 16px; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; overflow-wrap: anywhere; }
@media (min-width: 400px) {
  .town-tile { padding: 20px; }
  .town-name { font-size: 17px; }
}
@media (min-width: 768px) {
  .town-name { font-size: 20px; }
}
@media (min-width: 1024px) {
  main > .towns { padding-block: 80px; }
  .towns-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 64px;
    align-items: center;
  }
  .town-tiles { margin-top: 0; }
}

/* ==========================================================================
   12. Drive with Thatzal (dark band)
   ========================================================================== */

main > .drive { padding-bottom: 32px; overflow: hidden; }
.drive h2 { color: var(--on-dark); }
.drive .eyebrow { color: var(--brand); margin-bottom: 12px; }
.drive .lead { color: var(--on-dark-muted); margin-top: 16px; }
.drive .micro { color: var(--on-dark-muted); }
.drive a:focus-visible { outline-color: var(--brand); }
.drive-points {
  list-style: none;
  margin: 28px 0 32px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.drive-points li { display: flex; align-items: flex-start; gap: 12px; color: var(--on-dark); font-weight: 600; }
.drive-points .icon { width: 20px; height: 20px; color: var(--brand); margin-top: 2px; }
.drive .action-rule { background: rgba(255, 255, 255, 0.16); }
.drive .qr { border-color: transparent; }

.drive-shot {
  display: flex;
  justify-content: center;
  margin-top: 48px;
  max-height: 430px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
}
.drive-shot .phone { --phone-w: 260px; }
.drive-shot .phone-frame { box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35), inset 0 0 0 calc(2 * var(--u)) var(--phone-rim); }

@media (min-width: 1024px) {
  main > .drive { padding-bottom: var(--section-pad); overflow: visible; }
  .drive-grid {
    display: grid;
    grid-template-columns: 1fr 0.9fr;
    gap: 64px;
    align-items: center;
  }
  .drive-shot { margin-top: 0; max-height: none; overflow: visible; -webkit-mask-image: none; mask-image: none; }
  .drive-shot .phone { --phone-w: 300px; }
  .drive-shot::before { display: block; background: rgba(255, 255, 255, 0.06); }
}

/* ==========================================================================
   13. About and investors
   ========================================================================== */

.about-main .eyebrow { margin-bottom: 12px; }
.about-main h2 { margin-bottom: 20px; }
.about-main p + p { margin-top: 16px; }
.about-main .lead-in { margin-top: 28px; font-size: 17px; font-weight: 700; color: var(--ink); }
.about-main .lead-in + p { margin-top: 8px; }
.about-main .signature { margin-top: 24px; }

.investor-card {
  margin-top: 40px;
  background: var(--brand-50);
  border-radius: var(--radius-xl);
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.stat { display: flex; flex-direction: column; gap: 4px; padding-block: 20px; }
.stat:first-child { padding-top: 0; }
.stat + .stat { border-top: 1px solid var(--border); }
.stat-number { font-size: 44px; font-weight: 800; line-height: 1; letter-spacing: -0.02em; color: var(--brand-700); }
.stat-label { font-size: 14px; color: var(--ink-muted); }
.investor-eyebrow { margin-top: 24px; }
.investor-line { margin-top: 10px; font-size: 15px; color: var(--ink); }
.investor-card .btn-primary { margin-top: 16px; width: 100%; }
.investor-card .small { margin-top: 12px; }
.stat + .investor-eyebrow { padding-top: 24px; margin-top: 0; border-top: 1px solid var(--border); }

@media (min-width: 768px) {
  .investor-card .btn-primary { width: auto; align-self: flex-start; }
}
@media (min-width: 1024px) {
  .about-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 64px;
    align-items: start;
  }
  .investor-card { margin-top: 0; padding: 40px; }
}

/* ==========================================================================
   14. Footer
   ========================================================================== */

.site-footer { --badge-h: 44px; background: var(--brand-950); color: var(--on-dark); padding-block: 64px 32px; }
.site-footer a { color: var(--on-dark); }
.site-footer a:focus-visible { outline-color: var(--brand); }
.site-footer .micro { color: var(--on-dark-muted); }
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
.footer-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.footer-logo { width: 150px; height: auto; }
.footer-brand .micro { max-width: 34ch; }
.footer-brand .text-link { font-size: 14px; color: var(--on-dark-muted); }
.footer-col { display: flex; flex-direction: column; align-items: flex-start; }
.footer-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
  margin-bottom: 8px;
}
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; text-decoration: none; }
.footer-links a:hover, .footer-links a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
.footer-install { gap: 16px; }
.footer-install .footer-label { margin-bottom: 0; }
.footer-install .text-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; }
.footer-install .qr { width: 96px; height: 96px; }
.footer-install .qr-block { align-items: flex-start; text-align: left; max-width: 168px; }
.footer-bottom {
  max-width: none;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  color: var(--on-dark-muted);
}
@media (min-width: 1024px) {
  .site-footer { padding-block: 80px 32px; }
  .footer-grid { grid-template-columns: 1fr 0.7fr 1.1fr; gap: 48px; }
  /* Badges stacked beside the QR, so the install column is not twice as tall as the others. */
  .footer-install .hero-actions-row { flex-wrap: nowrap; align-items: flex-start; }
  .footer-install .store-buttons { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   15. Prose (legal pages)
   ========================================================================== */

main > .page { padding-block: 56px 80px; }
@media (min-width: 1024px) { main > .page { padding-block: 80px 120px; } }
.prose { max-width: 68ch; }
.prose > * + * { margin-top: 16px; }
.prose p { max-width: none; }
.prose h1 { font-size: clamp(34px, 5vw, 48px); }
.prose h1 + * { margin-top: 12px; }
/* Legal headings are signposts, not scene titles: one step down the scale. */
.prose h2 { margin-top: 40px; font-size: 24px; line-height: 1.2; }
.prose h3 { margin-top: 24px; font-size: 18px; }
.prose ul { margin-bottom: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.prose a { font-weight: 600; }
@media (min-width: 1024px) { .prose h2 { font-size: 28px; } }

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

/* ==========================================================================
   16. Route landing pages (Google Search ads)
   ========================================================================== */

.lp .eyebrow { margin-bottom: 0; }
.lp .lead { margin-top: 16px; }
.lp-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 24px; }
.prose .trust { padding-left: 0; }
.prose .lp-steps { padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.lp-video { margin: 0; }
.lp-video video { display: block; width: 100%; max-width: 320px; height: auto; aspect-ratio: 9 / 16; border-radius: 16px; background: #0f172a; }
.lp-video figcaption { margin-top: 8px; }
.fare-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.fare-table th, .fare-table td { padding: 12px 8px; text-align: left; border-bottom: 1px solid var(--border); }
.fare-table thead th { font-size: 13px; font-weight: 600; color: var(--ink-muted); }
.fare-table tbody th { font-weight: 600; }
.fare-table td { white-space: nowrap; }
.fare-table .muted { color: var(--ink-muted); font-size: 14px; }
@media (max-width: 380px) { .fare-table { font-size: 14px; } .fare-table th, .fare-table td { padding: 10px 4px; } }
