/* DriveMatch landing: deep green (go) with L-plate yellow accents.
   Green hero and footer, white quiz card, white and pale green sections below.
   One font family (Archivo): condensed heavy for headlines, normal width for reading. */

:root {
  --night: #0E5640;      /* deep green: page background, hero, footer */
  --night-deep: #093D2D; /* deeper blue for the footer and button shadows */
  --ember: #F3F8F1;      /* ice blue: alternate section */
  --amber: #12805C;      /* main accent blue (borders, icons, numbers) */
  --chill: #FFD23F;      /* icy accent on blue */
  --glare: #12805C;      /* primary button */
  --glare-hover: #0F6E4F;
  --paper: #FFFFFF;
  --ink: #10261E;        /* navy text */
  --muted: #4D5F57;
  --line: #D5E4DC;
  --cool: #FFD23F;       /* where the meter ends up */
  --on-dark: #FFFFFF;
  --on-dark-soft: #D3EADF;
  --error: #B3261E;
  --focus-dark: #FFFFFF;
  --focus-light: #12805C;
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-cond: "Archivo", "Arial Narrow", "Roboto Condensed", sans-serif-condensed, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--on-dark);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; }
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus-dark); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 18px; }
.wrap.narrow { max-width: 760px; }

/* ---------- Top bar ---------- */
.bar-inner { display: flex; align-items: center; justify-content: space-between; height: 52px; }
.wordmark {
  font-family: var(--font-cond); font-weight: 800; font-size: 1.45rem; letter-spacing: -0.02em;
  color: var(--on-dark); line-height: 1;
}
.bar-area { display: inline-flex; align-items: center; gap: 6px; font-size: 0.9rem; font-weight: 600; color: var(--on-dark-soft); }

/* ---------- Hero: road-line stripes from the top right ---------- */
.hero { position: relative; isolation: isolate; padding: 0 0 40px; }
.hero::before {
  /* soft road-line stripes and a warm glow, strongest top right, fading out */
  content: ""; position: absolute; inset: -52px 0 0 0; z-index: -1; pointer-events: none;
  background:
    repeating-linear-gradient(-14deg, rgba(255, 255, 255, 0) 0 30px, rgba(255, 255, 255, 0.10) 30px 34px),
    radial-gradient(120% 70% at 100% 0%, rgba(255, 210, 63, 0.26), rgba(255, 210, 63, 0) 60%);
  -webkit-mask-image: radial-gradient(140% 95% at 100% 0%, #000 30%, transparent 78%);
          mask-image: radial-gradient(140% 95% at 100% 0%, #000 30%, transparent 78%);
  animation: sun-in 1.4s ease-out both;
}
@keyframes sun-in { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }

.hero-grid { display: grid; gap: 14px; }
.hero h1 {
  font-family: var(--font-cond); font-stretch: 68%; font-weight: 850;
  font-size: clamp(2.1rem, 9.6vw, 5rem); line-height: 0.95; letter-spacing: -0.01em;
  margin: 4px 0 6px; color: #fff; text-wrap: balance; max-width: 17ch;
}
.sub { margin: 0 0 4px; font-size: 1.0625rem; line-height: 1.4; color: var(--on-dark-soft); max-width: 46ch; }

/* ---------- Quiz card ---------- */
.card {
  background: var(--paper); color: var(--ink); border-radius: 18px;
  box-shadow: 0 30px 60px -30px rgba(4, 40, 28, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.card :focus-visible { outline-color: var(--focus-light); }
.quiz { padding: 12px 14px 14px; scroll-margin-top: 10px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.quiz-head { display: flex; align-items: center; justify-content: space-between; min-height: 30px; }
.step-label { margin-left: auto; font-size: 0.95rem; font-weight: 700; color: var(--muted); }
.back {
  display: inline-flex; align-items: center; gap: 2px; border: 0; background: none; color: var(--ink);
  font: inherit; font-size: 1.0625rem; font-weight: 700; padding: 10px 10px 10px 4px; margin: -10px 0 -10px -6px;
  min-height: 48px; cursor: pointer; border-radius: 8px;
}
.back:hover { text-decoration: underline; }

/* Progress meter: light ice blue at the start, deeper blue as you go */
.meter { height: 6px; border-radius: 99px; background: #E6EFEA; overflow: hidden; margin: 4px 0 12px; }
.meter-fill {
  height: 100%; width: 14%; border-radius: inherit;
  background: linear-gradient(90deg, var(--cool), #7BC86B 45%, var(--amber));
  background-size: 700% 100%; background-position: 0 0;
  transition: width 0.35s ease, background-position 0.35s ease;
}

.step { border: 0; margin: 0; padding: 0; min-width: 0; display: none; }
.step.is-active { display: block; }
.quiz.moving .step.is-active { animation: step-in 0.22s ease-out; }
@keyframes step-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }

legend, .step legend label {
  font-family: var(--font-cond); font-stretch: 82%; font-weight: 800;
  font-size: 1.6rem; line-height: 1.08; letter-spacing: -0.005em; color: var(--ink);
  padding: 0; margin: 0 0 12px; display: block; text-wrap: balance;
}
legend:focus { outline: none; }
.help { margin: -4px 0 12px; color: var(--muted); font-size: 0.98rem; }
.help.good { display: flex; align-items: center; gap: 8px; color: #1F6B3A; font-weight: 700; margin-bottom: 6px; }

.options { display: grid; gap: 10px; }
/* Big tap targets: 64px rows, 18px text (Ryan: bigger buttons convert better) */
.option {
  position: relative; display: flex; align-items: center; gap: 12px;
  min-height: 64px; padding: 10px 18px; border: 2px solid var(--line); border-radius: 14px;
  background: var(--paper); cursor: pointer; transition: border-color 0.12s, background-color 0.12s, color 0.12s;
  -webkit-tap-highlight-color: transparent; box-shadow: 0 2px 0 var(--line);
}
.option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.option:hover { border-color: var(--amber); }
.option:has(input:checked) { border-color: var(--amber); background: var(--amber); color: #fff; box-shadow: 0 2px 0 var(--night-deep); }
.option:has(input:focus-visible) { outline: 3px solid var(--focus-light); outline-offset: 2px; }
.opt-text { font-weight: 700; font-size: 1.125rem; line-height: 1.25; }
.option::after {
  content: ""; margin-left: auto; width: 10px; height: 10px; flex-shrink: 0;
  border-right: 3px solid #A9C2B6; border-top: 3px solid #A9C2B6; transform: rotate(45deg);
}
.option:has(input:checked)::after { border-color: #FFD23F; }

.field { margin-bottom: 12px; }
.field > label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 1.0625rem; }
.optional { font-weight: 400; color: var(--muted); }
.big-input {
  width: 100%; font: inherit; font-size: 1.2rem; /* 16px+ stops iOS zoom */
  padding: 14px 16px; min-height: 56px; border: 2px solid var(--line); border-radius: 12px;
  background: var(--paper); color: var(--ink); -webkit-appearance: none; appearance: none;
}
#postcode { font-size: 1.5rem; letter-spacing: 0.12em; font-weight: 700; max-width: 200px; }
#postcode::placeholder { letter-spacing: 0.02em; font-weight: 400; font-size: 1.2rem; }
.big-input::placeholder { color: #8BA096; }
.big-input:focus { border-color: var(--amber); outline: none; box-shadow: 0 0 0 3px rgba(18, 128, 92, 0.30); }
.big-input[aria-invalid="true"] { border-color: var(--error); }

.consent {
  display: flex; gap: 12px; align-items: flex-start; margin: 4px 0 0; padding: 14px;
  background: #F1F7F3; border-radius: 12px; font-size: 0.95rem; line-height: 1.45; color: #2B3B34; cursor: pointer;
  border: 2px solid transparent;
}
.consent:has(input[aria-invalid]) { border-color: var(--error); }
.consent a { color: var(--focus-light); font-weight: 600; }
.consent input { width: 26px; height: 26px; flex-shrink: 0; margin: 0; accent-color: var(--amber); cursor: pointer; }

.error { display: none; margin: 8px 0 0; color: var(--error); font-weight: 600; font-size: 1rem; }
.error.show { display: block; }

.btn {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 56px; margin-top: 14px;
  padding: 14px 20px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--glare); color: #fff; box-shadow: 0 3px 0 var(--night-deep); min-height: 60px;
  font-family: var(--font); font-weight: 800; font-size: 1.2rem; letter-spacing: 0.005em;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.btn:hover { background: var(--glare-hover); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--night-deep); }
.btn:disabled { opacity: 0.7; cursor: progress; }
/* Instructor reveal: the one bold moment, an L-plate tile on a yellow card */
.reveal-card {
  display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: 16px;
  background: #FFF6D6; border: 2px solid #F1DC8A; animation: reveal-in 0.4s ease-out both;
}
.reveal-plate {
  display: grid; place-items: center; width: 64px; height: 64px; flex-shrink: 0; border-radius: 8px;
  background: #FFD23F; color: #111; box-shadow: inset 0 0 0 3px #111;
  font-weight: 900; font-size: 2.3rem; line-height: 1;
}
.reveal-name { margin: 0; font-weight: 800; font-size: 1.15rem; line-height: 1.25; color: var(--ink); }
.reveal-meta { margin: 4px 0 0; font-size: 1rem; color: var(--muted); line-height: 1.35; }
.step[data-step="reveal"] .help { margin: 14px 0 0; font-size: 1.0625rem; }
@keyframes reveal-in { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }

/* ---------- Lower sections (white and ice blue) ---------- */
.section { padding: 56px 0; background: var(--paper); color: var(--ink); border-top: 1px solid var(--line); }
.section-alt { background: var(--ember); }
.section h2 {
  font-family: var(--font-cond); font-stretch: 72%; font-weight: 800;
  font-size: clamp(2rem, 7vw, 3rem); line-height: 1; letter-spacing: -0.005em;
  margin: 0 0 24px; color: var(--ink); text-wrap: balance;
}
.section :focus-visible { outline-color: var(--focus-light); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 16px 36px 16px 0; position: relative;
  font-weight: 700; font-size: 1.1rem; color: var(--ink); min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2.5px solid var(--amber); border-bottom: 2.5px solid var(--amber); transform: rotate(45deg); transition: transform 0.2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { margin: 0 0 18px; color: var(--muted); max-width: 64ch; }

.foot { padding: 30px 0 40px; font-size: 0.9rem; color: var(--on-dark-soft); background: var(--night-deep); }
.foot p { margin: 0 0 12px; max-width: 70ch; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--on-dark); }
.foot-links > span { display: inline-block; line-height: 44px; }

/* ---------- Simple pages (thanks, not covered, privacy, contact) ---------- */
.page { padding: 18px 0 56px; position: relative; isolation: isolate; }
.page .card { padding: 26px 20px; max-width: 680px; }
.page h1 {
  font-family: var(--font-cond); font-stretch: 70%; font-weight: 850; color: var(--ink);
  font-size: clamp(2.3rem, 9vw, 3.6rem); line-height: 0.98; margin: 0 0 12px; text-wrap: balance;
}
.page .lead { font-size: 1.12rem; margin: 0 0 8px; }
.page h2 { font-size: 1.3rem; margin: 28px 0 12px; }
.page .muted { color: var(--muted); }
.page a { color: var(--focus-light); font-weight: 600; }
.next { list-style: none; counter-reset: n; padding: 0; margin: 0; display: grid; gap: 16px; }
.next li { counter-increment: n; display: grid; grid-template-columns: 36px 1fr; gap: 12px; }
.next li::before {
  content: counter(n); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--amber); color: #fff; font-weight: 800;
}
.status-icon { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 16px; }
.status-icon.cool { background: var(--cool); color: var(--ink); }
.status-icon.warm { background: #FFF3C4; color: var(--ink); }
.page-note { max-width: 680px; margin: 16px 0 0; color: var(--on-dark-soft); font-size: 0.92rem; }
.page .page-note a, .page-note a { color: var(--on-dark); }

/* Thanks page: a warm glow */
.cooled .page::before {
  content: ""; position: absolute; inset: -52px 0 0 0; z-index: -1; pointer-events: none;
  background: radial-gradient(110% 70% at 100% 0%, rgba(255, 210, 63, 0.22), rgba(255, 210, 63, 0) 62%);
}

/* Legal text */
.legal h2 { font-size: 1.2rem; }
.legal p, .legal li { color: #2B3B34; }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: 6px; }

/* Contact form */
.select {
  width: 100%; font: inherit; font-size: 1.1rem; padding: 14px 16px; min-height: 56px;
  border: 2px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink);
}
textarea.big-input { min-height: 140px; resize: vertical; }

/* ---------- Wider screens ---------- */
@media (min-width: 560px) {
  .wrap { padding: 0 28px; }
  .quiz { padding: 22px 24px 18px; }
  .page .card { padding: 36px 36px; }
}
@media (min-width: 960px) {
  .bar-inner { height: 72px; }
  .hero { padding: 36px 0 84px; }
  .hero h1 { font-size: clamp(3rem, 5.4vw, 5rem); }
  .hero-grid { grid-template-columns: 1.08fr 0.92fr; gap: 56px; align-items: start; }
  .hero-copy { padding-top: 34px; }
  .sub { font-size: 1.25rem; }
  legend, .step legend label { font-size: 1.85rem; }
  .section { padding: 84px 0; }
  .page { padding: 40px 0 90px; }
}

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

/* ---------- DriveMatch additions ---------- */
/* Wordmark with a small L-plate */
.wordmark { display: inline-flex; align-items: center; gap: 8px; }
.lplate {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 4px;
  background: #FFD23F; color: #111; font-family: var(--font); font-weight: 900; font-size: 1.05rem; line-height: 1;
  box-shadow: inset 0 0 0 2px #111;
}
/* L-plate yellow highlight in the hero headline */
.hero h1 em { font-style: normal; color: #FFD23F; }
