/* ==========================================================================
   Base — Reset, Typography, Global Styles
   ========================================================================== */

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

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

body {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    transition: var(--transition-color);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* --- Typography: Display (Bebas Neue) --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.1;
    font-weight: 400;
    color: var(--color-text);
    transition: color var(--transition-normal);
    margin-bottom: 0;
}
h1 { font-size: clamp(3rem, 8vw, 10rem); }
h2 { font-size: clamp(2rem, 5vw, 4rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2.5rem); }
h4 { font-size: clamp(1.2rem, 2vw, 1.75rem); }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

/* --- Labels / Subtitles (Space Mono) --- */
.label,
.subtitle {
    font-family: var(--font-label);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.8rem;
    font-weight: 400;
}

/* --- Body text (DM Mono) --- */
p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

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

a:hover {
    opacity: 0.7;
}

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

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

ul, ol {
    list-style: none;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
    color: inherit;
}

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

input,
textarea,
select {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-text);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    transition: var(--transition-color);
}

input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--color-text);
    outline-offset: -1px;
}

/* --- Utility --- */
.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;
}

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

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

    html {
        scroll-behavior: auto;
    }
}
