/* ============================================================
   CHRISTMAS 2026 — Belleview
   Santa hat on the logo, snow, hiding elf, homepage strip.
   Loaded by inc/christmas.php. Every rule is gated behind
   html.xmas-on (or only targets elements christmas.js creates),
   so nothing shows once the end date has passed.
============================================================ */

:root {
    --xmas-snow-z: 98;          /* header is 100, mobile menu 99 */
    --xmas-strip-bg: #8f1d21;
    --xmas-strip-accent: #f7ecde;
}

/* Strip is printed in front-page.php; hidden unless the season is on */
.xmas-strip { display: none; }
html.xmas-on .xmas-strip { display: block; }

/* ── Santa hat on the "B" of the header logo ──────────────── */
html.xmas-on .bv-header__logo { position: relative; }
html.xmas-on .bv-header__logo::after {
    content: "";
    position: absolute;
    left: 51px;
    top: -1px;
    width: 30px;
    height: 24px;
    background: url("../images/christmas/santa-hat.svg") center / contain no-repeat;
    transform: rotate(-12deg);
    pointer-events: none;
}
@media (max-width: 1023px) {
    html.xmas-on .bv-header__logo::after { left: 44px; top: 1px; width: 28px; height: 22px; }
}

/* ── Snow ─────────────────────────────────────────────────────
   Fixed layer, never clickable, sits under the header. */
.xmas-snow {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: var(--xmas-snow-z);
}
.xmas-snow__flake {
    position: absolute;
    top: -12px;
    left: var(--x);
    animation: xmas-fall var(--fall) linear var(--delay) infinite;
    will-change: transform;
}
.xmas-snow__flake::before {
    content: "";
    display: block;
    width: var(--size);
    height: var(--size);
    border-radius: 50%;
    background: #fff;
    opacity: var(--o);
    /* faint edge so flakes still read over white sections */
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.9), 0 0 1px rgba(0, 0, 0, 0.25);
    animation: xmas-sway var(--sway) ease-in-out infinite alternate;
}
@keyframes xmas-fall { to { transform: translate3d(var(--drift), 105vh, 0); } }
@keyframes xmas-sway { from { transform: translateX(-10px); } to { transform: translateX(10px); } }

/* ── Elf ──────────────────────────────────────────────────────
   Positioned by christmas.js on top of a random photo/heading. */
.xmas-elf {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 20;
    width: 64px;
    pointer-events: none;
}
.xmas-elf__body {
    pointer-events: auto;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transform-origin: 50% 70%;
    transform: translateY(35%) scale(0.3);
    opacity: 0;
    transition: transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}
.xmas-elf.is-out .xmas-elf__body { transform: none; opacity: 1; }
.xmas-elf svg { display: block; width: 100%; height: auto; overflow: visible; }
.xmas-elf .xmas-elf__leg {
    transform-box: fill-box;
    transform-origin: 50% 0;
    animation: xmas-swing 1.5s ease-in-out infinite alternate;
}
.xmas-elf .xmas-elf__leg--r { animation-delay: -0.75s; }
.xmas-elf .xmas-elf__eyes {
    transform-box: fill-box;
    transform-origin: center;
    animation: xmas-blink 5s infinite;
}
.xmas-elf.is-hop .xmas-elf__body { animation: xmas-hop 0.7s cubic-bezier(0.3, 0.7, 0.4, 1); }
.xmas-elf__bubble {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translate(-50%, 6px) scale(0.8);
    opacity: 0;
    padding: 4px 10px;
    border-radius: 999px;
    background: #fff;
    color: #a4161a;
    font-family: inherit;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}
.xmas-elf.is-talking .xmas-elf__bubble { opacity: 1; transform: translate(-50%, 0) scale(1); }
@keyframes xmas-swing { from { transform: rotate(12deg); } to { transform: rotate(-12deg); } }
@keyframes xmas-blink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(0.1); } }
@keyframes xmas-hop {
    0%, 100% { transform: translateY(0); }
    40% { transform: translateY(-18px) rotate(-6deg); }
    70% { transform: translateY(0) rotate(4deg); }
}
@media (max-width: 767px) { .xmas-elf { width: 52px; } }

/* ── Homepage strip: string of lights + greeting ─────────────── */
.xmas-strip {
    position: relative;
    background: var(--xmas-strip-bg);
    color: #fff;
    text-align: center;
    padding: 1.35rem 1.5rem 1.1rem;
}
.xmas-strip::before {
    /* fairy lights along the top edge */
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 10px;
    background:
        radial-gradient(circle at 12px 5px, #ffd166 0 3.5px, transparent 4.5px) 0 0 / 96px 10px repeat-x,
        radial-gradient(circle at 36px 5px, #7bdff2 0 3.5px, transparent 4.5px) 0 0 / 96px 10px repeat-x,
        radial-gradient(circle at 60px 5px, #ff6b6b 0 3.5px, transparent 4.5px) 0 0 / 96px 10px repeat-x,
        radial-gradient(circle at 84px 5px, #80ed99 0 3.5px, transparent 4.5px) 0 0 / 96px 10px repeat-x;
    animation: xmas-twinkle 2.4s ease-in-out infinite alternate;
}
.xmas-strip__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 1.25rem;
}
.xmas-strip__text {
    margin: 0;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.04em;
}
.xmas-strip__link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    border: 1.5px solid var(--xmas-strip-accent);
    color: var(--xmas-strip-accent);
    font-weight: 800;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color 0.25s ease, color 0.25s ease;
}
.xmas-strip__link:hover,
.xmas-strip__link:focus-visible {
    background: var(--xmas-strip-accent);
    color: var(--xmas-strip-bg);
}
@keyframes xmas-twinkle { from { opacity: 0.55; } to { opacity: 1; } }

/* ── Respect "reduce motion" ───────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .xmas-elf__body,
    .xmas-elf__bubble { transition: none; }
    .xmas-elf .xmas-elf__leg,
    .xmas-elf .xmas-elf__eyes,
    .xmas-elf.is-hop .xmas-elf__body,
    .xmas-strip::before { animation: none; }
}
