:root {
  --bg: #080808;
  --white: #ffffff;
  --blue: #3392ff;
  --orange: #f97000;
  --yellow: #fffb00;
  --card-w: 316px;
}

/* ---------- Custom fonts ----------
   Real font files live in assets/fonts/ (woff2 = compact + fast, otf = source):
     - Dirty Stains -> headers
     - Drowner      -> lists / body
   Each web font is paired with a metric-matched "* Fallback" face (local Arial
   with size-adjust + ascent/descent overrides) so the fallback occupies the
   exact same space — the swap to the real font causes no layout shift (no jump). */
@font-face {
  font-family: "Dirty Stains";
  src: url("assets/fonts/DirtyStains.woff2") format("woff2"),
    url("assets/fonts/DirtyStains.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Drowner";
  src: url("assets/fonts/Drowner.woff2") format("woff2"),
    url("assets/fonts/Drowner.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Metric-matched fallbacks (shown only until the real fonts finish loading). */
@font-face {
  font-family: "Dirty Stains Fallback";
  src: local("Arial");
  size-adjust: 211.09%;
  ascent-override: 38.37%;
  descent-override: 4.74%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Drowner Fallback";
  src: local("Arial");
  size-adjust: 92.38%;
  ascent-override: 92.02%;
  descent-override: 16.24%;
  line-gap-override: 10.83%;
}

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

html,
body {
  background: var(--bg);
  color: var(--white);
  font-family: "Drowner", "Drowner Fallback", "Oswald", "Arial Narrow", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

/* Phone container — centered column matching the 375px mobile frame */
.phone {
  width: 100%;
  max-width: 375px;
  min-height: 100vh;
  padding: 0 29px 40px;
  position: relative;
}

/* ---------- Top bar ---------- */
.top-bar {
  padding-top: 14px;
}

.socials {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  position: relative;
}

/* Email pinned left, music centered, socials grouped right */
.socials-right {
  display: inline-flex;
  align-items: center;
  gap: 0;
}

/* Pull the right-hand icons closer together (narrower hit-box) */
.socials-right .social {
  width: 26px;
}

.social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  width: 38px;
  border-radius: 8px;
  transition: transform 0.15s ease, background 0.15s ease;
}

.social:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.06);
}

.social img,
.social svg {
  display: block;
}

/* Music logo is wider than the standard icon slot — absolutely centered in the bar */
.social.music {
  width: auto;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.social.music:hover {
  transform: translateX(-50%) translateY(-2px);
}

.social.music img {
  height: 22px;
  width: auto;
}

/* ---------- Wordmark ---------- */
.wordmark {
  font-family: "Dirty Stains", "Dirty Stains Fallback", "Anton", "Oswald", sans-serif;
  font-weight: 400;
  /* Scales down so "NÜ ANDROIDS" always stays on one line, even on small phones */
  font-size: clamp(18px, 5.7vw, 23px);
  letter-spacing: 0.5px;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
  margin: 18px 0 22px;
  line-height: 1;
}

/* The display font maps Ü to a plain U (no dots), so draw the umlaut ourselves. */
.wordmark .umlaut {
  position: relative;
  display: inline-block;
}

.wordmark .umlaut::before,
.wordmark .umlaut::after {
  content: "";
  position: absolute;
  top: -0.2em;
  width: 0.14em;
  height: 0.14em;
  background: currentColor;
  border-radius: 50%;
}

.wordmark .umlaut::before {
  left: 20%;
}

.wordmark .umlaut::after {
  right: 20%;
}

/* ---------- Hero card ---------- */
.hero-card {
  border: 1px solid var(--white);
  border-radius: 5px;
  padding: 16px 20px 18px;
  text-align: center;
}

.hero-text {
  font-size: 16px;
  letter-spacing: 0.8px;
  line-height: 1.25;
  margin-bottom: 14px;
}

.btn-shotgun {
  display: block;
  width: 239px;
  max-width: 100%;
  margin: 0 auto;
  background: var(--yellow);
  color: #000;
  text-decoration: none;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.8px;
  line-height: 34px;
  height: 34px;
  border-radius: 5px;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.btn-shotgun:hover {
  transform: scale(1.02);
  filter: brightness(0.95);
}

/* ---------- Organizer navbar (page tabs) ---------- */
.org-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 26px;
}

.org-nav[hidden] {
  display: none;
}

.org-tab {
  flex: 0 0 auto;
  padding: 6px 14px;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  color: var(--white);
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.15s ease, background 0.15s ease, border-color 0.15s ease,
    transform 0.15s ease;
}

.org-tab:hover {
  opacity: 1;
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.06);
}

.org-tab--active {
  opacity: 1;
  color: #000;
  background: var(--yellow);
  border-color: var(--yellow);
}

.org-tab--active:hover {
  background: var(--yellow);
}

/* ---------- Sections ---------- */
.section {
  margin-top: 44px;
}

.section-title {
  font-family: "Dirty Stains", "Dirty Stains Fallback", "Anton", "Oswald", sans-serif;
  font-weight: 400;
  font-size: 22px;
  letter-spacing: 0.6px;
  text-align: center;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-title__word {
  display: block;
  line-height: 1.05;
}

.section--just .section-title {
  transform: rotate(-5deg);
}
.section--weekend .section-title {
  transform: rotate(7deg);
}
.section--upcoming .section-title {
  transform: rotate(-5deg);
}

.links {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

/* ---------- Link buttons ---------- */
.link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 34px;
  height: auto;
  padding: 8px 12px;
  border: 1px solid currentColor;
  border-radius: 5px;
  text-decoration: none;
  font-size: 16px;
  letter-spacing: 0.8px;
  text-align: center;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.link-label {
  display: block;
}

/* Date + time line shown beneath the show title. */
.link-meta {
  display: block;
  font-size: 12px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  opacity: 0.75;
}

/* ---------- Desktop-only hover tooltip (full title + DJ lineup) ---------- */
/* The tooltip element is hidden everywhere by default and only revealed on
   devices with a real hovering pointer (mouse/trackpad), so touch screens
   never trigger a stuck tooltip. */
.link-tooltip {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .link-tooltip {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    z-index: 20;
    max-width: 280px;
    width: max-content;
    padding: 8px 11px;
    border-radius: 7px;
    background: rgba(10, 10, 12, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
    color: #fff;
    /* Regular system font (not the condensed Drowner display face) so the
       tooltip text reads cleanly and isn't squished together. */
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial,
      sans-serif;
    text-align: left;
    letter-spacing: 0.2px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
  }

  /* Little arrow under the bubble */
  .link--has-tooltip::after {
    content: "";
    position: absolute;
    bottom: calc(100% + 5px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    z-index: 21;
    border: 5px solid transparent;
    border-top-color: rgba(10, 10, 12, 0.97);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
  }

  .link--has-tooltip:hover .link-tooltip,
  .link--has-tooltip:focus-visible .link-tooltip,
  .link--has-tooltip:hover::after,
  .link--has-tooltip:focus-visible::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  .tooltip-title {
    font-size: 12.5px;
    line-height: 1.3;
    font-weight: 600;
  }

  .tooltip-lineup {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.85);
  }

  .tooltip-icon {
    flex: 0 0 auto;
    font-size: 13px;
    line-height: 1;
  }
}

/* Small organizer badge so you can tell which Shotgun org an event belongs to */
.link-org {
  display: inline-block;
  max-width: 100%;
  padding: 1px 8px;
  border: 1px solid color-mix(in srgb, currentColor 55%, transparent);
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Co-host label — shown when an event is shared with another organizer page */
.link-cohost {
  display: inline-block;
  max-width: 100%;
  padding: 1px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, currentColor 16%, transparent);
  font-size: 10px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  opacity: 0.95;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link:hover {
  transform: translateY(-1px);
  background: color-mix(in srgb, currentColor 12%, transparent);
  box-shadow: 0 0 12px color-mix(in srgb, currentColor 40%, transparent);
}

.link--blue {
  color: var(--blue);
}
.link--orange {
  color: var(--orange);
}
.link--yellow {
  color: var(--yellow);
}

/* Hidden links revealed by the "Show more" toggle */
.link--hidden {
  display: none;
}

/* ---------- Show more toggle ---------- */
.show-more {
  display: block;
  margin: 14px auto 0;
  padding: 6px 18px;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 5px;
  color: var(--white);
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.show-more:hover {
  opacity: 1;
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.06);
}

/* ---------- Event search ---------- */
.event-search {
  margin: 4px 0 18px;
}

.event-search__input {
  width: 100%;
  max-width: var(--card-w);
  margin: 0 auto;
  display: block;
  box-sizing: border-box;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 5px;
  color: var(--white);
  font-family: inherit;
  font-size: 15px;
  letter-spacing: 0.8px;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.event-search__input::placeholder {
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.8px;
}

.event-search__input:focus {
  outline: none;
  border-color: var(--blue);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 10px color-mix(in srgb, var(--blue) 35%, transparent);
}

.event-search__empty {
  margin: 14px auto 0;
  max-width: var(--card-w);
  text-align: center;
  font-size: 14px;
  letter-spacing: 0.6px;
  opacity: 0.75;
}

/* While searching: reveal capped items so they're searchable, hide the
   "Show more" toggles, and collapse links / sections with no match. */
#sections.is-searching .show-more {
  display: none;
}

#sections.is-searching .link--hidden:not(.link--search-hidden) {
  display: flex;
}

.link--search-hidden {
  display: none !important;
}

.section--search-empty {
  display: none;
}

/* ---------- Footer ---------- */
.footer {
  display: flex;
  justify-content: center;
  margin-top: 60px;
}

.footer img {
  display: block;
}

/* ---------- Loading / Error / Empty states ---------- */
/* Full-screen blur overlay shown until the first event data is rendered. */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: rgba(8, 8, 8, 0.55);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  opacity: 1;
  transition: opacity 0.35s ease;
}

/* Fade out, then get removed from the DOM by JS once data is painted. */
.loading-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
}

/* Returning visitors with cached event data skip the blur entirely — the
   inline head script adds this class before the overlay ever paints. */
.has-events-cache .loading-overlay {
  display: none;
}

.loading-message {
  margin: 0;
  max-width: var(--card-w);
  padding: 0 20px;
  font-family: "Dirty Stains", "Drowner", sans-serif;
  font-size: 22px;
  letter-spacing: 1px;
  text-align: center;
  color: var(--white);
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.loading-message.is-visible {
  animation: loading-message-pulse 1.6s ease-in-out infinite;
}

@keyframes loading-message-pulse {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}

.loading-spinner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--blue);
  animation: loading-spin 0.8s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .loading-spinner {
    animation-duration: 1.6s;
  }
  .loading-message {
    animation: none;
  }
  .loading-message.is-visible {
    animation: none;
    opacity: 0.9;
  }
  .loading-overlay {
    transition: none;
  }
}

.events-loading,
.events-error,
.events-empty {
  margin-top: 44px;
  text-align: center;
  font-size: 14px;
  letter-spacing: 0.6px;
  line-height: 1.5;
  opacity: 0.75;
}

.events-error {
  color: var(--orange);
  opacity: 1;
}
