/* Christmas 2026 on the front page (1 Dec 2026, the day Advent Calendar window 1 opens).
   ONE FLAG: <body class="xmas-2026"> in index.html. Every rule here is scoped to it, and the header, garland and Advent
   banner are hidden without it, so deleting that class takes all of it off at once.
   TO REMOVE AFTER CHRISTMAS (fully): delete the class, the <link href="/xmas.css">, the three blocks marked
   XMAS-2026 in index.html (header garland, foot garland, Christmas hero picture and the Advent banner), this file,
   img/xmas-*.svg|jpg|png|webp and img/advent-night*.jpg.
   No snow, no animation and no script on purpose: nothing here can slow an old iPad, so there is nothing to switch
   off for prefers-reduced-motion. The Advent banner must never say what is behind any window. */
:root {
  --xmas-holly: #2f6b4a;
  --xmas-gold-soft: #e6cf8e;
  --xmas-cream: #fbf7ec;
}
.xmas-header, .xmas-garland, .advent { display: none; }

/* The painted garland, cut out of our Advent artwork (no sky, no band): a swag across the top of the page with a drop
   down each side, like a garland round a doorway. It sits on the page's own light background, over the top of the page,
   and never takes a tap (pointer-events: none). The box is its picture's shape (padding-top is 437/1800 of the width,
   old Safari has no aspect-ratio), the body's padding-top below keeps the logo clear of the centre bow.
   The .png is for old browsers; image-set() picks the smaller .webp where it is understood. Phones get a slimmer swag. */
body.xmas-2026 { position: relative; padding-top: 6vw; }
body.xmas-2026 .xmas-header { display: block; position: absolute; top: 0; left: 0; right: 0; max-width: 1800px; margin: 0 auto; height: 0; padding-top: 24.28%; z-index: 1; pointer-events: none; background: url("/img/xmas-garland-wide.png") no-repeat center top / 100% 100%; background: image-set(url("/img/xmas-garland-wide.webp") type("image/webp"), url("/img/xmas-garland-wide.png") type("image/png")) no-repeat center top / 100% 100%; }
body.xmas-2026 .xmas-garland.foot { display: block; margin: 0 0 24px; height: 30px; background: url("/img/xmas-garland.svg") repeat-x center top / 200px 30px; }

body.xmas-2026 .hero { position: relative; }
body.xmas-2026 .hero img { box-shadow: 0 0 0 3px var(--xmas-gold-soft); }
/* Christmas hero: the Advent-house picture replaces the normal one while the flag is on (both are in the page; the class picks). */
.hero img.xmas-hero { display: none; }
body.xmas-2026 .hero img { display: none; }
body.xmas-2026 .hero img.xmas-hero { display: block; }
/* A red bow pinned on the corner of the top picture. */
body.xmas-2026 .hero::after { content: ""; position: absolute; top: -26px; right: -14px; width: 96px; height: 80px; background: url("/img/xmas-bow.svg") no-repeat center / contain; pointer-events: none; }

/* The Advent banner, straight under the top picture. */
body.xmas-2026 .advent { position: relative; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 0; max-width: 52rem; margin: 0 auto 28px; background: var(--xmas-cream); border: 2px solid var(--xmas-gold-soft); border-radius: 24px; overflow: hidden; }
/* Holly on the two bottom corners of the card, clear of the words (the left one is hidden when stacked). */
body.xmas-2026 .advent::before, body.xmas-2026 .advent::after { content: ""; position: absolute; width: 74px; height: 60px; background: url("/img/xmas-holly.svg") no-repeat center / contain; pointer-events: none; z-index: 1; }
body.xmas-2026 .advent::before { right: 4px; bottom: 2px; transform: scale(-1, 1); }
body.xmas-2026 .advent::after { left: 4px; bottom: 2px; }
.advent .scene { display: block; width: 100%; height: auto; }
.advent .words { padding: 24px 26px 46px; text-align: center; }
.advent h2 { color: var(--xmas-holly); font-size: 2rem; margin: 0 0 10px; padding: 0 20px; }
.advent p { font-size: 1.35rem; margin: 0 0 12px; }
.advent .find { font-size: 1.15rem; color: var(--ink-soft); margin: 0; }

@media (max-width: 760px) {
  body.xmas-2026 .advent { grid-template-columns: 1fr; }
  body.xmas-2026 .advent::after { display: none; }
  .advent .words { padding: 20px 20px 52px; }
}
@media (max-width: 480px) {
  body.xmas-2026 { padding-top: 64px; }
  body.xmas-2026 .xmas-header { max-width: none; height: 100px; padding-top: 0; background: url("/img/xmas-garland-narrow.png") no-repeat center top / auto 100px; background: image-set(url("/img/xmas-garland-narrow.webp") type("image/webp"), url("/img/xmas-garland-narrow.png") type("image/png")) no-repeat center top / auto 100px; }
  body.xmas-2026 .hero::after { width: 76px; height: 64px; top: -20px; right: -6px; }
  .advent h2 { font-size: 1.7rem; }
  .advent p { font-size: 1.25rem; }
}
