/* ==========================================================================
   BASE — Reset + Foundation
   ========================================================================== */

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

html {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body {
    font-family: var(--font-body);
    font-size: var(--text-body);
    line-height: var(--leading-normal);
    color: var(--color-text);
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ── Skip Link ── */
.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-md);
    z-index: var(--z-toast);
    padding: var(--space-xs) var(--space-md);
    background: var(--color-navy);
    color: var(--color-white);
    font-size: var(--text-small);
    font-weight: var(--weight-medium);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: var(--space-md);
    outline: 2px solid var(--color-gold);
    outline-offset: 2px;
}

/* ── Elements ── */
img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

img {
    font-style: italic;
    vertical-align: middle;
}

input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    background: none;
    border: none;
}

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

ul,
ol {
    list-style: none;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

fieldset {
    border: none;
}

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

/* ── Focus Styles ── */
:focus-visible {
    outline: 2px solid var(--color-navy);
    outline-offset: 3px;
}

/* ── Selection ── */
::selection {
    background-color: var(--color-navy);
    color: var(--color-white);
}

/* ── Scrollbar (subtle) ── */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-muted);
}

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

/* ── Admin Bar Offset ── */
body.admin-bar .site-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .site-header {
        top: 46px;
    }
}
