/* A1 School of Motoring — mobile first. Design context lives in .impeccable.md. */

:root {
  /* Primitives: the badge's navy and red, plus near-white neutrals tinted toward the navy. */
  --navy-950: oklch(22% 0.1 268);
  --navy-800: oklch(32% 0.17 268);
  --navy-600: oklch(45% 0.15 268);
  --navy-100: oklch(94% 0.022 268);
  --red-600: oklch(52% 0.19 25);
  --red-700: oklch(45% 0.17 25);
  --paper: oklch(99.4% 0.002 268);
  --surface: oklch(97.6% 0.008 268);
  --line: oklch(91% 0.012 268);
  --ground: oklch(91% 0.035 145);

  /* Semantic */
  --ink: var(--navy-950);
  --ink-muted: oklch(44% 0.04 268);
  --on-navy: oklch(97% 0.012 268);
  --on-navy-muted: oklch(84% 0.04 268);
  --accent: var(--red-600);

  /* Type: one display face, one text face */
  --font-display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, sans-serif;
  --text-sm: 0.875rem;
  --text-base: 1.0625rem;
  --text-lg: 1.25rem;
  --text-xl: clamp(1.75rem, 1.25rem + 2vw, 2.5rem);
  --text-2xl: clamp(2.6rem, 1.6rem + 4.5vw, 4.5rem);

  /* Space (4pt base) */
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-section: clamp(3.25rem, 2rem + 6vw, 7rem);
  --gutter: clamp(1rem, 0.5rem + 3vw, 3.5rem);

  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --ease-out: cubic-bezier(0.25, 1, 0.5, 1);

  --header-h: 72px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--space-md));
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--text-base) / 1.6 var(--font-body);
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h1 { font-size: var(--text-2xl); color: var(--navy-800); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; }

/* No blue tap flash on phones; keyboard users still get the focus ring below. */
a, button { -webkit-tap-highlight-color: transparent; }
:focus:not(:focus-visible) { outline: none; }

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

.skip {
  position: absolute;
  left: var(--space-md);
  top: -100px;
  z-index: 30;
  padding: var(--space-xs) var(--space-md);
  background: var(--navy-800);
  color: var(--on-navy);
  border-radius: var(--radius-sm);
}
.skip:focus { top: var(--space-md); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  height: var(--header-h);
  padding: 0 var(--gutter);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-right: auto;
  text-decoration: none;
  font: 800 1.05rem/1 var(--font-display);
  color: var(--navy-800);
}
.brand { gap: var(--space-xs); }
.brand img { width: 50px; height: 50px; }
/* The header has nothing else in it on phones, so the name can be big. */
.brand span { font-size: clamp(1.1rem, 0.95rem + 0.8vw, 1.3rem); white-space: nowrap; }
.site-header .btn-sm { display: none; }
@media (min-width: 420px) {
  .brand { gap: var(--space-sm); }
  .brand img { width: 56px; height: 56px; }
}
.nav { display: none; gap: var(--space-lg); }
.nav a {
  text-decoration: none;
  font-weight: 500;
  color: var(--ink-muted);
  transition: color 150ms var(--ease-out);
}
.nav a:hover { color: var(--navy-800); }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 var(--space-lg);
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 150ms var(--ease-out), transform 150ms var(--ease-out);
}
.btn-sm { min-height: 40px; padding: 0 var(--space-md); font-size: var(--text-sm); }
.btn-lg { align-self: flex-start; min-height: 56px; padding: 0 var(--space-xl); font-size: 1.1rem; }
.btn-primary { background: var(--red-600); color: var(--surface); }
.btn-primary:hover { background: var(--red-700); }

.store-buttons { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.store {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-width: 168px;
  min-height: 56px;
  padding: var(--space-xs) var(--space-lg) var(--space-xs) var(--space-md);
  border-radius: var(--radius-sm);
  background: var(--navy-950);
  color: var(--on-navy);
  font: 700 1.15rem/1.1 var(--font-display);
  text-decoration: none;
  transition: background-color 150ms var(--ease-out), transform 150ms var(--ease-out);
}
.store span { display: flex; flex-direction: column; }
.store small { font: 500 0.75rem/1.3 var(--font-body); color: var(--on-navy-muted); }
.store-icon { flex: none; width: 26px; height: 26px; fill: currentColor; }
.store:hover { background: var(--navy-800); }
.store-light { background: var(--surface); color: var(--navy-950); }
.store-light small { color: var(--ink-muted); }
.store-light:hover { background: var(--navy-100); }

@media (hover: hover) {
  .btn:hover, .store:hover { transform: translateY(-1px); }
}

/* Official store badges, unmodified, as Apple's and Google's guidelines require.
   Google's PNG has clear space built in, so it's sized up and pulled in to line up. */
.badges { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); }
.badges a { display: block; line-height: 0; border-radius: 10px; }
.badges img { height: 42px; width: auto; }
.badges img.play { height: 60px; margin: -9px; }
@media (min-width: 420px) {
  .badges img { height: 50px; }
  .badges img.play { height: 72px; margin: -11px; }
}

/* ---------- Layout ---------- */

main { padding: 0 var(--gutter); }
main > section { padding-top: var(--space-section); max-width: 680px; }
.section-lede {
  margin-top: var(--space-sm);
  max-width: 52ch;
  color: var(--ink-muted);
  font-size: var(--text-lg);
  line-height: 1.5;
}

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

main > section.hero {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  padding-top: var(--space-xl);
}
.hero-copy { display: flex; flex-direction: column; gap: var(--space-lg); }
.accent { color: var(--accent); }
.lede { max-width: 40ch; font-size: var(--text-lg); line-height: 1.5; color: var(--ink-muted); }
.hero-alt { color: var(--ink-muted); }
.hero-alt a { color: var(--navy-800); font-weight: 700; text-underline-offset: 3px; }

/* Stat strip: big numbers that rise in on load; the rating's stars fill in one by one.
   The rating cell is filled in by scripts/fetch-reviews.mjs. */
.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg) var(--space-md);
  margin: 0;
  padding: var(--space-lg) 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}
.stats li {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  animation: stat-in 600ms var(--ease-out) both;
  animation-delay: calc(150ms + var(--i) * 90ms);
}
.stats li > a { display: flex; flex-direction: column; gap: var(--space-2xs); color: inherit; text-decoration: none; }
.stats strong {
  font: 800 clamp(2.25rem, 1.8rem + 2vw, 3rem)/1 var(--font-display);
  letter-spacing: -0.03em;
  color: var(--navy-800);
}
.stats li:nth-child(even) strong { color: var(--red-600); }
.stats strong small { font-size: 0.5em; letter-spacing: 0.02em; text-transform: uppercase; }
.stats span { font-size: var(--text-sm); line-height: 1.35; color: var(--ink-muted); }
.stats .stars-row { display: flex; gap: 1px; font-size: 1rem; line-height: 1; }
.stats .stars-row i {
  font-style: normal;
  color: var(--red-600);
  animation: star-in 420ms var(--ease-out) both;
  animation-delay: calc(600ms + var(--i) * 90ms);
}
.stats a:hover span:last-child { text-decoration: underline; text-underline-offset: 3px; }
@keyframes stat-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes star-in {
  from { opacity: 0; transform: scale(0.4); }
  to { opacity: 1; transform: scale(1); }
}
@media (min-width: 640px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .stats li, .stats .stars-row i { animation: none; }
}

/* The doodle map: a banner in the hero on phones, a fixed side panel on desktop. */
/* On phones it runs edge to edge, and the top and bottom fade into the page so the
   traffic looks like it's passing under the content rather than hitting an edge. */
.map {
  order: 3;
  position: relative;
  height: clamp(300px, 52vh, 460px);
  margin-inline: calc(-1 * var(--gutter));
  overflow: hidden;
  background: var(--ground);
}
.map::before,
.map::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  z-index: 1;
  height: 22%;
  pointer-events: none;
}
.map::before { top: 0; background: linear-gradient(var(--paper), transparent); }
.map::after { bottom: 0; background: linear-gradient(transparent, var(--paper)); }
.map canvas { display: block; width: 100%; height: 100%; }

/* ---------- Packages ---------- */

/* Pricing: one navy card with the tabs built into its top and the chosen panel below. */
.pricing {
  margin-top: var(--space-xl);
  padding: var(--space-xs) var(--space-xs) 0;
  border-radius: var(--radius-lg);
  background: var(--navy-800);
  color: var(--on-navy);
}
.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2xs);
  padding: var(--space-2xs);
  border-radius: calc(var(--radius-lg) - var(--space-xs));
  background: var(--navy-950);
}
.tabs button {
  min-height: 44px;
  border: 0;
  border-radius: calc(var(--radius-lg) - var(--space-xs) - var(--space-2xs));
  background: transparent;
  color: var(--on-navy-muted);
  font: 700 var(--text-base)/1 var(--font-body);
  cursor: pointer;
  transition: background-color 200ms var(--ease-out), color 200ms var(--ease-out);
}
.tabs button:hover { color: var(--on-navy); }
.tabs button[aria-selected="true"] { background: var(--paper); color: var(--navy-800); }
.tab-panel { animation: panel-in 300ms var(--ease-out); }
.tab-panel[hidden] { display: none; }
@keyframes panel-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tab-panel { animation: none; }
}

/* Inside the card, packages and the single-lesson row are sections split by rules, not boxes. */
.pricing .pkg { padding: var(--space-xl) var(--space-lg); border: 0; border-radius: 0; background: none; }
.pricing .pkg + .pkg { border-top: 1px solid var(--navy-600); }
.pricing .pkg h3 { color: var(--on-navy-muted); }
.pricing .price { color: var(--on-navy); }
.pricing .save { color: oklch(84% 0.09 25); }
.pricing .ticks { border-top-color: var(--navy-600); }
.pricing .ticks li::before { border-color: var(--on-navy-muted); }
.pricing .pkg-row {
  padding: var(--space-lg);
  border: 0;
  border-top: 1px solid var(--navy-600);
  border-radius: 0;
}
.pricing .pkg-row p { color: var(--on-navy-muted); }
.pricing .pkg-row .row-price { color: var(--on-navy); }

.pkg { flex: 0 0 min(84%, 340px); scroll-snap-align: start; }
.pkg {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-xl) var(--space-lg);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.pkg h3 { font-size: var(--text-lg); color: var(--ink-muted); font-weight: 600; }
.price {
  font: 800 clamp(2.5rem, 2rem + 2vw, 3.25rem)/1 var(--font-display);
  letter-spacing: -0.03em;
  color: var(--navy-800);
  font-variant-numeric: tabular-nums;
}
.price span { margin-right: 0.08em; font-size: 0.45em; vertical-align: 0.9em; letter-spacing: 0; }
.save { font-weight: 700; color: var(--red-600); }
.ticks {
  display: grid;
  gap: var(--space-xs);
  margin: var(--space-md) 0 0;
  padding: var(--space-md) 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}
.ticks li { position: relative; padding-left: 1.6rem; }
.ticks li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 0.42em;
  width: 0.45rem;
  height: 0.8rem;
  border: solid var(--navy-600);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.pkg-featured { background: var(--navy-800); border-color: var(--navy-800); color: var(--on-navy); }
.pkg-featured h3 { color: var(--on-navy-muted); }
.pkg-featured .price { color: var(--on-navy); }
.pkg-featured .save { color: oklch(84% 0.09 25); }
.pkg-featured .ticks { border-top-color: var(--navy-600); }
.pkg-featured .ticks li::before { border-color: var(--on-navy-muted); }

/* Pay-as-you-go row under a package: lighter than the package card. */
.pkg-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.pkg-row p { color: var(--ink-muted); max-width: 46ch; margin-top: var(--space-2xs); }
.pkg-row .row-price {
  margin: 0;
  font: 800 1.6rem/1 var(--font-display);
  color: var(--navy-800);
  white-space: nowrap;
  text-align: right;
}
.row-price small {
  display: block;
  margin-top: var(--space-2xs);
  font: 500 var(--text-sm)/1.3 var(--font-body);
  color: var(--ink-muted);
}
.fine-print { margin-top: var(--space-lg); font-size: var(--text-sm); color: var(--ink-muted); max-width: 60ch; }

/* ---------- How it works: steps along a road ---------- */

.road-steps {
  --road-w: 34px;
  position: relative;
  display: grid;
  gap: var(--space-xl);
  margin: var(--space-xl) 0 0;
  padding: 0 0 0 calc(var(--road-w) + var(--space-lg));
  list-style: none;
  counter-reset: step;
}
.road-steps::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: var(--road-w);
  border-radius: 999px;
  background:
    repeating-linear-gradient(to bottom, var(--paper) 0 10px, transparent 10px 22px) center / 3px 100% no-repeat,
    oklch(36% 0.02 268);
}
.road-steps li { position: relative; counter-increment: step; }
.road-steps li::before {
  content: counter(step);
  position: absolute;
  left: calc(-1 * (var(--road-w) + var(--space-lg)) - 9px);
  /* Centred on the road, and level with the middle of the step's title line. */
  top: calc(var(--text-lg) * 0.525 - 26px);
  box-sizing: border-box;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 4px solid var(--paper);
  border-radius: 50%;
  background: var(--red-600);
  color: var(--surface);
  font: 800 1.05rem/1 var(--font-display);
}
/* The finish line: a medal instead of a number. */
.road-steps li.finish::before { display: none; }
.road-steps li.finish h3 { font-size: var(--text-xl); font-weight: 800; color: var(--navy-800); }
.medal {
  position: absolute;
  left: calc(-1 * (var(--road-w) + var(--space-lg)) - 15px);
  top: calc(var(--text-xl) * 0.525 - 32px);
  z-index: 1;
  width: 64px;
  height: 64px;
  padding: 6px;
  border: 4px solid var(--paper);
  border-radius: 50%;
  background: var(--navy-800);
}
/* The road ends at the medal. */
.road-steps li.finish::after {
  content: "";
  position: absolute;
  left: calc(-1 * (var(--road-w) + var(--space-lg)) - 2px);
  top: 40px;
  bottom: -12px;
  width: calc(var(--road-w) + 4px);
  background: var(--paper);
}
.medal circle { fill: oklch(82% 0.14 85); }
.medal .ribbon { fill: var(--red-600); }
.medal .star { fill: var(--surface); }
.road-steps p { margin-top: var(--space-2xs); color: var(--ink-muted); max-width: 52ch; }
.road-steps .badges { margin-top: var(--space-md); }

/* ---------- App ---------- */

/* Edge to edge on phones and tablets; a rounded panel beside the map on desktop. */
main > section.app {
  max-width: none;
  margin: var(--space-section) calc(-1 * var(--gutter)) 0;
  padding: var(--space-2xl) var(--gutter);
  background: var(--navy-800);
  color: var(--on-navy);
}
.app-copy { display: flex; flex-direction: column; gap: var(--space-md); max-width: 46ch; }
.app-copy h2 { font-size: var(--text-2xl); color: var(--on-navy); max-width: 14ch; }
/* Plain kicker text, not a pill: a pill reads like a button you can tap. */
.first {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-bottom: calc(-1 * var(--space-xs));
  color: oklch(85% 0.08 25);
  font-size: var(--text-base);
  font-weight: 700;
}
.first::before {
  content: "";
  width: 18px;
  height: 4px;
  border-radius: 2px;
  background: var(--red-600);
}
.app-copy p { color: var(--on-navy-muted); font-size: var(--text-lg); line-height: 1.55; }
.app-copy .badges { margin-top: var(--space-xs); }
.app-features { margin: 0; padding: 0; border: 0; color: var(--on-navy); }
.app-features li::before { border-color: oklch(85% 0.08 25); }
.shots {
  display: flex;
  gap: var(--space-md);
  margin: var(--space-xl) calc(-1 * var(--gutter)) 0;
  padding: var(--space-2xs) var(--gutter) var(--space-md);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  scrollbar-color: var(--navy-600) transparent;
}
.shots img {
  flex: none;
  /* On phones each screenshot nearly fills the screen, with the next one peeking in. */
  width: min(calc(100vw - 2 * var(--gutter) - 3.5rem), 380px);
  height: auto;
  border-radius: var(--radius-md);
  scroll-snap-align: start;
}

/* ---------- Reviews ---------- */

.review { margin: 0; }
.review blockquote { margin: var(--space-xs) 0; }
.review figcaption { font-size: var(--text-sm); font-weight: 500; color: var(--ink-muted); }
.stars { color: var(--red-600); letter-spacing: 0.1em; font-size: var(--text-sm); }
.review-featured { margin-top: var(--space-lg); }
.review-featured blockquote {
  font: 600 clamp(1.3rem, 1rem + 1.4vw, 1.75rem)/1.35 var(--font-display);
  letter-spacing: -0.01em;
  color: var(--navy-800);
  text-wrap: pretty;
}
.review-list {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  margin: var(--space-xl) calc(-1 * var(--gutter)) 0;
  padding: 0 var(--gutter) var(--space-xs);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
  column-gap: var(--space-xl);
}
/* Long reviews are trimmed in the swipe row so the cards stay a similar height. */
.review-list blockquote {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
  overflow: hidden;
}
.review-list .review {
  flex: 0 0 min(80%, 320px);
  scroll-snap-align: start;
  break-inside: avoid;
  padding: var(--space-md);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

/* ---------- Contact ---------- */

.contact-links {
  display: grid;
  margin: var(--space-xl) 0 0;
  padding: 0;
  list-style: none;
}
.contact-links a {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  padding: var(--space-md) 0;
  border-top: 1px solid var(--line);
  font: 800 clamp(1.3rem, 1rem + 1.5vw, 1.75rem)/1.15 var(--font-display);
  color: var(--navy-800);
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color 150ms var(--ease-out);
}
.contact-links li:last-child a { border-bottom: 1px solid var(--line); }
.contact-links a:hover { color: var(--red-600); }
.contact-links span { font: 500 var(--text-sm)/1.3 var(--font-body); color: var(--ink-muted); }

.legal { margin-top: var(--space-2xs); font-size: 0.6875rem; line-height: 1.4; max-width: 70ch; color: oklch(62% 0.03 268); }
.site-footer {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-section);
  padding: var(--space-xl) var(--gutter);
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: var(--text-sm);
}

/* ---------- Sticky app bar (phones and tablets) ---------- */

.app-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--gutter) max(var(--space-sm), env(safe-area-inset-bottom));
  background: var(--paper);
  border-top: 1px solid var(--line);
  transform: translateY(110%);
  transition: transform 250ms var(--ease-out);
}
.app-bar[hidden] { display: none; }
.app-bar.is-shown { transform: none; }
.app-bar .btn { flex: 1; }
.app-bar-wa {
  display: grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--navy-100);
  color: var(--navy-800);
}
.app-bar-wa svg { width: 24px; height: 24px; fill: currentColor; }
body.has-app-bar .site-footer { padding-bottom: 6rem; }

/* ---------- Larger screens ---------- */

@media (min-width: 640px) {
  .review-list blockquote { display: block; -webkit-line-clamp: unset; overflow: visible; }
  .review-list { display: block; columns: 2; margin-inline: 0; padding: 0; overflow: visible; }
  .review-list .review { display: block; width: auto; padding: var(--space-md) 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; }
  .contact-links a { flex-direction: row; align-items: baseline; gap: var(--space-lg); }
  .contact-links span { width: 6rem; flex: none; }
}

@media (min-width: 768px) {
  .nav { display: flex; }
}

/* Desktop: the map sits in the hero beside the headline, and every section below gets
   the full width of a centred content column. */
@media (min-width: 1024px) {
  :root {
    /* Tighter rhythm than phones: the column is wide, so big gaps read as empty. */
    --space-section: clamp(3.5rem, 1rem + 4vw, 5.5rem);
    /* Side padding that keeps content in a centred 1200px column on wide screens. */
    --edge: max(var(--gutter), (100vw - 1200px) / 2);
  }
  :root { --header-h: 76px; }
  .brand img { width: 58px; height: 58px; }
  .app-bar { display: none !important; }
  .nav { display: flex; }
  /* Collapses to nothing (no empty gap) until the hero's own button scrolls away. */
  .site-header .btn-sm {
    display: inline-flex;
    max-width: 12rem;
    overflow: hidden;
    transition: opacity 200ms var(--ease-out), max-width 250ms var(--ease-out), padding 250ms var(--ease-out), margin 250ms var(--ease-out);
  }
  body.hero-cta-visible .site-header .btn-sm { opacity: 0; max-width: 0; padding-inline: 0; margin-left: calc(-1 * var(--space-sm)); visibility: hidden; }
  body.has-app-bar .site-footer { padding-bottom: var(--space-xl); }
  .site-header, main, .site-footer { padding-inline: var(--edge); }
  main > section { max-width: none; }

  /* Hero: headline on the left, the map on the right running off the screen edge,
     the stats in a row underneath both. */
  main > section.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "copy map" "stats stats";
    column-gap: var(--space-2xl);
    row-gap: var(--space-xl);
    align-items: center;
    padding-top: var(--space-md);
  }
  .hero-copy { grid-area: copy; }
  .stats { grid-area: stats; }
  /* Its top, bottom and left edges fade into the page, so the traffic drifts in from
     nowhere rather than stopping at a hard edge. */
  .map {
    grid-area: map;
    order: 0;
    height: clamp(440px, 64vh, 620px);
    margin: 0 calc(-1 * var(--edge)) 0 0;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 18%), linear-gradient(transparent, #000 14%, #000 86%, transparent);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(to right, transparent, #000 18%), linear-gradient(transparent, #000 14%, #000 86%, transparent);
    mask-composite: intersect;
  }
  .map::before, .map::after { display: none; }

  /* Split sections: heading and intro on the left, the working part on the right. */
  main > section.split {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    column-gap: clamp(2rem, 5vw, 5rem);
    align-items: start;
  }
  .split > h2, .split > .section-lede, .split > .fine-print { grid-column: 1; }
  .split > .road-steps, .split > .contact-links {
    grid-column: 2;
    grid-row: 1 / span 4;
    margin-top: 0;
  }
  .review-list { columns: 3; }

  /* Packages: the heading sits above a full-width card, with the price on the left of
     each package and what's included on the right. */
  main > section.packages.split { display: block; }
  .tabs { max-width: 28rem; }
  .pricing .pkg {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    grid-template-rows: auto auto 1fr;
    column-gap: var(--space-2xl);
    row-gap: var(--space-xs);
    padding: var(--space-2xl) var(--space-2xl) var(--space-xl);
  }
  .pricing .pkg > :not(.ticks) { grid-column: 1; }
  .pricing .pkg .ticks {
    grid-column: 2;
    grid-row: 1 / span 3;
    align-self: center;
    margin: 0;
    padding: 0 0 0 var(--space-2xl);
    border-top: 0;
    border-left: 1px solid var(--navy-600);
  }
  .pricing .pkg-row { padding: var(--space-lg) var(--space-2xl); }

  /* App: a rounded panel, the pitch on the left and the screenshots scrolling beside it. */
  main > section.app {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    column-gap: var(--space-2xl);
    align-items: center;
    margin-inline: 0;
    padding: var(--space-2xl);
    border-radius: var(--radius-lg);
    overflow: hidden;
  }
  .app-copy h2 { font-size: var(--text-xl); max-width: 16ch; }
  .shots { margin: 0 calc(-1 * var(--space-2xl)) 0 0; padding: var(--space-2xs) var(--space-2xl) var(--space-md) 0; scroll-padding-inline: 0; }
  .shots img { width: 240px; }

  /* Contact: label above each value so the email address stays on one line. */
  .contact-links a { flex-direction: column; align-items: flex-start; gap: var(--space-2xs); }
  .contact-links span { width: auto; }
}

/* Scroll reveal: each block fades and rises a little as it enters the screen. Pure CSS,
   so browsers without scroll-driven animations (and reduced motion) just show it. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    main > section:not(.hero) > :not(.road-steps),
    .road-steps > li {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 60%;
    }
  }
}
@keyframes reveal {
  from { opacity: 0; translate: 0 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
