/* Color Palette */
:root {
    --color-bronze: #B8862B;
    --color-sage: #C4D4C8;
    --color-teal-dark: #1A5C4A;
    --color-black: #0B1A0F;
    --color-cream: #F0E6D0;
    --color-forest: #1A3C2A;
    --color-white: #FFFFFF;
    --color-gold: #E8C547;
    --color-green-bokeh: #2E6B4A;
    --color-gold-bokeh: #D4A843;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-black);
    color: var(--color-cream);
    font-family: 'EB Garamond', serif;
    font-size: 16px;
    line-height: 1.85;
    overflow-x: hidden;
    position: relative;
    font-weight: 400;
}

/* Bokeh Background System */
.bokeh-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bokeh {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    mix-blend-mode: screen;
}

.bokeh-1 {
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, var(--color-green-bokeh) 0%, transparent 70%);
    opacity: 0.08;
    top: 10%;
    left: 5%;
    animation: float 20s ease-in-out infinite;
}

.bokeh-2 {
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, var(--color-gold-bokeh) 0%, transparent 70%);
    opacity: 0.06;
    top: 20%;
    right: 10%;
    animation: float 25s ease-in-out infinite 2s;
}

.bokeh-3 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--color-green-bokeh) 0%, transparent 70%);
    opacity: 0.07;
    top: 35%;
    left: 15%;
    animation: float 22s ease-in-out infinite 1s;
}

.bokeh-4 {
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, var(--color-gold-bokeh) 0%, transparent 70%);
    opacity: 0.05;
    top: 50%;
    right: 5%;
    animation: float 24s ease-in-out infinite 3s;
}

.bokeh-5 {
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, var(--color-green-bokeh) 0%, transparent 70%);
    opacity: 0.08;
    top: 65%;
    left: 8%;
    animation: float 21s ease-in-out infinite 1.5s;
}

.bokeh-6 {
    width: 90px;
    height: 90px;
    background: radial-gradient(circle, var(--color-gold-bokeh) 0%, transparent 70%);
    opacity: 0.04;
    top: 75%;
    right: 20%;
    animation: float 23s ease-in-out infinite 2.5s;
}

.bokeh-7 {
    width: 170px;
    height: 170px;
    background: radial-gradient(circle, var(--color-green-bokeh) 0%, transparent 70%);
    opacity: 0.07;
    top: 15%;
    right: 30%;
    animation: float 26s ease-in-out infinite 0.5s;
}

.bokeh-8 {
    width: 110px;
    height: 110px;
    background: radial-gradient(circle, var(--color-gold-bokeh) 0%, transparent 70%);
    opacity: 0.05;
    top: 40%;
    left: 45%;
    animation: float 19s ease-in-out infinite 2s;
}

.bokeh-9 {
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, var(--color-green-bokeh) 0%, transparent 70%);
    opacity: 0.08;
    top: 60%;
    right: 35%;
    animation: float 24s ease-in-out infinite 1s;
}

.bokeh-10 {
    width: 95px;
    height: 95px;
    background: radial-gradient(circle, var(--color-gold-bokeh) 0%, transparent 70%);
    opacity: 0.06;
    top: 80%;
    left: 60%;
    animation: float 22s ease-in-out infinite 3.5s;
}

.bokeh-11 {
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, var(--color-green-bokeh) 0%, transparent 70%);
    opacity: 0.07;
    top: 25%;
    left: 70%;
    animation: float 25s ease-in-out infinite 1.5s;
}

.bokeh-12 {
    width: 130px;
    height: 130px;
    background: radial-gradient(circle, var(--color-gold-bokeh) 0%, transparent 70%);
    opacity: 0.05;
    top: 55%;
    left: 80%;
    animation: float 20s ease-in-out infinite 2.5s;
}

.bokeh-13 {
    width: 105px;
    height: 105px;
    background: radial-gradient(circle, var(--color-green-bokeh) 0%, transparent 70%);
    opacity: 0.06;
    top: 70%;
    right: 15%;
    animation: float 23s ease-in-out infinite 0.5s;
}

.bokeh-14 {
    width: 85px;
    height: 85px;
    background: radial-gradient(circle, var(--color-gold-bokeh) 0%, transparent 70%);
    opacity: 0.04;
    top: 45%;
    right: 45%;
    animation: float 21s ease-in-out infinite 3s;
}

.bokeh-15 {
    width: 175px;
    height: 175px;
    background: radial-gradient(circle, var(--color-green-bokeh) 0%, transparent 70%);
    opacity: 0.08;
    top: 30%;
    left: 50%;
    animation: float 24s ease-in-out infinite 2s;
}

.bokeh-16 {
    width: 115px;
    height: 115px;
    background: radial-gradient(circle, var(--color-gold-bokeh) 0%, transparent 70%);
    opacity: 0.06;
    top: 85%;
    left: 25%;
    animation: float 22s ease-in-out infinite 1.5s;
}

.bokeh-17 {
    width: 145px;
    height: 145px;
    background: radial-gradient(circle, var(--color-green-bokeh) 0%, transparent 70%);
    opacity: 0.07;
    top: 12%;
    right: 50%;
    animation: float 26s ease-in-out infinite 2.5s;
}

.bokeh-18 {
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, var(--color-gold-bokeh) 0%, transparent 70%);
    opacity: 0.05;
    top: 65%;
    right: 60%;
    animation: float 20s ease-in-out infinite 1s;
}

.bokeh-19 {
    width: 155px;
    height: 155px;
    background: radial-gradient(circle, var(--color-green-bokeh) 0%, transparent 70%);
    opacity: 0.08;
    top: 55%;
    left: 35%;
    animation: float 23s ease-in-out infinite 3s;
}

.bokeh-20 {
    width: 125px;
    height: 125px;
    background: radial-gradient(circle, var(--color-gold-bokeh) 0%, transparent 70%);
    opacity: 0.06;
    top: 40%;
    right: 70%;
    animation: float 24s ease-in-out infinite 2s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(20px, -20px);
    }
    50% {
        transform: translate(-10px, 30px);
    }
    75% {
        transform: translate(15px, -10px);
    }
}

/* Main Container */
.site-container {
    position: relative;
    z-index: 1;
}

/* Sections */
.section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 60px 40px;
    position: relative;
    overflow: hidden;
}

.section:nth-child(odd) {
    flex-direction: row;
}

.section:nth-child(even) {
    flex-direction: row-reverse;
}

/* Offset Positioning for Broken Grid */
.offset-left {
    transform: translateX(-40px) rotate(-1.5deg);
    width: 45%;
}

.offset-right {
    transform: translateX(40px) rotate(1.5deg);
    width: 45%;
}

.section-visual {
    width: 45%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Threshold Sections */
.threshold,
.threshold-exit {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.candle-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    position: relative;
    z-index: 2;
}

.candle-flame {
    width: 80px;
    height: 120px;
    position: relative;
    cursor: pointer;
    animation: candleFlicker 3s ease-in-out infinite;
}

.flame-inner {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, var(--color-gold) 0%, #D4A843 30%, var(--color-bronze) 70%, rgba(184, 134, 43, 0) 100%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    filter: drop-shadow(0 0 20px var(--color-gold)) drop-shadow(0 0 40px rgba(232, 197, 71, 0.5));
    animation: flameWave 2s ease-in-out infinite;
}

@keyframes candleFlicker {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.02) rotate(0.5deg);
    }
}

@keyframes flameWave {
    0%, 100% {
        transform: scaleY(1) scaleX(1);
    }
    25% {
        transform: scaleY(1.1) scaleX(0.95);
    }
    50% {
        transform: scaleY(0.95) scaleX(1.05);
    }
    75% {
        transform: scaleY(1.05) scaleX(0.98);
    }
}

.candle-text {
    text-align: center;
}

.candle-text h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2rem, 6.5vw, 4rem);
    font-weight: 300;
    letter-spacing: 0.12em;
    text-transform: lowercase;
    margin-bottom: 20px;
    color: var(--color-gold);
    text-shadow: 0 0 20px rgba(232, 197, 71, 0.3);
}

.candle-text p {
    font-size: 1.1rem;
    letter-spacing: 0.08em;
    color: var(--color-sage);
    text-transform: uppercase;
}

/* Section Content */
.section-content {
    transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
}

.section-content h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 600;
    letter-spacing: 0.08em;
    margin-bottom: 30px;
    color: var(--color-gold);
    text-transform: lowercase;
}

.section-content p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--color-cream);
    margin-bottom: 25px;
    letter-spacing: 0.01em;
}

/* Accent Boxes */
.accent-box {
    display: inline-block;
    padding: 15px 25px;
    border-left: 3px solid;
    margin-top: 15px;
    background: rgba(255, 255, 255, 0.02);
}

.accent-gold {
    border-left-color: var(--color-gold);
}

.accent-teal {
    border-left-color: var(--color-teal-dark);
}

.accent-cream {
    border-left-color: var(--color-cream);
}

.accent-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: none;
    color: var(--color-green-bokeh);
}

/* Visual Blocks */
.visual-block {
    width: 300px;
    height: 300px;
    border: 2px solid;
    position: relative;
    animation: tiltFloat 6s ease-in-out infinite;
}

.visual-1 {
    border-color: var(--color-gold-bokeh);
    background: linear-gradient(135deg, rgba(212, 168, 67, 0.1) 0%, rgba(26, 92, 74, 0.1) 100%);
}

.visual-2 {
    border-color: var(--color-teal-dark);
    background: linear-gradient(45deg, rgba(26, 92, 74, 0.1) 0%, rgba(184, 134, 43, 0.1) 100%);
}

.visual-3 {
    border-color: var(--color-cream);
    background: linear-gradient(135deg, rgba(240, 230, 208, 0.05) 0%, rgba(196, 212, 200, 0.1) 100%);
}

.visual-4 {
    border-color: var(--color-gold);
    background: linear-gradient(45deg, rgba(232, 197, 71, 0.1) 0%, rgba(46, 107, 74, 0.1) 100%);
}

@keyframes tiltFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-15px) rotate(1deg);
    }
    50% {
        transform: translateY(-30px) rotate(-1deg);
    }
    75% {
        transform: translateY(-15px) rotate(0.5deg);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .section {
        flex-direction: column !important;
        gap: 40px;
    }

    .offset-left,
    .offset-right {
        width: 100%;
        transform: none;
    }

    .section-visual {
        width: 100%;
    }

    .visual-block {
        width: 250px;
        height: 250px;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 40px 20px;
    }

    .section-content h2 {
        font-size: 2rem;
    }

    .section-content p {
        font-size: 1rem;
    }

    .candle-flame {
        width: 60px;
        height: 90px;
    }

    .candle-text h1 {
        font-size: 2.5rem;
    }

    .visual-block {
        width: 200px;
        height: 200px;
    }

    .candle-container {
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 30px 16px;
        min-height: auto;
    }

    .section-content h2 {
        font-size: 1.6rem;
    }

    .section-content p {
        font-size: 0.95rem;
    }

    .candle-text h1 {
        font-size: 1.8rem;
    }

    .candle-flame {
        width: 50px;
        height: 75px;
    }

    .visual-block {
        width: 150px;
        height: 150px;
    }
}

/* Section-Specific Styles */
.section-0 {
    background: linear-gradient(180deg, var(--color-black) 0%, rgba(26, 60, 42, 0.3) 100%);
}

.section-1 {
    background: linear-gradient(180deg, var(--color-black) 0%, rgba(26, 92, 74, 0.2) 100%);
}

.section-2 {
    background: linear-gradient(180deg, var(--color-black) 0%, rgba(11, 26, 15, 0) 100%);
}

.section-3 {
    background: linear-gradient(180deg, var(--color-black) 0%, rgba(46, 107, 74, 0.15) 100%);
}

.section-4 {
    background: linear-gradient(180deg, var(--color-black) 0%, rgba(184, 134, 43, 0.1) 100%);
}

.section-5 {
    background: linear-gradient(180deg, rgba(26, 60, 42, 0.3) 0%, var(--color-black) 100%);
}
