/* ============================================
   gabs.cafe - Goblincore Forest Cafe
   Palette:
     Neon Moss:      #39FF14
     Forest Soil:    #2E1F0F
     Mushroom Cream: #E8DCC8
     Bark Brown:     #5C3D21
     Spore Gold:     #C4A535
     Berry Purple:   #6B3A6E
     Steam White:    #F5F2ED
   Fonts:
     Headlines: Cormorant 600-700
     Body: Lexend 400/600
     Menu/Labels: Caveat Brush
   ============================================ */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    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: #E8DCC8;
    background: #2E1F0F;
    overflow: hidden;
    height: 100%;
    width: 100%;
}

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

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

/* --- Hero Panel --- */
.panel {
    position: relative;
    width: 100vw;
    min-height: 100vh;
    overflow: hidden;
}

.panel-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #2E1F0F;
    background-image: radial-gradient(ellipse at 50% 70%, rgba(92, 61, 33, 0.3) 0%, transparent 70%);
}

/* Texture Overlays */
.texture-overlay {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 30% 40%, rgba(92, 61, 33, 0.15) 0%, transparent 50%),
                       radial-gradient(circle at 70% 60%, rgba(107, 58, 110, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

.noise-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    opacity: 0.6;
}

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

.steam-wisp {
    position: absolute;
    bottom: -80px;
    width: 3px;
    height: 60px;
    background: rgba(245, 242, 237, 0.08);
    border-radius: 50%;
    animation: steamRise var(--steam-duration, 6s) var(--steam-delay, 0s) infinite ease-out;
    opacity: 0;
}

@keyframes steamRise {
    0% {
        transform: translateY(0) translateX(0) scaleY(0.8);
        opacity: 0;
    }
    10% {
        opacity: 0.12;
    }
    50% {
        transform: translateY(-40vh) translateX(var(--steam-sway, 15px)) scaleY(1.2);
        opacity: 0.08;
    }
    100% {
        transform: translateY(-80vh) translateX(var(--steam-sway-end, -10px)) scaleY(1.5);
        opacity: 0;
    }
}

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

.spore {
    position: absolute;
    width: var(--spore-size, 3px);
    height: var(--spore-size, 3px);
    background: #C4A535;
    border-radius: 50%;
    opacity: 0;
    animation: sporeDrift var(--spore-duration, 8s) var(--spore-delay, 0s) infinite ease-in-out;
}

@keyframes sporeDrift {
    0% {
        transform: translate(0, 0);
        opacity: 0;
    }
    15% {
        opacity: 0.3;
    }
    50% {
        transform: translate(var(--spore-x, 30px), var(--spore-y, -60px));
        opacity: 0.2;
    }
    85% {
        opacity: 0.1;
    }
    100% {
        transform: translate(var(--spore-x-end, -20px), var(--spore-y-end, -120px));
        opacity: 0;
    }
}

/* --- Hero Content --- */
.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
}

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

.title-gabs {
    font-family: 'Cormorant', serif;
    font-weight: 700;
    font-size: clamp(60px, 14vw, 180px);
    letter-spacing: 0.02em;
    color: #E8DCC8;
    line-height: 0.9;
    opacity: 0;
    transform: translateY(100%);
    animation: growUp 700ms 500ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

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

.title-shelf {
    display: flex;
    align-items: center;
    gap: 0;
    margin-top: -0.1em;
}

.shelf-line {
    display: inline-block;
    width: 0;
    height: 2px;
    background: #C4A535;
    animation: drawLine 300ms 1200ms ease-out forwards;
    vertical-align: middle;
}

@keyframes drawLine {
    to {
        width: clamp(40px, 8vw, 100px);
    }
}

.title-cafe {
    font-family: 'Cormorant', serif;
    font-weight: 600;
    font-size: clamp(28px, 6vw, 72px);
    color: #F5F2ED;
    letter-spacing: 0.05em;
    opacity: 0;
    animation: fadeInCafe 200ms 1500ms ease-out forwards;
}

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

.title-cafe::first-letter {
    color: #39FF14;
    text-shadow: 0 0 10px #39FF14, 0 0 20px rgba(57, 255, 20, 0.3);
    animation: neonPulseOnce 400ms 1700ms ease-in-out;
}

@keyframes neonPulseOnce {
    0% { text-shadow: 0 0 10px #39FF14, 0 0 20px rgba(57, 255, 20, 0.3); }
    50% { text-shadow: 0 0 20px #39FF14, 0 0 40px rgba(57, 255, 20, 0.6), 0 0 60px rgba(57, 255, 20, 0.2); }
    100% { text-shadow: 0 0 10px #39FF14, 0 0 20px rgba(57, 255, 20, 0.3); }
}

.hero-tagline {
    font-family: 'Caveat Brush', cursive;
    font-size: clamp(16px, 2.5vw, 28px);
    color: #C4A535;
    opacity: 0;
    margin-top: 1rem;
    animation: fadeInCafe 400ms 2000ms ease-out forwards;
}

/* --- Mushroom Decorations --- */
.hero-mushrooms {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
}

.mushroom {
    position: absolute;
    transform: scale(0);
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mush-1 {
    bottom: 8%;
    left: 8%;
    animation: mushPop 300ms 1700ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.mush-2 {
    bottom: 12%;
    left: 15%;
    animation: mushPop 300ms 1850ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.mush-3 {
    bottom: 5%;
    right: 20%;
    animation: mushPop 300ms 2000ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.mush-4 {
    bottom: 10%;
    right: 6%;
    animation: mushPop 300ms 2150ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.mush-5 {
    top: 15%;
    left: 5%;
    animation: mushPop 300ms 2300ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.mush-6 {
    top: 10%;
    right: 10%;
    animation: mushPop 300ms 2450ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes mushPop {
    0% {
        transform: scale(0) rotate(-10deg);
    }
    70% {
        transform: scale(1.15) rotate(3deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

/* --- Scroll Indicator --- */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    animation: fadeInCafe 500ms 2400ms ease-out forwards;
}

.scroll-text {
    font-family: 'Caveat Brush', cursive;
    font-size: 16px;
    color: #C4A535;
    text-transform: lowercase;
}

.scroll-arrow {
    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;
    height: 100vh;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

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

/* --- Station Panels --- */
.panel-station {
    flex: 0 0 100vw;
    width: 100vw;
    height: 100vh;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2E1F0F;
    position: relative;
}

.panel-station:nth-child(even) {
    background: linear-gradient(135deg, #2E1F0F 0%, rgba(92, 61, 33, 0.15) 50%, #2E1F0F 100%);
}

.panel-station:nth-child(odd) {
    background: linear-gradient(225deg, #2E1F0F 0%, rgba(107, 58, 110, 0.08) 50%, #2E1F0F 100%);
}

/* Panel Steam */
.panel-steam {
    position: absolute;
    top: 0;
    width: 120px;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

.panel-steam::before,
.panel-steam::after {
    content: '';
    position: absolute;
    bottom: 20%;
    width: 3px;
    height: 50px;
    background: rgba(245, 242, 237, 0.06);
    border-radius: 50%;
    animation: steamRise 7s infinite ease-out;
}

.panel-steam::after {
    left: 40px;
    height: 70px;
    animation-delay: 2s;
    animation-duration: 9s;
}

.steam-left {
    left: 0;
}

.steam-left::before {
    left: 30px;
}

.steam-right {
    right: 0;
}

.steam-right::before {
    right: 30px;
}

.steam-right::after {
    left: auto;
    right: 60px;
}

/* Panel Inner */
.panel-inner {
    position: relative;
    z-index: 5;
    max-width: 680px;
    padding: 2rem;
}

.station-label {
    font-family: 'Caveat Brush', cursive;
    font-size: clamp(14px, 1.2vw, 18px);
    color: #C4A535;
    text-transform: lowercase;
    display: block;
    margin-bottom: 0.5rem;
    opacity: 0.7;
}

.station-title {
    font-family: 'Cormorant', serif;
    font-weight: 700;
    font-size: clamp(36px, 6vw, 80px);
    color: #E8DCC8;
    margin-bottom: 0.25rem;
    line-height: 1;
}

.station-subtitle {
    font-family: 'Caveat Brush', cursive;
    font-size: clamp(18px, 2vw, 26px);
    margin-bottom: 2rem;
}

.station-content p {
    color: #E8DCC8;
    opacity: 0.85;
    margin-bottom: 1.2rem;
    max-width: 55ch;
}

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

.neon-glow.pulse {
    text-shadow: 0 0 15px #39FF14, 0 0 30px rgba(57, 255, 20, 0.5), 0 0 50px rgba(57, 255, 20, 0.15);
}

/* Mushroom Accents in Panels */
.mushroom-accent {
    position: absolute;
    bottom: 10%;
    right: 5%;
    z-index: 4;
    opacity: 0.8;
}

.accent-mush {
    position: relative;
    transition: transform 0.15s ease-out;
}

/* --- Menu Board Panel --- */
.panel-menu {
    background: #1a1208 !important;
}

.chalkboard-texture {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 50%, rgba(46, 31, 15, 0.5) 0%, rgba(26, 18, 8, 0.9) 100%),
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(245, 242, 237, 0.01) 2px, rgba(245, 242, 237, 0.01) 3px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(245, 242, 237, 0.01) 2px, rgba(245, 242, 237, 0.01) 3px);
    border: 3px solid #5C3D21;
    pointer-events: none;
    z-index: 1;
}

.menu-inner {
    text-align: center;
    max-width: 700px;
}

.menu-title {
    font-family: 'Caveat Brush', cursive;
    font-size: clamp(32px, 5vw, 60px);
    color: #E8DCC8;
    margin-bottom: 2.5rem;
    text-decoration: underline;
    text-decoration-color: #C4A535;
    text-underline-offset: 0.3em;
    text-decoration-thickness: 2px;
}

.menu-board {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.menu-item {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0 1rem;
}

.menu-item-name {
    font-family: 'Caveat Brush', cursive;
    font-size: clamp(20px, 2.5vw, 30px);
    color: #C4A535;
    white-space: nowrap;
    flex-shrink: 0;
}

.menu-dots {
    flex: 1;
    border-bottom: 2px dotted rgba(232, 220, 200, 0.2);
    margin-bottom: 0.3em;
    min-width: 20px;
}

.menu-item-desc {
    font-family: 'Cormorant', serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(14px, 1.4vw, 18px);
    color: #F5F2ED;
    opacity: 0.7;
    white-space: nowrap;
    flex-shrink: 0;
}

.menu-footer {
    font-family: 'Caveat Brush', cursive;
    font-size: clamp(14px, 1.5vw, 20px);
    color: #39FF14;
    text-shadow: 0 0 10px #39FF14, 0 0 20px rgba(57, 255, 20, 0.3);
    margin-top: 2rem;
    opacity: 0.8;
}

.menu-mushrooms {
    position: absolute;
    bottom: 5%;
    left: 5%;
    z-index: 4;
}

.menu-mush-1 {
    position: absolute;
    bottom: 0;
    left: 0;
}

.menu-mush-2 {
    position: absolute;
    bottom: 10px;
    left: 40px;
}

/* --- Visibility States --- */
.panel-hero {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.panel-hero.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(1.05);
}

/* --- Panel Transitions --- */
.panel-station .panel-inner {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.panel-station.visible .panel-inner {
    opacity: 1;
    transform: translateY(0);
}

/* --- Grain Overlay (global) --- */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.5;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .panel-inner {
        padding: 1.5rem;
    }

    .menu-item {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.2rem;
    }

    .menu-dots {
        display: none;
    }

    .menu-item-desc {
        white-space: normal;
        text-align: center;
    }

    .mushroom-accent {
        display: none;
    }

    .hero-mushrooms .mushroom {
        transform: scale(0.7) !important;
    }

    .scroll-indicator {
        bottom: 1rem;
        right: 1rem;
    }
}
