/* =============================================
   gabs.cafe - Goblincore Forest Cafe
   ============================================= */

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

:root {
    --neon-moss: #39FF14;
    --forest-soil: #2E1F0F;
    --mushroom-cream: #E8DCC8;
    --bark-brown: #5C3D21;
    --spore-gold: #C4A535;
    --berry-purple: #6B3A6E;
    --steam-white: #F5F2ED;
}

html {
    overflow: hidden;
    height: 100%;
}

body {
    font-family: 'Lexend', sans-serif;
    font-weight: 400;
    font-size: clamp(15px, 1.5vw, 18px);
    line-height: 1.75;
    color: var(--mushroom-cream);
    background: var(--forest-soil);
    height: 100%;
    overflow: hidden;
}

.svg-filters {
    position: absolute;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* --- Typography --- */
.cormorant {
    font-family: 'Cormorant', serif;
}

.caveat {
    font-family: 'Caveat Brush', cursive;
}

h1, h2, h3 {
    font-family: 'Cormorant', serif;
    font-weight: 700;
    letter-spacing: -0.01em;
}

h2 {
    font-size: clamp(28px, 5.5vw, 68px);
}

/* --- Neon Glow --- */
.neon-glow {
    color: var(--neon-moss);
    text-shadow:
        0 0 10px #39FF14,
        0 0 20px rgba(57, 255, 20, 0.3);
}

/* --- Hero Viewport --- */
.hero-viewport {
    width: 100vw;
    height: 100vh;
    background: var(--forest-soil);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 10;
}

.hero-noise-overlay {
    position: absolute;
    inset: 0;
    filter: url(#noiseFilter);
    opacity: 0.04;
    pointer-events: none;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 5;
    text-align: center;
}

.hero-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.hero-gabs {
    font-family: 'Cormorant', serif;
    font-size: clamp(60px, 14vw, 180px);
    font-weight: 700;
    color: var(--mushroom-cream);
    letter-spacing: 0.08em;
    display: block;
    opacity: 0;
    transform: translateY(100%);
    clip-path: inset(100% 0 0 0);
}

.hero-gabs.animate-in {
    animation: growUp 700ms cubic-bezier(0.34, 1.56, 0.64, 1) 500ms forwards;
}

@keyframes growUp {
    0% {
        opacity: 0;
        transform: translateY(100%);
        clip-path: inset(100% 0 0 0);
    }
    30% {
        opacity: 1;
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        clip-path: inset(0% 0 0 0);
    }
}

.hero-shelf-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    position: relative;
    height: 60px;
}

.shelf-line {
    display: block;
    width: 0;
    height: 2px;
    background: var(--bark-brown);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.shelf-line.animate-in {
    animation: drawLine 300ms ease-out 1200ms forwards;
}

@keyframes drawLine {
    to {
        width: clamp(200px, 30vw, 400px);
    }
}

.hero-cafe {
    font-family: 'Cormorant', serif;
    font-size: clamp(24px, 5vw, 64px);
    font-weight: 600;
    color: var(--steam-white);
    letter-spacing: 0.2em;
    opacity: 0;
    position: relative;
}

.hero-cafe.animate-in {
    animation: fadeInCafe 200ms ease-out 1500ms forwards;
}

.hero-cafe .period-glow {
    color: var(--neon-moss);
    text-shadow: 0 0 10px #39FF14, 0 0 20px rgba(57, 255, 20, 0.3);
}

@keyframes fadeInCafe {
    to {
        opacity: 1;
    }
}

.hero-tagline {
    font-family: 'Caveat Brush', cursive;
    font-size: clamp(14px, 2vw, 22px);
    color: var(--spore-gold);
    margin-top: 20px;
    opacity: 0;
}

.hero-tagline.animate-in {
    animation: fadeInSlow 600ms ease-out 2000ms forwards;
}

@keyframes fadeInSlow {
    to {
        opacity: 0.7;
    }
}

/* --- Mushroom Decorations --- */
.mushroom-deco {
    position: absolute;
    z-index: 6;
    opacity: 0;
    transform: scale(0);
    transition: transform 0.3s ease;
}

.mushroom-deco.animate-in {
    animation: popMushroom 400ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.mushroom-hero-1 {
    width: 60px;
    bottom: 10%;
    left: 8%;
    animation-delay: 1700ms !important;
}

.mushroom-hero-2 {
    width: 40px;
    bottom: 15%;
    right: 12%;
    animation-delay: 1850ms !important;
}

.mushroom-hero-3 {
    width: 50px;
    top: 20%;
    left: 5%;
    animation-delay: 2000ms !important;
}

.mushroom-hero-4 {
    width: 35px;
    top: 15%;
    right: 8%;
    animation-delay: 2150ms !important;
}

.mushroom-hero-5 {
    width: 45px;
    bottom: 25%;
    right: 25%;
    animation-delay: 2300ms !important;
}

@keyframes popMushroom {
    0% {
        opacity: 0;
        transform: scale(0) rotate(-10deg);
    }
    60% {
        opacity: 1;
        transform: scale(1.1) rotate(3deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

/* --- Steam Wisps --- */
.steam-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
    overflow: hidden;
}

.steam-wisp {
    position: absolute;
    bottom: 0;
    width: 2px;
    height: 50px;
    background: rgba(245, 242, 237, 0.08);
    border-radius: 50%;
    animation: steamRise linear forwards;
    will-change: transform, opacity;
}

@keyframes steamRise {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.12;
    }
    50% {
        opacity: 0.08;
    }
    100% {
        transform: translateY(-100vh) translateX(var(--sway, 20px));
        opacity: 0;
    }
}

/* --- Spore Particles --- */
.spore-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 4;
    overflow: hidden;
}

.spore {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--spore-gold);
    border-radius: 50%;
    opacity: 0;
    animation: sporeDrift linear infinite;
    will-change: transform, opacity;
}

@keyframes sporeDrift {
    0% {
        transform: translate(0, 0);
        opacity: 0;
    }
    15% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.2;
    }
    85% {
        opacity: 0.1;
    }
    100% {
        transform: translate(var(--drift-x, 40px), var(--drift-y, -200px));
        opacity: 0;
    }
}

/* --- Scroll Indicator --- */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    right: 40px;
    z-index: 8;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    color: var(--bark-brown);
    font-family: 'Caveat Brush', cursive;
    font-size: 18px;
}

.scroll-indicator.animate-in {
    animation: fadeInSlow 500ms ease-out 2400ms forwards;
}

.scroll-arrow {
    display: inline-block;
    animation: arrowBounce 1.5s ease-in-out infinite;
}

@keyframes arrowBounce {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(6px); }
}

/* --- Cafe Counter (Horizontal Scroll) --- */
.cafe-counter {
    display: flex;
    width: fit-content;
    height: 100vh;
    scroll-snap-type: x mandatory;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.cafe-counter::-webkit-scrollbar {
    display: none;
}

/* --- Panels --- */
.panel {
    width: 100vw;
    height: 100vh;
    min-width: 100vw;
    scroll-snap-align: start;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--forest-soil);
}

.panel-noise-overlay {
    position: absolute;
    inset: 0;
    filter: url(#noiseFilter);
    opacity: 0.04;
    pointer-events: none;
    z-index: 1;
}

.panel-noise-chalk {
    filter: url(#chalkFilter);
    opacity: 0.06;
}

.panel-steam {
    z-index: 2;
}

.panel-content {
    position: relative;
    z-index: 5;
    max-width: 680px;
    padding: 40px;
}

.panel-heading {
    margin-bottom: 8px;
}

.panel-subtitle {
    font-size: clamp(18px, 2.5vw, 28px);
    color: var(--spore-gold);
    opacity: 0.7;
    margin-bottom: 32px;
}

.panel-body p {
    margin-bottom: 1.2em;
    color: var(--mushroom-cream);
    opacity: 0.9;
}

.panel-body p:last-child {
    margin-bottom: 0;
}

/* Panel background variations */
.panel-origins {
    background: radial-gradient(ellipse at 30% 60%, rgba(92, 61, 33, 0.3), var(--forest-soil) 70%);
}

.panel-processing {
    background: radial-gradient(ellipse at 70% 40%, rgba(107, 58, 110, 0.15), var(--forest-soil) 70%);
}

.panel-serving {
    background: radial-gradient(ellipse at 40% 50%, rgba(196, 165, 53, 0.1), var(--forest-soil) 70%);
}

.panel-tasting {
    background: radial-gradient(ellipse at 60% 60%, rgba(57, 255, 20, 0.04), var(--forest-soil) 70%);
}

.panel-reflecting {
    background: radial-gradient(ellipse at 50% 50%, rgba(92, 61, 33, 0.2), var(--forest-soil) 70%);
}

.panel-menu {
    background: #1a120a;
}

/* --- Mushroom Transitions Between Panels --- */
.mushroom-transition {
    position: absolute;
    right: 30px;
    bottom: 15%;
    z-index: 6;
    width: 50px;
    transition: transform 0.15s ease-out;
}

.mushroom-trans-1 { width: 45px; bottom: 12%; right: 25px; }
.mushroom-trans-2 { width: 38px; bottom: 18%; right: 35px; }
.mushroom-trans-3 { width: 52px; bottom: 10%; right: 20px; }
.mushroom-trans-4 { width: 42px; bottom: 20%; right: 30px; }

/* --- Menu Board (Chalkboard) --- */
.menu-board {
    position: relative;
    z-index: 5;
    background: rgba(26, 18, 10, 0.8);
    border: 2px solid var(--bark-brown);
    border-radius: 4px;
    padding: clamp(30px, 5vw, 60px);
    max-width: 600px;
    width: 90%;
    box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.4);
}

.menu-title {
    font-size: clamp(32px, 6vw, 56px);
    color: var(--mushroom-cream);
    text-align: center;
    margin-bottom: 32px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.menu-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.menu-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.menu-label {
    font-family: 'Caveat Brush', cursive;
    font-size: clamp(20px, 3vw, 28px);
    color: var(--neon-moss);
    text-shadow: 0 0 8px rgba(57, 255, 20, 0.25);
    white-space: nowrap;
}

.menu-dots {
    flex: 1;
    border-bottom: 2px dotted var(--bark-brown);
    margin-bottom: 6px;
    opacity: 0.5;
}

.menu-value {
    font-family: 'Caveat Brush', cursive;
    font-size: clamp(16px, 2.2vw, 22px);
    color: var(--spore-gold);
    white-space: nowrap;
}

.menu-footer {
    text-align: center;
    margin-top: 36px;
    font-size: clamp(16px, 2vw, 22px);
    color: var(--steam-white);
    opacity: 0.5;
}

/* --- Neon Pulse (for active panel headings) --- */
@keyframes neonPulse {
    0%, 100% {
        text-shadow: 0 0 10px #39FF14, 0 0 20px rgba(57, 255, 20, 0.3);
    }
    50% {
        text-shadow: 0 0 15px #39FF14, 0 0 30px rgba(57, 255, 20, 0.5), 0 0 45px rgba(57, 255, 20, 0.15);
    }
}

.panel.active .panel-heading .neon-glow {
    animation: neonPulse 2s ease-in-out infinite;
}

/* --- Transition state: hero to counter --- */
body.scrolling-active .hero-viewport {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease-out;
}

body.counter-visible .hero-viewport {
    display: none;
}

body.counter-visible .cafe-counter {
    position: fixed;
    top: 0;
    left: 0;
}

/* Initially hide the cafe counter until scroll */
.cafe-counter {
    position: fixed;
    top: 0;
    left: 0;
}

.hero-viewport {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10;
}

/* --- Steam speed modifier during scroll --- */
.steam-wisp.fast {
    animation-duration: 2s !important;
}
