/* ==========================================================================
   Priductive — reset and base type
   ========================================================================== */

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

* {
    margin: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: var(--fs-body);
    line-height: var(--lh-body);
    font-weight: var(--fw-regular);
    color: var(--ink);
    background-color: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

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

img {
    height: auto;
}

a {
    color: inherit;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

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

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

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

h1,
h2,
h3,
h4 {
    font-weight: var(--fw-semibold);
    line-height: 1.06;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

p {
    text-wrap: pretty;
}

strong {
    font-weight: var(--fw-semibold);
}

::selection {
    background: var(--yellow);
    color: var(--ink);
}

:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

/* Skip link */
.skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 200;
    padding: 0.65rem 1rem;
    border-radius: var(--radius-pill);
    background: var(--ink);
    color: #fff;
    font-size: 0.875rem;
    font-weight: var(--fw-medium);
    text-decoration: none;
    transform: translateY(-200%);
}

.skip-link:focus-visible {
    transform: translateY(0);
}

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

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
