/* =============================================================================
   TumbleWiz, Christmas 2026: "Santa's tumbling gym"
   Loaded ONLY in season (Dec 1, 2026 12:00 AM to Jan 2, 2027 12:00 AM New
   York; app/Lib/Season.php), on top of each page's normal styles. Every rule
   hangs off html.tw-xmas, so if that class is removed (a page shown again
   after the cutoff) the page is instantly its regular self.
     html.tw-xmas.xm-home  the homepage (landing.php, its own inline styles)
     html.tw-xmas.xm-app   booking, confirmation, registration, waitlist (style.css)
   Decorations are aria-hidden, never take a tap, and sit under the text,
   links and form controls. Evergreen + cranberry, warm white lights,
   TumbleWiz gold kept for the main buttons, the open booking times and the
   gymnast. Changing this file? Bump TW_XMAS_CSS's ?v= in Season.php.
   ============================================================================= */

html:not(.tw-xmas) .xm { display: none !important; }

html.tw-xmas {
  /* the pages' own palettes, turned evergreen (names from landing.php and style.css) */
  --black: #04110a;
  --black-2: #0a1d13;
  --black-3: #0f2a1c;
  --black-soft: #06180f;
  --black-card: #0b2416;
  --black-lift: #11301f;
  --gray-dark: #1f4632;
  --blue-mid: #0b2a1a;
  --blue-dark: #3b0d1b;
  --border: rgba(212, 175, 55, 0.26);
  --xm-cran: #b3122e;
  --xm-cran-hi: #e0264a;
  --xm-cran-text: #ff8a9a;
  --xm-snow: #f7f9ff;
  --xm-warm: #fff2c8;
  --xm-n: 8; /* garland swags across the screen */
}
@media (min-width: 1600px) { html.tw-xmas { --xm-n: 10; } }
@media (max-width: 1199px) { html.tw-xmas { --xm-n: 6; } }
@media (max-width: 899px)  { html.tw-xmas { --xm-n: 5; } }
@media (max-width: 599px)  { html.tw-xmas { --xm-n: 3; } }

/* ---------- the garland: evergreen swags, red bows, lights ---------- */
.tw-xmas .xm-garland {
  position: relative;
  height: 52px;
  overflow: hidden;
  pointer-events: none;
  background: url("../img/christmas-2026/garland.svg") 0 0 / calc(100% / var(--xm-n)) 44px repeat-x;
}
.tw-xmas .xm-garland b {
  position: absolute;
  top: -2px;
  left: calc(var(--k) * 100% / var(--xm-n) - 16px);
  width: 32px;
  height: 28px;
  background: url("../img/christmas-2026/bow.svg") center / contain no-repeat;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.55));
}
.tw-xmas .xm-garland i {
  position: absolute;
  top: var(--y);
  left: calc((var(--s) + var(--u)) * 100% / var(--xm-n));
  width: 9px;
  height: 13px;
  margin-left: -4.5px;
  border-radius: 50% 50% 46% 46% / 60% 60% 40% 40%;
  background: var(--xm-c, #fff2c8);
  box-shadow: 0 0 6px 2px var(--xm-g, rgba(255, 228, 150, 0.75)), 0 0 16px 5px var(--xm-g2, rgba(255, 200, 90, 0.3));
}
.tw-xmas .xm-garland i::before {
  content: '';
  position: absolute;
  top: -3px;
  left: 2px;
  width: 5px;
  height: 4px;
  border-radius: 1px;
  background: #1f2a22;
}
.tw-xmas .xm-garland i:nth-child(4n+1) { --xm-c: #ff4b6b; --xm-g: rgba(255, 60, 90, 0.75); --xm-g2: rgba(255, 40, 70, 0.3); }
.tw-xmas .xm-garland i:nth-child(4n+2) { --xm-c: #ffd24a; --xm-g: rgba(255, 210, 74, 0.8); --xm-g2: rgba(255, 190, 40, 0.32); }
.tw-xmas .xm-garland i:nth-child(4n+3) { --xm-c: #6cf09a; --xm-g: rgba(80, 230, 130, 0.7); --xm-g2: rgba(60, 210, 110, 0.28); }
.tw-xmas .xm-garland i:nth-child(4n)   { --xm-c: #fff6dc; --xm-g: rgba(255, 240, 200, 0.85); --xm-g2: rgba(255, 220, 150, 0.32); }
.tw-xmas .xm-garland i:nth-child(3n+1) { animation: xm-twinkle 2.8s ease-in-out infinite; }
.tw-xmas .xm-garland i:nth-child(3n+2) { animation: xm-twinkle 3.4s ease-in-out -1.2s infinite; }
@keyframes xm-twinkle {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.5; }
}

/* ---------- the small label ---------- */
.tw-xmas .xm-label {
  display: flex;
  width: -webkit-fit-content;
  width: fit-content;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 5px 14px;
  border-radius: 50px;
  background: linear-gradient(135deg, #c8163a 0%, #8a0d23 100%);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.6;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22), 0 0 18px rgba(200, 22, 58, 0.45);
}

/* =============================================================================
   HOMEPAGE
   ============================================================================= */
.tw-xmas.xm-home .nav { background: rgba(2, 12, 7, 0.95); }
/* room for the garland under the menu bar and the snowbanks at the bottom */
.tw-xmas.xm-home .hero { padding-top: 128px; padding-bottom: 84px; }
.tw-xmas.xm-home .hero-bg {
  background:
    radial-gradient(ellipse 60% 55% at 72% 46%, rgba(255, 214, 120, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse 55% 60% at 6% 88%, rgba(179, 18, 46, 0.30) 0%, transparent 60%),
    linear-gradient(160deg, #010805 0%, #061a10 52%, #0c2d1c 100%);
}
.tw-xmas.xm-home .particles { display: none; }

.tw-xmas.xm-home .xm-hero { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.tw-xmas.xm-home .xm-hero .xm-garland { position: absolute; top: 68px; left: 0; right: 0; }

/* falling snow: each <i> is a tall column whose top carries the flake; the
   column slides down its own height, so the flake crosses the whole entrance */
.tw-xmas.xm-home .xm-snow { position: absolute; inset: 0; }
.tw-xmas.xm-home .xm-snow i {
  position: absolute;
  top: -8%;
  left: var(--x);
  width: var(--s);
  height: 108%;
  animation: xm-fall var(--d) linear var(--t) infinite;
  will-change: transform;
}
.tw-xmas.xm-home .xm-snow i::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: var(--xm-snow);
  opacity: var(--o);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.55);
}
@keyframes xm-fall {
  0%   { transform: translate3d(0, 0, 0); }
  50%  { transform: translate3d(var(--w), 50%, 0); }
  100% { transform: translate3d(0, 100%, 0); }
}

/* snowbanks in the lower corners */
.tw-xmas.xm-home .xm-bank {
  position: absolute;
  bottom: -2px;
  width: min(46vw, 470px);
  height: clamp(64px, 11vw, 128px);
  background: url("../img/christmas-2026/snowbank.svg") 0 100% / 100% 100% no-repeat;
  filter: drop-shadow(0 -4px 14px rgba(200, 225, 255, 0.18));
}
.tw-xmas.xm-home .xm-bank-l { left: 0; }
.tw-xmas.xm-home .xm-bank-r { right: 0; transform: scaleX(-1); }
@media (min-width: 901px) {
  /* Computer: in the lower corners of the first screen, in the empty space
     beside the centred words (that column is 736px wide; see .hero .container) */
  .tw-xmas.xm-home .xm-bank {
    top: calc(100vh - clamp(64px, 11vw, 128px));
    bottom: auto;
    width: min(calc((100vw - 736px) / 2 + 12px), 470px);
  }
}

/* the gold ring becomes a glowing wreath (same box, so the gymnast still lands in it) */
.tw-xmas.xm-home .hero-ring {
  border: 0;
  box-shadow: none;
  animation: none;
  opacity: 1;
  transform: translateY(-50%);
}
.tw-xmas.xm-home .hero-ring::before { display: none; }
.tw-xmas.xm-home .xm-wreath {
  position: absolute;
  inset: 0;
  background: url("../img/christmas-2026/wreath.svg") center / contain no-repeat;
  filter: drop-shadow(0 0 22px rgba(255, 205, 90, 0.32));
}
.tw-xmas.xm-home .xm-pile {
  position: absolute;
  left: 24%;
  right: 24%;
  bottom: -5%;
  height: 10%;
  background: url("../img/christmas-2026/pile.svg") 50% 100% / 100% 100% no-repeat;
}
/* Reduce Motion: the gymnast drawn standing in the wreath, behind the words */
.tw-xmas.xm-home .xm-still {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
/* The wreath is busier than the faint ring it replaces, so it is sized to the
   space right of the headline instead of sitting behind the words. On a
   computer the words are a centred 736px column; the headline's longest line
   ends about 250px right of the middle of the screen. */
@media (min-width: 901px) {
  .tw-xmas.xm-home .hero-ring { width: clamp(240px, calc(48vw - 250px), 560px); right: 2vw; }
}
@media (min-width: 601px) and (max-width: 900px) {
  .tw-xmas.xm-home .hero-ring { width: 25vw; right: 1vw; }
}
.tw-xmas.xm-home .hero-title,
.tw-xmas.xm-home .hero-sub { text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6); }
@media (max-width: 600px) {
  /* Phone: a smaller wreath at the right edge, beside the short lines of the
     headline, where the gymnast lands */
  .tw-xmas.xm-home .hero-ring { width: 120px; right: 6px; top: 40%; opacity: 0.85; }
  .tw-xmas.xm-home .xm-label { font-size: 0.66rem; }
}

/* the rest of the homepage: evergreen panels, warm lights along each section's top edge */
.tw-xmas.xm-home .features,
.tw-xmas.xm-home .pricing {
  background: url("../img/christmas-2026/lights.svg") 50% 0 / 240px 30px repeat-x, var(--black-soft);
}
.tw-xmas.xm-home .gallery {
  background: url("../img/christmas-2026/lights.svg") 50% 0 / 240px 30px repeat-x, #030e08;
}
.tw-xmas.xm-home .quotes {
  background: url("../img/christmas-2026/lights.svg") 50% 0 / 240px 30px repeat-x,
              linear-gradient(140deg, #0b2a1a 0%, #3b0d1b 52%, #06120c 100%);
}
.tw-xmas.xm-home .cta {
  background: url("../img/christmas-2026/lights.svg") 50% 0 / 240px 30px repeat-x,
              linear-gradient(140deg, #04110a 0%, #0f3322 50%, #33101a 100%);
}
.tw-xmas.xm-home .footer { background: #020a06; }
.tw-xmas.xm-home .eyebrow { color: var(--xm-cran-text); }
.tw-xmas.xm-home .feat-card { background: linear-gradient(180deg, #0e2b1c 0%, #0a2014 100%); }
.tw-xmas.xm-home .feat-card::after { background: linear-gradient(90deg, var(--xm-cran-hi), var(--gold), #2f9a5e); }
.tw-xmas.xm-home .p-tier { background: linear-gradient(180deg, #0e2b1c 0%, #0a2014 100%); }
.tw-xmas.xm-home .q-card { background: rgba(2, 12, 7, 0.45); }

/* =============================================================================
   BOOKING, CONFIRMATION, REGISTRATION, WAITLIST
   ============================================================================= */
.tw-xmas.xm-app body {
  background:
    radial-gradient(ellipse 80% 45% at 50% 0%, rgba(255, 214, 120, 0.10) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 0% 100%, rgba(179, 18, 46, 0.16) 0%, transparent 60%),
    linear-gradient(170deg, #07170e 0%, #04110a 55%, #030c07 100%);
  background-attachment: fixed;
}
.tw-xmas.xm-app .topbar {
  background: linear-gradient(180deg, #0f3322 0%, #082016 100%);
  border-bottom: 2px solid var(--gold);
}
.tw-xmas.xm-app .topbar nav a { color: var(--xm-warm); border-color: rgba(212, 175, 55, 0.45); }
.tw-xmas.xm-app .topbar nav a:hover { color: #fff; background: rgba(179, 18, 46, 0.45); border-color: var(--xm-cran-hi); }
.tw-xmas.xm-app .topbar + .xm-garland { margin-top: -2px; }
.tw-xmas.xm-app .topbar + .xm-garland + .container,
.tw-xmas.xm-app .topbar + .xm-garland + main { margin-top: 1.5rem; }

.tw-xmas.xm-app .card {
  background: linear-gradient(180deg, #0f2d1d 0%, #0a1f14 100%);
  border-color: #1f4632;
  border-top-color: var(--xm-cran-hi);
}
/* success cards ("You're booked!", the two thanks pages): framed in gold with
   a string of lights along the top and bottom edges */
.tw-xmas.xm-app .card > .xm-lights {
  height: 30px;
  margin: -1.6rem -1.2rem 0.9rem;
  background: url("../img/christmas-2026/lights.svg") 50% 0 / 240px 30px repeat-x;
  pointer-events: none;
}
.tw-xmas.xm-app .card > .xm-lights-end { margin: 1.2rem -1.2rem -1.6rem; transform: scaleY(-1); }
.tw-xmas.xm-app .xm-booked {
  border: 2px solid var(--gold);
  border-top: 3px solid var(--gold);
  box-shadow: 0 0 0 4px rgba(179, 18, 46, 0.30), 0 0 34px rgba(255, 210, 90, 0.22), 0 10px 40px rgba(0, 0, 0, 0.6);
}
.tw-xmas.xm-app .xm-booked .xm-label { margin-left: auto; margin-right: auto; }

/* the booking calendar: gold frame, four states you can tell apart at a glance:
   gold = open, white with a red check = picked, blue star = your session,
   dark = taken or closed */
.tw-xmas.xm-app .book-grid-card {
  border: 2px solid var(--gold);
  border-top-width: 3px;
  box-shadow: 0 0 0 4px rgba(179, 18, 46, 0.28), 0 0 30px rgba(255, 210, 90, 0.20), 0 10px 40px rgba(0, 0, 0, 0.6);
}
.tw-xmas.xm-app .wg-box.unavailable { background: #030c07; border-color: #1a3a28; opacity: 0.55; }
.tw-xmas.xm-app .wg-box.bookable.selected {
  position: relative;
  background: #ffffff;
  border-color: #ffffff;
  box-shadow: 0 0 0 3px var(--xm-cran-hi), 0 0 0 5px #ffd700, 0 0 18px rgba(255, 215, 0, 0.7);
}
.tw-xmas.xm-app .wg-box.bookable.selected::after {
  content: '\2713';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--xm-cran);
  font-size: 0.95rem;
  font-weight: 900;
}
.tw-xmas.xm-app .week-nav-btn { border-color: rgba(212, 175, 55, 0.5); }
.tw-xmas.xm-app .friend-banner,
.tw-xmas.xm-app .waitlist-link,
.tw-xmas.xm-app .waitlist-cta {
  background: linear-gradient(135deg, rgba(179, 18, 46, 0.22), rgba(212, 175, 55, 0.08));
}
.tw-xmas.xm-app .my-sessions { background: linear-gradient(180deg, #24210d 0%, #0a1f14 100%); }

/* errors stay the loudest thing on the page */
.tw-xmas.xm-app .error {
  background: #3d0a14;
  border: 2px solid #ff8a92;
  color: #ffe1e4;
  box-shadow: 0 0 0 3px rgba(255, 138, 146, 0.16);
}
.tw-xmas.xm-app .field-error { color: #ffb3bb; }

/* keyboard focus always visible over the festive colors */
.tw-xmas a:focus-visible,
.tw-xmas button:focus-visible,
.tw-xmas .btn:focus-visible,
.tw-xmas input[type="checkbox"]:focus-visible,
.tw-xmas input[type="radio"]:focus-visible {
  outline: 3px solid #ffd700;
  outline-offset: 2px;
}

/* =============================================================================
   REDUCE MOTION: the same scene, held still
   ============================================================================= */
@media (prefers-reduced-motion: reduce) {
  .tw-xmas .xm-garland i { animation: none !important; }
  .tw-xmas.xm-home .xm-snow i {
    animation: none !important;
    transform: translate3d(0, var(--h), 0) !important;
  }
}
