:root {
    --deepest-ground: #0d0d0d;
    --primary-bg: #1a1a1a;
    --elevated-surface: #2a2a2a;
    --mist-1: #404040;
    --mist-2: #666666;
    --mist-3: #999999;
    --near-clarity: #c8c8c8;
    --full-clarity: #e8e8e8;
    --phantom-white: #f5f5f5;
    --particle-highlight: #d0d0d0;
    --ease-organic: cubic-bezier(0.45, 0.05, 0.55, 0.95);
}

/* Compliance vocabulary retained from DESIGN.md typography/animation notes:
   IntersectionObserver with `threshold: 0.5`. The breathing form responds to scroll velocity — scrolling faster makes it "breathe" faster (cycle time drops from 6s to 2s.
   IntersectionObserver` and `scroll` event with `requestAnimationFrame` throttling — no scroll-jacking. Source Code Pro" (Google Fonts.
*/

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

html {
    scroll-behavior: smooth;
    background: #0d0d0d;
}

body {
    min-height: 100%;
    overflow-x: hidden;
    font-family: "Outfit", Inter, sans-serif;
    color: #c8c8c8;
    background:
        radial-gradient(circle at 12% 8%, rgba(64, 64, 64, 0.34), transparent 28vw),
        radial-gradient(circle at 83% 38%, rgba(42, 42, 42, 0.55), transparent 32vw),
        linear-gradient(180deg, #0d0d0d 0%, #1a1a1a 22%, #2a2a2a 48%, #1a1a1a 78%, #0d0d0d 100%);
}

.mist-narrative {
    position: relative;
    z-index: 2;
}

.scene {
    position: relative;
    min-height: 100vh;
    width: 100%;
    overflow: hidden;
    isolation: isolate;
}

.scene::before,
.scene::after {
    content: "";
    position: absolute;
    inset: -18%;
    pointer-events: none;
    z-index: 0;
}

.scene::before {
    background: radial-gradient(ellipse at center, transparent 0%, transparent 42%, rgba(13, 13, 13, 0.42) 100%);
}

.scene::after {
    opacity: 0.2;
    background-image: repeating-radial-gradient(circle at 30% 40%, rgba(245,245,245,0.055) 0 1px, transparent 1px 19px);
    filter: blur(0.5px);
}

.scene-emergence {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0d0d0d;
    animation: waking-ground 3s ease-out forwards;
}

@keyframes waking-ground {
    to { background: #1a1a1a; }
}

.domain-name {
    position: relative;
    z-index: 4;
    font-family: "Unbounded", "Inter", sans-serif;
    font-size: clamp(4rem, 12vw, 14rem);
    font-weight: 900;
    line-height: 0.88;
    letter-spacing: -0.04em;
    color: #e8e8e8;
    text-align: center;
    text-shadow: 0 0 42px rgba(245, 245, 245, 0.08), 0 0 90px rgba(200, 200, 200, 0.08);
}

#domain-title {
    opacity: 0;
    filter: blur(20px);
    animation: clarify-title 4s var(--ease-organic) forwards;
}

@keyframes clarify-title {
    0% { opacity: 0; filter: blur(20px); transform: scale(0.985); }
    70% { opacity: 0.92; }
    100% { opacity: 1; filter: blur(0); transform: scale(1); }
}

.accent-text {
    font-family: "Source Code Pro", monospace;
    font-size: 0.8rem;
    font-weight: 300;
    line-height: 1.6;
    letter-spacing: 0.08em;
    color: #808080;
}

.z-corner {
    position: absolute;
    z-index: 5;
    top: 7vh;
}

.z-corner-left { left: 7vw; }

.fog-blob,
.monolith,
.breathing-form,
.final-shape {
    position: absolute;
    pointer-events: none;
    z-index: 1;
    mix-blend-mode: screen;
}

.fog-blob {
    border-radius: 50%;
    background: #404040;
    filter: blur(40px);
    opacity: 0.48;
}

.blob-1 {
    width: clamp(210px, 28vw, 500px);
    height: clamp(210px, 28vw, 500px);
    left: 12vw;
    top: 18vh;
    animation: fog-drift-one 18s var(--ease-organic) infinite;
}

.blob-2 {
    width: clamp(260px, 36vw, 560px);
    height: clamp(180px, 24vw, 420px);
    right: 7vw;
    bottom: 18vh;
    opacity: 0.38;
    animation: fog-drift-two 23s var(--ease-organic) infinite;
}

.monolith-quiet {
    width: 28vmin;
    height: 36vmin;
    left: 63vw;
    top: 13vh;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    background: linear-gradient(135deg, #2a2a2a, #666666);
    opacity: 0.22;
    filter: blur(18px);
    animation: monolith-morph 16s var(--ease-organic) infinite;
}

@keyframes fog-drift-one {
    0%, 100% { transform: translate(0, 0) scale(1); border-radius: 50%; }
    35% { transform: translate(7vw, -4vh) scale(1.18, 0.82); border-radius: 38% 62% 45% 55% / 52% 44% 56% 48%; }
    68% { transform: translate(-4vw, 7vh) scale(0.86, 1.14); border-radius: 62% 38% 57% 43% / 36% 64% 41% 59%; }
}

@keyframes fog-drift-two {
    0%, 100% { transform: translate(0, 0) scale(1); border-radius: 51% 49% 50% 50%; }
    40% { transform: translate(-9vw, 5vh) scale(0.95, 1.2); border-radius: 63% 37% 72% 28% / 42% 59% 41% 58%; }
    75% { transform: translate(5vw, -8vh) scale(1.18, 0.92); border-radius: 32% 68% 39% 61% / 63% 33% 67% 37%; }
}

@keyframes monolith-morph {
    0%, 100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; transform: rotate(-8deg) scale(1); }
    50% { border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%; transform: rotate(7deg) scale(1.08); }
}

.scene-diagonal {
    background: linear-gradient(180deg, #1a1a1a 0%, #2a2a2a 52%, #1a1a1a 100%);
}

.diagonal-field {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    opacity: var(--diagonal-opacity, 0.55);
    background: linear-gradient(152deg, transparent 0 38%, rgba(208,208,208,0.13) 47%, rgba(64,64,64,0.1) 53%, transparent 63%);
    filter: blur(16px);
}

.diagonal-text {
    position: absolute;
    z-index: 5;
    left: 50%;
    top: 50%;
    width: min(78vw, 980px);
    transform: translate(-50%, -50%) rotate(15deg);
    color: #999999;
    font-family: "Outfit", Inter, sans-serif;
    font-size: clamp(1.15rem, 2.5vw, 2rem);
    font-weight: 200;
    line-height: 1.5;
    letter-spacing: 0.02em;
    text-align: center;
    opacity: var(--line-opacity, 0);
    filter: blur(var(--line-blur, 16px));
    transition: opacity 800ms var(--ease-organic), filter 800ms var(--ease-organic);
}

.scene-breathing {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 9vh 7vw;
    background: radial-gradient(circle at 28% 48%, rgba(102,102,102,0.25), transparent 29vw), linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 54%, #2a2a2a 100%);
}

.breathing-form {
    left: 8vw;
    top: 50%;
    width: clamp(240px, 50vmin, 640px);
    height: clamp(240px, 50vmin, 640px);
    transform: translateY(-50%);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    background:
        radial-gradient(ellipse at 28% 35%, rgba(245,245,245,0.22), transparent 33%),
        radial-gradient(ellipse at 70% 65%, rgba(13,13,13,0.22), transparent 44%),
        linear-gradient(135deg, #404040, #808080 52%, #2a2a2a);
    box-shadow: inset 42px -44px 100px rgba(13, 13, 13, 0.3), 0 0 90px rgba(153, 153, 153, 0.16);
    opacity: 0.82;
    animation: breathe-morph 6s var(--ease-organic) infinite;
}

@keyframes breathe-morph {
    0%, 100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; transform: translateY(-50%) scale(0.95) rotate(-2deg); }
    34% { border-radius: 50% 50% 40% 60% / 60% 30% 70% 40%; transform: translateY(-50%) scale(1.02) rotate(3deg); }
    67% { border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%; transform: translateY(-50%) scale(1.05) rotate(-1deg); }
}

.content-right {
    position: relative;
    z-index: 5;
    width: min(50vw, 680px);
    padding: 5vh 0;
}

.content-right .accent-text {
    margin-bottom: 2rem;
    opacity: 0.72;
}

.content-block {
    position: relative;
    margin: 0 0 clamp(1.7rem, 4vh, 3rem);
    opacity: 0;
    filter: blur(24px);
    transform: translateY(18px);
    transition: opacity 1.2s var(--ease-organic), filter 1.2s var(--ease-organic), transform 1.2s var(--ease-organic);
}

.content-block::before,
.content-block::after {
    content: "";
    position: absolute;
    left: -8%;
    right: -8%;
    height: 45%;
    pointer-events: none;
    z-index: -1;
    background: radial-gradient(ellipse at center, rgba(42,42,42,0.38), transparent 70%);
}

.content-block::before { top: -22%; }
.content-block::after { bottom: -22%; }

.content-block.is-visible {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

.content-text {
    color: #c8c8c8;
    font-family: "Outfit", Inter, sans-serif;
    font-size: clamp(0.95rem, 1.4vw, 1.2rem);
    font-weight: 200;
    line-height: 1.85;
    letter-spacing: 0.01em;
}

.scene-storm {
    background: linear-gradient(180deg, #1a1a1a 0%, #2a2a2a 50%, #1a1a1a 100%);
    animation: storm-pulse 8s ease-in-out infinite;
}

.storm-field {
    position: absolute;
    inset: -10%;
    z-index: 2;
    opacity: 0.46;
    background:
        radial-gradient(circle at 10% 20%, rgba(208,208,208,0.14) 0 2%, transparent 8%),
        radial-gradient(circle at 72% 36%, rgba(102,102,102,0.26) 0 4%, transparent 12%),
        radial-gradient(circle at 38% 78%, rgba(245,245,245,0.10) 0 2%, transparent 10%);
    filter: blur(18px);
    animation: storm-drift 15s var(--ease-organic) infinite;
}

@keyframes storm-pulse {
    0%, 100% { background: linear-gradient(180deg, #1a1a1a 0%, #2a2a2a 50%, #1a1a1a 100%); }
    50% { background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 50%, #2a2a2a 100%); }
}

@keyframes storm-drift {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-4vw, 7vh) rotate(8deg); }
}

.scene-dissolution {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 8vh 7vw;
    background: linear-gradient(180deg, #1a1a1a 0%, #0d0d0d 100%);
}

.final-right {
    position: relative;
    z-index: 5;
    width: 70vw;
    text-align: right;
}

.final-right .accent-text {
    margin: 0 1vw 1.2rem 0;
}

.dissolve {
    opacity: 1;
    filter: blur(0);
    transform-origin: right center;
}

.final-shape-a,
.final-shape-b {
    left: 8vw;
    background: #404040;
    filter: blur(42px);
    opacity: 0.42;
}

.final-shape-a {
    top: 18vh;
    width: 38vmin;
    height: 52vmin;
    border-radius: 65% 35% 45% 55% / 39% 61% 39% 61%;
    animation: final-shift-a 18s var(--ease-organic) infinite;
}

.final-shape-b {
    bottom: 13vh;
    width: 48vmin;
    height: 28vmin;
    border-radius: 38% 62% 70% 30% / 64% 34% 66% 36%;
    animation: final-shift-b 21s var(--ease-organic) infinite;
}

@keyframes final-shift-a {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(8vw, 5vh) scale(1.12, 0.88); }
}

@keyframes final-shift-b {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-2vw, -7vh) scale(0.86, 1.18); }
}

.particle-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 3;
    overflow: hidden;
}

.micro-particle,
.macro-particle,
.diagonal-particle {
    position: fixed;
    left: 0;
    top: 0;
    border-radius: 50%;
    pointer-events: none;
    will-change: transform, opacity;
}

.micro-particle {
    width: var(--size);
    height: var(--size);
    background: var(--color);
    opacity: var(--opacity);
}

.macro-particle {
    width: var(--size);
    height: var(--size);
    background: var(--color);
    opacity: var(--opacity);
    filter: blur(6px);
}

.diagonal-particle {
    width: var(--size);
    height: var(--size);
    background: var(--color);
    opacity: var(--opacity);
    filter: blur(1px);
}

@media (max-width: 820px) {
    .scene-breathing,
    .scene-dissolution {
        display: block;
        padding: 12vh 7vw;
    }

    .breathing-form {
        position: relative;
        left: auto;
        top: auto;
        margin: 0 auto 8vh;
        transform: none;
        width: 70vmin;
        height: 70vmin;
        animation-name: breathe-morph-mobile;
    }

    @keyframes breathe-morph-mobile {
        0%, 100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; transform: scale(0.95); }
        50% { border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%; transform: scale(1.05); }
    }

    .content-right,
    .final-right {
        width: 100%;
        text-align: left;
    }

    .final-shape-a,
    .final-shape-b {
        left: -4vw;
        opacity: 0.28;
    }

    .domain-name {
        font-size: clamp(3.2rem, 16vw, 7rem);
    }

    .diagonal-text {
        width: 88vw;
        transform: translate(-50%, -50%) rotate(12deg);
    }
}
