:root {
    --color-bg:       #070605;
    --color-cream:    #f6efe3;
    --color-gold:     #b89a5a;
    --color-gold-dim: #7a6538;
    --color-gray:     #9a948c;
    --color-gray-dim: #4a4540;
    --color-surface:  rgba(7, 6, 5, 0.72);
    --color-border:   rgba(154, 148, 140, 0.14);

    --font-serif:  'Cormorant Garamond', 'Playfair Display', Georgia, serif;
    --font-body:   system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --ease-smooth: cubic-bezier(0.25, 0.1, 0.1, 1.0);
    --ease-out:    cubic-bezier(0.0, 0.0, 0.2, 1.0);

    --nav-height: 72px;
    --section-pad-x: clamp(24px, 6vw, 96px);
    --section-pad-y: clamp(64px, 10vh, 120px);
    --max-w: 1280px;
    --split-gap: clamp(40px, 6vw, 96px);
}

html {
    background-color: var(--color-bg);
    color: var(--color-cream);
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    overflow-x: hidden;
}

/* ── Canvas ─────────────────────────────────────── */

#scene-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.webgl-fallback {
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse 60% 50% at 70% 30%, rgba(184, 154, 90, 0.07) 0%, transparent 60%),
        radial-gradient(ellipse 80% 60% at 20% 70%, rgba(30, 25, 20, 0.8) 0%, transparent 70%),
        linear-gradient(160deg, #0f0d0b 0%, #070605 50%, #0a0806 100%);
    display: none;
}

.webgl-fallback.visible {
    display: block;
}

/* ── Navigation ──────────────────────────────────── */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--section-pad-x);
    transition: background 0.5s var(--ease-smooth),
                backdrop-filter 0.5s var(--ease-smooth);
}

.nav.scrolled {
    background: rgba(7, 6, 5, 0.88);
    backdrop-filter: blur(16px) saturate(120%);
    -webkit-backdrop-filter: blur(16px) saturate(120%);
    border-bottom: 1px solid var(--color-border);
}

/* ── Section Dots ────────────────────────────────── */

.section-nav {
    position: fixed;
    right: clamp(16px, 2.5vw, 32px);
    top: 50%;
    transform: translateY(-50%);
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    transition: opacity 0.6s var(--ease-smooth);
}

.section-nav.visible {
    opacity: 1;
}

/* ── Main ────────────────────────────────────────── */

.main {
    position: relative;
    z-index: 10;
}

/* ── Section base ────────────────────────────────── */

.section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: var(--nav-height) var(--section-pad-x) var(--section-pad-y);
}

.section__content {
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
}

.section__content--centered {
    text-align: center;
    max-width: 820px;
}

.section__content--split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--split-gap);
    align-items: start;
}

/* ── Section-specific backgrounds ───────────────── */

.section--hero {
    min-height: 100vh;
    align-items: flex-end;
    padding-bottom: clamp(48px, 8vh, 96px);
}

.section--philosophy {
    background: rgba(7, 6, 5, 0.2);
}

.section--contact {
    background: rgba(7, 6, 5, 0.3);
}

/* ── Split layout ────────────────────────────────── */

.split__left,
.split__right {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* ── Footer ──────────────────────────────────────── */

.footer {
    position: relative;
    z-index: 10;
    border-top: 1px solid var(--color-border);
    padding: 40px var(--section-pad-x);
}

.footer__inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

/* ── Responsive: Tablet ──────────────────────────── */

@media (max-width: 900px) {
    :root {
        --section-pad-x: clamp(20px, 5vw, 48px);
    }

    .section__content--split {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .nav__links {
        display: none;
    }

    .nav__menu-btn {
        display: flex;
    }

    .section-nav {
        display: none;
    }
}

/* ── Responsive: Mobile ──────────────────────────── */

@media (max-width: 500px) {
    :root {
        --section-pad-x: 20px;
    }

    .section {
        min-height: 100svh;
    }

    .footer__inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}
