/* ===== COLOR PALETTE ===== */
:root {
    --midnight-void: #0A0E1A;
    --deep-indigo-wall: #111B2E;
    --bruised-concrete: #1A2742;
    --phosphor-white: #E8EDF5;
    --lichen-gray: #7B8FA8;
    --bioluminescent-cyan: #00E5C7;
    --spore-violet: #9B5DE5;
    --spray-neon-pink: #FF3F8E;
    --chlorophyll-glow: #39FF7B;
    --pollen-amber: #FFB347;
}

/* ===== TYPOGRAPHY ===== */
@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=IBM+Plex+Mono:wght@400;500;600&family=Chakra+Petch:wght@600&display=swap');

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

html, body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
}

body {
    background-color: var(--midnight-void);
    color: var(--phosphor-white);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 16px;
    line-height: 1.75;
    letter-spacing: 0.01em;
}

/* ===== SECTIONS / WALLS ===== */
.wall {
    min-height: 100vh;
    width: 100%;
    position: relative;
    overflow: hidden;
    padding: 60px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: fadeInWall 0.8s ease-out forwards;
}

@keyframes fadeInWall {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wall-1 { animation-delay: 0.1s; }
.wall-2 { animation-delay: 0.2s; }
.wall-3 { animation-delay: 0.3s; }
.wall-4 { animation-delay: 0.4s; }
.wall-5 { animation-delay: 0.5s; }

/* Background variations */
.wall-1 {
    background: radial-gradient(circle at 40% 50%, var(--deep-indigo-wall) 0%, var(--midnight-void) 100%);
}

.wall-2 {
    background-color: var(--deep-indigo-wall);
}

.wall-3 {
    background-color: var(--midnight-void);
}

.wall-4 {
    background: linear-gradient(135deg, var(--deep-indigo-wall) 0%, var(--midnight-void) 100%);
}

.wall-5 {
    background-color: var(--deep-indigo-wall);
}

/* ===== WALL 1: HERO ===== */
.hero {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero-content {
    position: relative;
    z-index: 10;
}

.hero-tag {
    font-family: 'Space Mono', monospace;
    font-size: 120px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--phosphor-white);
    transform: rotate(2deg);
    text-shadow:
        1px 1px 0 rgba(232, 237, 245, 0.3),
        2px 2px 0 rgba(232, 237, 245, 0.2),
        4px 4px 0 rgba(232, 237, 245, 0.1);
    margin-bottom: 40px;
    animation: sprayIn 0.8s ease-out;
}

@keyframes sprayIn {
    0% {
        opacity: 0;
        filter: blur(8px);
        transform: scale(1.3) rotate(2deg);
    }
    100% {
        opacity: 1;
        filter: blur(0);
        transform: scale(1) rotate(2deg);
    }
}

.terminal-output {
    margin: 15px 0;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0.02em;
    animation: typeIn 0.6s ease-out backwards;
}

.terminal-output:nth-child(2) { animation-delay: 0.4s; }
.terminal-output:nth-child(3) { animation-delay: 0.7s; }

@keyframes typeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.terminal-prompt {
    color: var(--lichen-gray);
    margin-right: 8px;
}

.terminal-text {
    color: var(--phosphor-white);
}

.nature-element {
    width: 200px;
    height: 200px;
    margin-top: 40px;
    color: var(--bioluminescent-cyan);
    animation: bioLuminescence 3.5s ease-in-out infinite;
}

@keyframes bioLuminescence {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

.fern-hero {
    animation: vineGrowth 1.5s ease-out, bioLuminescence 3.5s ease-in-out infinite;
}

@keyframes vineGrowth {
    from {
        stroke-dasharray: 500;
        stroke-dashoffset: 500;
    }
    to {
        stroke-dasharray: 500;
        stroke-dashoffset: 0;
    }
}

/* Drip marks */
.drip-marks {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 200px;
    pointer-events: none;
}

.drip {
    position: absolute;
    bottom: 0;
    width: 6px;
    background: linear-gradient(to bottom, var(--spray-neon-pink), transparent);
    opacity: 0.6;
}

/* ===== WALL 2: ROOT NETWORK ===== */
.root-network {
    flex-direction: column;
    align-items: flex-start;
    padding-left: 80px;
}

.network-trunk {
    position: relative;
    width: 100%;
    max-width: 1000px;
}

.section-title {
    font-family: 'Space Mono', monospace;
    font-size: 56px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--phosphor-white);
    margin-bottom: 80px;
    text-shadow:
        1px 1px 0 rgba(232, 237, 245, 0.2),
        2px 2px 0 rgba(232, 237, 245, 0.1);
    animation: sprayIn 0.8s ease-out;
}

.branch {
    margin: 40px 0;
    display: flex;
    align-items: flex-start;
    gap: 30px;
    animation: popIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.branch:nth-child(2) { animation-delay: 0.1s; }
.branch:nth-child(3) { animation-delay: 0.2s; }
.branch:nth-child(4) { animation-delay: 0.3s; }

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.branch-node {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--bruised-concrete);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bioluminescent-cyan);
}

.node-icon {
    width: 50px;
    height: 50px;
    color: var(--bioluminescent-cyan);
    animation: bioLuminescence 3.5s ease-in-out infinite;
}

.branch-text {
    flex: 1;
    font-size: 15px;
    line-height: 1.7;
    color: var(--phosphor-white);
    padding: 20px;
    border-left: 2px solid var(--spore-violet);
}

.branch-text .terminal-prompt {
    color: var(--lichen-gray);
    margin-right: 10px;
}

/* ===== WALL 3: UNDERGROWTH ===== */
.undergrowth {
    flex-direction: column;
    align-items: center;
}

.card-cluster {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: center;
    margin-top: 60px;
    max-width: 1200px;
}

.card {
    width: 280px;
    padding: 30px;
    background-color: var(--bruised-concrete);
    border: 2px solid var(--bioluminescent-cyan);
    clip-path: polygon(0 0, 98% 1%, 100% 99%, 2% 98%);
    transform-style: preserve-3d;
    transition: transform 0.3s cubic-bezier(0.03, 0.98, 0.52, 0.99);
    animation: popIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }

.card h3 {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--bioluminescent-cyan);
    margin-bottom: 15px;
}

.card p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--lichen-gray);
    margin-bottom: 20px;
}

.card-icon {
    width: 100px;
    height: 100px;
    color: var(--spore-violet);
    animation: bioLuminescence 3.5s ease-in-out infinite;
}

/* ===== WALL 4: CANOPY BREAK ===== */
.canopy-break {
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.canopy-content {
    position: relative;
    text-align: center;
}

.canopy-statement {
    font-family: 'Space Mono', monospace;
    font-size: 64px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--phosphor-white);
    margin-bottom: 80px;
    text-shadow:
        2px 2px 0 rgba(232, 237, 245, 0.15);
    animation: sprayIn 0.8s ease-out;
}

.floating-leaf {
    position: absolute;
    width: 60px;
    height: 80px;
    color: var(--chlorophyll-glow);
    opacity: 0.8;
}

.leaf-1 {
    top: 20%;
    left: 10%;
    animation: driftLeaf 12s ease-in-out infinite;
}

.leaf-2 {
    top: 50%;
    right: 15%;
    animation: driftLeaf 14s ease-in-out infinite 2s;
}

.leaf-3 {
    bottom: 20%;
    left: 20%;
    animation: driftLeaf 10s ease-in-out infinite 4s;
}

@keyframes driftLeaf {
    0%, 100% {
        transform: translateX(0) translateY(0) rotate(0deg);
        opacity: 0.6;
    }
    25% {
        transform: translateX(30px) translateY(-20px) rotate(90deg);
        opacity: 0.8;
    }
    50% {
        transform: translateX(0) translateY(-40px) rotate(180deg);
        opacity: 1;
    }
    75% {
        transform: translateX(-30px) translateY(-20px) rotate(270deg);
        opacity: 0.8;
    }
}

/* ===== WALL 5: TAG WALL ===== */
.tag-wall {
    flex-direction: column;
    align-items: center;
    padding-top: 80px;
}

.archive-title {
    margin-bottom: 60px;
}

.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1000px;
    width: 100%;
}

.tag-block {
    padding: 25px;
    background-color: var(--bruised-concrete);
    border: 1px solid var(--spore-violet);
    border-left: 4px solid var(--spray-neon-pink);
    transform-style: preserve-3d;
    transition: transform 0.3s cubic-bezier(0.03, 0.98, 0.52, 0.99);
    animation: popIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.tag-1 { animation-delay: 0.1s; }
.tag-2 { animation-delay: 0.15s; }
.tag-3 { animation-delay: 0.2s; }
.tag-4 { animation-delay: 0.25s; }
.tag-5 { animation-delay: 0.3s; }
.tag-6 { animation-delay: 0.35s; }

.tag-block:hover {
    border-left: 4px solid var(--bioluminescent-cyan);
    background-color: var(--deep-indigo-wall);
}

.tag-label {
    display: block;
    font-family: 'Chakra Petch', sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--bioluminescent-cyan);
    margin-bottom: 12px;
}

.tag-block p {
    font-size: 13px;
    line-height: 1.6;
    color: var(--lichen-gray);
}

/* ===== TILT 3D EFFECTS ===== */
.card, .tag-block {
    cursor: grab;
}

.card:active, .tag-block:active {
    cursor: grabbing;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .wall {
        padding: 40px 20px;
    }

    .hero-tag {
        font-size: 64px;
    }

    .section-title {
        font-size: 40px;
    }

    .canopy-statement {
        font-size: 40px;
    }

    .card-cluster {
        flex-direction: column;
        align-items: center;
    }

    .card {
        width: 100%;
        max-width: 320px;
    }

    .archive-grid {
        grid-template-columns: 1fr;
    }

    .branch {
        flex-direction: column;
        transform: none !important;
    }

    .root-network {
        padding-left: 20px;
    }

    .floating-leaf {
        display: none;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }

    .wall {
        min-height: auto;
        padding: 30px 15px;
    }

    .hero-tag {
        font-size: 48px;
    }

    .section-title {
        font-size: 32px;
    }

    .canopy-statement {
        font-size: 28px;
    }

    .terminal-output {
        font-size: 12px;
    }

    .branch-text {
        font-size: 13px;
    }
}

/* ===== UTILITY STYLES ===== */
svg[currentColor] {
    color: inherit;
}

/* Noise background effect (subtle) */
.wall::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        url('data:image/svg+xml;charset=utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="4" /></filter><rect width="100%" height="100%" filter="url(%23noise)" opacity="0.03"/></svg>');
    pointer-events: none;
    z-index: 1;
}

.wall > * {
    position: relative;
    z-index: 2;
}

/* Scan lines effect (very subtle) */
.wall::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: linear-gradient(
        0deg,
        rgba(255, 255, 255, 0.03) 0,
        rgba(255, 255, 255, 0.03) 1px,
        transparent 1px,
        transparent 4px
    );
    pointer-events: none;
    z-index: 1;
}
