/* ==========================================
   BASE / RESET
   ========================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

html,
body {
    overflow-x: hidden;
}

body {
    margin: 0;
    min-width: 320px;
    max-width: 100vw;

    background: var(--color-background);
    color: var(--color-text);

    font-family: var(--font-body);
    font-size: var(--font-size-base);
    font-weight: var(--fw-regular);
    line-height: 1.6;

    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: var(--color-primary);
    color: #ffffff;
}

/* ==========================================
   TYPOGRAPHY
   ========================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;

    color: var(--color-text);
    font-family: var(--font-heading);
    font-weight: var(--fw-semibold);
    line-height: 1.15;
}

p {
    margin: 0 0 var(--space-4);
    color: var(--color-text-muted);
}

ul,
ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

dl,
dd {
    margin: 0;
}

figure,
blockquote {
    margin: 0;
}

/* ==========================================
   LINKS
   ========================================== */

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary);
}

/* ==========================================
   MEDIA
   ========================================== */

img,
picture,
svg,
video,
canvas {
    display: block;
    max-width: 100%;
}

img {
    height: auto;
}

/* ==========================================
   FORM ELEMENTS
   ========================================== */

button,
input,
select,
textarea {
    color: inherit;
    font: inherit;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
}

input,
textarea,
select {
    outline: none;
}

textarea {
    resize: vertical;
}

/* ==========================================
   TABLES
   ========================================== */

table {
    width: 100%;
    border-collapse: collapse;
}

/* ==========================================
   ACCESSIBILITY
   ========================================== */

:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
}

[hidden] {
    display: none !important;
}