/* Montserrat, het huisstijlfont van Topicus. SIL Open Font License 1.1. */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/montserrat-latin.woff2') format('woff2');
}

/* Kleuren uit de huisstijl van topicus.nl. Elke tekstcombinatie haalt minimaal 7:1 (WCAG AAA). */
:root {
  --darkblue: #242f36;
  --yellow: #f8e800;
  --white: #fff;
  --lightgrey: #f6f8fa;
  --line: #eaedf0;
  --muted: #4a5560;      /* 7,6:1 op wit, 7,2:1 op lichtgrijs */
  --coral-soft: #ffd9cc; /* onderwijsaccent (#ff9774) licht gemaakt, zodat donkerblauwe tekst erop 7:1 haalt */
  --coral: #ff9774;
  --error: #a3001b;      /* 8,2:1 op wit */
  --mono: ui-monospace, 'SFMono-Regular', 'Cascadia Mono', Menlo, Consolas, monospace;

  --focus: var(--darkblue);
  color-scheme: light;
}

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

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

body {
  margin: 0;
  font-family: Montserrat, system-ui, sans-serif;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--darkblue);
  background: var(--white);
}

h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }

h1, h2, h3 { line-height: 1.2; font-weight: 800; text-wrap: balance; }
h2 { font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem); margin-bottom: 1.5rem; }
h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: .5rem; }

p, li, dd { max-width: 65ch; }
p + p { margin-top: 1.5em; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 3px; }
/* Losse links (niet midden in een zin) krijgen een klikdoel van minimaal 44px hoog. */
.link-block { display: inline-flex; align-items: center; min-height: 2.75rem; }

/* Focus: altijd zichtbaar, minimaal 3px en ruim 7:1 tegen de achtergrond. */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
:focus:not(:focus-visible) { outline: none; }
[tabindex="-1"]:focus { outline: none; }

.sprite { display: none; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: 76rem;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}

.icon { width: 1.25em; height: 1.25em; flex: none; }

/* ---------- Skiplink ---------- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -100vh;
  z-index: 10;
  padding: .75rem 1.25rem;
  background: var(--yellow);
  color: var(--darkblue);
  font-weight: 700;
}
.skip-link:focus { top: 1rem; outline: 3px solid var(--darkblue); outline-offset: 0; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--line); }
.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 2rem;
  padding-block: 1.25rem;
}
.logo { display: block; height: 2.25rem; width: auto; aspect-ratio: 425 / 100; color: var(--darkblue); }
.site-header__product { font-weight: 700; }
.site-header__product::before {
  content: '';
  display: inline-block;
  width: .75rem; height: .75rem;
  margin-right: .625rem;
  background: var(--coral);
}

/* ---------- Testbanner (alleen zolang de stub draait) ---------- */
.test-banner { background: var(--coral-soft); padding-block: .75rem; }
.test-banner p { max-width: none; }

.code-inline, .input--code, .invite__code {
  font-family: var(--mono);
  letter-spacing: .06em;
}
.code-inline { font-weight: 700; white-space: nowrap; }

.btn-text {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 .25rem;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: .2em;
  cursor: pointer;
}
.btn-text:hover { text-decoration-thickness: 3px; }

/* ---------- Hero ---------- */
.hero {
  --focus: var(--yellow);
  background: var(--darkblue);
  color: var(--white);
  padding-block: clamp(2.5rem, 7vw, 6rem);
}
.hero__inner { display: grid; gap: clamp(2.5rem, 5vw, 4.5rem); align-items: start; }
@media (min-width: 64rem) {
  .hero__inner { grid-template-columns: 1fr minmax(0, 33rem); }
}

.eyebrow { color: var(--coral-soft); font-weight: 700; margin-bottom: 1rem; }
.hero h1 {
  font-size: clamp(2.25rem, 1.4rem + 3.6vw, 4.25rem);
  line-height: 1.1;
  margin-bottom: 2rem;
}
.hero h1::after {
  content: '';
  display: block;
  width: 5rem; height: .5rem;
  margin-top: 1.5rem;
  background: var(--yellow);
}
.highlight { color: var(--yellow); }
.lead { font-size: 1.25rem; color: var(--line); }

.checklist { list-style: none; padding: 0; margin-top: 2rem; display: grid; gap: .75rem; }
.checklist li { display: flex; gap: .875rem; align-items: baseline; font-weight: 600; }
.checklist li::before {
  content: '';
  flex: none;
  width: .75rem; height: .75rem;
  background: var(--yellow);
  transform: translateY(-.1em);
}

/* ---------- Kaart met formulier en resultaat ---------- */
.card {
  --focus: var(--darkblue);
  background: var(--white);
  color: var(--darkblue);
  border-top: .5rem solid var(--yellow);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: 0 1.5rem 3rem rgb(0 0 0 / .25);
}
.card h2 { font-size: clamp(1.5rem, 1.3rem + .8vw, 2rem); margin-bottom: .75rem; }
.card h3 { margin-top: 2rem; }
.card__intro { margin-bottom: 1.75rem; }

.field { margin-bottom: 1.75rem; }
.field label { display: block; font-weight: 700; margin-bottom: .25rem; }
.hint { color: var(--muted); font-size: 1rem; margin-bottom: .5rem; }
.field__error { color: var(--error); font-weight: 700; margin-bottom: .5rem; }
.field p + p { margin-top: 0; }
.field--error { border-left: .3rem solid var(--error); padding-left: 1rem; }

.input {
  display: block;
  width: 100%;
  min-height: 3.25rem;
  padding: .75rem 1rem;
  border: 2px solid var(--darkblue);
  border-radius: 0;
  background: var(--white);
  color: var(--darkblue);
  font: inherit;
}
.input:focus-visible { outline-offset: 0; box-shadow: inset 0 0 0 2px var(--darkblue); }
.input--code { text-transform: uppercase; font-size: 1.25rem; }
.input[aria-invalid='true'] { border-color: var(--error); border-width: 3px; }

.error-summary {
  border: 4px solid var(--error);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.75rem;
}
.error-summary:focus { outline: 3px solid var(--darkblue); outline-offset: 3px; }
.error-summary h3 { margin: 0 0 .75rem; color: var(--error); }
.error-summary ul { padding-left: 1.25rem; display: grid; }
.error-summary a { display: inline-block; padding-block: .5rem; color: var(--error); font-weight: 700; }

/* ---------- Knoppen (minimaal 44 bij 44 pixels) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  min-height: 3.25rem;
  padding: .75rem 1.5rem;
  border: 2px solid transparent;
  border-radius: 0;
  font: inherit;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease-in, color .15s ease-in;
}
.btn--primary { background: var(--yellow); color: var(--darkblue); border-color: var(--darkblue); width: 100%; }
.btn--primary:hover { background: var(--darkblue); color: var(--yellow); }
.btn--primary[aria-disabled='true'] { cursor: progress; }
.btn--secondary,
.btn--small { background: var(--white); color: var(--darkblue); border-color: var(--darkblue); }
.btn--secondary:hover,
.btn--small:hover { background: var(--darkblue); color: var(--white); }
.btn--small { min-height: 2.75rem; padding: .375rem 1rem; gap: .5rem; font-size: 1rem; }
.btn--secondary { margin-top: 1.75rem; }

/* ---------- Invitecodes ---------- */
.invites { list-style: none; padding: 0; margin-block: 1.25rem; display: grid; gap: .75rem; }
.invite {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1rem;
  padding: 1rem 1.25rem;
  background: var(--lightgrey);
  border-left: .375rem solid var(--yellow);
}
.invite__code { font-size: clamp(1.125rem, 1rem + .6vw, 1.375rem); font-weight: 700; overflow-wrap: anywhere; }
.invite__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.invite [data-copied] { background: var(--darkblue); color: var(--white); }

/* ---------- Secties ---------- */
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section--grey { background: var(--lightgrey); }

.steps {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
}
.steps { counter-reset: stap; }
.steps li { counter-increment: stap; }
.steps li::before {
  content: counter(stap);
  display: grid;
  place-items: center;
  width: 3rem; height: 3rem;
  margin-bottom: 1.25rem;
  background: var(--yellow);
  font-size: 1.5rem;
  font-weight: 800;
}

/* Wel en niet: de tekst in de koppen zegt het, kleur en icoon zijn alleen ondersteuning. */
.purpose { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); }
.purpose__col { padding: clamp(1.5rem, 4vw, 2.5rem); border-top: .5rem solid; }
.purpose__col--yes { background: var(--lightgrey); border-color: var(--yellow); }
.purpose__col--no { background: var(--coral-soft); border-color: var(--darkblue); }
.purpose__col h3 { display: flex; align-items: center; gap: .875rem; font-size: 1.375rem; margin-bottom: 1.25rem; }
.purpose__icon { display: grid; place-items: center; flex: none; width: 2.5rem; height: 2.5rem; }
.purpose__col--yes .purpose__icon { background: var(--yellow); color: var(--darkblue); }
.purpose__col--no .purpose__icon { background: var(--darkblue); color: var(--white); }
.purpose__list { list-style: none; padding: 0; display: grid; gap: 1.25rem; }
.purpose strong { display: block; }

.glossary { display: grid; gap: 1.5rem 3rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.glossary dt { font-weight: 700; font-size: 1.25rem; }
.glossary dd { margin-top: .25rem; }

.faq { max-width: 50rem; border-top: 2px solid var(--darkblue); }
.faq details { border-bottom: 2px solid var(--darkblue); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 3.5rem;
  padding-block: .75rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  flex: none;
  display: grid;
  place-items: center;
  width: 2rem; height: 2rem;
  background: var(--yellow);
  font-size: 1.5rem;
  line-height: 1;
}
.faq details[open] summary::after { content: '−'; }
.faq summary:hover { text-decoration: underline; text-underline-offset: .2em; }
.faq details > p { padding-bottom: 1.25rem; }
.faq details > p + p { margin-top: 0; padding-top: 0; }

/* ---------- Footer ---------- */
.site-footer {
  --focus: var(--yellow);
  background: var(--darkblue);
  color: var(--white);
  padding-block: 3rem;
}
.site-footer__inner { display: grid; gap: 1rem; }
.site-footer .logo { color: var(--white); height: 2rem; margin-bottom: .5rem; }
.site-footer p + p { margin-top: 0; }
.site-footer__a11y { color: var(--line); font-size: 1rem; }

/* ---------- Voorkeuren van de bezoeker ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media (forced-colors: active) {
  .btn, .invite, .card, .purpose__col { border: 2px solid ButtonText; }
  .checklist li::before, .steps li::before, .site-header__product::before, .purpose__icon { forced-color-adjust: none; background: CanvasText; color: Canvas; }
  :focus-visible { outline-color: Highlight; }
}
