/* gabs.boo - Goblincore Earthy Chaos */
/* Palette: #1a1a0e, #5c4a32, #4a6741, #ddd5c0, #7c3aed, #d4cbb3, #bef264 */

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

html {
    scroll-behavior: smooth;
}

body {
    background: #1a1a0e;
    color: #d4cbb3;
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    line-height: 1.65;
    overflow-x: hidden;
}

/* ========================================
   SECTION 1: THE UNDERGROUND (HERO)
   ======================================== */

.section-underground {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: #1a1a0e;
}

.brand-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: clamp(4rem, 12vw, 8rem);
    color: #ddd5c0;
    transform: rotate(-2deg);
    position: relative;
    z-index: 2;
    letter-spacing: -0.02em;
}

.brand-boo {
    color: #bef264;
    text-shadow: 0 0 30px rgba(190, 242, 100, 0.4), 0 0 60px rgba(190, 242, 100, 0.15);
}

.brand-tagline {
    font-family: 'Fira Code', monospace;
    font-size: clamp(0.7rem, 1.5vw, 0.9rem);
    color: #4a6741;
    margin-top: 1rem;
    transform: rotate(-2deg);
    position: relative;
    z-index: 2;
    letter-spacing: 0.05em;
}

/* ========================================
   MUSHROOMS
   ======================================== */

.mushroom {
    position: absolute;
    z-index: 1;
}

.mushroom-cap {
    width: 24px;
    height: 24px;
    background: #ddd5c0;
    border-radius: 50%;
    opacity: 0.5;
}

.mushroom-stem {
    width: 4px;
    height: 20px;
    background: #ddd5c0;
    margin: 0 auto;
    opacity: 0.35;
    border-radius: 0 0 2px 2px;
}

.mushroom-1 {
    top: 15%;
    left: 8%;
    transform: rotate(-8deg) scale(1.2);
}

.mushroom-2 {
    top: 25%;
    right: 12%;
    transform: rotate(5deg) scale(0.9);
}

.mushroom-3 {
    bottom: 20%;
    left: 15%;
    transform: rotate(-3deg) scale(1.5);
}

.mushroom-4 {
    bottom: 30%;
    right: 8%;
    transform: rotate(12deg) scale(0.7);
}

.mushroom-5 {
    top: 60%;
    left: 45%;
    transform: rotate(-6deg) scale(1.1);
}

.mushroom-floor-1 {
    bottom: 10%;
    left: 5%;
    transform: rotate(-5deg) scale(1.3);
}

.mushroom-floor-2 {
    bottom: 15%;
    right: 10%;
    transform: rotate(8deg) scale(1.0);
}

.mushroom-floor-3 {
    top: 20%;
    right: 20%;
    transform: rotate(-10deg) scale(0.8);
}

/* ========================================
   FIREFLIES
   ======================================== */

.firefly {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #bef264;
    border-radius: 50%;
    box-shadow: 0 0 6px 2px rgba(190, 242, 100, 0.5), 0 0 12px 4px rgba(190, 242, 100, 0.2);
    animation: flicker 3s ease-in-out infinite;
    z-index: 3;
}

.firefly-1 { top: 10%; left: 20%; animation-delay: 0s; animation-duration: 2.8s; }
.firefly-2 { top: 30%; right: 25%; animation-delay: 0.5s; animation-duration: 3.5s; }
.firefly-3 { top: 50%; left: 60%; animation-delay: 1.2s; animation-duration: 2.5s; }
.firefly-4 { top: 70%; right: 15%; animation-delay: 0.8s; animation-duration: 3.2s; }
.firefly-5 { top: 20%; left: 75%; animation-delay: 1.8s; animation-duration: 4s; }
.firefly-6 { top: 80%; left: 30%; animation-delay: 2.2s; animation-duration: 3s; }
.firefly-7 { top: 40%; left: 10%; animation-delay: 0.3s; animation-duration: 3.8s; }
.firefly-8 { top: 60%; right: 35%; animation-delay: 1.5s; animation-duration: 2.6s; }

.firefly-f1 { top: 10%; left: 25%; animation-delay: 0.4s; animation-duration: 3.1s; }
.firefly-f2 { top: 40%; right: 20%; animation-delay: 1.0s; animation-duration: 3.6s; }
.firefly-f3 { bottom: 20%; left: 50%; animation-delay: 2.0s; animation-duration: 2.9s; }
.firefly-f4 { bottom: 35%; right: 35%; animation-delay: 0.7s; animation-duration: 3.4s; }

.firefly-end-1 { top: 15%; left: 10%; animation-delay: 0s; animation-duration: 3s; }
.firefly-end-2 { top: 25%; right: 20%; animation-delay: 0.6s; animation-duration: 3.3s; }
.firefly-end-3 { top: 40%; left: 35%; animation-delay: 1.2s; animation-duration: 2.7s; }
.firefly-end-4 { top: 55%; right: 15%; animation-delay: 0.3s; animation-duration: 3.8s; }
.firefly-end-5 { top: 70%; left: 50%; animation-delay: 1.8s; animation-duration: 3.1s; }
.firefly-end-6 { top: 30%; left: 65%; animation-delay: 2.1s; animation-duration: 2.5s; }
.firefly-end-7 { top: 80%; right: 30%; animation-delay: 0.9s; animation-duration: 4s; }
.firefly-end-8 { top: 45%; left: 15%; animation-delay: 1.5s; animation-duration: 3.5s; }
.firefly-end-9 { top: 60%; right: 45%; animation-delay: 0.2s; animation-duration: 2.8s; }
.firefly-end-10 { top: 85%; left: 30%; animation-delay: 2.5s; animation-duration: 3.2s; }

@keyframes flicker {
    0%, 100% { opacity: 0.2; transform: scale(0.8); }
    25% { opacity: 0.8; transform: scale(1.2); }
    50% { opacity: 0.3; transform: scale(1); }
    75% { opacity: 1; transform: scale(1.1); }
}

/* ========================================
   SECTION 2: THE CHAT
   ======================================== */

.section-chat {
    min-height: 180vh;
    padding: 6rem 2rem;
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.chat-bubble {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 2.5rem;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.chat-bubble.visible {
    opacity: 1;
    transform: translateY(0) rotate(var(--bubble-tilt, 0deg));
}

.bubble-1 { --bubble-tilt: -1.5deg; padding-left: 5%; }
.bubble-2 { --bubble-tilt: 2deg; padding-left: 25%; }
.bubble-3 { --bubble-tilt: -0.5deg; padding-left: 10%; }
.bubble-4 { --bubble-tilt: 1.5deg; padding-left: 30%; }
.bubble-5 { --bubble-tilt: -2deg; padding-left: 0%; }
.bubble-6 { --bubble-tilt: 1deg; padding-left: 18%; }
.bubble-7 { --bubble-tilt: -1deg; padding-left: 35%; }

/* Creature Avatars */
.creature-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
    margin-top: 8px;
}

.creature-green { background: #4a6741; }
.creature-purple { background: #7c3aed; }
.creature-lime { background: #bef264; }
.creature-brown { background: #5c4a32; }
.creature-cream { background: #ddd5c0; }

.eye {
    position: absolute;
    width: 5px;
    height: 5px;
    background: white;
    border-radius: 50%;
    top: 10px;
}

.eye-left { left: 7px; }
.eye-right { right: 7px; }

/* Bubble Content */
.bubble-content {
    background: rgba(92, 74, 50, 0.3);
    border: 1px solid #5c4a32;
    border-radius: 16px;
    padding: 1rem 1.25rem;
    position: relative;
    max-width: 450px;
}

.bubble-content::after {
    content: '';
    position: absolute;
    left: -8px;
    top: 14px;
    border: 8px solid transparent;
    border-right-color: #5c4a32;
}

.creature-name {
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
    color: #bef264;
    display: block;
    margin-bottom: 0.3rem;
    letter-spacing: 0.03em;
}

.bubble-text {
    font-size: 0.88rem;
    color: #d4cbb3;
    line-height: 1.55;
}

/* ========================================
   SECTION 3: THE FOREST FLOOR
   ======================================== */

.section-forest {
    min-height: 80vh;
    position: relative;
    overflow: hidden;
    padding: 6rem 2rem;
}

.earth-layer {
    position: absolute;
    border-radius: 4px;
}

.layer-1 {
    width: 110%;
    height: 200px;
    background: #5c4a32;
    opacity: 0.15;
    top: 10%;
    left: -5%;
    transform: rotate(-1.5deg);
}

.layer-2 {
    width: 105%;
    height: 150px;
    background: #4a6741;
    opacity: 0.12;
    top: 35%;
    left: -2%;
    transform: rotate(0.8deg);
}

.layer-3 {
    width: 115%;
    height: 180px;
    background: #5c4a32;
    opacity: 0.1;
    bottom: 10%;
    left: -8%;
    transform: rotate(-0.5deg);
}

.root-lines {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
}

.root-path {
    fill: none;
    stroke: #4a6741;
    stroke-width: 1.5;
    opacity: 0.25;
    stroke-linecap: round;
}

.forest-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.forest-card {
    background: rgba(26, 26, 14, 0.8);
    border: 1px solid rgba(74, 103, 65, 0.3);
    border-radius: 8px;
    padding: 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.forest-card.visible {
    opacity: 1;
}

.forest-card-1 {
    transform: rotate(-1.5deg) translateY(20px);
    max-width: 500px;
    align-self: flex-start;
}

.forest-card-1.visible {
    transform: rotate(-1.5deg) translateY(0);
}

.forest-card-2 {
    transform: rotate(1deg) translateY(20px);
    max-width: 480px;
    align-self: flex-end;
}

.forest-card-2.visible {
    transform: rotate(1deg) translateY(0);
}

.forest-card-3 {
    transform: rotate(-0.5deg) translateY(20px);
    max-width: 520px;
    align-self: center;
}

.forest-card-3.visible {
    transform: rotate(-0.5deg) translateY(0);
}

.forest-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    color: #bef264;
    margin-bottom: 0.75rem;
}

.forest-text {
    font-size: 0.88rem;
    color: #d4cbb3;
    opacity: 0.8;
    line-height: 1.65;
}

/* ========================================
   SECTION 4: THE FADE
   ======================================== */

.section-fade {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: #1a1a0e;
}

.boo-text {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: clamp(5rem, 20vw, 14rem);
    color: #bef264;
    opacity: 0;
    text-shadow: 0 0 40px rgba(190, 242, 100, 0.5), 0 0 80px rgba(190, 242, 100, 0.2);
    position: relative;
    z-index: 2;
    transition: opacity 1.5s ease-in-out;
    user-select: none;
}

.boo-text.boo-visible {
    opacity: 1;
}

.fade-whisper {
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    color: #4a6741;
    opacity: 0;
    margin-top: 2rem;
    position: relative;
    z-index: 2;
    transition: opacity 2s ease-in-out 1s;
    letter-spacing: 0.1em;
}

.boo-text.boo-visible ~ .fade-whisper {
    opacity: 0.6;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 600px) {
    .section-chat {
        padding: 4rem 1rem;
    }

    .bubble-1,
    .bubble-2,
    .bubble-3,
    .bubble-4,
    .bubble-5,
    .bubble-6,
    .bubble-7 {
        padding-left: 0;
    }

    .bubble-content {
        max-width: 100%;
    }

    .section-forest {
        padding: 4rem 1rem;
    }

    .forest-card-1,
    .forest-card-2,
    .forest-card-3 {
        max-width: 100%;
        align-self: stretch;
    }
}
