/* ============================================================
   Cheapest Beer NYC — map-first, dive-bar-at-night visual system
   Signature: neon price-tags scattered on a dark map; the cheapest
   pin glows hot-pink. Everything else stays quiet.
   ============================================================ */

:root {
  --bg: #131110;          /* warm near-black: the bar at night */
  --bg-raise: #1c1917;    /* raised surfaces (overlay, popups)  */
  --bg-sink: #0d0b0a;     /* map well                           */
  --line: #2c2723;        /* hairline dividers                  */
  --ink: #f3ede1;         /* chalk white                        */
  --muted: #9a8f7d;       /* taupe secondary text               */
  --amber: #ffb62c;       /* beer neon — the primary            */
  --pink: #ff3d7f;        /* cheapest / happy-hour-live neon     */
  --pink-deep: #b81f56;

  --r-lg: 14px;
  --r-md: 10px;
  --r-sm: 7px;

  --font-display: "Bebas Neue", "Arial Narrow", sans-serif;
  --font-body: "Barlow", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.45;
}

.neon-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 500;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Masthead ---------- */
.masthead {
  padding: 14px clamp(16px, 4vw, 32px);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.masthead__mark { display: flex; align-items: center; gap: 12px; }
.masthead__glass {
  font-size: 26px;
  filter: drop-shadow(0 0 10px rgba(255, 182, 44, 0.45));
}
.masthead__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 5vw, 40px);
  letter-spacing: 0.02em;
  line-height: 0.86;
  color: var(--amber);
  text-shadow: 0 0 16px rgba(255, 182, 44, 0.35), 0 0 2px rgba(255, 182, 44, 0.6);
}
.masthead__sub {
  margin: 3px 0 0;
  font-size: 12px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Map stage ---------- */
.map-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 420px;
}
.map { position: absolute; inset: 0; background: var(--bg-sink); }
.leaflet-container { background: var(--bg-sink); font-family: var(--font-body); }

/* ---------- Floating overlay (time) ---------- */
.overlay {
  position: absolute;
  z-index: 450;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: min(520px, calc(100% - 24px));
  padding: 14px 18px 12px;
  background: color-mix(in srgb, var(--bg-raise) 92%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
}

.overlay__time {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.input {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink);
  background: var(--bg-sink);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 6px 8px;
  color-scheme: dark;
}
.btn-mini {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.btn-mini:hover { border-color: var(--amber); color: var(--amber); }

/* ---------- Search-this-area + recenter ---------- */
.search-area {
  position: absolute;
  z-index: 450;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid var(--pink-deep);
  background: var(--bg-raise);
  color: var(--pink);
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5);
}
.search-area:hover { background: var(--pink); color: #2a0012; }

.recenter {
  position: absolute;
  z-index: 450;
  top: 120px;
  right: 12px;
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  font-size: 20px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-raise);
  color: var(--amber);
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}
.recenter:hover { border-color: var(--amber); }

/* ---------- Status pill ---------- */
.status {
  position: absolute;
  z-index: 440;
  left: 50%;
  bottom: 78px;
  transform: translateX(-50%);
  margin: 0;
  max-width: calc(100% - 24px);
  padding: 6px 14px;
  font-size: 12px;
  color: var(--muted);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border: 1px solid var(--line);
  border-radius: 999px;
  text-align: center;
  backdrop-filter: blur(6px);
}

/* ---------- Ad slot (unobtrusive, bottom-left) ---------- */
.ad-slot {
  position: absolute;
  z-index: 440;
  left: 12px;
  bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  height: 46px;
  padding: 0 12px;
  border: 1px dashed var(--line);
  border-radius: var(--r-sm);
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
}
@media (max-width: 680px) { .ad-slot { display: none; } }

/* ---------- Focus visibility ---------- */
.input:focus-visible,
.btn-mini:focus-visible,
.search-area:focus-visible,
.recenter:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

/* ---------- Price-tag markers ---------- */
.tag {
  --tag-bg: var(--amber);
  --tag-ink: #201400;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 9px;
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--tag-ink);
  background: var(--tag-bg);
  border: 2px solid #201400;
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(255, 182, 44, 0.55);
  white-space: nowrap;
  transform: translateY(-2px);
}
.tag::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 8px; height: 8px;
  background: var(--tag-bg);
  border-right: 2px solid #201400;
  border-bottom: 2px solid #201400;
  transform: translateX(-50%) rotate(45deg);
}
.tag--best {
  --tag-bg: var(--pink);
  --tag-ink: #2a0012;
  box-shadow: 0 0 16px rgba(255, 61, 127, 0.75);
}
.tag--hh::before {
  content: "";
  width: 6px; height: 6px;
  margin-right: 5px;
  border-radius: 50%;
  background: #2a0012;
  animation: pulse 1.6s ease-in-out infinite;
}
.tag-hover .tag { filter: brightness(1.2); z-index: 999; }
@keyframes pulse { 50% { opacity: 0.3; } }

.pin--user {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px #fff, 0 0 14px rgba(255, 255, 255, 0.5);
}

/* ---------- Popups ---------- */
.leaflet-popup-content-wrapper {
  background: var(--bg-raise);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.leaflet-popup-tip { background: var(--bg-raise); border: 1px solid var(--line); }
.leaflet-popup-content { margin: 14px 16px; min-width: 210px; }
.popup__eyebrow {
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--pink); margin: 0 0 4px;
}
.popup__name {
  font-family: var(--font-display);
  font-size: 24px; line-height: 0.95; margin: 0;
}
.popup__meta { font-size: 12px; color: var(--muted); margin: 5px 0 0; }
.popup__price-row { display: flex; align-items: baseline; gap: 8px; margin: 10px 0 0; }
.popup__price { font-family: var(--font-display); font-size: 34px; line-height: 0.9; color: var(--amber); }
.popup__strike { font-family: var(--font-mono); font-size: 12px; color: var(--muted); text-decoration: line-through; }
.popup__note { font-size: 12.5px; color: var(--ink); opacity: 0.82; margin: 8px 0 0; }
.popup__hh {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 10px 0 0; padding: 4px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--pink); border: 1px solid var(--pink-deep); background: rgba(255, 61, 127, 0.08);
}
.popup__hh::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--pink); box-shadow: 0 0 8px var(--pink); animation: pulse 1.6s ease-in-out infinite;
}
.popup__hh--later { color: var(--muted); border-color: var(--line); background: transparent; }
.popup__hh--later::before { background: var(--muted); box-shadow: none; animation: none; }
.popup__links { margin: 12px 0 0; font-size: 12.5px; font-weight: 600; }
.popup__links a { color: var(--amber); text-decoration: none; border-bottom: 1px solid transparent; }
.popup__links a:hover { border-bottom-color: var(--amber); }
.popup__conf { font-family: var(--font-mono); font-size: 10px; color: var(--muted); opacity: 0.7; }

/* ---------- Footer ---------- */
.footer {
  padding: 12px clamp(16px, 4vw, 32px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11.5px;
  background: var(--bg);
}

@media (max-width: 680px) {
  .overlay { top: 10px; padding: 12px 14px 10px; }
  .status { bottom: 74px; }
  .recenter { top: 100px; }
}

@media (prefers-reduced-motion: reduce) {
  *, .tag--hh::before, .popup__hh::before { animation: none !important; transition: none !important; }
}
