/* ==========================================================================
   Base — Reset, Typography, Defaults
   ========================================================================== */

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

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

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: var(--fw-regular);
    line-height: var(--leading-normal);
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: var(--fw-semibold);
    line-height: var(--leading-tight);
    color: var(--color-secondary);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

@media (max-width: 768px) {
    h1 { font-size: var(--text-3xl); }
    h2 { font-size: var(--text-2xl); }
    h3 { font-size: var(--text-xl); }
    h4 { font-size: var(--text-lg); }
}

/* Links */
a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition);
}

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

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

/* Lists */
ul, ol {
    list-style: none;
}

/* Buttons */
button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* Forms */
input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* Labels */
.label {
    font-family: var(--font-label);
    font-size: var(--text-xs);
    font-weight: var(--fw-semibold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-inverse);
    background: var(--color-primary);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    display: inline-block;
    align-self: flex-start;
    width: fit-content;
}

.label--accent {
    background: var(--color-accent);
    color: var(--color-secondary);
}

/* Section labels (above headings) */
.section-label {
    font-family: var(--font-label);
    font-size: var(--text-sm);
    font-weight: var(--fw-semibold);
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-primary);
    margin-bottom: var(--space-xs);
    display: block;
}

/* Paragraphs */
p + p {
    margin-top: var(--space-sm);
}

/* Selection */
::selection {
    background: var(--color-primary);
    color: var(--color-text-inverse);
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    z-index: 999;
    padding: 8px 16px;
    background: var(--color-primary);
    color: var(--color-text-inverse);
}

.skip-link:focus {
    top: 0;
}
