/* Design tokens and foundational styles. Blocks use these tokens rather than raw values. */

:root {
    --color-surface: #ffffff;
    --color-surface-highlighted: #f6f6f4;
    --color-surface-container: #f6f6f4;
    --color-on-surface: #141414;
    --color-on-surface-muted: #5f5f5c;
    --color-on-surface-faint: #9b9b97;

    --color-primary: #141414;
    --color-primary-highlighted: #353535;
    --color-on-primary: #ffffff;
    --color-primary-container: #efeafe;
    --color-on-primary-container: #141414;

    --color-secondary: rgb(20 20 20 / 0.06);
    --color-secondary-highlighted: rgb(20 20 20 / 0.04);
    --color-on-secondary: #141414;

    --color-inverse: #141414;
    --color-inverse-highlighted: #353535;
    --color-on-inverse: #ffffff;
    --color-on-inverse-muted: #a4a4a0;

    --color-error: #fef2f2;
    --color-error-highlighted: #fecaca;
    --color-on-error: #991b1b;

    --color-destructive: lab(48.4493 77.4328 61.5452);
    --color-destructive-wash: oklab(0.57701 0.217634 0.112472 / 0.1);
    --color-destructive-wash-highlighted: oklab(0.57701 0.217634 0.112472 / 0.2);

    --color-border: #e9e9e6;
    --color-control-border: #858580;
    --color-divider-subtle: rgb(20 20 20 / 0.08);

    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 6rem;

    --layout-inset: var(--spacing-lg);
    --layout-inset-mobile: var(--spacing-md);
    --page-bar-height: 4rem;

    --border-width: 1px;
    --radius: 1.25rem;
    --radius-lg: 1.75rem;
    --radius-sm: 0.75rem;
    --radius-full: 9999px;

    --font-family: 'Geist', system-ui, -apple-system, sans-serif;
    --font-family-mono: ui-monospace, SFMono-Regular, Menlo, monospace;

    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-md: 1.125rem;
    --font-size-lg: 1.5rem;
    --font-size-xl: 2.25rem;
    --font-size-display: clamp(2.25rem, 6vw, 4rem);

    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-bold: 600;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.08), 0 1px 3px 0 rgb(0 0 0 / 0.06);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    /* A `filter` value: it follows the outline of a shape that is not a rectangle. */
    --shadow-ticket: drop-shadow(0 3px 6px rgb(20 20 20 / 0.035)) drop-shadow(0 1px 1px rgb(20 20 20 / 0.025));

    /* The landing page's pastels, for tiles and cards. */
    --color-lavender: #d8cdfd;
    --color-periwinkle: #eff2ff;
    --color-peach: #fff2ea;
    --color-mint: #eaf8f1;
    --color-butter: #fff9e3;
    --color-blush: #fff0f4;
    --color-sky: #e9f6fd;

    /* The credit link page's coupon. */
    --color-coupon-wash: #e3ecfa;
    --color-coupon-ink: #2f5da8;

    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-press: cubic-bezier(0.25, 0.46, 0.45, 0.94);

    --landing-pad: clamp(20px, 4vw, 48px);
    --landing-page: 1200px;
}

* {
    box-sizing: border-box;
}

/* Stops a linked section at the sticky site header, with the section's top border hidden behind the header's. */
html {
    scroll-padding-top: 4.5rem;
}

body {
    margin: 0;
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--color-on-surface);
    background-color: var(--color-surface);
}

/* A link in running text: ink, on a lavender underline that turns to ink under the pointer. */
a {
    color: var(--color-primary);
    text-decoration-color: var(--color-lavender);
    text-decoration-thickness: 2px;
    text-underline-offset: 0.15em;
}

a:hover {
    text-decoration-color: currentcolor;
}

::selection {
    color: var(--color-on-primary);
    background-color: var(--color-primary);
}

/* Whatever a link jumps to stops clear of the page bar, which stays on top as the page scrolls. */
html[data-page-bar] {
    scroll-padding-top: calc(var(--page-bar-height) + var(--layout-inset));
}
