/* ===========================================================================
   holiday.css: the Holiday Special unit (holiday.js).
   Candy-cane progress bars, string lights, snow on the path and the cards,
   holly on the section banner. Motion is transform/opacity only and stops
   under prefers-reduced-motion.
   =========================================================================== */

.hol-scroll { background: #f4f8fc; }

/* ---------- unit bar ---------- */
.hol-bar { position: relative; background: #2f9e44; overflow: visible; z-index: 7; }
.hol-bar::before { /* a few soft flakes drifting across the bar */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background-image:
    radial-gradient(2px 2px at 12% 30%, #fff 50%, transparent 52%),
    radial-gradient(2.5px 2.5px at 38% 70%, #fff 50%, transparent 52%),
    radial-gradient(1.8px 1.8px at 61% 22%, #fff 50%, transparent 52%),
    radial-gradient(2.4px 2.4px at 78% 58%, #fff 50%, transparent 52%),
    radial-gradient(1.6px 1.6px at 90% 18%, #fff 50%, transparent 52%),
    radial-gradient(2px 2px at 52% 46%, #fff 50%, transparent 52%);
}
.hol-bar .ub-main { position: relative; }
.hol-bar .ub-prog { background: #eef3f0; }
.hol-bar .ub-prog-fill,
.quiz-screen.hol .quiz-bar-fill {
  background:
    linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,0) 45%, rgba(0,0,0,.08)),
    repeating-linear-gradient(-45deg, #e2343c 0 7px, #fff7f7 7px 14px);
}
.hol-bar .ub-prog-fill .ub-streak, .quiz-screen.hol .quiz-bar-fill::after { opacity: .55; }

/* string lights hanging just under the bar, over the top of the map */
.hol-lights { position: absolute; left: 0; right: 0; bottom: -24px; width: 100%; height: 30px; pointer-events: none; }
.hol-lights .hb { animation: holTwinkle 2.6s ease-in-out infinite; }
.hol-lights .hb1 { animation-delay: -.65s; }
.hol-lights .hb2 { animation-delay: -1.3s; }
.hol-lights .hb3 { animation-delay: -1.95s; }
@keyframes holTwinkle { 0%, 100% { opacity: 1; } 50% { opacity: .62; } }

/* ---------- the path ---------- */
.hol-area .sec-banner { border-color: #c8323b; }
.hol-area .sec-banner .sec-eyebrow { color: #c8323b; }
.hol-area .sec-banner::before { /* snow resting on the banner */
  content: ""; position: absolute; left: 10px; right: 10px; top: -7px; height: 11px; pointer-events: none;
  background:
    radial-gradient(9px 7px at 8% 100%, #fff 96%, transparent 100%),
    radial-gradient(12px 8px at 24% 100%, #fff 96%, transparent 100%),
    radial-gradient(10px 7px at 42% 100%, #fff 96%, transparent 100%),
    radial-gradient(13px 9px at 60% 100%, #fff 96%, transparent 100%),
    radial-gradient(10px 7px at 78% 100%, #fff 96%, transparent 100%),
    radial-gradient(9px 7px at 93% 100%, #fff 96%, transparent 100%);
  filter: drop-shadow(0 1px 0 #c9d8e6) drop-shadow(0 1px 1px rgba(60,90,120,.18));
}
.hol-area .sec-banner::after { /* holly on the corner */
  content: ""; position: absolute; left: -16px; top: -14px; width: 34px; height: 30px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 30'%3E%3Cpath d='M16 18c-3-1-5-4-12-3 2-2 1-4 0-6 3 1 5-1 6-3 1 2 3 3 5 2-1 3 0 6 1 10z' fill='%231e8a3f' stroke='%23136b2e' stroke-width='.8'/%3E%3Cpath d='M18 18c3-1 5-4 12-3-2-2-1-4 0-6-3 1-5-1-6-3-1 2-3 3-5 2 1 3 0 6-1 10z' fill='%231e8a3f' stroke='%23136b2e' stroke-width='.8'/%3E%3Ccircle cx='14' cy='20' r='3.3' fill='%23d61e2c'/%3E%3Ccircle cx='20' cy='20.5' r='3.3' fill='%23d61e2c'/%3E%3Ccircle cx='17' cy='15.5' r='3.3' fill='%23e3313d'/%3E%3Ccircle cx='16' cy='14.4' r='1' fill='%23fff' opacity='.7'/%3E%3C/svg%3E") center / contain no-repeat;
  transform: rotate(-14deg);
}
/* a little snow on every lesson stone */
.hol-area .rock::before {
  content: ""; position: absolute; left: 12%; right: 12%; top: -5px; height: 10px; pointer-events: none;
  border-radius: 50% 50% 45% 45% / 80% 80% 40% 40%;
  background:
    radial-gradient(6px 5px at 22% 70%, #fff 95%, transparent 100%),
    radial-gradient(7px 6px at 74% 66%, #fff 95%, transparent 100%),
    #fff;
  box-shadow: 0 1px 0 #cddbe8, 0 2px 3px rgba(60,90,120,.18);
}
.hol-area .rock.locked::before { opacity: .8; }

/* ---------- Units page card + Learn chip ---------- */
.un-sec.hol-sec {
  background:
    radial-gradient(2px 2px at 8% 18%, rgba(255,255,255,.75) 50%, transparent 52%),
    radial-gradient(2.6px 2.6px at 22% 72%, rgba(255,255,255,.6) 50%, transparent 52%),
    radial-gradient(1.8px 1.8px at 47% 12%, rgba(255,255,255,.7) 50%, transparent 52%),
    radial-gradient(2.4px 2.4px at 63% 82%, rgba(255,255,255,.55) 50%, transparent 52%),
    radial-gradient(2px 2px at 86% 26%, rgba(255,255,255,.7) 50%, transparent 52%),
    linear-gradient(135deg, #d63c45, #b4262f);
}
.un-sec.hol-sec .un-btn.main { color: #b4262f; }
/* unit-bar tiles: same white card as the Daily Question tile beside them */
.unit-bar .hol-tile, .unit-bar .hol-back { position: relative; gap: 5px; }
.hol-tile-ico, .hol-back-ico { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; }
.hol-tile-ico { background: #c8323b; color: #c8323b; }
.hol-tile-ico svg { width: 18px; height: 18px; }
.hol-tile-n {
  position: absolute; top: -6px; right: -6px; min-width: 24px; padding: 1px 6px; border-radius: 999px;
  background: #c8323b; color: #fff; border: 2px solid #fff; font-family: var(--font-display); font-weight: 800; font-size: 10px; line-height: 14px;
}
.hol-back-ico { background: #2f9e44; color: #fff; }
.unit-bar .hol-back:hover, .unit-bar .hol-tile:hover { transform: translateY(-1px); }

/* ---------- lesson complete ---------- */
.complete-screen.hol .badge { position: relative; }
.complete-screen.hol .badge::before { /* snow cap */
  /* the top of the circle itself, cut off in a row of soft lumps */
  content: ""; position: absolute; inset: -3px -2px; border-radius: 50%; pointer-events: none;
  background:
    radial-gradient(circle farthest-side, transparent 93%, #b9cadb 95.5%, #b9cadb 100%),
    linear-gradient(180deg, #fff 0 14%, #dfe9f3 27%);
  --holcap:
    linear-gradient(#000 0 0) top / 100% 17% no-repeat,
    radial-gradient(circle 8px at 14% 21%, #000 96%, transparent 100%),
    radial-gradient(circle 9px at 31% 23%, #000 96%, transparent 100%),
    radial-gradient(circle 8px at 50% 20%, #000 96%, transparent 100%),
    radial-gradient(circle 9px at 69% 23%, #000 96%, transparent 100%),
    radial-gradient(circle 7px at 86% 20%, #000 96%, transparent 100%);
  -webkit-mask: var(--holcap);
  mask: var(--holcap);
}
.complete-screen.hol .badge::after { /* holly */
  content: ""; position: absolute; right: -14px; bottom: -6px; width: 44px; height: 38px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 30'%3E%3Cpath d='M16 18c-3-1-5-4-12-3 2-2 1-4 0-6 3 1 5-1 6-3 1 2 3 3 5 2-1 3 0 6 1 10z' fill='%231e8a3f' stroke='%23136b2e' stroke-width='.8'/%3E%3Cpath d='M18 18c3-1 5-4 12-3-2-2-1-4 0-6-3 1-5-1-6-3-1 2-3 3-5 2 1 3 0 6-1 10z' fill='%231e8a3f' stroke='%23136b2e' stroke-width='.8'/%3E%3Ccircle cx='14' cy='20' r='3.3' fill='%23d61e2c'/%3E%3Ccircle cx='20' cy='20.5' r='3.3' fill='%23d61e2c'/%3E%3Ccircle cx='17' cy='15.5' r='3.3' fill='%23e3313d'/%3E%3Ccircle cx='16' cy='14.4' r='1' fill='%23fff' opacity='.7'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- falling snow behind the app (website) on holiday screens ---------- */
.hol-page-snow { display: none; position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
body:has(.hol-scroll, .quiz-screen.hol, .complete-screen.hol) .hol-page-snow { display: block; }
.hol-page-snow::before, .hol-page-snow::after {
  content: ""; position: absolute; left: 0; right: 0; top: -100vh; height: 200vh;
  background-image:
    radial-gradient(3px 3px at 20px 30px, #fff 50%, transparent 52%),
    radial-gradient(2px 2px at 90px 120px, #fff 50%, transparent 52%),
    radial-gradient(3.5px 3.5px at 160px 60px, rgba(255,255,255,.9) 50%, transparent 52%),
    radial-gradient(2.4px 2.4px at 60px 190px, #fff 50%, transparent 52%),
    radial-gradient(2px 2px at 200px 170px, rgba(255,255,255,.85) 50%, transparent 52%);
  background-size: 230px 230px;
  animation: holSnow 26s linear infinite;
}
.hol-page-snow::after {
  background-size: 330px 330px; opacity: .7; animation-duration: 40s;
  filter: blur(1px);
}
@keyframes holSnow { from { transform: translateY(0); } to { transform: translateY(100vh); } }

@media (prefers-reduced-motion: reduce) {
  .hol-lights .hb, .hol-page-snow::before, .hol-page-snow::after { animation: none; }
}
