/* ========================================
   xity.bar - Pop Art Comic Book Bar
   ======================================== */

/* ---------- CSS Custom Properties ---------- */
:root {
    --ink-black: #0A0A0A;
    --midnight-panel: #1A1028;
    --electric-cyan: #00D4FF;
    --electric-magenta: #FF2D7B;
    --neon-maize: #FFD23F;
    --chalk-white: #F0EDE6;
    --haze-gray: #8B8694;
    --deep-violet: #2D1B4E;
    --bruised-blue: #162447;
    --skyline-dark: #13101C;

    --font-display: 'Bangers', cursive;
    --font-body: 'Barlow Semi Condensed', sans-serif;
    --font-mono: 'Share Tech Mono', monospace;

    --border-thin: 3px solid var(--ink-black);
    --border-medium: 4px solid var(--ink-black);
    --border-thick: 6px solid var(--ink-black);
    --border-hero: 8px solid var(--ink-black);

    --spring-easing: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background: var(--ink-black);
    color: var(--chalk-white);
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(0.95rem, 1.8vw, 1.15rem);
    letter-spacing: 0.01em;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ---------- Ben-Day Dot Overlays ---------- */
.ben-day-dots {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.ben-day-dots.cyan-dots {
    background-image: radial-gradient(circle, var(--electric-cyan) 1.5px, transparent 1.5px);
    background-size: 6px 6px;
    opacity: 0.08;
}

.ben-day-dots.magenta-dots {
    background-image: radial-gradient(circle, var(--electric-magenta) 1.5px, transparent 1.5px);
    background-size: 6px 6px;
    opacity: 0.08;
}

/* ---------- Panel Base ---------- */
.panel {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    outline: var(--border-medium);
    outline-offset: -4px;
}

/* ---------- Typography ---------- */
.section-headline {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 4rem);
    font-weight: 400;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 0.95;
    color: var(--chalk-white);
    margin-bottom: 1rem;
}

.body-text {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(0.95rem, 1.8vw, 1.15rem);
    line-height: 1.6;
    letter-spacing: 0.01em;
    color: var(--chalk-white);
    margin-bottom: 1rem;
}

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

/* ---------- Onomatopoeia ---------- */
.onomatopoeia {
    font-family: var(--font-display);
    font-size: clamp(4rem, 12vw, 10rem);
    font-weight: 400;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 0.95;
    background: linear-gradient(135deg, var(--neon-maize), var(--electric-magenta));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    paint-order: stroke fill;
    -webkit-text-stroke: 2px var(--ink-black);
    position: absolute;
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    transform: scale(0.3);
    transition: opacity 0.4s ease, transform 0.6s var(--spring-easing);
}

.onomatopoeia.visible {
    opacity: 1;
    transform: scale(1);
}

/* ---------- Panel 1: Splash Page ---------- */
.panel-splash {
    background: var(--deep-violet);
    display: flex;
    align-items: center;
    justify-content: center;
    outline: var(--border-hero);
    outline-offset: -8px;
}

.splash-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.splash-title {
    font-family: var(--font-display);
    font-weight: 400;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 0.95;
    font-size: clamp(3rem, 10vw, 9rem);
    display: flex;
    flex-direction: column;
    gap: 0;
    opacity: 0;
    transform: scale(0.5);
    animation: splash-enter 0.8s var(--spring-easing) 0.2s forwards;
}

.title-xity {
    color: var(--electric-cyan);
    text-shadow: 4px 4px 0 var(--ink-black);
}

.title-bar {
    color: var(--electric-magenta);
    text-shadow: 4px 4px 0 var(--ink-black);
}

.ono-pow {
    top: 8%;
    right: 5%;
    font-size: clamp(3rem, 8vw, 7rem);
    transform: scale(0.3) rotate(-12deg);
}

.ono-pow.visible {
    transform: scale(1) rotate(-12deg);
}

@keyframes splash-enter {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ---------- Panel 2: The Setting ---------- */
.panel-setting {
    background: var(--midnight-panel);
    outline: var(--border-thick);
    outline-offset: -6px;
}

.panel-grid-2col {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 60fr 40fr;
    min-height: 100vh;
    gap: 0;
}

.setting-text-panel {
    padding: clamp(2rem, 5vw, 5rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: var(--border-medium);
}

.setting-text-panel .section-headline {
    color: var(--neon-maize);
    margin-bottom: 1.5rem;
}

.setting-image-panel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--deep-violet);
    padding: 2rem;
}

/* Bar illustration */
.bar-illustration {
    position: relative;
    width: 100%;
    max-width: 300px;
    height: 280px;
}

.bar-shelf {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 12px;
    padding: 0 10px;
}

.shelf-top {
    position: absolute;
    bottom: 150px;
    left: 0;
    right: 0;
    border-bottom: 3px solid var(--haze-gray);
}

.shelf-bottom {
    position: absolute;
    bottom: 85px;
    left: 0;
    right: 0;
    border-bottom: 3px solid var(--haze-gray);
}

.bottle {
    border-radius: 2px 2px 0 0;
    flex-shrink: 0;
}

.bar-counter {
    position: absolute;
    bottom: 30px;
    left: 0;
    right: 0;
    height: 8px;
    background: var(--haze-gray);
    border-radius: 2px;
}

.bar-counter-front {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: var(--bruised-blue);
    border-top: 3px solid var(--haze-gray);
}

/* Speech bubbles */
.speech-bubble {
    position: relative;
    background: var(--chalk-white);
    color: var(--ink-black);
    font-family: var(--font-display);
    font-size: clamp(1rem, 2vw, 1.4rem);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    padding: 1.2rem 1.5rem;
    border-radius: 30px;
    border: 3px solid var(--ink-black);
    z-index: 5;
    line-height: 1.1;
}

.bubble-tail {
    position: absolute;
    bottom: -20px;
    left: 30px;
    width: 0;
    height: 0;
    border-width: 20px;
    border-style: solid;
    border-color: transparent;
    border-top-color: var(--chalk-white);
}

.bubble-tail::after {
    content: '';
    position: absolute;
    top: -23px;
    left: -22px;
    width: 0;
    height: 0;
    border-width: 22px;
    border-style: solid;
    border-color: transparent;
    border-top-color: var(--ink-black);
    z-index: -1;
}

.bubble-setting {
    position: absolute;
    bottom: 15%;
    left: -40px;
    transform: rotate(-2deg);
    max-width: 280px;
}

/* ---------- Panel 3: The Menu ---------- */
.panel-menu {
    background: var(--ink-black);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(2rem, 4vw, 4rem);
}

.menu-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 0;
    width: 100%;
    max-width: 1200px;
    min-height: 80vh;
}

.menu-subpanel {
    position: relative;
    padding: clamp(1.5rem, 3vw, 3rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    outline: var(--border-medium);
    outline-offset: -4px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: default;
}

.menu-subpanel:hover {
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(255, 45, 123, 0.4), 0 0 60px rgba(255, 45, 123, 0.15);
    z-index: 3;
}

.menu-subpanel:hover .ben-day-dots {
    opacity: 0.2;
}

.subpanel-drinks {
    background: var(--deep-violet);
}

.subpanel-atmosphere {
    background: var(--bruised-blue);
}

.subpanel-music {
    background: var(--bruised-blue);
}

.subpanel-location {
    background: var(--deep-violet);
}

.subpanel-drinks .section-headline {
    color: var(--electric-cyan);
}

.subpanel-atmosphere .section-headline {
    color: var(--electric-magenta);
}

.subpanel-music .section-headline {
    color: var(--neon-maize);
}

.subpanel-location .section-headline {
    color: var(--electric-cyan);
}

/* Overlap effect on menu subpanels */
.subpanel-drinks {
    margin-right: -8px;
    margin-bottom: -8px;
}

.subpanel-atmosphere {
    margin-left: -4px;
    margin-bottom: -4px;
}

.subpanel-music {
    margin-right: -4px;
    margin-top: -4px;
}

.subpanel-location {
    margin-left: -8px;
    margin-top: -8px;
}

/* ---------- Panel 4: The Action Sequence ---------- */
.panel-action {
    background: var(--midnight-panel);
    outline: var(--border-thick);
    outline-offset: -6px;
    display: flex;
    align-items: center;
}

.action-scroll-container {
    position: relative;
    z-index: 2;
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    width: 100%;
    height: 100vh;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.action-scroll-container::-webkit-scrollbar {
    display: none;
}

.action-frame {
    position: relative;
    flex: 0 0 100vw;
    width: 100vw;
    height: 100vh;
    scroll-snap-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    outline: var(--border-medium);
    outline-offset: -4px;
}

.frame-1 {
    background: var(--deep-violet);
}

.frame-2 {
    background: var(--bruised-blue);
}

.frame-3 {
    background: var(--deep-violet);
}

.frame-4 {
    background: var(--bruised-blue);
}

.frame-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    padding: 2rem;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s var(--spring-easing);
}

.frame-content.visible {
    opacity: 1;
    transform: translateY(0);
}

.action-frame .section-headline {
    color: var(--neon-maize);
    margin-bottom: 1rem;
}

.ono-clink {
    bottom: 10%;
    right: 8%;
    font-size: clamp(2.5rem, 6vw, 5rem);
    transform: scale(0.3) rotate(8deg);
}
.ono-clink.visible {
    transform: scale(1) rotate(8deg);
}

.ono-pour {
    top: 12%;
    left: 8%;
    font-size: clamp(2.5rem, 6vw, 5rem);
    transform: scale(0.3) rotate(-6deg);
}
.ono-pour.visible {
    transform: scale(1) rotate(-6deg);
}

.ono-cheers {
    bottom: 15%;
    right: 10%;
    font-size: clamp(2.5rem, 6vw, 5rem);
    transform: scale(0.3) rotate(10deg);
}
.ono-cheers.visible {
    transform: scale(1) rotate(10deg);
}

.ono-fizz {
    top: 10%;
    right: 12%;
    font-size: clamp(2.5rem, 6vw, 5rem);
    transform: scale(0.3) rotate(-8deg);
}
.ono-fizz.visible {
    transform: scale(1) rotate(-8deg);
}

/* ---------- Panel 5: The Close-Up ---------- */
.panel-closeup {
    background: var(--bruised-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    outline: var(--border-thick);
    outline-offset: -6px;
}

.closeup-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 900px;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bubble-closeup {
    width: 70vw;
    max-width: 800px;
    padding: clamp(2rem, 4vw, 4rem);
    text-align: center;
    font-size: clamp(1.5rem, 3.5vw, 3rem);
    line-height: 1.1;
}

.closeup-quote {
    text-shadow: 3px 3px 0 var(--ink-black);
    -webkit-text-stroke: 0;
    color: var(--ink-black);
}

.bubble-tail-down {
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
}

/* ---------- Panel 6: The Credits ---------- */
.panel-credits {
    background: var(--ink-black);
    display: flex;
    align-items: center;
    justify-content: center;
    outline: var(--border-medium);
    outline-offset: -4px;
    padding-bottom: 140px;
}

.credits-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
}

.credits-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 400;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 0.95;
    color: var(--chalk-white);
    margin-bottom: 2rem;
}

.credits-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.credit-link {
    display: inline-block;
    background: var(--neon-maize);
    color: var(--ink-black);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border: 2px solid var(--ink-black);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.credit-link:hover {
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(255, 45, 123, 0.4), 0 0 60px rgba(255, 45, 123, 0.15);
}

.ono-fin {
    position: relative;
    font-size: clamp(3rem, 8vw, 7rem);
    transform: scale(0.3);
}

.ono-fin.visible {
    transform: scale(1);
}

/* ---------- Bottom Dot Navigation ---------- */
.dot-navigation {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 16px;
    z-index: 100;
    padding: 8px 16px;
    background: rgba(10, 10, 10, 0.7);
    border-radius: 30px;
    backdrop-filter: blur(8px);
}

.dot-btn {
    position: relative;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--haze-gray);
    background: transparent;
    cursor: pointer;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    padding: 0;
}

.dot-btn:hover {
    background: var(--electric-cyan);
    border-color: var(--electric-cyan);
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.5);
}

.dot-btn.active {
    background: var(--electric-magenta);
    border-color: var(--electric-magenta);
    animation: pulse-attention 1.5s ease-in-out infinite;
}

.dot-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--chalk-white);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.dot-btn:hover .dot-tooltip {
    opacity: 1;
}

@keyframes pulse-attention {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(255, 45, 123, 0.4), 0 0 60px rgba(255, 45, 123, 0.15);
    }
    50% {
        transform: scale(1.3);
        box-shadow: 0 0 30px rgba(255, 45, 123, 0.6), 0 0 80px rgba(255, 45, 123, 0.25);
    }
}

/* ---------- City Skyline ---------- */
.city-skyline {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    z-index: 50;
    pointer-events: none;
}

.city-skyline svg {
    width: 100%;
    height: 100%;
}

/* ---------- Neon Glow Animation ---------- */
@keyframes neon-pulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 45, 123, 0.4), 0 0 60px rgba(255, 45, 123, 0.15);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 45, 123, 0.6), 0 0 80px rgba(255, 45, 123, 0.25);
    }
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .panel-grid-2col {
        grid-template-columns: 1fr;
    }

    .setting-text-panel {
        border-right: none;
        border-bottom: var(--border-medium);
    }

    .setting-image-panel {
        min-height: 50vh;
    }

    .bubble-setting {
        position: relative;
        bottom: auto;
        left: auto;
        transform: rotate(-2deg);
        margin-top: 1.5rem;
    }

    .menu-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .subpanel-drinks,
    .subpanel-atmosphere,
    .subpanel-music,
    .subpanel-location {
        margin: 0;
        min-height: 40vh;
    }

    .bubble-closeup {
        width: 90vw;
    }

    .credits-links {
        flex-direction: column;
        align-items: center;
    }

    .action-frame {
        flex: 0 0 100vw;
    }
}

@media (max-width: 480px) {
    .splash-title {
        font-size: clamp(2.5rem, 15vw, 5rem);
    }

    .onomatopoeia {
        font-size: clamp(2rem, 8vw, 4rem);
    }

    .ono-pow {
        font-size: clamp(2rem, 8vw, 4rem);
    }
}
