/* ============================================================
   Reset — box model, media defaults, form inheritance,
   motion preferences, focus visibility.
   ============================================================ */

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

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

body {
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img,
picture,
video,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

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

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

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

ul,
ol {
    list-style: none;
}

/* Visible keyboard focus everywhere; mouse clicks stay clean. */
:focus {
    outline: none;
}

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

.on-dark :focus-visible,
.site-footer :focus-visible,
.hero :focus-visible {
    outline-color: var(--color-surface);
}

::selection {
    background: var(--color-ink);
    color: var(--color-bg);
}

/* Skip link for keyboard users */
.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-2);
    z-index: 100;
    background: var(--color-ink);
    color: var(--color-surface);
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-pill);
}

.skip-link:focus {
    top: var(--space-2);
}

/* Respect reduced motion: collapse all animation and smoothing.

   Delays are zeroed alongside durations, not just durations. The
   staggered reveals and hero cascade start from opacity 0 with a
   backwards fill, so a surviving delay would leave content blank for
   up to a second before appearing — reduced motion would end up
   slower and more disorienting than the full animation. */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-delay: 0s !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0s !important;
        scroll-behavior: auto !important;
    }
}
