/* Brand tokens. Shared by every page; documented at /brand-system. */

@font-face {
    font-family: "Aeonik Pro";
    src: url("fonts/AeonikPro-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Aeonik Pro";
    src: url("fonts/AeonikPro-Medium.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

:root {
    color-scheme: light dark;

    /* Color: one neutral ramp, no accent. Dark by default; light below,
       following the system setting. */
    --color-bg: #111111;
    --color-surface: #191919;
    --color-raised: #222222;
    --color-line: #2c2c2c;
    --color-line-strong: #404040;
    --color-muted: #8c8c8c;
    --color-subtle: #bdbdbd;
    --color-fg: #f5f5f5;
    --color-strong: #ffffff;

    /* Fixed in both themes: backings for transparent images whose content is
       too dark or too light to read on the page. */
    --color-backing-light: #ebebeb;
    --color-backing-dark: #262626;

    /* Type */
    --font-sans: "Aeonik Pro", ui-sans-serif, system-ui, sans-serif;
    --weight-regular: 400;
    --weight-medium: 500;

    /* Fluid scale: ratio 1.2 at 320px, 1.333 at 1440px. */
    --text-sm: 0.875rem;
    --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
    --text-md: clamp(1.2rem, 1.06rem + 0.6vw, 1.5rem);
    --text-lg: clamp(1.44rem, 1.17rem + 1.15vw, 2rem);
    --text-xl: clamp(1.728rem, 1.27rem + 1.95vw, 2.666rem);
    --text-2xl: clamp(2.074rem, 1.35rem + 3.1vw, 3.553rem);
    --text-display: clamp(2.5rem, 1rem + 3.4vw, 5.75rem);

    --leading-tight: 1.05;
    --leading-snug: 1.25;
    --leading-normal: 1.5;
    --tracking-tight: -0.03em;
    --tracking-snug: -0.015em;
    --measure: 32em;

    /* Spacing: 4px base. */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-7: 3rem;
    --space-8: 4rem;
    --space-9: 6rem;
    --space-10: 8rem;

    /* Radius */
    --radius-none: 0;
    --radius-sm: 2px;
    --radius-md: 6px;
    --radius-lg: 12px;
    --radius-full: 999px;

    /* Elevation: lighter surface + border first, shadow last. */
    --elevation-0: none;
    --elevation-1: 0 0 0 1px var(--color-line);
    --elevation-2: 0 0 0 1px var(--color-line), 0 8px 24px -12px rgb(0 0 0 / 0.6);
    --elevation-3: 0 0 0 1px var(--color-line-strong), 0 24px 48px -16px rgb(0 0 0 / 0.75);

    /* Layout + grid: 4 / 8 / 12 columns. */
    --inset: clamp(1.25rem, 0.6rem + 1.6vw, 3.5rem);
    --grid-columns: 4;
    --grid-gutter: clamp(1rem, 0.6rem + 1.2vw, 2rem);
    --grid-max: 90rem;

    --ease: cubic-bezier(0.2, 0, 0, 1);
    --duration: 0.15s;
}

@media (prefers-color-scheme: light) {
    :root {
        --color-bg: #fafafa;
        --color-surface: #f0f0f0;
        --color-raised: #ffffff;
        --color-line: #e2e2e2;
        --color-line-strong: #c8c8c8;
        --color-muted: #6e6e6e;
        --color-subtle: #3d3d3d;
        --color-fg: #111111;
        --color-strong: #000000;

        --elevation-2: 0 0 0 1px var(--color-line), 0 8px 24px -12px rgb(0 0 0 / 0.18);
        --elevation-3: 0 0 0 1px var(--color-line-strong), 0 24px 48px -16px rgb(0 0 0 / 0.25);
    }
}

@media (min-width: 640px) {
    :root {
        --grid-columns: 8;
    }
}

@media (min-width: 1024px) {
    :root {
        --grid-columns: 12;
    }
}
