/* ============================================================
   Holiday mode (switched on from the staff panel).
   app/holiday.js adds  html.holiday.holiday-<id>  and drops the falling bits.
   Each holiday just sets the colours + hat below; the shared rules do the rest.
   ============================================================ */

html.holiday-newyear {
  --hat: url("/icons/holiday/party-hat.svg");
  --tape-a: #d4af37; --ink-a: #141210; --tape-b: #141414; --ink-b: #f0cf5c;
  --flag-1: #d4af37; --flag-2: #cfd2d6; --flag-3: #2a2a2a;
  --greet: #141414; --greet-ink: #f0cf5c; --greet-edge: #d4af37;
  --yellow-img: sepia(.35) saturate(1.3); --red-img: grayscale(1) brightness(.55);
}
html.holiday-valentines {
  --hat: url("/icons/holiday/heart-headband.svg");
  --tape-a: #ff7aa8; --ink-a: #3b0a1a; --tape-b: #c8102e; --ink-b: #ffe4ee;
  --flag-1: #ff4d8d; --flag-2: #ffb3cb; --flag-3: #c8102e;
  --greet: #d81b60; --greet-ink: #ffffff; --greet-edge: #ffd1e1;
  --yellow-img: hue-rotate(-78deg) saturate(1.2); --red-img: none;
}
html.holiday-stpatricks {
  --hat: url("/icons/holiday/leprechaun-hat.svg");
  --tape-a: #169b62; --ink-a: #ffffff; --tape-b: #e2b60f; --ink-b: #0b3d24;
  --flag-1: #169b62; --flag-2: #7ed957; --flag-3: #e2b60f;
  --greet: #169b62; --greet-ink: #ffffff; --greet-edge: #e2b60f;
  --yellow-img: hue-rotate(72deg) saturate(1.2); --red-img: hue-rotate(110deg) saturate(.9);
}
html.holiday-easter {
  --hat: url("/icons/holiday/bunny-ears.svg");
  --tape-a: #c4b5fd; --ink-a: #2e1065; --tape-b: #f9a8d4; --ink-b: #4a0a2e;
  --flag-1: #f9a8d4; --flag-2: #a5f3fc; --flag-3: #fde68a;
  --greet: #c4b5fd; --greet-ink: #2e1065; --greet-edge: #fde68a;
  --yellow-img: hue-rotate(200deg) saturate(.55) brightness(1.15); --red-img: hue-rotate(-30deg) saturate(.5) brightness(1.45);
}
html.holiday-july4 {
  --hat: url("/icons/holiday/uncle-sam-hat.svg");
  --stripe: #b22234; --stripe-ink: #1b1a3e; --tape-b: #3c3b6e; --ink-b: #ffffff;
  --flag-1: #b22234; --flag-2: #f4f1ea; --flag-3: #3c3b6e;
  --greet: #3c3b6e; --greet-ink: #ffffff; --greet-edge: #b22234;
  --yellow-img: grayscale(1) brightness(1.6); --red-img: none;
}
html.holiday-halloween {
  --hat: url("/icons/holiday/witch-hat.svg");
  --tape-a: #f97316; --ink-a: #140a02; --tape-b: #5b21b6; --ink-b: #fde68a;
  --flag-1: #f97316; --flag-2: #7c3aed; --flag-3: #1a1a1a;
  --greet: #f97316; --greet-ink: #140a02; --greet-edge: #1a1a1a;
  --yellow-img: hue-rotate(-22deg) saturate(1.5); --red-img: hue-rotate(250deg) saturate(1.2);
}
html.holiday-thanksgiving {
  --hat: url("/icons/holiday/pilgrim-hat.svg");
  --tape-a: #d9822b; --ink-a: #2b140a; --tape-b: #7a3417; --ink-b: #f6e7cf;
  --flag-1: #c2410c; --flag-2: #d9a43b; --flag-3: #7a3417;
  --greet: #e08a2c; --greet-ink: #2b140a; --greet-edge: #5a3a22;
  --yellow-img: hue-rotate(-20deg) saturate(1.4); --red-img: sepia(.5) saturate(1.3) brightness(.85);
}
html.holiday-christmas {
  --hat: url("/icons/holiday/santa-hat.svg");
  --stripe: #c8102e; --stripe-ink: #0f3d22; --tape-b: #1d6b3a; --ink-b: #f4efe6;
  --greet: #b3102a; --greet-ink: #ffffff; --greet-edge: #f4efe6;
  --yellow-img: hue-rotate(78deg) saturate(1.15); --red-img: none;
}

/* the falling bits (snow, leaves, confetti...) */
.holiday-fall { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 48; pointer-events: none; }

/* ---------- hats ---------- */

/* the D of DOGHOUSE */
html.holiday .wordmark .sr-only + .ltr { position: relative; }
html.holiday .wordmark .sr-only + .ltr::after {
  content: "";
  position: absolute;
  left: -.18em;
  top: -.46em;
  width: .7em;
  height: .56em;
  background: var(--hat) center / contain no-repeat;
  transform: rotate(-16deg);
  pointer-events: none;
}
/* every TV */
html.holiday .tv::after {
  content: "";
  position: absolute;
  z-index: 4;
  left: -28px;
  top: -42px;
  width: 108px;
  height: 86px;
  background: var(--hat) center / contain no-repeat;
  transform: rotate(-24deg);
  filter: drop-shadow(3px 4px 0 rgba(0, 0, 0, .45));
  pointer-events: none;
}
/* the crew's photos */
html.holiday .photo::after {
  content: "";
  position: absolute;
  z-index: 2;
  right: -28px;
  top: -42px;
  width: 78px;
  height: 62px;
  background: var(--hat) center / contain no-repeat;
  transform: rotate(20deg);
  pointer-events: none;
}
/* everyone's profile picture */
html.holiday .pf-avatar::after {
  content: "";
  position: absolute;
  z-index: 3;
  left: -24%;
  top: -40%;
  width: 80%;
  height: 66%;
  background: var(--hat) center / contain no-repeat;
  transform: rotate(-22deg);
  filter: drop-shadow(2px 3px 0 rgba(0, 0, 0, .4));
  pointer-events: none;
}
/* the DOGHOUSE logo on the sign-up + staff pages */
html.holiday .dh-logo { position: relative; }
html.holiday .dh-logo::after {
  content: "";
  position: absolute;
  left: -14px;
  top: -16px;
  width: 30px;
  height: 24px;
  background: var(--hat) center / contain no-repeat;
  transform: rotate(-18deg);
  pointer-events: none;
}

/* ---------- caution tape colours (main site) ---------- */

html.holiday .tape--yellow { --tape-color: var(--tape-a, var(--tape-yellow)); color: var(--ink-a, #141010); }
html.holiday .tape--red { --tape-color: var(--tape-b, var(--red)); color: var(--ink-b, #0a0808); }
html.holiday-christmas .tape--yellow,
html.holiday-july4 .tape--yellow {
  color: var(--stripe-ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, 0) 38%, rgba(0, 0, 0, .16)),
    repeating-linear-gradient(-45deg, #f4efe6 0 18px, var(--stripe) 18px 36px);
}
html.holiday :is(.corner-tape, .intro-tape)[src*="caution-yellow"] { filter: var(--yellow-img, none); }
html.holiday :is(.corner-tape, .intro-tape)[src*="caution-red"] { filter: var(--red-img, none); }

/* ---------- along the top of each page: little flags (Christmas gets lights) ---------- */

html.holiday .view::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 32px;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(rgba(30, 24, 20, .9), rgba(30, 24, 20, .9)) 0 2px / 100% 2px no-repeat,
    conic-gradient(from -28deg at 50% 100%, var(--flag-1) 0 56deg, transparent 56deg) 0 3px / 120px 28px repeat-x,
    conic-gradient(from -28deg at 50% 100%, var(--flag-2) 0 56deg, transparent 56deg) 40px 3px / 120px 28px repeat-x,
    conic-gradient(from -28deg at 50% 100%, var(--flag-3) 0 56deg, transparent 56deg) 80px 3px / 120px 28px repeat-x;
  filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .45));
}
html.holiday-christmas .view::before {
  height: 34px;
  background:
    radial-gradient(5px 8px at 50% 16px, #ff3b3b 92%, transparent) -140px 0 / 280px 34px repeat-x,
    radial-gradient(5px 8px at 50% 16px, #3ddc6b 92%, transparent) -70px 0 / 280px 34px repeat-x,
    radial-gradient(5px 8px at 50% 16px, #ffd23f 92%, transparent) 0 0 / 280px 34px repeat-x,
    radial-gradient(5px 8px at 50% 16px, #4fb3ff 92%, transparent) 70px 0 / 280px 34px repeat-x,
    radial-gradient(circle at 50% -30px, transparent 44px, #1d1d1d 45px 47px, transparent 48px) 0 0 / 70px 34px repeat-x;
  filter: drop-shadow(0 0 6px rgba(255, 230, 160, .6));
  animation: holiday-twinkle 1.6s steps(1, end) infinite;
}
@keyframes holiday-twinkle { 50% { filter: brightness(.7) drop-shadow(0 0 2px rgba(255, 230, 160, .3)); } }

/* ---------- the greeting tape (main page, when nothing else is announced) ---------- */

.announce--holiday .announce-tape {
  color: var(--greet-ink);
  background:
    linear-gradient(var(--greet-edge) 0 0) top / 100% 4px no-repeat,
    linear-gradient(var(--greet-edge) 0 0) bottom / 100% 4px no-repeat,
    var(--greet);
}
