/* ————————————————— the house in December —————————————————
   A seasonal layer, on only while <html class="xmas"> is set — themes/xmas.js
   sets it from 1 December to 7 January (the Orthodox Christmas included) by
   the visitor's own date, and ?xmas=on|off forces it either way for a look.
   Three things, all in the house palette and all obeying the room:
   the marquee's lamp run becomes a string of lights, the dust in the stage
   becomes snow, and Primo wears a hat. Daylight keeps the glass and drops the
   glow — a glowing bulb in a sunlit room is a lie, the rule --bulb-* follows. */

/* ———— the string of lights: hung on the marquee's own line ———— */
html.xmas .marq{ visibility:hidden; }
.xl{
  position:absolute; inset-inline: var(--pad);
  top: calc(100% - 7px); height:22px; /* wire at 2.5px = the marquee's centre line */
  pointer-events:none;
}
.xl-wire{ position:absolute; left:0; top:0; overflow:visible; }
.xl-wire path{ fill:none; stroke: var(--fg-mute); stroke-width:1; opacity:.5; }
.xl i, .xd i{
  position:absolute; width:6px; height:9px; margin-left:-3px;
  transform-origin:50% 0; rotate: var(--r, 0deg);
  border-radius: 50% / 38% 38% 62% 62%;
  background:
    radial-gradient(circle at 34% 30%, rgba(255,255,255,.8) 0 .8px, transparent 1.7px),
    var(--c);
}
.xl i::before, .xd i::before{ /* the socket the bulb hangs from */
  content:''; position:absolute; top:-2.5px; left:1.25px;
  width:3.5px; height:3px; border-radius:1px; background: var(--fg-mute);
}
.xl-p{ --c: var(--pink);  --g: rgba(224,86,143,.7); }
.xl-g{ --c: var(--color-gold, #d4a422); --g: rgba(230,184,50,.7); }
.xl-w{ --c: #fff;         --g: rgba(255,233,242,.75); }
/* white glass on a paper-white room needs its edge drawn */
body.lit .xl-w{ box-shadow: inset 0 0 0 .75px rgba(12,10,9,.22); }
/* the blackout: every bulb burns and breathes on its own beat */
body:not(.lit) .xl i, body:not(.lit) .xd i{
  box-shadow: 0 0 6px 1px var(--g), 0 0 16px 3px color-mix(in srgb, var(--g) 35%, transparent);
  animation: xl-twinkle var(--t, 3.6s) ease-in-out var(--dl, 0s) infinite;
}
@keyframes xl-twinkle{ 0%,100%{ opacity:1; } 50%{ opacity:.42; } }
/* the cord's relight runs through the string exactly as through the marquee */
.xl.chase{
  -webkit-mask-image: linear-gradient(90deg, #000 0 45%, transparent 62%);
  mask-image: linear-gradient(90deg, #000 0 45%, transparent 62%);
  -webkit-mask-size: 300% 100%; mask-size: 300% 100%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  animation: marq-chase .55s var(--out) both;
}

/* ———— the finale's door: lights up the jambs and over the arch ————
   Positioned by the script along the arch's own path, inside .door (which
   isolates), behind the words like the arch itself. */
.xd{ position:absolute; inset:0; z-index:-1; pointer-events:none; }
.xd-b{ position:absolute; width:0; height:0; }
.xd-b i{ left:0; top:0; }
/* each bulb kindles as the drawn line reaches it */
.act2.will-reveal .xd-b{ opacity:0; }
.act2.in-cta .xd-b{ opacity:1; transition: opacity .35s ease var(--d, 0s); }
/* the bow that ties the two strands at the crown — the hat's red */
.xd-bow{
  position:absolute; width:32px; height:26px; translate:-50% -46%;
  overflow:visible;
}
.xd-bow-r{ fill:#c8202f; stroke: rgba(12,10,9,.18); stroke-width:.6; stroke-linejoin:round; }
.xd-bow-k{ fill:#e0434b; stroke: rgba(12,10,9,.18); stroke-width:.6; }
.act2.will-reveal .xd-bow{ opacity:0; scale:.4; }
.act2.in-cta .xd-bow{ opacity:1; scale:1; transition: opacity .25s ease 1.5s, scale .55s var(--spring) 1.5s; }
@media (min-width:961px){ .xd-bow{ width:40px; height:32.5px; } }
/* snow inside the doorway's light; fades with the jambs before the floor */
.xd-snow{
  position:absolute; inset:0; z-index:-1; width:100%; height:100%; pointer-events:none;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 94%);
  mask-image: linear-gradient(to bottom, #000 55%, transparent 94%);
}

/* ———— snow: replaces the dust in the beam ———— */
html.xmas .motes{ display:none; }
/* the fall — behind the type */
.xs{
  position:absolute; inset:0; z-index:1; width:100%; height:100%;
  pointer-events:none;
  /* the stage clips at its foot — fade the fall out before that edge */
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 98%);
  mask-image: linear-gradient(to bottom, #000 72%, transparent 98%);
}
/* what settled on the headline — BEHIND the type (above the fall), sized to it
   by the script: a drift can sit on a letter but never cover one */
.xs-pile{ position:absolute; z-index:1; pointer-events:none; }

/* ———— Primo's hat (drawn in the owl's own viewBox, rides the head) ———— */
/* Christmas red — the season's colour, admitted by the founder's call
   (2026-12-02) for this one object only, the way WhatsApp's green is admitted
   for its mark. Nothing else on the page wears it. */
.xm-cone{ fill: #c8202f; }
.xm-fold{ fill: #e0434b; }
.xm-fur, .xm-pom{ fill:#fff; stroke: rgba(12,10,9,.12); stroke-width:.8; }
.xm-snow{ fill:#fff; }
/* the hat rises above the walker's box — let it show */
html.xmas .walker-svg{ overflow:visible; }

/* reduced motion: nothing falls (the script makes no fall), the drifts stay */
@media (prefers-reduced-motion: reduce){
  body:not(.lit) .xl i{ animation:none; }
  .xl.chase{ animation:none; -webkit-mask-image:none; mask-image:none; }
  body:not(.lit) .xd i{ animation:none; }
  .act2.in-cta .xd-b, .act2.in-cta .xd-bow{ transition:none; }
}
