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

/* ---------- Design tokens (change colours and spacing here) ---------- */
:root {
  /* Brand blue. Use for decoration, illustrations and large headings. */
  --brand: #4285f4;
  /* Darker blue for buttons, links and small text: passes WCAG AA contrast on white. */
  --brand-strong: #1a5fcf;
  --brand-stronger: #144aa3;
  --sky: #eef4fe;        /* light blue section background */
  --sky-2: #e3edfd;
  --ink: #0f1b33;        /* main text */
  --muted: #4a5670;      /* secondary text */
  --line: #dde4f0;       /* borders */
  --white: #ffffff;
  --success: #1e7d4a;
  --error: #b42318;
  --learner-red: #d7261e;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px -12px rgba(15, 27, 51, 0.18);
  --container: 1120px;
  --gutter: 20px;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  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; animation: none !important; }
}

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

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

h1, h2, h3 {
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.02em;
}

p { margin: 0 0 1em; }

a { color: var(--brand-strong); text-underline-offset: 3px; }
a:hover { color: var(--brand-stronger); }

:focus-visible {
  outline: 3px solid var(--brand-strong);
  outline-offset: 3px;
  border-radius: 4px;
}

.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;
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-weight: 700;
}
.skip-link:focus { top: 12px; color: var(--white); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 12px 24px;
  border: 2px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--brand-strong);
  color: var(--white);
  box-shadow: 0 6px 18px -6px rgba(26, 95, 207, 0.55);
}
.btn-primary:hover { background: var(--brand-stronger); color: var(--white); }
.btn-primary[disabled] { opacity: 0.7; cursor: progress; }

.btn-ghost {
  min-height: 44px;
  padding: 8px 18px;
  font-size: 0.9375rem;
  background: var(--white);
  color: var(--brand-strong);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--brand-strong); }

/* ---------- Header ---------- */
.site-header {
  padding-block: 14px;
  border-bottom: 1px solid var(--line);
  background: var(--white);
}
.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.25rem;
  letter-spacing: 0.04em;
}
.logo:hover { color: var(--ink); }
.logo img { width: 34px; height: 34px; }

/* ---------- Hero ---------- */
.hero {
  padding-block: 40px 56px;
  background:
    radial-gradient(circle at 85% 10%, var(--sky-2) 0, transparent 45%),
    linear-gradient(180deg, var(--sky) 0%, var(--white) 100%);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 6px 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--brand-strong);
}
.badge-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px rgba(66, 133, 244, 0.2);
}

.hero h1 {
  font-size: clamp(2.1rem, 8vw, 3.6rem);
  font-weight: 800;
  margin-bottom: 14px;
}
.hero h1 .hl { color: var(--brand); }

.product-name {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--muted);
}
.product-name img { width: 22px; height: 22px; flex: none; }

.lead {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 34em;
  margin-bottom: 28px;
}

.hero-art { max-width: 420px; margin-inline: auto; width: 100%; }

/* ---------- Waitlist form ---------- */
.waitlist { max-width: 520px; }

.waitlist-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 0.9375rem;
}

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

.waitlist input[type="email"] {
  width: 100%;
  min-height: 52px;
  padding: 12px 18px;
  font: inherit;
  color: var(--ink);
  background: var(--white);
  border: 2px solid #8c97ad; /* 3:1 contrast against white for the field edge */
  border-radius: 999px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.waitlist input[type="email"]::placeholder { color: #6b7590; }
.waitlist input[type="email"]:focus {
  outline: none;
  border-color: var(--brand-strong);
  box-shadow: 0 0 0 4px rgba(66, 133, 244, 0.3);
}
.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: 12px 0 0;
  font-size: 0.875rem;
  color: var(--muted);
}

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

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

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

/* ---------- Sections ---------- */
.section { padding-block: 64px; }
.section-alt { background: var(--sky); }

.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(1.75rem, 5.5vw, 2.5rem); font-weight: 800; }
.section-head p { color: var(--muted); font-size: 1.125rem; margin: 0; }

.eyebrow {
  margin-bottom: 8px;
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-strong);
}

.cards {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card h3 { font-size: 1.25rem; margin-bottom: 8px; }
.card p { margin: 0; color: var(--muted); }

.card-emoji {
  display: inline-grid;
  place-items: center;
  width: 48px; height: 48px;
  margin-bottom: 14px;
  font-size: 1.5rem;
  border-radius: 14px;
  background: var(--sky);
}

.note {
  max-width: 720px;
  margin: 32px 0 0;
  padding: 18px 20px;
  border-left: 4px solid var(--brand);
  background: var(--white);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink);
}

/* Features */
.feature { position: relative; }
.feature-icon {
  display: inline-grid;
  place-items: center;
  width: 52px; height: 52px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: var(--brand);
  color: var(--white);
}
.feature-icon svg { width: 28px; height: 28px; }
.feature-num {
  position: absolute;
  top: 20px; right: 22px;
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--sky-2);
}

.perks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}
.perks li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--sky);
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9375rem;
}
.perks svg { width: 18px; height: 18px; color: var(--brand-strong); flex: none; }

/* Who it's for */
.who .card { box-shadow: none; }
.who .card h3 { font-size: 1.125rem; }

.founders {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
  padding: 20px 22px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--white);
  font-weight: 600;
  font-size: 1.0625rem;
}
.founders p { margin: 0; }

/* L-plate badge, used as a fun accent */
.l-plate {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 6px;
  background: var(--white);
  color: var(--learner-red);
  font-weight: 900;
  font-size: 1.75rem;
  line-height: 1;
  transform: rotate(-6deg);
}

/* ---------- Bottom call to action ---------- */
.cta {
  padding-block: 64px;
  background: var(--brand-strong);
  color: var(--white);
}
.cta-inner {
  display: grid;
  gap: 24px;
}
.cta h2 { font-size: clamp(1.75rem, 5.5vw, 2.5rem); font-weight: 800; }
.cta p { color: #e6eeff; font-size: 1.125rem; margin: 0; }

.cta .waitlist-label { color: var(--white); }
.cta .waitlist input[type="email"] { border-color: var(--white); }
.cta .waitlist input[type="email"]:focus { box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.45); }
.cta .btn-primary {
  background: var(--white);
  color: var(--brand-strong);
  box-shadow: none;
}
.cta .btn-primary:hover { background: var(--sky); color: var(--brand-stronger); }
.cta .consent { color: #e6eeff; }
.cta .consent a { color: var(--white); }
.cta .form-status { color: var(--white); }
.cta .form-status.is-error {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--error);
}
.cta :focus-visible { outline-color: var(--white); }

/* ---------- Footer ---------- */
.site-footer {
  padding-block: 32px;
  font-size: 0.9375rem;
  color: var(--muted);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-footer p { margin: 0; }

/* ---------- Privacy page ---------- */
.prose {
  max-width: 720px;
  padding-block: 48px 64px;
}
.prose h1 { font-size: clamp(2rem, 7vw, 2.75rem); font-weight: 800; }
.prose h2 { font-size: 1.375rem; margin-top: 2em; }
.prose ul { padding-left: 1.25em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.4em; }
.updated { color: var(--muted); }

/* Highlights text that still needs filling in. Remove the class once done. */
.placeholder {
  background: #fff3c4;
  padding: 0 4px;
  border-radius: 4px;
  outline: 1px dashed #b98900;
}

/* ---------- Larger screens ---------- */
@media (min-width: 640px) {
  :root { --gutter: 32px; }
  .cards-3 { grid-template-columns: repeat(2, 1fr); }
  .who .cards { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .hero { padding-block: 72px 96px; }
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; gap: 56px; }
  .hero-art { max-width: none; }
  .section, .cta { padding-block: 96px; }
  .cards-3 { grid-template-columns: repeat(3, 1fr); }
  .who .cards { grid-template-columns: repeat(3, 1fr); }
  .cta-inner { grid-template-columns: 1fr 1fr; align-items: center; gap: 56px; }
  .footer-inner { flex-direction: row; justify-content: space-between; align-items: center; }
}

/* Compact "Who it's for" cards: icon on the left */
.who .card {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto 1fr;
  column-gap: 16px;
  align-items: start;
  padding: 20px;
}
.who .card-emoji { grid-row: span 2; margin: 0; }
.who .card h3 { margin: 2px 0 4px; }
