/* Everything here is scoped to the season attribute set by xmas.js. */
[data-season='xmas'] .xm-rel { position: relative; }
.xm-snow { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 38; }
.xm-garland { position: fixed; top: 0; left: 0; width: 100%; pointer-events: none; z-index: 39; line-height: 0; }
.xm-garland svg { display: block; overflow: visible; filter: drop-shadow(0 3px 4px rgba(0,0,0,.45)); }
.xm-bulb { filter: drop-shadow(0 0 5px currentColor); animation: xm-twinkle 2.8s ease-in-out infinite; }
.xm-twinkle { animation: xm-twinkle 2.4s ease-in-out infinite; }
@keyframes xm-twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.xm-ornaments { position: absolute; top: 0; left: 0; right: 0; height: 0; pointer-events: none; z-index: 2; }
.xm-ornaments--page { z-index: 5; overflow-x: clip; }
.xm-hang { position: absolute; top: 0; display: flex; flex-direction: column; align-items: center; width: calc(62px * var(--s)); margin-left: calc(-31px * var(--s)); transform-origin: 50% 0; animation: xm-sway 5.5s ease-in-out infinite; }
.xm-hang i { width: 1px; height: var(--len); background: linear-gradient(rgba(201,162,75,.2), #c9a24b); }
.xm-hang svg { width: 100%; height: auto; margin-top: -4px; filter: drop-shadow(0 8px 10px rgba(0,0,0,.45)); }
@keyframes xm-sway { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }

.xm-greeting { display: flex; justify-content: center; align-items: center; gap: .6em; margin: 0; font-family: 'Instrument Serif', 'Fraunces', serif; font-style: italic; letter-spacing: .06em; color: #ffe2a8; text-shadow: 0 1px 3px #000, 0 0 14px rgba(0,0,0,.8); pointer-events: none; }
.xm-star { color: #ff7a6b; animation: xm-twinkle 2s ease-in-out infinite; }
.xm-greeting--hero { position: absolute; left: 0; right: 0; top: max(46px, 6.5svh); font-size: clamp(1.1rem, .9rem + 1vw, 1.7rem); z-index: 3; }
.xm-greeting--footer { margin-top: 1.25rem; font-size: 1.15rem; flex-wrap: wrap; text-align: center; }
.xm-greeting--corner { position: fixed; right: 14px; bottom: 12px; z-index: 37; padding: .35rem .8rem; border-radius: 999px; background: rgba(20,38,28,.9); border: 1px solid #c9a24b; font-size: .95rem; }

.xm-divider { display: flex; justify-content: center; position: absolute; left: 0; right: 0; bottom: 100%; pointer-events: none; }
.xm-divider svg { width: clamp(64px, 8vw, 104px); height: auto; margin-bottom: .35rem; }

[data-season='xmas'] .footer { padding-top: max(110px, 4rem); }
.xm-skyline { position: absolute; top: 0; left: 0; right: 0; height: 100px; pointer-events: none; }
.xm-skyline svg { display: block; width: 100%; height: 100%; }
body > footer .xm-skyline, footer.xm-rel .xm-skyline { top: auto; bottom: 100%; height: 80px; }
.footer > .xm-skyline { top: 0 !important; bottom: auto !important; height: 100px !important; }

.xm-toggle-hat { position: absolute; top: -9px; left: -11px; width: 30px; transform: rotate(-24deg); pointer-events: none; z-index: 3; }
.xm-toggle-hat svg { display: block; width: 100%; }

/* ---------- festive re-skin of existing pieces ---------- */
[data-season='xmas'] ::selection { background: #9e2b25; color: #fff4e0; }
[data-season='xmas'] .fx-progress { height: 4px; background: repeating-linear-gradient(115deg, #c8323a 0 10px, #f4efe4 10px 20px); }
[data-season='xmas'] .wayfinding__dot { border-color: #ffd9a0; background: #9e2b25; }
[data-season='xmas'] .wayfinding__rooms li:nth-child(even) .wayfinding__dot { background: #2f6b45; }
[data-season='xmas'] .wayfinding__room[data-active='true'] .wayfinding__dot { background: #ffd36b; border-color: #fff4e0; box-shadow: 0 0 12px 3px rgba(255,211,107,.75); }
[data-season='xmas'] :is(.product-card, .summer-card, .hg__card, .about__logo-frame) { box-shadow: 0 0 0 1px rgba(201,162,75,.55), 0 0 0 4px rgba(122,32,30,.55), 0 18px 40px rgba(0,0,0,.45); }
[data-season='xmas'] .footer__submit { background: #a3272b; color: #fff4e0; border-color: #ffd36b; }
[data-season='xmas'] :is(.process__eyebrow, .about__eyebrow, .hg__eyebrow, .teacasso-summer__eyebrow)::before,
[data-season='xmas'] :is(.process__eyebrow, .about__eyebrow, .hg__eyebrow, .teacasso-summer__eyebrow)::after { content: ' ❄ '; font-style: normal; color: #e9f3ff; }

/* keep page headers below the garland */
[data-season='xmas'] .back-link { top: 3.4rem; }
[data-season='xmas'] .sc-top { padding-top: 52px; }

/* the entrance: a snowy treeline along the bottom of the hero */
.xm-skyline--hero { top: auto; bottom: 0; left: 84px; right: 84px; height: clamp(46px, 8.5svh, 90px); opacity: .95; z-index: 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }

@media (max-width: 640px) {
  [data-season='xmas'] .back-link { top: 2.6rem; }
  [data-season='xmas'] .sc-top { padding-top: 40px; }
  .xm-hang { width: calc(30px * var(--s)); margin-left: calc(-15px * var(--s)); --len: 44px !important; }
  .xm-hang i { height: calc(var(--len) * var(--s)); }
  /* two per section on a phone, tight to the edges so they clear the headings */
  .xm-hang--1, .xm-hang--2 { display: none; }
  /* phone: above the bottom nav, and below the language switch */
  .xm-skyline--hero { left: 0; right: 0; bottom: 76px; height: 48px; }
  .xm-greeting--hero { top: 88px; }
  body:has(.sc-top) .xm-greeting--corner { display: none; }
  .xm-greeting--corner { font-size: .8rem; right: 8px; bottom: 8px; }
  [data-season='xmas'] .lang-toggle { margin-top: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .xm-bulb, .xm-twinkle, .xm-star, .xm-hang { animation: none; }
}
