@font-face { font-family: 'Poppins'; font-weight: 400; font-display: swap; src: url('../fonts/Poppins-Regular.ttf') format('truetype'); }
@font-face { font-family: 'Poppins'; font-weight: 600; font-display: swap; src: url('../fonts/Poppins-SemiBold.ttf') format('truetype'); }
@font-face { font-family: 'Poppins'; font-weight: 700; font-display: swap; src: url('../fonts/Poppins-Bold.ttf') format('truetype'); }
@font-face { font-family: 'Poppins'; font-weight: 800; font-display: swap; src: url('../fonts/Poppins-ExtraBold.ttf') format('truetype'); }
@font-face { font-family: 'Poppins'; font-weight: 900; font-display: swap; src: url('../fonts/Poppins-Black.ttf') format('truetype'); }

:root {
    --oranje: #ff7a37;
    --roze: #d9b5e5;
    --bruin: #5e2f05;
    --geel: #ffc849;
    --wit: #ffffff;
}

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

html, body { margin: 0; }

body {
    font-family: 'Poppins', system-ui, sans-serif;
    background: var(--bruin);
    color: var(--wit);
    line-height: 1.5;
    overflow-x: hidden;
}

[hidden] { display: none !important; }

.visueel-verborgen {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Pagina-opbouw ---------- */
.pagina {
    position: relative;
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "titel" "rad" "paneel" "voet";
    gap: 1.5rem;
    padding: 1.5rem 1.25rem 2rem;
    overflow: hidden;
    isolation: isolate;
}

.deco { position: absolute; z-index: -1; pointer-events: none; }
.deco--boog {
    left: -60vmax; bottom: -75vmax;
    width: 130vmax; height: 130vmax;
    border-radius: 50%;
    background: var(--oranje);
}
.deco--strook { display: none; }

@media (min-width: 960px) {
    .pagina {
        grid-template-columns: minmax(340px, 1fr) minmax(420px, 1.1fr);
        grid-template-areas:
            "titel rad"
            "paneel rad"
            "voet rad";
        grid-template-rows: auto 1fr auto;
        column-gap: 3rem;
        padding: 3rem clamp(2rem, 5vw, 5rem);
        max-width: 1400px;
        margin: 0 auto;
        overflow: visible clip;
    }
    .deco--strook {
        display: block;
        position: fixed;
        top: 0; right: 0; bottom: 0;
        width: 25vw;
        background: var(--roze);
    }
    /* De boog hangt aan de grid-rijen onder de titel, zodat hij nooit over de titel schuift. */
    .deco--boog {
        grid-row: 2 / -1;
        grid-column: 1 / -1;
        inset: 0;
        width: auto;
        height: auto;
        border-radius: 0;
        background: none;
    }
    .deco--boog::before {
        content: "";
        position: absolute;
        top: -2rem;
        /* Linkerrand van het scherm = 50% - 50vw (de pagina is gecentreerd met max-width). */
        left: calc(50% - 90vw);
        width: 180vw;
        aspect-ratio: 1;
        border-radius: 50%;
        background: var(--oranje);
    }
}

/* ---------- Titel ---------- */
.titel {
    grid-area: titel;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-weight: 900;
    line-height: 0.88;
    letter-spacing: -0.01em;
    font-size: clamp(3rem, 15vw, 6.5rem);
    margin: 0;
}
.titel__klein { font-size: 0.32em; color: var(--roze); margin-bottom: 0.2em; }
.titel__oranje { color: var(--oranje); }
.titel__roze { color: var(--roze); }

@media (min-width: 960px) {
    .titel { align-items: flex-start; font-size: clamp(4rem, 7vw, 7rem); }
}

/* ---------- Rad ---------- */
.rad {
    grid-area: rad;
    position: relative;
    width: min(92vw, 560px);
    justify-self: center;
    align-self: center;
    padding-top: 7%;
}

.rad__schijf {
    position: relative;
    z-index: 1;
    aspect-ratio: 1;
    transform: rotate(0deg);
    will-change: transform;
}
.rad__svg { display: block; width: 100%; height: 100%; }

.rad__pijl {
    position: absolute;
    z-index: 2;
    top: 0;
    left: 50%;
    width: 13%;
    aspect-ratio: 1.15;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--oranje) 50%, #f26a2a 50%);
    clip-path: polygon(0 0, 100% 0, 54% 92%, 50% 100%, 46% 92%);
    border-radius: 6px;
    filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .25));
}

.rad__poten {
    position: relative;
    z-index: 0;
    height: 18%;
    margin-top: -4%;
}
.rad__poten::before, .rad__poten::after {
    content: "";
    position: absolute;
    top: 0; bottom: 0;
    width: 3%;
    background: var(--bruin);
    border-radius: 4px;
}
.rad__poten::before { left: 34%; transform: skewX(8deg); }
.rad__poten::after { right: 34%; transform: skewX(-8deg); }

.rad__tekst {
    font-family: 'Poppins', system-ui, sans-serif;
    font-weight: 600;
    font-size: 19px;
    letter-spacing: 0.02em;
}
.rad__tekst--win { font-weight: 800; font-size: 15px; letter-spacing: 0.04em; }

.lamp { transition: fill .2s; }
.rad__schijf--draait .lamp--0 { animation: knipper .5s steps(1) infinite; }
.rad__schijf--draait .lamp--1 { animation: knipper .5s steps(1) infinite .25s; }
@keyframes knipper { 50% { fill: #fff3cf; } }

/* ---------- Paneel ---------- */
.paneel {
    grid-area: paneel;
    align-self: start;
    width: 100%;
    max-width: 520px;
    justify-self: center;
    background: var(--wit);
    color: var(--bruin);
    border-radius: 18px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}
@media (min-width: 960px) { .paneel { justify-self: start; } }

.paneel h2 { margin: 0 0 .5rem; font-weight: 800; font-size: 1.5rem; line-height: 1.2; }
.paneel p { margin: 0 0 1rem; }
.paneel .klein { font-size: .875rem; opacity: .8; }
.paneel label { display: block; font-weight: 600; margin: .75rem 0 .25rem; }

.paneel input {
    width: 100%;
    font: inherit;
    color: var(--bruin);
    padding: .75rem 1rem;
    border: 2px solid var(--roze);
    border-radius: 10px;
    background: #fbf7fc;
}
.paneel input:focus { outline: none; border-color: var(--oranje); box-shadow: 0 0 0 3px rgba(255, 122, 55, .25); }

.code-invoer {
    text-transform: uppercase;
    font-family: Consolas, 'Courier New', monospace !important;
    font-size: 1.5rem !important;
    letter-spacing: .2em;
    text-align: center;
}
.code-invoer::placeholder { letter-spacing: .2em; color: #c9b3a0; }

.knop {
    display: block;
    width: 100%;
    margin-top: 1rem;
    padding: .9rem 1.25rem;
    font: inherit;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--wit);
    background: var(--oranje);
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    transition: transform .1s, background .2s;
}
.knop:hover { background: #ff6a1f; }
.knop:active { transform: scale(.98); }
.knop:focus-visible { outline: 3px solid var(--bruin); outline-offset: 2px; }
.knop:disabled { opacity: .6; cursor: wait; }
.knop--licht { background: var(--roze); color: var(--bruin); }
.knop--licht:hover { background: #cfa3de; }

.fout {
    color: #b3261e;
    background: #fde8e6;
    border-radius: 8px;
    padding: .5rem .75rem;
    margin: .75rem 0 0 !important;
    font-weight: 600;
}

.prijs {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    background: var(--oranje);
    color: var(--wit);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin: .75rem 0 1rem;
}
.prijs strong { font-size: 1.2rem; line-height: 1.3; }
.prijs a { color: var(--wit); }

.knal { animation: knal .6s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes knal { from { transform: scale(.6); opacity: 0; } }

/* ---------- Voet ---------- */
.voet {
    grid-area: voet;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
}
.voet__slogan {
    margin: 0;
    color: var(--bruin);
    font-weight: 900;
    font-size: clamp(1.8rem, 8vw, 3.2rem);
    line-height: 1;
}
.logo { display: block; width: clamp(110px, 18vw, 170px); height: auto; }

/* ---------- Confetti ---------- */
#confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 10; }
#confetti i {
    position: absolute;
    top: -20px;
    width: 10px;
    height: 16px;
    border-radius: 2px;
    animation-name: val;
    animation-timing-function: ease-in;
    animation-fill-mode: forwards;
}
@keyframes val {
    to { transform: translate(var(--zwaai), 110vh) rotate(var(--draai)); }
}

@media (prefers-reduced-motion: reduce) {
    .knal, .rad__schijf--draait .lamp { animation: none; }
}
