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

html {
    scroll-behavior: smooth;
}

body {
    background: #FFF5EB;
    color: #2A1215;
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 2.2vw, 1.25rem);
    line-height: 1.85;
    letter-spacing: 0.01em;
    overflow-x: hidden;
}

/* === SECTIONS === */
.section {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* === HERO === */
.hero {
    background: #FFF5EB;
}

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

.domain-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(3rem, 8vw, 6rem);
    letter-spacing: 0.2em;
    color: #7A1B3D;
    text-transform: lowercase;
    margin-bottom: 1rem;
}

.domain-subtitle {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    color: #2A1215;
    opacity: 0.6;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
}

/* === SCROLL CHEVRON === */
.scroll-chevron {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 24px;
    border-right: 2px solid #D4A0A0;
    border-bottom: 2px solid #D4A0A0;
    transform: translateX(-50%) rotate(45deg);
    animation: chevronPulse 2s cubic-bezier(0.25, 0.1, 0.25, 1.0) infinite;
    z-index: 2;
}

@keyframes chevronPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

/* === MEMBRANES === */
.membrane {
    background: linear-gradient(180deg, #FFF5EB 0%, #3D0A1E 100%);
    min-height: 100vh;
}

.membrane-bridge {
    background: linear-gradient(180deg, #3D0A1E 0%, #FFF5EB 100%);
}

.layer-label {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: clamp(2.8rem, 7vw, 6rem);
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #FFF5EB;
    margin-top: 2rem;
    z-index: 2;
    position: relative;
}

.membrane-bridge .layer-label {
    font-weight: 300;
}

/* === 3D SPHERES === */
.sphere {
    width: clamp(120px, 25vw, 200px);
    height: clamp(120px, 25vw, 200px);
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 30%, rgba(255,245,235,0.9) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, #7A1B3D 0%, #3D0A1E 70%, transparent 100%);
    box-shadow: 0 20px 60px rgba(61,10,30,0.4), inset 0 -10px 30px rgba(61,10,30,0.3);
    animation: rotateY 20s linear infinite;
    z-index: 2;
    position: relative;
    flex-shrink: 0;
}

.sphere-bridge {
    width: clamp(140px, 28vw, 240px);
    height: clamp(140px, 28vw, 240px);
    background:
        radial-gradient(circle at 35% 30%, rgba(242,226,196,0.95) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, #7A1B3D 0%, #3D0A1E 70%, transparent 100%);
}

@keyframes rotateY {
    0% { transform: perspective(600px) rotateY(0deg); }
    100% { transform: perspective(600px) rotateY(360deg); }
}

/* === DARK LAYER (Layer 1 / Terminal) === */
.layer-dark {
    background: #3D0A1E;
    color: #FFF5EB;
    padding: 10vh 5vw;
    justify-content: flex-start;
    padding-top: 15vh;
}

.layer-dark .breath-block p {
    color: #FFF5EB;
}

/* === LIGHT LAYER (Layer 2) === */
.layer-light {
    background: #FFF5EB;
    color: #2A1215;
    padding: 10vh 5vw;
    justify-content: flex-start;
    padding-top: 15vh;
}

.section-heading {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #7A1B3D;
    margin-bottom: 1rem;
}

.layer-dark .section-heading {
    color: #F2E2C4;
}

/* === BREATH BLOCKS === */
.breath-block {
    max-width: 58ch;
    margin: 0 auto 8vh auto;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.1, 0.25, 1.0),
                transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    z-index: 2;
}

.breath-block.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === TECH TERMS === */
.tech-term {
    font-family: 'Inconsolata', monospace;
    font-weight: 400;
    font-size: 0.9em;
    background: rgba(128,30,50,0.08);
    padding: 0.1em 0.4em;
    border-radius: 3px;
}

.layer-dark .tech-term {
    background: rgba(255,245,235,0.12);
}

/* === MACRO BUBBLES === */
.macro-bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, #FFF5EB 0%, rgba(122,27,61,0.15) 100%);
    backdrop-filter: blur(2px);
    z-index: 1;
    animation: rise 35s linear infinite, sway 8s ease-in-out infinite;
    pointer-events: none;
}

.hero-macro-bubble {
    width: 60px;
    height: 60px;
    left: calc(50% - 30px);
    bottom: 20%;
    animation-duration: 30s, 7s;
}

.layer1-macro-1 {
    width: 40px;
    height: 40px;
    right: 15%;
    top: 25%;
    animation-duration: 40s, 9s;
}

.layer1-macro-2 {
    width: 55px;
    height: 55px;
    left: 10%;
    top: 55%;
    animation-duration: 35s, 6s;
}

.layer2-macro-1 {
    width: 50px;
    height: 50px;
    right: 12%;
    top: 10%;
    animation-duration: 32s, 8s;
}

.layer2-macro-2 {
    width: 35px;
    height: 35px;
    left: 8%;
    top: 20%;
    animation-duration: 45s, 10s;
}

.layer2-macro-3 {
    width: 65px;
    height: 65px;
    right: 8%;
    top: 42%;
    animation-duration: 38s, 7s;
}

.layer2-macro-4 {
    width: 28px;
    height: 28px;
    left: 15%;
    top: 65%;
    animation-duration: 42s, 9s;
}

.layer2-macro-5 {
    width: 48px;
    height: 48px;
    right: 18%;
    top: 78%;
    animation-duration: 36s, 6s;
}

@keyframes rise {
    0% { transform: translateY(0); }
    100% { transform: translateY(-120vh); }
}

@keyframes sway {
    0%, 100% { margin-left: 0; }
    50% { margin-left: 12px; }
}

/* === MICRO BUBBLES === */
.micro-bubble {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(212,160,160,0.3);
    background: none;
    pointer-events: none;
    z-index: 1;
}

/* === BUBBLE CONTAINERS === */
.bubble-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

/* === RAKED SAND === */
.raked-sand {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.raked-sand::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 3px,
        rgba(42,18,21,0.04) 3px,
        rgba(42,18,21,0.04) 4px
    );
}

/* === CONCENTRIC RIPPLES === */
.ripple-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(122,27,61,0.15);
    pointer-events: none;
    animation: rippleExpand 1.2s ease-out forwards;
    z-index: 0;
}

@keyframes rippleExpand {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        width: 200px;
        height: 200px;
        opacity: 0;
    }
}

/* === TERMINAL POOL === */
.terminal-pool {
    justify-content: flex-end;
    padding-bottom: 10vh;
    min-height: 100vh;
}

.terminal-watermark {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: rgba(255,245,235,0.25);
    text-align: center;
    z-index: 2;
    position: relative;
}

/* === TERMINAL MACRO BUBBLES (generated in JS) === */
.terminal-macro {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, #FFF5EB 0%, rgba(122,27,61,0.15) 100%);
    pointer-events: none;
    z-index: 1;
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
    .breath-block {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .sphere {
        animation: none;
    }
    .macro-bubble,
    .micro-bubble,
    .terminal-macro {
        animation: none;
    }
    .scroll-chevron {
        animation: none;
        opacity: 0.5;
    }
}
