/* ============================================================
   economics.day - Art Deco Greenhouse Aesthetic
   Gold-Black-Luxury Palette | Single-Column Narrative
   ============================================================ */

/* --- CSS Custom Properties --- */
:root {
    --base-black: #0A0A0A;
    --primary-gold: #C9A84C;
    --secondary-gold: #8B7535;
    --warm-white: #F0E8D4;
    --shadow-gold: #5C4A1E;
    --onyx-layer: #111111;
    --fern-patina: #3D5C3A;
    --champagne-glow: #E8D5A3;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--base-black);
    color: var(--warm-white);
    font-family: 'EB Garamond', serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.85;
    font-variant-ligatures: common-ligatures;
    font-variant-numeric: oldstyle-nums;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Art Deco Fan Pattern in Margins (wide screens) --- */
@media (min-width: 1440px) {
    body::before,
    body::after {
        content: '';
        position: fixed;
        top: 0;
        bottom: 0;
        width: calc((100vw - 720px) / 2 - 40px);
        z-index: 0;
        pointer-events: none;
        background-image: repeating-conic-gradient(
            from 180deg at 50% 100%,
            transparent 0deg,
            rgba(201, 168, 76, 0.02) 10deg,
            transparent 20deg,
            rgba(201, 168, 76, 0.015) 30deg,
            transparent 40deg,
            rgba(201, 168, 76, 0.02) 50deg,
            transparent 60deg
        );
        background-size: 60px 60px;
        background-repeat: repeat;
    }

    body::before {
        left: 0;
    }

    body::after {
        right: 0;
    }
}

/* --- Background Botanical Watermark --- */
.bg-botanical {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 800px;
    z-index: 0;
    pointer-events: none;
    opacity: 0.03;
    display: none;
}

@media (min-width: 1600px) {
    .bg-botanical {
        display: block;
    }
}

.bg-botanical-svg {
    width: 100%;
    height: 100%;
}

/* --- Navigation Diamond --- */
.nav-diamond {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1000;
    cursor: pointer;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.diamond-icon {
    width: 12px;
    height: 12px;
    background-color: var(--primary-gold);
    transform: rotate(45deg);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-diamond:hover .diamond-icon {
    transform: rotate(45deg) scale(1.2);
    opacity: 0.8;
}

/* --- Navigation Overlay --- */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.nav-overlay.active {
    pointer-events: all;
    opacity: 1;
}

.nav-overlay-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--base-black);
    opacity: 0.95;
    background-image:
        linear-gradient(45deg, rgba(201, 168, 76, 0.04) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(201, 168, 76, 0.04) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(201, 168, 76, 0.04) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(201, 168, 76, 0.04) 75%);
    background-size: 30px 30px;
    background-position: 0 0, 0 15px, 15px -15px, -15px 0px;
}

.nav-list {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.nav-link {
    font-family: 'Poiret One', cursive;
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    color: var(--primary-gold);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    opacity: 0;
    transform: translateY(10px);
    transition: color 0.3s ease, opacity 0.4s ease, transform 0.4s ease;
}

.nav-overlay.active .nav-link {
    opacity: 1;
    transform: translateY(0);
}

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

/* Stagger nav link animations */
.nav-overlay.active .nav-link[data-index="0"] { transition-delay: 0ms; }
.nav-overlay.active .nav-link[data-index="1"] { transition-delay: 50ms; }
.nav-overlay.active .nav-link[data-index="2"] { transition-delay: 100ms; }
.nav-overlay.active .nav-link[data-index="3"] { transition-delay: 150ms; }
.nav-overlay.active .nav-link[data-index="4"] { transition-delay: 200ms; }
.nav-overlay.active .nav-link[data-index="5"] { transition-delay: 250ms; }
.nav-overlay.active .nav-link[data-index="6"] { transition-delay: 300ms; }
.nav-overlay.active .nav-link[data-index="7"] { transition-delay: 350ms; }
.nav-overlay.active .nav-link[data-index="8"] { transition-delay: 400ms; }

/* --- Panels --- */
.panel {
    position: relative;
    width: 100%;
    z-index: 1;
}

.panel-content {
    position: relative;
    max-width: 720px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Statement Panels */
.statement-panel {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--base-black);
}

/* Exposition Panels */
.exposition-panel {
    background-color: var(--onyx-layer);
    padding: 120px 0;
}

/* --- Hero Panel (Panel I) --- */
.hero-panel {
    position: relative;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-family: 'Poiret One', cursive;
    font-size: clamp(3rem, 6vw, 5.5rem);
    color: var(--primary-gold);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    line-height: 1.1;
}

.hero-rule {
    border: none;
    height: 1px;
    background-color: var(--primary-gold);
    width: 40%;
    margin: 24px auto;
}

.hero-subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    font-style: italic;
    font-size: clamp(1.1rem, 1.8vw, 1.4rem);
    color: var(--warm-white);
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.6;
    opacity: 0;
}

.hero-subtitle.visible {
    opacity: 1;
    transition: opacity 1.2s ease-out;
}

/* --- Statement Headings --- */
.statement-heading {
    font-family: 'Poiret One', cursive;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    color: var(--primary-gold);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    text-align: center;
    line-height: 1.2;
    position: relative;
    z-index: 2;
}

/* Closing statement in Cormorant Garamond italic */
.closing-heading {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    font-style: italic;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    color: var(--primary-gold);
    text-transform: none;
    letter-spacing: 0.02em;
    text-align: center;
    line-height: 1.5;
    max-width: 640px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* --- Exposition Text --- */
.expo-text {
    position: relative;
}

.expo-text p {
    margin-bottom: 1.5em;
    color: var(--warm-white);
}

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

/* --- Pull Quotes --- */
.pull-quote {
    margin: 2.5em 40px;
    position: relative;
}

.pull-quote-rule {
    border: none;
    height: 1px;
    background-color: var(--primary-gold);
    width: 60px;
    margin-bottom: 1.2em;
    opacity: 0.6;
}

.pull-quote blockquote {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    font-style: italic;
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    color: var(--champagne-glow);
    line-height: 1.5;
    letter-spacing: 0.02em;
}

/* --- Leaf Break Dividers --- */
.leaf-break {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2em 0;
}

.leaf-break svg {
    width: 40px;
    height: 24px;
}

/* --- Corner Botanicals --- */
.corner-botanical {
    position: absolute;
    width: 120px;
    height: 120px;
    opacity: 0.25;
    z-index: 1;
}

.corner-upper-left {
    top: 40px;
    left: 40px;
}

.corner-lower-right {
    bottom: 40px;
    right: 40px;
}

.corner-lower-left {
    bottom: 40px;
    left: 40px;
}

.corner-upper-right {
    top: 40px;
    right: 40px;
}

/* SVG path animation setup */
.botanical-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 1.5s ease-in-out;
}

.botanical-path.drawn {
    stroke-dashoffset: 0;
}

/* --- Lens Flare --- */
.lens-flare {
    position: absolute;
    top: 38.2%;
    left: 61.8%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    pointer-events: none;
    z-index: 1;
    animation: flarePulse 6s ease-in-out infinite alternate;
}

.lens-flare-center {
    top: 50%;
    left: 50%;
}

.lens-flare-large {
    width: 280px;
    height: 280px;
}

.flare-core {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background-color: var(--champagne-glow);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.lens-flare-large .flare-core {
    width: 12px;
    height: 12px;
}

.flare-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    border: 1px solid var(--primary-gold);
    transform: translate(-50%, -50%);
}

.flare-ring-inner {
    width: 40px;
    height: 40px;
    opacity: 0.1;
}

.flare-ring-outer {
    width: 80px;
    height: 80px;
    opacity: 0.05;
}

.lens-flare-large .flare-ring-inner {
    width: 60px;
    height: 60px;
    opacity: 0.15;
}

.lens-flare-large .flare-ring-outer {
    width: 120px;
    height: 120px;
    opacity: 0.1;
}

/* Flare radiating lines */
.flare-line {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1px;
    height: 0;
    background-color: var(--primary-gold);
    opacity: 0.12;
    transform-origin: 0 0;
    transition: height 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.flare-line.extended {
    height: 80px;
}

.lens-flare-large .flare-line.extended {
    height: 120px;
}

.flare-line-1 { transform: rotate(0deg); }
.flare-line-2 { transform: rotate(45deg); }
.flare-line-3 { transform: rotate(90deg); }
.flare-line-4 { transform: rotate(135deg); }
.flare-line-5 { transform: rotate(180deg); }
.flare-line-6 { transform: rotate(225deg); }
.flare-line-7 { transform: rotate(270deg); }
.flare-line-8 { transform: rotate(315deg); }

@keyframes flarePulse {
    0% { opacity: 0.08; }
    100% { opacity: 0.15; }
}

.lens-flare-large {
    animation: flarePulseLarge 6s ease-in-out infinite alternate;
}

@keyframes flarePulseLarge {
    0% { opacity: 0.12; }
    100% { opacity: 0.2; }
}

/* --- Central Botanical (Panel V) --- */
.botanical-panel {
    background-color: var(--base-black);
}

.central-botanical {
    width: 100%;
    max-width: 400px;
    height: auto;
    display: block;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* --- Vertical Connectors --- */
.vertical-connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    position: relative;
    z-index: 1;
    background-color: var(--base-black);
}

.connector-line {
    width: 1px;
    height: 40px;
    background-color: rgba(201, 168, 76, 0.3);
}

.connector-diamond {
    width: 12px;
    height: 12px;
    background-color: transparent;
    border: 1px solid rgba(201, 168, 76, 0.3);
    transform: rotate(45deg);
    flex-shrink: 0;
}

.connector-botanical {
    padding: 4px 0;
    flex-shrink: 0;
}

.connector-botanical svg {
    width: 24px;
    height: 40px;
    display: block;
}

.connector-finial svg {
    width: 30px;
    height: 50px;
}

.vertical-connector-final {
    padding-bottom: 0;
}

.connector-line-long {
    height: 80px;
}

/* --- Footer (Panel IX) --- */
.footer-panel {
    background-color: var(--base-black);
    padding: 60px 24px 80px;
    text-align: center;
    min-height: auto;
}

.footer-rule {
    border: none;
    height: 1px;
    background-color: var(--primary-gold);
    width: 60px;
    margin: 0 auto 24px;
    opacity: 0.5;
}

.footer-text {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    font-size: 0.8rem;
    color: var(--primary-gold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.6;
}

/* --- Fade Reveal Animation --- */
.fade-element {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-element.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .panel-content {
        padding: 0 20px;
    }

    .corner-botanical {
        width: 80px;
        height: 80px;
    }

    .corner-upper-left {
        top: 20px;
        left: 10px;
    }

    .corner-lower-right {
        bottom: 20px;
        right: 10px;
    }

    .corner-lower-left {
        bottom: 20px;
        left: 10px;
    }

    .corner-upper-right {
        top: 20px;
        right: 10px;
    }

    .lens-flare {
        width: 140px;
        height: 140px;
    }

    .lens-flare-large {
        width: 200px;
        height: 200px;
    }

    .pull-quote {
        margin: 2em 20px;
    }

    .exposition-panel {
        padding: 80px 0;
    }
}

@media (max-width: 480px) {
    .hero-rule {
        width: 60%;
    }

    .pull-quote {
        margin: 1.5em 10px;
    }

    .corner-botanical {
        width: 60px;
        height: 60px;
    }
}

/* --- Selection styling --- */
::selection {
    background-color: rgba(201, 168, 76, 0.3);
    color: var(--warm-white);
}

/* --- Scrollbar styling --- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--base-black);
}

::-webkit-scrollbar-thumb {
    background: rgba(201, 168, 76, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(201, 168, 76, 0.5);
}
