/* ============================================================
   AIGENBERG · Layout
   Navigation, sections, grid scaffolding
   ============================================================ */

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.section {
    padding: var(--section-y) 0;
    border-bottom: 1px solid var(--rule);
}

.section:last-of-type {
    border-bottom: none;
}

/* ----- Navigation ----- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-h);
    z-index: var(--z-nav);
    display: flex;
    align-items: center;
    background: transparent;
    transition: background 0.4s var(--ease-out), backdrop-filter 0.4s var(--ease-out);
}

.nav.scrolled {
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.nav-inner {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo img {
    height: 20px;
    width: auto;
}

.nav-menu {
    display: flex;
    gap: 44px;
}

.nav-link {
    font-size: 12px;
    font-weight: var(--fw-medium);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0.6;
    position: relative;
    padding: 8px 0;
}

.nav-link:hover,
.nav-link.active {
    opacity: 1;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: var(--fg);
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: var(--fw-medium);
}

.lang-divider {
    opacity: 0.25;
}

.lang-btn {
    opacity: 0.4;
    letter-spacing: 0.1em;
}

.lang-btn:hover {
    opacity: 0.8;
}

.lang-btn.active {
    opacity: 1;
    font-weight: var(--fw-bold);
}

/* ----- Stacked section layout ----- */
.section-head {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 64px;
    max-width: 1200px;
}

.section-head .eyebrow {
    margin: 0;
}

.section-head .display,
.section-head .h1 {
    margin: 0;
}

.section-body {
    min-width: 0;
}

/* ----- Page hero (sub pages) ----- */
.page-hero {
    padding-top: calc(var(--nav-h) + 80px);
    padding-bottom: 48px;
    border-bottom: 1px solid var(--rule);
}

.page-hero-head {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.page-hero-head .eyebrow {
    margin: 0;
}

.page-hero-head h1 {
    margin: 0;
}

/* ----- Subnav (horizontal tabs in page hero) ----- */
.subnav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 32px;
    align-items: center;
    border-top: 1px solid var(--rule);
    padding-top: 24px;
}

.subnav-link {
    font-size: 13px;
    font-weight: var(--fw-medium);
    letter-spacing: 0.15em;
    opacity: 0.42;
    text-transform: uppercase;
    text-align: left;
    padding: 6px 0;
    position: relative;
    transition: opacity 0.25s var(--ease-out);
}

.subnav-link:hover {
    opacity: 0.8;
}

.subnav-link.active {
    opacity: 1;
}

.subnav-link.active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: var(--fg);
}

/* ----- Footer ----- */
.footer {
    padding: 80px 0 60px;
    border-top: 1px solid var(--rule);
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 24px;
}

.footer-logo img {
    height: 30px;
    width: auto;
    opacity: 0.6;
    transition: opacity 0.3s var(--ease-out);
}

.footer-logo a:hover img {
    opacity: 1;
}

.footer-social {
    display: flex;
    gap: 14px;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--rule-strong);
    color: var(--fg-soft);
    transition: all 0.25s var(--ease-out);
}

.social-link:hover {
    background: var(--fg);
    color: var(--bg);
    transform: translateY(-2px);
}

.footer-text {
    font-size: 12px;
    color: var(--muted-2);
    font-weight: var(--fw-light);
}

/* ----- Responsive ----- */
@media (max-width: 768px) {
    :root {
        --gutter: 24px;
        --nav-h: 64px;
    }

    .nav-menu {
        gap: 18px;
    }

    .nav-link {
        font-size: 11px;
        letter-spacing: 0.12em;
    }

    .section-head {
        gap: 14px;
        margin-bottom: 40px;
    }

    .page-hero {
        padding-top: calc(var(--nav-h) + 48px);
        padding-bottom: 32px;
    }

    .page-hero-head {
        gap: 16px;
        margin-bottom: 28px;
    }

    .subnav {
        gap: 20px;
        padding-top: 18px;
    }

    .subnav-link {
        font-size: 12px;
    }

    .footer-logo {
        flex-direction: column;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .nav-menu {
        gap: 14px;
    }
}
