/* Easter eggs (WIAB-Q15), only in EGGS=1 builds: base.njk links this file only then. Revised for her notes
   on the preview, 2026-11-26: no flicker or twinkle (WIAB-Q28, WIAB-Q29), every bulb whole, the lights a layer
   the header sits on, lights that stay put between pages (WIAB-Q28), the whole dino at its real pixels
   (WIAB-Q30). The Episodes menu (WIAB-Q31) came out on her note of 2026-11-29. Art:
   projects/wiab/design/make_egg_assets.py. */

/* String lights: a layer behind the logo and menu that hangs a little past the header. The strip already ends
   in the page colour, so it needs no fade. Its height keeps 2 image pixels per CSS pixel (3 on phones). */
.lights {
  position: absolute; top: 0; left: 0; z-index: 0; width: 100%; height: 138px;
  margin: 0; padding: 0; border: 0; background: none; cursor: pointer;
}
.lights::before {
  content: ""; position: absolute; inset: 0;
  background: url(/assets/eggs/lights-a1fdb7f1.jpg) left top / auto 100% repeat-x;
}
/* The switch: instant, like a real one. Set before the first paint from this device's choice (base.njk). */
.lights-off .lights::before { opacity: .22; filter: grayscale(1); }
.lights:focus-visible { outline: 2px solid var(--acc); outline-offset: -4px; }
/* The page sits on top. Only the empty parts of the header let a tap through to the switch; the logo, the
   menu, the search box and everything in the page take their own clicks. */
.wrap { position: relative; z-index: 1; pointer-events: none; }
.wrap > :not(.site-header), .site-header > * { pointer-events: auto; }
/* Readable over a bulb. The nav's blackish drop shadow is in site.css (every build); here the logo gets the
   same kind (it needs it only over the lights), and the search box a solid fill so its words sit on the page
   colour. */
.site-logo img {
  filter: drop-shadow(0 0 1px #000) drop-shadow(0 0 1px #000) drop-shadow(0 0 2px #000) drop-shadow(0 0 2px #000)
    drop-shadow(0 0 4px #000) drop-shadow(0 0 8px #000);
}
.search-box { background: var(--bg); }

/* The lights stay put between pages: the image is preloaded and cached for a year, and the page swaps with
   no fade or slide (a view transition with every animation off). The lights get no view-transition-name on
   purpose: a named element is drawn above the whole page during the swap, which hid the header for two frames
   in a frame trace (2026-11-26). Unnamed, they are part of the page snapshot and stay behind it. */
@view-transition { navigation: auto; }
::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

/* 404: the whole dino, standing on the footer rule (her WIAB-Q30), and larger (her note, 2026-11-29: "The dino can
   be larger"), then a tad smaller (WIAB-Q75): 120 CSS px, from files made for 144 at 2x and 3x, so no screen enlarges it. It is placed against main,
   which runs at least 80vh on every page (site.css), so it stays on the rule however tall the page is. */
main { position: relative; }
.not-found .dino { position: absolute; right: 8%; bottom: calc(-1 * var(--footer-gap)); width: 120px; height: auto; }   /* a tad smaller (her WIAB-Q75, 2026-11-29 21:52) */

@media (max-width: 720px) {
  .lights { height: 92px; }
}
@media (min-resolution: 2.5dppx) {
  .lights { height: 92px; }   /* 3x screens: 3 image pixels per CSS pixel here too */
}
