/* ---- Seasonal decorations: theme tint (year seasons only) -------------------
   Linked only while a year season is active (bin/AGENTS.md "Seasonal
   decorations"). It leans a few client-theme tokens slightly toward the
   season's colours instead of replacing them, so a season follows every
   change to the theme in bin/css/style.css.

   A custom property cannot be computed from itself, so :root first copies
   the theme's values into --vhs-base-*, and body re-derives the --vh-*
   tokens from those copies; everything on the page inherits the leaned
   tokens from body. The season's art.css supplies, on :root:
     --vhs-tint    structural lean: dividers, fills, buttons, panel wash
     --vhs-glint   accent lean: gold titles and hint borders
   Browsers without color-mix() skip the whole block and keep the plain
   theme: a token they cannot compute would drop every colour that uses it. */

@supports (color: color-mix(in oklab, red, blue)) {
    :root {
        --vhs-base-accent: var(--vh-accent);
        --vhs-base-border: var(--vh-border);
        --vhs-base-fill: var(--vh-fill);
        --vhs-base-muted: var(--vh-muted);
        --vhs-base-button: var(--vh-button);
        --vhs-base-button-hover: var(--vh-button-hover);
        --vhs-base-hint-border: var(--vh-hint-border);
        --vhs-base-panel-bg: var(--vh-panel-bg);
    }

    body {
        --vh-accent: color-mix(in oklab, var(--vhs-base-accent), var(--vhs-glint) 14%);
        --vh-border: color-mix(in oklab, var(--vhs-base-border), var(--vhs-tint) 26%);
        --vh-fill: color-mix(in oklab, var(--vhs-base-fill), var(--vhs-tint) 24%);
        --vh-muted: color-mix(in oklab, var(--vhs-base-muted), var(--vhs-tint) 8%);
        --vh-button: color-mix(in oklab, var(--vhs-base-button), var(--vhs-tint) 12%);
        --vh-button-hover: color-mix(in oklab, var(--vhs-base-button-hover), var(--vhs-tint) 12%);
        --vh-hint-border: color-mix(in oklab, var(--vhs-base-hint-border), var(--vhs-glint) 20%);
        /* A faint wash of the tint laid over the panel texture. */
        --vhs-wash: color-mix(in srgb, var(--vhs-tint) 6%, transparent);
        --vh-panel-bg: linear-gradient(var(--vhs-wash), var(--vhs-wash)), var(--vhs-base-panel-bg);
    }
}
