/* ============================================
   mujun.art - Contradiction as Art
   Memphis Design x Raw Authentic
   ============================================ */

:root {
    --concrete-night: #1E1E24;
    --graphite-fog: #2C2C34;
    --slate-glass: #38383F;
    --ash-white: #E8E4E0;
    --stone-gray: #9E9A96;
    --living-coral: #E8625C;
    --memphis-teal: #3ABFAD;
    --sulfur-yellow: #E8D44D;
    --hot-magenta: #D43F8C;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background: var(--concrete-night);
    color: var(--ash-white);
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    line-height: 1.7;
    overflow-x: hidden;
}

/* --- Memphis Background Patterns --- */
.memphis-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    animation: memphisRotate 120s linear infinite;
}

@keyframes memphisRotate {
    0% { transform: rotate(0deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1.1); }
}

/* --- Geometric Fry Layer --- */
.fry-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 50;
    pointer-events: none;
    overflow: hidden;
}

.fry {
    position: absolute;
    opacity: 0.5;
    animation: fryDrift linear infinite;
}

@keyframes fryDrift {
    0% { transform: translateX(-50px); }
    100% { transform: translateX(calc(100vw + 50px)); }
}

/* --- Scenes --- */
.scene {
    position: relative;
    z-index: 10;
}

/* --- SCENE 1: THE COLLISION --- */
.scene-collision {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--concrete-night);
    overflow: hidden;
}

.paradox-fish-container {
    position: relative;
    width: clamp(260px, 40vw, 500px);
    height: clamp(180px, 28vw, 340px);
    margin-bottom: 2rem;
}

.spear-half,
.shield-half {
    position: absolute;
    width: 50%;
    height: 100%;
    top: 0;
    transition: none;
}

.spear-half {
    left: -40%;
    opacity: 0;
}

.shield-half {
    right: -40%;
    opacity: 0;
}

.spear-half.animate {
    animation: spearSlideIn 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.shield-half.animate {
    animation: shieldSlideIn 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s forwards;
}

@keyframes spearSlideIn {
    0% { left: -40%; opacity: 0; }
    100% { left: 0; opacity: 1; }
}

@keyframes shieldSlideIn {
    0% { right: -40%; opacity: 0; }
    100% { right: 0; opacity: 1; }
}

.collision-flash {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--sulfur-yellow);
    transform: translate(-50%, -50%);
    opacity: 0;
    z-index: 5;
}

.collision-flash.active {
    animation: flashBurst 0.6s ease-out forwards;
}

@keyframes flashBurst {
    0% { width: 0; height: 0; opacity: 0.9; }
    50% { width: 200px; height: 200px; opacity: 0.4; }
    100% { width: 300px; height: 300px; opacity: 0; }
}

.hero-title {
    font-family: 'Rubik Mono One', monospace;
    font-weight: 400;
    font-size: clamp(3rem, 8vw, 7rem);
    letter-spacing: -0.02em;
    color: var(--ash-white);
    text-align: center;
    position: relative;
    z-index: 10;
}

.hero-title .char {
    display: inline-block;
    opacity: 0;
}

.hero-title .char.from-left {
    transform: translateX(-80px);
}

.hero-title .char.from-right {
    transform: translateX(80px);
}

.hero-title .char.animate {
    animation: charCollide 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.hero-title .char.from-left.animate {
    animation: charCollideFromLeft 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.hero-title .char.from-right.animate {
    animation: charCollideFromRight 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes charCollideFromLeft {
    0% { opacity: 0; transform: translateX(-80px); }
    70% { transform: translateX(5px); }
    100% { opacity: 1; transform: translateX(0); }
}

@keyframes charCollideFromRight {
    0% { opacity: 0; transform: translateX(80px); }
    70% { transform: translateX(-5px); }
    100% { opacity: 1; transform: translateX(0); }
}

.hero-subtitle {
    font-family: 'Caveat', cursive;
    font-weight: 400;
    font-size: clamp(1.2rem, 3vw, 2.4rem);
    color: var(--stone-gray);
    text-align: center;
    margin-top: 1rem;
    opacity: 0;
    transition: opacity 1s ease 1.8s;
}

.hero-subtitle.visible {
    opacity: 1;
}

/* --- Contradiction Zone Divider --- */
.contradiction-zone {
    position: relative;
    z-index: 10;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.contradiction-left,
.contradiction-right {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
}

.contradiction-left {
    left: 0;
    animation: patternSlideLeft 8s linear infinite;
}

.contradiction-right {
    right: 0;
    animation: patternSlideRight 8s linear infinite;
}

@keyframes patternSlideLeft {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100px); }
}

@keyframes patternSlideRight {
    0% { transform: translateX(0); }
    100% { transform: translateX(100px); }
}

.glyph-left,
.glyph-right,
.glyph-center {
    font-family: 'Rubik Mono One', monospace;
    font-size: 1.4rem;
    position: relative;
    z-index: 5;
}

.glyph-left {
    color: var(--living-coral);
    margin-right: 1.5rem;
}

.glyph-right {
    color: var(--memphis-teal);
    margin-left: 1.5rem;
}

.glyph-center {
    color: var(--sulfur-yellow);
    font-size: 1.8rem;
}

/* --- SCENE 2: THE SPEAR --- */
.scene-spear {
    min-height: 80vh;
    padding: 5rem 2rem;
    display: flex;
    justify-content: center;
}

.scene-content {
    max-width: 680px;
    position: relative;
}

.offset-right {
    margin-left: 60px;
}

.offset-left {
    margin-right: 60px;
}

.accent-line {
    position: absolute;
    width: 3px;
    height: 100%;
    top: 0;
}

.accent-coral-left {
    left: -24px;
    background: var(--living-coral);
}

.accent-teal-right {
    right: -24px;
    background: var(--memphis-teal);
}

.spear-fish-anchor,
.shield-fish-anchor {
    width: 120px;
    margin-bottom: 1.5rem;
}

.shield-fish-anchor {
    margin-left: auto;
}

.section-heading {
    font-family: 'Rubik Mono One', monospace;
    font-weight: 400;
    font-size: clamp(1.6rem, 4vw, 3.2rem);
    letter-spacing: -0.02em;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
    color: var(--ash-white);
}

.section-heading .char {
    display: inline-block;
    opacity: 0;
}

.section-heading .char.from-left {
    transform: translateX(-60px);
}

.section-heading .char.from-right {
    transform: translateX(60px);
}

.section-heading .char.from-left.animate {
    animation: charCollideFromLeft 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.section-heading .char.from-right.animate {
    animation: charCollideFromRight 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.caveat,
.annotation {
    font-family: 'Caveat', cursive;
    font-weight: 400;
    font-size: clamp(1rem, 2vw, 1.6rem);
    color: var(--stone-gray);
    line-height: 1.35;
    margin-bottom: 1.5rem;
}

.body-text {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    line-height: 1.7;
    color: var(--ash-white);
    max-width: 38em;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.body-text.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- SCENE 3: THE SHIELD --- */
.scene-shield {
    min-height: 80vh;
    padding: 5rem 2rem;
    display: flex;
    justify-content: center;
}

.scene-shield .scene-content {
    background: var(--slate-glass);
    padding: 3rem;
    border: 1px solid var(--memphis-teal);
    border-radius: 2px;
}

/* --- SCENE 4: THE PARADOX --- */
.scene-paradox {
    min-height: 100vh;
    padding: 5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.convergence-container {
    position: relative;
    width: 100%;
    max-width: 700px;
    height: 140px;
    margin-bottom: 3rem;
}

.converge-spear,
.converge-shield {
    position: absolute;
    width: 140px;
    height: 100px;
    top: 20px;
    transition: transform 0.1s linear;
}

.converge-spear {
    left: 0;
}

.converge-shield {
    right: 0;
}

.paradox-content {
    text-align: center;
    max-width: 700px;
}

.paradox-large {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
}

.highlight-yellow {
    color: var(--sulfur-yellow);
    font-weight: 500;
}

/* --- SCENE 5: RESOLUTION --- */
.scene-resolution {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5rem 2rem;
    background: var(--concrete-night);
}

.resolution-text {
    font-family: 'Caveat', cursive;
    font-weight: 400;
    font-size: clamp(1.4rem, 3.5vw, 2.8rem);
    color: var(--ash-white);
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.resolution-text.visible {
    opacity: 1;
    transform: translateY(0);
}

.resolution-info {
    margin-top: 3rem;
    color: var(--stone-gray);
    font-size: 0.85rem;
    text-align: center;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .offset-right {
        margin-left: 0;
    }

    .offset-left {
        margin-right: 0;
    }

    .scene-content {
        padding: 2rem 1rem;
    }

    .scene-shield .scene-content {
        padding: 2rem;
    }

    .accent-line {
        display: none;
    }

    .memphis-bg {
        transform: scale(0.6);
        filter: blur(1px);
    }

    .fry {
        opacity: 0.3;
    }

    .convergence-container {
        height: 100px;
    }

    .converge-spear,
    .converge-shield {
        width: 100px;
        height: 70px;
    }

    .glyph-left,
    .glyph-right {
        font-size: 1rem;
    }

    .glyph-center {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: clamp(2rem, 10vw, 3.5rem);
    }

    .paradox-fish-container {
        width: 80vw;
    }
}
