/* ============================================================
   layout.css — global structure: body, nav, footer, containers
   ============================================================ */

/* ── Base ── */
body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
}

/* Noise texture overlay */
body::before {
    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='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
    opacity: 0.4;
}

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

/* ── Section spacing ── */
.section-sm {
    padding: 40px 0;
}

.section-md {
    padding: 60px 0;
}

.section {
    padding: var(--space-24) 0;
}

.section-label {
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-orange);
    margin-bottom: var(--space-3);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl));
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

/* ── Site Header / Nav ── */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--nav-height);
    background: rgba(7, 8, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav-logo {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: var(--text-xl);
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--text);
    white-space: nowrap;
}

.nav-logo-mark {
    width: 32px;
    height: 32px;
    background: var(--grad-primary);
    border-radius: var(--radius-sm);
    display: grid;
    place-items: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-8);
}

.nav-links a {
    color: var(--text-muted);
    font-size: var(--text-sm);
    font-weight: 500;
    transition: color var(--transition-fast);
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--grad-primary);
    border-radius: 2px;
}

.nav-cta {
    display: flex;
    gap: var(--space-2);
    align-items: center;
}

.nav-cta .btn {
    border-radius: var(--radius-sm);
    padding: 7px 16px;
    font-size: 0.82rem;
}

/* Mobile hamburger */
.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: var(--space-2);
}

.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition-base);
}

/* Mobile nav drawer */
.nav-drawer {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    z-index: 99;
    padding: var(--space-5) var(--space-6);
}

.nav-drawer.open {
    display: block;
}

.nav-drawer ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.nav-drawer a {
    display: block;
    padding: var(--space-3) var(--space-4);
    color: var(--text-muted);
    font-size: var(--text-base);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.nav-drawer a:hover {
    color: var(--text);
    background: var(--surface-2);
}

/* ── Site Main ── */
.site-main {
    padding-top: var(--nav-height);
    min-height: calc(100vh - var(--nav-height));
}

/* ── Footer ── */
.site-footer {
    border-top: 1px solid var(--border);
    margin-top: var(--space-24);
}

.footer-inner {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--space-16);
    padding: var(--space-16) var(--space-12);
}

.footer-brand .nav-logo {
    font-size: var(--text-md);
}

.footer-tagline {
    margin-top: var(--space-3);
    color: var(--text-muted);
    font-size: var(--text-sm);
}

.footer-social {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-5);
}

.footer-social a {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    display: grid;
    place-items: center;
    font-size: var(--text-sm);
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.footer-social a:hover {
    border-color: var(--border-hover);
    color: var(--text);
}

.footer-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-8);
}

.footer-nav-col h4 {
    font-family: var(--font-display);
    font-size: var(--text-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: var(--space-4);
}

.footer-nav-col ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.footer-nav-col a {
    font-size: var(--text-sm);
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.footer-nav-col a:hover {
    color: var(--text);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding: var(--space-5) var(--space-12);
}

.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    font-size: var(--text-xs);
    color: var(--text-faint);
}

/* ── Responsive ── */
@media (max-width: 960px) {
    .nav-links,
    .nav-cta {
        display: none !important;
    }

    .nav-hamburger {
        display: flex !important;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: var(--space-10);
        padding: var(--space-10) var(--space-6);
    }

    .footer-nav {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-bottom .container {
        flex-direction: column;
        gap: var(--space-2);
        text-align: center;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 0 var(--space-6);
    }

    .footer-nav {
        grid-template-columns: 1fr;
    }
}
