/* Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* Design tokens */
:root {
    --bg: #060609;
    --bg-raised: #0c0c12;
    --bg-elevated: #111118;
    --bg-hover: #16161f;
    --text: #d8d5cf;
    --text-secondary: #8b8b97;
    --text-mid: #7d7d8a;
    --text-dim: #5e5e70;
    --text-faint: #6a6a82;
    --accent: #4a6cf7;
    --accent-dim: rgba(74, 108, 247, 0.35);
    --accent-sub: rgba(74, 108, 247, 0.07);
    --accent-line: rgba(74, 108, 247, 0.25);
    --border: rgba(255,255,255,0.10);
    --mono: 'DM Mono', monospace;
    --sans: 'Instrument Sans', sans-serif;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ── Atmospheric background ── */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -30%;
    width: 160%;
    height: 100%;
    background: radial-gradient(ellipse at 30% 20%, rgba(74, 108, 247, 0.025) 0%, transparent 55%),
                radial-gradient(ellipse at 70% 80%, rgba(74, 108, 247, 0.015) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ── Grain overlay ── */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.12'/%3E%3C/svg%3E");
    background-repeat: repeat;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.8;
}

.page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Top navigation ── */
.site-nav {
    padding: 2rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1002;
}

.site-nav .wordmark {
    font-family: var(--mono);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-decoration: none;
}

.site-nav .nav-links {
    display: flex;
    gap: 2.25rem;
    list-style: none;
}

.site-nav .nav-links a {
    font-family: var(--mono);
    font-size: 0.75rem;
    font-weight: 300;
    color: var(--text-dim);
    text-decoration: none;
    letter-spacing: 0.06em;
    transition: color 0.25s ease;
}

.site-nav .nav-links a:hover {
    color: var(--text-secondary);
}

/* ── Site footer ── */
.site-bottom {
    padding: 2.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
}

.bottom-left {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.bottom-tagline {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-dim);
    font-style: italic;
    white-space: nowrap;
    line-height: 1.6;
}

.bottom-locale {
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 300;
    color: var(--text-faint);
    letter-spacing: 0.04em;
}

.bottom-links {
    display: flex;
    gap: 1.75rem;
    align-items: center;
}

.bottom-links a {
    font-family: var(--mono);
    font-size: 0.74rem;
    font-weight: 400;
    color: var(--text-secondary);
    text-decoration: none;
    letter-spacing: 0.03em;
    transition: color 0.2s ease;
    white-space: nowrap;
}

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

/* ── Mobile nav toggle ── */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    margin-right: -0.5rem;
    flex-direction: column;
    gap: 5px;
    z-index: 1001;
}

.nav-toggle-bar {
    display: block;
    width: 20px;
    height: 1.5px;
    background: var(--text-dim);
    transition: all 0.3s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:first-child {
    transform: translateY(3.25px) rotate(45deg);
    background: var(--text-secondary);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:last-child {
    transform: translateY(-3.25px) rotate(-45deg);
    background: var(--text-secondary);
}

/* ── Header divider line ── */
.header-line {
    margin-top: 2rem;
    height: 1px;
    background: var(--border);
}

/* ── Animations ── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ── */
@media (max-width: 700px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        inset: 0;
        background: rgba(6, 6, 9, 0.97);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2.5rem;
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .nav-links.open {
        opacity: 1;
        visibility: visible;
    }

    .nav-links a {
        font-size: 1.1rem !important;
        color: var(--text-secondary) !important;
        letter-spacing: 0.08em;
    }

    .nav-links a:hover {
        color: var(--text) !important;
    }

    .site-nav {
        padding: 1.5rem 1.5rem;
    }

    .site-bottom {
        flex-direction: column;
        padding: 2rem 1.5rem;
    }

    .bottom-tagline {
        white-space: normal;
    }
}

@media (max-width: 480px) {
    .bottom-links { flex-wrap: wrap; gap: 1.25rem; }
}
