/* Fonts, reset and base element styles. */

@font-face {
    font-family: "Montserrat";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("../fonts/montserrat/montserrat-latin.c154477b9aff.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Montserrat";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("../fonts/montserrat/montserrat-latin-ext.f143fb4877cf.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@layer reset {
    *,
    *::before,
    *::after {
        box-sizing: border-box;
    }

    * {
        margin: 0;
    }

    html {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
        scroll-padding-top: calc(var(--header-height) + var(--space-4));
    }

    body {
        min-height: 100vh;
        min-height: 100dvh;
    }

    img,
    picture,
    video,
    svg {
        display: block;
        max-width: 100%;
    }

    img,
    video {
        height: auto;
    }

    input,
    button,
    textarea,
    select {
        font: inherit;
        color: inherit;
    }

    button {
        cursor: pointer;
        background: none;
        border: 0;
        padding: 0;
    }

    ul[class],
    ol[class] {
        list-style: none;
        padding: 0;
    }

    table {
        border-collapse: collapse;
    }

    [hidden] {
        display: none !important;
    }
}

@layer base {
    html {
        background: var(--page);
    }

    @media (prefers-reduced-motion: no-preference) {
        html {
            scroll-behavior: smooth;
        }
    }

    body {
        font-family: var(--font);
        font-size: var(--text-base);
        line-height: var(--leading);
        color: var(--text);
        background: var(--page);
        word-spacing: 0.03em;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        text-rendering: optimizeLegibility;
        overflow-x: clip;
    }

    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        font-weight: var(--weight-semibold);
        line-height: var(--leading-tight);
        letter-spacing: -0.01em;
        word-spacing: 0.02em;
        text-wrap: balance;
        color: var(--heading);
    }

    h1,
    h2 {
        font-weight: var(--weight-bold);
    }

    h1 {
        font-size: var(--text-4xl);
        letter-spacing: -0.02em;
    }

    h2 {
        font-size: var(--text-3xl);
    }

    h3 {
        font-size: var(--text-xl);
        line-height: var(--leading-snug);
    }

    h4 {
        font-size: var(--text-lg);
        line-height: var(--leading-snug);
    }

    p,
    li {
        text-wrap: pretty;
    }

    a {
        color: var(--green);
        text-decoration-thickness: 1px;
        text-underline-offset: 0.18em;
        transition: color var(--fast) var(--ease);
    }

    a:hover {
        color: var(--green-dark);
    }

    strong,
    b {
        font-weight: var(--weight-semibold);
        color: var(--heading);
    }

    small {
        font-size: var(--text-sm);
    }

    code,
    kbd,
    pre {
        font-family: var(--font-mono);
        font-size: 0.9em;
    }

    hr {
        border: 0;
        border-top: var(--line);
    }

    ::selection {
        background: var(--brand-soft);
        color: var(--heading);
    }

    :focus-visible {
        outline: 2px solid var(--brand);
        outline-offset: 3px;
        border-radius: var(--radius-sm);
    }

    @media (prefers-reduced-motion: reduce) {
        *,
        *::before,
        *::after {
            animation-duration: 0.01ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: 0.01ms !important;
            scroll-behavior: auto !important;
        }
    }
}

@layer utilities {
    .visually-hidden {
        position: absolute !important;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .skip-link {
        position: absolute;
        top: var(--space-2);
        left: var(--space-2);
        z-index: calc(var(--z-toast) + 1);
        padding: var(--space-2) var(--space-4);
        background: var(--heading);
        color: var(--surface);
        border-radius: var(--radius-sm);
        transform: translateY(-200%);
        transition: transform var(--fast) var(--ease);
    }

    .skip-link:focus {
        transform: none;
        color: var(--surface);
    }

    .text-center {
        text-align: center;
    }

    .text-muted {
        color: var(--text-muted);
    }

    .accent-text {
        color: var(--brand);
    }

    .nowrap {
        white-space: nowrap;
    }
}
