/* === gabs.bar — Neon Digital Speakeasy === */

:root {
    --void: #0a0a0f;
    --surface: #18181f;
    --magenta: #ff2d7b;
    --cyan: #00f5d4;
    --chartreuse: #c8ff00;
    --chalk: #e8e4dd;
    --red: #ff0000;
    --green: #00ff00;
    --blue: #0000ff;
    --ease-enter: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-glitch: cubic-bezier(0.55, 0.085, 0.68, 0.53);
    --gutter: 8px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--void);
    color: var(--chalk);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.2vw, 1.1rem);
    letter-spacing: 0.02em;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* === Scanlines Overlay === */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 2px,
        rgba(0, 0, 0, 0.08) 2px,
        rgba(0, 0, 0, 0.08) 4px
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.scanlines.active {
    opacity: 1;
}

/* === Typography === */
.caveat {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.0;
}

.space-grotesk {
    font-family: 'Space Grotesk', sans-serif;
}

.fira {
    font-family: 'Fira Code', monospace;
    font-weight: 400;
    color: var(--cyan);
    font-size: clamp(0.75rem, 1vw, 0.95rem);
}

/* === Dot Navigation === */
.dot-nav {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dot-nav__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1.5px solid var(--magenta);
    background: transparent;
    cursor: pointer;
    transition: background 0.3s var(--ease-enter), box-shadow 0.3s var(--ease-enter);
    padding: 0;
}

.dot-nav__dot.active {
    background: var(--magenta);
    box-shadow: 0 0 8px var(--magenta);
}

.dot-nav__dot:hover {
    background: var(--chartreuse);
    border-color: var(--chartreuse);
    box-shadow: 0 0 8px var(--chartreuse);
}

/* === Header Bar === */
.header-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 900;
    display: flex;
    align-items: center;
    padding: 0 24px;
    transform: translateY(-100%);
    transition: transform 0.4s var(--ease-enter);
}

.header-bar.visible {
    transform: translateY(0);
}

.header-bar__logo {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--magenta);
    text-shadow: 0 0 10px var(--magenta), 0 0 30px rgba(255, 45, 123, 0.3);
}

/* === Hero Section === */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero__glow-vignette {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(ellipse at center, rgba(255, 45, 123, 0.12) 0%, var(--void) 70%);
    pointer-events: none;
}

.hero__title-svg {
    width: clamp(300px, 70vw, 800px);
    height: auto;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hero__title-svg.visible {
    opacity: 1;
}

.hero__title-text {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: 100px;
    fill: none;
    stroke: var(--magenta);
    stroke-width: 2;
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transition: fill 0.6s ease;
}

.hero__title-text.drawing {
    animation: strokeDraw 1.2s var(--ease-enter) forwards;
}

.hero__title-text.glowing {
    fill: var(--magenta);
    stroke: var(--magenta);
    filter: drop-shadow(0 0 10px var(--magenta)) drop-shadow(0 0 30px var(--magenta)) drop-shadow(0 0 60px var(--magenta));
}

@keyframes strokeDraw {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes neonPulse {
    0%, 100% {
        filter: drop-shadow(0 0 10px var(--magenta)) drop-shadow(0 0 30px var(--magenta)) drop-shadow(0 0 60px var(--magenta)) drop-shadow(0 0 100px rgba(255,45,123,0.2));
    }
    50% {
        filter: drop-shadow(0 0 10px var(--magenta)) drop-shadow(0 0 30px var(--magenta)) drop-shadow(0 0 60px var(--magenta)) drop-shadow(0 0 100px rgba(255,45,123,0.6));
    }
}

.hero__title-text.pulsing {
    animation: neonPulse 3s ease-in-out infinite;
    fill: var(--magenta);
    stroke: var(--magenta);
}

.hero__sparkline-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 10%;
    z-index: 5;
}

.hero__sparkline {
    width: 100%;
    height: 100%;
}

.sparkline-river {
    stroke-dasharray: 3000;
    stroke-dashoffset: 3000;
    animation: sparklineFlow 8s linear infinite;
}

.sparkline-river--hero {
    animation-delay: 0.5s;
}

@keyframes sparklineFlow {
    0% {
        stroke-dashoffset: 3000;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

/* === Cluster Sections === */
.cluster {
    padding: 60px 24px;
    min-height: 100vh;
}

/* === Modular Grid === */
.modular-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--gutter);
    max-width: 1200px;
    margin: 0 auto;
    grid-auto-rows: minmax(60px, auto);
}

/* Cluster 1 grid layout */
.modular-grid--cluster1 .block:nth-child(1) { grid-column: 1 / 2; grid-row: 1 / 2; }
.modular-grid--cluster1 .block:nth-child(2) { grid-column: 2 / 3; grid-row: 1 / 2; }
.modular-grid--cluster1 .block:nth-child(3) { grid-column: 3 / 6; grid-row: 1 / 3; }
.modular-grid--cluster1 .block:nth-child(4) { grid-column: 1 / 3; grid-row: 2 / 4; }
.modular-grid--cluster1 .block:nth-child(5) { grid-column: 6 / 7; grid-row: 1 / 2; }
.modular-grid--cluster1 .block:nth-child(6) { grid-column: 1 / 7; grid-row: 4 / 7; }

/* Cluster 2 grid layout */
.modular-grid--cluster2 .block:nth-child(1) { grid-column: 1 / 4; grid-row: 1 / 3; }
.modular-grid--cluster2 .block:nth-child(2) { grid-column: 4 / 5; grid-row: 1 / 2; }
.modular-grid--cluster2 .block:nth-child(3) { grid-column: 1 / 7; grid-row: 3 / 6; }
.modular-grid--cluster2 .block:nth-child(4) { grid-column: 5 / 7; grid-row: 1 / 3; }
.modular-grid--cluster2 .block:nth-child(5) { grid-column: 1 / 2; grid-row: 6 / 7; }
.modular-grid--cluster2 .block:nth-child(6) { grid-column: 2 / 3; grid-row: 6 / 7; }
.modular-grid--cluster2 .block:nth-child(7) { grid-column: 3 / 7; grid-row: 6 / 8; }

/* Cluster 3 grid layout */
.modular-grid--cluster3 .block:nth-child(1) { grid-column: 1 / 4; grid-row: 1 / 3; }
.modular-grid--cluster3 .block:nth-child(2) { grid-column: 4 / 5; grid-row: 1 / 2; }
.modular-grid--cluster3 .block:nth-child(3) { grid-column: 1 / 7; grid-row: 3 / 6; }
.modular-grid--cluster3 .block:nth-child(4) { grid-column: 5 / 6; grid-row: 1 / 2; }
.modular-grid--cluster3 .block:nth-child(5) { grid-column: 4 / 7; grid-row: 6 / 8; }
.modular-grid--cluster3 .block:nth-child(6) { grid-column: 1 / 4; grid-row: 6 / 8; }
.modular-grid--cluster3 .block:nth-child(7) { grid-column: 6 / 7; grid-row: 1 / 2; }

/* Cluster 4 grid layout */
.modular-grid--cluster4 .block:nth-child(1) { grid-column: 1 / 7; grid-row: 1 / 5; }
.modular-grid--cluster4 .block:nth-child(2) { grid-column: 1 / 4; grid-row: 5 / 7; }
.modular-grid--cluster4 .block:nth-child(3) { grid-column: 6 / 7; grid-row: 5 / 6; }

/* === Block Base === */
.block {
    position: relative;
    background: var(--surface);
    overflow: hidden;
    box-shadow: inset 0 0 1px rgba(255, 45, 123, 0.15);
    transition: box-shadow 0.3s var(--ease-enter);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 16px;
}

.block:hover {
    box-shadow: inset 0 0 4px rgba(255, 45, 123, 0.6);
}

/* === Block Sizes === */
.block--shot {
    min-height: 80px;
    min-width: 80px;
}

.block--pint {
    min-height: 160px;
}

.block--pitcher {
    min-height: 240px;
}

/* === Block Slide Animation === */
.block--slide {
    opacity: 0;
    will-change: transform, opacity;
    transition: transform 0.6s var(--ease-enter), opacity 0.6s var(--ease-enter);
}

.block--slide[data-direction="left"] {
    transform: translateX(-60px) rotate(-2deg);
}

.block--slide[data-direction="right"] {
    transform: translateX(60px) rotate(2deg);
}

.block--slide[data-direction="top"] {
    transform: translateY(-60px) rotate(2deg);
}

.block--slide[data-direction="bottom"] {
    transform: translateY(60px) rotate(-2deg);
}

.block--slide.revealed {
    opacity: 1;
    transform: translateX(0) translateY(0) rotate(0deg);
}

/* === Block Content === */
.block__headline {
    font-size: clamp(1.5rem, 4vw, 3rem);
    color: var(--magenta);
    text-shadow: 0 0 10px rgba(255, 45, 123, 0.5);
    margin-bottom: 8px;
}

.block__body {
    font-size: clamp(0.85rem, 1.1vw, 1rem);
    color: var(--chalk);
    opacity: 0.85;
    line-height: 1.6;
}

.block__data {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: clamp(0.75rem, 1vw, 0.95rem);
    text-align: center;
}

.big-counter {
    font-size: clamp(1.2rem, 2vw, 1.8rem);
}

/* === Bar Chart Silhouettes === */
.block__bar-silhouettes {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
    padding: 4px;
    pointer-events: none;
}

.block__bar-silhouettes::before {
    content: '';
    display: block;
    width: 6px;
    height: 60%;
    background: var(--void);
}

.block__bar-silhouettes::after {
    content: '';
    display: block;
    width: 6px;
    height: 40%;
    background: var(--void);
}

/* === Neon Dot === */
.neon-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--magenta);
    box-shadow: 0 0 8px var(--magenta), 0 0 20px rgba(255, 45, 123, 0.4);
    animation: dotPulse 2s ease-in-out infinite;
}

.neon-dot--cyan {
    background: var(--cyan);
    box-shadow: 0 0 8px var(--cyan), 0 0 20px rgba(0, 245, 212, 0.4);
}

.neon-dot--chartreuse {
    background: var(--chartreuse);
    box-shadow: 0 0 8px var(--chartreuse), 0 0 20px rgba(200, 255, 0, 0.4);
}

@keyframes dotPulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.3); }
}

/* === Flourishes === */
.flourish {
    width: 100%;
    max-width: 300px;
    height: auto;
    overflow: visible;
}

.flourish__path {
    stroke-dasharray: 800;
    stroke-dashoffset: 800;
    transition: stroke-dashoffset 0.6s ease-out;
}

.block.revealed .flourish__path {
    stroke-dashoffset: 0;
}

.flourish--arrows {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* === Sparkline SVGs === */
.sparkline-svg {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
}

/* === Canvas Elements === */
.scatter-canvas,
.barchart-canvas,
.generative-canvas {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
}

/* === Glitch Text === */
.glitch-text {
    position: relative;
}

@keyframes rgbSplit {
    0% {
        text-shadow: 0 0 10px rgba(255, 45, 123, 0.5);
    }
    25% {
        text-shadow: -2px 0 var(--red), 2px 0 var(--blue), 0 0 10px rgba(255, 45, 123, 0.5);
    }
    50% {
        text-shadow: 2px 0 var(--red), -2px 0 var(--blue), 0 0 10px rgba(255, 45, 123, 0.5);
    }
    75% {
        text-shadow: -1px 1px var(--red), 1px -1px var(--blue), 0 0 10px rgba(255, 45, 123, 0.5);
    }
    100% {
        text-shadow: 0 0 10px rgba(255, 45, 123, 0.5);
    }
}

.glitch-text.glitching {
    animation: rgbSplit 0.15s var(--ease-glitch) forwards;
}

/* === Final Pour === */
.final-pour {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 70%;
    overflow: hidden;
}

.final-pour__text {
    font-size: clamp(4rem, 15vw, 12rem);
    color: transparent;
    -webkit-text-stroke: 2px var(--magenta);
    text-shadow: none;
    position: relative;
    z-index: 2;
}

.final-pour__fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: var(--magenta);
    mix-blend-mode: screen;
    transition: height 3s var(--ease-enter);
    z-index: 1;
    opacity: 0.3;
}

.block--final.revealed .final-pour__fill {
    height: 100%;
}

.final-tagline {
    font-size: 0.9rem;
    text-align: center;
    margin-top: 16px;
    opacity: 0.7;
    letter-spacing: 0.05em;
}

/* === Block Stutter (applied via JS) === */
@keyframes blockStutter {
    0% { transform: translate(0, 0); }
    25% { transform: translate(4px, -2px); }
    50% { transform: translate(-3px, 4px); }
    75% { transform: translate(2px, 1px); }
    100% { transform: translate(0, 0); }
}

.block.stuttering {
    animation: blockStutter 0.05s var(--ease-glitch) forwards;
}

/* === Responsive === */
@media (max-width: 768px) {
    .modular-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .modular-grid--cluster1 .block:nth-child(1) { grid-column: 1 / 2; grid-row: auto; }
    .modular-grid--cluster1 .block:nth-child(2) { grid-column: 2 / 3; grid-row: auto; }
    .modular-grid--cluster1 .block:nth-child(3) { grid-column: 1 / 4; grid-row: auto; }
    .modular-grid--cluster1 .block:nth-child(4) { grid-column: 1 / 4; grid-row: auto; }
    .modular-grid--cluster1 .block:nth-child(5) { grid-column: 3 / 4; grid-row: 1 / 2; }
    .modular-grid--cluster1 .block:nth-child(6) { grid-column: 1 / 4; grid-row: auto; }

    .modular-grid--cluster2 .block:nth-child(1) { grid-column: 1 / 4; grid-row: auto; }
    .modular-grid--cluster2 .block:nth-child(2) { grid-column: 1 / 2; grid-row: auto; }
    .modular-grid--cluster2 .block:nth-child(3) { grid-column: 1 / 4; grid-row: auto; }
    .modular-grid--cluster2 .block:nth-child(4) { grid-column: 1 / 4; grid-row: auto; }
    .modular-grid--cluster2 .block:nth-child(5) { grid-column: 2 / 3; grid-row: auto; }
    .modular-grid--cluster2 .block:nth-child(6) { grid-column: 3 / 4; grid-row: auto; }
    .modular-grid--cluster2 .block:nth-child(7) { grid-column: 1 / 4; grid-row: auto; }

    .modular-grid--cluster3 .block:nth-child(1) { grid-column: 1 / 4; grid-row: auto; }
    .modular-grid--cluster3 .block:nth-child(2) { grid-column: 1 / 2; grid-row: auto; }
    .modular-grid--cluster3 .block:nth-child(3) { grid-column: 1 / 4; grid-row: auto; }
    .modular-grid--cluster3 .block:nth-child(4) { grid-column: 2 / 3; grid-row: auto; }
    .modular-grid--cluster3 .block:nth-child(5) { grid-column: 1 / 4; grid-row: auto; }
    .modular-grid--cluster3 .block:nth-child(6) { grid-column: 1 / 4; grid-row: auto; }
    .modular-grid--cluster3 .block:nth-child(7) { grid-column: 3 / 4; grid-row: auto; }

    .modular-grid--cluster4 .block:nth-child(1) { grid-column: 1 / 4; grid-row: auto; }
    .modular-grid--cluster4 .block:nth-child(2) { grid-column: 1 / 4; grid-row: auto; }
    .modular-grid--cluster4 .block:nth-child(3) { grid-column: 1 / 2; grid-row: auto; }

    .dot-nav {
        right: 10px;
    }

    .cluster {
        padding: 40px 12px;
    }
}

@media (max-width: 480px) {
    .modular-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .modular-grid--cluster1 .block,
    .modular-grid--cluster2 .block,
    .modular-grid--cluster3 .block,
    .modular-grid--cluster4 .block {
        grid-column: auto !important;
        grid-row: auto !important;
    }

    .modular-grid--cluster1 .block:nth-child(6),
    .modular-grid--cluster2 .block:nth-child(3),
    .modular-grid--cluster3 .block:nth-child(3),
    .modular-grid--cluster4 .block:nth-child(1) {
        grid-column: 1 / -1 !important;
    }
}