/* ============================================================
 * Showday — shared stylesheet (consumer storefront)
 * ------------------------------------------------------------
 * Loaded by every page in /frontend-public/. Carries the
 * page chrome (announcement, nav, buttons, brand mark, footer,
 * reveal motion) and the responsive cascade. Page-specific
 * styles stay inline in each page's <style> block.
 *
 * Depends on /design-tokens.css being loaded first and the
 * .gigentry class being applied to <body>.
 * ============================================================ */

/* ─── 1. Reset + base ───────────────────────────────────── */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at top left, rgba(184, 240, 0, 0.18), transparent 24%),
    radial-gradient(circle at 80% 20%, rgba(255, 60, 0, 0.14), transparent 22%),
    linear-gradient(180deg, #f8f5f1 0%, #f5f2ee 50%, #ece5da 100%);
  background-attachment: fixed;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Soft grid texture, fades toward bottom */
body::before {
  content: ""; position: fixed; inset: 0;
  pointer-events: none; z-index: 0; opacity: 0.22;
  background-image:
    linear-gradient(rgba(15, 13, 11, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 13, 11, 0.03) 1px, transparent 1px);
  background-size: 42px 42px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.82), rgba(0,0,0,0.08));
          mask-image: linear-gradient(180deg, rgba(0,0,0,0.82), rgba(0,0,0,0.08));
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

/* Prevent any rogue horizontal scroll across the entire site —
   cheaper than chasing every overflowing child. `clip` over `hidden`
   so position:sticky still works on descendants. */
html, body { overflow-x: clip; max-width: 100%; }
img, svg, video { max-width: 100%; height: auto; }

.shell { position: relative; overflow: clip; z-index: 1; }
.section { width: min(calc(100% - 32px), var(--max-width)); margin: 0 auto; }

/* ─── 2. Announcement bar ───────────────────────────────── */
.announcement {
  display: flex; justify-content: center; align-items: center;
  gap: 12px; padding: 10px 18px;
  background: rgba(15, 13, 11, 0.92);
  color: #fffefb;
  font-size: 13px;
  text-align: center;
}
.announcement-kicker {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--signal);
  color: var(--text);
  font-family: var(--font-mono);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10px;
}

/* ─── 3. Topbar + nav ───────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.nav {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 16px auto 0;
  padding: 14px 16px 14px 22px;
  border: 1px solid rgba(255, 250, 242, 0.84);
  border-radius: var(--radius-pill);
  background: rgba(255, 250, 242, 0.78);
  box-shadow: var(--shadow-soft);
  display: flex; align-items: center; gap: 18px;
  transition: padding var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.topbar.scrolled .nav {
  padding: 10px 14px 10px 18px;
  box-shadow: 0 12px 36px rgba(15, 13, 11, 0.14);
}

.brand { display: inline-flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-mark {
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand-mark span {
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, var(--signal), var(--gold));
}
.brand-mark span:nth-child(1) { height: 100%; }
.brand-mark span:nth-child(2) { height: 78%; align-self: end; }
.brand-mark span:nth-child(3) { height: 56%; align-self: end; }
.brand-word {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1;
}
.brand-word i {
  font-family: var(--font-italic);
  font-style: italic;
  font-weight: 400;
  color: var(--gold);
  letter-spacing: -0.02em;
}

.nav-links { margin-left: auto; display: flex; gap: 2px; align-items: center; }
.nav-item { position: relative; display: flex; align-items: center; }
.nav-link {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: color var(--dur-fast), background var(--dur-fast);
}
.nav-link:hover,
.nav-link.is-active,
.nav-item.is-active > .nav-link {
  color: var(--text);
  background: rgba(15, 13, 11, 0.06);
}

/* Dropdown caret button */
.nav-caret {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  margin-left: -6px;
  border: 0; padding: 0;
  background: transparent;
  color: var(--text-muted);
  border-radius: 999px;
  cursor: pointer;
  transition: color var(--dur-fast), background var(--dur-fast), transform var(--dur-fast);
}
.nav-caret svg { width: 13px; height: 13px; }
.nav-item:hover > .nav-caret,
.nav-item.menu-open > .nav-caret { color: var(--text); }
.nav-item:hover > .nav-caret svg,
.nav-item.menu-open > .nav-caret svg { transform: rotate(180deg); }

/* Dropdown mega-panel */
.nav-panel {
  position: absolute;
  top: calc(100% + 16px);
  left: 0;
  z-index: 60;
  min-width: 460px;
  padding: 20px;
  border-radius: var(--radius-md);
  background: rgba(255, 251, 245, 0.96);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 250, 242, 0.9);
  box-shadow: var(--shadow-hard);
  opacity: 0; visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out), visibility var(--dur-fast);
}
/* Hover bridge — fills the gap between trigger and panel so hover doesn't drop */
.nav-panel::before {
  content: ""; position: absolute;
  top: -18px; left: 0; right: 0; height: 18px;
}
.nav-item:hover > .nav-panel,
.nav-item:focus-within > .nav-panel,
.nav-item.menu-open > .nav-panel {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.nav-panel-grid { display: flex; gap: 28px; }
.nav-panel-col { display: flex; flex-direction: column; gap: 2px; min-width: 150px; }
.nav-panel-col h5 {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted); opacity: 0.7;
}
.nav-panel-col a {
  padding: 7px 10px;
  border-radius: 12px;
  color: var(--text);
  font-size: 14px; font-weight: 500;
  white-space: nowrap;
  transition: color var(--dur-fast), background var(--dur-fast);
}
.nav-panel-col a:hover { background: rgba(15, 13, 11, 0.06); color: var(--ember); }
.nav-panel-feature {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 14px; padding: 10px 14px;
  border-radius: 999px;
  background: var(--text); color: #fffdf8;
  font-size: 13px; font-weight: 600;
  transition: transform var(--dur-fast), box-shadow var(--dur-base);
}
.nav-panel-feature svg { width: 14px; height: 14px; }
.nav-panel-feature:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(15, 13, 11, 0.26); }

.nav-actions { display: flex; align-items: center; gap: 8px; }

/* Location switcher (lives in nav-actions) */
.nav-loc { position: relative; }
.nav-loc-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.55);
  color: var(--text);
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: background var(--dur-fast), border-color var(--dur-fast);
}
.nav-loc-btn:hover { background: #fff; }
.nav-loc-btn svg { width: 15px; height: 15px; }
.nav-loc-caret { display: inline-flex; }
.nav-loc-caret svg { width: 11px; height: 11px; color: var(--text-muted); }
.nav-panel-loc { left: auto; right: 0; min-width: 220px; }
.nav-panel-loc .nav-panel-col { min-width: 0; }
.nav-signin { min-height: 40px; padding: 0 16px; }

.menu-toggle {
  display: none;
  border: 0;
  background: var(--text);
  color: #fffdf8;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}

/* ─── 4. Buttons ────────────────────────────────────────── */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-pill);
  border: 0;
  font-weight: 600;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: transform var(--dur-fast), box-shadow var(--dur-base);
}
.button:hover { transform: translateY(-2px); }
.button-ink {
  background: var(--text);
  color: #fffdf8;
  box-shadow: 0 10px 24px rgba(15, 13, 11, 0.22);
}
.button-ink:hover { box-shadow: 0 16px 36px rgba(15, 13, 11, 0.30); }
.button-ghost {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line-strong);
  color: var(--text);
}
.button-signal {
  background: linear-gradient(135deg, var(--signal), var(--signal-deep));
  color: var(--text);
  box-shadow: 0 14px 30px rgba(164, 216, 0, 0.28);
}
.button-signal:hover { box-shadow: 0 18px 40px rgba(164, 216, 0, 0.40); }
.button svg { width: 16px; height: 16px; }

/* ─── 5. Editorial primitives (eyebrows, section tags) ── */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}
.eyebrow-line {
  width: 42px; height: 2px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--ember), var(--signal));
}
.section-tag {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.inline-link {
  color: var(--text-muted);
  font-size: 14px;
  display: inline-flex; align-items: center; gap: 6px;
  transition: color var(--dur-fast), gap var(--dur-fast);
}
.inline-link:hover { color: var(--text); gap: 10px; }

/* ─── 6. Crumb (breadcrumb) ─────────────────────────────── */
.crumb {
  padding: 36px 0 16px;
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.crumb a { color: var(--text-muted); transition: color var(--dur-fast); }
.crumb a:hover { color: var(--text); }
.crumb .sep { opacity: 0.5; }

/* ─── 7. Footer ─────────────────────────────────────────── */
.footer {
  display: flex; align-items: start; justify-content: space-between;
  gap: 32px;
  padding: 60px 0 64px;
  margin-top: 40px;
  border-top: 1px solid var(--line);
}
.footer-brand p {
  color: var(--text-muted);
  font-size: 14px;
  max-width: 28rem;
  margin: 14px 0 0;
}
.footer-brand small {
  display: block;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}
.footer-socials { display: flex; gap: 10px; margin-top: 18px; }
.footer-socials a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.5);
  color: var(--text-muted);
  transition: color var(--dur-fast), background var(--dur-fast), transform var(--dur-fast);
}
.footer-socials a svg { width: 18px; height: 18px; }
.footer-socials a:hover { color: var(--text); background: #fff; transform: translateY(-2px); }
.footer-trust {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 18px;
}
.footer-trust span {
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(184, 240, 0, 0.16);
  color: #385600;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.02em;
}
.footer-links {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 28px 32px;
  font-family: var(--font-mono);
  font-size: 13px;
  flex: 1;
  max-width: 780px;
}
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  margin: 0 0 4px;
  opacity: 0.6;
}
.footer-col a { color: var(--text-muted); transition: color var(--dur-fast); }
.footer-col a:hover { color: var(--text); }
@media (max-width: 760px) {
  .footer-links { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; max-width: none; }
}

/* ─── 7b. Event card (shared across listings, directories,
       city pages, genre pages, promoter profile) ───────── */
.ev-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.ev-card {
  display: flex; flex-direction: column;
  min-height: 380px;
  border-radius: 22px;
  overflow: hidden;
  background: #fffdf8;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(15, 13, 11, 0.07);
  text-decoration: none;
  color: inherit;
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.ev-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }
.ev-card.ev-card-past { opacity: 0.65; filter: grayscale(0.3); }

.ev-card-img {
  height: 160px;
  position: relative;
  padding: 14px;
  overflow: hidden;
}
.ev-card-cat {
  display: inline-block;
  padding: 6px 11px;
  border-radius: var(--radius-pill);
  background: rgba(255, 250, 242, 0.18);
  color: #fffefb;
  border: 1px solid rgba(255, 250, 242, 0.28);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}
.ev-card-soldout {
  position: absolute; top: 14px; right: 14px;
  padding: 6px 11px;
  border-radius: var(--radius-pill);
  background: rgba(139, 42, 10, 0.85);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.ev-card-city {
  position: absolute; bottom: 14px; left: 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 250, 242, 0.7);
}
.ev-card-body {
  display: flex; flex-direction: column;
  flex: 1;
  gap: 6px;
  padding: 18px;
}
.ev-card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.035em;
  line-height: 1.15;
  text-wrap: balance;
}
.ev-card-meta, .ev-card-venue {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.ev-card-price {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 18px; font-weight: 700;
  letter-spacing: -0.03em;
}
.ev-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  background: rgba(255, 251, 245, 0.6);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 14px;
}
@media (max-width: 1080px) { .ev-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px)  { .ev-grid { grid-template-columns: 1fr; } }

/* ─── 7c. Prose / legal article styles ─────────────────── */
.prose-shell { padding: 36px 0 80px; max-width: 820px; margin: 0 auto; }
.prose-eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  margin: 24px 0 0;
}
.prose-eyebrow::before {
  content: ""; width: 32px; height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ember), var(--signal));
}
.prose-title {
  margin: 18px 0 14px;
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 68px);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.96;
  text-wrap: balance;
}
.prose-title .ital { font-family: var(--font-italic); font-style: italic; font-weight: 400; color: var(--gold); }
.prose-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  margin: 0 0 32px;
}
.prose-meta b { color: var(--text); font-weight: 700; }

.prose {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
}
.prose > * + * { margin-top: 18px; }
.prose h2 {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 700;
  letter-spacing: -0.035em;
  margin-top: 48px;
  line-height: 1.2;
  text-wrap: balance;
}
.prose h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-top: 32px;
}
.prose p { color: var(--text-muted); }
.prose strong { color: var(--text); font-weight: 700; }
.prose ul, .prose ol { padding-left: 24px; color: var(--text-muted); }
.prose li { margin: 6px 0; }
.prose a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--signal); }
.prose a:hover { color: var(--ember); }
.prose code, .prose .mono {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(15, 13, 11, 0.06);
  color: var(--text);
}
.prose pre {
  margin-top: 16px;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: var(--text);
  color: #fffefb;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
}
.prose pre code { background: transparent; padding: 0; color: inherit; }
.prose blockquote {
  margin: 24px 0;
  padding: 18px 22px;
  border-left: 3px solid var(--signal);
  background: rgba(184, 240, 0, 0.06);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text);
}
.prose blockquote p { color: var(--text); }
.prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 32px 0;
}

/* ─── 8. Reveal motion ─────────────────────────────────── */
[data-reveal] {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }
[data-reveal][data-delay="1"] { transition-delay:  60ms; }
[data-reveal][data-delay="2"] { transition-delay: 120ms; }
[data-reveal][data-delay="3"] { transition-delay: 180ms; }
[data-reveal][data-delay="4"] { transition-delay: 240ms; }
[data-reveal][data-delay="5"] { transition-delay: 300ms; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

/* ─── 9. Responsive ────────────────────────────────────── */
/* Nav collapses to the hamburger at ≤1080px — the mega-nav is too
   dense to fit the pill below that. Dropdown panels become inline
   accordions inside the open menu. */
@media (max-width: 1080px) {
  .nav {
    border-radius: 28px;
    flex-wrap: wrap;
    gap: 10px;
  }
  .footer { flex-direction: column; }
  .footer-links { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: none; }

  .menu-toggle { display: inline-flex; margin-left: auto; }
  .nav-links {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding-top: 12px;
    margin-left: 0;
  }
  .nav.is-open .nav-links { display: flex; }
  .nav-item { flex-wrap: wrap; width: 100%; }
  .nav-link { flex: 1; padding: 14px 16px; border-radius: 14px; font-size: 16px; }
  .nav-caret {
    width: 44px; height: 44px; margin: 0;
    border-radius: 14px;
    background: rgba(15, 13, 11, 0.05);
  }
  .nav-caret svg { width: 16px; height: 16px; }
  /* Inline accordion panel on mobile */
  .nav-panel {
    position: static;
    flex-basis: 100%;
    min-width: 0;
    margin: 4px 0 6px;
    padding: 8px 10px;
    opacity: 1; visibility: visible; transform: none;
    box-shadow: none;
    border-radius: 16px;
    background: rgba(15, 13, 11, 0.04);
    border-color: transparent;
    display: none;
  }
  .nav-panel::before { display: none; }
  .nav-item.menu-open > .nav-panel { display: block; }
  .nav-item:hover > .nav-panel,
  .nav-item:focus-within > .nav-panel { opacity: 1; } /* no hover-reveal on touch */
  .nav-panel-grid { flex-direction: column; gap: 10px; }
  .nav-panel-feature { width: 100%; justify-content: center; }

  .nav-actions {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding-top: 4px;
  }
  .nav.is-open .nav-actions { display: flex; }
  .nav-loc { width: 100%; }
  .nav-loc-btn { width: 100%; justify-content: center; min-height: 44px; }
  .nav-panel-loc { left: 0; right: 0; }
  .nav-signin, .nav-actions .button { width: 100%; min-height: 46px; }
}

@media (max-width: 760px) {
  .announcement { flex-direction: column; gap: 6px; padding: 10px 14px; font-size: 12px; }
  .announcement-kicker { font-size: 9px; padding: 3px 8px; }

  .nav {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 22px;
  }
  .footer-links { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
  .footer { padding: 40px 0 calc(48px + env(safe-area-inset-bottom)); }
}

/* ─── 9b. Phone (≤480px) — tighter spacing, smaller chrome ── */
@media (max-width: 480px) {
  .section {
    width: min(calc(100% - 24px), var(--max-width));
  }
  .nav {
    margin-top: 8px;
    padding: 8px 10px 8px 14px;
    border-radius: 20px;
  }
  .brand-mark { width: 30px; height: 30px; padding: 5px; border-radius: 10px; }
  .brand-mark span:nth-child(1) { height: 100%; }
  .brand-word { font-size: 18px; }
  .menu-toggle { padding: 8px 12px; font-size: 12px; }

  .crumb { padding: 22px 0 12px; font-size: 11px; gap: 8px; }
  .button { min-height: 44px; padding: 0 18px; font-size: 14px; }

  .prose-title { font-size: clamp(32px, 9vw, 48px) !important; }
  .prose-shell { padding: 24px 0 56px; }

  .ev-card { min-height: 340px; border-radius: 18px; }
  .ev-card-img { height: 140px; padding: 12px; }
  .ev-card-body { padding: 16px; gap: 4px; }
  .ev-card-title { font-size: 16px; }
  .ev-card-meta, .ev-card-venue { font-size: 11px; }
  .ev-card-price { font-size: 16px; }
}

/* ─── 9c. Tiny phones (≤360px — old SE / first-gen mini) ── */
@media (max-width: 360px) {
  .section {
    width: min(calc(100% - 16px), var(--max-width));
  }
  .nav { padding: 8px; gap: 8px; }
  .brand-word { font-size: 16px; }
  .footer-links { flex-direction: column; gap: 8px; }
}

/* iOS safe-area for sticky/fixed bottom UI (cookie banner is the main one) */
@supports (padding: env(safe-area-inset-bottom)) {
  .footer { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
}

/* ─── Landing-page hero photo (genre / city / listing heroes) ──
   A <span class="hero-photo" style="--img:url('...')"> dropped in as
   the first child of a hero gets a cover photo behind a dark overlay,
   with the hero's text lifted above it. Degrades to the overlay (and
   the hero's own gradient) if the image fails. */
.genre-hero, .city-hero, .listing-hero { position: relative; }
.genre-hero  > :not(.hero-photo),
.city-hero   > :not(.hero-photo),
.listing-hero > :not(.hero-photo) { position: relative; z-index: 1; }
.hero-photo {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  border-radius: inherit;
  background-image:
    linear-gradient(120deg, rgba(16, 14, 12, 0.86) 0%, rgba(16, 14, 12, 0.52) 50%, rgba(16, 14, 12, 0.88) 100%),
    var(--img);
  background-size: cover;
  background-position: center;
}

/* ============================================================
 * DARK THEME — accessibility toggle (Showday v2)
 * ------------------------------------------------------------
 * Activated by data-theme="dark" on <html> (set pre-paint by a
 * tiny inline script in each page's <head>, persisted in
 * localStorage 'sd-theme'. Opt-in: default is LIGHT unless the
 * user taps the nav toggle. (To instead follow the OS setting,
 * restore a prefers-color-scheme check in gigentry-shell.js and
 * each page's inline init.)
 * Toggle button lives in the nav (gigentry-shell.js).
 *
 * Structure:
 *   1. color-scheme + token overrides (carry all token-driven UI)
 *   2. body background + texture
 *   3. ink-fill fixes (elements that used --text as a BG)
 *   4. shared chrome surfaces (nav, panels, footer, cards, prose)
 *   5. generated long-tail (per-page surface classes)  ← auto
 *   6. form controls + theme-toggle button
 *
 * To remove the dark theme entirely: delete from this banner to
 * the end of the file, and drop the inline init + toggle button.
 * ============================================================ */

[data-theme="dark"] { color-scheme: dark; }

/* 1. Token overrides — most text/borders flip via these ------ */
[data-theme="dark"] .gigentry {
  --bg:            #0e0c0a;
  --bg-strong:     #16120d;
  --surface:       rgba(34, 29, 22, 0.76);
  --surface-solid: #1a160f;
  --text:          #f3efe8;
  --text-muted:    #a59c8f;
  --line:          rgba(255, 255, 255, 0.10);
  --line-strong:   rgba(255, 255, 255, 0.18);
  /* signal lime / ember / gold read well on dark — kept */
  --shadow-soft:   0 20px 60px rgba(0, 0, 0, 0.55);
  --shadow-hard:   0 24px 90px rgba(0, 0, 0, 0.66);
  --shadow-lift:   0 28px 80px rgba(0, 0, 0, 0.66);
}

/* 2. Page background + grid texture ------------------------- */
[data-theme="dark"] body {
  background:
    radial-gradient(circle at top left, rgba(184, 240, 0, 0.10), transparent 24%),
    radial-gradient(circle at 80% 20%, rgba(255, 60, 0, 0.08), transparent 22%),
    linear-gradient(180deg, #141009 0%, #0e0c0a 52%, #090807 100%);
}
[data-theme="dark"] body::before {
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
}

/* 3. Ink-fill fixes — these used var(--text) as a BACKGROUND,
 *    which now resolves light; flip their text dark so the pill
 *    inverts cleanly (light button, dark label). ------------- */
[data-theme="dark"] .button-ink,
[data-theme="dark"] .nav-panel-feature,
[data-theme="dark"] .menu-toggle { color: #16120d; }
[data-theme="dark"] .button-ink { box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5); }
[data-theme="dark"] .button-ink:hover { box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6); }
/* Code block stays a dark slab (it was var(--text) bg + light text) */
[data-theme="dark"] .prose pre {
  background: #080706;
  color: #e9e3d8;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .prose code,
[data-theme="dark"] .prose .mono { background: rgba(255, 255, 255, 0.07); }
[data-theme="dark"] .prose blockquote { background: rgba(184, 240, 0, 0.07); }

/* 4. Shared chrome (gigentry.css surfaces, by hand) --------- */
[data-theme="dark"] .nav {
  background: rgba(24, 20, 15, 0.72);
  border-color: rgba(255, 255, 255, 0.10);
}
[data-theme="dark"] .topbar.scrolled .nav { box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5); }
[data-theme="dark"] .nav-link:hover,
[data-theme="dark"] .nav-link.is-active,
[data-theme="dark"] .nav-item.is-active > .nav-link { background: rgba(255, 255, 255, 0.07); }
[data-theme="dark"] .nav-panel {
  background: rgba(22, 18, 13, 0.97);
  border-color: rgba(255, 255, 255, 0.10);
}
[data-theme="dark"] .nav-panel-col a:hover { background: rgba(255, 255, 255, 0.06); }
[data-theme="dark"] .nav-loc-btn { background: rgba(40, 34, 26, 0.5); }
[data-theme="dark"] .nav-loc-btn:hover { background: rgba(255, 255, 255, 0.12); }
[data-theme="dark"] .button-ghost { background: rgba(40, 34, 26, 0.5); }
[data-theme="dark"] .footer-socials a { background: rgba(40, 34, 26, 0.5); }
[data-theme="dark"] .footer-socials a:hover { background: rgba(255, 255, 255, 0.12); }
[data-theme="dark"] .footer-trust span { color: #d7ff5a; }
[data-theme="dark"] .ev-card {
  background: #17130d;
  border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .ev-empty { background: rgba(36, 30, 22, 0.5); }
[data-theme="dark"] .nav-caret { background: transparent; }
@media (max-width: 1080px) {
  [data-theme="dark"] .nav-caret { background: rgba(255, 255, 255, 0.06); }
  [data-theme="dark"] .nav-panel { background: rgba(255, 255, 255, 0.04); }
}

/* ---- 5. Generated per-page surfaces (auto, see generator) -- */
[data-theme="dark"] .nf-code { background: rgba(36,30,22,0.6); }
[data-theme="dark"] .nf-search { background: rgba(36,30,22,0.86); }
[data-theme="dark"] .nf-card { background: rgba(36,30,22,0.78); }
[data-theme="dark"] .pillar { background: rgba(36,30,22,0.78); }
[data-theme="dark"] .login-box { background: rgba(36,30,22,0.86); border: 1px solid rgba(255,255,255,0.12); }
[data-theme="dark"] .field input { background: rgba(40,34,26,0.78); }
[data-theme="dark"] .ticket-card { background: rgba(36,30,22,0.86); }
[data-theme="dark"] .tag-neutral { background: rgba(255,255,255,0.06); }
[data-theme="dark"] .empty-state { background: rgba(36,30,22,0.6); }
[data-theme="dark"] .aff-hero { background: radial-gradient(circle at 18% 20%, rgba(36,30,22,0.32), transparent 28%),
      linear-gradient(140deg, var(--signal-deep) 0%, var(--signal) 60%, #d2f200 100%); }
[data-theme="dark"] .aff-stat { background: #1a160f; }
[data-theme="dark"] .step-body code { background: rgba(255,255,255,0.06); }
[data-theme="dark"] .endpoint { background: rgba(255,255,255,0.04); }
[data-theme="dark"] .params-head { background: rgba(255,255,255,0.04); }
[data-theme="dark"] .search-block { background: rgba(36,30,22,0.86); }
[data-theme="dark"] .page-meta .count { background: rgba(255,255,255,0.08); }
[data-theme="dark"] .filter-bar { background: rgba(36,30,22,0.88); }
[data-theme="dark"] .filter-select { background: rgba(40,34,26,0.78); }
[data-theme="dark"] .event-card { background: #1a160f; border: 1px solid rgba(255,255,255,0.091); }
[data-theme="dark"] .event-art::after { background: rgba(40,34,26,0.10); border: 1px solid rgba(255,255,255,0.12); }
[data-theme="dark"] .event-card.wave .event-art { background: radial-gradient(circle at 70% 15%, rgba(40,34,26,.20), transparent 30%), linear-gradient(135deg, #0d1c22 0%, #1e4857 45%, #59a7b8 100%); }
[data-theme="dark"] .event-card.rose .event-art { background: radial-gradient(circle at 60% 30%, rgba(40,34,26,.18), transparent 24%), linear-gradient(140deg, #260f1c 0%, #6e1d3b 45%, #c95a87 100%); }
[data-theme="dark"] .event-badge { background: rgba(36,30,22,0.16); border: 1px solid rgba(255,255,255,0.12); }
[data-theme="dark"] .availability.dim { background: rgba(255,255,255,.08); }
[data-theme="dark"] .co-section { background: rgba(36,30,22,0.86); border: 1px solid rgba(255,255,255,0.12); }
[data-theme="dark"] .fi { background: rgba(40,34,26,0.7); }
[data-theme="dark"] .card-brand { background: rgba(255,255,255,0.06); }
[data-theme="dark"] .order-box { background: rgba(36,30,22,0.86); border: 1px solid rgba(255,255,255,0.12); }
[data-theme="dark"] .modal { background: #1a160f; }
[data-theme="dark"] .city-hero::after { background: rgba(40,34,26,0.04); border: 1px solid rgba(255,255,255,0.08); }
[data-theme="dark"] .listing-hero::after { background: rgba(40,34,26,0.04); border: 1px solid rgba(255,255,255,0.08); }
[data-theme="dark"] .pill:hover { background: #1a160f; }
[data-theme="dark"] .step-card { background: rgba(36,30,22,0.78); }
[data-theme="dark"] .cc { background: rgba(255,255,255,0.04); }
[data-theme="dark"] .contact-card { background: rgba(36,30,22,0.86); }
[data-theme="dark"] .quick-help-list a { background: rgba(40,34,26,0.04); }
[data-theme="dark"] .quick-help-list a:hover { background: rgba(40,34,26,0.10); }
[data-theme="dark"] .legal-line { background: rgba(255,255,255,0.04); }
[data-theme="dark"] .ck-table th { background: rgba(255,255,255,0.04); }
[data-theme="dark"] .ck-table td code { background: rgba(255,255,255,0.06); }
[data-theme="dark"] .hero-art::after { background: rgba(40,34,26,0.08); border: 1px solid rgba(255,255,255,0.12); }
[data-theme="dark"] .art-badge { background: rgba(36,30,22,0.18); border: 1px solid rgba(255,255,255,0.12); }
[data-theme="dark"] .hero-info { background: rgba(36,30,22,0.86); border: 1px solid rgba(255,255,255,0.12); }
[data-theme="dark"] .act { background: rgba(36,30,22,0.5); }
[data-theme="dark"] .promoter-line { background: rgba(36,30,22,0.7); }
[data-theme="dark"] .tickets-card { background: rgba(36,30,22,0.86); border: 1px solid rgba(255,255,255,0.12); }
[data-theme="dark"] .tier:hover { background: rgba(40,34,26,0.5); }
[data-theme="dark"] .qty-row { background: rgba(255,255,255,0.04); }
[data-theme="dark"] .venue-card { background: rgba(36,30,22,0.7); }
[data-theme="dark"] .genre-hero::after { background: rgba(40,34,26,0.04); border: 1px solid rgba(255,255,255,0.08); }
[data-theme="dark"] .gs-final .button-ghost { background: rgba(36,30,22,.1); border-color: rgba(255,255,255,0.12); }
[data-theme="dark"] .find-bar { background: rgba(36,30,22,0.86); border: 1px solid rgba(255,255,255,0.12); }
[data-theme="dark"] .hero-tags span { background: rgba(255,255,255,0.06); }
[data-theme="dark"] .trust-strip article { border-right: 1px solid rgba(255,255,255,0.08); }
[data-theme="dark"] .m-wave { background: radial-gradient(circle at 70% 15%, rgba(40,34,26,.2), transparent 30%), linear-gradient(135deg, #0d1c22, #1e4857 45%, #59a7b8); }
[data-theme="dark"] .m-rose { background: radial-gradient(circle at 60% 30%, rgba(40,34,26,.18), transparent 26%), linear-gradient(140deg, #260f1c, #6e1d3b 48%, #c95a87); }
[data-theme="dark"] .city-card { border: 1px solid rgba(255,255,255,0.13); }
[data-theme="dark"] .genre-tile { border: 1px solid rgba(255,255,255,0.13); }
[data-theme="dark"] .news-card { background: #1a160f; }
[data-theme="dark"] .home-cta .button-ghost { background: rgba(40,34,26,.1); border-color: rgba(255,255,255,0.12); }
[data-theme="dark"] .trust-strip article:nth-child(1), .trust-strip article:nth-child(2) { border-bottom: 1px solid rgba(255,255,255,0.08); }
[data-theme="dark"] .spin { border: 2.5px solid rgba(255,255,255,0.1); }
[data-theme="dark"] .feat-card { background: #1a160f; }
[data-theme="dark"] .m-wave { background: radial-gradient(circle at 70% 15%,rgba(40,34,26,.2),transparent 30%),linear-gradient(135deg,#0d1c22,#1e4857 45%,#59a7b8); }
[data-theme="dark"] .m-rose { background: radial-gradient(circle at 60% 30%,rgba(40,34,26,.18),transparent 26%),linear-gradient(140deg,#260f1c,#6e1d3b 48%,#c95a87); }
[data-theme="dark"] .promo-hero::after { background: rgba(40,34,26,0.04); border: 1px solid rgba(255,255,255,0.08); }
[data-theme="dark"] .follow-card { background: rgba(36,30,22,0.86); }
[data-theme="dark"] #noEvents { background: rgba(36,30,22,0.6); }
[data-theme="dark"] .pro-search input { background: rgba(36,30,22,0.9); }
[data-theme="dark"] .pro-card { background: rgba(36,30,22,0.86); }
[data-theme="dark"] .empty { background: rgba(36,30,22,0.6); }
[data-theme="dark"] .num-row { background: rgba(40,34,26,0.04); }
[data-theme="dark"] .toc { background: rgba(36,30,22,0.78); }
[data-theme="dark"] .lookup { background: rgba(36,30,22,0.86); border: 1px solid rgba(255,255,255,0.12); }
[data-theme="dark"] .ticket { background: #1a160f; border: 1px solid rgba(255,255,255,0.078); }
[data-theme="dark"] .tx-card { background: rgba(36,30,22,0.86); border: 1px solid rgba(255,255,255,0.12); }
[data-theme="dark"] .tx-state { background: rgba(36,30,22,0.86); }
[data-theme="dark"] .venue-hero::after { background: rgba(40,34,26,0.04); border: 1px solid rgba(255,255,255,0.08); }
[data-theme="dark"] .venue-stat { background: rgba(36,30,22,0.86); }
[data-theme="dark"] .venue-search input { background: rgba(36,30,22,0.9); }
[data-theme="dark"] .venue-card { background: rgba(36,30,22,0.86); }
[data-theme="dark"] .quick-pill { background: rgba(36,30,22,0.78); }
[data-theme="dark"] .card { background: rgba(36,30,22,0.86); }
[data-theme="dark"] .demo-area { background: rgba(255,255,255,0.03); }
[data-theme="dark"] .copy-btn { background: rgba(40,34,26,0.08); border: 1px solid rgba(255,255,255,0.12); }
[data-theme="dark"] .copy-btn:hover { background: rgba(40,34,26,0.14); }
[data-theme="dark"] .qty-btn { background: #0e0c0a; }
[data-theme="dark"] .w-summary { background: #0e0c0a; }
[data-theme="dark"] .w-spinner { border: 2px solid rgba(255,255,255,0.12); }

/* ---- 5b. B5: per-page inline LIGHT surfaces that the block above
 *      missed — focus/selected/hover states + the Stripe card slab
 *      that hard-coded background:#fff and so stayed white-on-white
 *      in dark mode. Backgrounds -> surface-solid (#1a160f); borders
 *      already use var(--line) (flips via tokens) so are left alone.
 *      Generated by the same pass; remove this fence to revert 5b. -- */
[data-theme="dark"] #cardElement { background: #1a160f; }
[data-theme="dark"] .fi:focus { background: #1a160f; }
[data-theme="dark"] .field input:focus { background: #1a160f; }
[data-theme="dark"] .follow-form input { background: #1a160f; }
[data-theme="dark"] .gs-input { background: #1a160f; }
[data-theme="dark"] .input { background: #1a160f; }
[data-theme="dark"] .pro-search input:focus { background: #1a160f; }
[data-theme="dark"] .quick-pill:hover { background: #1a160f; }
[data-theme="dark"] .search-block input { background: #1a160f; }
[data-theme="dark"] .tier.is-selected { background: #1a160f; }
[data-theme="dark"] .venue-search input:focus { background: #1a160f; }

/* ---- 6. Form controls + theme-toggle button --------------- */
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea { color: var(--text); border-color: var(--line-strong); }
[data-theme="dark"] ::placeholder { color: #8a8175; opacity: 1; }
[data-theme="dark"] .gigentry { accent-color: var(--signal); }

/* Theme toggle — lives in the nav, visible at every breakpoint */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; flex-shrink: 0;
  padding: 0; margin: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.55);
  color: var(--text);
  cursor: pointer;
  transition: background var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast), transform var(--dur-fast);
}
.theme-toggle:hover { background: #fff; transform: translateY(-1px); }
.theme-toggle:active { transform: translateY(0); }
.theme-toggle svg { width: 18px; height: 18px; display: block; }
.theme-toggle .icon-moon { display: none; }
.theme-toggle .icon-sun  { display: block; }
[data-theme="dark"] .theme-toggle { background: rgba(40, 34, 26, 0.5); }
[data-theme="dark"] .theme-toggle:hover { background: rgba(255, 255, 255, 0.12); }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun  { display: none; }

/* On the collapsed mobile nav the toggle sits beside the brand */
@media (max-width: 1080px) {
  .theme-toggle { width: 42px; height: 42px; }
}

/* ---- 7. Cookie consent banner (consent.js injects these) -- */
[data-theme="dark"] #ge-cookie-banner {
  background: rgba(24, 20, 15, 0.94);
  border-color: rgba(255, 255, 255, 0.10);
  color: #f3efe8;
}
[data-theme="dark"] .ge-cb-text strong { color: #f3efe8; }
[data-theme="dark"] .ge-cb-text p { color: #a59c8f; }
[data-theme="dark"] .ge-cb-text a { color: #f3efe8; }
[data-theme="dark"] .ge-cb-btn { color: #f3efe8; border-color: rgba(255, 255, 255, 0.22); }
[data-theme="dark"] .ge-cb-btn:hover { background: rgba(255, 255, 255, 0.08); }
[data-theme="dark"] .ge-cb-accept { background: #f3efe8; color: #16120d; border-color: #f3efe8; }
[data-theme="dark"] .ge-cb-accept:hover { background: #fff; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4); }

/* Announcement bar is now a promoter CTA link (-> get-started) */
.announcement { cursor: pointer; transition: background var(--dur-fast, .15s); text-decoration: none; }
.announcement:hover { background: #0f0d0b; }
.announcement:hover span:not(.announcement-kicker) { text-decoration: underline; text-underline-offset: 2px; }
