/* ============================================
   rational.monster — Aurora Over Concrete
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background: #0d0b1e;
    color: #e8e6e3;
    font-family: 'Playfair Display', Georgia, serif;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- Grid Layer (Tunnel Tiles) --- */
.grid-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(to right, rgba(0, 194, 209, 0.08) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 194, 209, 0.08) 1px, transparent 1px);
    background-size: 48px 48px;
    will-change: transform;
}

/* --- Scattered Logic Symbols --- */
.symbol-scatter {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.logic-symbol {
    position: absolute;
    font-family: 'Space Grotesk', sans-serif;
    color: #00c2d1;
    opacity: 0.06;
    animation: symbolFloat 8s ease-in-out infinite;
    user-select: none;
}

@keyframes symbolFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(3deg); }
}

/* --- Zones (Common) --- */
.zone {
    position: relative;
    z-index: 2;
    overflow: hidden;
}

/* --- Aurora Wash Layers --- */
.aurora-wash {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.aurora-wash-1 {
    background: radial-gradient(ellipse at 80% 10%, rgba(0, 229, 160, 0.12) 0%, transparent 50%),
                radial-gradient(ellipse at 60% 30%, rgba(123, 47, 247, 0.08) 0%, transparent 40%),
                radial-gradient(ellipse at 90% 50%, rgba(0, 194, 209, 0.06) 0%, transparent 45%);
    animation: auroraDrift1 18s ease-in-out infinite;
}

.aurora-wash-2 {
    background: radial-gradient(ellipse at 20% 40%, rgba(123, 47, 247, 0.1) 0%, transparent 50%),
                radial-gradient(ellipse at 10% 70%, rgba(0, 229, 160, 0.08) 0%, transparent 40%),
                radial-gradient(ellipse at 40% 20%, rgba(0, 194, 209, 0.06) 0%, transparent 45%);
    animation: auroraDrift2 20s ease-in-out infinite;
}

.aurora-wash-3 {
    background: linear-gradient(135deg, rgba(0, 229, 160, 0.1) 0%, rgba(123, 47, 247, 0.08) 50%, rgba(0, 194, 209, 0.1) 100%);
    animation: auroraDrift3 15s ease-in-out infinite;
}

.aurora-wash-4 {
    background: radial-gradient(ellipse at 85% 50%, rgba(123, 47, 247, 0.15) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 30%, rgba(0, 229, 160, 0.1) 0%, transparent 40%),
                radial-gradient(ellipse at 95% 70%, rgba(0, 194, 209, 0.08) 0%, transparent 45%);
    animation: auroraDrift4 17s ease-in-out infinite;
}

.aurora-wash-5 {
    background: radial-gradient(ellipse at 50% 50%, rgba(123, 47, 247, 0.04) 0%, transparent 60%);
    animation: auroraDrift5 22s ease-in-out infinite;
}

@keyframes auroraDrift1 {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-5%); }
}

@keyframes auroraDrift2 {
    0%, 100% { transform: translateX(0) translateY(0); }
    50% { transform: translateX(5%) translateY(-2%); }
}

@keyframes auroraDrift3 {
    0%, 100% { transform: translateX(0); opacity: 1; }
    50% { transform: translateX(3%); opacity: 0.8; }
}

@keyframes auroraDrift4 {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-8%); }
}

@keyframes auroraDrift5 {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.6; }
}

/* ============================================
   ZONE 1 — THE ENTRANCE
   ============================================ */
.zone-entrance {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 12vw;
}

.zone-entrance-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    position: relative;
    font-family: 'Permanent Marker', cursive;
    line-height: 1.05;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
}

.hero-line {
    display: block;
    font-size: clamp(3rem, 10vw, 8rem);
    font-weight: 400;
}

.hero-line-1 {
    color: #00e5a0;
    transform: rotate(-2deg);
    transform-origin: left center;
}

.hero-line-2 {
    color: #7b2ff7;
    transform: rotate(-1deg);
    transform-origin: left center;
    margin-top: -0.1em;
}

/* Drip pseudo-elements */
.drip {
    position: absolute;
    width: 2px;
    border-radius: 0 0 50% 50%;
    opacity: 0;
}

.drip-1 {
    background: #00e5a0;
    left: 18%;
    top: 45%;
    height: 0;
}

.drip-2 {
    background: #00e5a0;
    left: 52%;
    top: 42%;
    height: 0;
}

.drip-3 {
    background: #7b2ff7;
    left: 30%;
    top: 90%;
    height: 0;
}

.drip-4 {
    background: #7b2ff7;
    left: 70%;
    top: 88%;
    height: 0;
}

.drip.animate {
    opacity: 1;
    animation: dripGrow 600ms cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.drip-1.animate { animation-delay: 400ms; --drip-height: 35px; }
.drip-2.animate { animation-delay: 550ms; --drip-height: 22px; }
.drip-3.animate { animation-delay: 500ms; --drip-height: 45px; }
.drip-4.animate { animation-delay: 650ms; --drip-height: 30px; }

@keyframes dripGrow {
    0% { height: 0; opacity: 1; }
    100% { height: var(--drip-height, 30px); opacity: 1; }
}

.hero-subtitle {
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: #8a87a3;
    margin-top: 1.5rem;
    letter-spacing: 0.01em;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease 0.8s, transform 1s ease 0.8s;
}

.hero-subtitle.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   ZONE 2 — THE GALLERY WALL
   ============================================ */
.zone-gallery {
    min-height: 150vh;
    padding-top: 10vh;
    padding-bottom: 10vh;
    display: flex;
    flex-direction: column;
    gap: 12vh;
}

.gallery-block {
    position: relative;
    max-width: 380px;
    opacity: 0;
    transform: translateY(60px) scale(0.95);
    transition: opacity 800ms cubic-bezier(0.68, -0.55, 0.265, 1.55),
                transform 800ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 2;
}

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

.gallery-block-inner {
    background: #1a163299;
    border: 2px solid #00c2d1;
    padding: 2rem 2rem 2.5rem;
    position: relative;
}

.gallery-heading {
    font-family: 'Permanent Marker', cursive;
    font-weight: 400;
    font-size: clamp(2rem, 5vw, 3.5rem);
    letter-spacing: -0.02em;
    text-transform: uppercase;
    line-height: 1.1;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.heading-green {
    color: #00e5a0;
}

.heading-violet {
    color: #7b2ff7;
}

/* Gallery drips */
.gallery-heading .drip {
    position: absolute;
    width: 2px;
    border-radius: 0 0 50% 50%;
    bottom: -5px;
    opacity: 0;
}

.drip-g1 { background: #00e5a0; left: 15%; height: 0; }
.drip-g2 { background: #00e5a0; left: 65%; height: 0; }
.drip-g3 { background: #7b2ff7; left: 25%; height: 0; }
.drip-g4 { background: #7b2ff7; left: 80%; height: 0; }
.drip-g5 { background: #00e5a0; left: 35%; height: 0; }
.drip-g6 { background: #00e5a0; left: 85%; height: 0; }
.drip-g7 { background: #7b2ff7; left: 45%; height: 0; }

.gallery-block.visible .drip {
    opacity: 1;
    animation: dripGrow 600ms cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    animation-delay: 400ms;
}

.gallery-block.visible .drip-g1 { --drip-height: 20px; animation-delay: 450ms; }
.gallery-block.visible .drip-g2 { --drip-height: 32px; animation-delay: 600ms; }
.gallery-block.visible .drip-g3 { --drip-height: 28px; animation-delay: 500ms; }
.gallery-block.visible .drip-g4 { --drip-height: 18px; animation-delay: 650ms; }
.gallery-block.visible .drip-g5 { --drip-height: 25px; animation-delay: 480ms; }
.gallery-block.visible .drip-g6 { --drip-height: 38px; animation-delay: 620ms; }
.gallery-block.visible .drip-g7 { --drip-height: 30px; animation-delay: 550ms; }

.gallery-text {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1rem, 2vw, 1.3rem);
    line-height: 1.7;
    letter-spacing: 0.01em;
    color: #e8e6e3;
}

.gallery-motif {
    position: absolute;
    bottom: -20px;
    right: -15px;
    width: 50px;
    height: 50px;
    opacity: 0.6;
}

/* Splatter clusters */
.splatter-cluster {
    position: absolute;
    top: -10px;
    left: 20px;
    z-index: 3;
}

.splatter {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 229, 160, 0.2) 30%, transparent 70%);
}

.splatter-violet {
    background: radial-gradient(circle, rgba(123, 47, 247, 0.2) 30%, transparent 70%);
}

/* Monster illustration */
.monster-illustration {
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 800ms cubic-bezier(0.68, -0.55, 0.265, 1.55),
                transform 800ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.monster-illustration.visible {
    opacity: 1;
    transform: translateY(0);
}

.monster-1 {
    margin-left: 60vw;
    margin-top: -8vh;
}

.monster-svg {
    width: 100px;
    height: 125px;
}

/* Monster eye glow */
.monster-svg circle[fill="#ff2e97"],
.exit-monster-svg circle[fill="#ff2e97"] {
    filter: drop-shadow(0 0 6px #ff2e97);
}


/* ============================================
   ZONE 3 — THE PROOF
   ============================================ */
.zone-proof {
    min-height: 120vh;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-type: y proximity;
    background-image:
        linear-gradient(to right, rgba(0, 194, 209, 0.12) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 194, 209, 0.12) 1px, transparent 1px);
    background-size: 24px 24px;
}

.proof-tree {
    position: relative;
    z-index: 2;
    width: 90%;
    max-width: 800px;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 1000ms ease, transform 1000ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.proof-tree.visible {
    opacity: 1;
    transform: scale(1);
}

.proof-svg {
    width: 100%;
    height: auto;
}

.proof-node-text {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 20px;
    fill: #e8e6e3;
    fill-opacity: 0.9;
}

.proof-conclusion {
    font-size: 24px;
    font-weight: 700;
    fill: #00e5a0;
}

.proof-top {
    font-size: 22px;
    font-weight: 700;
    fill: #00e5a0;
}

.proof-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12px;
    fill: #00c2d1;
    fill-opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.proof-label-deco {
    font-size: 14px;
}

.proof-line {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 1200ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.proof-tree.visible .proof-line {
    stroke-dashoffset: 0;
}

.proof-tree.visible .proof-bar {
    transition-delay: 200ms;
}

/* ============================================
   ZONE 4 — THE MANIFESTO
   ============================================ */
.zone-manifesto {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-left: 15vw;
    padding-right: 10vw;
}

.manifesto-content {
    position: relative;
    z-index: 2;
    max-width: 55ch;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 1200ms ease, transform 1200ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.manifesto-content.visible {
    opacity: 1;
    transform: translateX(0);
}

.manifesto-text {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    line-height: 1.75;
    letter-spacing: 0.01em;
    color: #e8e6e3;
    margin-bottom: 2em;
}

.manifesto-text:last-child {
    margin-bottom: 0;
}

.manifesto-text em {
    font-style: italic;
    color: #00e5a0;
}

/* ============================================
   ZONE 5 — THE EXIT
   ============================================ */
.zone-exit {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-image:
        linear-gradient(to right, rgba(0, 194, 209, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 194, 209, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
}

.exit-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
}

.exit-title {
    font-family: 'Permanent Marker', cursive;
    font-weight: 400;
    font-size: clamp(1.5rem, 4vw, 3rem);
    letter-spacing: -0.02em;
    text-transform: lowercase;
    color: #8a87a3;
    opacity: 0.5;
    margin-bottom: 4rem;
}

.exit-monster {
    position: absolute;
    bottom: 5vh;
    right: 10vw;
    opacity: 0;
    transition: opacity 1500ms ease;
}

.exit-monster.visible {
    opacity: 1;
}

.exit-monster-svg {
    width: 160px;
    height: 200px;
}

.exit-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 2000ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.exit-monster.visible .exit-path {
    stroke-dashoffset: 0;
}

.exit-eye {
    opacity: 0;
    transition: opacity 800ms ease 1200ms;
}

.exit-monster.visible .exit-eye {
    opacity: 1;
}

.exit-symbol {
    opacity: 0;
    transition: opacity 600ms ease 1600ms;
}

.exit-monster.visible .exit-symbol {
    opacity: 0.7;
}

.exit-spray {
    opacity: 0;
    transition: opacity 400ms ease 1800ms;
}

.exit-monster.visible .exit-spray {
    opacity: 0.5;
}

/* ============================================
   RESPONSIVE — Below 768px
   ============================================ */
@media (max-width: 768px) {
    .zone-entrance {
        padding-left: 8vw;
    }

    .zone-gallery {
        gap: 8vh;
    }

    .gallery-block {
        margin-left: 8vw !important;
        max-width: calc(100% - 16vw);
    }

    .monster-1 {
        margin-left: 8vw;
    }

    .zone-manifesto {
        padding-left: 8vw;
        padding-right: 8vw;
    }

    .exit-monster {
        right: 5vw;
        bottom: 3vh;
    }

    .exit-monster-svg {
        width: 120px;
        height: 150px;
    }

    .grid-layer {
        background-size: 64px 64px;
    }

    .zone-proof {
        background-size: 32px 32px;
    }
}
