/* De Rekenklas: a page from a maths notebook. Squared paper, ink, one highlighter. */

@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Next";
  src: url("/fonts/atkinson.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Caveat";
  src: url("/fonts/caveat.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --paper: #faf6ec;
  --paper-2: #fffdf7;
  --ink: #19202e;
  --ink-2: #4a5263;
  --line: rgba(25, 32, 46, 0.16);
  --grid: rgba(25, 32, 46, 0.065);
  --accent: #ffd23f;
  --accent-soft: #fff1b8;
  --error: #b42318;
  --radius: 14px;
  --cell: 24px;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Atkinson Next", "Helvetica Neue", Helvetica, sans-serif;
  --hand: "Caveat", "Comic Sans MS", cursive;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: var(--cell) var(--cell);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--display);
  font-variation-settings: "SOFT" 100, "WONK" 0;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h2 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.1rem); }
h3 { font-size: 1.4rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; max-width: 62ch; text-wrap: pretty; }
a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }

.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 20px; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 50;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 10px;
}
.skip:focus { top: 12px; }

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

/* Top bar */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(250, 246, 236, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.top__inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.top__nav { display: flex; align-items: center; gap: 22px; font-size: 1rem; }
.top__nav a:not(.btn) { text-decoration: none; }
.top__nav a:not(.btn):hover { text-decoration: underline; }
@media (max-width: 680px) { .top__nav a:not(.btn) { display: none; } }

.logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 650; font-size: 1.3rem; letter-spacing: -0.02em;
  text-decoration: none; margin: 0;
}
.logo__mark { width: 30px; height: 30px; flex: none; }
.logo__mark rect { fill: var(--accent); stroke: var(--ink); stroke-width: 2.2; }
.logo__mark path { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; fill: none; }

/* Buttons: one shape everywhere (12px radius) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 24px;
  font: 600 1.05rem/1 var(--body);
  color: var(--paper); background: var(--ink);
  border: 2px solid var(--ink); border-radius: 12px;
  text-decoration: none; cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 0 var(--accent); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn[disabled] { opacity: 0.6; cursor: progress; transform: none; box-shadow: none; }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--paper-2); }
.btn--small { min-height: 42px; padding: 0 16px; font-size: 0.98rem; }
.btn--full { width: 100%; }

/* Hero */
.hero { padding: clamp(40px, 7vw, 96px) 0 clamp(48px, 7vw, 88px); }
.hero__grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 920px) { .hero__grid { grid-template-columns: 1.4fr 1fr; gap: 72px; } }

h1 {
  font-size: clamp(2.6rem, 1.2rem + 5.6vw, 5.1rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin-bottom: 0.45em;
}
.lead { font-size: clamp(1.15rem, 1rem + 0.5vw, 1.32rem); color: var(--ink-2); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 18px; }
.fineprint { font-size: 0.98rem; color: var(--ink-2); }

.mark {
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position: 0 86%;
  background-size: 100% 0.4em;
  padding: 0 0.06em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Index card */
.card {
  position: relative;
  background: var(--paper-2);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 28px 28px 30px;
  box-shadow: 0 22px 44px -26px rgba(25, 32, 46, 0.45);
  max-width: 440px;
}
.card--tilt { transform: rotate(1.4deg); justify-self: center; width: 100%; }
.card__big { font-family: var(--display); font-weight: 650; font-size: 2.6rem; line-height: 1; letter-spacing: -0.03em; margin: 0 0 6px; }
.card__sub { color: var(--ink-2); margin-bottom: 18px; }
.card__list { margin: 0; display: grid; gap: 0; }
.card__list div { display: grid; grid-template-columns: 74px 1fr; gap: 12px; padding: 12px 0; border-top: 1.5px dashed var(--line); }
.card__list dt { font-weight: 700; font-size: 0.95rem; color: var(--ink-2); padding-top: 2px; }
.card__list dd { margin: 0; font-weight: 600; }
.hand {
  font-family: var(--hand); font-weight: 600; font-size: 2.1rem; line-height: 1;
  color: var(--ink-2); margin: 16px 0 0; transform: rotate(-3deg); transform-origin: left;
}

/* Facts strip */
.facts { border-block: 1px solid var(--line); background: var(--paper-2); }
.facts__list {
  list-style: none; margin: 0 auto; padding-block: 8px;
  display: grid; grid-template-columns: repeat(2, 1fr);
}
.facts__list li { padding: 18px 16px 18px 0; display: grid; gap: 2px; align-content: start; }
.facts__list li:nth-child(2n) { padding-left: 16px; border-left: 1px solid var(--line); }
.facts__list strong { font-family: var(--display); font-weight: 650; font-size: 1.55rem; letter-spacing: -0.02em; line-height: 1.15; }
.facts__list span { font-size: 0.98rem; color: var(--ink-2); line-height: 1.4; }
@media (min-width: 860px) {
  .facts__list { grid-template-columns: repeat(4, 1fr); }
  .facts__list li { padding: 26px 22px; border-left: 1px solid var(--line); }
  .facts__list li:first-child { border-left: 0; padding-left: 0; }
}

/* Sections */
.section { padding-block: clamp(64px, 9vw, 120px); }
.section--paper { background: var(--paper-2); border-block: 1px solid var(--line); }

.split { display: grid; gap: 40px; }
@media (min-width: 920px) {
  .split { grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; }
  .split--narrow { grid-template-columns: 0.9fr 1.1fr; }
}

/* Steps */
.steps { list-style: none; counter-reset: step; margin: 40px 0 0; padding: 0; display: grid; gap: 36px; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 44px; } }
.steps li { counter-increment: step; position: relative; padding-top: 86px; }
.steps li::before {
  content: counter(step);
  position: absolute; top: 0; left: 0;
  width: 64px; height: 64px; display: grid; place-items: center;
  font-family: var(--display); font-weight: 650; font-size: 2.3rem; line-height: 1;
  background: var(--accent); border: 2px solid var(--ink); border-radius: 12px;
}
.steps p { color: var(--ink-2); }

/* Lesson list: lines like a notebook */
.lessons { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.lessons li {
  display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: baseline;
  padding: 14px 0; border-bottom: 1.5px dashed var(--line); font-weight: 600;
}
.lessons span { font-family: var(--display); font-style: italic; font-weight: 500; color: var(--ink-2); }

/* Checks */
.checks { list-style: none; margin: 0 0 1.2em; padding: 0; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 34px; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 0.3em;
  width: 20px; height: 20px; border-radius: 6px;
  background: var(--accent); border: 2px solid var(--ink);
}
.checks li::after {
  content: ""; position: absolute; left: 7px; top: calc(0.3em + 3px);
  width: 6px; height: 10px; border: solid var(--ink); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}

/* Price */
.price {
  background: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: var(--cell) var(--cell);
  border: 2px solid var(--ink); border-radius: var(--radius);
  padding: 32px;
}
.price__title { font-size: 1.6rem; }
.price__big { font-family: var(--display); font-weight: 650; font-size: clamp(3.6rem, 2.6rem + 3vw, 5rem); line-height: 1; letter-spacing: -0.04em; margin: 0 0 20px; }
.price__big span { font-size: 1.3rem; letter-spacing: 0; font-weight: 500; color: var(--ink-2); }
.price__list { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; }
.price__list li::marker { color: var(--ink-2); }

/* Forms */
.form-wrap { display: grid; gap: 40px; }
@media (min-width: 920px) {
  .form-wrap { grid-template-columns: 0.85fr 1.15fr; gap: 72px; align-items: start; }
  .form-intro { position: sticky; top: 104px; }
}
.form-intro p { color: var(--ink-2); }

.form {
  background: var(--paper-2);
  border: 2px solid var(--ink); border-radius: var(--radius);
  padding: clamp(20px, 4vw, 34px);
  display: grid; grid-template-columns: 1fr; gap: 18px;
  box-shadow: 0 22px 44px -30px rgba(25, 32, 46, 0.45);
}
.section--paper .form { background: var(--paper); }
@media (min-width: 640px) {
  .form { grid-template-columns: 1fr 1fr; column-gap: 16px; }
  .form > * { grid-column: 1 / -1; }
  .form > .field--half { grid-column: auto; }
}
.field { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field label, .field legend { font-weight: 700; font-size: 1rem; padding: 0; }
.opt { font-weight: 400; color: var(--ink-2); }
input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%; min-height: 50px;
  font: 400 1.05rem/1.4 var(--body); color: var(--ink);
  background: #fff; border: 1.5px solid rgba(25, 32, 46, 0.38); border-radius: 10px;
  padding: 12px 14px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
textarea { resize: vertical; min-height: 96px; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 22px) 52%, calc(100% - 16px) 52%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
input::placeholder, textarea::placeholder { color: #8a909c; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px var(--accent); }
.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choices label {
  display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 16px;
  font-weight: 600; background: #fff; border: 1.5px solid rgba(25, 32, 46, 0.38); border-radius: 10px; cursor: pointer;
}
.choices label:has(input:checked) { border-color: var(--ink); background: var(--accent-soft); }
input[type="radio"], input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--ink); margin: 0; flex: none; }
.consent { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; font-size: 0.98rem; color: var(--ink-2); }
.consent input { margin-top: 3px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__status { margin: 0; font-weight: 600; min-height: 0; }
.form__status:empty { display: none; }
.form__status.is-error { color: var(--error); }
.done { padding: 8px 0; }
.done:focus { outline: none; }
.done__title { font-family: var(--display); font-weight: 650; font-size: 2rem; line-height: 1.1; margin-bottom: 10px; }

/* FAQ */
.faq { max-width: 820px; }
.faq details { border-top: 1.5px dashed var(--line); }
.faq details:last-of-type { border-bottom: 1.5px dashed var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 44px 20px 0; position: relative;
  font-family: var(--display); font-weight: 600; font-size: 1.3rem; line-height: 1.32;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; display: grid; place-items: center; font-family: var(--body); font-size: 1.3rem;
  border: 2px solid var(--ink); border-radius: 8px; transition: transform 200ms ease, background-color 200ms ease;
}
.faq details[open] summary::after { content: "−"; background: var(--accent); }
.faq details p { color: var(--ink-2); padding-bottom: 12px; }

/* Footer */
.foot { background: var(--ink); color: var(--paper); padding: 64px 0 28px; }
.foot__grid { display: grid; gap: 40px; }
@media (min-width: 860px) { .foot__grid { grid-template-columns: 0.8fr 1.2fr; gap: 72px; } }
.foot p { color: rgba(250, 246, 236, 0.78); font-size: 1rem; }
.logo--foot { color: var(--paper); margin-bottom: 12px; }
.privacy h2 { font-size: 1.5rem; color: var(--paper); }
.privacy a { color: var(--paper); }
.foot__copy { margin-top: 32px; padding-top: 20px; border-top: 1px solid rgba(250, 246, 236, 0.16); font-size: 0.92rem; max-width: none; }

/* Motion: one load sequence, a highlighter swipe. Off when people ask for less motion. */
@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: rise 700ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero__text .reveal:nth-child(1) { animation-delay: 40ms; }
  .hero__text .reveal:nth-child(2) { animation-delay: 160ms; }
  .hero__text .reveal:nth-child(3) { animation-delay: 260ms; }
  .hero__text .reveal:nth-child(4) { animation-delay: 340ms; }
  .card.reveal { animation-name: rise-tilt; animation-delay: 300ms; animation-duration: 900ms; }
  .mark { animation: swipe 900ms 650ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes rise-tilt { from { opacity: 0; transform: translateY(18px) rotate(4deg); } to { opacity: 1; transform: rotate(1.4deg); } }
@keyframes swipe { from { background-size: 0% 0.4em; } to { background-size: 100% 0.4em; } }

@media print {
  body { background: #fff; }
  .top, .form, .hero__cta { display: none; }
}
