/* Brand colours come from brand.config.js (app.js sets them on :root); these are the same values as a fallback. */
:root {
  --grad-start: #1F5FBF;
  --grad-end: #7FB5F0;
  --primary: #1E4FA8;
  --accent: #F5C542;
  --ink: #0E1A33;
  --muted: #3D4A63;
  --page: #F4F7FC;
  --line: #D9E3F2;
  --track: #EBF0F8;
  --selected: #EEF3FB;
  --error: #B42318;
  --display: "Inter Display", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--page); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
/* Copy is filled in from brand.config.js; hidden until then so there's no flash of empty text. */
html:not(.ready) .hero, html:not(.ready) main, html:not(.ready) footer { visibility: hidden; }
a { color: var(--primary); }
h1, h2 { font-family: var(--display); font-optical-sizing: auto; font-variation-settings: "opsz" 32; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Hero: diagonal gradient over the top ~45% of the screen. The light end sits bottom-right, mostly under the card, so the
   white text stays above WCAG AA contrast (4.5:1+). */
.hero {
  min-height: 45vh; min-height: 45svh;
  background: linear-gradient(160deg, var(--grad-start) 0%, var(--grad-start) 50%, var(--grad-end) 100%);
  color: #fff; padding: 16px 16px 104px;
}
.topbar { max-width: 1120px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo-img { display: block; height: 40px; width: auto; max-width: 52vw; object-fit: contain; object-position: left center; }
.pill { background: var(--accent); color: #0E1A33; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; padding: 7px 12px; border-radius: 999px; white-space: nowrap; }
.hero-copy { max-width: 640px; margin: 28px auto 0; }
h1 { margin: 0; font-size: clamp(30px, 8.4vw, 52px); line-height: 1.08; letter-spacing: -0.035em; }
h1 .light, h1 .bold { display: block; }
h1 .light { font-weight: 300; }
h1 .bold { font-weight: 700; }
.subline { margin: 12px 0 0; font-size: 18px; line-height: 1.45; color: #fff; max-width: 34em; }

/* Buttons */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 56px; padding: 14px 24px; border: none; border-radius: 999px; background: var(--primary); color: #fff; font-size: 18px; font-weight: 600; cursor: pointer; text-decoration: none; transition: filter 150ms, transform 100ms; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(0.99); }
.btn[disabled] { opacity: 0.7; cursor: progress; }
.btn-hero { margin-top: 20px; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.55), 0 10px 24px rgba(14, 26, 51, 0.25); }

/* Quiz card, overlapping the bottom of the gradient */
main { padding: 0 16px; }
.card { position: relative; max-width: 640px; margin: -80px auto 0; background: #fff; border-radius: 28px; box-shadow: 0 20px 50px rgba(14, 26, 51, 0.12); padding: 24px 18px 26px; outline: none; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; }
.step-label { font-size: 13px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--primary); }
.back { background: none; border: none; color: var(--primary); font-size: 16px; font-weight: 600; cursor: pointer; min-height: 48px; min-width: 48px; padding: 0 0 0 8px; display: inline-flex; align-items: center; gap: 4px; }
.progress { height: 8px; border-radius: 999px; background: var(--track); overflow: hidden; margin: 4px 0 20px; }
.progress > div { height: 100%; border-radius: 999px; background: var(--primary); transition: width 350ms cubic-bezier(0.16, 1, 0.3, 1); }
.question { margin: 0 0 18px; font-size: clamp(26px, 6.6vw, 30px); line-height: 1.2; letter-spacing: -0.025em; font-weight: 600; color: var(--ink); }
.answers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.answers.one { grid-template-columns: 1fr; }
.answer { min-height: 64px; padding: 12px 16px; border: 2px solid var(--line); border-radius: 16px; background: #fff; color: var(--ink); font-size: 17px; font-weight: 500; line-height: 1.3; text-align: left; cursor: pointer; transition: border-color 150ms, background 150ms; }
.answer:hover { border-color: var(--primary); }
.answer[aria-pressed="true"] { border: 3px solid var(--primary); padding: 11px 15px; background: var(--selected); }

/* Contact step */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 16px; font-weight: 600; }
.field input { width: 100%; min-height: 56px; padding: 12px 16px; border: 2px solid var(--line); border-radius: 16px; font: inherit; font-size: 18px; color: var(--ink); background: #fff; }
.field input:focus { outline: none; border-color: var(--primary); }
.field input[aria-invalid="true"], .consent[data-invalid="true"] { border-color: var(--error); }
.err { color: var(--error); font-size: 15px; }
.consent { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 2px solid var(--line); border-radius: 16px; background: var(--selected); cursor: pointer; font-size: 15px; line-height: 1.5; }
.consent input { width: 24px; height: 24px; margin: 1px 0 0; flex-shrink: 0; accent-color: var(--primary); cursor: pointer; }

/* Thank-you */
.thanks { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding: 12px 0 4px; }
.thanks .done { width: 72px; height: 72px; border-radius: 50%; background: var(--primary); display: grid; place-items: center; }
.thanks h2 { margin: 0; font-size: clamp(26px, 6.6vw, 30px); line-height: 1.2; letter-spacing: -0.025em; font-weight: 600; }
.thanks p { margin: 0 0 6px; color: var(--muted); font-size: 18px; }

/* Ticks row */
.ticks { list-style: none; max-width: 640px; margin: 20px auto 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; }
.ticks li { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; color: var(--ink); }
.ticks .tick { width: 22px; height: 22px; border-radius: 50%; background: var(--primary); display: grid; place-items: center; flex-shrink: 0; }

footer { max-width: 640px; margin: 0 auto; padding: 28px 20px 40px; color: var(--muted); font-size: 13px; line-height: 1.55; }
footer p { margin: 0 0 8px; }
footer a { color: var(--muted); display: inline-flex; min-height: 48px; align-items: center; }

/* Cookie choice: a bar at the bottom, never blocks the quiz */
.cookie { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 10; max-width: 640px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 -4px 28px rgba(14, 26, 51, 0.14); padding: 14px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; font-size: 14px; }
.cookie[hidden] { display: none; }
.cookie p { margin: 0; flex: 1 1 260px; color: var(--ink); }
.cookie-btns { display: flex; gap: 8px; flex: 0 0 auto; }
.btn-ghost { min-height: 48px; padding: 0 20px; border-radius: 999px; border: 2px solid var(--primary); background: #fff; color: var(--primary); font-weight: 600; cursor: pointer; }
.btn-solid { background: var(--primary); color: #fff; }

.preview-badge { position: fixed; top: 8px; left: 50%; transform: translateX(-50%); z-index: 20; background: var(--error); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }

@media (max-width: 400px) {
      .pill { font-size: 11px; padding: 6px 10px; letter-spacing: 0.04em; }
}
@media (min-width: 768px) {
  .hero { padding: 24px 32px 120px; }
  .hero-copy { margin-top: 44px; }
  .card { padding: 32px 36px 34px; margin-top: -88px; }
  .answer { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
