/* Base: reset + element defaults */

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

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

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--color-text);
    background-color: var(--color-background);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 var(--space-3);
    font-family: var(--font-heading);
    font-weight: var(--font-semibold);
    line-height: var(--leading-tight);
    color: var(--color-text);
}

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

p {
    margin: 0 0 var(--space-4);
}

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

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

img, svg, video {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

button {
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
}

button svg, .btn svg {
    width: 1.1em;
    height: 1.1em;
    flex-shrink: 0;
}

input, select, textarea {
    font-family: inherit;
    font-size: var(--text-base);
    color: var(--color-text);
}

ul, ol {
    margin: 0 0 var(--space-4);
    padding-left: var(--space-5);
}

hr {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: var(--space-5) 0;
}

/* Focus visibility — keyboard users */
:focus-visible {
    outline: 2px solid var(--color-primary-light);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* Utility layout helpers */
.container {
    width: 100%;
    max-width: var(--max-app-width);
    margin: 0 auto;
    padding: 0 var(--space-4);
}

.container-narrow {
    max-width: var(--max-content-width);
}

.text-secondary { color: var(--color-text-secondary); }
.text-muted { color: var(--color-text-muted); }
.text-center { text-align: center; }
.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}
