/* ── SEASONAL: HOLIDAY ──
   js/seasonal.js sets <html data-holiday> from the day after Thanksgiving through Dec 31.
   Everything here is decorative and layers on top of styles.css.
   No brand token is overridden; one seasonal accent (--cranberry) is added. */

:root {
  --cranberry: #A4342B;   /* decorative only: borders, rules, icons. Not for text. */
  --snow:      #FBF7EF;
  --wire:      #46593A;
}

/* ── STRING LIGHTS (every page) ── */
.holiday-lights {
  position: absolute;
  left: 0; right: 0;
  top: calc(100% + 1px);       /* hangs from the tan nav border */
  height: 60px;
  pointer-events: none;
  overflow: visible;
}
.holiday-lights svg { display: block; overflow: visible; }
.holiday-lights .wire {
  fill: none;
  stroke: var(--wire);
  stroke-width: 1.6;
  stroke-linecap: round;
}
.holiday-lights .socket { fill: #26331F; }
.holiday-lights .glass  { transition: fill-opacity .35s var(--ease); }
.holiday-lights .glow   { transition: opacity .6s var(--ease); opacity: .9; }
.holiday-lights .shine  { fill: #fff; opacity: .55; }

/* Power-on: bulbs light left to right once, on first load */
.holiday-lights .bulb .glass,
.holiday-lights .bulb .glow { transition-delay: calc(var(--i) * 45ms); }
.holiday-lights.is-off .glass { fill-opacity: .28; }
.holiday-lights.is-off .glow  { opacity: 0; }
.holiday-lights.is-lit .bulb .glass,
.holiday-lights.is-lit .bulb .glow { transition-delay: 0s; }

/* A few rounds of shimmer, then the string settles to steady */
.holiday-lights.is-lit .bulb.twinkle .glow {
  animation: holiday-twinkle var(--t, 3.6s) ease-in-out var(--td, 0s) 3;
}
@keyframes holiday-twinkle {
  0%, 100% { opacity: .9; }
  50%      { opacity: .35; }
}

/* Mobile menu opens right under the nav: give the lights room so they
   don't sit on top of the first menu item */
@media (max-width: 860px) {
  html[data-holiday="on"] .nav-links { padding-top: 2.75rem; }
}

/* ── CRANBERRY ACCENTS ──
   Every feature card pairs red with green: a cranberry icon under a moss rule,
   or a moss icon under a cranberry rule. Icon swaps happen in seasonal.js. */
html[data-holiday="on"] .feature:has(.feature-art--bottles),
html[data-holiday="on"] .feature:has(.feature-art--events) { border-top-color: var(--cranberry); }

html[data-holiday="on"] .divider {
  background: linear-gradient(90deg, var(--cranberry) 0%, var(--tan) 50%, var(--moss) 100%);
  opacity: .5;
}
html[data-holiday="on"] .event-card { border-top: 3px solid var(--cranberry); }
html[data-holiday="on"] .event-card:nth-child(even) { border-top-color: var(--moss2); }

/* ── SNOW (homepage hero) ── */
.holiday-snow {
  position: absolute; inset: 0;
  z-index: 1;                  /* above the photo overlay, below the type */
  pointer-events: none;
  overflow: hidden;
}
/* Outer span falls; inner span sways side to side as it drops */
.holiday-snow .flake {
  position: absolute;
  top: -12px;
  left: var(--x);
  animation: holiday-fall var(--d) linear var(--delay) 2;   /* tapers off as flakes finish */
  will-change: transform;
}
.holiday-snow .flake i {
  display: block;
  width: var(--s); height: var(--s);
  border-radius: 50%;
  background: var(--snow);
  opacity: var(--o);
  animation: holiday-sway var(--sw) ease-in-out var(--swd) infinite alternate;
}
@keyframes holiday-fall {
  to { transform: translate3d(var(--drift), calc(100vh + 24px), 0); }
}
@keyframes holiday-sway {
  from { transform: translateX(calc(var(--amp) * -1)); }
  to   { transform: translateX(var(--amp)); }
}

/* Drift on the stats ledge: shape is generated in seasonal.js */
.holiday-drift {
  position: absolute;
  left: 0; right: 0;
  bottom: calc(100% - 2px);    /* sits on, and covers, the ledge's top rule */
  height: 26px;
  pointer-events: none;
}
.holiday-drift svg { display: block; overflow: visible; }

/* ── REDUCED MOTION ──
   Lights come on steady, no shimmer. Snow holds still. */
@media (prefers-reduced-motion: reduce) {
  .holiday-lights .glass,
  .holiday-lights .glow { transition: none; }
  .holiday-lights .bulb.twinkle .glow { animation: none !important; }
  .holiday-snow .flake,
  .holiday-snow .flake i { animation: none; }
  .holiday-snow .flake { top: var(--y); }
}
