/* =========================================================
   WINTER & CHRISTMAS EFFECTS (seasonal) - Corinthians Resort home page only
   Decorative only: no layout or content changes. Every class is
   prefixed `xm-`. Palette: night-ink, champagne gold, ivory, with
   burgundy and emerald jewel accents. Fonts: the site's own Barlow / Noto Serif.
   ========================================================= */

:root {
  --xm-gold: #bd8f50;
  --xm-champagne: #e3c57f;
  --xm-ivory: #f5efe4;
  --xm-night: #0b0f17;
  --xm-night-2: #131b28;
  --xm-night-3: #1b2636;
}

.xm-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.xm-deco {
  position: absolute;
  pointer-events: none;
  z-index: 2;
}

/* ---------- Snowfall canvas (below the booking modal, above the header) ---------- */
.xm-snow {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
}

/* ---------- Shooting star ---------- */
.xm-comet {
  position: fixed;
  top: 0;
  left: 0;
  width: 150px;
  height: 2px;
  margin-top: -1px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 999;
  opacity: 0;
  transform-origin: 100% 50%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 232, 190, 0.95));
}

.xm-comet::after {
  content: "";
  position: absolute;
  right: -3px;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 10px 4px rgba(227, 197, 127, 0.9);
}

.xm-comet.is-on {
  animation: xm-comet 1.5s cubic-bezier(0.25, 0.6, 0.35, 1) forwards;
}

@keyframes xm-comet {
  0% { opacity: 0; transform: translate(var(--x0), var(--y0)) rotate(var(--a)); }
  12% { opacity: 1; }
  75% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--x1), var(--y1)) rotate(var(--a)); }
}

/* ---------- Santa's gold sleigh fly-by ---------- */
.xm-sleigh {
  position: fixed;
  top: 0;
  left: 0;
  width: 240px;
  pointer-events: none;
  z-index: 999;
  opacity: 0;
  color: var(--xm-champagne);
  filter: drop-shadow(0 0 6px rgba(227, 197, 127, 0.55)) drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
  will-change: transform;
}

.xm-sleigh > svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  animation: xm-bob 1.8s ease-in-out infinite alternate;
}

.xm-sleigh.is-on {
  animation: xm-fly var(--dur, 14s) cubic-bezier(0.45, 0.05, 0.55, 0.95) forwards;
}

@keyframes xm-fly {
  0% { opacity: 0; transform: translate(-280px, var(--y0)); }
  4% { opacity: 1; }
  94% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(100vw + 30px), var(--y1)); }
}

@keyframes xm-bob {
  from { transform: translateY(-5px) rotate(-1.5deg); }
  to { transform: translateY(5px) rotate(1deg); }
}

/* gold dust trailing the sleigh */
.xm-sleigh-dust {
  position: absolute;
  left: -48px;
  top: 52%;
  width: 70px;
  height: 22px;
}

.xm-sleigh-dust i {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fff3cf;
  box-shadow: 0 0 6px 2px rgba(227, 197, 127, 0.8);
  animation: xm-dust 1.2s ease-in-out infinite;
}

.xm-sleigh-dust i:nth-child(1) { left: 62px; top: 4px; animation-delay: 0s; }
.xm-sleigh-dust i:nth-child(2) { left: 50px; top: 12px; animation-delay: -0.3s; width: 2px; height: 2px; }
.xm-sleigh-dust i:nth-child(3) { left: 40px; top: 6px; animation-delay: -0.6s; }
.xm-sleigh-dust i:nth-child(4) { left: 29px; top: 15px; animation-delay: -0.2s; width: 2px; height: 2px; }
.xm-sleigh-dust i:nth-child(5) { left: 19px; top: 8px; animation-delay: -0.8s; }
.xm-sleigh-dust i:nth-child(6) { left: 9px; top: 17px; animation-delay: -0.5s; width: 2px; height: 2px; }
.xm-sleigh-dust i:nth-child(7) { left: 0; top: 10px; animation-delay: -0.9s; width: 2px; height: 2px; }

@keyframes xm-dust {
  0%, 100% { opacity: 0; transform: scale(0.6); }
  50% { opacity: 1; transform: scale(1); }
}

.xm-ld-nose {
  animation: xm-halo 1.3s ease-in-out infinite;
}

@keyframes xm-halo {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

/* ---------- Snow on/off button ---------- */
.xm-toggle {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 1001;
  width: 44px;
  height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(214, 178, 118, 0.7);
  background: rgba(11, 15, 23, 0.66);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #f3dfb4;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 240, 210, 0.18);
  transition: transform 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}

.xm-toggle:hover {
  transform: scale(1.07);
  background: rgba(11, 15, 23, 0.85);
  border-color: var(--xm-champagne);
}

.xm-toggle:focus-visible {
  outline: 2px solid var(--xm-gold);
  outline-offset: 3px;
}

.xm-toggle svg {
  transition: transform 0.6s ease;
}

.xm-toggle[aria-pressed="true"] svg {
  transform: rotate(60deg);
}

.xm-toggle .xm-off {
  display: none;
}

.xm-toggle[aria-pressed="false"] .xm-off {
  display: inline;
}

/* ---------- Fairy lights ---------- */
.xm-lights {
  top: 0;
  left: 0;
  right: 0;
  height: 44px;
  overflow: visible;
}

.xm-lights svg {
  display: block;
  overflow: visible;
}

.xm-bulb,
.xm-glow {
  animation: xm-twinkle 2.6s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}

.xm-glow {
  animation-name: xm-glow;
}

@keyframes xm-twinkle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes xm-glow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.1; }
}

/* ---------- Hanging glass baubles ---------- */
.xm-baubles {
  top: 0;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.xm-baubles.is-right {
  right: clamp(12px, 3vw, 56px);
  transform-origin: top right;
}

.xm-baubles.is-left {
  left: clamp(12px, 3vw, 56px);
  transform-origin: top left;
}

.xm-hang {
  position: relative;
  display: block;
  width: var(--sz);
  height: calc(var(--len) + var(--sz) * 1.3);
  transform-origin: 50% 0;
  animation: xm-swing var(--sw, 3.6s) ease-in-out var(--sd, 0s) infinite alternate;
}

.xm-hang::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  margin-left: -0.5px;
  height: calc(var(--len) + 2px);
  background: linear-gradient(180deg, rgba(189, 143, 80, 0.1), rgba(189, 143, 80, 0.85));
}

.xm-hang svg {
  position: absolute;
  left: 0;
  top: var(--len);
  width: 100%;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 6px 8px rgba(60, 35, 20, 0.22));
}

@keyframes xm-swing {
  from { transform: rotate(-6deg); }
  to { transform: rotate(6deg); }
}

/* ---------- Gold sparkles ---------- */
.xm-sparkles {
  top: 26px;
  width: 70px;
  height: 60px;
}

.xm-sparkles.is-left { left: clamp(12px, 3vw, 56px); }
.xm-sparkles.is-right { right: clamp(12px, 3vw, 56px); }

.xm-spark {
  position: absolute;
  fill: var(--xm-gold);
  animation: xm-spark 2.8s ease-in-out infinite;
  animation-delay: var(--d, 0s);
  filter: drop-shadow(0 0 4px rgba(227, 190, 120, 0.85));
}

@keyframes xm-spark {
  0%, 100% { transform: scale(0.35) rotate(0deg); opacity: 0.25; }
  50% { transform: scale(1) rotate(45deg); opacity: 1; }
}

/* ---------- Snow drift along a section's bottom edge ---------- */
.xm-drift {
  left: 0;
  right: 0;
  bottom: -1px;
  height: 26px;
  z-index: 3;
  background:
    radial-gradient(48px 15px at 50% 100%, #fff 96%, rgba(255, 255, 255, 0) 100%) 0 100% / 96px 26px repeat-x,
    radial-gradient(74px 22px at 50% 100%, #f3f5f8 96%, rgba(243, 245, 248, 0) 100%) 48px 100% / 148px 26px repeat-x;
  filter: drop-shadow(0 -2px 4px rgba(120, 100, 80, 0.16));
}

/* ---------- Snow resting on the footer's top edge ---------- */
.xm-snowcap {
  left: 0;
  right: 0;
  top: -1px;
  height: 24px;
  z-index: 3;
  background:
    radial-gradient(40px 13px at 50% 0, #fff 96%, rgba(255, 255, 255, 0) 100%) 0 0 / 80px 24px repeat-x,
    radial-gradient(62px 19px at 50% 0, #f1f3f6 96%, rgba(241, 243, 246, 0) 100%) 40px 0 / 124px 24px repeat-x;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.28));
}

/* ---------- Gold tree with gifts in a bottom corner (wide screens only) ---------- */
/* Content is max-w-7xl (1280px) + 24px padding, so the tree only appears where the side
   gutter is wide enough to hold it without touching any content. */
.xm-ground {
  display: none;
  bottom: 22px;
  width: 84px;
  z-index: 1;
}

.xm-ground.is-left { left: 12px; }
.xm-ground.is-right { right: 12px; }

@media (min-width: 1600px) {
  .xm-ground { width: 132px; }
  .xm-ground.is-left { left: 22px; }
  .xm-ground.is-right { right: 22px; }
}

.xm-ground svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

@media (min-width: 1440px) {
  .xm-ground { display: block; }
}

.xm-tree-day .xm-ld-light {
  animation: xm-day-twinkle var(--tw, 1.8s) ease-in-out var(--d, 0s) infinite alternate;
}

.xm-tree-day .xm-ld-star-halo {
  animation: xm-halo 2.8s ease-in-out infinite;
}

.xm-tree-day .xm-ld-star {
  transform-box: fill-box;
  transform-origin: center;
  animation: xm-star 2.8s ease-in-out infinite;
}

@keyframes xm-day-twinkle {
  from { opacity: 1; }
  to { opacity: 0.3; }
}

@keyframes xm-star {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.14) rotate(10deg); }
}

/* ---------- Hero: frost, snowflake crystals, light glint ---------- */
.xm-hero-fx {
  inset: 0;
  overflow: hidden;
  z-index: 10;
  container-type: size;
}

.xm-frost-edge {
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 120px 14px rgba(255, 244, 225, 0.18);
}

.xm-frost {
  position: absolute;
  width: clamp(110px, 17vw, 250px);
  height: clamp(110px, 17vw, 250px);
  background: radial-gradient(circle at 0 0, rgba(255, 246, 230, 0.34), rgba(255, 246, 230, 0) 62%);
  -webkit-mask-image: radial-gradient(circle at 0 0, #000 28%, rgba(0, 0, 0, 0) 72%);
  mask-image: radial-gradient(circle at 0 0, #000 28%, rgba(0, 0, 0, 0) 72%);
  animation: xm-frost 7s ease-in-out infinite alternate;
}

.xm-frost.is-tl { top: 0; left: 0; }
.xm-frost.is-tr { top: 0; right: 0; transform: scaleX(-1); }
.xm-frost.is-bl { bottom: 0; left: 0; transform: scaleY(-1); }
.xm-frost.is-br { bottom: 0; right: 0; transform: scale(-1, -1); }

@keyframes xm-frost {
  from { opacity: 0.4; }
  to { opacity: 0.78; }
}

.xm-crystal {
  position: absolute;
  top: -50px;
  left: var(--x);
  width: var(--s);
  height: var(--s);
  opacity: 0;
  animation: xm-fall var(--dur) linear var(--del) infinite;
}

.xm-crystal svg {
  display: block;
  width: 100%;
  height: 100%;
  animation: xm-spin var(--spin) linear infinite;
  filter: drop-shadow(0 0 3px rgba(255, 236, 200, 0.9));
}

.xm-crystal.is-soft svg {
  filter: blur(1.2px) drop-shadow(0 0 4px rgba(255, 236, 200, 0.8));
}

@keyframes xm-fall {
  0% { transform: translate3d(0, 0, 0); opacity: 0; }
  8% { opacity: var(--o); }
  90% { opacity: var(--o); }
  100% { transform: translate3d(var(--dx), calc(100cqh + 90px), 0); opacity: 0; }
}

@keyframes xm-spin {
  to { transform: rotate(360deg); }
}

.xm-glint {
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: 0;
  width: 28%;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0), rgba(255, 240, 215, 0.13) 50%, rgba(255, 255, 255, 0));
  mix-blend-mode: screen;
  transform: translateX(-150%) skewX(-12deg);
  animation: xm-glint 11s ease-in-out 3s infinite;
}

@keyframes xm-glint {
  0% { transform: translateX(-150%) skewX(-12deg); }
  22%, 100% { transform: translateX(480%) skewX(-12deg); }
}

/* ---------- Paused via the snowflake button ---------- */
html.xm-paused .xm-deco,
html.xm-paused .xm-deco * {
  animation-play-state: paused !important;
}

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
  .xm-baubles { transform: scale(0.85); }
}

@media (max-width: 767px) {
  .xm-baubles { transform: scale(0.68); }
  .xm-sparkles { transform: scale(0.75); transform-origin: top left; }
  .xm-sleigh { width: 160px; }
  .xm-drift { height: 18px; background-size: 70px 18px, 110px 18px; }
  .xm-snowcap { height: 18px; background-size: 60px 18px, 96px 18px; }
  .xm-crystal:nth-of-type(n + 6) { display: none; }

  /* clear any fixed bottom bar on mobile */
  .xm-toggle {
    left: 12px;
    bottom: 58px;
    width: 40px;
    height: 40px;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .xm-toggle { bottom: 58px; }
}

@media (prefers-reduced-motion: reduce) {
  .xm-bulb,
  .xm-glow,
  .xm-hang,
  .xm-spark,
  .xm-frost,
  .xm-tree-day * {
    animation: none !important;
  }

  .xm-comet,
  .xm-sleigh,
  .xm-crystal,
  .xm-glint,
  .xm-toggle {
    display: none !important;
  }
}

/* =========================================================
   FESTIVE PAGE LOADER - "The Gift"
   Deep emerald night, a gold wreath that grows around a self-drawing snowflake,
   a progress ring with a glowing tip, rising gold dust and slow aurora light.
   Exit: a seam of gold light splits the centre and the screen opens like a gift.
   ========================================================= */
html:has(.xm-loader:not(.is-done):not(.is-skip)),
html:has(.xm-loader:not(.is-done):not(.is-skip)) body {
  overflow: hidden;
}

.xm-loader {
  --ld-gold: #d8b46a;
  --ld-gold-hi: #f6dc9a;
  --ld-ivory: #f6f0e4;
  --ld-bg: linear-gradient(160deg, #03110c 0%, #0a2a1f 48%, #04140e 100%);
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--ld-ivory);
  /* safety net: disappears on its own if the script never runs */
  animation: xm-ld-failsafe 0.8s ease 7s forwards;
}

.xm-loader.is-skip { display: none; }

@keyframes xm-ld-failsafe {
  to { opacity: 0; visibility: hidden; pointer-events: none; }
}

/* the two halves of the "wrapping" - one continuous background split down the middle */
.xm-loader .xm-ld-door {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50.5%;
  background: var(--ld-bg);
  background-size: 100vw 100%;
  transition: transform 1s cubic-bezier(0.76, 0, 0.24, 1) 0.55s;
  will-change: transform;
}
.xm-loader .xm-ld-door.is-l { left: 0; background-position: 0 0; }
.xm-loader .xm-ld-door.is-r { right: 0; background-position: 100% 0; }
.xm-loader .xm-ld-door.is-l::after,
.xm-loader .xm-ld-door.is-r::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 60% at 100% 50%, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.45) 100%);
}
.xm-loader .xm-ld-door.is-r::after {
  background: radial-gradient(70% 60% at 0% 50%, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.45) 100%);
}

/* slow aurora light */
.xm-loader .xm-ld-aurora {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  transition: opacity 0.5s ease;
}
.xm-loader .xm-ld-aurora i {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0;
  animation: xm-ld-fade 1.6s ease forwards, xm-ld-drift 14s ease-in-out infinite alternate;
}
.xm-loader .xm-ld-aurora i:nth-child(1) {
  width: 62vmax; height: 34vmax; left: -12vmax; top: -10vmax;
  background: radial-gradient(closest-side, rgba(38, 150, 105, 0.42), rgba(38, 150, 105, 0));
}
.xm-loader .xm-ld-aurora i:nth-child(2) {
  width: 54vmax; height: 30vmax; right: -14vmax; bottom: -8vmax;
  background: radial-gradient(closest-side, rgba(24, 110, 120, 0.36), rgba(24, 110, 120, 0));
  animation-duration: 1.6s, 17s;
  animation-direction: normal, alternate-reverse;
}
.xm-loader .xm-ld-aurora i:nth-child(3) {
  width: 40vmax; height: 40vmax; left: 50%; top: 50%; margin: -20vmax 0 0 -20vmax;
  background: radial-gradient(closest-side, rgba(216, 180, 106, 0.16), rgba(216, 180, 106, 0));
  animation-duration: 1.6s, 9s;
}
@keyframes xm-ld-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(6vmax, 3vmax, 0) scale(1.12); }
}

.xm-loader .xm-ld-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

/* gold seam of light that appears when the gift opens */
.xm-loader .xm-ld-seam {
  position: absolute;
  z-index: 6;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  margin-left: -1px;
  background: linear-gradient(180deg, rgba(246, 220, 154, 0), #fff6dc 50%, rgba(246, 220, 154, 0));
  box-shadow: 0 0 18px 4px rgba(246, 220, 154, 0.55);
  transform: scaleY(0);
  opacity: 0;
  pointer-events: none;
}

/* centre stage */
.xm-loader .xm-ld-stage {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 16px;
  transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.45s ease, filter 0.45s ease;
}

.xm-loader .xm-ld-emblem {
  display: block;
  width: clamp(180px, min(62vw, 37vh), 300px);
  height: auto;
  overflow: visible;
  margin-bottom: clamp(14px, 2.6vh, 26px);
}

.xm-loader .xm-ld-track,
.xm-loader .xm-ld-inner {
  opacity: 0;
  animation: xm-ld-fade 0.8s ease 0.1s forwards;
}
.xm-loader .xm-ld-ring {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  filter: drop-shadow(0 0 3px rgba(246, 220, 154, 0.55));
}
.xm-loader .xm-ld-head {
  opacity: 0;
  filter: drop-shadow(0 0 4px #f6dc9a) drop-shadow(0 0 8px rgba(246, 220, 154, 0.8));
  animation: xm-ld-fade 0.4s ease 0.3s forwards;
}
.xm-loader .xm-ld-glow {
  transform-origin: 120px 120px;
  opacity: 0;
  animation: xm-ld-fade 1s ease 0.6s forwards, xm-ld-breathe 3.2s ease-in-out 1.6s infinite;
}
@keyframes xm-ld-breathe {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.12); opacity: 0.7; }
}

/* the vine draws itself around the circle (leaving the gap for the bow), then leaves and berries grow in */
.xm-loader .xm-ld-vine {
  stroke-dasharray: 0.867 1;
  stroke-dashoffset: 0.867;
  opacity: 0.75;
  animation: xm-ld-draw 1.3s cubic-bezier(0.65, 0, 0.35, 1) 0.2s forwards;
}

/* wreath leaves and berries grow in, clockwise */
.xm-loader .xm-ld-leaf,
.xm-loader .xm-ld-berry {
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
  transform: scale(0.2) rotate(-30deg);
  animation: xm-ld-leaf 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) var(--d) forwards;
}
@keyframes xm-ld-leaf {
  to { opacity: 1; transform: none; }
}
.xm-loader .xm-ld-bow {
  transform-box: fill-box;
  transform-origin: 50% 20%;
  opacity: 0;
  transform: scale(0.4) translateY(6px);
  animation: xm-ld-leaf 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 1.35s forwards;
}

/* snowflake draws itself, then turns slowly */
.xm-loader .xm-ld-flake {
  transform-origin: 120px 120px;
  animation: xm-ld-spin 48s linear 1.4s infinite;
}
.xm-loader .xm-ld-arm {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: xm-ld-draw 1.1s cubic-bezier(0.65, 0, 0.35, 1) var(--d) forwards;
}
.xm-loader .xm-ld-gem {
  transform-origin: 120px 120px;
  transform: scale(0);
  animation: xm-ld-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 1.3s forwards, xm-ld-twinkle 2.2s ease-in-out 2s infinite;
}
@keyframes xm-ld-draw { to { stroke-dashoffset: 0; } }
@keyframes xm-ld-pop { to { transform: scale(1); } }
@keyframes xm-ld-spin { to { transform: rotate(360deg); } }
@keyframes xm-ld-twinkle {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5) rotate(45deg); opacity: 0.75; }
}
@keyframes xm-ld-fade { to { opacity: 1; } }

/* typography - the site's own fonts: Noto Serif (headings) and Barlow (body) */
.xm-loader .xm-ld-eyebrow,
.xm-loader .xm-ld-sub {
  margin: 0;
  font-family: Barlow, "Helvetica Neue", Arial, sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.46em;
  padding-left: 0.46em;
  text-transform: uppercase;
  color: var(--ld-gold);
  opacity: 0;
  animation: xm-ld-rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.7s forwards;
}
.xm-loader .xm-ld-sub {
  margin-top: 22px;
  color: rgba(246, 240, 228, 0.6);
  letter-spacing: 0.34em;
  padding-left: 0.34em;
  animation-delay: 1.55s;
}

/* "Merry Christmas": wipes in while its tracking tightens, then a gold sheen passes over it */
.xm-loader .xm-ld-title {
  margin: 12px 0 0;
  font-family: "Noto Serif", Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 5.6vw, 60px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: 0.22em;
  padding-left: 0.22em;
  color: var(--ld-ivory);
  background: linear-gradient(100deg, #f6f0e4 0%, #f6f0e4 38%, #ffe8a8 47%, #d8a950 52%, #f6f0e4 62%, #f6f0e4 100%);
  background-size: 260% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  clip-path: inset(0 100% 0 0);
  animation:
    xm-ld-wipe 1.3s cubic-bezier(0.65, 0, 0.35, 1) 0.85s forwards,
    xm-ld-track 1.6s cubic-bezier(0.2, 0.7, 0.2, 1) 0.85s forwards,
    xm-ld-sheen 2.2s ease-in-out 2s infinite;
}
@keyframes xm-ld-wipe { to { clip-path: inset(0 -5% 0 -5%); } }
@keyframes xm-ld-track { to { letter-spacing: 0.015em; padding-left: 0.015em; } }
@keyframes xm-ld-sheen {
  0% { background-position: 100% 0; }
  60%, 100% { background-position: 0 0; }
}

.xm-loader .xm-ld-title2 {
  margin: 10px 0 0;
  font-family: "Noto Serif", Georgia, "Times New Roman", serif;
  font-size: clamp(15px, 2.1vw, 21px);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.08em;
  font-style: italic;
  color: rgba(246, 240, 228, 0.82);
  opacity: 0;
  animation: xm-ld-rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 1.3s forwards;
}

.xm-loader .xm-ld-brand {
  margin: 9px 0 0;
  font-family: "Noto Serif", Georgia, "Times New Roman", serif;
  font-size: clamp(14px, 1.6vw, 17px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.3em;
  padding-left: 0.3em;
  text-transform: uppercase;
  color: var(--ld-gold);
  opacity: 0;
  animation: xm-ld-rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 1.7s forwards;
}

@keyframes xm-ld-rise {
  from { opacity: 0; transform: translateY(10px); filter: blur(4px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}

/* ---------- exit: content settles, a seam of light splits the centre, the halves open ---------- */
.xm-loader.is-done { pointer-events: none; }
.xm-loader.is-done .xm-ld-stage {
  opacity: 0;
  filter: blur(6px);
  transform: scale(0.94);
}
.xm-loader.is-done .xm-ld-aurora,
.xm-loader.is-done .xm-ld-canvas { opacity: 0; }
.xm-loader.is-done .xm-ld-seam {
  animation: xm-ld-seam 0.95s cubic-bezier(0.65, 0, 0.35, 1) 0.2s forwards;
}
@keyframes xm-ld-seam {
  0% { opacity: 0; transform: scaleY(0); }
  35% { opacity: 1; transform: scaleY(1); }
  100% { opacity: 0; transform: scaleY(1) scaleX(6); }
}
.xm-loader.is-done .xm-ld-door.is-l { transform: translate3d(-101%, 0, 0); }
.xm-loader.is-done .xm-ld-door.is-r { transform: translate3d(101%, 0, 0); }

/* ---------- small and short screens ---------- */
@media (max-width: 480px) {
  .xm-loader .xm-ld-eyebrow,
  .xm-loader .xm-ld-sub {
    font-size: 10px;
    letter-spacing: 0.32em;
    padding-left: 0.32em;
  }
  .xm-loader .xm-ld-brand {
    letter-spacing: 0.22em;
    padding-left: 0.22em;
  }
}
@media (max-height: 560px) {
  .xm-loader .xm-ld-emblem { width: 34vh; margin-bottom: 8px; }
  .xm-loader .xm-ld-title { font-size: 30px; margin-top: 6px; }
  .xm-loader .xm-ld-title2 { font-size: 15px; margin-top: 4px; }
  .xm-loader .xm-ld-sub { margin-top: 10px; }
}

/* ---------- reduced motion: still composition, short fade ---------- */
@media (prefers-reduced-motion: reduce) {
  .xm-loader *,
  .xm-loader *::before,
  .xm-loader *::after {
    animation: none !important;
    transition: none !important;
  }
  .xm-loader { transition: opacity 0.3s ease !important; }
  .xm-loader.is-done { opacity: 0; }
  .xm-loader .xm-ld-canvas,
  .xm-loader .xm-ld-seam { display: none; }
  .xm-loader .xm-ld-leaf,
  .xm-loader .xm-ld-berry,
  .xm-loader .xm-ld-bow,
  .xm-loader .xm-ld-track,
  .xm-loader .xm-ld-inner,
  .xm-loader .xm-ld-glow,
  .xm-loader .xm-ld-head,
  .xm-loader .xm-ld-aurora i,
  .xm-loader .xm-ld-eyebrow,
  .xm-loader .xm-ld-sub,
  .xm-loader .xm-ld-title2,
  .xm-loader .xm-ld-brand {
    opacity: 1;
    transform: none;
    filter: none;
  }
  .xm-loader .xm-ld-arm,
  .xm-loader .xm-ld-vine { stroke-dashoffset: 0; }
  .xm-loader .xm-ld-gem { transform: none; }
  .xm-loader .xm-ld-title { clip-path: none; letter-spacing: 0.015em; padding-left: 0.015em; }
  .xm-loader.is-done .xm-ld-door { transform: none; }
}

/* =========================================================
   Port additions (PHP site)
   ========================================================= */
/* sections that receive decorations (set by xm-festive.js only when they are position: static) */
.xm-host { position: relative; }
.xm-host > .xm-deco { z-index: 2; }

/* footer snow cap sits on the footer's own top edge */
.xm-host.xm-footer-host > .xm-snowcap { z-index: 3; }

/* Scroll lock while the loader shows. If JS never runs the loader hides itself after 7s via CSS,
   so the lock must release itself too (discrete overflow animation, flips right after 7s). */
html:has(.xm-loader:not(.is-done):not(.is-skip)),
html:has(.xm-loader:not(.is-done):not(.is-skip)) body {
  animation: xm-unlock 0.01s linear 7s forwards;
}

@keyframes xm-unlock {
  from { overflow: hidden; }
  to { overflow: visible; }
}

.xm-sleigh > svg { overflow: visible; }

/* ---------- Illustrated snow scenes: tree + open gift, snowman ---------- */
.xm-scene {
  bottom: 0;
  z-index: 3;
  width: 180px;
  height: 132px;
}
.xm-host > .xm-scene { z-index: 3; }
.xm-scene.is-left { left: clamp(6px, 1.4vw, 24px); }
.xm-scene.is-right { right: clamp(6px, 1.4vw, 24px); }
.xm-scene svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* shared transform setup for animated parts */
.xm-sc-tree, .xm-sc-star, .xm-sc-starglow, .xm-sc-lid, .xm-sc-rise, .xm-sc-spark,
.xm-sm-body, .xm-sm-wave, .xm-sm-tail, .xm-sm-hat, .xm-sm-eyes {
  transform-box: fill-box;
}

/* tree sways from its trunk */
.xm-sc-tree {
  transform-origin: 50% 100%;
  animation: xm-sc-sway 5.5s ease-in-out infinite alternate;
}
@keyframes xm-sc-sway {
  from { transform: rotate(-1.4deg); }
  to { transform: rotate(1.4deg); }
}

/* star pulses and turns a touch, its glow breathes */
.xm-sc-star {
  transform-origin: 50% 55%;
  animation: xm-sc-star 2.6s ease-in-out infinite;
}
@keyframes xm-sc-star {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.18) rotate(14deg); }
}
.xm-sc-starglow {
  transform-origin: center;
  animation: xm-sc-glow 2.6s ease-in-out infinite;
}
@keyframes xm-sc-glow {
  0%, 100% { opacity: 0.45; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.15); }
}

/* string lights twinkle out of sync */
.xm-sc-bulb {
  animation: xm-sc-bulb 1.9s ease-in-out var(--d, 0s) infinite alternate;
}
@keyframes xm-sc-bulb {
  from { opacity: 1; }
  to { opacity: 0.25; }
}

/* the open lid bobs on its hinge */
.xm-sc-lid {
  transform-origin: 100% 100%;
  animation: xm-sc-lid 2.2s ease-in-out infinite;
}
@keyframes xm-sc-lid {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  45% { transform: rotate(-7deg) translateY(-2px); }
  60% { transform: rotate(-5deg) translateY(-1.5px); }
}

/* gold sparkles float up out of the gift */
.xm-sc-rise {
  opacity: 0;
  transform-origin: center;
  animation: xm-sc-rise 2.4s ease-out var(--d, 0s) infinite;
}
@keyframes xm-sc-rise {
  0% { opacity: 0; transform: translate(0, 0) scale(0.6); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx, 0), -30px) scale(1.1); }
}

.xm-sc-spark {
  transform-origin: center;
  animation: xm-spark 2.8s ease-in-out var(--d, 0s) infinite;
}

/* snowman: soft bob, waving arm, fluttering scarf, tipping hat, blinking eyes */
.xm-sm-body {
  transform-origin: 50% 100%;
  animation: xm-sm-bob 3.2s ease-in-out infinite;
}
@keyframes xm-sm-bob {
  0%, 100% { transform: translateY(0) scaleY(1); }
  50% { transform: translateY(-1.5px) scaleY(1.012); }
}
.xm-sm-wave {
  transform-origin: 0% 100%;
  animation: xm-sm-wave 1.6s ease-in-out infinite alternate;
}
@keyframes xm-sm-wave {
  from { transform: rotate(-8deg); }
  to { transform: rotate(16deg); }
}
.xm-sm-tail {
  transform-origin: 30% 0%;
  animation: xm-sm-tail 2.1s ease-in-out infinite alternate;
}
@keyframes xm-sm-tail {
  from { transform: rotate(-6deg); }
  to { transform: rotate(9deg); }
}
.xm-sm-hat {
  transform-origin: 30% 100%;
  animation: xm-sm-hat 4.4s ease-in-out infinite;
}
@keyframes xm-sm-hat {
  0%, 70%, 100% { transform: rotate(0deg) translateY(0); }
  78% { transform: rotate(-7deg) translateY(-2.5px); }
  88% { transform: rotate(-2deg) translateY(-0.5px); }
}
.xm-sm-eyes {
  transform-origin: center;
  animation: xm-sm-blink 4.8s ease-in-out infinite;
}
@keyframes xm-sm-blink {
  0%, 92%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.1); }
}

@media (prefers-reduced-motion: reduce) {
  .xm-scene * { animation: none !important; }
  .xm-sc-rise { opacity: 0; }
}
