/* layout.css — Containers, nav, footer, mobile menu */

body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg);
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.02;
    color: var(--obsidian);
    letter-spacing: -0.02em;
    text-wrap: balance;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

a { color: var(--accent); transition: color 0.15s; }
a:hover { color: var(--accent-dark); }

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

.main-content {
    flex: 1;
    padding: var(--s4) 0;
}

/* === NAV === */
.nav {
    background: var(--obsidian);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px var(--s2);
    max-width: var(--max-width);
    margin: 0 auto;
}

/* Logo */
.nav-logo {
    display: inline-flex;
    align-items: center;
    line-height: 1;
    transition: opacity 0.15s;
}
.nav-logo:hover { opacity: 0.88; }

.nav-logo-svg {
    height: 34px;
    width: auto;
    display: block;
}

/* Hamburger — visible on mobile only */
.nav-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    z-index: 200;
    position: relative;
}

.hamburger-line {
    display: block;
    width: 22px;
    height: 2px;
    background: rgba(255,255,255,0.8);
    border-radius: 2px;
    transition: all 0.2s ease;
}

/* Hide hamburger when menu is open */
.nav-hamburger.hidden {
    visibility: hidden;
    pointer-events: none;
}

/* Close button — only visible inside active overlay */
.nav-close {
    display: none;
}

/* Mobile menu overlay — hidden by default */
.nav-menu {
    display: none;
}

.nav-menu.active {
    display: flex;
    position: fixed;
    inset: 0;
    background: var(--obsidian);
    z-index: 190;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.nav-menu.active .nav-close {
    display: block;
    position: absolute;
    top: 16px;
    right: 20px;
    color: rgba(255,255,255,0.6);
    font-size: 1.75rem;
    cursor: pointer;
    z-index: 210;
    line-height: 1;
    padding: 8px;
}
.nav-menu.active .nav-close:hover {
    color: white;
}

.nav-menu .nav-links {
    flex-direction: column;
    align-items: center;
    gap: var(--s4);
}

.nav-menu .nav-links a {
    font-size: 1.25rem;
    color: rgba(255,255,255,0.8);
}
.nav-menu .nav-links a:hover { color: white; }

.nav-menu .nav-cta {
    font-size: 1.125rem;
    padding: 12px 24px;
}

.nav-menu .nav-logout-btn {
    color: rgba(255,255,255,0.6);
    font-size: 1.25rem;
    cursor: pointer;
}
.nav-menu .nav-logout-btn:hover { color: white; }

/* Nav links base */
.nav-links {
    display: flex;
    gap: var(--s4);
    align-items: center;
}

.nav-links a {
    color: rgba(255,255,255,0.6);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.15s;
}
.nav-links a:hover { color: white; }

.nav-cta {
    background: var(--obsidian-green) !important;
    color: white !important;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: background 0.2s;
}
.nav-cta:hover { background: var(--obsidian-hover) !important; }

.nav-logout-btn {
    color: rgba(255,255,255,0.6);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
}
.nav-logout-btn:hover { color: white; }

/* === FOOTER === */
.footer {
    background: var(--obsidian);
    color: rgba(255,255,255,0.4);
    padding: var(--s5) 0;
    font-size: 0.8125rem;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--s3);
}

.footer-top {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--s3);
    padding-bottom: var(--s3);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: var(--s3);
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--s1);
    text-align: center;
}

.footer-brand {
    font-family: var(--font-heading);
    font-size: 1.375rem;
    font-weight: 700;
    color: rgba(255,255,255,0.78);
    letter-spacing: -0.01em;
}

.footer-links {
    display: flex;
    gap: var(--s3);
}

.footer a { color: rgba(255,255,255,0.4); }
.footer a:hover { color: white; }

.footer-tech {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.25);
}

/* === RESPONSIVE === */

@media (min-width: 768px) {
    h1 { font-size: 3rem; }
    h2 { font-size: 2.125rem; }

    .container { padding: 0 var(--s3); }
    .main-content { padding: var(--s5) 0; }

    .nav-inner { padding: 10px var(--s3); }
    .nav-logo-svg { height: 38px; }

    .nav-hamburger { display: none; }
    .nav-close { display: none !important; }

    .nav-menu {
        display: flex !important;
        position: static;
        background: none;
        flex-direction: row;
        align-items: center;
    }

    .nav-menu .nav-links {
        flex-direction: row;
        gap: var(--s4);
    }

    .nav-menu .nav-links a { font-size: 0.875rem; }
    .nav-menu .nav-cta { font-size: 0.875rem; padding: 8px 16px; }
    .nav-menu .nav-logout-btn { font-size: 0.875rem; }

    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

@media (min-width: 1024px) {
    h1 { font-size: 4rem; }
    h2 { font-size: 2.5rem; }
    .nav-inner { padding: 10px var(--s4); }
    .nav-logo-svg { height: 42px; }
}
