/* ==========================================================================
   tokens.css: the site's fixed layer. Load this FIRST on every page.

   These are the things every page shares so the site reads as one place,
   whatever each page's own subject or artwork is:
   near-black base, violet accent, Didot headings + Avenir text, 1px violet
   hairlines, tiny monospace captions, a soft violet glow on interaction.

   Page stylesheets should build on these rather than re-declaring colours.
   Older page-specific names (--page-*, --music-*) are kept as aliases.
   ========================================================================== */

:root {
    /* colour */
    --night: #000;
    --night-deep: #000;
    --paper: #000;
    --ink: #f3edf7;
    --muted: #968b9e;
    --violet: #bf78ed;
    --violet-light: #d5a7ff;
    --rule: #302737;
    --hairline: rgba(213, 167, 255, .18);
    --hairline-strong: rgba(213, 167, 255, .48);
    --panel: rgba(11, 11, 11, .88);
    --glow: 0 0 1rem rgba(174, 94, 231, .28);

    /* type */
    --font-display: Didot, "Bodoni 72", "Iowan Old Style", Georgia, serif;
    --font-body: "Avenir Next", Avenir, "Century Gothic", sans-serif;
    --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;

    /* layout */
    --page-width: 68rem;
    --page-heading-width: 36rem;

    /* motion */
    --theme-color-duration: .5s;
    --theme-color-timing: linear;

    --page-copy: #fff;
    --page-muted: #aaa0af;
}

/* Aliases kept for existing stylesheets. Declared on body as well as :root on purpose: a
   var() alias is resolved where it's declared, so it has to be re-declared below the point
   where light mode swaps --hairline/--panel, or light pages would inherit the dark values. */
:root,
body {
    --page-rule: var(--hairline);
    --page-rule-strong: var(--hairline-strong);
    --page-panel: var(--panel);
    --music-line: var(--hairline);
    --music-line-strong: var(--hairline-strong);
}

body.is-light-mode {
    --night: #f4f2f6;
    --night-deep: #f4f2f6;
    --paper: #f4f2f6;
    --ink: #18151c;
    --muted: #5f5765;
    --violet: #4f286b;
    --violet-light: #63337f;
    --rule: rgba(79, 40, 107, .2);
    --hairline: rgba(79, 40, 107, .18);
    --hairline-strong: rgba(79, 40, 107, .48);
    --panel: rgba(255, 255, 255, .72);
    --glow: 0 0 1rem rgba(99, 51, 127, .18);
    --page-copy: #18151c;
    --page-muted: #665d6d;
}

/* The shared "caption" look: tiny uppercase monospace labels like PROFILE or STAR CHART. */
.caption {
    margin: 0;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: .58rem;
    letter-spacing: .18em;
    text-transform: uppercase;
}
