/* ===========================================================
   xity.bar — neon speakeasy mosaic
   palette: midnight void / deep bar / neon magenta / electric cyan
   ========================================================== */

:root {
    --c-void: #0D0D14;
    --c-deep: #151520;
    --c-magenta: #FF2D6B;
    --c-cyan: #00F5D4;
    --c-amber: #FFB627;
    --c-haze: #D4D4E0;
    --c-smoke: #4A2C5E;
    --c-bruise: #1A1A3E;

    --f-display: 'Bebas Neue', 'Impact', sans-serif;
    --f-body: 'Barlow', 'Helvetica Neue', sans-serif;
    --f-mono: 'Courier Prime', 'Courier New', monospace;
    --f-marker: 'Permanent Marker', cursive;
}

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

html, body {
    background: var(--c-void);
    color: var(--c-haze);
    font-family: var(--f-body);
    font-size: 14px;
    line-height: 1.55;
    overflow-x: hidden;
    min-height: 100vh;
}

body {
    /* dim radial wash so cells feel lit from above */
    background:
        radial-gradient(1200px 800px at 20% -10%, rgba(74, 44, 94, 0.35), transparent 60%),
        radial-gradient(900px 600px at 110% 110%, rgba(26, 26, 62, 0.55), transparent 55%),
        var(--c-void);
}

/* ===========================================================
   Film grain overlay
   ========================================================== */
.grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 50;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.04 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    background-size: 200px 200px;
    opacity: 0.55;
    mix-blend-mode: screen;
    animation: grain-jitter 0.18s steps(2) infinite;
}

@keyframes grain-jitter {
    0%   { transform: translate(0, 0); }
    25%  { transform: translate(1px, -1px); }
    50%  { transform: translate(-1px, 1px); }
    75%  { transform: translate(1px, 1px); }
    100% { transform: translate(-1px, -1px); }
}

/* ===========================================================
   Brand mark — floating "X" in top right
   ========================================================== */
.brand-mark {
    position: fixed;
    top: 18px;
    right: 22px;
    z-index: 80;
    text-decoration: none;
    color: var(--c-magenta);
    font-family: var(--f-display);
    letter-spacing: 0.08em;
    line-height: 1;
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
    font-size: 28px;
    text-shadow:
        0 0 7px var(--c-magenta),
        0 0 18px var(--c-magenta),
        0 0 36px rgba(255, 45, 107, 0.65),
        0 0 70px rgba(255, 45, 107, 0.35);
    transition: transform 0.25s ease, letter-spacing 0.25s ease;
}

.brand-mark .brand-x {
    font-size: 36px;
    color: var(--c-magenta);
}
.brand-mark .brand-dot {
    color: var(--c-cyan);
    text-shadow:
        0 0 6px var(--c-cyan),
        0 0 16px var(--c-cyan),
        0 0 32px rgba(0, 245, 212, 0.55);
}
.brand-mark .brand-bar {
    color: var(--c-haze);
    font-size: 18px;
    letter-spacing: 0.12em;
    text-shadow: 0 0 6px rgba(212, 212, 224, 0.35);
}
.brand-mark:hover {
    transform: scale(1.04);
    letter-spacing: 0.12em;
}

/* ===========================================================
   Mosaic — 12 column grid wall
   ========================================================== */
.mosaic {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(150px, auto);
    grid-template-rows: 200px 150px 200px 280px 200px;
    gap: 6px;
    padding: 70px 18px 60px 18px;
    width: 100%;
    min-height: 100vh;
}

/* Cell base */
.cell {
    position: relative;
    grid-column: var(--c1) / var(--c2);
    grid-row: var(--r1) / var(--r2);
    background: rgba(13, 13, 20, 0.95);
    border: 1px solid rgba(255, 45, 107, 0.25);
    overflow: hidden;
    cursor: pointer;
    transition:
        border-color 0.3s ease,
        box-shadow 0.3s ease,
        transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1),
        opacity 0.3s ease;
}

.cell::before {
    /* subtle interior wash so each cell glows faintly */
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(120% 80% at 50% 110%, rgba(74, 44, 94, 0.25), transparent 60%);
    pointer-events: none;
}

.cell:hover {
    border-color: var(--c-magenta);
    box-shadow:
        inset 0 0 20px rgba(255, 45, 107, 0.15),
        0 0 24px rgba(255, 45, 107, 0.18);
    z-index: 6;
}

.cell.is-dimmed {
    opacity: 0.18;
    pointer-events: none;
    filter: saturate(0.4);
}

.cell-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    padding: 14px 16px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cell-inner--center {
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 14px;
}

.cell-inner--ticker {
    padding-bottom: 10px;
}

/* ===========================================================
   Typography
   ========================================================== */
.cell-head {
    font-family: var(--f-display);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 0.92;
    font-size: 64px;
}

.cell-head--sm {
    font-size: 42px;
}

[data-pos="odd"] .cell-head {
    color: var(--c-magenta);
    text-shadow:
        0 0 7px var(--c-magenta),
        0 0 18px var(--c-magenta),
        0 0 36px rgba(255, 45, 107, 0.55),
        0 0 70px rgba(255, 45, 107, 0.25);
}

[data-pos="even"] .cell-head {
    color: var(--c-cyan);
    text-shadow:
        0 0 7px var(--c-cyan),
        0 0 18px var(--c-cyan),
        0 0 36px rgba(0, 245, 212, 0.5),
        0 0 70px rgba(0, 245, 212, 0.22);
}

.meta {
    font-family: var(--f-mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    color: rgba(255, 45, 107, 0.55);
    text-transform: lowercase;
}

.meta--bot {
    margin-top: auto;
}

.cell-sub {
    font-family: var(--f-body);
    font-size: 14px;
    color: var(--c-haze);
    line-height: 1.55;
    max-width: 42ch;
    opacity: 0.85;
}

.cell-body {
    font-size: 14px;
    color: var(--c-haze);
    line-height: 1.55;
}

.cell-body em,
.scrawl em,
.rules-list em {
    color: var(--c-amber);
    font-style: normal;
    text-shadow: 0 0 6px rgba(255, 182, 39, 0.55);
}

/* ===========================================================
   Title cell (cell 01) extras
   ========================================================== */
.cell--title .cell-head {
    font-size: clamp(48px, 8vw, 96px);
    margin-top: 4px;
}

.cell--title .motif--zigzag {
    width: 100%;
    height: 32px;
    margin-top: auto;
}

.motif--zigzag polyline {
    fill: none;
    stroke: var(--c-cyan);
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 4px var(--c-cyan)) drop-shadow(0 0 10px rgba(0, 245, 212, 0.55));
    animation: pulse-soft 6s ease-in-out infinite;
}

/* ===========================================================
   Now playing cell — equalizer
   ========================================================== */
.eq {
    display: flex;
    gap: 4px;
    align-items: flex-end;
    height: 38px;
    margin-top: auto;
}

.eq span {
    flex: 1;
    background: var(--c-cyan);
    box-shadow: 0 0 6px var(--c-cyan), 0 0 14px rgba(0, 245, 212, 0.4);
    border-radius: 1px;
    animation: eq-bar 1.2s ease-in-out infinite;
    transform-origin: bottom;
}

.eq span:nth-child(1)  { animation-delay: -0.10s; --eq-base: 0.45; }
.eq span:nth-child(2)  { animation-delay: -0.42s; --eq-base: 0.7; }
.eq span:nth-child(3)  { animation-delay: -0.18s; --eq-base: 0.3; }
.eq span:nth-child(4)  { animation-delay: -0.55s; --eq-base: 0.85; }
.eq span:nth-child(5)  { animation-delay: -0.30s; --eq-base: 0.55; }
.eq span:nth-child(6)  { animation-delay: -0.71s; --eq-base: 0.9; }
.eq span:nth-child(7)  { animation-delay: -0.22s; --eq-base: 0.4; }
.eq span:nth-child(8)  { animation-delay: -0.49s; --eq-base: 0.65; }
.eq span:nth-child(9)  { animation-delay: -0.16s; --eq-base: 0.35; }
.eq span:nth-child(10) { animation-delay: -0.60s; --eq-base: 0.78; }

@keyframes eq-bar {
    0%, 100% { transform: scaleY(calc(var(--eq-base, 0.4) * 0.6)); }
    50%      { transform: scaleY(var(--eq-base, 0.5)); }
}

.track-name {
    font-family: var(--f-mono);
    color: var(--c-haze);
    margin-top: 6px;
    font-size: 12px;
    letter-spacing: 0.04em;
}

/* ===========================================================
   Hours
   ========================================================== */
.hours-list {
    list-style: none;
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hours-list li {
    display: flex;
    justify-content: space-between;
    font-family: var(--f-mono);
    font-size: 12px;
    color: var(--c-haze);
    border-bottom: 1px dashed rgba(255, 45, 107, 0.18);
    padding: 3px 0;
}

.hours-list li span:first-child {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 45, 107, 0.85);
}

/* ===========================================================
   Cocktail menu
   ========================================================== */
.menu-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
    overflow: hidden;
    flex: 1;
}

.menu-list li {
    display: flex;
    flex-direction: column;
    border-left: 2px solid rgba(0, 245, 212, 0.5);
    padding: 4px 0 4px 10px;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.menu-list li:hover {
    border-left-color: var(--c-cyan);
    transform: translateX(2px);
}

.m-name {
    font-family: var(--f-display);
    font-size: 22px;
    letter-spacing: 0.04em;
    color: var(--c-cyan);
    text-transform: uppercase;
    text-shadow: 0 0 6px rgba(0, 245, 212, 0.5);
}

.m-desc {
    font-family: var(--f-mono);
    font-size: 11px;
    color: rgba(212, 212, 224, 0.7);
    letter-spacing: 0.04em;
}

/* ===========================================================
   Scrawl cell (marker handwriting)
   ========================================================== */
.cell--scrawl .cell-inner {
    justify-content: center;
}

.scrawl {
    font-family: var(--f-marker);
    font-size: 24px;
    line-height: 1.25;
    color: var(--c-cyan);
    text-shadow:
        0 0 4px var(--c-cyan),
        0 0 12px rgba(0, 245, 212, 0.55);
    transform: rotate(-2deg);
}

/* ===========================================================
   Door / address cell
   ========================================================== */
.address-block {
    margin-top: auto;
    font-family: var(--f-mono);
    color: var(--c-amber);
    font-size: 14px;
    letter-spacing: 0.08em;
    line-height: 1.4;
    text-shadow: 0 0 6px rgba(255, 182, 39, 0.5);
}

/* ===========================================================
   Motif circle
   ========================================================== */
.motif--circle circle {
    fill: none;
    stroke: var(--c-magenta);
    stroke-width: 2.2;
    filter: drop-shadow(0 0 4px var(--c-magenta)) drop-shadow(0 0 12px rgba(255, 45, 107, 0.55));
    animation: pulse-soft 5.5s ease-in-out infinite;
    transform-origin: center;
}

.motif--circle .inner {
    stroke: var(--c-cyan);
    stroke-dasharray: 4 6;
    filter: drop-shadow(0 0 4px var(--c-cyan));
    animation: spin-slow 22s linear infinite, pulse-soft 7s ease-in-out infinite;
    transform-origin: 60px 60px;
}

.motif--circle {
    width: 130px;
    height: 130px;
}

@keyframes pulse-soft {
    0%, 100% { opacity: 0.65; }
    50%      { opacity: 1; }
}

@keyframes spin-slow {
    to { transform: rotate(360deg); }
}

/* ===========================================================
   Rules list
   ========================================================== */
.rules-list {
    list-style: none;
    counter-reset: rule;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
}

.rules-list li {
    counter-increment: rule;
    font-family: var(--f-body);
    font-size: 13px;
    color: var(--c-haze);
    padding-left: 28px;
    position: relative;
    line-height: 1.45;
}

.rules-list li::before {
    content: counter(rule, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: 1px;
    font-family: var(--f-mono);
    font-size: 11px;
    color: var(--c-magenta);
    text-shadow: 0 0 6px rgba(255, 45, 107, 0.55);
}

/* ===========================================================
   Tagline cell
   ========================================================== */
.cell--tagline .cell-inner {
    flex-direction: row;
    align-items: center;
    gap: 22px;
}

.motif--spiral {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
}

.motif--spiral path {
    fill: none;
    stroke: var(--c-amber);
    stroke-width: 2;
    stroke-linecap: round;
    filter: drop-shadow(0 0 4px var(--c-amber)) drop-shadow(0 0 12px rgba(255, 182, 39, 0.55));
    animation: pulse-soft 6.5s ease-in-out infinite;
}

.tagline {
    font-family: var(--f-display);
    font-size: clamp(28px, 3.4vw, 44px);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--c-haze);
    line-height: 1;
}
.tagline::after {
    content: ' ✕';
    color: var(--c-magenta);
    text-shadow: 0 0 8px var(--c-magenta);
}

/* ===========================================================
   Ticker cell
   ========================================================== */
.cell--ticker .cell-inner {
    gap: 10px;
}

.ticker {
    flex: 1;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    border-top: 1px dashed rgba(255, 45, 107, 0.25);
    border-bottom: 1px dashed rgba(255, 45, 107, 0.25);
    padding: 8px 0;
    margin-top: auto;
}

.ticker-track {
    display: flex;
    gap: 36px;
    white-space: nowrap;
    will-change: transform;
}

.ticker-track span {
    font-family: var(--f-mono);
    font-size: 12px;
    color: var(--c-cyan);
    letter-spacing: 0.05em;
    text-shadow: 0 0 4px rgba(0, 245, 212, 0.45);
}

.ticker-track span::before {
    content: '◆ ';
    color: var(--c-magenta);
    margin-right: 8px;
    text-shadow: 0 0 4px var(--c-magenta);
}

/* ===========================================================
   Drip animations
   ========================================================== */
.drip {
    position: absolute;
    width: 2px;
    height: 24px;
    background: linear-gradient(to bottom, var(--c-magenta), rgba(255, 45, 107, 0));
    box-shadow: 0 0 8px rgba(255, 45, 107, 0.7);
    bottom: 0;
    pointer-events: none;
    animation: drip-fall 9s ease-in infinite;
    opacity: 0;
}

.drip-a { left: 22%; animation-delay: 1.2s; }
.drip-b { left: 64%; animation-delay: 4.6s; height: 32px; }
.drip-c { left: 38%; animation-delay: 2.8s; height: 28px; }

@keyframes drip-fall {
    0%   { transform: translateY(0); opacity: 0; }
    20%  { opacity: 0.95; }
    70%  { opacity: 0.7; }
    100% { transform: translateY(40px); opacity: 0; }
}

/* ===========================================================
   Status line
   ========================================================== */
.status-line {
    position: fixed;
    bottom: 8px;
    left: 18px;
    z-index: 60;
    font-family: var(--f-mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    color: rgba(212, 212, 224, 0.7);
    pointer-events: none;
}

.status-line em {
    font-style: normal;
    color: var(--c-cyan);
    text-shadow: 0 0 4px rgba(0, 245, 212, 0.5);
}

/* ===========================================================
   Cell expansion overlay
   ========================================================== */
.expansion {
    position: fixed;
    inset: 0;
    z-index: 70;
    pointer-events: none;
    background: rgba(13, 13, 20, 0);
    transition: background 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.expansion.is-open {
    pointer-events: auto;
    background: rgba(13, 13, 20, 0.78);
    backdrop-filter: blur(2px);
}

.expansion-mount {
    position: absolute;
    border: 1px solid var(--c-magenta);
    background: rgba(13, 13, 20, 0.98);
    overflow: auto;
    transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
    box-shadow:
        inset 0 0 30px rgba(255, 45, 107, 0.18),
        0 0 60px rgba(255, 45, 107, 0.25);
    /* default = collapsed (overwritten by JS) */
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    opacity: 0;
}

.expansion.is-open .expansion-mount {
    opacity: 1;
}

.expansion-mount .cell-inner {
    padding: 56px 64px 56px 64px;
    gap: 18px;
    height: 100%;
    overflow: auto;
}

.expansion-mount .cell-head {
    font-size: clamp(64px, 9vw, 132px);
}

.expansion-mount .meta {
    font-size: 13px;
}

.expansion-mount .cell-sub,
.expansion-mount .cell-body {
    font-size: 17px;
    max-width: 60ch;
}

.expansion-mount .menu-list {
    gap: 18px;
}
.expansion-mount .m-name {
    font-size: 36px;
}
.expansion-mount .m-desc {
    font-size: 13px;
}

.expansion-mount .scrawl {
    font-size: 44px;
    line-height: 1.15;
}

.expansion-mount .rules-list li {
    font-size: 17px;
    padding-left: 38px;
}
.expansion-mount .rules-list li::before {
    font-size: 14px;
}

.expansion-mount .hours-list li {
    font-size: 16px;
}

.expansion-mount .tagline {
    font-size: clamp(48px, 6vw, 84px);
}

.expansion-mount .motif--circle {
    width: 220px;
    height: 220px;
}

.expansion-mount .motif--spiral {
    width: 110px;
    height: 110px;
}

.expansion-mount .ticker-track {
    gap: 60px;
}

/* close button */
.close-x {
    position: absolute;
    top: 22px;
    right: 26px;
    width: 38px;
    height: 38px;
    background: transparent;
    border: 1px solid var(--c-magenta);
    border-radius: 0;
    cursor: pointer;
    z-index: 75;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease 0.2s, transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 0 10px rgba(255, 45, 107, 0.4);
}

.expansion.is-open .close-x {
    opacity: 1;
    pointer-events: auto;
}

.close-x span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 22px;
    height: 1.5px;
    background: var(--c-magenta);
    box-shadow: 0 0 6px var(--c-magenta), 0 0 14px rgba(255, 45, 107, 0.6);
    transform-origin: center;
}
.close-x span:first-child  { transform: translate(-50%, -50%) rotate(45deg); }
.close-x span:last-child   { transform: translate(-50%, -50%) rotate(-45deg); }

.close-x:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 0 18px rgba(255, 45, 107, 0.7);
}

/* ===========================================================
   Responsive — collapse mosaic on small screens
   ========================================================== */
@media (max-width: 960px) {
    .mosaic {
        grid-template-rows: auto;
        grid-auto-rows: minmax(140px, auto);
        gap: 5px;
        padding: 64px 10px 60px 10px;
    }

    .cell--title    { --c1: 1; --c2: 13; --r1: auto; --r2: auto; min-height: 240px; }
    .cell--playing  { --c1: 1; --c2: 7;  --r1: auto; --r2: auto; min-height: 180px; }
    .cell--hours    { --c1: 7; --c2: 13; --r1: auto; --r2: auto; min-height: 180px; }
    .cell--menu     { --c1: 1; --c2: 13; --r1: auto; --r2: auto; min-height: 280px; }
    .cell--scrawl   { --c1: 1; --c2: 7;  --r1: auto; --r2: auto; min-height: 160px; }
    .cell--door     { --c1: 7; --c2: 13; --r1: auto; --r2: auto; min-height: 220px; }
    .cell--motif    { --c1: 1; --c2: 7;  --r1: auto; --r2: auto; min-height: 180px; }
    .cell--rules    { --c1: 7; --c2: 13; --r1: auto; --r2: auto; min-height: 200px; }
    .cell--tagline  { --c1: 1; --c2: 13; --r1: auto; --r2: auto; min-height: 140px; }
    .cell--ticker   { --c1: 1; --c2: 13; --r1: auto; --r2: auto; min-height: 100px; }

    .cell-head { font-size: 48px; }
    .cell--title .cell-head { font-size: 64px; }
    .cell-head--sm { font-size: 34px; }

    .expansion-mount .cell-inner { padding: 48px 28px 32px 28px; }
    .expansion-mount .cell-head { font-size: 56px; }
    .expansion-mount .scrawl { font-size: 30px; }
    .expansion-mount .tagline { font-size: 40px; }
    .expansion-mount .menu-list { gap: 12px; }
    .expansion-mount .m-name { font-size: 24px; }
}

@media (max-width: 540px) {
    .mosaic { padding: 60px 8px 64px 8px; }
    .cell-inner { padding: 12px 12px 14px 12px; }
    .cell-head { font-size: 38px; }
    .cell--title .cell-head { font-size: 52px; }
    .scrawl { font-size: 20px; }
    .tagline { font-size: 26px; }
    .brand-mark { font-size: 22px; top: 12px; right: 14px; }
    .brand-mark .brand-x { font-size: 28px; }
    .brand-mark .brand-bar { font-size: 14px; }
    .status-line { font-size: 10px; left: 10px; }
}
