/* Design tokens: colours, fonts, type scale, spacing and page rhythm.
   See docs/redesign.md §3 for the reasoning behind each value. */

:root {
    /* Colours. One black, one white; gold only for actions and status. */
    --ink: #000000;
    --paper: #ffffff;
    --smoke: #5c5c5c;            /* secondary text on paper, 6.6:1 */
    --line: #d9d9d9;             /* rules on paper */
    --line-on-ink: rgb(255 255 255 / 0.18);
    --muted-on-ink: rgb(255 255 255 / 0.7);
    --gold: #d4af37;             /* fills and focus; text on it is ink */
    --gold-ink: #8a6d12;         /* gold as text on paper, 4.9:1 */
    --alert: #b3261e;

    /* Typography */
    --font-sans: 'Outfit', system-ui, sans-serif;
    --font-serif: 'Cormorant Garamond', Georgia, serif;

    /* Scale 1.25 from 18px. */
    --text-xs: 0.875rem;   /* 14 */
    --text-sm: 1rem;       /* 16 */
    --text-base: 1.125rem; /* 18: running text */
    --text-lg: 1.375rem;   /* 22 */
    --text-xl: 1.75rem;    /* 28: section headings on mobile */
    --text-2xl: 2.1875rem; /* 35: section headings */
    --text-3xl: 2.75rem;   /* 44 */
    --text-4xl: 3.5rem;    /* 56 */
    --text-5xl: 4.5rem;    /* 72 */
    --text-display: clamp(3.5rem, 11vw, 9rem);
    --measure: 65ch;

    /* Spacing, on a base of 8 */
    --space-2xs: 0.25rem;
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    --space-3xl: 6rem;
    --space-4xl: 8rem;

    /* Page rhythm (§3.7): the gap between two sections, and between a heading and its content. */
    --section: var(--space-2xl);
    --section-tight: 2.5rem;
    --heading-gap: var(--space-md);

    /* Grid: one outer edge on every page. */
    --gutter: 1rem;
    --content-max: 75rem; /* 1200 */
    /* Photos may run past the content edge, to the edge of the screen, but no
       further than this: on a very wide screen they stop instead of stretching. */
    --bleed-max: 10rem;
    --bleed: min(calc((100vw - min(100vw - 2 * var(--gutter), var(--content-max))) / 2), var(--bleed-max));
    --frame-max: calc(var(--content-max) + 2 * var(--bleed-max));
    /* A photo across the full width stops here (2400px) on a very wide screen,
       its sides fading into a blurred copy of it, rather than being blown up
       past its sharpness (.photo-fill in base.css). */
    --photo-max: 150rem;
    --photo-fade: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
    --header-height: 4.5rem;

    --duration-normal: 0.3s;
}

@media (min-width: 640px) {
    :root {
        --gutter: 1.5rem;
    }
}

@media (min-width: 1024px) {
    :root {
        --section: var(--space-3xl);
        --section-tight: var(--space-xl);
        --heading-gap: var(--space-lg);
        --header-height: 5.5rem;
    }
}
