/* Reset + base typography used across every public page. */

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

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    font-variant-ligatures: common-ligatures;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    min-height: 100vh;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

/* === Site chrome === */

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--line);
}

@supports ((backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px))) {
    .site-header {
        background: color-mix(in srgb, var(--bg-elev), transparent 18%);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
}

.header-inner {
    width: min(1120px, 92vw);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    gap: 1rem;
    flex-wrap: wrap;
}

.brand {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.01em;
    color: var(--text);
}

.brand:hover {
    text-decoration: none;
    color: var(--text);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface), transparent 10%);
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    padding: 0;
}

.theme-toggle:hover {
    color: var(--text);
    border-color: var(--text-muted);
}

.language-picker {
    margin: 0;
}

.language-picker select {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface), transparent 10%);
    color: var(--text);
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 650;
    padding: 0.35rem 0.62rem;
    cursor: pointer;
}

/* === Site footer === */

.site-footer {
    border-top: 1px solid var(--line);
    padding: 1.5rem 0 2rem;
    margin-top: 3rem;
}

.footer-inner {
    width: min(1120px, 92vw);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 0.82rem;
}

.footer-links {
    display: flex;
    gap: 1.25rem;
}

.footer-links a {
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--accent);
}

/* === Accessibility === */

.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;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    padding: 0.5rem 0.75rem;
    background: var(--focus);
    color: #10151e;
    font-weight: 700;
    font-family: var(--font-heading);
}

.skip-link:focus {
    left: 0.75rem;
    top: 0.75rem;
    z-index: 200;
}

/* === Reduced motion === */

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}
