/* ==========================================================================
   footprint.market v2 - Botanical Environmental Impact Marketplace
   Opulent-grand aesthetic, broken-grid, candlelit botanical exhibition
   ========================================================================== */

/* --- CSS Custom Properties --- */
:root {
    --deep-burgundy: #4A1028;
    --botanical-cream: #F5F0E3;
    --leaf-viridian: #2E6B4F;
    --gold-leaf: #C4A44A;
    --petal-rose: #D4728C;
    --earth-umber: #6B4E37;
    --candle-glow: #F5D89A;
    --burgundy-dark: #2A0818;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 400;
    font-size: clamp(15px, 1.5vw, 18px);
    line-height: 1.75;
    color: var(--botanical-cream);
    background-color: var(--deep-burgundy);
    overflow-x: hidden;
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: 'Cormorant Garamond', serif;
    letter-spacing: -0.01em;
}

h1 {
    font-weight: 600;
    font-size: clamp(28px, 5vw, 64px);
}

h2 {
    font-weight: 600;
    font-size: clamp(24px, 4vw, 52px);
}

h3 {
    font-weight: 600;
    font-size: clamp(20px, 2.5vw, 32px);
}

.botanical-label {
    font-family: 'EB Garamond', serif;
    font-weight: 400;
    font-style: italic;
    font-size: 14px;
    color: var(--gold-leaf);
    margin-top: 1.5em;
    padding-top: 1em;
    border-top: 1px solid rgba(196, 164, 74, 0.3);
}


/* ==========================================================================
   HERO SECTION - Opening Viewport (100vh)
   ========================================================================== */
.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 640px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--deep-burgundy);
    overflow: hidden;
}

/* --- Candle glow point lights --- */
.candle-glow {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    will-change: opacity, transform;
}

.candle-glow--center {
    width: 550px;
    height: 550px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(245, 216, 154, 0.18) 0%, rgba(245, 216, 154, 0.06) 40%, transparent 70%);
}

.candle-glow--top-left {
    width: 320px;
    height: 320px;
    top: 8%;
    left: 12%;
    background: radial-gradient(circle, rgba(245, 216, 154, 0.1) 0%, transparent 70%);
}

.candle-glow--top-right {
    width: 280px;
    height: 280px;
    top: 12%;
    right: 18%;
    background: radial-gradient(circle, rgba(245, 216, 154, 0.08) 0%, transparent 70%);
}

.candle-glow--bottom-left {
    width: 300px;
    height: 300px;
    bottom: 12%;
    left: 8%;
    background: radial-gradient(circle, rgba(245, 216, 154, 0.07) 0%, transparent 70%);
}

.candle-glow--bottom-right {
    width: 340px;
    height: 340px;
    bottom: 8%;
    right: 10%;
    background: radial-gradient(circle, rgba(245, 216, 154, 0.09) 0%, transparent 70%);
}

/* --- Botanical frame container --- */
.botanical-frame {
    position: relative;
    width: min(82vw, 860px);
    max-width: 860px;
    /* Off-center: 55% left, 45% top */
    transform: translate(5%, -5%);
}

.botanical-frame__svg {
    width: 100%;
    height: auto;
    display: block;
}

/* --- SVG stroke animation setup --- */
.frame-stroke {
    stroke-dasharray: 3000;
    stroke-dashoffset: 3000;
}

.frame-inner {
    stroke-dasharray: 2800;
    stroke-dashoffset: 2800;
}

.vine {
    stroke-dasharray: 900;
    stroke-dashoffset: 900;
}

.vine--top-center,
.vine--top-swirl-l,
.vine--top-swirl-r {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
}

.botanical-stem {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
}

.corner-leaf {
    opacity: 0;
    transform: scale(0);
    transform-origin: center;
    transition: none;
}

/* --- Hero content --- */
.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 2;
    width: 72%;
}

.hero-title {
    color: var(--botanical-cream);
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 500ms ease, transform 500ms ease;
    text-shadow: 0 2px 24px rgba(74, 16, 40, 0.7);
}

.hero-subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(16px, 2.5vw, 28px);
    color: var(--candle-glow);
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 500ms ease 200ms, transform 500ms ease 200ms;
    margin-top: 0.5em;
}

.hero-title.visible,
.hero-subtitle.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Scroll indicator --- */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 800ms ease;
    z-index: 3;
}

.scroll-indicator.visible {
    opacity: 0.6;
}

.scroll-dot {
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { cy: 10; opacity: 1; }
    50% { cy: 24; opacity: 0.3; }
}


/* ==========================================================================
   GOLD LEAF DIVIDERS
   ========================================================================== */
.gold-rule {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 0;
    margin: 0 10%;
}

.gold-rule::before,
.gold-rule::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gold-leaf);
    transform: scaleX(0);
    transition: transform 800ms ease;
}

.gold-rule::before {
    transform-origin: right center;
    margin-right: 1rem;
}

.gold-rule::after {
    transform-origin: left center;
    margin-left: 1rem;
}

.gold-rule.is-visible::before,
.gold-rule.is-visible::after {
    transform: scaleX(1);
}

.gold-rule__flourish {
    width: 30px;
    height: 10px;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 600ms ease 400ms;
}

.gold-rule.is-visible .gold-rule__flourish {
    opacity: 1;
}


/* ==========================================================================
   CONTENT PANELS - Broken Grid Layout
   ========================================================================== */
.content-panel {
    position: relative;
    padding: 4.5rem 3.5rem;
    margin-top: -80px;
    background: rgba(74, 16, 40, 0.55);
    border: 1px solid rgba(196, 164, 74, 0.2);
    backdrop-filter: blur(3px);
    overflow: visible;
    opacity: 0;
    transition: opacity 600ms ease, transform 600ms ease;
}

.content-panel--left {
    margin-left: 5%;
    margin-right: auto;
    transform: translateX(-60px);
}

.content-panel--right {
    margin-right: 5%;
    margin-left: auto;
    transform: translateX(60px);
}

.content-panel--60 { width: 60%; }
.content-panel--75 { width: 75%; }
.content-panel--50 { width: 50%; }

.content-panel.is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* --- Panel candle glow --- */
.panel-glow {
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 216, 154, 0.08) 0%, transparent 70%);
    pointer-events: none;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
}

.panel-content {
    position: relative;
    z-index: 1;
}

.panel-title {
    color: var(--botanical-cream);
    margin-bottom: 1rem;
    position: relative;
}

.panel-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: var(--gold-leaf);
    margin-top: 0.75rem;
    transition: width 600ms ease 200ms;
}

.content-panel.is-visible .panel-title::after {
    width: 80px;
}

.panel-body {
    color: var(--botanical-cream);
    opacity: 0.9;
    margin-bottom: 1rem;
    max-width: 65ch;
}

.panel-body:last-of-type {
    margin-bottom: 0;
}


/* ==========================================================================
   SECTION BOTANICAL ILLUSTRATIONS
   ========================================================================== */
.section-botanical {
    position: absolute;
    pointer-events: none;
    z-index: 0;
    opacity: 0.75;
}

.section-botanical--position-right {
    width: 130px;
    top: -65px;
    right: -42px;
}

.section-botanical--position-left {
    width: 140px;
    top: -55px;
    left: -50px;
}


/* ==========================================================================
   GALLERY SECTION - Mixed-Media Botanical Collection
   ========================================================================== */
.gallery-section {
    position: relative;
    padding: 7rem 5% 5rem;
    overflow: visible;
}

.gallery-glow {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.gallery-glow--1 {
    width: 500px;
    height: 500px;
    top: 10%;
    left: 20%;
    background: radial-gradient(circle, rgba(245, 216, 154, 0.06) 0%, transparent 70%);
}

.gallery-glow--2 {
    width: 400px;
    height: 400px;
    bottom: 15%;
    right: 15%;
    background: radial-gradient(circle, rgba(245, 216, 154, 0.05) 0%, transparent 70%);
}

.gallery-title {
    text-align: center;
    color: var(--botanical-cream);
    margin-bottom: 3.5rem;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 600ms ease, transform 600ms ease;
}

.gallery-title.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.gallery-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 2px;
    background: var(--gold-leaf);
    margin: 1rem auto 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

/* --- Gallery cards --- */
.gallery-card {
    background: rgba(245, 240, 227, 0.04);
    border: 1px solid rgba(196, 164, 74, 0.22);
    padding: 2.5rem 1.5rem 2rem;
    text-align: center;
    transition: transform 400ms ease-out, box-shadow 400ms ease-out, border-color 400ms ease-out;
    position: relative;
    opacity: 0;
    transform: translateY(40px);
}

.gallery-card.is-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 600ms ease, transform 600ms ease;
}

.gallery-card:hover {
    transform: scale(1.08);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35), 0 0 80px rgba(245, 216, 154, 0.08);
    border-color: var(--gold-leaf);
    z-index: 2;
}

/* Broken grid offsets */
.gallery-card--offset-1 { margin-top: 0; }
.gallery-card--offset-2 { margin-top: 48px; }
.gallery-card--offset-3 { margin-top: -24px; }
.gallery-card--offset-4 { grid-column: 1 / 2; margin-top: -32px; margin-left: 12%; }
.gallery-card--offset-5 { grid-column: 2 / 3; margin-top: 16px; }

.gallery-card__illustration {
    width: 120px;
    height: 158px;
    margin: 0 auto 1.5rem;
    position: relative;
}

.gallery-card__illustration svg {
    width: 100%;
    height: 100%;
}

.gallery-card__title {
    color: var(--botanical-cream);
    font-size: clamp(18px, 2vw, 26px);
    margin-bottom: 0.5rem;
}

.gallery-card__label {
    font-family: 'EB Garamond', serif;
    font-style: italic;
    font-size: 14px;
    color: var(--gold-leaf);
}

.gallery-card__sublabel {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 12px;
    color: var(--earth-umber);
    margin-top: 0.35em;
    opacity: 0.75;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}


/* ==========================================================================
   FOOTER - Candle Atmospheric
   ========================================================================== */
.footer-section {
    position: relative;
    padding: 7rem 5% 4.5rem;
    background: linear-gradient(to bottom, var(--deep-burgundy) 0%, var(--burgundy-dark) 100%);
    text-align: center;
    overflow: hidden;
    margin-top: 3rem;
}

/* Candle point lights in footer */
.footer-candle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: candleFlicker 4s ease-in-out infinite alternate;
}

.footer-candle--1 {
    width: 260px;
    height: 260px;
    top: 18%;
    left: 8%;
    background: radial-gradient(circle, rgba(245, 216, 154, 0.1) 0%, transparent 70%);
    animation-delay: 0s;
}

.footer-candle--2 {
    width: 220px;
    height: 220px;
    top: 28%;
    right: 12%;
    background: radial-gradient(circle, rgba(245, 216, 154, 0.08) 0%, transparent 70%);
    animation-delay: 1.2s;
}

.footer-candle--3 {
    width: 320px;
    height: 320px;
    top: 8%;
    left: 50%;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(245, 216, 154, 0.12) 0%, transparent 70%);
    animation-delay: 0.6s;
}

.footer-candle--4 {
    width: 190px;
    height: 190px;
    bottom: 12%;
    left: 22%;
    background: radial-gradient(circle, rgba(245, 216, 154, 0.06) 0%, transparent 70%);
    animation-delay: 1.8s;
}

.footer-candle--5 {
    width: 230px;
    height: 230px;
    bottom: 8%;
    right: 18%;
    background: radial-gradient(circle, rgba(245, 216, 154, 0.07) 0%, transparent 70%);
    animation-delay: 2.2s;
}

.footer-candle--6 {
    width: 180px;
    height: 180px;
    top: 50%;
    left: 40%;
    background: radial-gradient(circle, rgba(245, 216, 154, 0.05) 0%, transparent 70%);
    animation-delay: 0.3s;
}

@keyframes candleFlicker {
    0%   { opacity: 0.55; transform: scale(1); }
    20%  { opacity: 0.75; }
    40%  { opacity: 0.5; transform: scale(1.04); }
    60%  { opacity: 0.8; }
    80%  { opacity: 0.6; transform: scale(0.97); }
    100% { opacity: 0.85; transform: scale(1.02); }
}

.footer-content {
    position: relative;
    z-index: 1;
}

.footer-botanical {
    width: 200px;
    height: auto;
    margin: 0 auto 2.5rem;
    display: block;
    opacity: 0.65;
}

.footer-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: clamp(28px, 4vw, 48px);
    color: var(--botanical-cream);
    letter-spacing: -0.01em;
    margin-bottom: 0.5rem;
}

.footer-tagline {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(16px, 2vw, 22px);
    color: var(--candle-glow);
    margin-bottom: 2.5rem;
}

.footer-gold-rule {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    max-width: 300px;
}

.footer-gold-rule::before,
.footer-gold-rule::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gold-leaf);
}

.footer-gold-rule::before { margin-right: 1rem; }
.footer-gold-rule::after { margin-left: 1rem; }

.footer-gold-rule .gold-rule__flourish {
    opacity: 1;
}

.footer-note {
    font-family: 'EB Garamond', serif;
    font-style: italic;
    font-size: 14px;
    color: var(--earth-umber);
    opacity: 0.8;
}


/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
    .content-panel--60,
    .content-panel--75,
    .content-panel--50 {
        width: 85%;
    }

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

    .gallery-card--offset-4 {
        grid-column: auto;
        margin-left: 0;
    }

    .gallery-card--offset-5 {
        grid-column: auto;
    }
}

@media (max-width: 768px) {
    .content-panel {
        padding: 3rem 2rem;
        margin-top: -40px;
    }

    .content-panel--left,
    .content-panel--right {
        margin-left: 3%;
        margin-right: 3%;
    }

    .content-panel--60,
    .content-panel--75,
    .content-panel--50 {
        width: 94%;
    }

    .botanical-frame {
        transform: translate(0, 0);
        width: 92vw;
    }

    .hero-content {
        width: 82%;
    }

    .section-botanical {
        display: none;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .gallery-card--offset-1,
    .gallery-card--offset-2,
    .gallery-card--offset-3,
    .gallery-card--offset-4,
    .gallery-card--offset-5 {
        margin-top: 0;
        margin-left: 0;
    }

    .gold-rule {
        margin: 0 5%;
    }

    .gallery-section {
        padding: 5rem 4% 3rem;
    }

    .footer-section {
        padding: 5rem 4% 3.5rem;
    }
}

@media (max-width: 480px) {
    .content-panel {
        padding: 2rem 1.5rem;
    }

    .hero-content {
        width: 92%;
    }

    .scroll-indicator {
        bottom: 1.5rem;
    }
}
