/* === RESET & BASE === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
    scroll-behavior: smooth;
}

body {
    background: #0f0a1e;
    color: #f5f0e8;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 300;
    font-size: clamp(0.95rem, 1.8vw, 1.15rem);
    letter-spacing: 0.04em;
    line-height: 1.65;
    overflow-x: hidden;
}

/* === ANIMATIONS === */
@keyframes candlePulse {
    0% { opacity: 0.85; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1.05); }
}

@keyframes flickerShadow {
    0%, 100% { text-shadow: 2px 2px 8px rgba(0,0,0,0.6); }
    50% { text-shadow: 3px 1px 12px rgba(0,0,0,0.8); }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes waxDrip {
    0% { height: 0; opacity: 0; }
    20% { opacity: 1; }
    100% { height: 80px; opacity: 0.7; }
}

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

/* === CHAMBERS === */
.chamber {
    min-height: 100vh;
    scroll-snap-align: start;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* === CHAMBER 1 === */
.chamber-1 {
    background: #2a0e33;
}

.domain-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(3rem, 10vw, 8rem);
    letter-spacing: 0.15em;
    line-height: 0.95;
    text-transform: uppercase;
    color: #d4a017;
    position: absolute;
    top: 15vh;
    left: 8vw;
    transform: rotate(-3.7deg);
    animation: flickerShadow 4s cubic-bezier(0.17, 0.67, 0.83, 0.67) infinite;
    z-index: 3;
}

.card-1 {
    position: absolute;
    top: 42vh;
    left: 22vw;
    max-width: 400px;
    transform: rotate(1.2deg);
    z-index: 2;
}

.gold-rule {
    position: absolute;
    bottom: 12vh;
    left: -5vw;
    width: 110vw;
    height: 2px;
    background: linear-gradient(90deg, transparent, #d4a017 20%, #e8b830 50%, #d4a017 80%, transparent);
    transform: skewY(2deg);
    z-index: 1;
}

/* === CHAMBER 2 === */
.chamber-2 {
    background: linear-gradient(135deg, #0f0a1e 0%, #0f0a1e 48%, #0a3d3d 52%, #0a3d3d 100%);
}

.card-2a {
    position: absolute;
    top: 20vh;
    right: 8vw;
    max-width: 350px;
    transform: rotate(-2deg);
    z-index: 2;
}

.card-2b {
    position: absolute;
    top: 38vh;
    right: 5vw;
    max-width: 380px;
    transform: rotate(4deg);
    z-index: 3;
}

.card-2c {
    position: absolute;
    top: 58vh;
    right: 12vw;
    max-width: 300px;
    transform: rotate(-1.4deg);
    z-index: 2;
}

.candle-flame {
    position: absolute;
    left: 15vw;
    top: 40vh;
    width: 6px;
    height: 60px;
    background: linear-gradient(to top, #8b6914, #e8b830, #f5f0e8);
    border-radius: 50% 50% 20% 20%;
    animation: flameBreath 3s ease-in-out infinite;
    z-index: 1;
    box-shadow: 0 0 20px rgba(232, 184, 48, 0.4), 0 0 60px rgba(232, 184, 48, 0.2);
}

/* === CHAMBER 3 === */
.chamber-3 {
    background: #000000;
}

.massive-word {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(8rem, 18vw, 20rem);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #d4a017;
    position: absolute;
    top: 15vh;
    left: 5vw;
    clip-path: polygon(0% 20%, 100% 0%, 85% 80%, 10% 100%);
    opacity: 0.9;
    z-index: 2;
    animation: flickerShadow 5s cubic-bezier(0.17, 0.67, 0.83, 0.67) infinite;
}

.card-3 {
    position: absolute;
    bottom: 18vh;
    left: 10vw;
    max-width: 450px;
    transform: rotate(2.1deg);
    z-index: 3;
}

/* === CHAMBER 4 === */
.chamber-4 {
    background: linear-gradient(135deg, #2a0e33 0%, #2a0e33 48%, #0f0a1e 52%, #0f0a1e 100%);
}

.central-flame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(232, 184, 48, 0.2) 0%, rgba(212, 160, 23, 0.08) 40%, transparent 70%);
    animation: candlePulse 8s ease-in-out infinite alternate;
    z-index: 1;
}

.card-4a {
    position: absolute;
    top: 25vh;
    left: 10vw;
    max-width: 420px;
    transform: rotate(-1.8deg);
    z-index: 3;
}

.card-4b {
    position: absolute;
    bottom: 25vh;
    right: 15vw;
    max-width: 200px;
    transform: rotate(4.3deg);
    z-index: 2;
    pointer-events: none;
}

.domain-return {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 400;
    font-size: clamp(2rem, 5vw, 4rem);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #f5f0e8;
    position: absolute;
    bottom: 10vh;
    right: 8vw;
    z-index: 3;
    animation: flickerShadow 6s cubic-bezier(0.17, 0.67, 0.83, 0.67) infinite;
}

.upside-down {
    transform: rotate(180deg);
    color: #8b6914;
}

/* === GLASSMORPHIC CARDS === */
.glass-card {
    background: rgba(10, 61, 61, 0.12);
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    border: 1px solid rgba(212, 160, 23, 0.2);
    border-radius: 2px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(245, 240, 232, 0.05);
    padding: 2rem 2.5rem;
    position: relative;
}

.glass-card::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 2px;
    background: #d4a017;
    border-radius: 0 0 50% 50%;
    animation: waxDrip 6s ease-in forwards;
    animation-delay: 2s;
}

.card-broken {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: transparent;
    border: 1px solid rgba(212, 160, 23, 0.4);
}

/* === CANDLE GLOWS === */
.candle-glow {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(232, 184, 48, 0.15) 0%, transparent 70%);
    animation: candlePulse 4s ease-in-out infinite alternate;
    mix-blend-mode: screen;
    pointer-events: none;
    z-index: 1;
}

.glow-1 { width: 400px; height: 400px; top: 10vh; left: 5vw; animation-delay: 0s; }
.glow-2 { width: 300px; height: 300px; bottom: 20vh; right: 10vw; animation-delay: 1.5s; }
.glow-3 { width: 350px; height: 350px; top: 5vh; right: 20vw; animation-delay: 0.5s; }
.glow-4 { width: 250px; height: 250px; bottom: 30vh; left: 5vw; animation-delay: 2s; }
.glow-5 { width: 500px; height: 500px; top: 20vh; right: 30vw; animation-delay: 1s; }
.glow-6 { width: 200px; height: 200px; bottom: 15vh; left: 20vw; animation-delay: 3s; }
.glow-7 { width: 350px; height: 350px; top: 30vh; left: 30vw; animation-delay: 0.8s; }
.glow-8 { width: 280px; height: 280px; bottom: 10vh; right: 25vw; animation-delay: 2.5s; }

/* === TYPOGRAPHY === */
.body-text {
    color: #c9b896;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 300;
    font-size: clamp(0.95rem, 1.8vw, 1.15rem);
    letter-spacing: 0.04em;
    line-height: 1.65;
}

.typewriter-text {
    font-family: 'Special Elite', cursive;
    font-size: clamp(0.85rem, 1.4vw, 1rem);
    letter-spacing: 0.08em;
    color: #8b6914;
    display: inline;
}

.cursor {
    color: #d4a017;
    animation: blink 0.8s step-end infinite;
    font-family: 'Special Elite', cursive;
    font-weight: 400;
}

.cursor.done {
    opacity: 0.3;
    animation: none;
}
