/* Christmas, loaded after vv.css from 1 December until the end of 26 December (`vv.web.season`).
   The owner, 2026-11-14: "that will be our christmas theme, just need it to look way more
   christmasy ... no backdrop, theme throughout every page, but each page unique, so u still can
   see stuff ofc, but very very very very christmasy".

   The layout stays; what changes: cold snowy blue and white, Christmas red and gold everywhere (light and dark,
   every pairing keeps the contrast tests/web/test_season.py checks), the Christmas VV in the
   header, string lights under the header, snow resting on the footer, candy-cane stripes on the
   main buttons and progress bars, holly on the cards, and per page its own touch (presents on
   Pricing, ornaments on Features, candy canes in the docs and the dashboard). The snow that falls
   and piles up, and each page's scene, are js/season-christmas.js. */

/* ------------------------------------------------------------------ light ---- */
:root {
  --bg: #f3f7fb;
  --surface: #ffffff;
  --surface-2: #e8f0f7;
  --row-hover: #f6f9fc;
  --ink: #16202b;
  --ink-head: #0f1822;
  --ink-soft: #46566a;
  --line: #d3dfeb;
  --line-soft: #e2eaf2;
  --line-strong: #6d7f93;
  --accent: #b3122e;
  --accent-hover: #8e0e24;
  --on-accent: #ffffff;
  --link: #0d6a44;
  --cyan: #1d5f9e;
  --cyan-soft: #e1edf8;
  --on-cyan: #ffffff;
  --mention-bg: #e1edf8;
  --mention-ink: #1d5f9e;
  --brand-tint: #f7dfe2;
  --focus: #b3122e;
  --focus-band: #f7dfe2;
  --info: #1d5f9e;
  --info-bg: #e1edf8;
  --band: #0e2340;
  --on-band: #ffffff;
  --on-band-soft: #c4d4e8;
  --hero-btn: #f2c14e;
  --on-hero-btn: #2a1c00;
  --tile-0: #f7dfe2;
  --tile-1: #d6e6f5;
  --tile-2: #f6dfa0;
  --hud-cyan: #9cc8ff;
}

/* ------------------------------------------------------------------- dark ---- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c1522;
    --surface: #132033;
    --surface-2: #09111c;
    --row-hover: #18283d;
    --field: #09111c;
    --mc-bg: #03070c;
    --ink: #eef3f9;
    --ink-head: #fafcff;
    --ink-soft: #aebdcf;
    --line: #233449;
    --line-soft: #1a293b;
    --line-strong: #74879d;
    --accent: #d42a45;
    --accent-hover: #b81f38;
    --on-accent: #ffffff;
    --link: #8fe0b0;
    --cyan: #9cc8ff;
    --cyan-soft: #1b2e47;
    --on-cyan: #0a1626;
    --neutral: #263a52;
    --neutral-hover: #314a68;
    --mention-bg: #1b3352;
    --mention-ink: #c4defc;
    --brand-tint: #4a1a24;
    --focus: #f2c14e;
    --focus-band: #9a8233;
    --info: #9cc8ff;
    --info-bg: #1b3352;
    --band: #070f1b;
    --on-band: #fafcff;
    --on-band-soft: #bccbe0;
    --hero-btn: #f2c14e;
    --on-hero-btn: #2a1c00;
  }
}
:root[data-theme="dark"] {
  --bg: #0c1522;
  --surface: #132033;
  --surface-2: #09111c;
  --row-hover: #18283d;
  --field: #09111c;
  --mc-bg: #03070c;
  --ink: #eef3f9;
  --ink-head: #fafcff;
  --ink-soft: #aebdcf;
  --line: #233449;
  --line-soft: #1a293b;
  --line-strong: #74879d;
  --accent: #d42a45;
  --accent-hover: #b81f38;
  --on-accent: #ffffff;
  --link: #8fe0b0;
  --cyan: #9cc8ff;
  --cyan-soft: #1b2e47;
  --on-cyan: #0a1626;
  --neutral: #263a52;
  --neutral-hover: #314a68;
  --mention-bg: #1b3352;
  --mention-ink: #c4defc;
  --brand-tint: #4a1a24;
  --focus: #f2c14e;
  --focus-band: #9a8233;
  --info: #9cc8ff;
  --info-bg: #1b3352;
  --band: #070f1b;
  --on-band: #fafcff;
  --on-band-soft: #bccbe0;
  --hero-btn: #f2c14e;
  --on-hero-btn: #2a1c00;
}

/* ------------------------------------------------------------ the header ---- */
/* The Christmas VV (red and white, snow on top, a gold star). */
.brand-mark { content: url("/static/img/season/christmas-favicon.svg"); }
/* String lights hanging under the header, twinkling (the SVG twinkles itself; still with
   reduced motion). Decoration only: it takes no click. */
.site-header { position: relative; z-index: 30; }
.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% - 3px);
  height: 26px;
  background: url("/static/img/season/christmas-lights.svg") 0 0 / 180px 26px repeat-x;
  pointer-events: none;
}
.site-nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--accent); }

/* ------------------------------------------------------------ the footer ---- */
/* Snow resting along the top of the footer, and room below the footer's words for the bank of
   snow and each page's little scene (js/season-christmas.js draws them there, behind nothing).
   The footer is see-through so that scene shows on every page. */
.site-footer {
  border-top-color: transparent;
  background: url("/static/img/season/christmas-snowcap.svg") 0 0 / 120px 16px repeat-x;
  padding-bottom: calc(2.25rem + 9rem);
}
/* the home page's soft edge would shade the footer's snow grey: not this time */
.is-home .site-footer { box-shadow: none; }
.season-greeting { margin: 0 0 0.6rem; font-weight: 650; color: var(--link); }
.season-greeting::before { content: ""; display: inline-block; width: 1.6rem; height: 1.05rem; margin-right: 0.4rem; vertical-align: -0.15rem;
  background: url("/static/img/season/christmas-holly.svg") center / contain no-repeat; }

/* --------------------------------------------------- no backdrops this time ---- */
.bg-minimal::before, .bg-wash::before, .bg-dots::before, .bg-waves::before { content: none; }
/* the home page's stars make way for the snow (js/season-christmas.js takes their canvas) */

/* ---------------------------------------------- buttons, bars, tick boxes ---- */
/* The main buttons: a faint candy-cane stripe, stronger under the pointer. */
.btn:not(.secondary):not(.danger):not(.ghost):not(.link) {
  background-image: repeating-linear-gradient(-45deg, rgb(255 255 255 / 0.1) 0 7px, transparent 7px 14px);
}
.btn:not(.secondary):not(.danger):not(.ghost):not(.link):hover {
  background-image: repeating-linear-gradient(-45deg, rgb(255 255 255 / 0.2) 0 7px, transparent 7px 14px);
}
/* Progress bars are candy canes. */
progress::-webkit-progress-value { background: repeating-linear-gradient(-45deg, var(--accent) 0 7px, #ffffff 7px 11px); }
progress::-moz-progress-bar { background: repeating-linear-gradient(-45deg, var(--accent) 0 7px, #ffffff 7px 11px); }
.da-progress > span { background: repeating-linear-gradient(-45deg, var(--accent) 0 6px, #ffffff 6px 9px); }
::selection { background: #f2c14e; color: #2a1c00; }
a { text-decoration-color: color-mix(in srgb, var(--accent) 70%, transparent); }

/* ------------------------------------------------------------- the cards ---- */
/* A sprig of holly on the top corner of the cards. */
.card { position: relative; }
.card::after {
  content: "";
  position: absolute;
  top: -9px;
  right: 14px;
  width: 30px;
  height: 20px;
  background: url("/static/img/season/christmas-holly.svg") center / contain no-repeat;
  pointer-events: none;
}
.card .card::after { content: none; }

/* ------------------------------------------------------- page by page ---- */
/* Each page its own touch (js/season-christmas.js names the page on <html data-xmas-page>). */

/* Features: the cards hang like ornaments, red, gold and green in turn. */
[data-xmas-page="features"] .feature-card:nth-child(3n + 1),
[data-xmas-page="features"] .card:nth-child(3n + 1) { box-shadow: inset 0 3px 0 #c40f2c; }
[data-xmas-page="features"] .feature-card:nth-child(3n + 2),
[data-xmas-page="features"] .card:nth-child(3n + 2) { box-shadow: inset 0 3px 0 #e0ad38; }
[data-xmas-page="features"] .feature-card:nth-child(3n),
[data-xmas-page="features"] .card:nth-child(3n) { box-shadow: inset 0 3px 0 #1f8a5b; }

/* Pricing: the plans are wrapped as presents, a ribbon across the top and a bow. */
[data-xmas-page="pricing"] .price-grid .card { box-shadow: inset 0 6px 0 #e0ad38; }
[data-xmas-page="pricing"] .price-grid .card::after {
  top: -14px; right: auto; left: calc(50% - 22px); width: 44px; height: 28px;
  background-image: url("/static/img/season/christmas-bow.svg");
}

/* The docs and the dashboard: a candy cane down the side of the page you are on. */
.dash-nav a[aria-current="page"],
[data-xmas-page="docs"] .docs-nav a[aria-current="page"] {
  box-shadow: none;
  background-image: repeating-linear-gradient(-45deg, var(--accent) 0 5px, #ffffff 5px 9px);
  background-size: 4px 100%;
  background-repeat: no-repeat;
}
.dash-nav a[aria-current="page"] .icon { color: var(--accent); }
[data-xmas-page="docs"] pre { box-shadow: inset 4px 0 0 #1f8a5b; }

/* The changelog: each version gets a gold star. */
[data-xmas-page="changelog"] h2::before { content: "\2605"; color: #e0ad38; margin-right: 0.45rem; }

/* The home page's top band: a deep, cold winter night. */
.hero { background-color: var(--band); background-image: linear-gradient(180deg, #050c18 0%, var(--band) 100%); }

/* --------------------------------------------------------------- motion ---- */
/* A press: a red and white ring (vv.js's ripple), and a burst of snowflakes and stars
   (js/season-christmas.js). The menu swings open like an ornament; the home page's sections
   settle in like snow. All of it off with reduced motion. */
.vv-ripple { border-radius: 50%; background: none; box-shadow: inset 0 0 0 2px #ffffff, inset 0 0 0 4px var(--accent); animation-name: xmas-ring; animation-duration: 250ms; }
@keyframes xmas-ring { from { transform: scale(0.15); opacity: 0.8; } to { transform: scale(1); opacity: 0; } }

.xmas-bits { position: fixed; inset: 0; z-index: 80; pointer-events: none; overflow: hidden; }
.xmas-bit {
  --x: 0px; --y: 0px; --dx: 0px; --dy: -20px; --rot: 0deg; --s: 8px;
  position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s);
  margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2);
  background: #ffffff;
  clip-path: polygon(50% 0, 58% 36%, 93% 25%, 66% 50%, 93% 75%, 58% 64%, 50% 100%, 42% 64%, 7% 75%, 34% 50%, 7% 25%, 42% 36%);
  filter: drop-shadow(0 0 1px rgb(30 60 90 / 0.6));
  opacity: 0;
  animation: xmas-bit 800ms var(--ease) forwards;
}
.xmas-bit.is-1 { background: #e0ad38; clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); filter: none; }
.xmas-bit.is-2 { background: var(--accent); border-radius: 50%; clip-path: none; filter: none; }
@keyframes xmas-bit {
  0% { opacity: 1; transform: translate(0, 0) rotate(0deg) scale(1); }
  60% { opacity: 1; transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(0.9); }
  100% { opacity: 0; transform: translate(calc(var(--dx) * 1.1), calc(var(--dy) + 24px)) rotate(var(--rot)) scale(0.6); }
}

@media (prefers-reduced-motion: no-preference) {
  .user-menu[open] > .user-menu-panel { animation: xmas-swing 420ms var(--ease); transform-origin: top center; }
  html.sky-fade .sky-page > section.sky-in > .container { animation: xmas-settle 900ms var(--ease) both; }
}
@keyframes xmas-swing {
  0% { opacity: 0; transform: rotate(-4deg) translateY(-6px); }
  45% { opacity: 1; transform: rotate(2.5deg); }
  75% { transform: rotate(-1deg); }
  100% { opacity: 1; transform: none; }
}
@keyframes xmas-settle { from { opacity: 0; transform: translateY(-1.25rem); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@media (prefers-reduced-motion: reduce) {
  .xmas-bits { display: none; }
}

/* The snow canvas on the pages that have no sky of their own (js/season-christmas.js adds it). */
.xmas-snow { position: fixed; inset: 0; z-index: -1; display: block; width: 100%; height: 100%; pointer-events: none; }
/* The snow layer: in front of the page's boxes (falling snow fades over them) but under the header
   (z-index 30) and its menus; never takes a click. */
.xmas-front { position: fixed; inset: 0; z-index: 20; display: block; width: 100%; height: 100%; pointer-events: none; }
/* It lies on the page and scrolls with it (the script gives it its height and place). */
.xmas-front.is-glued { position: absolute; inset: 0 auto auto 0; height: auto; will-change: transform; }
@media print {
  .xmas-snow, .xmas-front, .site-header::after, .card::after { display: none; }
  .site-footer { background: var(--surface-2); }
}
