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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden !important;
    max-width: 100vw;
}

body {
    font-family: var(--font-primary);
    font-size: var(--text-body);
    font-weight: var(--font-regular);
    line-height: var(--line-height-normal);
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden !important;
    width: 100%;
    max-width: 100vw;
    position: relative;
    overflow-wrap: break-word;
    word-break: break-word;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-hover);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: var(--font-bold);
    line-height: var(--line-height-tight);
    color: var(--color-text);
}

h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }
h4 { font-size: var(--text-h4); }

p {
    line-height: var(--line-height-relaxed);
    color: var(--color-text-muted);
    margin-bottom: var(--space-16);
}

p:last-child {
    margin-bottom: 0;
}

button {
    cursor: pointer;
    font-family: var(--font-primary);
}

input, textarea, select {
    font-family: var(--font-primary);
    font-size: var(--text-body);
}

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

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