/* Vibin — Consumer Web App
   Always dark. Card layout: full-image overlay, posh.vip/explore style. */

:root {
  --bg:          #010101;
  --card-border: #222222;
  --card-radius: 20px;
  --pill-bg:     #222222;
  --pill-border: #333333;

  --t:       rgba(255,255,255,.92);
  --t-meta:  rgba(255,255,255,.55);
  --t-sec:   rgba(255,255,255,.45);
  --t-muted: rgba(255,255,255,.30);
  --t-icon:  rgba(255,255,255,.38);

  --border: rgba(255,255,255,.07);
  --div:    rgba(255,255,255,.05);

  --on-dark:       rgba(255,255,255,.92);
  --on-dark-sec:   rgba(255,255,255,.55);
  --on-dark-muted: rgba(255,255,255,.35);

  --nav-h:    80px;
}

/* ─── Reset & Base ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.app {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--t);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  position: relative;
}
body.app::before {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(
    to bottom,
    var(--slot-glow, rgba(0,0,0,0))     0%,
    var(--slot-glow, rgba(0,0,0,0))     15%,
    var(--slot-glow-end, rgba(0,0,0,0)) var(--glow-stop, 44vh),
    rgba(0,0,0,0)                       calc(var(--glow-stop, 44vh) + 2px)
  );
  pointer-events: none;
  z-index: -1;
}

/* ─── Top Bar ─── */
.app-topbar {
  position: sticky; top: 0; z-index: 200;
  height: var(--nav-h);
  background: rgba(1,1,1,.65);
  border-bottom: 1px solid rgba(255,255,255,.06);
  backdrop-filter: blur(54px); -webkit-backdrop-filter: blur(54px);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
}
.app-topbar img {
  height: 24px; width: auto; display: block;
  filter: brightness(0) invert(1); opacity: .88;
}
.app-topbar-right { display: flex; align-items: center; gap: 8px; }

.btn-dl {
  height: 34px; padding: 0 18px;
  background: #fff; color: #000;
  border: none; border-radius: 99px;
  font: 600 13px/1 'Outfit', sans-serif;
  cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 5px;
  white-space: nowrap;
}
.btn-dl:hover { opacity: .85; }

/* Mobile-only topbar — hidden on desktop */
.idx-mobile-topbar { display: none; }

/* ─── Page Wrapper ─── */
.page-wrap { padding-bottom: var(--nav-h); }

/* ─── Filter Bar ─── */
.filter-bar {
  position: sticky; top: var(--nav-h); z-index: 100;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding: 12px 0;
  background: rgba(1,1,1,.80);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-bar-inner { display: flex; gap: 8px; padding: 0 16px; min-width: max-content; }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 18px; border-radius: 99px;
  font: 500 14px/1 'Outfit', sans-serif;
  white-space: nowrap; cursor: pointer;
  background: var(--pill-bg); color: rgba(255,255,255,.60);
  border: 1px solid var(--pill-border);
  transition: background .15s, color .15s, border-color .15s;
  user-select: none;
}
.chip:hover { background: #2a2a2a; border-color: #444; color: rgba(255,255,255,.85); }
.chip:active { opacity: .65; }
.chip.active {
  background: rgba(255,255,255,.90); color: #000;
  border-color: transparent; font-weight: 600;
}


/* ─── Featured slot wrapper ─── */
#featuredSlot {
  padding: 0; /* section gap handled by event-list padding-top */
}

/* ─── Featured Carousel ─── */
.featured-carousel {
  position: relative;
}

.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  touch-action: pan-x;
  overscroll-behavior-x: contain;
}
.carousel-track::-webkit-scrollbar { display: none; }

.carousel-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  padding: 0 16px;
}
.carousel-slide .featured {
  margin: 0 auto;
}

/* ─── Carousel nav arrows ─── */
.carousel-btn {
  display: none; /* hidden on mobile, shown tablet+ */
  position: absolute;
  top: 50%; transform: translateY(calc(-50% - 18px));
  z-index: 10;
  width: 36px; height: 36px;
  background: rgba(14,14,20,.80);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 50%;
  align-items: center; justify-content: center;
  cursor: pointer; color: rgba(255,255,255,.88);
  transition: background .15s, border-color .15s;
}
.carousel-btn:hover { background: rgba(32,32,42,.90); border-color: rgba(255,255,255,.30); }
.carousel-btn--prev { left: 26px; }
.carousel-btn--next { right: 26px; }

/* ─── Carousel dots ─── */
.carousel-dots {
  display: flex; justify-content: center; align-items: center; gap: 6px;
  padding: 10px 0 2px;
}
.carousel-dot {
  width: 5px; height: 5px; border-radius: 3px;
  background: rgba(255,255,255,.22);
  border: none; padding: 0; cursor: pointer;
  transition: background .25s ease, width .25s ease;
}
.carousel-dot.active {
  width: 16px;
  background: rgba(255,255,255,.88);
}

/* ─── Featured / Trending badge ─── */
.featured-badge {
  display: inline-flex; align-items: center;
  font: 600 10px/1 'DM Sans', sans-serif;
  letter-spacing: .07em; text-transform: uppercase;
  color: rgba(255,255,255,.60);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 5px; padding: 4px 8px;
  margin-bottom: 6px; width: fit-content;
}

/* ─── Section header above grid ─── */
.section-hdr {
  font: 600 17px/1 'DM Sans', sans-serif;
  color: rgba(255,255,255,.88);
  padding: 4px 16px 16px;
}

/* ─── Featured Card ─── */
/* Stage 1 — Mobile: vertical stack, full-width banner image */
.featured {
  display: flex; flex-direction: column;
  text-decoration: none; border-radius: var(--card-radius); overflow: hidden;
  max-width: 320px; margin: 0 auto;
  background:
    var(--featured-accent-tint, rgba(0,0,0,0)),
    rgba(16,16,20,.88);
  border: none;
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  transition: none;
}
.featured:hover { }
.featured-poster {
  width: 100%; flex-shrink: 0;
  padding: 0;
  display: flex; align-items: center; justify-content: center;
}
.featured-img {
  width: 100%; aspect-ratio: 4/5;
  object-fit: cover; border-radius: 0; display: block;
  background: rgba(255,255,255,.05); flex-shrink: 0;
}
video.featured-img { background: #000; }
.featured-body {
  flex: 1; min-width: 0;
  padding: 16px 20px 24px;
  display: flex; flex-direction: column; justify-content: center; gap: 6px;
  background: transparent;
}
.featured-title {
  font: 700 18px/1.15 'Outfit', sans-serif;
  letter-spacing: -0.5px; color: #fff; margin-bottom: 4px;
}
.featured-venue {
  font: 600 12px/1.4 'Outfit', sans-serif;
  color: rgba(255,255,255,.78);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.featured-date {
  font: 400 11px/1.5 'Outfit', sans-serif;
  color: rgba(255,255,255,.44);
}
.featured-meta { display: none; }
.featured-cta {
  margin-top: 16px;
  display: inline-flex; align-items: center;
  padding: 8px 18px; border-radius: 99px;
  background: rgba(255,255,255,.88);
  color: #000;
  font: 600 12px/1 'Outfit', sans-serif;
  width: fit-content;
  transition: background .15s;
}
.featured-cta:hover { background: #fff; }

/* ─── Event List — always card grid ─── */
.event-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 24px 0 96px;
}

/* ─── Event Card (posh.vip style: full-image + gradient overlay) ─── */
.event-row {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: var(--card-radius);
  overflow: hidden;
  border: 0.6px solid rgba(255,255,255,.07);
  aspect-ratio: 3 / 4;
  cursor: pointer;
  background: #111;
  transition: transform .2s cubic-bezier(.16,1,.3,1), border-color .15s;
}
.event-row:hover { transform: translateY(-3px); }
.event-row:active { transform: translateY(-1px); opacity: .9; }

/* Image fills the entire card */
.event-thumb {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  background: #111;
}
video.event-thumb { background: #000; }

/* Legacy wrapper — keeps backward compat if present */
.event-thumb-wrap { position: absolute; inset: 0; }

/* Gradient overlay — only covers the bottom text area, not the whole card */
.card-filter {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,.98) 0%,
    rgba(0,0,0,.88) 16%,
    rgba(0,0,0,.30) 36%,
    rgba(0,0,0,0)   48%
  );
}

/* Text overlay pinned to bottom */
.event-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 12px 14px 20px;
  z-index: 1;
}
.event-date-badge {
  display: inline-block;
  font: 600 11px/1 'Outfit', sans-serif;
  letter-spacing: .07em; text-transform: uppercase;
  color: rgba(255,255,255,.82);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 6px;
  padding: 5px 10px;
  margin-bottom: 8px;
}
.event-name {
  font: 700 clamp(15px, 3.5vw, 22px)/1.2 'Outfit', sans-serif;
  letter-spacing: -0.3px; color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.event-date {
  font: 400 13px/1.4 'Outfit', sans-serif;
  color: rgba(255,255,255,.50);
  margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.event-venue {
  font: 400 13px/1.4 'Outfit', sans-serif;
  color: rgba(255,255,255,.50);
  margin-top: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ─── Card pill stack (top-right corner) ─── */
.card-pills {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
  pointer-events: none;
}

/* Interested pill (social proof) */
.interested-pill {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 9px 5px 5px;
  background: rgba(8,8,8,.55);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 99px;
}
.avatar-stack {
  display: flex; align-items: center;
}
.avatar-circle {
  width: 16px; height: 16px; flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.50);
  background: rgba(255,255,255,var(--av-opacity,.35));
  margin-left: -5px;
}
.avatar-circle:first-child { margin-left: 0; }
img.avatar-circle { object-fit: cover; }
.interested-count {
  font: 500 11px/1 'DM Sans', sans-serif;
  color: rgba(255,255,255,.82);
  white-space: nowrap;
}

/* Buddy seeker pill — dashed border signals "open/seeking" */
.buddy-pill {
  display: flex; align-items: center; gap: 5px;
  padding: 4px 9px 4px 7px;
  background: rgba(8,8,8,.50);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px dashed rgba(255,255,255,.22);
  border-radius: 99px;
}
.buddy-pill-icon {
  width: 12px; height: 12px; flex-shrink: 0;
  fill: none; stroke: currentColor;
  stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round;
  color: rgba(255,255,255,.82);
}
.buddy-count {
  font: 500 11px/1 'DM Sans', sans-serif;
  color: rgba(255,255,255,.82);
  white-space: nowrap;
}

/* Featured card — inline interested row (between date and CTA) */
.featured-interested {
  display: flex; align-items: center; gap: 6px;
  margin-top: 2px;
}
.featured-interested-count {
  font: 600 12px/1 'DM Sans', sans-serif;
  color: rgba(255,255,255,.78);
  white-space: nowrap;
}
.featured-buddy {
  display: flex; align-items: center; gap: 5px;
  margin-top: 2px;
}
.featured-buddy-icon {
  width: 12px; height: 12px; flex-shrink: 0;
  stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round;
  color: rgba(255,255,255,.78);
}
.featured-buddy-count {
  font: 600 12px/1 'DM Sans', sans-serif;
  color: rgba(255,255,255,.78);
  white-space: nowrap;
}

/* ─── Search Bar ─── */
.search-wrap {
  position: sticky; top: var(--nav-h); z-index: 100;
  padding: 10px 16px;
  background: rgba(1,1,1,.80);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.search-bar {
  display: flex; align-items: center; gap: 10px;
  background: #1a1a1a; border-radius: 12px;
  padding: 0 14px; height: 44px;
  border: 1px solid #333;
  transition: border-color .15s;
}
.search-bar:focus-within { border-color: rgba(255,255,255,.28); }
.search-bar svg { width: 16px; height: 16px; stroke: rgba(255,255,255,.35); fill: none; stroke-width: 2; flex-shrink: 0; }
.search-input { flex: 1; background: none; border: none; outline: none; font: 400 16px/1 'Outfit', sans-serif; color: #fff; }
.search-input::placeholder { color: rgba(255,255,255,.28); }
.search-clear { background: none; border: none; cursor: pointer; color: rgba(255,255,255,.35); font: 400 14px/1 'Outfit', sans-serif; padding: 0 4px; }

/* ─── Search Overlay ─── */
.search-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: #010101;
  display: flex; flex-direction: column;
  transform: translateY(100%);
  transition: transform .30s cubic-bezier(0.32,0.72,0,1), visibility 0s .30s;
  visibility: hidden;
}
.search-overlay.open {
  transform: translateY(0);
  visibility: visible;
  transition: transform .30s cubic-bezier(0.32,0.72,0,1), visibility 0s 0s;
}
body.overlay-open { overflow: hidden; }
.search-overlay-header {
  display: flex; align-items: center; gap: 12px;
  padding: 64px 16px 12px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}
.search-bar--overlay { flex: 1; }
.search-overlay-cancel {
  background: none; border: none; cursor: pointer;
  font: 500 15px/1 'DM Sans', sans-serif;
  color: rgba(255,255,255,.50);
  padding: 0 4px; white-space: nowrap;
  transition: color .15s;
}
.search-overlay-cancel:hover { color: rgba(255,255,255,.85); }
.search-overlay-results {
  flex: 1; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 100px;
}

/* ─── Bottom Nav ─── */
.bottom-nav-outer {
  position: fixed; bottom: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 0 16px 30px; pointer-events: none; z-index: 1000;
}
.bottom-nav {
  display: flex; align-items: center; gap: 3px; padding: 5px;
  background: #111; border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 8px 32px rgba(0,0,0,.60);
  border-radius: 26px; pointer-events: auto;
}
.nav-item {
  display: flex; align-items: center; justify-content: center;
  width: 50px; height: 42px; border-radius: 21px;
  cursor: pointer; text-decoration: none;
  background: none; border: none; padding: 0;
  transition: background .15s, transform .1s;
}
.nav-item:active { transform: scale(.94); }
.nav-item.active { background: rgba(255,255,255,.13); }
.nav-item svg {
  width: 23px; height: 23px; stroke: var(--on-dark-muted); fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.nav-item.active svg { stroke: var(--on-dark); }

/* ─── Map ─── */
.map-shell { position: fixed; inset: var(--nav-h) 0 0 0; }
#vibeMap { width: 100%; height: 100%; }
.map-filter-overlay {
  position: absolute; top: 12px; left: 0; right: 0; z-index: 200;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.map-filter-overlay::-webkit-scrollbar { display: none; }
.map-filter-row { display: flex; gap: 8px; padding: 0 16px; min-width: max-content; }
.map-carousel {
  position: absolute; bottom: 100px; left: 0; width: 100%;
  z-index: 200; overflow-x: auto;
  scroll-snap-type: x mandatory;
  touch-action: pan-x;
  overscroll-behavior-x: contain;
}
.map-carousel::-webkit-scrollbar { display: none; }
/* calc(50vw - 130px) = half screen - half card — centres first & last card */
.map-carousel-track { display: flex; gap: 12px; padding: 0 calc(50vw - 130px) 8px; min-width: max-content; }
.map-card {
  flex: 0 0 260px; border-radius: 16px; overflow: hidden;
  border: 2px solid rgba(255,255,255,0.08);
  scroll-snap-align: center;
  cursor: pointer; text-decoration: none; display: block;
  transition: border-color .2s, box-shadow .2s, opacity .2s, transform .2s;
  background: #111;
  opacity: 0.55;
  transform: scale(0.94);
}
.map-card.selected {
  opacity: 1;
  transform: scale(1);
  border-color: rgba(255,255,255,0.80);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.25), 0 8px 28px rgba(0,0,0,0.55);
}
.map-card-img { width: 100%; aspect-ratio: 4/5; object-fit: cover; display: block; background: #111; }
.map-card-body { padding: 10px 14px 12px; }
.map-card-title { font: 700 17px/1.2 'Outfit', sans-serif; color: #fff; letter-spacing: -0.4px; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-card-meta { font: 400 12px/1.4 'Outfit', sans-serif; color: rgba(255,255,255,.45); }

/* ─── States ─── */
@keyframes shimmerSkel { 0%,100%{opacity:.06} 50%{opacity:.14} }
.skel { background: #1a1a1a; border-radius: 8px; animation: shimmerSkel 1.6s ease-in-out infinite; }
.state-box {
  text-align: center; padding: 60px 24px;
  color: rgba(255,255,255,.30);
  font: 400 14px/1.6 'DM Sans', sans-serif;
  grid-column: 1 / -1;   /* span all grid columns so it never sits in a single cell */
  width: 100%;
}
.state-box strong { display: block; font: 600 16px/1.3 'DM Sans', sans-serif; color: rgba(255,255,255,.72); margin-bottom: 6px; }

/* Vertically centre the list when it only holds a state-box (empty/loading/error).
   Override padding so it doesn't eat into the centering calculation. */
.event-list:has(> .state-box:only-child) {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  min-height: 80dvh;
}
/* Nudge state-box content down slightly so it clears the sticky header visually */
.event-list:has(> .state-box:only-child) .state-box {
  padding-top: 0;
  padding-bottom: 80px; /* offset toward bottom nav height */
}

/* Compact inline notice — shown below the carousel when filter returns no grid events.
   Stays in normal flow so no scrolling required; carousel remains fully visible above. */
.state-notice {
  grid-column: 1 / -1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 3px;
  padding: 14px 20px;
  margin: 8px 0 16px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px;
  font: 400 13px/1.4 'DM Sans', sans-serif;
  color: rgba(255,255,255,.72);
}
.state-notice strong {
  display: block;
  font: 600 14px/1.2 'DM Sans', sans-serif;
  color: rgba(255,255,255,.72);
}

/* ─── Safe area + mobile card ratio ─── */
@media (max-width: 639px) {
  .bottom-nav-outer { padding-bottom: max(24px, env(safe-area-inset-bottom)); }
  .event-row { aspect-ratio: 4 / 5; }

  /* Map carousel — compact cards so poster doesn't dominate the bottom half */
  .map-carousel-track { padding: 0 calc(50vw - 90px) 8px; }
  .map-card { flex: 0 0 180px; }
  .map-card-img { aspect-ratio: 4/3; }
  .map-card-title { font-size: 14px; }
}

/* ─── Stage C — 640–767px: 2-col, taller cards ─── */
@media (min-width: 640px) and (max-width: 767px) {
  .event-list { grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 24px 0 56px; }
  .event-row  { aspect-ratio: 4 / 5; }
  /* Poster stays phone-width; extra space becomes padding */
  .featured { max-width: 440px; }
}

/* ─── Stage D — 768px+: nav padding, carousel arrows, 3-col grid ─── */
@media (min-width: 768px) {
  .app-topbar { padding: 0 24px; }
  .filter-bar-inner { padding: 0 24px; }
  .search-wrap { padding: 10px 24px; }

  .event-list { grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 24px 8px 56px; }

  #featuredSlot { padding: 0; }
  .carousel-slide { padding: 16px 24px 0; }
  .carousel-btn { display: flex; }
  .section-hdr { padding: 4px 24px 16px; }
  /* Stage 2 — Tablet: switch to horizontal row */
  .featured { flex-direction: row; align-items: stretch; margin: 0 auto; border-radius: var(--card-radius); max-width: 780px; }
  .featured-poster { width: auto; flex: 0 0 38%; max-width: 360px; padding: 12px 0 12px 12px; }
  .featured-img { aspect-ratio: 3/4; max-height: none; border-radius: 10px; }
  .featured-body { padding: 22px 24px 22px 28px; gap: 6px; }
  .featured-title { font-size: 24px; }
  .featured-venue { font-size: 13px; }
  .featured-date { font-size: 12px; }
  .featured-cta { margin-top: 16px; padding: 10px 20px; font-size: 13px; }
}

/* ─── Desktop 1024px ─── */
@media (min-width: 1024px) {
  .app-topbar { padding: 0 40px; }
  .filter-bar-inner { padding: 0 40px; }
  .search-wrap { padding: 10px 40px; }


  .event-list { grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 24px 8px 64px; }

  #featuredSlot { padding: 0; }
  .carousel-slide { padding: 16px 40px 0; }
  .carousel-btn--prev { left: 50px; }
  .carousel-btn--next { right: 50px; }
  .section-hdr { padding: 4px 40px 16px; }
  /* Stage 3 — Desktop: wider poster, generous spacing */
  .featured { max-width: 960px; }
  .featured-poster { flex: 0 0 42%; max-width: 420px; padding: 16px 0 16px 16px; }
  .featured-body { padding: 32px 36px 32px 32px; gap: 8px; }
  .featured-title { font-size: 32px; }
  .featured-venue { font-size: 14px; }
  .featured-date { font-size: 13px; }
  .featured-cta { margin-top: 20px; padding: 12px 24px; font-size: 14px; }
}

/* ─── Wide 1400px: 4-col ─── */
@media (min-width: 1400px) {
  .event-list { grid-template-columns: repeat(4, 1fr); }
  .featured { max-width: 1100px; }
}

@media (prefers-reduced-motion: reduce) {
  .nav-item, .featured, .event-row { transition: none; will-change: auto; }
  .skel { animation: none; }
}

/* ─── App Nav (index page redesign) ─── */
.app-nav {
  position: sticky; top: 0; z-index: 200;
  height: 80px;
  background: rgba(1,1,1,.25);
  backdrop-filter: blur(54px); -webkit-backdrop-filter: blur(54px);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 40px;
}
.app-nav-logo { justify-self: start; }
.app-nav-filters { justify-self: center; }
.app-nav-right { justify-self: end; }
.app-nav-logo img {
  height: 24px; width: auto; display: block;
  filter: brightness(0) invert(1); opacity: .88;
}
.filter-seg-static {
  cursor: default; pointer-events: none;
}

/* ─── Center filter pill (single combined capsule) ─── */
.app-nav-filters {
  display: flex; align-items: center;
}
.filter-pill {
  display: flex; align-items: center;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 99px;
  height: 38px;
}
.filter-pill-seg {
  position: relative;
  display: flex; align-items: stretch;
  height: 100%;
}
.filter-seg-btn {
  display: inline-flex; align-items: center; gap: 5px;
  height: 100%; padding: 0 16px;
  background: transparent; border: none; border-radius: 99px;
  font: 500 14px/1 'DM Sans', sans-serif;
  color: rgba(255,255,255,.92);
  cursor: pointer; white-space: nowrap;
  transition: background .15s;
}
.filter-seg-btn:hover { background: rgba(255,255,255,.08); }
.filter-seg-btn.open  { background: rgba(255,255,255,.12); }
.filter-seg-chevron {
  width: 10px; height: 10px; flex-shrink: 0;
  opacity: .45;
  transition: transform .2s ease;
}
.filter-seg-btn.open .filter-seg-chevron { transform: rotate(180deg); }
.filter-pill-div {
  width: 1px; height: 16px;
  background: rgba(255,255,255,.16);
  flex-shrink: 0;
  align-self: center;
}
.filter-seg-in {
  font-size: 12px; font-weight: 400;
  color: rgba(255,255,255,.40);
  margin-right: 2px;
}

/* ─── Right buttons ─── */
.app-nav-right { display: flex; align-items: center; gap: 10px; }
.btn-ghost {
  background: transparent; border: none;
  padding: 7px 12px;
  font: 500 14px/1 'DM Sans', sans-serif;
  color: rgba(255,255,255,.70); cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: color .15s;
}
.btn-ghost:hover { color: #fff; }
.btn-solid {
  height: 34px; padding: 0 18px;
  background: #fff; color: #000;
  border: none; border-radius: 99px;
  font: 600 13px/1 'Outfit', sans-serif;
  cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center;
  white-space: nowrap;
  transition: opacity .15s;
}
.btn-solid:hover { opacity: .88; }
.btn-join {
  display: inline-flex; align-items: center;
  height: 34px; padding: 0 16px;
  border: 1px solid rgba(255,255,255,0.22); border-radius: 99px;
  font: 500 13px/1 'DM Sans', sans-serif; letter-spacing: 0.01em;
  color: rgba(255,255,255,0.80); background: transparent;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background 0.14s, color 0.14s, border-color 0.14s;
}
.btn-join:hover { background: rgba(255,255,255,0.07); color: #fff; border-color: rgba(255,255,255,0.40); }

/* ─── Dropdown panel ─── */
.nav-dropdown {
  position: absolute; top: calc(100% + 8px); left: 0;
  min-width: 200px;
  background: #1a1a1a;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 16px 48px rgba(0,0,0,.6);
  z-index: 500;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.nav-dropdown.visible {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.dd-section-label {
  font: 500 10px/1 'DM Sans', sans-serif;
  letter-spacing: .08em; text-transform: uppercase;
  color: rgba(255,255,255,.30);
  padding: 8px 12px 6px;
}
.dd-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 12px;
  background: transparent; border: none; border-radius: 8px;
  font: 400 14px/1 'DM Sans', sans-serif;
  color: rgba(255,255,255,.75);
  cursor: pointer; text-align: left;
  transition: background .12s, color .12s;
}
.dd-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.dd-item.active { color: #fff; font-weight: 500; }
.dd-check {
  width: 14px; height: 14px; flex-shrink: 0;
  stroke: #fff; opacity: 0;
  transition: opacity .15s;
}
.dd-item.active .dd-check { opacity: 1; }

/* ─── Date-range calendar dropdown ─── */
.nav-dropdown--cal {
  width: 280px; left: 50%; transform: translateX(-50%) translateY(-6px);
  padding: 0; overflow: hidden;
}
.nav-dropdown--cal.visible { transform: translateX(-50%) translateY(0); }

.cal-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 12px 10px;
}
.cal-nav-btn {
  width: 28px; height: 28px;
  border: 1px solid rgba(255,255,255,0.12); border-radius: 8px;
  background: transparent; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.60);
  transition: border-color 0.12s, background 0.12s, color 0.12s;
}
.cal-nav-btn:hover { border-color: rgba(255,255,255,0.22); background: rgba(255,255,255,0.06); color: #fff; }
.cal-month-label {
  font: 600 13px/1 'DM Sans', sans-serif;
  color: rgba(255,255,255,0.90); letter-spacing: 0.2px;
}
.cal-weekdays {
  display: grid; grid-template-columns: repeat(7,1fr);
  padding: 0 10px 4px;
}
.cal-weekdays > div {
  font: 600 9px/1 'DM Sans', sans-serif;
  color: rgba(255,255,255,0.35); text-align: center;
  text-transform: uppercase; letter-spacing: 0.5px;
  padding: 0 0 6px;
}
.cal-days {
  display: grid; grid-template-columns: repeat(7,1fr);
  gap: 0; padding: 0 10px;
}
.cal-day {
  height: 34px; position: relative;
  display: flex; align-items: center; justify-content: center;
  border-radius: 0;
  border: none; background: transparent;
  cursor: pointer; transition: background 0.1s;
}
.cal-day:hover:not(.cal-day-empty):not(.cal-past) { background: rgba(255,255,255,0.08); border-radius: 50%; }
.cal-day.cal-day-empty { cursor: default; pointer-events: none; }
.cal-day.cal-past { opacity: 0.22; cursor: default; pointer-events: none; }
.cal-day.cal-today .cal-num { color: #fff; font-weight: 600; }
.cal-inner {
  display: flex; flex-direction: column; align-items: center;
  gap: 2px; position: relative; z-index: 1;
}
.cal-num { font: 400 12px/1 'DM Sans', sans-serif; color: rgba(255,255,255,0.85); }
.cal-dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: rgba(255,255,255,0.50); flex-shrink: 0;
}

/* In-range strip */
.cal-day.cal-in-range { background: rgba(255,255,255,0.08) !important; border-radius: 0; }
.cal-day.cal-in-range:hover { background: rgba(255,255,255,0.13) !important; }

/* Range endpoints */
.cal-day.cal-start,
.cal-day.cal-end {
  background: transparent !important;
  border-radius: 0;
}
.cal-day.cal-start.cal-has-range::before {
  content: ''; position: absolute; inset: 0; left: 50%; right: 0;
  background: rgba(255,255,255,0.08); z-index: 0;
}
.cal-day.cal-end.cal-has-range::before {
  content: ''; position: absolute; inset: 0; left: 0; right: 50%;
  background: rgba(255,255,255,0.08); z-index: 0;
}
.cal-day.cal-start.cal-end::before { display: none; }
.cal-day.cal-start .cal-inner,
.cal-day.cal-end .cal-inner {
  background: #fff; border-radius: 50%;
  width: 28px; height: 28px; justify-content: center;
}
.cal-day.cal-start .cal-num,
.cal-day.cal-end .cal-num { color: #0C0C12; font-weight: 600; }

.cal-hint {
  font: 400 11px/1 'DM Sans', sans-serif;
  color: rgba(255,255,255,0.35);
  text-align: center; padding: 8px 12px 0;
  min-height: 22px;
}
.cal-actions {
  display: flex; gap: 8px;
  padding: 8px 12px 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 8px;
}
.cal-apply {
  flex: 1; height: 36px; border-radius: 99px;
  background: rgba(255,255,255,0.90); color: #000;
  border: none; font: 600 13px/1 'DM Sans', sans-serif;
  cursor: pointer; transition: opacity 0.15s;
}
.cal-apply:hover:not(:disabled) { opacity: 0.85; }
.cal-apply:disabled { opacity: 0.25; cursor: default; }
.cal-reset {
  flex: 1; height: 36px; border-radius: 99px;
  background: transparent; color: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.15);
  font: 400 13px/1 'DM Sans', sans-serif;
  cursor: pointer; transition: border-color 0.15s, color 0.15s;
}
.cal-reset:hover { border-color: rgba(255,255,255,0.30); color: rgba(255,255,255,0.80); }

/* ─── App Nav Responsive ─── */
@media (max-width: 960px) {
  .app-nav { padding: 0 20px; }
  .filter-pill { height: 34px; }
  .filter-seg-btn { padding: 0 13px; font-size: 13px; }
}

.label-mobile { display: none; }
.label-desktop { display: inline; }

/* ── Mobile: sticky topbar with logo+download · filter pill + Organiser CTA ── */
@media (max-width: 640px) {
  /* Show the mobile topbar, give it a compact height */
  .idx-mobile-topbar {
    display: flex;
    height: 52px;
    padding: 0 16px 0 12px;
  }

  /* Nav sits below the topbar */
  .app-nav {
    top: 52px;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto;  /* single row — logo handled by topbar */
    height: auto;
    padding: 0 16px 0 12px;
  }

  /* Logo hidden — topbar shows it */
  .app-nav-logo { display: none; }

  /* filter pill in col 1, single row — left-align to match topbar logo */
  .app-nav-filters {
    grid-column: 1; grid-row: 1;
    justify-self: start;
    display: flex;
    align-items: center;
    padding: 10px 0;
    width: 100%;
  }

  /* Organiser CTA in col 2, single row */
  .app-nav-right {
    grid-column: 2; grid-row: 1;
    display: flex; align-items: center;
    padding: 10px 0 10px 8px;
  }

  /* Download App button is in the topbar on mobile — hide from nav */
  .app-nav-right .btn-dl { display: none; }

  .btn-ghost { display: none; }
  .btn-solid  { padding: 0 14px; }
  .label-mobile { display: inline; }
  .label-desktop { display: none; }
  .app-nav-right { gap: 6px; }

  /* pill fills the available width in col 1 */
  .filter-pill { width: 100%; height: 38px; }

  /* equal-width segments */
  .filter-pill-seg { flex: 1; }

  /* buttons fill segment and centre label */
  .filter-seg-btn,
  .filter-seg-static {
    width: 100%;
    justify-content: center;
    padding: 0 8px;
    font-size: 13px;
    border-radius: 0;
  }

  /* rounded ends on first and last segments */
  .filter-pill-seg:first-child .filter-seg-btn { border-radius: 99px 0 0 99px; }
  .filter-pill-seg:last-child .filter-seg-btn,
  .filter-pill-seg:last-child .filter-seg-static { border-radius: 0 99px 99px 0; }

  .filter-seg-in { font-size: 11px; }

  /* dropdowns: guard viewport overflow */
  .nav-dropdown { max-width: calc(100vw - 32px); left: 0; }
  .nav-dropdown--cal {
    width: 280px;
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
  }
  .nav-dropdown--cal.visible { transform: translateX(-50%) translateY(0); }
}

/* ═══════════════════════════════════════════════════════════════════════
   PREMIUM ANIMATION LAYER
   ═══════════════════════════════════════════════════════════════════════ */

/* @property — lets CSS interpolate colour custom properties (glow morph) */
@property --slot-glow {
  syntax: '<color>';
  inherits: true;
  initial-value: rgba(0,0,0,0);
}
@property --slot-glow-end {
  syntax: '<color>';
  inherits: true;
  initial-value: rgba(0,0,0,0);
}

/* ── Keyframes ─────────────────────────────────────────────────────── */
@keyframes vibeSlideDown {
  from { opacity: 0; transform: translateY(-14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes vibePop {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}
@keyframes vibeSheen {
  0%, 100% { transform: translateX(-160%); opacity: 0; }
  5%        { opacity: 1; }
  50%       { transform: translateX(160%); opacity: 1; }
  55%       { opacity: 0; }
}

/* ── Nav entrance — plays once on page load ────────────────────────── */
.app-nav {
  animation: vibeSlideDown .45s cubic-bezier(.16,1,.3,1) both;
}

/* ── Ambient glow colour morph ─────────────────────────────────────── */
body.app {
  transition: --slot-glow .70s ease, --slot-glow-end .70s ease;
}

/* ── Featured carousel — JS triggers entrance via .carousel-visible ── */
.featured-carousel {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .50s cubic-bezier(.16,1,.3,1), transform .50s cubic-bezier(.16,1,.3,1);
}
.featured-carousel.carousel-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Event card scroll-reveal (overrides earlier transition) ───────── */
.event-row {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity   .45s cubic-bezier(.16,1,.3,1),
    transform .45s cubic-bezier(.16,1,.3,1),
    border-color .18s,
    box-shadow   .18s;
}
.event-row.in-view { opacity: 1; transform: translateY(0); }
.event-row:hover   {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,.14);
  box-shadow: 0 14px 36px rgba(0,0,0,.55);
}
.event-row:active  { transform: scale(.965); opacity: .88; }

/* ── Featured card hover depth ─────────────────────────────────────── */
.carousel-slide .featured {
  transition: transform .35s cubic-bezier(.16,1,.3,1), box-shadow .35s ease;
  will-change: transform;
}
.carousel-slide .featured:hover {
  transform: scale(1.012);
  box-shadow: 0 20px 60px rgba(0,0,0,.62);
}

/* ── Get Tickets sheen sweep ───────────────────────────────────────── */
.featured-cta { position: relative; overflow: hidden; }
.featured-cta::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.42) 50%, transparent 70%);
  transform: translateX(-160%);
  animation: vibeSheen 4.5s 2.5s ease-in-out infinite;
  pointer-events: none;
  border-radius: inherit;
}
.featured-cta:hover::after { animation: none; }

/* ── Filter button pop ─────────────────────────────────────────────── */
.filter-seg-btn.anim-pop {
  animation: vibePop .28s cubic-bezier(.34,1.56,.64,1);
}

/* ── Carousel dot spring width ─────────────────────────────────────── */
.carousel-dot {
  transition: background .30s ease, width .38s cubic-bezier(.34,1.56,.64,1);
}

/* ── Bottom nav — hides on scroll-down, reappears on scroll-up ─────── */
/* Animate the INNER pill only — never transform the fixed outer wrapper
   (applying transform/will-change to a fixed element breaks it on iOS Safari) */
.bottom-nav {
  transition: transform .40s cubic-bezier(.16,1,.3,1), opacity .32s ease;
}
.bottom-nav-outer.nav-hidden .bottom-nav {
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
}

/* ── First-visit swipe hint ────────────────────────────────────────── */
.swipe-hint-wrap {
  display: flex; justify-content: center;
  padding: 6px 0 2px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
}
.swipe-hint-wrap.hint-visible { opacity: 1; }
.swipe-hint-wrap.hint-gone    { opacity: 0; }

.swipe-hint-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 16px;
  background: rgba(14,14,20,.78);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 99px;
  font: 500 11px/1 'DM Sans', sans-serif;
  color: rgba(255,255,255,.60);
  white-space: nowrap;
}
.swipe-hint-pill svg { flex-shrink: 0; fill: none; stroke: currentColor; opacity: .50; }

/* Feed: absolute overlay centred on the carousel */
.swipe-hint-wrap--feed {
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 20;
}
.swipe-hint-wrap--feed .swipe-hint-pill {
  padding: 12px 24px;
  font: 600 15px/1 'DM Sans', sans-serif;
  color: rgba(255,255,255,.92);
  gap: 10px;
  background: rgba(10,10,16,.82);
  border-color: rgba(255,255,255,.22);
  box-shadow: 0 4px 24px rgba(0,0,0,.45);
}
.swipe-hint-wrap--feed .swipe-hint-pill svg { opacity: .65; }

/* Map page: centred overlay on the carousel strip */
.swipe-hint-wrap--map {
  position: absolute;
  bottom: 100px;
  left: 0; right: 0;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 300;
}
.swipe-hint-wrap--map .swipe-hint-pill {
  padding: 12px 24px;
  font: 600 15px/1 'DM Sans', sans-serif;
  color: rgba(255,255,255,.92);
  gap: 10px;
  background: rgba(10,10,16,.82);
  border-color: rgba(255,255,255,.22);
  box-shadow: 0 4px 24px rgba(0,0,0,.45);
}
.swipe-hint-wrap--map .swipe-hint-pill svg { opacity: .65; }

/* ── Map filter chip entrance stagger ─────────────────────────────── */
@keyframes chipSlideIn {
  from { opacity: 0; transform: translateY(8px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}
.map-filter-row .chip {
  opacity: 0;
  animation: chipSlideIn .35s cubic-bezier(.16,1,.3,1) both;
}
.map-filter-row .chip:nth-child(1) { animation-delay:  0ms; }
.map-filter-row .chip:nth-child(2) { animation-delay: 45ms; }
.map-filter-row .chip:nth-child(3) { animation-delay: 90ms; }
.map-filter-row .chip:nth-child(4) { animation-delay:135ms; }
.map-filter-row .chip:nth-child(5) { animation-delay:180ms; }
.map-filter-row .chip:nth-child(6) { animation-delay:225ms; }
.map-filter-row .chip:nth-child(7) { animation-delay:270ms; }

/* ── Map card tap feedback ─────────────────────────────────────────── */
.map-card {
  transition: transform .15s ease, opacity .15s ease;
}
.map-card:active { transform: scale(0.97); opacity: 0.88; }
.map-card.selected {
  box-shadow: 0 0 0 2px rgba(255,255,255,.30), 0 12px 32px rgba(0,0,0,.55);
}

/* ── Search result loading pulse ───────────────────────────────────── */
@keyframes vibePulse {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 1;   }
}
.state-box.is-loading {
  animation: vibePulse 1.2s ease-in-out infinite;
}

/* ── Respect prefers-reduced-motion ───────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .app-nav { animation: none !important; }
  .featured-carousel { opacity: 1 !important; transform: none !important; transition: none !important; }
  .event-row { opacity: 1 !important; transform: none !important; transition: none !important; }
  .featured-cta::after { animation: none !important; }
  .filter-seg-btn.anim-pop { animation: none !important; }
  .bottom-nav { transition: none !important; }
  .map-filter-row .chip { animation: none !important; opacity: 1 !important; }
  .state-box.is-loading { animation: none !important; opacity: 1 !important; }
}
