/* Explain: Base reset and typography defaults, updated for the new dark theme. */
* {
    box-sizing: border-box;
}

html {
    background: var(--background-color);
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    overflow-x: hidden;
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.85;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5 {
    font-family: var(--font-heading);
    font-weight: 900;
    line-height: 1.38;
    margin: 0;
    letter-spacing: -0.01em;
}

p {
    margin: 0;
}

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

a {
    text-decoration: none;
    color: inherit;
}

ul,
ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

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

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

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #0b0b0f;
}

::-webkit-scrollbar-thumb {
    background: #2b2b34;
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ---------- Form controls follow the dark theme on every page ---------- */

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

.input::placeholder,
.textarea::placeholder {
    color: #74747f;
}

.select option {
    background: var(--surface-alt);
    color: var(--text-color);
}

.input:focus,
.input:focus-within,
.select:focus,
.textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(228, 18, 31, 0.18);
}

.fieldset-legend {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
}