:root {
    --bg-deep-void: #0F0A0C;
    --bg-oxblood: #2D1018;
    --text-primary: #F2E8E0;
    --text-secondary: #9C7B82;
    --accent-iridescent: #C8A2C8;
    --accent-warm: #E8956A;
    --gradient-start: #4A1228;
    --gradient-end: #1A0510;
    --photo-min-black: #1A1018;
    --bubble-highlight: #F0E6FF;
    --cursor-x: 50%;
    --cursor-y: 50%;
    --bg-gradient-position: 50% 50%;
    --transition-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-deep-void);
    color: var(--text-primary);
    font-family: 'Commissioner', sans-serif;
    font-weight: 300;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 2.0;
    letter-spacing: 0.015em;
    overflow-x: hidden;
    position: relative;
}

/* Cursor flashlight effect */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: radial-gradient(circle 200px at var(--cursor-x) var(--cursor-y), rgba(77, 18, 40, 0.08), transparent);
    z-index: 10;
    transition: none;
}

/* ========================
   Progress Indicator
   ======================== */
.progress-indicator {
    position: fixed;
    right: 0;
    top: 0;
    width: 1px;
    height: 0%;
    background: linear-gradient(to bottom, var(--accent-iridescent), var(--gradient-start));
    z-index: 100;
    transition: height 0.1s linear;
}

/* ========================
   Bubble Container
   ======================== */
.bubble-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(
        circle at 30% 30%,
        var(--bubble-highlight) 0%,
        transparent 40%,
        transparent 84%,
        rgba(200, 162, 200, 0.15) 100%
    );
    box-shadow: 0 0 30px 5px rgba(200, 162, 200, 0.08);
    pointer-events: none;
    will-change: transform, opacity;
}

.bubble::before {
    content: '';
    position: absolute;
    top: 12%;
    left: 18%;
    width: 35%;
    height: 28%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(240, 230, 255, 0.3) 0%, transparent 70%);
    transform: rotate(-15deg);
}

.bubble::after {
    content: '';
    position: absolute;
    bottom: 20%;
    right: 15%;
    width: 18%;
    height: 12%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(232, 149, 106, 0.12) 0%, transparent 80%);
}

/* ========================
   Main & Sections
   ======================== */
main {
    position: relative;
    z-index: 3;
}

section {
    min-height: 100vh;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(12, 1fr);
    position: relative;
}

/* ========================
   Section 1: Opening Void
   ======================== */
.opening-void {
    background: radial-gradient(
        ellipse at var(--bg-gradient-position),
        var(--bg-oxblood) 0%,
        var(--bg-deep-void) 60%
    );
}

.domain-name {
    grid-column: 5 / 9;
    grid-row: 6 / 7;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--text-secondary);
    text-align: center;
    align-self: center;
    opacity: 0;
    animation: fadeInDomain 3s var(--transition-ease) forwards;
}

@keyframes fadeInDomain {
    0% {
        opacity: 0;
        filter: blur(4px);
    }
    100% {
        opacity: 1;
        filter: blur(0);
    }
}

/* ========================
   Section 2: First Reveal
   ======================== */
.first-reveal {
    background: var(--bg-deep-void);
    padding: 0;
}

.photo-large {
    grid-column: 2 / 9;
    grid-row: 2 / 10;
    align-self: center;
    overflow: hidden;
}

.photo-placeholder {
    width: 100%;
    height: 100%;
    min-height: 50vh;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-start);
    mix-blend-mode: multiply;
    opacity: 0.12;
}

.photo-wine {
    background:
        radial-gradient(ellipse at 30% 40%, rgba(200, 162, 200, 0.15) 0%, transparent 50%),
        linear-gradient(145deg, var(--gradient-start) 0%, var(--bg-oxblood) 35%, #3D1525 55%, var(--accent-iridescent) 100%);
    filter: saturate(0.75);
}

.photo-texture {
    background:
        radial-gradient(circle at 60% 30%, rgba(240, 230, 255, 0.1) 0%, transparent 40%),
        linear-gradient(220deg, var(--bg-oxblood) 0%, var(--gradient-start) 45%, #5A2838 70%, var(--accent-warm) 100%);
    filter: saturate(0.75);
    aspect-ratio: 2 / 3;
}

.photo-glass {
    background:
        radial-gradient(circle at 40% 25%, rgba(240, 230, 255, 0.18) 0%, transparent 35%),
        linear-gradient(35deg, var(--accent-iridescent) 0%, #3A1828 40%, var(--gradient-end) 65%, var(--bubble-highlight) 100%);
    filter: saturate(0.75);
    aspect-ratio: 1 / 2.5;
}

.photo-translucent {
    background:
        radial-gradient(ellipse at 50% 40%, rgba(200, 162, 200, 0.2) 0%, transparent 45%),
        linear-gradient(160deg, var(--gradient-end) 0%, var(--gradient-start) 30%, var(--accent-iridescent) 60%, var(--bubble-highlight) 85%, var(--gradient-end) 100%);
    filter: saturate(0.75);
    aspect-ratio: 16 / 9;
}

.reveal-phrase {
    grid-column: 2 / 7;
    grid-row: 11 / 12;
    font-weight: 100;
    font-size: clamp(3rem, 8vw, 7rem);
    font-variation-settings: 'wght' 100;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--text-primary);
}

/* ========================
   Section 3 & 6: Breathing Intervals
   ======================== */
.breathing-interval {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(
        to bottom,
        var(--bg-deep-void) 0%,
        var(--gradient-start) 50%,
        var(--bg-deep-void) 100%
    );
}

.iridescent-arc {
    width: 60%;
    height: 20px;
    opacity: 0.6;
}

.breathing-interval-two {
    background: linear-gradient(
        to bottom,
        var(--bg-deep-void) 0%,
        var(--gradient-end) 40%,
        var(--bg-oxblood) 60%,
        var(--bg-deep-void) 100%
    );
}

/* ========================
   Section 4: Text Meditation
   ======================== */
.text-meditation {
    background: radial-gradient(
        ellipse at 30% 70%,
        var(--bg-oxblood) 0%,
        var(--bg-deep-void) 50%
    );
}

.meditation-text {
    grid-column: 2 / 7;
    grid-row: 7 / 11;
    font-weight: 300;
    font-variation-settings: 'wght' 300;
    line-height: 2.2;
    color: var(--text-primary);
    max-width: 680px;
}

.meditation-text .word,
.progressive-text .word,
.second-text .word {
    opacity: 0;
    filter: blur(6px);
    transition: opacity 0.4s var(--transition-ease), filter 0.4s var(--transition-ease);
    display: inline-block;
    margin-right: 0.3em;
}

.meditation-text .word.revealed,
.progressive-text .word.revealed,
.second-text .word.revealed {
    opacity: 1;
    filter: blur(0);
}

.bubble-motif-small {
    grid-column: 10 / 12;
    grid-row: 3 / 5;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(
        circle at 30% 30%,
        var(--bubble-highlight) 0%,
        transparent 40%,
        transparent 84%,
        rgba(200, 162, 200, 0.12) 100%
    );
    box-shadow: 0 0 30px 5px rgba(200, 162, 200, 0.06);
    justify-self: center;
    align-self: center;
    animation: floatBubbleMotif 20s ease-in-out infinite;
}

@keyframes floatBubbleMotif {
    0%, 100% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(5px, -8px);
    }
    50% {
        transform: translate(-3px, -4px);
    }
    75% {
        transform: translate(4px, 3px);
    }
}

/* ========================
   Section 5: Image Pair
   ======================== */
.image-pair {
    background: var(--bg-deep-void);
}

.photo-large-pair {
    grid-column: 2 / 8;
    grid-row: 2 / 10;
    z-index: 1;
    overflow: hidden;
}

.photo-small-pair {
    grid-column: 7 / 10;
    grid-row: 4 / 11;
    z-index: 2;
    overflow: hidden;
}

/* ========================
   Section 7: Progressive Zone
   ======================== */
.progressive-zone {
    background: radial-gradient(
        ellipse at 70% 40%,
        var(--gradient-start) 0%,
        var(--bg-deep-void) 55%
    );
}

.progressive-text {
    grid-column: 3 / 10;
    grid-row: 4 / 9;
    font-weight: 100;
    font-variation-settings: 'wght' 100;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    line-height: 1.8;
    color: var(--text-primary);
    max-width: 680px;
}

/* ========================
   Section 8: Interstitial Zone
   ======================== */
.interstitial-zone {
    background: radial-gradient(
        ellipse at 60% 50%,
        var(--bg-oxblood) 0%,
        var(--bg-deep-void) 55%
    );
}

.interstitial-photo {
    grid-column: 4 / 11;
    grid-row: 2 / 9;
    overflow: hidden;
}

.interstitial-label {
    grid-column: 4 / 7;
    grid-row: 10 / 11;
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    align-self: center;
}

/* ========================
   Section 9: Second Text Zone
   ======================== */
.second-text-zone {
    background: radial-gradient(
        ellipse at 25% 55%,
        var(--gradient-start) 0%,
        var(--bg-deep-void) 50%
    );
}

.second-text {
    grid-column: 6 / 12;
    grid-row: 5 / 10;
    font-weight: 300;
    font-variation-settings: 'wght' 300;
    line-height: 2.2;
    color: var(--text-primary);
    max-width: 680px;
}

/* ========================
   Section 10: Closing Void
   ======================== */
.closing-void {
    background: radial-gradient(
        ellipse at var(--bg-gradient-position),
        var(--bg-oxblood) 0%,
        var(--bg-deep-void) 60%
    );
}

.domain-name-close {
    font-size: clamp(1rem, 2vw, 1.5rem);
    opacity: 0;
    animation: none;
}

.closing-void.visible .domain-name-close {
    animation: fadeInDomain 2s var(--transition-ease) 0.5s forwards;
}

.label-accent {
    grid-column: 5 / 9;
    grid-row: 7 / 8;
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--text-secondary);
    text-align: center;
    align-self: start;
}

/* ========================
   Reveal Animations
   ======================== */
[data-reveal] {
    opacity: 0;
    filter: blur(6px);
    transform: translateY(20px);
    transition:
        opacity 1.2s var(--transition-ease),
        filter 1.2s var(--transition-ease),
        transform 1.2s var(--transition-ease);
}

[data-reveal].visible {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

/* ========================
   Numerals
   ======================== */
.tabular-nums {
    font-variant-numeric: tabular-nums;
    font-weight: 200;
}

/* ========================
   Responsive
   ======================== */
@media (max-width: 768px) {
    .photo-large {
        grid-column: 1 / 11;
        grid-row: 2 / 8;
    }

    .reveal-phrase {
        grid-column: 1 / 12;
        grid-row: 9 / 11;
        padding: 0 1rem;
    }

    .meditation-text {
        grid-column: 1 / 12;
        grid-row: 5 / 11;
        padding: 0 1rem;
    }

    .bubble-motif-small {
        display: none;
    }

    .photo-large-pair {
        grid-column: 1 / 10;
        grid-row: 2 / 7;
    }

    .photo-small-pair {
        grid-column: 5 / 12;
        grid-row: 6 / 11;
    }

    .progressive-text {
        grid-column: 1 / 12;
        grid-row: 3 / 10;
        padding: 0 1rem;
    }

    .interstitial-photo {
        grid-column: 1 / 12;
        grid-row: 2 / 8;
    }

    .interstitial-label {
        grid-column: 1 / 8;
        grid-row: 9 / 10;
        padding: 0 1rem;
    }

    .second-text {
        grid-column: 1 / 12;
        grid-row: 4 / 10;
        padding: 0 1rem;
    }

    .domain-name,
    .domain-name-close {
        grid-column: 2 / 12;
    }

    .label-accent {
        grid-column: 2 / 12;
    }
}

@media (max-width: 480px) {
    .reveal-phrase {
        font-size: clamp(2rem, 10vw, 3rem);
    }

    .progressive-text {
        font-size: clamp(1.2rem, 5vw, 1.8rem);
    }
}
