/* =========================================================
   10-base.css
   Global reset, typography, base elements
   ========================================================= */

/* =========================
   RESET
   ========================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* =========================
   ROOT + BODY
   ========================= */
html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: var(--line-height-body);

    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
}

/* =========================
   TYPOGRAPHY
   ========================= */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: var(--font-weight-regular);
    line-height: var(--line-height-heading);
}

/* H1 */
h1 {
    font-size: var(--h1-size);
    color: var(--color-brand);
    letter-spacing: var(--letter-spacing-wide);
    margin-bottom: var(--space-2);
}

/* H2 */
h2 {
    font-size: var(--h2-size);
    color: var(--color-text);
    margin: var(--space-6) 0 var(--space-3);
}

/* H3 (base version — can be overridden in page CSS) */
h3 {
    font-size: var(--h3-size);
    color: var(--color-text-muted);
    margin: var(--space-5) 0 var(--space-2);
}

/* Paragraphs */
p {
    margin-bottom: var(--space-4);
    font-size: var(--text-base);
    line-height: var(--line-height-body);
    color: var(--color-text-muted);
}

/* Small text */
small {
    font-size: var(--text-sm);
    color: var(--color-text-soft);
}

/* =========================
   LINKS
   ========================= */
a {
    color: var(--color-link);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--color-link-hover);
}

/* =========================
   LISTS
   ========================= */
ul,
ol {
    padding-left: var(--space-6);
    margin-bottom: var(--space-4);
}

li {
    margin-bottom: var(--space-2);
}

/* =========================
   IMAGES
   ========================= */
img {
    max-width: 100%;
    height: auto;
    display: block;

    border: var(--border-width-thin) solid var(--color-border);
    border-radius: var(--radius-sm);
}

/* =========================
   FORM ELEMENTS
   ========================= */
input,
textarea,
select,
button {
    font-family: var(--font-body);
    font-size: var(--text-base);
}

input,
textarea {
    width: 100%;
    padding: var(--input-padding-y) var(--input-padding-x);

    background-color: var(--color-bg);
    color: var(--color-text);

    border: var(--border-width-thin) solid var(--color-border);
    border-radius: var(--radius-sm);

    transition: var(--transition);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-brand);
}

/* =========================
   BUTTON RESET
   ========================= */
button {
    border: none;
    background: none;
    cursor: pointer;
}

/* =========================
   HR / DIVIDERS
   ========================= */
hr {
    border: none;
    height: 1px;
    background-color: var(--color-border);
    margin: var(--space-8) 0;
}

/* =========================
   ACCESSIBILITY
   ========================= */
:focus {
    outline: 2px solid var(--color-focus);
    outline-offset: 2px;
}

/* 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;
}

/* =========================
   MOBILE BASE ADJUSTMENTS
   ========================= */
@media (max-width: 768px) {
    body {
        font-size: 15px;
    }

    h1 {
        letter-spacing: var(--letter-spacing-base);
    }

    h2 {
        margin: var(--space-5) 0 var(--space-3);
    }

    p {
        font-size: 0.95rem;
    }
}