/* ═══════════════════════════════════════════════════════════════════════════
   FESTIVE LAYER  ·  Christmas and New Year 2027
   Everything here is scoped to html[data-festive="on"].
   TO REVERT: set data-festive="off" on <html> in index.html. Nothing else.
   ═══════════════════════════════════════════════════════════════════════════ */
html[data-festive="on"]{
  --fest-red:#E2524F;
  --fest-gold:#F0C04A;
  --fest-green:#3FA07A;
  --fest-snow:rgba(255,255,255,.92);
}

/* snow canvas sits above the page, below every control */
html[data-festive="on"] #snow{
  position:fixed; inset:0; width:100%; height:100%;
  pointer-events:none; z-index:60; opacity:.85;
}

/* a string of lights under the header */
html[data-festive="on"] .fest-lights{
  position:fixed; top:0; left:0; right:0; height:3px; z-index:61;
  pointer-events:none;
  background:repeating-linear-gradient(90deg,
    var(--fest-red) 0 7px, transparent 7px 20px,
    var(--fest-gold) 20px 27px, transparent 27px 40px,
    var(--fest-green) 40px 47px, transparent 47px 60px);
  animation:festTwinkle 2.6s ease-in-out infinite;
}
@keyframes festTwinkle{0%,100%{opacity:.55}50%{opacity:1}}

/* result chips get a festive ribbon instead of the yellow/teal bar */
html[data-festive="on"] .res-i::before{
  background:linear-gradient(90deg,var(--fest-red),var(--fest-gold),var(--fest-green));
}

/* the season chip in the letter and the hero */
html[data-festive="on"] .fest-chip{
  display:inline-flex; align-items:center; gap:7px;
  font-size:.72rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase;
  padding:6px 12px; border-radius:999px;
  color:var(--fest-gold); border:1px solid color-mix(in srgb,var(--fest-gold) 42%, transparent);
  background:color-mix(in srgb,var(--fest-red) 14%, transparent);
}
html[data-festive="on"] .fest-chip::before{content:"\2744"; font-size:.9em; line-height:1}

/* a garland across the top of the entry letter */
html[data-festive="on"] .gate-in{position:relative}
html[data-festive="on"] .gate-in::before{
  content:""; position:absolute; top:-10px; left:0; right:0; height:10px;
  pointer-events:none;
  background:
    radial-gradient(circle at 10% 50%, var(--fest-red) 0 3px, transparent 4px),
    radial-gradient(circle at 30% 50%, var(--fest-gold) 0 3px, transparent 4px),
    radial-gradient(circle at 50% 50%, var(--fest-green) 0 3px, transparent 4px),
    radial-gradient(circle at 70% 50%, var(--fest-gold) 0 3px, transparent 4px),
    radial-gradient(circle at 90% 50%, var(--fest-red) 0 3px, transparent 4px);
  opacity:.9;
}

/* warm the section tone just slightly, without flattening the background */
html[data-festive="on"] .tone-gold{
  background-image:radial-gradient(900px 420px at 18% 0%, color-mix(in srgb,var(--fest-red) 10%, transparent), transparent 70%);
}

/* people who asked for less motion get no snow and no twinkle */
@media (prefers-reduced-motion:reduce){
  html[data-festive="on"] #snow{display:none}
  html[data-festive="on"] .fest-lights{animation:none; opacity:.8}
}
/* keep the lights clear of the phone notch */
@media (max-width:620px){
  html[data-festive="on"] .fest-lights{height:2px}
  html[data-festive="on"] .fest-chip{font-size:12px}
}

/* santa hats */
html[data-festive="on"] .fest-hat svg{width:100%;height:auto;display:block;
  filter:drop-shadow(0 2px 5px rgba(0,0,0,.45))}

/* baubles hanging from the top edge */
html[data-festive="on"] .fest-baubles{
  position:fixed; top:0; left:0; right:0; height:0; z-index:59; pointer-events:none}
html[data-festive="on"] .fest-bauble{
  position:absolute; top:0; width:11px; height:11px; border-radius:50%;
  background:radial-gradient(circle at 34% 30%, rgba(255,255,255,.85), var(--bb) 58%);
  box-shadow:0 2px 7px rgba(0,0,0,.4);
  transform:translateY(var(--drop));
  transform-origin:50% calc(-1 * var(--drop));
  animation:festSway 4.4s ease-in-out infinite;
}
html[data-festive="on"] .fest-bauble::before{
  content:""; position:absolute; left:50%; top:calc(-1 * var(--drop)); width:1px;
  height:var(--drop); background:linear-gradient(var(--fest-gold),color-mix(in srgb,var(--fest-gold) 25%,transparent));
  transform:translateX(-50%)}
@keyframes festSway{0%,100%{transform:translateY(var(--drop)) rotate(-5deg)}
                    50%{transform:translateY(var(--drop)) rotate(5deg)}}

@media (prefers-reduced-motion:reduce){
  html[data-festive="on"] .fest-bauble{animation:none}
}
/* keep hats sensible on a phone */
@media (max-width:620px){
  html[data-festive="on"] .fest-baubles{display:none}
}

/* ═══ BIG FESTIVE PIECES ════════════════════════════════════════════════════ */

/* a loud marquee strip, reusing the site's own .mq motion */
html[data-festive="on"] .fest-mq{
  border-block:1px solid color-mix(in srgb,var(--fest-gold) 34%, transparent);
  background:linear-gradient(90deg,
    color-mix(in srgb,var(--fest-red) 22%, transparent),
    color-mix(in srgb,var(--fest-green) 16%, transparent) 50%,
    color-mix(in srgb,var(--fest-red) 22%, transparent));
  padding-block:clamp(12px,1.6vw,20px);
}
html[data-festive="on"] .fest-mq .mq-t span{
  font-family:var(--f-disp); font-weight:900;
  font-size:clamp(1.5rem,4.2vw,3.1rem); letter-spacing:-.03em;
  color:var(--fest-gold); padding-inline:.42em; white-space:nowrap;
  text-shadow:0 2px 18px color-mix(in srgb,var(--fest-red) 55%, transparent);
}
html[data-festive="on"] .fest-mq .mq-t span i{
  font-style:normal; color:var(--fest-red); padding-inline:.26em;
}

/* the big sincere greeting, just before the contact block */
html[data-festive="on"] .fest-greeting{
  text-align:center; padding-block:clamp(54px,8vw,110px); position:relative; overflow:hidden;
  background:
    radial-gradient(760px 420px at 50% 0%, color-mix(in srgb,var(--fest-red) 24%, transparent), transparent 72%),
    radial-gradient(620px 380px at 18% 100%, color-mix(in srgb,var(--fest-green) 18%, transparent), transparent 70%),
    var(--ink-2);
  border-top:1px solid color-mix(in srgb,var(--fest-gold) 26%, transparent);
}
html[data-festive="on"] .fest-greeting .fg-k{
  font-size:.74rem; font-weight:800; letter-spacing:.22em; text-transform:uppercase;
  color:var(--fest-gold); margin-bottom:clamp(14px,2vw,22px);
}
html[data-festive="on"] .fest-greeting h2{
  font-family:var(--f-disp); font-weight:900; line-height:.92;
  font-size:clamp(2.6rem,10vw,7rem); letter-spacing:-.05em; margin:0;
  color:#fff; text-wrap:balance;
  text-shadow:0 6px 40px color-mix(in srgb,var(--fest-red) 60%, transparent);
}
html[data-festive="on"] .fest-greeting h2 em{
  font-style:normal; display:block; color:var(--fest-gold);
  font-size:.46em; letter-spacing:-.03em; margin-top:.28em;
}
html[data-festive="on"] .fest-greeting .fg-sub{
  margin:clamp(20px,3vw,30px) auto 0; max-width:46ch;
  font-size:clamp(.95rem,1.3vw,1.1rem); line-height:1.7; color:var(--fg-dim);
}
html[data-festive="on"] .fest-greeting .fg-row{
  margin-top:clamp(20px,3vw,28px); display:flex; gap:10px; justify-content:center; flex-wrap:wrap;
}

/* warm festive light across more of the page, without flattening anything */
html[data-festive="on"] .tone-teal{
  background-image:radial-gradient(880px 420px at 82% 0%, color-mix(in srgb,var(--fest-green) 14%, transparent), transparent 70%)}
html[data-festive="on"] .tone-lift{
  background-image:radial-gradient(820px 400px at 12% 0%, color-mix(in srgb,var(--fest-red) 12%, transparent), transparent 70%)}
html[data-festive="on"] .tone-deep{
  background-image:radial-gradient(900px 440px at 60% 100%, color-mix(in srgb,var(--fest-gold) 11%, transparent), transparent 72%)}

/* snow a little more present */
html[data-festive="on"] #snow{opacity:1}

@media (max-width:620px){
  html[data-festive="on"] .fest-greeting h2{font-size:clamp(2.2rem,13vw,3.4rem)}
  html[data-festive="on"] .fest-mq .mq-t span{font-size:1.45rem}
  /* keep the legibility floor: nothing under 12px on a phone */
  html[data-festive="on"] .fest-greeting .fg-k{font-size:12px}
}
