/* ============================================================================
   Anvyr V2 — Reset & Base Styles
   Space Grotesk · Warm whites · Editorial typography
   ============================================================================ */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + var(--space-md));
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--bg-deep);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

main {
    flex: 1;
}

/* ── Links ───────────────────────────────────────────────────────────────── */
a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--ease-fast);
}
a:hover {
    color: var(--accent-hover);
}

/* ── Typography Scale ────────────────────────────────────────────────────── */
h1, .h1 {
    font-size: 40px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.025em;
}
h2, .h2 {
    font-size: 30px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.015em;
}
h3, .h3 {
    font-size: 21px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.01em;
}
h4, .h4 {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.4;
}
p {
    margin-bottom: var(--space-md);
}
p:last-child {
    margin-bottom: 0;
}

.lead {
    font-size: 19px;
    line-height: 1.75;
    color: var(--text-secondary);
}

code, pre, .mono {
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.6;
}

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

/* ── Lists ───────────────────────────────────────────────────────────────── */
ul, ol {
    list-style: none;
}

/* ── Focus ───────────────────────────────────────────────────────────────── */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ── Selection ───────────────────────────────────────────────────────────── */
::selection {
    background: var(--accent-soft);
    color: var(--text-primary);
}

/* ── Container ───────────────────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin-inline: auto;
    padding-inline: var(--space-xl);
}
.container--prose {
    max-width: var(--max-width-prose);
}

/* ── Section Spacing ─────────────────────────────────────────────────────── */
.section {
    padding-block: var(--space-5xl);
}

/* ── Divider ─────────────────────────────────────────────────────────────── */
.divider {
    border: none;
    height: 1px;
    background: var(--border-subtle);
    margin: 0;
}

/* ── Section Label (the // prefix motif) ─────────────────────────────────── */
.section-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: var(--space-2xl);
}

/* ── Skip to Content ─────────────────────────────────────────────────────── */
.skip-link {
    position: fixed;
    top: -100%;
    left: var(--space-md);
    z-index: 9999;
    background: var(--accent);
    color: #fff;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    transition: top var(--ease-fast);
}
.skip-link:focus {
    top: var(--space-sm);
    color: #fff;
}

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