/* ==========================================================
   FEESTDAGEN-THEMA'S — Halloween, Kerst, Oud & Nieuw
   Wordt alleen geladen als includes/season.php een feest herkent.
   De bewegende effecten (vleermuizen, sneeuw, vuurwerk) tekent
   js/seasonal.js op één canvas; dit bestand doet de vaste versiering.
   ========================================================== */

/* ---------- Gedeeld ---------- */
.season-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;   /* klikken gaan er altijd dwars doorheen */
    z-index: 1500;          /* boven de content, onder lightboxes/overlays */
}

/* Op het inlogscherm boven de donkere overlay, zodat het daar ook te zien is */
html.hack-lock .season-canvas {
    z-index: 10001;
}

/* Feest-icoontje links in de navbar (dat vak was nog leeg) */
html[data-season] .logo::before {
    display: inline-block;
    font-size: 2rem;
    line-height: 1;
    animation: seasonBob 3s ease-in-out infinite;
}

@keyframes seasonBob {
    0%, 100% { transform: translateY(0) rotate(-4deg); }
    50%      { transform: translateY(-3px) rotate(4deg); }
}

html[data-season] .navbar {
    position: relative;
    transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

/* Groet: los pilletje linksonder */
.season-greeting {
    position: fixed;
    left: 1.5rem;
    bottom: 1.5rem;
    z-index: 600;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1.2rem;
    border-radius: 999px;
    background: rgba(13, 13, 13, 0.9);
    border: 1px solid var(--season-color, #444);
    box-shadow: 0 4px 20px var(--season-glow, rgba(0, 0, 0, 0.35));
    color: var(--season-color, #e6e6e6);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    pointer-events: none;
}

.season-greeting-icon {
    font-size: 1.3rem;
    line-height: 1;
}

html.hack-lock .season-greeting {
    z-index: 10002;
}

/* ---------- 🎃 HALLOWEEN ---------- */
html.season-halloween {
    --season-color: #ff8a1f;
    --season-glow: rgba(255, 122, 24, 0.35);
}

html.season-halloween .logo::before,
html.season-halloween .season-greeting-icon::before {
    content: "🎃";
}

html.season-halloween .navbar {
    border-color: rgba(255, 122, 24, 0.55);
    box-shadow: 0 0 22px rgba(255, 122, 24, 0.25), inset 0 0 18px rgba(140, 40, 200, 0.12);
}


/* Spinnenweb rechtsonder */
html.season-halloween body::after {
    content: "";
    position: fixed;
    right: 0;
    bottom: 0;
    width: 220px;
    height: 220px;
    pointer-events: none;
    z-index: 1;
    opacity: 0.35;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200' fill='none' stroke='%23ffffff' stroke-width='1.2'%3E%3Cpath d='M200 200 L200 0 M200 200 L0 200 M200 200 L40 40 M200 200 L110 10 M200 200 L10 110'/%3E%3Cpath d='M200 170 Q185 172 174 174 Q168 186 170 200 M200 140 Q178 146 158 152 Q148 172 140 200 M200 105 Q170 112 140 124 Q122 150 105 200 M200 70 Q160 80 122 98 Q96 132 70 200 M200 35 Q148 50 104 74 Q72 114 35 200'/%3E%3C/svg%3E") no-repeat right bottom / contain;
}

/* ---------- 🎄 KERST ---------- */
html.season-christmas {
    --season-color: #f5c862;
    --season-glow: rgba(245, 200, 98, 0.25);
}

/* Groet: gewoon een rustig tekstje, geen emoji en geen gloed */
html.season-christmas .season-greeting {
    box-shadow: none;
    border-color: rgba(230, 200, 140, 0.35);
    color: #e9d3a1;
    font-weight: 600;
    letter-spacing: 0.04em;
}

html.season-christmas .season-greeting-icon {
    display: none;
}

/* Geen los boompje in het menu: de echte kerstboom staat al rechtsonder */
html.season-christmas .logo::before {
    content: none;
}

html.season-christmas .navbar {
    box-shadow: none;
}

/* ---------- 🎆 OUD & NIEUW ---------- */
html.season-newyear {
    --season-color: #ffd54a;
    --season-glow: rgba(255, 213, 74, 0.3);
}

html.season-newyear .logo::before,
html.season-newyear .season-greeting-icon::before {
    content: "🎆";
}

html.season-newyear .navbar {
    border-color: rgba(255, 213, 74, 0.5);
    box-shadow: 0 0 22px rgba(255, 213, 74, 0.18);
}


/* Aftellen: cijfers mogen niet verspringen */
.season-greeting-text {
    font-variant-numeric: tabular-nums;
}

/* ==========================================================
   EXTRA DETAILS
   ========================================================== */

/* ---------- 🎃 Halloween: bungelende spin ---------- */
html.season-halloween body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 7%;
    z-index: 2;
    width: 36px;
    height: 150px;
    pointer-events: none;
    /* zelfde zwarte spin met rode oogjes als de kruipende spin, kop naar
       beneden, aan een dun draadje (2e laag: het draadje) */
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 44'%3E%3Cstyle%3E.l%7Banimation:w 1.2s ease-in-out infinite alternate%3Btransform-origin:20px 21px%7D.r%7Banimation-delay:.6s%7D%40keyframes w%7Bto%7Btransform:rotate%286deg%29%7D%7D%3C/style%3E%3Cg fill='none' stroke='%230f0a0c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg class='l'%3E%3Cpath d='M17 17 L9 10 L4 14'/%3E%3Cpath d='M17 20 L7 17 L2 23'/%3E%3Cpath d='M17 23 L8 26 L4 33'/%3E%3Cpath d='M18 25 L12 32 L10 40'/%3E%3C/g%3E%3Cg class='l r'%3E%3Cpath d='M23 17 L31 10 L36 14'/%3E%3Cpath d='M23 20 L33 17 L38 23'/%3E%3Cpath d='M23 23 L32 26 L36 33'/%3E%3Cpath d='M22 25 L28 32 L30 40'/%3E%3C/g%3E%3C/g%3E%3Cellipse cx='20' cy='14' rx='7.5' ry='8.5' fill='%230f0a0c'/%3E%3Cellipse cx='20' cy='26' rx='4.8' ry='4.3' fill='%230f0a0c'/%3E%3Ccircle cx='18.2' cy='27.6' r='1.1' fill='%23ff2d1e'/%3E%3Ccircle cx='21.8' cy='27.6' r='1.1' fill='%23ff2d1e'/%3E%3C/svg%3E") no-repeat center bottom / 36px 40px,
        linear-gradient(to bottom, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.45)) no-repeat center top / 1.5px calc(100% - 36px);
    filter: drop-shadow(0 0 4px rgba(255, 120, 30, 0.35));
    transform-origin: top center;
    animation: spiderDangle 6s ease-in-out infinite;
}

@keyframes spiderDangle {
    0%, 100% { height: 140px; transform: rotate(3deg); }
    35%      { height: 230px; transform: rotate(-2deg); }
    60%      { height: 190px; transform: rotate(2deg); }
}

/* ---------- 🎃 Halloween: flakkerende gloed om het naam-blok ---------- */
html.season-halloween .hero {
    animation: pumpkinFlicker 4s ease-in-out infinite;
}

@keyframes pumpkinFlicker {
    0%, 100% { box-shadow: 0 0 34px rgba(255, 120, 20, 0.22); }
    8%       { box-shadow: 0 0 22px rgba(255, 120, 20, 0.12); }
    12%      { box-shadow: 0 0 40px rgba(255, 140, 30, 0.30); }
    50%      { box-shadow: 0 0 46px rgba(255, 110, 20, 0.28), 0 0 90px rgba(140, 50, 210, 0.12); }
    54%      { box-shadow: 0 0 26px rgba(255, 120, 20, 0.15); }
}

/* ---------- 🎆 Oud & Nieuw: gouden glinstering over het naam-blok ---------- */
html.season-newyear .hero::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    z-index: 2;
    background: linear-gradient(115deg,
            transparent 35%,
            rgba(255, 230, 150, 0.0) 40%,
            rgba(255, 230, 150, 0.35) 50%,
            rgba(255, 230, 150, 0.0) 60%,
            transparent 65%) no-repeat;
    background-size: 250% 100%;
    animation: goldShimmer 5s ease-in-out infinite;
}

@keyframes goldShimmer {
    0%, 55% { background-position: 120% 0; }
    100%    { background-position: -120% 0; }
}

/* ---------- 🎆 Laatste 10 seconden + middernacht ---------- */
.season-greeting.season-final-seconds {
    position: fixed !important;
    left: 50% !important;
    top: 50% !important;
    bottom: auto !important;
    margin: 0 !important;
    transform: translate(-50%, -50%);
    padding: 1.2rem 2.6rem;
    font-size: 4.5rem;
    z-index: 10003;
    animation: finalPulse 1s ease-in-out infinite;
}

.season-greeting.season-final-seconds .season-greeting-icon {
    font-size: 3rem;
}

@keyframes finalPulse {
    0%   { transform: translate(-50%, -50%) scale(1.15); }
    100% { transform: translate(-50%, -50%) scale(0.95); }
}

.season-greeting.season-celebrate {
    animation: celebrateGlow 1.6s ease-in-out infinite alternate;
}

@keyframes celebrateGlow {
    from { box-shadow: 0 0 14px rgba(255, 213, 74, 0.3); }
    to   { box-shadow: 0 0 30px rgba(255, 213, 74, 0.7), 0 0 60px rgba(255, 91, 138, 0.3); }
}

/* ---------- 🎄 Kerst: versierde kerstboom rechtsonder ---------- */
.season-tree {
    position: fixed;
    right: 1.5rem;
    bottom: 0.5rem;
    /* schaalt mee met je scherm: min. 230px, max. 360px breed */
    width: clamp(230px, 20vw, 360px);
    z-index: -1;                 /* achter je tekst, voor de achtergrond */
    pointer-events: none;
    filter: none;
}

.season-tree svg {
    display: block;
    width: 100%;
    height: auto;
}

.season-tree .tree-light {
    animation: treeTwinkle 3.5s ease-in-out infinite;
}

/* Zacht twinkelen: alleen het gloedje rond elk lampje ademt een beetje */
@keyframes treeTwinkle {
    0%, 100% { opacity: 0.45; }
    50%      { opacity: 0.15; }
}

/* De ster staat stil: geen gloed, geen pulseren */
.season-tree .tree-star {
    animation: none;
}

/* ---------- 🎃 Halloween: kruipende mist onderin ---------- */
.season-fog {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 32vh;
    z-index: 3;
    pointer-events: none;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to top, #000 0%, #000 35%, transparent 100%);
            mask-image: linear-gradient(to top, #000 0%, #000 35%, transparent 100%);
}

.season-fog span {
    position: absolute;
    bottom: -20%;
    left: 0;
    width: 200%;
    height: 120%;
    background:
        radial-gradient(ellipse 18% 45% at 10% 70%, rgba(200, 200, 215, 0.22), transparent 70%),
        radial-gradient(ellipse 22% 50% at 32% 80%, rgba(200, 200, 215, 0.29), transparent 70%),
        radial-gradient(ellipse 16% 40% at 55% 65%, rgba(200, 200, 215, 0.20), transparent 70%),
        radial-gradient(ellipse 24% 55% at 78% 78%, rgba(200, 200, 215, 0.26), transparent 70%),
        radial-gradient(ellipse 18% 45% at 96% 70%, rgba(200, 200, 215, 0.22), transparent 70%);
    animation: fogDrift 38s linear infinite;
}

.season-fog span:nth-child(2) {
    bottom: -30%;
    opacity: 0.8;
    animation-duration: 55s;
    animation-direction: reverse;
}

@keyframes fogDrift {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* Blocked-mode maakt alles klikbaar (zie fix verderop) - ook deze niet */
html.blocked-mode div.season-tree,
html.blocked-mode div.season-tree *,
html.blocked-mode div.season-fog,
html.blocked-mode div.season-fog * {
    pointer-events: none !important;
}

/* ---------- 🎄 Kerst: lichtsnoer onder het menu ----------
   De SVG zelf wordt door js/seasonal.js getekend (passend bij de breedte
   van je menu): een draad die in bogen hangt, met glazen lampjes. */
.xmas-lights {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin-top: -3px;
    height: 34px;
    pointer-events: none;
    z-index: 3;
    overflow: visible;
}

.xmas-lights svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* Gloed om elk lampje: dooft af en toe zachtjes uit, elk op z'n eigen tempo */
.xmas-lights .glow {
    animation: bulbGlow 6s ease-in-out infinite;
}

.xmas-lights .bulb {
    animation: bulbBright 6s ease-in-out infinite;
}

@keyframes bulbGlow {
    0%, 100% { opacity: 0.9; }
    45%      { opacity: 0.25; }
    55%      { opacity: 0.25; }
}

@keyframes bulbBright {
    0%, 100% { opacity: 1; }
    45%      { opacity: 0.75; }
    55%      { opacity: 0.75; }
}

/* ---------- 🎄 Kerst: hangende kerstballen (alleen in de lege zijkanten) ---------- */
.xmas-baubles {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 0;
    pointer-events: none;
    z-index: 1;
}

.xmas-baubles .bauble {
    position: absolute;
    top: 0;
    transform-origin: top center;
    animation: baubleSway 5s ease-in-out infinite;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

.xmas-baubles .bauble svg {
    display: block;
}

@keyframes baubleSway {
    0%, 100% { transform: rotate(3deg); }
    50%      { transform: rotate(-3deg); }
}

/* Te weinig ruimte naast je content: dan geen hangende ballen */
@media (max-width: 1150px) {
    .xmas-baubles {
        display: none;
    }
}

/* Blocked-mode maakt alles klikbaar - deze versiering niet */
html.blocked-mode div.xmas-lights,
html.blocked-mode div.xmas-lights *,
html.blocked-mode div.xmas-baubles,
html.blocked-mode div.xmas-baubles * {
    pointer-events: none !important;
}

/* ---------- Telefoon ---------- */
@media (max-width: 600px) {
    /* Net als de taalswitcher en status-badge: in de normale flow
       i.p.v. zwevend, zodat het nooit over je tekst heen valt. */
    .season-greeting {
        position: relative;
        left: auto;
        bottom: auto;
        margin: 0.7rem auto 0;
        width: fit-content;
        padding: 0.45rem 0.9rem;
        font-size: 0.85rem;
    }

    html.hack-lock .season-greeting {
        position: fixed;
        left: 50%;
        bottom: 1rem;
        transform: translateX(-50%);
        margin: 0;
    }

    /* Spinnenweb staat op telefoon altijd over je tekst: weglaten */
    html.season-halloween body::after {
        content: none;
    }

    html.season-halloween body::before {
        left: auto;
        right: 10%;
        width: 28px;
        background-size: 28px 31px, 1.5px calc(100% - 28px);
    }

    .season-greeting.season-final-seconds {
        font-size: 3rem;
    }

    /* Op telefoon niet zwevend over je tekst, maar gewoon onderaan de
       pagina, gecentreerd boven de footer. */
    .season-tree {
        position: relative;
        right: auto;
        bottom: auto;
        z-index: auto;
        width: 210px;
        margin: 1rem auto 0.5rem;
    }

    /* Inlogscherm heeft geen footer: daar op telefoon geen boom */
    html.hack-lock .season-tree {
        display: none;
    }

    /* Mist: lager en vager, zodat je onderste regels leesbaar blijven */
    .season-fog {
        height: 12vh;
        opacity: 0.55;
    }

    /* Op telefoon staat het menu onder elkaar; daar past het icoontje
       niet netjes tussen, en de groet hierboven laat het feest al zien. */
    html[data-season] .logo::before {
        content: none !important;
    }
}

/* Wie bewegingen heeft uitgezet in z'n telefoon/pc: alles stil */
@media (prefers-reduced-motion: reduce) {
    html[data-season] .logo::before,
    .xmas-lights *,
    .xmas-baubles *,
    html.season-halloween body::before,
    html.season-halloween .hero,
    html.season-newyear .hero::before,
    .season-greeting.season-final-seconds,
    .season-greeting.season-celebrate,
    .season-tree *,
    .season-fog span {
        animation: none !important;
    }
}

/* ==========================================================
   FIX: blocked-mode maakt in style.css ALLES klikbaar
   ("html.blocked-mode * { pointer-events: auto !important }").
   Daardoor ving het doorzichtige effecten-canvas over de hele
   pagina elke klik op. Deze selectors zijn specifieker en winnen
   dus, net als de fix voor #pageLoadCover in style.css.
   ========================================================== */
html.blocked-mode canvas.season-canvas,
html.unlocked-mode canvas.season-canvas,
html canvas.season-canvas,
html.blocked-mode div.season-greeting,
html.blocked-mode div.season-greeting *,
html.unlocked-mode div.season-greeting,
html.unlocked-mode div.season-greeting * {
    pointer-events: none !important;
}

/* ==========================================================
   LICHTE MODUS — op pagina's met een ingebedde pagina (adobe.php).
   Daar draait niks: bewegende dingen bovenop een iframe lieten de
   browser vastlopen. js/seasonal.js zet de class "season-lite".
   ========================================================== */
html.season-lite *,
html.season-lite *::before,
html.season-lite *::after {
    animation: none !important;
}

html.season-lite .season-tree .tree-light {
    opacity: 1;
}
