/* Sanmax Winter Challenge – mobile-first. Alle kleuren via CSS-variabelen. */
@font-face {
    font-family: "Jost";
    src: local("Jost"), url("../fonts/jost-variable.woff2") format("woff2");
    font-weight: 300 800;
    font-display: swap;
}

:root {
    --color-primary: #F07F13;
    --color-primary-dark: #C45F00;   /* oranje tekst op wit (contrast >= 4.5:1) */
    --color-pink: #EC008C;
    --color-green: #55A544;
    --color-yellow: #EDCB00;
    --color-blue: #00AEEF;
    --color-red: #E31E24;
    --color-purple: #9B59B6;
    --color-background: #FFFFFF;
    --color-cream: #FFF2E7;
    --color-text: #242021;
    --color-muted: #5E5A5B;
    --color-border: #E6DCD3;
    --color-error: #B3141A;
    --color-focus: #0B5FD6;

    --radius-card: 20px;
    --radius-button: 12px;
    --shadow-card: 0 10px 30px rgba(36, 32, 33, .10);
    --font: "Jost", "Century Gothic", "Avenir Next", Avenir, "Segoe UI", system-ui, -apple-system, sans-serif;
    --gutter: clamp(16px, 5vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
:root { --partner-h: clamp(84px, 20vw, 120px); }
body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--color-background);
    color: var(--color-text);
    font-family: var(--font);
    font-size: 1.125rem;
    line-height: 1.5;
    overflow-x: hidden;
}
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; }
a, .link-btn {
    color: var(--color-primary-dark);
    text-decoration: none;
    background: linear-gradient(currentColor, currentColor) 0 100% / 100% 2px no-repeat;
    transition: color .2s ease, background-size .25s ease, transform .2s ease;
}
a:hover, a:focus-visible, .link-btn:hover, .link-btn:focus-visible {
    color: var(--color-text);
    background-image: linear-gradient(var(--color-primary), var(--color-primary));
    background-size: 100% 2px;
    animation: link-underline .25s ease;
}
a:hover, .link-btn:hover { transform: translateY(-1px); }
@keyframes link-underline { from { background-size: 0 2px; } to { background-size: 100% 2px; } }

/* Logo-links: geen onderlijning, wel een lichte zweving */
.brand, .brand:hover, .brand:focus-visible { background: none; animation: none; }

.sr-only, .sr-only-input {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--color-text); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }
.skip-link, .skip-link:hover, .skip-link:focus-visible { background: var(--color-text); color: #fff; animation: none; transform: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

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

/* ---------- Decoratie ---------- */
.deco { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.deco-crosses {
    position: absolute; inset: 0;
    background: url("../images/decoration/crosses.svg") repeat;
    background-size: 380px;
}
.deco-crosses::before, .deco-crosses::after {
    content: ""; position: absolute; background: var(--color-cream); border-radius: 12px;
    width: 38vmin; height: 12vmin; transform: rotate(45deg);
}
.deco-crosses::before { left: -14vmin; top: 8vmin; box-shadow: 0 0 0 0 transparent; }
.deco-crosses::after { right: -14vmin; bottom: 14vmin; }
.ornaments { position: absolute; top: 0; left: 0; right: 0; height: 190px; }
.orn { position: absolute; top: 0; width: 34px; transform-origin: 50% 0; animation: swing 5s ease-in-out infinite; }
.orn .line { display: block; width: 2px; background: var(--color-text); margin: 0 auto; }
.orn .gem { display: block; width: 24px; height: 24px; margin: -2px auto 0; transform: rotate(45deg); border-radius: 3px; position: relative; }
.orn .gem::before { content: ""; position: absolute; left: 5px; top: 5px; width: 4px; height: 4px; background: rgba(255,255,255,.6); }
.orn .cap { display: block; width: 10px; height: 6px; background: var(--color-text); margin: 0 auto; border-radius: 1px; }
@keyframes swing { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }

.snow { position: absolute; inset: 0; }
.flake {
    position: absolute; top: -12px; left: var(--x); width: var(--s); height: var(--s);
    background: var(--c, #BEE9FA); border-radius: 50%; opacity: .7;
    animation: fall var(--d) linear var(--delay) infinite;
}
@keyframes fall {
    to { transform: translate3d(var(--drift), 105vh, 0); }
}

/* ---------- Layout ---------- */
.site-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 10;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    width: 100%; margin: 0;
    padding: 18px max(var(--gutter), calc((100% - 1100px) / 2)) 10px;
    background: rgba(255, 255, 255, 0);
    transition: padding .3s ease, background-color .3s ease, box-shadow .3s ease;
}
.header-spacer { height: calc(var(--partner-h) + 28px); } /* vaste hoogte: de header wordt compact zonder de pagina te laten verspringen */
.site-header.is-compact { padding-top: 8px; padding-bottom: 8px; background: rgba(255, 255, 255, .94); box-shadow: 0 2px 14px rgba(36, 32, 33, .10); }
@supports (backdrop-filter: blur(6px)) { .site-header.is-compact { backdrop-filter: blur(6px); } }
.brand { display: block; line-height: 0; }
.brand-full { display: block; width: clamp(130px, 38vw, 210px); height: auto; transition: transform .25s ease; }
/* Compact merk: de geanimeerde SVG eindigt als "snmx"; we tonen enkel dat bovenste gedeelte (82 x 20 van 107 x 29). */
.brand-mark { display: block; position: relative; overflow: hidden; width: 92px; aspect-ratio: 82 / 20.5; transition: transform .25s ease; }
.brand-mark .mark-base { display: block; width: 100%; height: auto; }
.brand-mark .mark-anim { position: absolute; left: 0; top: 0; width: calc(107 / 82 * 100%); height: auto; max-width: none; background: #fff; }
.brand:hover .brand-full, .brand:focus-visible .brand-full, .brand:hover .brand-mark, .brand:focus-visible .brand-mark { transform: translateY(-2px) scale(1.03); }
.partner-link { display: block; line-height: 0; background: none; }
.partner-link:hover, .partner-link:focus-visible { background: none; animation: none; }
.partner { height: var(--partner-h); width: auto; transition: height .3s ease, transform .25s ease; }
.partner-link:hover .partner, .partner-link:focus-visible .partner { transform: translateY(-2px) scale(1.04); }
.is-compact .partner { height: 48px; }

.stage {
    position: relative; z-index: 1;
    flex: 1;
    width: 100%; max-width: 680px; margin: 0 auto;
    padding: 18px var(--gutter) 40px;
}

.progress { margin-bottom: 18px; }
.progress-bar { height: 10px; background: var(--color-cream); border-radius: 99px; overflow: hidden; }
.progress-bar span {
    display: block; height: 100%; width: 0;
    background: linear-gradient(90deg, var(--color-pink), var(--color-yellow), var(--color-blue), var(--color-primary));
    border-radius: 99px; transition: width .45s cubic-bezier(.3, .8, .3, 1);
}
.progress-label { margin: 6px 0 0; font-size: .9rem; color: var(--color-muted); }

.screen { animation: enter .45s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes enter { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.eyebrow { margin: 0 0 6px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-size: .85rem; color: var(--color-primary-dark); }
.title { margin: 0 0 12px; font-size: clamp(1.9rem, 7vw, 2.9rem); line-height: 1.08; font-weight: 600; letter-spacing: -.01em; }
.title:focus { outline: none; }
.hl { color: var(--color-primary); font-weight: 800; }
.lead { margin: 0 0 20px; color: var(--color-muted); font-size: 1.15rem; }
.lead.strong { color: var(--color-text); font-weight: 600; }
.note { display: flex; gap: 8px; align-items: flex-start; margin: 14px 0; font-size: .95rem; color: var(--color-muted); }
.note-icon { flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--color-green); color: #fff; font-size: .8rem; font-weight: 700; }

/* ---------- Kaarten ---------- */
.card { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-card); padding: 22px; box-shadow: var(--shadow-card); margin: 0 0 18px; }
.card-float { animation: float 6s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.card-kicker { margin: 0 0 6px; font-size: .85rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--color-muted); }
.card-title { margin: 0 0 6px; font-size: 1.7rem; line-height: 1.15; color: var(--color-primary-dark); }
.today-card { border-top: 6px solid var(--color-primary); }
.today-card p:last-child { margin: 0; }
.challenge-img { float: right; margin: 0 0 8px 12px; border-radius: 14px; object-fit: cover; }

/* ---------- Knoppen ---------- */
.btn {
    appearance: none; border: 2px solid transparent; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 52px; padding: 12px 24px;
    font: inherit; font-weight: 700; font-size: 1.05rem; text-align: center;
    border-radius: var(--radius-button);
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--color-primary); color: var(--color-text); box-shadow: 0 6px 0 var(--color-primary-dark); }
.btn-primary:hover { background: #FF8C22; }
.btn-primary:active { box-shadow: 0 2px 0 var(--color-primary-dark); transform: translateY(4px); }
.btn-secondary { background: #fff; color: var(--color-text); border-color: var(--color-text); }
.btn-secondary:hover { background: var(--color-cream); }
.btn-ghost { background: transparent; color: var(--color-muted); }
.btn-xl { width: 100%; min-height: 64px; font-size: 1.3rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .6; cursor: progress; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.btn-row .btn { flex: 1 1 160px; }
.nav { display: flex; gap: 12px; justify-content: space-between; margin-top: 22px; }
.nav .btn-primary { flex: 1; }
.link-btn { border: 0; padding: 0; font: inherit; cursor: pointer; min-height: 24px; }

/* ---------- Upload ---------- */
.upload { text-align: center; border: 3px dashed var(--color-primary); background: var(--color-cream); }
.upload-icon { font-size: 3rem; line-height: 1; margin-bottom: 4px; }
.upload-hint { margin: 0 0 14px; color: var(--color-muted); font-size: .95rem; }
.upload-preview img { display: block; margin: 0 auto 14px; max-height: 340px; width: auto; border-radius: 14px; box-shadow: var(--shadow-card); }
.upload.has-error { border-color: var(--color-error); }

/* ---------- Antwoordkaarten ---------- */
.answers { border: 0; padding: 0; margin: 0; display: grid; gap: 12px; }
.answer { position: relative; display: block; cursor: pointer; }
.answer input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.answer-face {
    display: flex; align-items: center; gap: 14px; padding: 16px 18px; min-height: 64px;
    background: #fff; border: 2px solid var(--color-border); border-radius: var(--radius-card);
    transition: transform .15s ease, border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.answer:hover .answer-face { border-color: var(--color-primary); }
.answer-letter {
    flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
    background: var(--color-cream); font-weight: 800; transition: background-color .15s ease;
}
.answer-check { margin-left: auto; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--color-border); display: grid; place-items: center; font-weight: 800; color: transparent; }
.answer input:checked + .answer-face { border-color: var(--color-primary); background: var(--color-cream); box-shadow: 0 0 0 3px rgba(240, 127, 19, .25); transform: scale(1.01); }
.answer input:checked + .answer-face .answer-letter { background: var(--color-primary); }
.answer input:checked + .answer-face .answer-check { background: var(--color-text); border-color: var(--color-text); color: #fff; }
.answer input:focus-visible + .answer-face { outline: 3px solid var(--color-focus); outline-offset: 3px; }

/* ---------- Formulieren ---------- */
.field { margin-bottom: 14px; }
.field-grid { display: grid; gap: 0 16px; }
label { display: block; font-weight: 600; margin-bottom: 6px; }
.input {
    width: 100%; min-height: 54px; padding: 12px 14px; font: inherit; font-size: 1.1rem; color: var(--color-text);
    background: #fff; border: 2px solid var(--color-border); border-radius: var(--radius-button);
}
.input:focus { border-color: var(--color-primary); outline: 3px solid rgba(11, 95, 214, .35); outline-offset: 1px; }
.input[aria-invalid="true"] { border-color: var(--color-error); }
.input-big { font-size: 2rem; text-align: center; font-weight: 700; min-height: 72px; }
.input-code { font-size: 2rem; letter-spacing: .5em; text-align: center; font-weight: 700; min-height: 72px; }
.field-error { margin: 6px 0 0; color: var(--color-error); font-weight: 600; font-size: .95rem; min-height: 0; }
.field-error:empty { display: none; }
.field-error:not(:empty)::before { content: "⚠ "; }
.form-error { margin: 14px 0 0; padding: 10px 14px; background: #FDECEC; border-radius: 10px; }

.consents { margin-top: 8px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; margin: 12px 0; cursor: pointer; font-size: 1rem; }
.check input { flex: none; width: 26px; height: 26px; margin: 2px 0 0; accent-color: var(--color-primary-dark); cursor: pointer; }
.req { color: var(--color-error); }

/* ---------- Succes ---------- */
.screen-success { text-align: center; position: relative; }
.success-badge { font-size: 4.5rem; animation: pop .7s cubic-bezier(.2, 1.4, .3, 1) both; }
@keyframes pop { from { transform: scale(0) rotate(-20deg); } to { transform: scale(1) rotate(0); } }
.confetti { position: absolute; inset: -20px 0 auto 0; height: 0; overflow: visible; pointer-events: none; }
.confetti i { position: absolute; top: 0; left: var(--x); width: 10px; height: 14px; background: var(--c); opacity: 0; animation: confetti 2.4s ease-out var(--delay) forwards; }
@keyframes confetti {
    0% { opacity: 1; transform: translate3d(0, 0, 0) rotate(0); }
    100% { opacity: 0; transform: translate3d(var(--drift), 420px, 0) rotate(var(--rot)); }
}

.spinner { width: 48px; height: 48px; margin: 80px auto; border-radius: 50%; border: 5px solid var(--color-cream); border-top-color: var(--color-primary); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn.loading::after { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 3px solid rgba(36,32,33,.3); border-top-color: var(--color-text); animation: spin .8s linear infinite; }

.site-footer { position: relative; z-index: 1; text-align: center; padding: 18px var(--gutter) 28px; font-size: .9rem; color: var(--color-muted); border-top: 8px solid transparent;
    border-image: linear-gradient(90deg, var(--color-pink) 0 14.28%, var(--color-green) 0 28.57%, var(--color-yellow) 0 42.85%, var(--color-blue) 0 57.14%, var(--color-red) 0 71.42%, var(--color-primary) 0 85.7%, var(--color-purple) 0) 1; }
.site-footer p { margin: 0; }

/* Juridische pagina's */
.legal { max-width: 720px; margin: 0 auto; padding: 24px var(--gutter) 40px; position: relative; z-index: 1; }
.legal h1 { font-size: 2rem; }
.legal .todo { background: var(--color-cream); border-left: 6px solid var(--color-primary); padding: 12px 16px; border-radius: 8px; }

/* ---------- Groter scherm ---------- */
@media (min-width: 768px) {
    body { font-size: 1.2rem; }
    .stage { padding-top: 32px; }
    .field-grid { grid-template-columns: 1fr 1fr; }
    .answers { grid-template-columns: 1fr 1fr; }
    .btn-xl { width: auto; min-width: 360px; }
    .nav .btn-primary { flex: 0 1 auto; min-width: 220px; }
    .ornaments { height: 230px; }
}
@media (min-width: 1024px) {
    .stage { max-width: 760px; }
    .site-header { padding-top: 28px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
    .snow, .confetti { display: none; }
}
@media (forced-colors: active) {
    .btn-primary { border-color: ButtonText; }
    .answer input:checked + .answer-face { outline: 3px solid Highlight; }
}

/* ---------- Uitleg / FAQ, volg-blok, footer, juridische pagina's ---------- */
main#main { flex: 1; position: relative; z-index: 1; width: 100%; }
.stage { flex: none; }
.noscript { max-width: 680px; margin: 16px auto; padding: 0 var(--gutter); }
.info { border-top: 1px solid var(--color-border); margin-top: 8px; padding-top: 28px; }
.info h2 { font-size: 1.6rem; line-height: 1.2; margin: 0 0 12px; }
.info h2:not(:first-child) { margin-top: 28px; }
.info h3 { font-size: 1.1rem; margin: 18px 0 4px; }
.info p, .info li { color: var(--color-muted); }
.info h3 + p { margin-top: 0; }
.steps { padding-left: 1.3rem; }
.follow { margin-top: 28px; padding: 20px; background: var(--color-cream); border-radius: var(--radius-card); }
.follow h3 { margin: 0 0 4px; font-size: 1.3rem; }
.follow p { margin: 0 0 14px; color: var(--color-muted); }
.follow .btn { text-decoration: none; background-image: none; color: var(--color-text); }
.follow .btn:hover { transform: translateY(-2px); background-color: #fff; }
.footer-grid { display: grid; gap: 18px; text-align: left; max-width: 760px; margin: 0 auto 14px; }
.site-footer address { font-style: normal; line-height: 1.7; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer .copy { margin-top: 6px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1fr auto; align-items: start; } }
.legal-header { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; padding: 18px var(--gutter) 0; }
.legal h2 { font-size: 1.3rem; }
