/* ==========================================================================
   Holiday season theme. Loaded AFTER styles.css on the public pages only.
   OFF SWITCH: delete the <link href="assets/holiday.css"> line from the eight
   public pages and the <script src="assets/js/holiday.js"> line from
   index.html. styles.css holds no holiday rules, so nothing else changes.
   Everything here is decoration: pseudo-elements only (never read aloud),
   plus the greeting line holiday.js adds to the home page.
   ========================================================================== */

:root {
  --pine: #1f4d36;
  --pine-dark: #163a28;
  --bulb-red: #d8352c;
  --bulb-gold: #f1c55a;
  --bulb-green: #3fa66a;
  --bulb-white: #fff7e6;
  --bulb-gap: 24px;   /* distance between bulbs */
  --bulb-w: 4px;      /* bulb radii */
  --bulb-h: 6px;
}

/* ---------- String of lights under the header (every public page) ---------- */

/* Four bulbs per tile of 4 x --bulb-gap, split over two layers so the two
   halves can twinkle out of step. ::before also carries the wire. */
.rank-stripe { position: relative; z-index: 3; }
.rank-stripe::before,
.rank-stripe::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 100%;
  height: calc(var(--bulb-h) * 2 + 6px);
  pointer-events: none;
  background-repeat: repeat-x;
  background-size: calc(var(--bulb-gap) * 4) 100%;
  filter: drop-shadow(0 0 .6px rgba(17, 17, 17, .6)) drop-shadow(0 0 3px rgba(255, 214, 120, .55));
  animation: holiday-twinkle 2.6s ease-in-out infinite;
}
.rank-stripe::before {
  background-image:
    radial-gradient(var(--bulb-w) var(--bulb-h) at calc(var(--bulb-gap) * .5) calc(var(--bulb-h) + 4px), var(--bulb-red) 92%, transparent),
    radial-gradient(var(--bulb-w) var(--bulb-h) at calc(var(--bulb-gap) * 2.5) calc(var(--bulb-h) + 4px), var(--bulb-green) 92%, transparent),
    linear-gradient(to bottom, transparent 1px, rgba(17, 17, 17, .55) 1px, rgba(17, 17, 17, .55) 2px, transparent 2px);
}
.rank-stripe::after {
  background-image:
    radial-gradient(var(--bulb-w) var(--bulb-h) at calc(var(--bulb-gap) * 1.5) calc(var(--bulb-h) + 4px), var(--bulb-gold) 92%, transparent),
    radial-gradient(var(--bulb-w) var(--bulb-h) at calc(var(--bulb-gap) * 3.5) calc(var(--bulb-h) + 4px), var(--bulb-white) 92%, transparent);
  animation-duration: 3.4s;
  animation-delay: -1.3s;
}

@keyframes holiday-twinkle {
  0%, 100% { opacity: 1; }
  50% { opacity: .6; }
}

/* ---------- Home: pine marquee band with light snowfall ---------- */

.marquee { position: relative; background: var(--pine); }

/* Two sparse layers of small, translucent flakes drifting down over the band.
   Each layer moves exactly one tile per loop, so it wraps without a jump. */
.marquee::before,
.marquee::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-repeat: repeat;
}
.marquee::before {
  background-image:
    radial-gradient(circle at 30px 40px, rgba(255, 255, 255, .85) 1.6px, transparent 2.4px),
    radial-gradient(circle at 140px 110px, rgba(255, 255, 255, .75) 1.3px, transparent 2px),
    radial-gradient(circle at 210px 20px, rgba(255, 255, 255, .8) 1.8px, transparent 2.6px);
  background-size: 240px 160px;
  opacity: .6;
  animation: holiday-snow-a 14s linear infinite;
}
.marquee::after {
  background-image:
    radial-gradient(circle at 60px 70px, rgba(255, 255, 255, .7) 1px, transparent 1.6px),
    radial-gradient(circle at 170px 150px, rgba(255, 255, 255, .7) 1.1px, transparent 1.7px);
  background-size: 200px 200px;
  opacity: .5;
  animation: holiday-snow-b 22s linear infinite;
}
@keyframes holiday-snow-a { to { background-position: 0 160px; } }
@keyframes holiday-snow-b { to { background-position: 0 200px; } }

/* ---------- Home: seasonal touches on the intro section ---------- */

.holiday-greeting {
  display: block;
  width: fit-content;
  margin: 0 0 1.25rem;
  padding: .45rem .9rem;
  border: 1px solid var(--gold);
  border-left: 4px solid var(--pine);
  color: var(--pine);
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  line-height: 1.4;
}

/* A holly sprig (two leaves, three berries) at the end of the title's rule. */
.hero h1 .rule { position: relative; }
.hero h1 .rule::after {
  content: "";
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  width: 44px;
  height: 28px;
  transform: translateY(-50%);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 28'%3E%3Cpath fill='%231f4d36' d='M21 15C17 9 9 4 1 7c3 1 4 4 3 6 2-1 5 0 5 3 2-2 5-1 6 1 1-2 4-3 6-2z'/%3E%3Cpath fill='%23163a28' d='M23 15c4-6 12-11 20-8-3 1-4 4-3 6-2-1-5 0-5 3-2-2-5-1-6 1-1-2-4-3-6-2z'/%3E%3Ccircle cx='22' cy='17' r='3.4' fill='%23a8231f'/%3E%3Ccircle cx='18' cy='21' r='3' fill='%23c62828'/%3E%3Ccircle cx='26' cy='21' r='3' fill='%23a8231f'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* The $40 trial fact in pine with a gold ribbon under it. */
.hero-facts li:last-child strong {
  color: var(--pine);
  text-decoration: underline 3px var(--gold);
  text-underline-offset: 6px;
}

/* ---------- Trial popup: pine and gold edge, one hanging ornament ---------- */

.modal-card {
  border: 3px solid var(--pine);
  box-shadow: 0 0 0 6px var(--bone), 0 0 0 8px var(--gold), 0 25px 80px rgba(0, 0, 0, .3);
}
.modal-card::before {
  content: "";
  position: absolute;
  top: -20px; left: 50%;
  width: 26px; height: 34px;
  transform: translateX(-50%);
  pointer-events: none;
  background:
    linear-gradient(var(--gold), var(--gold)) center 0 / 10px 7px no-repeat,
    radial-gradient(circle at 40% 38%, #e2574c, var(--brick) 60%) center 7px / 26px 26px no-repeat;
  border-radius: 0 0 50% 50% / 0 0 40% 40%;
}

/* ---------- Footer: a snow-dusted top edge under the red bar ---------- */

.site-footer::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 4px;
  height: 10px;
  pointer-events: none;
  background:
    radial-gradient(circle at 10px 0, rgba(255, 255, 255, .9) 5px, transparent 5.6px) 0 0 / 22px 10px repeat-x,
    radial-gradient(circle at 6px 0, rgba(255, 255, 255, .7) 3px, transparent 3.6px) 11px 0 / 22px 10px repeat-x;
}

/* ---------- Phones: smaller bulbs, closer together ---------- */

@media (max-width: 760px) {
  :root { --bulb-gap: 18px; --bulb-w: 3px; --bulb-h: 4.5px; }
  .hero h1 .rule::after { width: 34px; height: 22px; }
}

/* ---------- No motion: lights stay lit, snow stays put ---------- */

@media (prefers-reduced-motion: reduce) {
  .rank-stripe::before,
  .rank-stripe::after,
  .marquee::before,
  .marquee::after { animation: none; }
}
