/* =========================================================================
   CHRISTMAS LAYER
   Every rule here starts with [data-season="christmas"], so with the season
   off this file does nothing. Cozy and classic: velvet red, pine green,
   UOP gold, candy canes, plaid.
   ========================================================================= */

[data-season="christmas"] {
  --xmas-red: #c8202c;
  --xmas-red-deep: #8f1219;
  --xmas-pine: #1c4a34;
  --xmas-pine-deep: #123222;
  --xmas-snow: #fff5e6;
  --xmas-plaid:
    repeating-linear-gradient(90deg, transparent 0 15px, rgba(246, 178, 34, 0.85) 15px 16px, transparent 16px 24px),
    repeating-linear-gradient(0deg, transparent 0 11px, rgba(246, 178, 34, 0.6) 11px 12px, transparent 12px 24px),
    repeating-linear-gradient(90deg, rgba(18, 50, 34, 0.78) 0 9px, transparent 9px 24px),
    repeating-linear-gradient(0deg, rgba(18, 50, 34, 0.62) 0 7px, transparent 7px 24px),
    var(--xmas-red);
}

/* ---------- the Christmas-only pieces of the page ---------- */
[data-season="christmas"] .nav__links li[data-season-only] { display: block; }
[data-season="christmas"] .santa { display: block; }

/* ---------- lights across the top (drawn by season.js) ---------- */
[data-season="christmas"] .xmas-lights {
  position: absolute; top: 0; left: 0; right: 0; z-index: 7;
  pointer-events: none; overflow: hidden;
}
[data-season="christmas"] .xmas-lights svg { display: block; }
[data-season="christmas"] .xmas-bulb {
  filter: drop-shadow(0 0 4px currentColor) drop-shadow(0 0 10px currentColor);
  animation: xmas-twinkle 2.4s ease-in-out infinite;
}
@keyframes xmas-twinkle { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* make room under the lights */
[data-season="christmas"] .nav { padding-top: 52px; }
[data-season="christmas"] .hero { padding-top: 124px; }

/* ---------- snow (drawn by season.js): above the skull, behind the words ---------- */
[data-season="christmas"] .xmas-snow {
  position: fixed; inset: 0; z-index: 2;
  width: 100%; height: 100%;
  pointer-events: none;
}

/* ---------- the opening ---------- */
[data-season="christmas"] .intro-bar {
  height: 6px; bottom: 21px; border-radius: 3px; overflow: hidden;
}
[data-season="christmas"] .intro-bar span {
  transform: none;
  width: calc(var(--p, 0) * 100%);
  border-radius: 3px;
  background: repeating-linear-gradient(-45deg, var(--xmas-snow) 0 7px, var(--xmas-red) 7px 14px);
  animation: xmas-candy 0.9s linear infinite;
}
@keyframes xmas-candy { to { background-position: 19.8px 0; } }
[data-season="christmas"] .intro-start { background: var(--xmas-red); color: var(--xmas-snow); }
[data-season="christmas"] .intro-start__dot { background: var(--gold); }

/* ---------- Secret Santa: "gingerbread" (warm off-white, chocolate brown, orange) ---------- */
[data-season="christmas"] {
  --gb-bg: #ede8e6;
  --gb-card: #fffdfb;
  --gb-ink: #3b1a14;
  --gb-ink-2: #5b3427;
  --gb-orange: #ffa125;
  --gb-red: #e5532d;
  --font-gb: "Poppins", var(--font-label);
  --font-gb-serif: "Instrument Serif", var(--font-accent);
}
[data-season="christmas"] .santa {
  position: relative; overflow: hidden;
  background: var(--gb-bg); color: var(--gb-ink);
}
[data-season="christmas"] .santa .wrap { position: relative; z-index: 1; }
/* big orange swoosh behind the tooth */
[data-season="christmas"] .santa__swoosh {
  position: absolute; z-index: 0; pointer-events: none;
  right: -6%; top: 4%; width: min(62%, 860px); height: auto;
}
[data-season="christmas"] .santa__grid {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 24px clamp(24px, 4vw, 64px); align-items: center;
}
[data-season="christmas"] .santa .santa__kicker {
  margin: 0 0 12px; font-family: var(--font-gb-serif); font-size: clamp(24px, 2.4vw, 34px); line-height: 1.1; color: var(--gb-ink-2);
}
[data-season="christmas"] .santa__title {
  margin: 0 0 24px;
  font-family: var(--font-gb); font-weight: 800; text-transform: uppercase;
  font-size: clamp(54px, 8vw, 128px); line-height: 0.92; letter-spacing: -0.025em;
  color: var(--gb-ink);
}
/* the last word gets an orange highlighter swipe */
[data-season="christmas"] .santa__title span {
  background: linear-gradient(transparent 58%, var(--gb-orange) 58%, var(--gb-orange) 90%, transparent 90%);
  padding: 0 0.04em;
}
[data-season="christmas"] .santa .santa__lede {
  margin: 0 0 32px; max-width: 16em;
  font-family: var(--font-gb-serif); font-size: clamp(24px, 2.3vw, 34px); line-height: 1.12; color: var(--gb-ink-2);
}
/* candy-cane buttons: red and white stripes that roll, a red label in the middle */
[data-season="christmas"] .candy {
  --cane-red: #d6232f;
  --cane-white: #fff7ef;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px; border-radius: 999px;
  background: repeating-linear-gradient(-45deg, var(--cane-red) 0 14px, var(--cane-white) 14px 28px) 0 0 / 39.6px 39.6px;
  box-shadow: 0 0 0 3px var(--gb-ink), 0 18px 36px rgba(150, 20, 28, 0.32);
  text-decoration: none;
  animation: candy-roll 1.6s linear infinite, candy-nudge 5s ease-in-out 1.5s infinite;
  transition: transform 0.25s var(--ease-out);
}
[data-season="christmas"] .candy:hover { transform: translateY(-3px) scale(1.03); animation-play-state: running, paused; }
[data-season="christmas"] .candy__label {
  display: block; padding: 18px 36px; border-radius: 999px;
  background: var(--cane-red); color: #fff;
  font-family: var(--font-gb); font-weight: 800; font-size: 18px; line-height: 1; letter-spacing: 0.04em; text-transform: uppercase;
  white-space: nowrap; text-align: center;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18), 0 2px 0 rgba(255, 255, 255, 0.25);
}
@keyframes candy-roll { to { background-position: 39.6px 0; } }
@keyframes candy-nudge {
  0%, 84%, 100% { transform: none; }
  88% { transform: rotate(-3deg) scale(1.05); }
  92% { transform: rotate(3deg) scale(1.05); }
  96% { transform: rotate(-1deg) scale(1.02); }
}
/* the big one in the Secret Santa section */
[data-season="christmas"] .santa__cta .candy__label { padding: 26px 66px; font-size: 24px; }
/* the opening screen's button: a little wrapped present (lid pops up on hover/tap) */
[data-season="christmas"] .hero__ctas .btn[data-xmas-gift] { visibility: hidden; } /* until it becomes the gift box */
[data-season="christmas"] .giftbtn {
  --paper: #fff3e4;
  --ribbon: #d6232f;
  position: relative; display: inline-flex; flex-direction: column;
  text-decoration: none; color: var(--gb-ink);
  filter: drop-shadow(0 14px 24px rgba(60, 10, 0, 0.3));
  transition: transform 0.2s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
[data-season="christmas"] .giftbtn__top {
  position: relative; display: block; height: 18px; margin: 18px -6px 0;
  transform-origin: 8% 100%;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: gift-peek 5s ease-in-out 2.5s infinite;
}
[data-season="christmas"] .giftbtn__lid {
  position: absolute; inset: 0;
  border: 2.5px solid var(--gb-ink); border-radius: 6px;
  background: linear-gradient(90deg, transparent calc(100% - 50px), var(--ribbon) calc(100% - 50px), var(--ribbon) calc(100% - 34px), transparent calc(100% - 34px)), var(--paper);
}
[data-season="christmas"] .giftbtn__bow { position: absolute; right: 15px; bottom: 12px; line-height: 0; }
[data-season="christmas"] .giftbtn__box {
  display: flex; align-items: center; gap: 10px;
  padding: 17px 66px 17px 26px;
  border: 2.5px solid var(--gb-ink); border-top: 0; border-radius: 0 0 10px 10px;
  background: linear-gradient(90deg, transparent calc(100% - 44px), var(--ribbon) calc(100% - 44px), var(--ribbon) calc(100% - 28px), transparent calc(100% - 28px)), var(--paper);
}
[data-season="christmas"] .giftbtn__label { font-family: var(--font-gb); font-weight: 800; font-size: 16px; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
[data-season="christmas"] .giftbtn__arrow { font-family: var(--font-gb); font-weight: 800; font-size: 18px; animation: gift-arrow 1.6s ease-in-out infinite; }
[data-season="christmas"] .giftbtn:hover .giftbtn__top,
[data-season="christmas"] .giftbtn:focus-visible .giftbtn__top { transform: translateY(-9px) rotate(-5deg); animation: none; }
[data-season="christmas"] .giftbtn:active { transform: scale(0.96); }
@keyframes gift-peek {
  0%, 82%, 100% { transform: none; }
  87% { transform: translateY(-7px) rotate(-4deg); }
  92% { transform: translateY(-2px) rotate(1deg); }
}
@keyframes gift-arrow { 0%, 100% { transform: none; } 50% { transform: translateY(3px); } }
[data-season="christmas"] .santa .santa__cta-note {
  margin: 14px 0 0; font-family: var(--font-gb); font-weight: 600; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--gb-ink-2);
}
[data-season="christmas"] .santa__art { margin: 0; order: 2; } /* right column on wide screens */
[data-season="christmas"] .santa__art img { display: block; width: 100%; max-width: 470px; height: auto; margin-left: auto; }

/* rounded cards: budget, date, countdown */
[data-season="christmas"] .santa__cards {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
  margin: clamp(40px, 6vw, 72px) 0 16px; padding: 0; list-style: none;
}
[data-season="christmas"] .scard {
  display: flex; flex-direction: column; justify-content: space-between; gap: 14px;
  min-height: 150px; padding: 24px 26px; border-radius: 28px;
  background: var(--gb-card);
}
[data-season="christmas"] .scard__k { font-family: var(--font-gb); font-weight: 700; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gb-ink-2); }
[data-season="christmas"] .scard__v { font-family: var(--font-gb); font-weight: 800; font-size: clamp(28px, 3vw, 42px); line-height: 1; text-transform: uppercase; color: var(--gb-ink); }
[data-season="christmas"] .scard__v small { display: block; margin-top: 8px; font-size: 15px; font-weight: 700; letter-spacing: 0.04em; color: var(--gb-ink-2); }
[data-season="christmas"] .scard--count { background: var(--gb-orange); }
[data-season="christmas"] .scard--count .scard__v { font-size: clamp(44px, 4.4vw, 64px); }
[data-season="christmas"] .scard[hidden] { display: none; }

/* "add to calendar" row (home page and personal page) */
[data-season="christmas"] .xmas-cal {
  display: flex; align-items: center; justify-content: space-between; gap: 14px 20px; flex-wrap: wrap;
  padding: 16px 18px 16px 24px; border-radius: 28px;
  background: var(--gb-card); color: var(--gb-ink);
}
[data-season="christmas"] p.xmas-cal__lbl { margin: 0; display: flex; align-items: center; gap: 10px; font-family: var(--font-gb); font-size: 15px; font-weight: 600; color: var(--gb-ink); }
[data-season="christmas"] .xmas-cal__lbl .cal-ico { color: var(--gb-red); flex: none; }
[data-season="christmas"] .xmas-cal__btns { display: flex; gap: 10px; flex-wrap: wrap; }
[data-season="christmas"] .btn--line { padding: 11px 20px; border: 2px solid var(--gb-ink); color: var(--gb-ink); font-family: var(--font-gb); letter-spacing: 0.04em; }
[data-season="christmas"] .btn--line:hover { background: var(--gb-ink); color: var(--gb-bg); }
/* main buttons on the Secret Santa pages: chocolate pills */
[data-season="christmas"] .btn--gold { background: var(--gb-ink); color: var(--gb-bg); font-family: var(--font-gb); letter-spacing: 0.04em; }
[data-season="christmas"] .btn--gold:hover { background: #5e2c20; }
[data-season="christmas"] .btn.is-off { opacity: 0.7; cursor: not-allowed; }
[data-season="christmas"] .btn.is-off:hover { transform: none; }

/* the section after Secret Santa starts flat, with its own breathing room */
[data-season="christmas"] .hero + .santa + .section {
  border-radius: 0; margin-top: 0;
  padding-top: clamp(88px, 13vw, 180px);
}

/* ---------- footer ---------- */
[data-season="christmas"] .footer { position: relative; }
[data-season="christmas"] .footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 12px;
  background: var(--xmas-plaid);
}

/* ---------- smaller screens ---------- */
@media (max-width: 960px) {
  [data-season="christmas"] .hero { padding-top: 104px; }
  [data-season="christmas"] .santa__grid { grid-template-columns: 1fr; }
  [data-season="christmas"] .santa__art { order: -1; }
  [data-season="christmas"] .santa__art img { max-width: 280px; margin: 0 auto; }
  [data-season="christmas"] .santa__swoosh { width: 120%; right: -40%; top: 0; }
}
@media (max-width: 640px) {
  [data-season="christmas"] .nav { padding-top: 42px; }
  [data-season="christmas"] .santa__cards { grid-template-columns: 1fr 1fr; gap: 12px; }
  [data-season="christmas"] .scard { min-height: 120px; padding: 20px; border-radius: 24px; }
  [data-season="christmas"] .scard__v { font-size: clamp(22px, 6.6vw, 28px); white-space: nowrap; }
  [data-season="christmas"] .scard--count .scard__v { font-size: 44px; }
  [data-season="christmas"] .scard--count { grid-column: 1 / -1; min-height: 0; flex-direction: row; align-items: center; }
  [data-season="christmas"] .santa__cta { display: flex; width: 100%; }
  [data-season="christmas"] .santa__cta .candy__label { flex: 1; padding: 24px 20px; font-size: 21px; }
  [data-season="christmas"] .giftbtn__box { padding: 15px 62px 15px 22px; }
  [data-season="christmas"] .giftbtn__label { font-size: 15px; }
  [data-season="christmas"] .xmas-cal__btns { width: 100%; }
  [data-season="christmas"] .xmas-cal__btns .btn { flex: 1 1 0; justify-content: center; }
}

/* phones: small tooth up beside the headline, everything tighter */
@media (max-width: 640px) {
  [data-season="christmas"] .santa { padding-top: 56px; padding-bottom: 64px; }
  [data-season="christmas"] .santa__grid { display: block; position: relative; }
  [data-season="christmas"] .santa__grid::after { content: ""; display: block; clear: both; }
  /* the tooth floats beside the headline; the words wrap around it */
  [data-season="christmas"] .santa__art { float: right; width: 118px; margin: -8px -8px 4px 6px; position: relative; z-index: 2; }
  [data-season="christmas"] .santa__art img { width: 100%; max-width: none; margin: 0; }
  [data-season="christmas"] .santa__swoosh { width: 74%; right: -40%; top: -44px; }
  [data-season="christmas"] .santa .santa__kicker { margin-bottom: 8px; font-size: 20px; }
  [data-season="christmas"] .santa__title { margin-bottom: 14px; font-size: clamp(44px, 13.4vw, 54px); }
  [data-season="christmas"] .santa .santa__lede { margin-bottom: 20px; font-size: 21px; }
  [data-season="christmas"] .santa__cta .candy__label { padding: 20px 16px; font-size: 20px; }
  [data-season="christmas"] .santa .santa__cta-note { margin-top: 10px; font-size: 12px; }
  [data-season="christmas"] .santa__cards { margin: 24px 0 10px; gap: 10px; }
  [data-season="christmas"] .scard { min-height: 0; gap: 8px; padding: 16px 18px; border-radius: 22px; }
  [data-season="christmas"] .scard__v { font-size: clamp(21px, 6.2vw, 26px); }
  [data-season="christmas"] .scard__v small { margin-top: 4px; font-size: 13px; }
  [data-season="christmas"] .scard--count .scard__v { font-size: 38px; }
  [data-season="christmas"] .xmas-cal { gap: 10px; padding: 14px; border-radius: 22px; }
  [data-season="christmas"] p.xmas-cal__lbl { font-size: 14px; }
  [data-season="christmas"] .xmas-cal__btns .btn { padding: 10px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  [data-season="christmas"] .xmas-bulb, [data-season="christmas"] .intro-bar span, [data-season="christmas"] .candy,
  [data-season="christmas"] .giftbtn__top, [data-season="christmas"] .giftbtn__arrow { animation: none; }
}
