/* Christmas. Loaded after style.css only while the season is on.
   A winter night: pine-dark grounds under a northern-lights glow, the brand
   gold kept as the accent (it is already the colour of tinsel), Christmas red
   as the second one. The product photos keep their white ground.
   The colours here are drawn for the starting look. A shop with colours of
   its own gets a :root block after this file with all of them, the --season-*
   ones too, worked out from its own (public/js/theme-core.js). */
:root {
  --bg: #07110f;
  --bg-2: #0d1a17;
  --card: #10211c;
  --line: #1d3a31;
  --ink-2: #c4d6cf;
  --muted: #8fa89e;
  --brand: #ffcb05;
  --brand-2: #e23b3b;
  --red: #ff5a5a;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --season-header: rgba(7, 17, 15, .86);
  --season-edge: #24453a;
  --season-card-line: #1f3d33;
  --season-hero-a: #0d2a26;
  --season-hero-b: #0a1a1b;
  --season-kicker: #5eead4;
  --season-glow-rgb: 255, 203, 5;
  --season-snow: #ffffff;
  --season-footer: url(/images/season/christmas-footer.svg);
}

body {
  background:
    radial-gradient(1000px 420px at 18% -12%, rgba(52, 211, 153, .16), transparent 62%),
    radial-gradient(900px 400px at 85% -14%, rgba(45, 212, 191, .10), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}

.announce { background: linear-gradient(90deg, #8f1d22, #b3262a 50%, #8f1d22); color: #fff4d6; }
.announce strong { color: #ffd84d; }

.site-header { background: var(--season-header); border-bottom-color: var(--season-edge); }

/* A string of lights along the header's lower edge, twinkling in two sets. */
.season-lights { position: absolute; left: 0; right: 0; top: calc(100% - 4px); height: 30px; z-index: 2; }
.season-lights span { position: absolute; inset: 0; background-repeat: repeat-x; background-size: 160px 30px; }
.season-lights .a { background-image: url(/images/season/lights-a.svg); animation: twinkle-a 2.4s ease-in-out infinite; }
.season-lights .b { background-image: url(/images/season/lights-b.svg); animation: twinkle-a 2.4s ease-in-out infinite -1.2s; }
@keyframes twinkle-a { 0%, 100% { opacity: 1; filter: drop-shadow(0 0 4px rgba(255, 220, 120, .9)); } 50% { opacity: .55; filter: none; } }
/* Room under the lights, so they never sit on the first line of a page. */
.site-header ~ main { padding-top: 22px; }

/* Snow falls over the page; the canvas never takes a click. */
#season-snow { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 45; }

.section-head h2::before, .top-head h2::before {
  content: ''; display: inline-block; width: .95em; height: .95em; margin-right: .4em; vertical-align: -.1em;
  background: url(/images/season/star.svg) no-repeat center / contain;
}

/* Cards wear a cap of snow along the top edge. */
.card { position: relative; border-color: var(--season-card-line); }
.card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 13px; z-index: 1; pointer-events: none;
  background: url(/images/season/snowcap.svg) no-repeat 0 0 / 100% 100%; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .18)); }
.card .ribbon { z-index: 2; top: 16px; }
.card:hover { border-color: var(--brand); box-shadow: 0 0 0 1px rgba(var(--season-glow-rgb), .45), 0 12px 32px rgba(var(--season-glow-rgb), .10); }
.ribbon { background: var(--brand-2); }

.season-hero { background: linear-gradient(135deg, var(--season-hero-a), var(--season-hero-b) 60%); border-color: var(--season-edge); }
.season-hero-kicker { color: var(--season-kicker); }
.season-hero h2 { color: var(--ink); }
.season-hero h2::after { content: ''; display: inline-block; width: .8em; height: .8em; margin-left: .3em; vertical-align: .05em;
  background: url(/images/season/star.svg) no-repeat center / contain; }

/* The footer is a snowy ridge with a village on it. */
.site-footer { position: relative; margin-top: 130px; border-top: 0; }
.site-footer::before { content: ''; position: absolute; left: 0; right: 0; bottom: calc(100% - 2px); height: 120px; pointer-events: none;
  background: var(--season-footer) repeat-x center bottom / 1600px 120px; }

@media (prefers-reduced-motion: reduce) {
  #season-snow { display: none; }
  .season-lights span { animation: none; }
}
