/* Songhunt Christmas theme.
   Applies only when <html> has class "xmas" (set by public/xmas.js).
   Turn the whole theme off: set SONGHUNT_XMAS to false in xmas.js, then
   run python3 stamp.py. Visitors can hide snow from the banner button.
   See the README. */

html.xmas {
  --bg: #222824;
  --gold: #e7c98a;
  --berry: #d46462;
  --line: rgba(231, 201, 138, .22);
  background-color: #1a221c;
  scroll-padding-top: 5.5rem;
}
html.xmas body { background: transparent; }

/* Section washes stay dark enough to read, and open enough that snow shows. */
html.xmas .hero {
  position: relative;
  background:
    radial-gradient(80% 46% at 0% 0%, rgba(180, 64, 58, .16), transparent 56%),
    radial-gradient(60% 40% at 100% 0%, rgba(231, 201, 138, .1), transparent 52%),
    radial-gradient(120% 60% at 70% 100%, rgba(123, 173, 81, .14), transparent 62%),
    rgba(26, 34, 30, .58);
}
html.xmas .deep { background: rgba(16, 30, 24, .72); }
html.xmas .panel { background: rgba(34, 28, 28, .74); }
html.xmas .close {
  background:
    radial-gradient(50% 70% at 12% 45%, rgba(180, 64, 58, .12), transparent 68%),
    radial-gradient(60% 70% at 84% 50%, rgba(123, 173, 81, .12), transparent 70%),
    rgba(10, 16, 14, .7);
}
html.xmas footer { background: rgba(8, 14, 12, .78); }
html.xmas .nav {
  background: rgba(14, 22, 18, .9);
  border-bottom: 0;
}
html.xmas .buybar {
  background: rgba(14, 20, 18, .94);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .55), 0 0 0 1px rgba(231, 201, 138, .35);
}

/* Plug-in shots, the banner, and buttons stay above the snow.
   Flakes are small, so a few may cross body copy; they must not sit on the screenshots. */
html.xmas .shot, html.xmas .stage, html.xmas .yt,
html.xmas .xmas-banner, html.xmas .btn, html.xmas .fm, html.xmas .of {
  position: relative;
  z-index: 2;
}
html.xmas .shot {
  box-shadow: 0 30px 90px rgba(0, 0, 0, .55), 0 0 0 1px rgba(231, 201, 138, .2);
}

html.xmas .xmas-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .55rem .75rem;
  width: 100%;
  margin: 0;
  padding: .55rem var(--pad);
  box-sizing: border-box;
  text-align: center;
  background: rgba(16, 32, 26, .88);
  color: var(--cream);
  font-size: .98rem;
  font-weight: 600;
  line-height: 1.45;
  border-bottom: 1px solid rgba(231, 201, 138, .4);
}
html.xmas .xmas-snow-toggle {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(231, 201, 138, .75);
  background: transparent;
  color: var(--cream);
  font: 600 .78rem/1 Poppins, system-ui, sans-serif;
  border-radius: 999px;
  padding: .35rem .7rem;
  cursor: pointer;
}
html.xmas .xmas-snow-toggle[aria-pressed="false"] { color: var(--gold); }
html.xmas .xmas-snow-toggle:hover { border-color: var(--gold); color: var(--gold); }
html.xmas .xmas-snow-toggle:focus-visible {
  outline: 3px solid var(--neon);
  outline-offset: 2px;
}

html.xmas .xmas-kicker {
  display: block;
  grid-column: 1 / -1;
  margin: 0 0 -.75rem;
  color: var(--gold);
  font-weight: 600;
  font-size: .92rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}
html.xmas .xmas-signoff {
  display: block;
  margin: .85rem 0 0;
  color: var(--gold);
  font-weight: 600;
  font-size: 1.05rem;
}

/* Wire under the nav. Bulbs are added by xmas.js and twinkle on their own. */
html.xmas .nav::after {
  content: "";
  display: block;
  height: 12px;
  pointer-events: none;
  background: linear-gradient(transparent 6px, rgba(245, 240, 220, .38) 6px, rgba(245, 240, 220, .38) 7px, transparent 7px);
}
html.xmas .xmas-lights {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  height: 12px;
  pointer-events: none;
}
html.xmas .xmas-lights i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  opacity: .4;
  animation: xmas-twinkle 2.6s ease-in-out infinite;
}
html.xmas .xmas-lights i:nth-child(3n) { background: var(--berry); animation-duration: 3.1s; }
html.xmas .xmas-lights i:nth-child(3n+1) { background: #b7dc78; animation-duration: 2.2s; }
html.xmas .nav:hover .xmas-lights i,
html.xmas .nav:focus-within .xmas-lights i {
  animation: none;
  opacity: 1;
  box-shadow: 0 0 7px 1px currentColor;
}
@keyframes xmas-twinkle {
  0%, 100% { opacity: .28; }
  50% { opacity: 1; }
}

/* Fixed snowfield. Content rules above keep type and screenshots in front. */
html.xmas .xmas-snow {
  display: block;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}
html.xmas .xmas-snow.is-off { visibility: hidden; }

html.xmas .xmas-burst {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  overflow: hidden;
}
html.xmas .xmas-burst span {
  position: fixed;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: #f7f3e4;
  opacity: 1;
  animation: xmas-pop .7s ease-out forwards;
}
@keyframes xmas-pop {
  to { transform: translate3d(var(--dx), var(--dy), 0); opacity: 0; }
}

/* A thin gold edge on the buy pills. Prices and links are untouched. */
html.xmas a.btn.gumroad-button:not(.btn-o),
html.xmas a.btn.btn-g {
  box-shadow: 0 0 0 1.5px rgba(231, 201, 138, .8) inset, 0 8px 28px rgba(140, 193, 82, .28) !important;
}
html.xmas a.btn.gumroad-button.btn-o,
html.xmas a.btn.btn-o {
  box-shadow: 0 0 0 1.5px var(--gold) inset !important;
}
html.xmas .tier.lt::before {
  background: linear-gradient(90deg, var(--green), var(--gold));
}
html.xmas ::selection { background: #3d5a34; color: var(--cream); }

@media (max-width: 899px) {
  html.xmas .nav.open,
  html.xmas .nav.open ul { background: #121c16; }
}
@media (max-width: 479px) {
  html.xmas .xmas-banner { font-size: .92rem; }
}

@media (prefers-reduced-motion: reduce) {
  html.xmas .xmas-lights i { animation: none; opacity: .9; }
  html.xmas .nav:hover .xmas-lights i,
  html.xmas .nav:focus-within .xmas-lights i { box-shadow: none; }
  html.xmas .xmas-burst span { animation: none; display: none; }
}
@media print {
  html.xmas .xmas-snow, html.xmas .xmas-burst, html.xmas .xmas-lights { display: none; }
}
