:root {
  --navy: #0f1535;
  --navy-light: #1b2456;
  --bg: #f4f6fb;
  --card: #ffffff;
  --ink: #161b33;
  --ink-soft: #5b6280;
  --border: #dde2f0;
  --gold: #f5b400;
  --gold-dark: #c98f00;
  --blue: #3b6ef5;
  --blue-dark: #2748b0;
  --coral: #ff6b4a;
  --coral-dark: #d94e2d;
  --green: #1f9d63;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@keyframes clsFloat { 0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); } 50% { transform: translateY(-8px) rotate(var(--r, 0deg)); } }
@keyframes clsWiggle { 0%, 100% { transform: rotate(var(--r, -8deg)); } 50% { transform: rotate(calc(var(--r, -8deg) * -1)); } }
@keyframes clsPop { 0% { transform: scale(.6) rotate(var(--r, -8deg)); opacity: 0; } 60% { transform: scale(1.08) rotate(var(--r, -8deg)); } 100% { transform: scale(1) rotate(var(--r, -8deg)); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .hero-scatter .chip, .sticker, .mode-card .badge, .tile { animation: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: "Space Grotesk", "Inter", Arial, sans-serif; font-weight: 700; margin: 0; text-wrap: balance; }
p { margin: 0 0 12px; }
a { color: var(--blue-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 760px; margin: 0 auto; padding: 0 24px; }

/* ---------- nav ---------- */
.top-nav { background: var(--navy); border-bottom: 3px solid var(--gold); }
.top-nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; flex-wrap: wrap; gap: 12px; }
.logo { color: #fff; font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 17px; display: flex; align-items: center; gap: 14px; }
.logo:hover { text-decoration: none; opacity: .9; }
.logo-mark { position: relative; width: 34px; height: 30px; flex-shrink: 0; }
.logo-mark .lm-tile {
  position: absolute; width: 22px; height: 22px; border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; box-shadow: 1.5px 1.5px 0 rgba(0,0,0,.35);
  border: 1px solid rgba(0,0,0,.2);
}
.logo-mark .lm-num { background: var(--coral); color: #fff; top: 0; left: 0; transform: rotate(-9deg); z-index: 1; }
.logo-mark .lm-letter { background: var(--gold); color: var(--navy); bottom: 0; right: 0; transform: rotate(7deg); z-index: 2; }
.nav-links { display: flex; gap: 22px; flex-wrap: wrap; }
.nav-links a { color: #cfd4ea; font-size: 14.5px; font-weight: 500; padding: 6px 2px; border-bottom: 2px solid transparent; }
.nav-links a:hover { color: #fff; text-decoration: none; }
.nav-links a.active { color: #fff; border-bottom-color: var(--gold); }

/* ---------- footer ---------- */
footer { background: var(--navy); color: #b7bede; text-align: center; padding: 32px 24px; margin-top: 60px; }
.footer-inner a { color: #d8dcf0; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 900px 500px at 50% -10%, rgba(245,180,0,.22), transparent 60%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-light) 100%);
  color: #fff; padding: 64px 24px 72px; text-align: center;
}
.hero::before, .hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-repeat: no-repeat;
  opacity: .5;
}
.hero::before {
  background-image:
    repeating-linear-gradient(115deg, rgba(255,255,255,.035) 0 2px, transparent 2px 60px);
}
.hero-scatter { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hero-scatter .chip {
  position: absolute; font-family: "Space Grotesk", sans-serif; font-weight: 700;
  color: rgba(255,255,255,.85); background: rgba(255,255,255,.06);
  border: 1.5px solid rgba(255,255,255,.14); border-radius: 8px;
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; font-size: 17px;
  animation: clsFloat 5s ease-in-out infinite; animation-delay: var(--d, 0s);
}

/* ---------- sticker badge (playful pinned label) ---------- */
.sticker {
  position: absolute; display: inline-flex; align-items: center; gap: 6px;
  background: var(--coral); color: #fff; font-family: "Space Grotesk", sans-serif;
  font-weight: 700; font-size: 12.5px; letter-spacing: .02em; padding: 8px 16px;
  border-radius: 999px; border: 2px solid rgba(255,255,255,.9);
  box-shadow: 0 6px 14px rgba(0,0,0,.28); transform: rotate(var(--r, -8deg));
  animation: clsWiggle 3.4s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}
.sticker.gold { background: var(--gold); color: var(--navy); }
.sticker.blue { background: var(--blue); color: #fff; }
.hero .eyebrow { position: relative; display: inline-block; background: rgba(245,180,0,.15); color: var(--gold); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 6px 14px; border-radius: 999px; margin-bottom: 22px; }
.hero h1 { position: relative; font-size: 44px; color: #fff; letter-spacing: -.01em; }
.hero p.lead { position: relative; font-size: 17.5px; color: #cfd4ea; max-width: 580px; margin: 16px auto 0; line-height: 1.6; }
@media (max-width: 640px) { .hero h1 { font-size: 30px; } .hero-scatter { display: none; } .hero .sticker { display: none; } }

/* ---------- tile marquee (logotype made of real tiles) ---------- */
.tile-marquee { position: relative; display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-bottom: 26px; }
.tile-marquee .m-tile {
  width: 40px; height: 40px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 19px; color: var(--navy);
  background: var(--gold); box-shadow: 2px 2px 0 rgba(0,0,0,.35);
  transform: rotate(var(--r, 0deg));
}
.tile-marquee .m-tile.gap { background: transparent; box-shadow: none; width: 14px; }
@media (max-width: 560px) { .tile-marquee .m-tile { width: 28px; height: 28px; font-size: 14px; } .tile-marquee .m-tile.gap { width: 8px; } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 26px; border-radius: 10px; font-weight: 700; font-size: 15px; border: 2px solid var(--ink); cursor: pointer; font-family: inherit; text-decoration: none; transition: transform .1s; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-gold { background: var(--gold); color: var(--navy); border-color: #7a5800; }
.btn-blue { background: var(--blue); color: #fff; border-color: var(--blue-dark); }
.btn-coral { background: var(--coral); color: #fff; border-color: var(--coral-dark); }
.btn-outline { background: #fff; color: var(--ink); border-color: var(--border); }
.btn-outline:hover { border-color: var(--ink); }
.op-btn.selected { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------- game mode cards ---------- */
.mode-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px 22px; margin-top: 6px; padding: 0 24px 44px; max-width: 1080px; margin-left: auto; margin-right: auto; position: relative; }
@media (max-width: 820px) { .mode-grid { grid-template-columns: 1fr; margin-top: 20px; } .mode-card { transform: none !important; } }
.mode-card {
  position: relative; background: var(--card); border: 1.5px solid var(--border); border-radius: 16px;
  padding: 30px 24px 26px; box-shadow: 0 10px 26px rgba(15,21,53,.14); text-align: center;
  transform: rotate(var(--tilt, 0deg));
  transition: transform .15s;
}
.mode-card:hover { transform: rotate(0deg) translateY(-3px); }
.mode-card:nth-child(1) { --tilt: -1.4deg; }
.mode-card:nth-child(2) { --tilt: 0deg; margin-top: -10px; }
.mode-card:nth-child(3) { --tilt: 1.4deg; }
.mode-card .badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%) rotate(-4deg);
  font-family: "Space Grotesk", sans-serif; font-size: 11px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; padding: 5px 12px; border-radius: 999px; color: #fff;
  box-shadow: 0 3px 8px rgba(0,0,0,.2);
}
.mode-card.letters .badge { background: var(--blue-dark); }
.mode-card.cijfers .badge { background: var(--coral-dark); }
.mode-card.ronde .badge { background: var(--gold-dark); }
.mode-card .icon { font-size: 32px; display: block; margin-bottom: 8px; }
.mode-card h2 { font-size: 20px; margin-bottom: 8px; }
.mode-card p { color: var(--ink-soft); font-size: 14.5px; min-height: 44px; }

/* ---------- tiles (letters & cijfers) ---------- */
.tile-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 28px 0; }
.tile {
  width: 58px; height: 58px; border-radius: 10px;
  background: var(--card); border: 2px solid var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 26px;
  color: var(--ink); box-shadow: 3px 3px 0 rgba(0,0,0,.18);
  text-transform: uppercase; user-select: none;
}
.tile.letters { border-color: var(--blue-dark); color: var(--blue-dark); }
.tile.cijfers { border-color: var(--coral-dark); color: var(--coral-dark); width: 70px; }
.tile.used { background: var(--gold); color: var(--navy); border-color: var(--gold-dark); box-shadow: 1px 1px 0 rgba(0,0,0,.18); transform: translateY(2px); }
@media (max-width: 480px) { .tile { width: 46px; height: 46px; font-size: 20px; } .tile.cijfers { width: 56px; } }

/* ---------- timer ---------- */
.timer-wrap { display: flex; justify-content: center; margin: 6px 0 20px; }
.timer { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 44px; color: var(--navy); background: var(--card); border: 3px solid var(--ink); border-radius: 14px; padding: 6px 30px; min-width: 130px; text-align: center; }
.timer.laag { color: var(--coral-dark); border-color: var(--coral-dark); }

/* ---------- game panel ---------- */
.game-panel { background: var(--card); border: 1.5px solid var(--border); border-radius: 16px; padding: 32px 28px; box-shadow: 0 10px 30px rgba(15,21,53,.08); text-align: center; max-width: 640px; margin: 0 auto; }
.game-input { width: 100%; max-width: 320px; padding: 14px 18px; font-size: 20px; text-align: center; border: 2px solid var(--border); border-radius: 10px; font-family: "Space Grotesk", sans-serif; text-transform: lowercase; }
.game-input:focus { outline: none; border-color: var(--blue); }

.calc-history { display: flex; flex-direction: column; gap: 6px; margin: 18px 0; font-family: "Space Grotesk", sans-serif; font-size: 15px; color: var(--ink-soft); }
.calc-history span { background: var(--bg); border-radius: 8px; padding: 6px 12px; }

.result-banner { border-radius: 12px; padding: 18px 20px; margin: 20px 0; font-size: 15px; }
.result-banner.goed { background: #e6f6ee; color: var(--green); border: 1.5px solid #b6e5ca; }
.result-banner.fout { background: #fdeeea; color: var(--coral-dark); border: 1.5px solid #f7cdbf; }

/* ---------- content sections ---------- */
.section { padding: 48px 24px; }
.section h2 { font-size: 26px; margin-bottom: 16px; }
.card { background: var(--card); border: 1.5px solid var(--border); border-radius: 14px; padding: 24px 26px; }
.step-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 20px; }
@media (max-width: 760px) { .step-grid { grid-template-columns: 1fr; } }
.step-card { background: var(--card); border: 1.5px solid var(--border); border-radius: 12px; padding: 20px; transition: transform .15s, box-shadow .15s; }
.step-card:hover { transform: translateY(-4px) rotate(-.6deg); box-shadow: 0 10px 20px rgba(15,21,53,.12); }
.step-num { width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: var(--gold); display: flex; align-items: center; justify-content: center; font-weight: 700; font-family: "Space Grotesk", sans-serif; margin-bottom: 10px; }

/* ---------- fun-fact box (playful "wist je dat" callout) ---------- */
.fact-box {
  position: relative; background: #fff7e6; border: 2px dashed var(--gold-dark); border-radius: 14px;
  padding: 20px 22px; margin: 28px 0; display: flex; gap: 14px; align-items: flex-start;
}
.fact-box .fact-icon {
  font-size: 24px; flex-shrink: 0; background: var(--gold); width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; transform: rotate(-6deg);
  box-shadow: 2px 2px 0 rgba(0,0,0,.18);
}
.fact-box p { margin: 0; color: #7a5800; font-size: 14.5px; line-height: 1.6; }
.fact-box strong { color: var(--navy); }
.band-navy .fact-box { background: rgba(245,180,0,.1); border-color: var(--gold); }
.band-navy .fact-box p { color: #e8dfc0; }
.band-navy .fact-box strong { color: #fff; }

.faq details { border-top: 1px solid var(--border); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { color: var(--ink-soft); margin: 10px 0 0; font-size: 14.5px; }

.notice-box { background: #eaf1fe; border: 1.5px solid #c7d7fb; color: var(--blue-dark); border-radius: 10px; padding: 16px 20px; font-size: 14.5px; }
.error-box { background: #fdeeea; border: 1.5px solid #f7cdbf; color: var(--coral-dark); border-radius: 10px; padding: 16px 20px; font-size: 14.5px; }

/* ---------- ad slots (empty until AdSense is live) ---------- */
.ad-slot { display: none; }
.ad-slot-banner { min-height: 90px; }
.ad-slot-square { min-height: 250px; max-width: 300px; margin: 24px auto; }

.related-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; }
@media (max-width: 700px) { .related-strip { grid-template-columns: repeat(2, 1fr); } }
.btn-chip { display: inline-flex; align-items: center; justify-content: center; padding: 9px 14px; border-radius: 8px; border: 1.5px solid var(--border); background: var(--card); color: var(--ink); font-size: 13.5px; font-weight: 600; text-decoration: none; text-align: center; }
.btn-chip:hover { border-color: var(--blue); text-decoration: none; }

/* ---------- alternating section bands ---------- */
.band-light { background: var(--bg); }
.band-white { background: #fff; }
.band-navy { background: var(--navy); color: #d8dcf0; }
.band-navy h2 { color: #fff; }
.band-navy .step-card { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); }
.band-navy .step-card p { color: #b7bede; }
.band-navy .step-num { background: var(--gold); color: var(--navy); }

.section-eyebrow { display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--blue-dark); margin-bottom: 8px; }
.band-navy .section-eyebrow { color: var(--gold); }
.section-lead { color: var(--ink-soft); font-size: 16px; line-height: 1.75; max-width: 680px; }
.band-navy .section-lead { color: #c3c8e6; }

/* ---------- benefits grid ---------- */
.benefit-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 26px; }
@media (max-width: 820px) { .benefit-grid { grid-template-columns: repeat(2, 1fr); } }
.benefit-card { text-align: left; transition: transform .15s; }
.benefit-card:hover { transform: translateY(-4px); }
.benefit-card:hover .icon { transform: scale(1.1) rotate(-6deg); }
.benefit-card .icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 12px; transition: transform .15s; }
.benefit-card:nth-child(1) .icon { background: #e8eeff; }
.benefit-card:nth-child(2) .icon { background: #ffe9e2; }
.benefit-card:nth-child(3) .icon { background: #fff3d6; }
.benefit-card:nth-child(4) .icon { background: #e4f5eb; }
.benefit-card h3 { font-size: 16px; margin-bottom: 6px; }
.benefit-card p { color: var(--ink-soft); font-size: 14px; margin: 0; }

/* ---------- comparison table ---------- */
.compare-table { width: 100%; border-collapse: collapse; margin-top: 24px; background: var(--card); border-radius: 14px; overflow: hidden; box-shadow: 0 6px 20px rgba(15,21,53,.08); }
.compare-table th, .compare-table td { padding: 14px 16px; text-align: left; font-size: 14.5px; border-bottom: 1px solid var(--border); }
.compare-table th { background: var(--navy); color: #fff; font-family: "Space Grotesk", sans-serif; font-size: 14px; }
.compare-table td:first-child, .compare-table th:first-child { font-weight: 700; }
.compare-table tr:last-child td { border-bottom: none; }
.compare-wrap { overflow-x: auto; }

/* ---------- "voor wie" cards ---------- */
.wie-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 24px; }
@media (max-width: 820px) { .wie-grid { grid-template-columns: repeat(2, 1fr); } }
.wie-card { background: var(--card); border: 1.5px solid var(--border); border-radius: 12px; padding: 18px; text-align: center; transition: transform .15s, box-shadow .15s; }
.wie-card:nth-child(odd) { transform: rotate(-.8deg); }
.wie-card:nth-child(even) { transform: rotate(.8deg); }
.wie-card:hover { transform: rotate(0) translateY(-3px); box-shadow: 0 10px 20px rgba(15,21,53,.12); }
.wie-card .icon { font-size: 26px; display: block; margin-bottom: 8px; }
.wie-card p { margin: 0; font-size: 13.5px; color: var(--ink-soft); }
.wie-card strong { display: block; font-size: 14.5px; margin-bottom: 4px; color: var(--ink); }

/* ---------- example board mockup ---------- */
.example-board { display: flex; flex-direction: column; align-items: center; gap: 14px; background: var(--card); border: 1.5px solid var(--border); border-radius: 16px; padding: 26px; box-shadow: 0 8px 24px rgba(15,21,53,.08); }
.example-board .caption { font-size: 13px; color: var(--ink-soft); }
