/* --- Fonts (self-hosted, postermatch) --- */
@font-face {
    font-family: 'Playfair Display';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/playfair-display-700.woff2') format('woff2');
}
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/montserrat.woff2') format('woff2');
}

:root {
    --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-sans: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    /* Blend-kleur (gemiddelde van de foto) zodat áchter de vaste achtergrondlaag
       nooit zwart zichtbaar wordt tijdens mobiel scrollen/overscroll. */
    background-color: #848b95;
}

body {
    font-family: var(--font-sans);
    color: #e6e2d8;
    min-height: 100vh;
    position: relative;
}

/* Achtergrondfoto: vaste vol-scherm laag achter alles. Vult ALTIJD het hele
   scherm (cover), bovenkant van de foto blijft bovenaan, verhoudingen blijven
   intact (nooit uitgerekt) — dus nooit randjes om de foto. Een vaste positie i.p.v.
   background-attachment:fixed, want dat laatste werkt niet op mobiel.
   #a89e90 = onderrandkleur, alleen als veiligheids-fallback. */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;      /* fallback */
    height: 100lvh;     /* grootste viewport: overhangt onderaan, dekt altijd */
    z-index: -2;
    background: #848b95 url('../images/achtergrond.jpg') top center / cover no-repeat;
    transform: translateZ(0);   /* eigen compositielaag → minder jitter/"snap" */
    will-change: transform;
}

/* Zwevende theater-afbeeldingen: vóór de achtergrond, achter de tekst.
   Vaste laag over het scherm; afbeeldingen worden door theater.js geplaatst. */
#theater {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100lvh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.theater-img {
    position: absolute;
    transform: translate(-50%, -50%);   /* (left,top) = middelpunt */
    opacity: 0;
    transition: opacity 0.7s ease;
}

.theater-img.is-visible {
    opacity: 0.92;
}

.theater-img img {
    display: block;
    will-change: transform;
    /* breedte/hoogte worden door theater.js gezet (schaalt met de verhouding) */
}

/* Zachte donkere scrim bovenaan zodat de titel/subtekst altijd leesbaar zijn
   over de lichte lucht, ongeacht de schermbreedte. */
body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 38vh;
    background: linear-gradient(to bottom,
        rgba(8, 10, 16, 0.62) 0%,
        rgba(8, 10, 16, 0.28) 45%,
        rgba(8, 10, 16, 0) 100%);
    pointer-events: none;
    z-index: 0;
}

/* Inhoudscontainer: gecentreerd met identieke marges links/rechts. */
main {
    position: relative;
    z-index: 1;
    max-width: 560px;
    margin: 0 auto;
    padding: clamp(1.75rem, 7vw, 3rem) clamp(1rem, 5vw, 1.5rem) 3rem;
}

/* --- Titel + subtekst: paginabreed, gelijke marges, over de foto --- */
header {
    text-align: center;
    margin-bottom: 2.25rem;
}

h1 {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 8.2vw, 2.8rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    line-height: 1.04;
    color: #f7f4ee;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.55);
    margin-bottom: 0.7rem;
}

.subtitle {
    font-size: clamp(0.95rem, 4.2vw, 1.1rem);
    font-weight: 400;
    letter-spacing: 0.01em;
    color: #ece8dd;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.6);
}

/* --- Formulier als halftransparant donker paneel --- */
form#submit-form {
    background: rgba(12, 12, 18, 0.55);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: clamp(1.1rem, 4.5vw, 1.6rem);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.28);
}

.field {
    margin-bottom: 1.4rem;
}

label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #cfcabd;
    margin-bottom: 0.5rem;
}

label.question {
    font-size: clamp(1.2rem, 4.8vw, 1.45rem);
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    color: #fdfbf6;
    font-style: italic;
    line-height: 1.35;
    margin-bottom: 0.95rem;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.optional {
    text-transform: none;
    font-weight: 400;
    font-style: italic;
    letter-spacing: 0;
}

textarea,
input[type="text"] {
    width: 100%;
    padding: 0.8rem 1rem;
    font-family: var(--font-sans);
    font-size: 1rem;
    color: #f2efe7;
    background: rgba(0, 0, 0, 0.32);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 5px;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}

textarea::placeholder,
input[type="text"]::placeholder {
    color: #8e897c;
}

textarea:focus,
input[type="text"]:focus {
    border-color: rgba(255, 255, 255, 0.42);
    background: rgba(0, 0, 0, 0.42);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.hint {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.8rem;
    font-style: italic;
    color: #9a9588;
}

button[type="submit"] {
    display: block;
    width: 100%;
    padding: 0.9rem;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #f2efe7;
    background: rgba(40, 42, 58, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

button[type="submit"]:hover {
    background: rgba(58, 60, 80, 0.82);
    border-color: rgba(255, 255, 255, 0.4);
}

button[type="submit"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.feedback {
    margin-top: 1.2rem;
    padding: 0.8rem 1rem;
    border-radius: 5px;
    font-size: 0.9rem;
    text-align: center;
}

.feedback.success {
    background: rgba(26, 42, 26, 0.8);
    border: 1px solid rgba(74, 110, 74, 0.7);
    color: #a6d6a6;
}

.feedback.error {
    background: rgba(42, 26, 26, 0.8);
    border: 1px solid rgba(110, 74, 74, 0.7);
    color: #d6a6a6;
}

/* --- "Hoe het werkt" --- */
.rules {
    background: rgba(12, 12, 18, 0.5);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 1.2rem 1.4rem;
    margin-top: 2.25rem;
}

.rules h2 {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #b6b1a3;
    margin-bottom: 0.9rem;
}

.rules ol {
    padding-left: 1.2rem;
    color: #cbc7ba;
}

.rules li {
    font-size: 0.88rem;
    line-height: 1.55;
    margin-bottom: 0.5rem;
}

.rules li:last-child {
    margin-bottom: 0;
}

/* Uitklapbare uitleg van de vijf codes (klikbaar, standaard ingeklapt). */
.codes-explainer {
    margin-top: 1.1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 0.95rem;
}

.codes-explainer > summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #cbc7ba;
}

.codes-explainer > summary::-webkit-details-marker { display: none; }

.codes-explainer > summary::after {
    content: "+";
    margin-left: auto;
    font-weight: 400;
    font-size: 1rem;
    color: #9a9588;
}

.codes-explainer[open] > summary::after { content: "\2013"; }

.codes-list {
    margin-top: 0.95rem;
}

.codes-list dt {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #ece8dd;
    margin-bottom: 0.25rem;
}

.codes-list dd {
    font-size: 0.85rem;
    line-height: 1.5;
    color: #b8b4a8;
    margin: 0 0 0.85rem 0;
}

.codes-list dd:last-child { margin-bottom: 0; }

.codes-list em {
    color: #cbc7ba;
    font-style: italic;
}

.code-tag {
    flex: none;
    font-family: 'Courier New', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    color: #f0ece2;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 3px;
    padding: 0.05rem 0.35rem;
}

/* --- Onderste navigatie --- */
.bottom-nav {
    margin-top: 2.25rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.header-link {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #cbc7ba;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 0.3rem 0.7rem;
    border-radius: 4px;
    background: rgba(12, 12, 18, 0.45);
    transition: color 0.2s, border-color 0.2s;
}

.header-link:hover {
    color: #f7f4ee;
    border-color: rgba(255, 255, 255, 0.4);
}

.header-link.current {
    opacity: 0.55;
    cursor: default;
    pointer-events: none;
}

/* --- Footer met AFK-logo (klein, subtiel) --- */
.site-footer {
    margin-top: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
}

.site-footer .caption {
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #e0dccf;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
}

.afk {
    display: block;
    height: 74px;
    width: auto;
    border-radius: 7px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
}

/* --- Taalschakelaar NL / ENG (gecentreerde pil bovenaan) --- */
.lang-switch {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.1rem;
    width: -webkit-fit-content;
    width: fit-content;
    margin: 0 auto 1.5rem;
    padding: 0.2rem 0.35rem;
    background: rgba(12, 12, 18, 0.55);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
}

.lang-btn {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #b6b1a3;
    background: transparent;
    border: none;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}

.lang-btn:hover { color: #f7f4ee; }

.lang-btn.is-active {
    color: #18181f;
    background: #e6e2d8;
    cursor: default;
}

.lang-sep {
    color: #6f6b60;
    font-size: 0.72rem;
}

/* --- Intro-alinea boven de stappen --- */
.rules-intro {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #ded9cc;
    margin-bottom: 1.1rem;
}

/* --- "Over deze pagina": stille disclaimer onderaan, met ruimte erboven --- */
.invite {
    margin-top: 3rem;
    padding-top: 1.6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    text-align: center;
}

.invite p {
    font-size: 0.8rem;
    line-height: 1.55;
    color: #9a9588;
    max-width: 44ch;
    margin: 0 auto 1.1rem;
}

.invite-poster {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35);
}
