/* JasperTeaches: gedeelde stijl voor landingspagina, overzicht en cursusomlijsting. */
@font-face { font-family: "Sora"; font-weight: 600; font-display: swap; src: url(/fonts/sora-600.woff2) format("woff2"); }
@font-face { font-family: "Sora"; font-weight: 800; font-display: swap; src: url(/fonts/sora-800.woff2) format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 400; font-display: swap; src: url(/fonts/atkinson-hyperlegible-400.woff2) format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 700; font-display: swap; src: url(/fonts/atkinson-hyperlegible-700.woff2) format("woff2"); }

:root {
  --bg: #F5F1E8; --paper: #FFFFFF; --ink: #1A1D29; --muted: #636978; --line: #E3DDD0; --soft: #EFEADF;
  --accent: #FF5B2E; --accent-dark: #E0441A; --accent-soft: #FFE6DD;
  --blue: #2B59C3; --yellow: #FFC53D; --yellow-soft: #FFF3D1; --green: #1F8A55; --green-soft: #DFF2E7; --red: #C8372D;
  --f-head: "Sora", system-ui, sans-serif; --f-body: "Atkinson Hyperlegible", system-ui, sans-serif;
  --r: 14px; --r-sm: 9px;
  --shadow: 0 1px 0 var(--line), 0 18px 34px -26px rgba(26, 29, 41, .45);
  --shadow-lift: 0 1px 0 var(--line), 0 24px 40px -22px rgba(26, 29, 41, .5);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 var(--f-body); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--f-head); line-height: 1.1; margin: 0; letter-spacing: -.01em; }
a { color: var(--blue); }
img, svg { max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
[hidden] { display: none !important; }

/* logo */
.jt-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 800 1.2rem var(--f-head); letter-spacing: -.02em; white-space: nowrap; }
.jt-logo svg { width: 34px; height: 34px; flex: none; }
.jt-logo b { color: var(--accent); font-weight: 800; }

/* knoppen */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink);
  border-radius: 999px; padding: 10px 20px; font: 700 1rem var(--f-body); text-decoration: none; transition: transform .12s, box-shadow .12s, background .12s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 3px 0 var(--ink); }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { box-shadow: 0 3px 0 var(--accent-dark); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--soft); box-shadow: none; transform: none; }
.btn.sm { padding: 6px 14px; font-size: .9rem; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; transform: none; box-shadow: none; }

/* formulieren */
.field { display: grid; gap: 5px; margin-bottom: 14px; }
.field label { font-weight: 700; font-size: .92rem; }
.field input { font: inherit; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--paper); color: var(--ink); width: 100%; }
.field input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--yellow-soft); }
.field .hint { font-size: .82rem; color: var(--muted); }
.formmsg { border-radius: var(--r-sm); padding: 10px 14px; margin-bottom: 14px; font-size: .95rem; background: #FBE5E2; }
.formmsg.ok { background: var(--green-soft); }

/* kaartjes */
.card { background: var(--paper); border-radius: var(--r); box-shadow: var(--shadow); }

/* topbalk (overzicht) */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: rgba(245, 241, 232, .9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 14px; height: 66px; }
.top .spacer { flex: 1; }
.pill { display: inline-flex; align-items: center; gap: 8px; background: var(--paper); border: 1.5px solid var(--line); border-radius: 999px; padding: 5px 12px 5px 6px; font-weight: 700; font-size: .92rem; white-space: nowrap; }
.pill .lv { background: var(--ink); color: #fff; font: 800 .78rem var(--f-head); border-radius: 999px; padding: 3px 9px; }
.pill.streak { padding: 5px 12px; }
.pill.streak.cold { color: var(--muted); }

/* voortgangsbalk */
.bar { height: 10px; border-radius: 99px; background: var(--soft); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--yellow), var(--accent)); width: 0; transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.bar.green i { background: var(--green); }

/* badge-medaillon */
.medal { --c: var(--accent); position: relative; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: radial-gradient(circle at 35% 30%, #fff 0, var(--paper) 40%, var(--soft) 100%); box-shadow: inset 0 0 0 4px var(--c), 0 6px 14px -8px rgba(0, 0, 0, .5); font-size: 1.8rem; }
.medal svg { width: 58%; height: 58%; }
.medal.locked { filter: grayscale(1); opacity: .35; box-shadow: inset 0 0 0 3px var(--line); }
.medal.lg { width: 96px; height: 96px; font-size: 2.7rem; }

/* meldingen */
.toasts { position: fixed; z-index: 100; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 10px; justify-items: end; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; background: var(--ink); color: #fff; border-radius: var(--r); padding: 10px 16px 10px 10px;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .6); max-width: min(380px, calc(100vw - 32px)); animation: toastIn .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.toast.out { animation: toastOut .3s ease forwards; }
.toast .medal { width: 48px; height: 48px; font-size: 1.4rem; }
.toast b { display: block; font-family: var(--f-head); }
.toast span { font-size: .88rem; opacity: .8; }
.toast.xp { padding: 8px 16px; background: var(--accent); font: 800 1rem var(--f-head); }
@keyframes toastIn { from { transform: translateY(20px) scale(.9); opacity: 0; } }
@keyframes toastOut { to { transform: translateX(30px); opacity: 0; } }

/* dialoog */
dialog { border: 0; border-radius: var(--r); padding: 0; max-width: min(520px, calc(100vw - 32px)); width: 100%; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .5); color: var(--ink); }
dialog::backdrop { background: rgba(26, 29, 41, .45); backdrop-filter: blur(2px); }
dialog .dlg { padding: 24px; }
dialog h2 { font-size: 1.4rem; margin-bottom: 14px; }
dialog h3 { font-size: 1.02rem; margin: 22px 0 10px; }
dialog .close { position: absolute; right: 12px; top: 10px; border: 0; background: none; font-size: 1.5rem; line-height: 1; color: var(--muted); padding: 6px; }

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

/* "Download de app"-venster (assets/getapp.js) */
dialog.getapp { max-width: min(560px, calc(100vw - 32px)); }
.getapp .ga-lead { margin: -4px 0 16px; color: var(--muted); }
.getapp .ga-here { display: grid; gap: 6px; margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); text-align: center; }
.getapp .ga-here .btn { margin: 0; }
.getapp .ga-list { display: grid; gap: 10px; }
.getapp .ga-item { display: flex; gap: 14px; align-items: flex-start; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r-sm); }
.getapp .ga-item.mine { border-color: var(--accent); background: var(--accent-soft); }
.getapp .ga-item .ic { font-size: 1.5rem; line-height: 1.2; flex: none; width: 32px; text-align: center; }
.getapp .ga-item > div { display: grid; gap: 6px; justify-items: start; min-width: 0; }
.getapp .ga-item b { font-family: var(--f-head); }
.getapp .tag { font: 700 .7rem var(--f-body); background: var(--accent); color: #fff; border-radius: 999px; padding: 2px 8px; vertical-align: 2px; margin-left: 4px; }
.getapp .ga-foot { margin: 16px 0 0; }
.appbtn svg { width: 18px; height: 18px; }
