/* ==========================================================================
   GMBR Driving Test Simulator: site styles
   Mobile-first: base styles are for phones, media queries add larger layouts.
   ========================================================================== */

/* ---------- Fonts ----------
   Bricolage Grotesque (SIL Open Font License, see assets/fonts/OFL.txt), served from this site. */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("assets/fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

/* ---------- Design tokens (change colours and spacing here) ---------- */
:root {
  --blue: #4285f4;        /* brand blue */
  --blue-ink: #1a5fcf;    /* darker blue for small text and links (readable on white) */
  --ink: #111418;         /* main text */
  --muted: #4f5664;       /* secondary text */
  --line: #e4e6ea;        /* hairlines */
  --paper: #f5f6f8;       /* light grey sections */
  --tarmac: #15181d;      /* dark section */
  --red: #d7261e;         /* L-plate red */
  --yellow: #ffd23f;      /* road-marking yellow */
  --green: #1e8e4f;
  --sign-green: #00653b;  /* UK primary-route sign green */
  --sign-yellow: #ffd200; /* primary-route sign numerals */
  --error: #b42318;
  --white: #fff;

  --container: 1200px;
  --gutter: 20px;
  --radius: 20px;
  --section: 64px;        /* vertical space around each section */

  /* Type scale: one display size (hero and final call to action), one section size */
  --display: clamp(2.5rem, 10.5vw, 4.5rem);
  --heading: clamp(1.875rem, 6vw, 2.75rem);

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Bricolage Grotesque", var(--font);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 750; letter-spacing: -0.02em; line-height: 1.06; }
/* Illustration text uses the display face too, except the monospace labels */
svg text:not([font-family]) { font-family: var(--font-display); }
p { margin: 0; }
figure { margin: 0; }

a { color: var(--blue-ink); text-underline-offset: 3px; }
a:hover { color: var(--ink); }

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

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

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

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 10px;
  background: var(--ink); color: var(--white); font-weight: 700;
}
.skip-link:focus { top: 12px; color: var(--white); }

.section { padding-block: var(--section); }

/* ---------- Header ---------- */
.site-header { padding-block: 16px; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.logo {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
  font-weight: 800; font-size: 1.1875rem; letter-spacing: 0.06em;
}
.logo:hover { color: var(--ink); }
.logo img { width: 32px; height: 32px; }

/* ---------- Buttons and form ---------- */
/* Buttons are tarmac black with a road-yellow focus ring. */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 12px 26px;
  border: 0; border-radius: 14px;
  background: var(--ink); color: var(--white);
  font: inherit; font-size: 1.1875rem; font-weight: 700; line-height: 1.1; letter-spacing: -0.01em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, transform .15s;
}
.btn:hover { background: #2b3038; color: var(--white); }
.btn:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; box-shadow: 0 0 0 6px var(--ink); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .7; cursor: progress; }

.btn-small { min-height: 40px; padding: 8px 16px; border-radius: 10px; font-size: 0.9375rem; }
@media (max-width: 639px) { .btn-small { display: none; } }

.waitlist { max-width: 540px; }

.waitlist-row { display: flex; flex-direction: column; gap: 10px; }

.waitlist input[type="email"] {
  width: 100%; min-height: 56px; padding: 12px 18px;
  font: inherit; font-size: 1.0625rem; color: var(--ink);
  background: var(--white);
  border: 1.5px solid #9aa1ad; border-radius: 14px;
  transition: border-color .15s, box-shadow .15s;
}
.waitlist input[type="email"]::placeholder { color: #737a87; }
.waitlist input[type="email"]:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(66, 133, 244, .25);
}
.waitlist input[aria-invalid="true"] { border-color: var(--error); }

/* Mailchimp anti-bot field: must stay in the form but hidden from people */
.hp { position: absolute; left: -5000px; }

.consent { margin-top: 12px; font-size: 0.8125rem; line-height: 1.5; color: var(--muted); }

.form-status { margin-top: 12px; font-weight: 600; font-size: 0.9375rem; }
.form-status:empty { display: none; }
.form-status.is-error { color: var(--error); }

.form-success {
  max-width: 540px; padding: 18px 20px; border-radius: 14px;
  background: var(--white); border: 2px solid var(--green); color: var(--ink);
}
.form-success strong { display: block; font-size: 1.125rem; color: var(--green); }

@media (min-width: 480px) {
  .waitlist-row { flex-direction: row; }
  .waitlist-row .btn { flex: none; }
}

/* ---------- Hero ---------- */
.hero { padding-block: 24px var(--section); }
.hero-grid { display: grid; gap: 40px; align-items: center; }

.beta-note {
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 18px;
  font-size: 0.9375rem; font-weight: 600; color: var(--ink);
}
.beta-dot {
  flex: none; width: 8px; height: 8px; border-radius: 50%;
  background: #f5b800; box-shadow: 0 0 0 3px rgba(255, 210, 63, .35);
}

.hero-title {
  font-size: var(--display);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.lead {
  margin: 20px 0 28px;
  font-size: 1.125rem; line-height: 1.5; color: var(--muted);
  max-width: 40ch;
}
.lead strong { color: var(--ink); font-weight: 700; }
.platforms {
  display: flex; align-items: center; gap: 6px;
  margin: -8px 0 18px; font-size: 0.9375rem; font-weight: 600; color: var(--ink);
}
.platforms svg { width: 20px; height: 20px; color: var(--blue-ink); }
.platforms svg + svg { margin-right: 4px; }

.hero-art svg { width: 100%; height: auto; border-radius: var(--radius); }

/* ---------- Problem ---------- */
.why { background: var(--paper); }
.why-grid { display: grid; gap: 40px; }
.statement { font-size: var(--heading); max-width: 15ch; }

/* The pass-rate figure, set like a UK primary-route sign */
.stat-sign {
  margin-top: 32px; max-width: 360px;
  padding: 22px 24px 20px;
  background: var(--sign-green); color: var(--white);
  border-radius: 14px;
  box-shadow: inset 0 0 0 4px var(--sign-green), inset 0 0 0 7px var(--white);
}
.stat-figure {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.75rem, 10vw, 3.75rem); line-height: 1; letter-spacing: -0.03em; white-space: nowrap;
  color: var(--sign-yellow);
}
.stat-sign figcaption { margin-top: 10px; font-size: 1.0625rem; font-weight: 600; line-height: 1.35; }
.stat-sign a { color: var(--white); font-weight: 500; font-size: 0.875rem; }
.stat-sign a:hover { color: var(--sign-yellow); }

.reasons { display: grid; }
.reasons > div { padding-block: 22px; border-top: 1px solid #d9dce1; }
.reasons > div:last-child { border-bottom: 1px solid #d9dce1; }
.reasons h3 { font-size: 1.3125rem; letter-spacing: -0.02em; margin-bottom: 6px; }
.reasons p { color: var(--muted); max-width: 52ch; }


/* ---------- How it works ---------- */
.how { padding-block: var(--section) 0; }
.how-intro h2 { font-size: var(--heading); }
.how-intro p { margin-top: 10px; font-size: 1.1875rem; color: var(--muted); }

.feature { display: grid; gap: 32px; align-items: start; padding-block: 48px; }

/* Route stops: the three features read like stops on a test route */
.stops { position: relative; }
.stop {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
  font-family: var(--mono); font-size: 0.75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--blue-ink);
}
.stop-pin {
  flex: none; width: 16px; height: 16px; border-radius: 50%;
  background: var(--white); border: 4px solid var(--blue);
}
.feature h3 { font-size: clamp(1.625rem, 5vw, 2.25rem); margin-bottom: 12px; }
.feature-text p:not(.step) { font-size: 1.125rem; color: var(--muted); max-width: 40ch; }
.feature-art { width: 100%; }

.mini-steps { list-style: none; margin: 28px 0 0; padding: 0; counter-reset: step; max-width: 360px; }
.mini-steps li {
  display: flex; gap: 14px; align-items: baseline;
  padding-block: 12px; border-top: 1px solid var(--line);
  font-weight: 600;
}
.mini-steps li:last-child { border-bottom: 1px solid var(--line); }
.mini-steps li::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--mono); font-size: 0.8125rem; color: var(--blue-ink);
}

/* Mock test report sheet */
.sheet {
  position: relative;
  padding: 22px 18px;
  background: #fffdf7;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(17, 20, 24, .08), 0 30px 60px -30px rgba(17, 20, 24, .35);
  font-family: var(--mono); font-size: 0.8125rem;
}
.sheet .short, .sheet-key { display: none; }
.sheet abbr { text-decoration: none; }
@media (max-width: 479px) {
  .sheet .long { display: none; }
  .sheet .short { display: inline; }
  .sheet-key { display: block; margin-top: 8px; font-size: 0.6875rem; color: var(--muted); }
}
.sheet-head {
  display: flex; justify-content: space-between;
  padding-bottom: 12px; margin-bottom: 4px;
  border-bottom: 2px solid var(--ink);
  text-transform: uppercase; letter-spacing: .12em; font-weight: 700;
}
.sheet table { width: 100%; border-collapse: collapse; }
.sheet th, .sheet td { padding: 8px 0; text-align: left; border-bottom: 1px solid #ece8dc; }
.sheet th { font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: 0.6875rem; }
.sheet th:not(:first-child), .sheet td:not(:first-child) { width: 16%; text-align: center; }
.box {
  display: inline-grid; place-items: center;
  width: 26px; height: 22px;
  border: 1.5px solid #b9bcc4; border-radius: 3px;
  font-style: normal; font-weight: 700; color: var(--blue-ink); letter-spacing: .05em;
}
.box.is-marked { border-color: var(--blue-ink); }
.sheet tfoot td { font-weight: 700; border-bottom: 0; padding-top: 12px; }
.sheet-foot { display: flex; align-items: center; gap: 16px; margin-top: 14px; }
.sheet-tip { flex: 1; padding: 10px 12px; background: #f3efe4; border-radius: 6px; color: var(--ink); font-family: var(--font); font-size: 0.9375rem; line-height: 1.4; }
.stamp {
  flex: none; padding: 4px 12px;
  border: 3px solid var(--green); border-radius: 8px;
  color: var(--green); font-family: var(--font-display); font-weight: 800; font-size: 1.875rem;
  text-transform: uppercase; letter-spacing: .06em;
  transform: rotate(-6deg);
}

/* Scenario scenes: image left, words right on phones; 2 x 2 grid on larger screens */
.tiles { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.tiles li { display: grid; grid-template-columns: 132px 1fr; column-gap: 16px; align-items: center; }
.tiles svg { width: 100%; height: auto; border-radius: 12px; grid-row: span 2; }
.tiles h4 { font-size: 1.125rem; letter-spacing: -0.015em; align-self: end; }
.tiles p { font-size: 0.9375rem; color: var(--muted); line-height: 1.4; align-self: start; margin-top: 2px; }

/* Route map */
.map-wrap { border-radius: var(--radius); overflow: hidden; }
.route-map { width: 100%; height: auto; }
.route-map--wide { display: none; }

/* ---------- Who it's for ---------- */
.who-line {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.8vw, 2.5rem); font-weight: 600; line-height: 1.22; letter-spacing: -0.02em;
  color: #5b6270; max-width: 40ch;
}
.who-line strong { color: var(--ink); font-weight: 750; }

/* ---------- FAQ ---------- */
.faq { background: var(--paper); }
.faq-grid { display: grid; gap: 32px; }
.faq h2 { font-size: var(--heading); }
.faq-list { margin: 0; }
.faq-list > div { padding-block: 20px; border-top: 1px solid #d9dce1; }
.faq-list > div:last-child { border-bottom: 1px solid #d9dce1; }
.faq-list dt { font-family: var(--font-display); font-size: 1.3125rem; font-weight: 700; letter-spacing: -0.015em; margin-bottom: 6px; }
.faq-list dd { margin: 0; color: var(--muted); max-width: 56ch; }

.founders {
  display: flex; align-items: center; gap: 12px;
  margin-top: 22px; font-size: 0.9375rem; font-weight: 600;
}
.l-plate {
  flex: none; display: inline-grid; place-items: center;
  width: 28px; height: 28px; border-radius: 4px;
  background: var(--white); color: var(--red);
  border: 1.5px solid #d5d8de;
  font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; line-height: 1;
}

/* ---------- Closing call to action ---------- */
.cta { padding-block: var(--section); background: var(--tarmac); color: var(--white); }
.cta .stop { color: #9cbcff; }
.cta .stop-pin { background: var(--tarmac); border-color: #9cbcff; }
.cta h2 { font-size: var(--display); letter-spacing: -0.035em; line-height: 1; }
.cta-sub { margin: 16px 0 32px; font-size: 1.1875rem; color: #b4bac6; max-width: 40ch; }
.cta .waitlist input[type="email"] { border-color: transparent; }
.cta .btn { background: var(--yellow); color: var(--ink); }
.cta .btn:hover { background: #ffdd66; color: var(--ink); }
.cta .consent { color: #aab1bd; }
.cta .consent a { color: var(--white); }
.cta .form-status { color: var(--white); }
.cta .form-status.is-error { padding: 10px 14px; border-radius: 10px; background: var(--white); color: var(--error); }
.cta :focus-visible { outline-color: var(--white); }

/* ---------- Footer ---------- */
.site-footer { padding-block: 28px; font-size: 0.875rem; color: var(--muted); }
.footer-inner { display: flex; flex-direction: column; gap: 10px; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand img { width: 20px; height: 20px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; padding: 0; list-style: none; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--ink); }

/* ---------- Privacy page ---------- */
.prose { max-width: 720px; padding-block: 40px 72px; }
.prose h1 { font-size: clamp(2.25rem, 8vw, 3.25rem); letter-spacing: -0.035em; margin-bottom: 12px; }
.prose h2 { font-size: 1.375rem; letter-spacing: -0.02em; margin: 2em 0 0.5em; }
.prose p { margin-bottom: 1em; }
.prose ul { padding-left: 1.25em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.4em; }
.updated { color: var(--muted); }

/* ---------- Larger screens ---------- */
@media (min-width: 640px) {
  :root { --gutter: 32px; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .tiles li { display: block; }
  .tiles svg { margin-bottom: 12px; }
  .tiles p { margin-top: 4px; }
}

@media (min-width: 960px) {
  :root { --gutter: 48px; --section: 96px; }
  .site-header { padding-block: 22px; }

  .hero { padding-top: 32px; }
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 64px; }
  .hero-art svg { max-height: 640px; }

  .why-grid { grid-template-columns: 5fr 7fr; column-gap: 72px; row-gap: 88px; align-items: start; }
  .why-head { position: sticky; top: 40px; }

  .how-intro { margin-bottom: 16px; }
  .feature { grid-template-columns: 5fr 7fr; gap: 80px; padding-block: 64px; }
  .feature--flip { grid-template-columns: 7fr 5fr; }
  .feature--flip .feature-text { order: 2; }
  .feature--flip .feature-art { order: 1; }
  .feature--report { align-items: center; }
  .feature--wide { grid-template-columns: 1fr; gap: 40px; }
  .feature--wide .feature-text { display: grid; grid-template-columns: 5fr 7fr; column-gap: 80px; align-items: end; }
  .feature--wide .stop, .feature--wide h3 { grid-column: 1; }
  .feature--wide h3 { margin-bottom: 0; }
  .feature--wide .feature-text p:last-child { grid-column: 2; grid-row: 1 / span 2; align-self: end; }
  .feature--scenarios .tiles { grid-template-columns: repeat(4, 1fr); }
  .route-map--wide { display: block; }
  .route-map--tall { display: none; }
  .sheet { padding: 30px 30px 28px; font-size: 0.875rem; }

  /* The dashed route line runs down the left edge from the first stop to the test centre */
  .spine { position: relative; }
  .spine::before {
    content: ""; position: absolute; z-index: 1;
    top: var(--spine-top, 0); height: var(--spine-height, 0); left: calc(var(--spine-x, 0px) - 1.5px); width: 3px;
    background: linear-gradient(var(--blue) 60%, transparent 0) 0 0 / 3px 16px repeat-y;
  }
  .stop { position: relative; }
  .stop-pin { z-index: 2; }
  .stop-pin { position: absolute; left: calc(-1 * var(--gutter) + 18px - 6.5px); width: 16px; height: 16px; }

  .faq-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 56px; }
  .faq-list > div:nth-last-child(2) { border-bottom: 1px solid #d9dce1; }

  .cta-inner { display: grid; grid-template-columns: 1fr 1fr; column-gap: 72px; align-items: start; }
  .cta h2 { grid-column: 1 / -1; margin-bottom: 40px; }
  .cta-sub { margin: 4px 0 0; font-size: 1.375rem; }
  .footer-inner { flex-direction: row; justify-content: space-between; align-items: center; }
}
