/* Christmas party welcome screen (home page only, once per visit, until 8 Dec 2026).
   Shown only when the inline head script adds html.xmas, so nothing flashes for anyone else. */
.xmas-intro { display: none; }
html.xmas { overflow: hidden; }
html.xmas body { overflow: hidden; }
html.xmas .xmas-intro { display: block; }

.xmas-intro {
  position: fixed; inset: 0; z-index: 9999; overflow: hidden; cursor: pointer;
  color: #fff; background: #0b1a2c; isolation: isolate;
  -webkit-tap-highlight-color: transparent; user-select: none;
  --gold: #ffd76a; --red: #e53a3a; --green: #3fb36b;
}
.xmas-intro:focus { outline: none; }

/* Backdrop: the poster itself, blown up and blurred, under a starry-night tint. */
.xi-bg {
  position: absolute; inset: -8%; z-index: -3;
  background: url("../images/events/christmas-party-2026-blur.jpg") center / cover no-repeat;
  filter: blur(28px) saturate(1.35); transform: scale(1.15);
  animation: xi-kenburns 22s ease-in-out infinite alternate;
}
.xi-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 45%, rgba(11, 26, 44, .35), rgba(11, 26, 44, .88) 70%),
    linear-gradient(180deg, rgba(8, 20, 36, .75), rgba(14, 52, 60, .55) 55%, rgba(8, 20, 36, .9));
}
.xi-aurora { position: absolute; inset: 0; z-index: -2; pointer-events: none; mix-blend-mode: screen; }
.xi-aurora i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; }
.xi-aurora i:nth-child(1) { width: 55vmax; height: 40vmax; left: -15vmax; top: -10vmax; background: #d1286c; animation: xi-drift1 16s ease-in-out infinite alternate; }
.xi-aurora i:nth-child(2) { width: 50vmax; height: 38vmax; right: -18vmax; top: 10vmax; background: #1f8a7a; animation: xi-drift2 19s ease-in-out infinite alternate; }
.xi-aurora i:nth-child(3) { width: 45vmax; height: 30vmax; left: 20vmax; bottom: -18vmax; background: #c9932b; opacity: .35; animation: xi-drift1 23s ease-in-out infinite alternate-reverse; }
.xi-snow { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }

/* Fairy-light garland across the top */
.xi-lights { position: absolute; left: 0; right: 0; top: 0; height: 64px; pointer-events: none; z-index: 2; }
.xi-lights svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.xi-lights b {
  position: absolute; width: 11px; height: 16px; margin: -2px 0 0 -5.5px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: var(--c); box-shadow: 0 0 10px 3px var(--c), 0 0 26px 6px var(--c);
  animation: xi-twinkle 1.6s ease-in-out infinite alternate; animation-delay: var(--d);
  opacity: 0; transform: translateY(-20px);
}
.xi-lights b::before { content: ""; position: absolute; left: 3px; top: -5px; width: 5px; height: 6px; border-radius: 2px; background: #2c3a2f; }
.xmas-intro.go .xi-lights b { opacity: 1; transform: none; transition: opacity .5s var(--in), transform .7s cubic-bezier(.3, 1.6, .5, 1) var(--in); }

/* Stage */
.xi-stage {
  position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(10px, 2.2vh, 22px); padding: 58px 16px max(18px, env(safe-area-inset-bottom));
}
.xi-kicker {
  margin: 0; font-family: "Fredoka", system-ui, sans-serif; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  font-size: clamp(.8rem, 1.6vw + .45rem, 1.15rem); color: var(--gold);
  text-shadow: 0 0 14px rgba(255, 215, 106, .75), 0 0 34px rgba(255, 215, 106, .35);
  opacity: 0; transform: translateY(-14px); transition: opacity .9s ease .35s, transform .9s cubic-bezier(.2, 1.2, .3, 1) .35s;
}
.xi-kicker span { display: inline-block; animation: xi-spin-star 4s linear infinite; }
.xmas-intro.go .xi-kicker { opacity: 1; transform: none; }

.xi-float { perspective: 1200px; animation: xi-bob 6s ease-in-out 1.6s infinite; }
.xi-card {
  --h: min(calc(100svh - 225px), calc((100vw - 40px) * 1.5), 900px);
  position: relative; height: var(--h); aspect-ratio: 2 / 3; border-radius: 22px; padding: 7px;
  transform-style: preserve-3d; overflow: hidden;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 60px rgba(255, 215, 106, .28);
  opacity: 0; filter: blur(14px);
  scale: .25; rotate: -10deg; translate: 0 18vh;
  transition: opacity .7s ease, filter 1s ease, scale 1.5s cubic-bezier(.18, 1.35, .3, 1), rotate 1.5s cubic-bezier(.18, 1.35, .3, 1), translate 1.5s cubic-bezier(.18, 1.25, .3, 1), box-shadow .4s;
  animation: xi-glow 3.2s ease-in-out 1.6s infinite alternate;
}
@supports not (height: 1svh) { .xi-card { --h: min(calc(100vh - 225px), calc((100vw - 40px) * 1.5), 900px); } }
.xmas-intro.go .xi-card { opacity: 1; filter: none; scale: 1; rotate: 0deg; translate: 0 0; }
/* rotating gold / red / green border */
.xi-card::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 260%; aspect-ratio: 1; translate: -50% -50%; z-index: -1;
  background: conic-gradient(from 0deg, var(--gold), var(--red), #fff6d6, var(--green), var(--gold), var(--red), #fff6d6, var(--green), var(--gold));
  animation: xi-rotate 5s linear infinite;
}
.xi-card picture, .xi-card img { display: block; width: 100%; height: 100%; }
.xi-card img { object-fit: cover; border-radius: 16px; background: #fff; }
.xi-shine {
  position: absolute; inset: 7px; border-radius: 16px; pointer-events: none; overflow: hidden;
}
.xi-shine::after {
  content: ""; position: absolute; top: -20%; bottom: -20%; left: -60%; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: skewX(-18deg) translateX(-120%); animation: xi-sweep 5s ease-in-out 2s infinite;
}

.xi-enter {
  position: relative; display: inline-flex; align-items: center; gap: 10px; border: 0; cursor: pointer;
  font: 700 clamp(.95rem, .9vw + .7rem, 1.15rem) / 1 "Fredoka", system-ui, sans-serif; letter-spacing: .02em;
  color: #fff; padding: 15px 26px; border-radius: 999px;
  background: linear-gradient(135deg, #e53a3a, #d1286c); box-shadow: 0 10px 30px rgba(209, 40, 108, .45), inset 0 1px 0 rgba(255, 255, 255, .35);
  opacity: 0; transform: translateY(16px); transition: opacity .8s ease 1.5s, transform .8s cubic-bezier(.2, 1.3, .3, 1) 1.5s;
}
.xi-enter svg { width: 20px; height: 20px; animation: xi-nudge 1.4s ease-in-out infinite; }
.xi-enter::before {
  content: ""; position: absolute; inset: -4px; border-radius: inherit; border: 2px solid rgba(255, 215, 106, .8);
  animation: xi-ping 2s ease-out 2.3s infinite; opacity: 0;
}
.xi-enter:focus-visible { outline: 3px solid var(--gold); outline-offset: 5px; }
.xmas-intro.go .xi-enter { opacity: 1; transform: none; }
.xi-hint { margin: -6px 0 0; font: 600 .8rem/1.2 "Nunito", system-ui, sans-serif; color: rgba(255, 255, 255, .7); opacity: 0; transition: opacity .8s ease 2s; }
.xmas-intro.go .xi-hint { opacity: 1; }

/* Leaving: the screen opens like a window from where they tapped, the poster flies toward them. */
.xmas-intro.leave { pointer-events: none; }
.xmas-intro.leave .xi-card { scale: 1.25; opacity: 0; filter: blur(6px); transition: scale 1s cubic-bezier(.5, 0, .2, 1), opacity .8s ease .15s, filter .8s ease; animation: none; }
.xmas-intro.leave .xi-kicker, .xmas-intro.leave .xi-enter, .xmas-intro.leave .xi-hint { opacity: 0; transition: opacity .35s ease; }

@keyframes xi-kenburns { from { transform: scale(1.15) translate(0, 0); } to { transform: scale(1.3) translate(-2%, 2%); } }
@keyframes xi-drift1 { to { transform: translate(12vmax, 8vmax) scale(1.15); } }
@keyframes xi-drift2 { to { transform: translate(-10vmax, 10vmax) scale(.9); } }
@keyframes xi-rotate { to { rotate: 360deg; } }
@keyframes xi-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes xi-glow { from { box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 40px rgba(255, 215, 106, .2); } to { box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 90px rgba(255, 215, 106, .5); } }
@keyframes xi-sweep { 0% { transform: skewX(-18deg) translateX(-120%); } 45%, 100% { transform: skewX(-18deg) translateX(480%); } }
@keyframes xi-twinkle { from { filter: brightness(.55); } to { filter: brightness(1.25); } }
@keyframes xi-spin-star { to { transform: rotate(360deg); } }
@keyframes xi-nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(5px); } }
@keyframes xi-ping { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(1.35, 1.6); } }

@media (prefers-reduced-motion: reduce) {
  .xi-bg, .xi-aurora i, .xi-float, .xi-card, .xi-card::before, .xi-shine::after, .xi-lights b, .xi-kicker span, .xi-enter svg, .xi-enter::before { animation: none !important; }
  .xi-card { scale: 1; rotate: 0deg; translate: 0 0; filter: none; transition: opacity .6s ease; }
  .xi-kicker, .xi-enter, .xi-hint, .xi-lights b { transition-delay: 0s !important; transform: none; }
}

/* ---------- Home-page Christmas party banner (shown only while html.xmas-season) ---------- */
.xmas-banner { display: none; padding: clamp(40px, 6vw, 72px) 0 0; }
html.xmas-season .xmas-banner { display: block; }
.xb-card {
  position: relative; overflow: hidden; isolation: isolate; border-radius: 32px; color: #fff;
  display: grid; grid-template-columns: minmax(180px, 300px) 1fr; gap: clamp(24px, 4vw, 56px); align-items: center;
  padding: clamp(46px, 5vw, 64px) clamp(22px, 5vw, 64px) clamp(28px, 4vw, 52px);
  background:
    radial-gradient(ellipse 60% 80% at 0% 0%, rgba(209, 40, 108, .55), transparent 60%),
    radial-gradient(ellipse 60% 80% at 100% 100%, rgba(31, 138, 122, .55), transparent 60%),
    linear-gradient(135deg, #10223a, #0d2f3a);
  box-shadow: 0 24px 60px rgba(16, 34, 58, .28);
}
/* gently falling snow (two layers, CSS only) */
.xb-card::before, .xb-card::after {
  content: ""; position: absolute; inset: -200px 0 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 20px 30px, #fff 50%, transparent 52%), radial-gradient(1.5px 1.5px at 90px 120px, rgba(255,255,255,.8) 50%, transparent 52%),
    radial-gradient(2.5px 2.5px at 160px 60px, #fff 50%, transparent 52%), radial-gradient(1.5px 1.5px at 60px 170px, rgba(255,255,255,.7) 50%, transparent 52%),
    radial-gradient(2px 2px at 140px 190px, rgba(255,224,140,.9) 50%, transparent 52%);
  background-size: 200px 200px; animation: xb-snow 14s linear infinite; opacity: .85;
}
.xb-card::after { background-size: 310px 310px; animation-duration: 22s; opacity: .5; filter: blur(.6px); }
@keyframes xb-snow { from { transform: translateY(0); } to { transform: translateY(200px); } }

.xb-lights {
  position: absolute; left: 0; right: 0; top: 10px; height: 18px; pointer-events: none;
  background: radial-gradient(circle 5px at 50% 9px, var(--c1, #ff4d4d) 90%, transparent) 0 0 / 56px 18px repeat-x;
  filter: drop-shadow(0 0 6px rgba(255, 215, 106, .9)); animation: xb-blink 1.4s steps(2) infinite;
}
.xb-lights::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle 5px at 50% 9px, #4fd27e 90%, transparent) 28px 0 / 56px 18px repeat-x;
  animation: xb-blink 1.4s steps(2) .7s infinite;
}
@keyframes xb-blink { 50% { opacity: .35; } }

.xb-poster {
  position: relative; display: block; border-radius: 18px; padding: 6px; overflow: hidden; isolation: isolate;
  rotate: -4deg; box-shadow: 0 20px 44px rgba(0, 0, 0, .45), 0 0 40px rgba(255, 215, 106, .3);
  transition: rotate .4s cubic-bezier(.2, 1.4, .3, 1), scale .4s cubic-bezier(.2, 1.4, .3, 1);
}
.xb-poster::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 260%; aspect-ratio: 1; translate: -50% -50%; z-index: -1;
  background: conic-gradient(#ffd76a, #e53a3a, #fff6d6, #3fb36b, #ffd76a, #e53a3a, #fff6d6, #3fb36b, #ffd76a);
  animation: xi-rotate 6s linear infinite;
}
.xb-poster img { display: block; width: 100%; height: auto; border-radius: 13px; background: #fff; }
.xb-poster:hover, .xb-poster:focus-visible { rotate: 0deg; scale: 1.04; }
.xb-poster:focus-visible { outline: 3px solid #ffd76a; outline-offset: 4px; }

.xb-text .eyebrow { color: #ffd76a; }
.xb-text h2 { color: #fff; margin: 0 0 16px; font-size: clamp(1.9rem, 3.6vw, 3rem); }
.xb-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.xb-chips span {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px;
  font-family: var(--font-head); font-weight: 600; font-size: 1.02rem;
  background: linear-gradient(135deg, #e53a3a, #c41f4f); box-shadow: 0 6px 16px rgba(229, 58, 58, .35);
}
.xb-chips svg { width: 18px; height: 18px; }
.xb-text p { color: #e6edf7; font-size: 1.08rem; max-width: 52ch; margin-bottom: 24px; }
.xb-text .btn-row .btn svg { width: 19px; height: 19px; }

@media (max-width: 720px) {
  .xb-card { grid-template-columns: 1fr; text-align: center; }
  .xb-poster { width: min(62%, 240px); margin: 0 auto; }
  .xb-chips, .xb-text .btn-row { justify-content: center; }
  .xb-text p { margin-left: auto; margin-right: auto; }
  .xb-text .btn-row .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .xb-card::before, .xb-card::after, .xb-lights, .xb-lights::after, .xb-poster::before { animation: none; }
}
