/* ============================================
   HHASSL.com — Cinematic Art Deco Mountain Lodge
   ============================================ */

:root {
    /* Color Palette (muted cinematic) */
    --color-marble: #F0EBE3;
    --color-ivory: #E3DDD4;
    --color-plum: #3B3241;
    --color-mauve: #7D6B7D;
    --color-gold: #C4A265;
    --color-gold-light: #E8D5A3;
    --color-gold-dark: #A68B4B;
    --color-terracotta: #B8886F;
    --color-deep: #2A2433;
    --color-haze: #D4CFC8;

    /* Typography */
    --font-display: 'Poiret One', sans-serif;
    --font-serif: 'Cormorant Garamond', serif;
    --font-body: 'Nunito Sans', sans-serif;

    /* Layout */
    --column-width: clamp(320px, 55vw, 720px);
    --section-gap: 0;
}

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

/* ---- Marble Background ---- */
html {
    background-color: var(--color-marble);
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(1rem, 1.1vw, 1.15rem);
    line-height: 1.75;
    color: var(--color-plum);
    background:
        radial-gradient(ellipse 600px 400px at 20% 15%, rgba(212, 207, 200, 0.6) 0%, transparent 70%),
        radial-gradient(ellipse 500px 500px at 75% 30%, rgba(227, 221, 212, 0.5) 0%, transparent 60%),
        radial-gradient(ellipse 700px 300px at 50% 60%, rgba(212, 207, 200, 0.4) 0%, transparent 65%),
        radial-gradient(ellipse 400px 600px at 85% 80%, rgba(227, 221, 212, 0.5) 0%, transparent 55%),
        radial-gradient(ellipse 600px 400px at 10% 75%, rgba(240, 235, 227, 0.3) 0%, transparent 70%),
        radial-gradient(ellipse 500px 350px at 60% 90%, rgba(212, 207, 200, 0.35) 0%, transparent 60%),
        var(--color-marble);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Marble noise overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    filter: url(#marble-noise);
    opacity: 0.04;
    pointer-events: none;
    z-index: 0;
}

/* ---- Grain Overlay ---- */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    filter: url(#grain-filter);
    mix-blend-mode: overlay;
    opacity: 0.08;
    pointer-events: none;
    z-index: 1000;
}

/* ---- Navigation ---- */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
}

.nav-mark {
    display: flex;
    align-items: center;
}

.monogram {
    display: block;
}

.nav-toggle {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 1px;
    background: var(--color-gold);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.nav-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Navigation Panel */
.nav-panel {
    position: fixed;
    top: 0;
    left: -320px;
    width: 320px;
    height: 100vh;
    background:
        radial-gradient(ellipse 300px 300px at 30% 40%, rgba(212, 207, 200, 0.5) 0%, transparent 70%),
        radial-gradient(ellipse 250px 350px at 70% 70%, rgba(227, 221, 212, 0.4) 0%, transparent 60%),
        var(--color-marble);
    z-index: 99;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    padding: 80px 40px 40px;
    border-right: 1px solid rgba(196, 162, 101, 0.2);
}

.nav-panel.open {
    left: 0;
}

.nav-panel-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.nav-link {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--color-plum);
    text-decoration: none;
    letter-spacing: 0.03em;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--color-gold);
}

/* ---- Main Narrative ---- */
.narrative {
    position: relative;
    scroll-snap-type: y proximity;
    z-index: 1;
}

/* ---- Sections ---- */
.section {
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.section-content {
    width: var(--column-width);
    max-width: 90vw;
    margin: 0 auto;
    scroll-snap-align: start;
}

/* Cold Open */
.section--cold-open {
    min-height: 100svh;
}

.site-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 6rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-align: center;
    animation: fadeInTitle 1.2s ease-out forwards;
    opacity: 0;
}

@keyframes fadeInTitle {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Gold Foil Effect */
.gold-foil {
    background: linear-gradient(135deg, #C4A265 0%, #E8D5A3 45%, #C4A265 55%, #A68B4B 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Section Headings */
.section-heading {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 5rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-plum);
    margin-bottom: 2rem;
}

/* Body Text */
.body-text {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(1rem, 1.1vw, 1.15rem);
    line-height: 1.75;
    color: var(--color-plum);
    margin-bottom: 1.5rem;
}

.body-text:last-child {
    margin-bottom: 0;
}

/* Framed Content (Act I - film frame perforations) */
.framed {
    border-left: 1px solid rgba(196, 162, 101, 0.3);
    border-right: 1px solid rgba(196, 162, 101, 0.3);
    padding: 3rem 2.5rem;
}

/* Pull Quote (Interlude) */
.section--interlude {
    min-height: 100svh;
}

.pull-quote {
    font-family: var(--font-serif);
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    font-weight: 400;
    font-style: italic;
    color: var(--color-mauve);
    letter-spacing: 0.03em;
    text-align: center;
    line-height: 1.8;
    max-width: 600px;
    margin: 0 auto;
}

/* Marble Panel (Act II) */
.marble-panel {
    background:
        radial-gradient(ellipse 400px 300px at 30% 30%, rgba(212, 207, 200, 0.5) 0%, transparent 70%),
        radial-gradient(ellipse 300px 400px at 70% 60%, rgba(227, 221, 212, 0.4) 0%, transparent 60%),
        var(--color-ivory);
    padding: 3rem 2.5rem;
    border-radius: 2px;
    position: relative;
}

/* Corner brackets on marble panels */
.marble-panel::before,
.marble-panel::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    border-color: var(--color-gold);
    border-style: solid;
}

.marble-panel::before {
    top: -1px;
    left: -1px;
    border-width: 2px 0 0 2px;
}

.marble-panel::after {
    top: -1px;
    right: -1px;
    border-width: 2px 2px 0 0;
}

.section--act-ii .section-content {
    position: relative;
}

.section--act-ii .marble-panel {
    position: relative;
}

/* Bottom corner brackets via additional elements */
.section--act-ii .section-content::before,
.section--act-ii .section-content::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    border-color: var(--color-gold);
    border-style: solid;
    pointer-events: none;
}

.section--act-ii .section-content::before {
    bottom: -1px;
    left: -1px;
    border-width: 0 0 2px 2px;
}

.section--act-ii .section-content::after {
    bottom: -1px;
    right: -1px;
    border-width: 0 2px 2px 0;
}

/* ---- Coda ---- */
.section--coda {
    min-height: 100svh;
}

.coda-text {
    font-family: var(--font-serif);
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    font-weight: 500;
    color: var(--color-plum);
    text-align: center;
    letter-spacing: 0.03em;
    margin-bottom: 3rem;
}

.pulse-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-gold);
    margin: 0 auto;
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.4;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.15);
    }
}

/* ---- Gold Rule Dividers ---- */
.gold-rule {
    width: var(--column-width);
    max-width: 90vw;
    height: 1px;
    margin: 0 auto;
    background: linear-gradient(to right, transparent 0%, var(--color-gold) 20%, var(--color-gold) 80%, transparent 100%);
    position: relative;
}

.pulse-rule {
    animation: rulePulse 4s ease-in-out infinite;
}

@keyframes rulePulse {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.7;
    }
}

/* ---- Sunburst Divider ---- */
.sunburst-divider {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem 0;
}

/* ---- Chevron Border ---- */
.chevron-border {
    width: var(--column-width);
    max-width: 90vw;
    height: 8px;
    margin: 0 auto;
    background:
        linear-gradient(135deg, var(--color-gold) 25%, transparent 25%) -8px 0,
        linear-gradient(225deg, var(--color-gold) 25%, transparent 25%) -8px 0,
        linear-gradient(315deg, var(--color-gold) 25%, transparent 25%),
        linear-gradient(45deg, var(--color-gold) 25%, transparent 25%);
    background-size: 16px 8px;
    background-repeat: repeat-x;
    opacity: 0.2;
}

/* ---- Mountain Layers ---- */
.mountain-layer {
    position: sticky;
    top: 0;
    width: 100%;
    height: 0;
    overflow: visible;
    pointer-events: none;
    z-index: 0;
}

.mountain-layer svg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 400px;
}

.mountain-layer--far {
    top: 60svh;
}

.mountain-layer--mid {
    top: 65svh;
}

.mountain-layer--near {
    top: 70svh;
}

/* ---- Corner Brackets (page-level decorative) ---- */
.corner-bracket {
    position: fixed;
    width: 24px;
    height: 24px;
    border-color: var(--color-gold);
    border-style: solid;
    pointer-events: none;
    z-index: 50;
    opacity: 0.3;
}

.corner-bracket--tl {
    top: 20px;
    left: 20px;
    border-width: 2px 0 0 2px;
}

.corner-bracket--tr {
    top: 20px;
    right: 20px;
    border-width: 2px 2px 0 0;
}

.corner-bracket--bl {
    bottom: 20px;
    left: 20px;
    border-width: 0 0 2px 2px;
}

.corner-bracket--br {
    bottom: 20px;
    right: 20px;
    border-width: 0 2px 2px 0;
}

/* ---- Reveal Animation ---- */
.reveal {
    opacity: 0.3;
    transition: opacity 800ms ease-out, letter-spacing 800ms ease-out;
}

.reveal.visible {
    opacity: 1;
}

.section-heading.reveal {
    letter-spacing: 0.18em;
}

.section-heading.reveal.visible {
    letter-spacing: 0.12em;
}

/* ---- HH Watermark (tiled background) ---- */
body {
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Ctext x='30' y='70' font-family='sans-serif' font-size='28' fill='%233B3241' opacity='0.03' letter-spacing='-3' transform='rotate(-45 60 60)'%3EHH%3C/text%3E%3C/svg%3E");
    background-repeat: repeat;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .framed {
        padding: 2rem 1.5rem;
    }

    .marble-panel {
        padding: 2rem 1.5rem;
    }

    .site-nav {
        padding: 16px;
    }

    .nav-panel {
        width: 280px;
        left: -280px;
        padding: 70px 30px 30px;
    }

    .corner-bracket {
        display: none;
    }
}
