/*
 * Agent Athens Design System — Phase 0 Foundation
 * Dark-mode tokens, Manrope font, global reset, layout grid.
 * Referenced by all page templates via <link>.
 */

/* ── Design Tokens ───────────────────────────────────── */

:root {
  /* Colors — Dark theme */
  --bg-primary: #0d0d0d;
  --bg-elevated: #151515;
  --bg-surface: #1e1e1e;
  --bg-raised: #282828;           /* interactive states inside elevated containers */
  --bg-overlay: rgba(13,13,13,0.92);

  --text-primary: #f0f0f0;
  --text-secondary: #a0a0a0;
  --text-tertiary: #959595;   /* was #888 — bumped for 4.5:1 on --bg-surface */
  --text-muted: #7a7a7a;     /* was #444 → #6b6b6b → #7a7a7a for 4.5:1 on --bg-primary. Do NOT use on --bg-raised (3.4:1 — WCAG AA FAIL) */

  --accent-primary: #f5e642;   /* Limit to: CTAs, active states, links, highlights, badges */
  --accent-secondary: #ef2c46; /* Limit to: urgency/live indicators only */

  --border-whisper: rgba(240, 240, 240, 0.06);
  --border-subtle: rgba(240, 240, 240, 0.15);  /* was 0.10 — bumped for visibility */
  --border-default: rgba(240, 240, 240, 0.40);
  --border-active: rgba(240, 240, 240, 0.80);

  /* Semantic colors */
  --color-enriched: #7c3aed;
  --focus-ring: #58A6FF;
  --text-on-bright: #0d0d0d;
  --status-error: #FF4458;
  --status-error-subtle: rgba(239, 68, 68, 0.15);
  --status-success: #34D399;
  --status-success-subtle: rgba(16, 185, 129, 0.15);
  --status-warning: #FBBF24;

  /* Event type colors */
  --color-concert: #f5e642;
  --color-dj-set: #e040fb;
  --color-exhibition: #7eb8f7;
  --color-cinema: #b87ef7;
  --color-theater: #ef2c46;
  --color-dance: #ec407a;
  --color-performance: #f5a742;
  --color-workshop: #7ef7b8;
  --color-conference: #66bb6a;
  --color-show: #ffa726;
  --color-screening: #ef5350;   /* same as cinema */
  --color-opera: #ff7043;       /* theater family */
  --color-classical: #ffa726;   /* warm amber */
  --color-comedy: #ffca28;      /* bright yellow-amber */
  --color-festival: #f5e642;    /* concert family */
  --color-meetup: #66bb6a;      /* conference family */
  --color-hackathon: #29b6f6;   /* workshop family */
  --color-seminar: #66bb6a;     /* conference family */
  --color-other: #78909c;       /* neutral */

  /* Typography */
  --font-primary: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Type scale */
  --type-hero: 4rem;
  --type-h1: 2.5rem;
  --type-h2: 1.75rem;
  --type-h3: 1.25rem;
  --type-body: 1rem;
  --type-body-lg: 1.125rem;
  --type-small: 0.875rem;
  --type-caption: 0.6875rem;
  --type-ui: 0.75rem;

  /* Line heights */
  --leading-tight: 1.05;
  --leading-snug: 1.15;
  --leading-normal: 1.55;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-sm-md: 12px;
  --space-md: 16px;
  --space-md-lg: 24px;
  --space-lg: 32px;
  --space-lg-xl: 40px;
  --space-xl-2xl: 48px;
  --space-xl: 64px;
  --space-2xl: 96px;

  /* Motion */
  --t-instant: 0ms;
  --t-micro: 80ms;
  --t-fast: 120ms;
  --t-base: 150ms;
  --t-moderate: 200ms;
  --t-slow: 300ms;
  --t-deliberate: 500ms;
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);

  /* Safe areas */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);

  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-circle: 50%;
  --radius-full: 999px;

  /* Shadows — tuned for dark backgrounds */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);

  /* Z-index layers */
  --z-base: 0;
  --z-dropdown: 10;
  --z-sticky: 50;
  --z-filter-bar: 99;
  --z-nav: 100;
  --z-bottom-bar: 150;
  --z-overlay-below: 199;
  --z-overlay: 200;
  --z-overlay-above: 201;
  --z-modal: 300;
  --z-skip-link: 999;
}

/* ── Tabular numbers for aligned numeric data ─────── */
.event-card-date, .event-card-price, .event-card-time,
.hub-event-count, .comparison-table td,
time, [data-price], [data-count] {
  font-variant-numeric: tabular-nums;
}

/* ── Mobile type overrides ──────────────────────────── */
@media (max-width: 767px) {
  :root {
    --type-hero: 2.5rem;
    --type-h1: 2rem;
    --type-h2: 1.5rem;
    --type-h3: 1.125rem;
    --type-small: 0.8125rem;
  }
}

/* ── Letter spacing ─────────────────────────────────── */
.edp-title, .hero-heading { letter-spacing: -0.5px; }
.card-badge { letter-spacing: 1.2px; }
.edp-cta { letter-spacing: 1.92px; }

/* ── Global Reset ────────────────────────────────────── */

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

/* ── Base Styles ─────────────────────────────────────── */

body {
  font-family: var(--font-primary);
  line-height: 1.6;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* iOS zoom prevention — inputs below 16px trigger Safari auto-zoom */
input, textarea, select {
  font-size: max(16px, 1em);
}

/* Minimum tap targets for touch devices (WCAG 2.5.8) */
@media (pointer: coarse) {
  button, a, [role="button"], input[type="checkbox"], input[type="radio"] {
    min-height: 44px;
    min-width: 44px;
  }
}

body.scroll-locked,
body.scroll-locked-menu { overflow: hidden; }

a {
  color: var(--accent-primary);
  text-decoration: none;
}

a:hover {
  color: var(--accent-primary);
  filter: brightness(1.15);
  text-decoration: underline;
}

/* ── View Transitions API (MPA cross-document) ─────── */

@view-transition { navigation: auto; }

/* Named transition targets — persistent across pages */
.site-header { view-transition-name: site-header; }
.site-footer { view-transition-name: site-footer; }
#main-content { view-transition-name: main-content; }

/* Header & footer stay put — no animation */
::view-transition-old(site-header),
::view-transition-new(site-header),
::view-transition-old(site-footer),
::view-transition-new(site-footer) {
  animation: none;
}

/* Main content cross-fades */
::view-transition-old(main-content) {
  animation: var(--t-fast) var(--ease-out) both vt-fade-out;
}
::view-transition-new(main-content) {
  animation: var(--t-moderate) var(--ease-out) both vt-fade-in;
}

/* Root fallback — catches anything not named */
::view-transition-old(root) {
  animation: var(--t-moderate) var(--ease-out) both vt-fade-out;
}
::view-transition-new(root) {
  animation: var(--t-moderate) var(--ease-out) both vt-fade-in;
}

@keyframes vt-fade-out { to { opacity: 0; } }
@keyframes vt-fade-in { from { opacity: 0; } }

/* ── Reduced Motion ──────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Skip Link ───────────────────────────────────────── */

.skip-link {
  position: absolute; top: -100%; left: var(--space-md);
  z-index: 999; padding: var(--space-sm) var(--space-md);
  background: var(--accent-primary); color: var(--bg-primary);
  font-weight: var(--font-weight-bold); font-size: var(--type-small);
  border-radius: 0 0 var(--radius-md) var(--radius-md); text-decoration: none;
}
.skip-link:focus { top: 0; }

/* ── Focus Visible ──────────────────────────────────── */

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

/* ── Layout ──────────────────────────────────────────── */

.page-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 40px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

@media (min-width: 1280px) {
  .card-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 1024px) {
  .page-container { padding: 0 24px; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  .page-container { padding: 0 16px; }
  .card-grid { grid-template-columns: 1fr; gap: var(--space-md); }
}

/* ── Page content min-height (prevents footer riding up) ── */

main#main-content,
article#main-content,
div#main-content {
  min-height: calc(100dvh - 64px - 200px);
}
@media (max-width: 767px) {
  main#main-content,
  article#main-content,
  div#main-content {
    min-height: calc(100dvh - 56px - 160px);
  }
}

/* ── Event Cards ────────────────────────────────────── */

.event-card {
  display: block;
  position: relative;
  isolation: isolate;
}

/* Card-link: heading-only <a> with ::before covering the full card */
.card-link { color: inherit; text-decoration: none; }
.card-link::before { content: ''; position: absolute; inset: 0; z-index: 1; }

/* Badges/actions sit above the ::before overlay */
.card-badge, .card-badge-open { position: relative; z-index: 2; }

/* Focus: outline on card boundary via :has(), with fallback */
.card-link:focus-visible { outline: none; }
.event-card:has(.card-link:focus-visible) {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: var(--radius-md);
}
/* Fallback for browsers without :has() */
@supports not selector(:has(*)) {
  .card-link:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
    border-radius: var(--radius-md);
  }
}

.card-image-wrapper {
  position: relative;
  padding-top: 133.33%; /* 3:4 portrait aspect ratio */
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  overflow: hidden;
}

/* ── Per-type fallback gradients (shared across all card variants) ── */

.card-image-wrapper[data-type="concert"],
.hero-card-image-wrapper[data-type="concert"],
.hero-pick-image[data-type="concert"],
.card-image-wrapper[data-type="comedy"],
.hero-card-image-wrapper[data-type="comedy"],
.hero-pick-image[data-type="comedy"],
.card-image-wrapper[data-type="festival"],
.hero-card-image-wrapper[data-type="festival"],
.hero-pick-image[data-type="festival"] {
  background: linear-gradient(135deg, #2a2400, #1a1800);
}
.card-image-wrapper[data-type="dj_set"],
.hero-card-image-wrapper[data-type="dj_set"],
.hero-pick-image[data-type="dj_set"],
.card-image-wrapper[data-type="performance"],
.hero-card-image-wrapper[data-type="performance"],
.hero-pick-image[data-type="performance"] {
  background: linear-gradient(135deg, #1a0a2a, #120818);
}
.card-image-wrapper[data-type="exhibition"],
.hero-card-image-wrapper[data-type="exhibition"],
.hero-pick-image[data-type="exhibition"],
.card-image-wrapper[data-type="conference"],
.hero-card-image-wrapper[data-type="conference"],
.hero-pick-image[data-type="conference"],
.card-image-wrapper[data-type="meetup"],
.hero-card-image-wrapper[data-type="meetup"],
.hero-pick-image[data-type="meetup"] {
  background: linear-gradient(135deg, #0a2a1a, #081812);
}
.card-image-wrapper[data-type="theater"],
.hero-card-image-wrapper[data-type="theater"],
.hero-pick-image[data-type="theater"],
.card-image-wrapper[data-type="show"],
.hero-card-image-wrapper[data-type="show"],
.hero-pick-image[data-type="show"] {
  background: linear-gradient(135deg, #2a1a00, #1a1200);
}
.card-image-wrapper[data-type="cinema"],
.hero-card-image-wrapper[data-type="cinema"],
.hero-pick-image[data-type="cinema"],
.card-image-wrapper[data-type="screening"],
.hero-card-image-wrapper[data-type="screening"],
.hero-pick-image[data-type="screening"] {
  background: linear-gradient(135deg, #2a0a0a, #1a0808);
}
.card-image-wrapper[data-type="dance"],
.hero-card-image-wrapper[data-type="dance"],
.hero-pick-image[data-type="dance"] {
  background: linear-gradient(135deg, #2a0a1a, #1a0812);
}
.card-image-wrapper[data-type="workshop"],
.hero-card-image-wrapper[data-type="workshop"],
.hero-pick-image[data-type="workshop"] {
  background: linear-gradient(135deg, #0a1a2a, #081218);
}

.card-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Image Lazy-Load Fade ──────────────────────────── */
/* Images visible by default; JS adds .will-fade before load,
   then .is-loaded on complete — so images never get stuck invisible. */

.card-image.will-fade,
.feature-image-wrapper img.will-fade,
.list-image-wrapper img.will-fade,
.carousel-card-image.will-fade {
  opacity: 0;
  transition: opacity var(--t-slow) var(--ease-out);
}
.card-image.is-loaded,
.feature-image-wrapper img.is-loaded,
.list-image-wrapper img.is-loaded,
.carousel-card-image.is-loaded {
  opacity: 1;
}

.card-placeholder-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  color: rgba(240, 240, 240, 0.08);
  pointer-events: none;
}

.card-placeholder-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.card-badge {
  position: absolute;
  bottom: var(--space-sm);
  left: var(--space-sm);
  font-size: var(--type-ui);  /* 12px — was 11px, below WCAG minimum */
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  color: var(--text-on-bright);
  line-height: 1;
}

.card-badge--light-text {
  color: var(--text-primary);
}

.card-badge-open {
  position: absolute;
  bottom: var(--space-sm);
  right: var(--space-sm);
  font-size: var(--type-ui);  /* 12px — was 11px */
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  background: var(--color-exhibition);
  color: var(--text-on-bright);
  line-height: 1;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-sm-md) 0 0 0;
}

.card-title {
  font-size: var(--type-h3);
  font-weight: var(--font-weight-bold);
  line-height: 1.2;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--t-instant);
}

.event-card:hover .card-title {
  color: var(--accent-primary);
}

.card-date {
  font-size: var(--type-small);
  color: var(--accent-primary);
}

.card-venue {
  font-size: var(--type-small);
  color: var(--text-secondary);
}

.card-price {
  font-size: var(--type-small);
  color: var(--text-tertiary);
}

/* ── Date Group Headers ─────────────────────────────── */

.date-group-header {
  grid-column: 1 / -1;
  position: sticky;
  top: 64px;
  z-index: var(--z-sticky);
  font-size: var(--type-h3);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  padding: var(--space-sm-md) 0;
  margin: 0;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-subtle);
}

/* ── Date Group Wrapper ───────────────────────────── */

.date-group {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md-lg);
}

@media (min-width: 1280px) {
  .date-group { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 1024px) {
  .date-group { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  .date-group { grid-template-columns: 1fr; }
}

.date-group[data-count="1"] .event-card {
  max-width: 66%;
}

@media (min-width: 1280px) {
  .date-group[data-count="1"] .event-card { max-width: 50%; }
}

@media (max-width: 1024px) {
  .date-group[data-count="1"] .event-card { max-width: 100%; }
}

/* ── Mobile overrides ───────────────────────────────── */

@media (max-width: 767px) {
  .card-image-wrapper { max-height: 280px; }
  .date-group-header { top: 56px; }
}

/* ── Site Header ─────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  isolation: isolate;
  height: 64px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 40px;
  padding-top: var(--safe-top);
}

.site-header-inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.site-logo {
  font-family: var(--font-primary);
  font-weight: var(--font-weight-bold);
  font-size: var(--type-body-lg);
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.2px;
}
.site-logo:hover { color: var(--text-primary); text-decoration: none; }

.site-header-left { display: flex; align-items: center; gap: var(--space-md); }
.site-header-right { display: flex; align-items: center; gap: var(--space-sm-md); }

/* Nav search button */
.nav-search-btn {
  display: flex;
  align-items: center; justify-content: center;
  width: 44px; height: 44px;
  background: none; border: none; cursor: pointer;
  color: var(--text-secondary);
  transition: color var(--t-base);
}
.nav-search-btn:hover { color: var(--text-primary); }
.nav-search-btn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: var(--radius-sm); }

.search-kbd {
  display: none;
  font-size: var(--type-ui);  /* was --type-caption (11px) — bumped to 12px minimum */
  font-family: var(--font-primary);
  color: var(--text-tertiary);
  background: var(--bg-surface);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  line-height: 1;
  margin-left: var(--space-xs);
}
@media (min-width: 768px) {
  .search-kbd { display: inline-block; }
  .nav-search-btn { width: auto; }
}

/* Hamburger */
.hamburger-btn {
  display: none; /* hidden on desktop */
  align-items: center; justify-content: center;
  width: 44px; height: 44px;
  background: none; border: none; cursor: pointer;
}
.hamburger-icon {
  display: block; width: 20px; height: 2px;
  background: var(--text-secondary);
  position: relative;
}
.hamburger-icon::before,
.hamburger-icon::after {
  content: ''; position: absolute; left: 0; width: 20px; height: 2px;
  background: var(--text-secondary);
}
.hamburger-icon::before { top: -6px; }
.hamburger-icon::after { top: 6px; }
.hamburger-btn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: var(--radius-sm); }

@media (max-width: 767px) {
  .site-header { height: 56px; padding: 0 var(--space-md); padding-top: var(--safe-top); }
  .site-header-right { gap: var(--space-sm); }
  .hamburger-btn { display: flex; }
  .site-header .lang-toggle { display: none; }
}

/* ── Mobile Menu ─────────────────────────── */

.mobile-overlay {
  display: none;
  position: fixed; inset: 0; z-index: var(--z-overlay);
  isolation: isolate;
  background: var(--bg-overlay);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.mobile-overlay.open {
  display: block;
  animation: fadeIn var(--t-moderate) var(--ease-out);
}

.mobile-menu {
  position: fixed; top: 0; right: 0;
  width: 100%; max-width: 320px; height: 100dvh;
  background: var(--bg-elevated);
  z-index: var(--z-overlay-above);
  isolation: isolate;
  transform: translateX(100%);
  transition: transform var(--t-slow) var(--ease-out);
  padding: 72px 24px 24px;
}
.mobile-menu.open { transform: translateX(0); }

.mobile-menu-close {
  position: absolute; top: var(--space-md); right: var(--space-md);
  width: 44px; height: 44px;
  background: none; border: none; cursor: pointer;
  color: var(--text-secondary); font-size: 24px;
  display: flex; align-items: center; justify-content: center;
}

.mobile-menu-items {
  list-style: none; margin: 0; padding: 0;
}
.mobile-menu-items li { border-bottom: 1px solid var(--border-subtle); }
.mobile-menu-items a {
  display: flex; align-items: center;
  height: 56px; font-size: var(--type-body);
  color: var(--text-primary); text-decoration: none;
}
.mobile-menu-items a:hover { color: var(--text-primary); text-decoration: none; }
.mobile-menu-items a:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; border-radius: var(--radius-sm); }

.mobile-menu-search {
  display: flex; align-items: center;
  width: 100%; height: 56px;
  font-size: var(--type-body); font-family: var(--font-primary);
  color: var(--text-primary);
  background: none; border: none; cursor: pointer;
  text-align: left;
}

.mobile-menu-lang {
  margin-top: var(--space-md-lg); display: flex; gap: var(--space-md);
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

@keyframes slide-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Site Footer ─────────────────────────── */

.site-footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-subtle);
  padding: 48px 40px 24px;
  margin-top: var(--space-2xl);
}

.site-footer-inner {
  max-width: 1320px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-lg);
}

.footer-tagline {
  font-size: var(--type-small);
  color: var(--text-tertiary);
  margin-top: var(--space-sm);
  line-height: 1.5;
}

.footer-heading {
  font-size: var(--type-ui);
  font-weight: var(--font-weight-regular);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-tertiary);
  margin-bottom: var(--space-sm-md);
}

.footer-links {
  list-style: none; margin: 0; padding: 0;
}
.footer-links li { margin-bottom: var(--space-sm); }
.footer-links a {
  font-size: var(--type-small); color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--t-instant);
}
.footer-links a:hover { color: var(--text-primary); text-decoration: none; }
.footer-links a:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: var(--radius-sm); }

.footer-ai-callout {
  margin-top: var(--space-lg);
  padding: var(--space-md);
  background: var(--bg-surface);
  border-left: 3px solid var(--accent-primary);
  border-radius: var(--radius-sm);
  font-size: var(--type-small);
  color: var(--text-secondary);
  line-height: 1.6;
}
.footer-ai-title {
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.footer-bottom {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copyright {
  font-size: var(--type-ui);  /* was --type-caption (11px) — bumped to 12px minimum */
  color: var(--text-muted);
}

@media (max-width: 767px) {
  .site-footer { padding: var(--space-lg) var(--space-md) 20px; margin-top: var(--space-xl); }
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-lg); }
}

/* ── Event Detail Page (edp-*) ──────────────── */

/* Hero */
.edp-hero {
  position: relative;
  padding: 80px 40px 48px;
  overflow: hidden;
  isolation: isolate;
}
.edp-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(40px) saturate(1.8);
  opacity: 0.4;
  z-index: 0;
}
.edp-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1320px;
  margin: 0 auto;
}
.edp-breadcrumb {
  font-size: var(--type-small);
  color: var(--text-secondary);
  margin-bottom: var(--space-md-lg);
}
.edp-breadcrumb a { color: var(--text-secondary); }
.edp-breadcrumb a:hover { color: var(--text-primary); }
.edp-type-badge {
  display: inline-block;
  font-size: var(--type-ui);  /* 12px — was 11px */
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--space-xs) var(--space-sm-md);
  border-radius: var(--radius-sm);
  color: var(--text-on-bright);
  background: var(--edp-type-color, var(--accent-primary));
  line-height: 1;
  margin-bottom: var(--space-sm-md);
}
.edp-type-badge--light-text { color: var(--text-primary); }
.edp-open-badge {
  display: inline-block;
  background: var(--color-exhibition);
  color: var(--text-on-bright);
  font-size: var(--type-ui);  /* 12px — was 11px */
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--space-xs) var(--space-sm-md);
  border-radius: var(--radius-sm);
  margin-left: var(--space-sm);
  line-height: 1;
}
.edp-title {
  font-size: 56px;
  font-weight: var(--font-weight-bold);
  line-height: var(--leading-tight);
  margin: var(--space-sm) 0 var(--space-md);
  letter-spacing: -0.5px;
}
.edp-meta {
  font-size: var(--type-body-lg);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
}
.edp-meta-date {
  color: var(--edp-type-color, var(--accent-primary));
  font-weight: var(--font-weight-bold);
}
.edp-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-md-lg);
  padding: 14px var(--space-lg);
  background: var(--accent-primary);
  color: var(--text-on-bright);
  font-size: var(--type-body);
  font-weight: var(--font-weight-bold);
  border-radius: 999px;
  text-decoration: none;
  min-height: 44px;
  transition: opacity var(--t-fast) var(--ease-out);
}
.edp-cta:hover { opacity: 0.85; text-decoration: none; color: var(--text-on-bright); }
.edp-cta:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

/* Past-event banner */
.event-passed-banner {
  max-width: 800px;
  margin: var(--space-md) auto;
  padding: var(--space-md) var(--space-md-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  text-align: center;
}
.event-passed-banner p {
  color: var(--text-secondary);
  font-size: var(--type-small);
  margin: 0;
}

/* Content */
.edp-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 40px 0;
}

/* Description with read-more */
.edp-description {
  margin-bottom: var(--space-lg);
}
.edp-description p {
  font-size: var(--type-body-lg);
  line-height: 1.8;
  margin-bottom: var(--space-md);
}
.edp-description.is-collapsed {
  max-height: 7.2em;
  overflow: hidden;
  position: relative;
}
.edp-description.is-collapsed::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3em;
  background: linear-gradient(transparent, var(--bg-primary));
  pointer-events: none;
}
.edp-lang-notice {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: var(--space-sm);
}
.edp-enriched-badge {
  display: inline-block;
  background: var(--color-enriched);
  color: white;
  font-size: var(--type-ui);
  padding: var(--space-xs) var(--space-sm-md);
  border-radius: var(--radius-lg);
  margin-top: var(--space-sm-md);
}
.edp-read-more {
  display: inline-block;
  background: none;
  border: none;
  color: var(--accent-primary);
  font-size: var(--type-body);
  font-weight: var(--font-weight-bold);
  cursor: pointer;
  padding: var(--space-sm) 0;
  margin-bottom: var(--space-md-lg);
  min-height: 44px;
}
.edp-read-more:hover { color: var(--accent-primary); filter: brightness(1.15); }
.edp-read-more:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: var(--radius-sm); }

/* Inline CTA (body content, GEO source order) */
.edp-inline-cta {
  padding: var(--space-md-lg) 0;
}
.edp-inline-cta .edp-cta {
  margin-top: 0;
}
.edp-open-entry {
  display: inline-block;
  font-size: var(--type-body);
  font-weight: var(--font-weight-bold);
  color: var(--text-secondary);
  padding: var(--space-sm) 0;
}

/* Past-event treatment */
[data-past="true"] .edp-hero-bg {
  filter: blur(40px) saturate(1.8) brightness(0.4) grayscale(0.5);
}
[data-past="true"] .edp-inline-cta {
  display: none;
}
[data-past="true"] .edp-mobile-bar {
  display: none !important;
}

/* Venue section */
.edp-venue-section {
  background: var(--bg-surface);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 24px;
}
.edp-venue-section h2 {
  font-size: var(--type-body-lg);
  margin: 0 0 8px;
}
.edp-venue-address {
  font-size: var(--type-body);
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.edp-venue-neighborhood {
  font-size: var(--type-small);
  color: var(--text-tertiary);
  margin-bottom: 12px;
}
.edp-venue-maps {
  font-size: var(--type-small);
  font-weight: var(--font-weight-bold);
}

/* Source attribution */
.edp-source {
  font-size: var(--type-small);
  color: var(--text-tertiary);
  margin-bottom: 24px;
}

/* Connections nav */
.edp-connections {
  background: var(--bg-surface);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 32px;
}
.edp-connections h2 {
  font-size: var(--type-body);
  margin: 0 0 10px;
}
.edp-connections a {
  display: block;
  margin-bottom: 8px;
}

/* Related events grid */
.edp-related { margin-bottom: 32px; }
.edp-related h2 {
  font-size: var(--type-h3);
  margin-bottom: 20px;
}
.edp-related .card-grid {
  grid-template-columns: repeat(2, 1fr);
}

/* Practical info table */
.event-practical { margin: var(--space-md-lg) 0; padding: var(--space-md); background: var(--bg-surface); border-radius: var(--radius-md); }
.event-practical h2 { margin: 0 0 var(--space-sm-md) 0; font-size: var(--type-body-lg); }
.practical-table { width: 100%; border-collapse: collapse; }
.practical-table th {
  text-align: left;
  font-weight: 600;
  font-size: var(--type-small);
  color: var(--text-secondary);
  padding: 6px 12px 6px 0;
  white-space: nowrap;
  vertical-align: top;
}
.practical-table td {
  font-size: var(--type-body);
  padding: 6px 0;
  vertical-align: top;
}
.practical-table a { color: var(--accent-primary); }
.practical-table a:hover { text-decoration: underline; }
.open-now-badge { display: inline-block; background: var(--status-success); color: white; font-size: var(--type-ui); padding: 2px 8px; border-radius: var(--radius-lg); margin-left: var(--space-sm); font-weight: var(--font-weight-medium); vertical-align: middle; }

/* Mobile sticky CTA bar */
.edp-mobile-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-bottom-bar);
  background: var(--bg-elevated);
  box-shadow: 0 -1px 0 var(--border-whisper);
  padding: 12px 16px;
  padding-bottom: calc(12px + var(--safe-bottom));
  transform: translateY(100%);
  transition: transform var(--t-moderate) var(--ease-out);
}
.edp-mobile-bar.is-visible {
  transform: translateY(0);
}
.edp-mobile-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.edp-mobile-bar-info {
  flex: 1;
  min-width: 0;
}
.edp-mobile-bar-title {
  font-size: 14px;
  font-weight: var(--font-weight-bold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.edp-mobile-bar-price {
  font-size: 12px;
  color: var(--text-secondary);
}
.edp-mobile-bar .edp-cta {
  margin-top: 0;
  padding: 10px 20px;
  font-size: 14px;
  flex-shrink: 0;
}

/* ── EDP Responsive ─────────────────────────── */

@media (max-width: 1024px) {
  .edp-hero { padding: 60px 24px 36px; }
  .edp-title { font-size: 44px; }
  .edp-content { padding: 32px 24px 0; }
}

@media (max-width: 767px) {
  .edp-hero { padding: 40px 16px 28px; }
  .edp-title { font-size: 36px; }
  .edp-content { padding: 24px 16px 0; }
  .edp-cta.edp-cta-hero { display: none; }
  .edp-mobile-bar { display: block; }
  .edp-related .card-grid { grid-template-columns: 1fr; }
  body:has(.edp-mobile-bar) { padding-bottom: 80px; }
}

/* ── Filter Bar ───────────────────────────────── */

.filter-bar {
  position: sticky;
  top: 64px;
  z-index: var(--z-filter-bar);
  isolation: isolate;
  height: 56px;
  display: flex;
  background: var(--bg-primary);
  box-shadow: 0 1px 0 var(--border-whisper);
  padding: 0;
}

/* Inner scroll container — horizontal pill scrolling.
   overflow-x clips panels; lifted via .has-open-panel on .filter-bar */
.filter-bar-scroll {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex: 1;
  min-width: 0;
}
.filter-bar-scroll::-webkit-scrollbar { display: none; }

@media (max-width: 767px) {
  .filter-bar { top: 56px; height: 52px; padding: var(--space-md) 0; }
}

/* ── Filter Pills ─────────────────────────────── */

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: var(--space-sm) 14px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-primary);
  font-size: var(--type-ui);
  font-weight: var(--font-weight-regular);
  white-space: nowrap;
  cursor: pointer;
  transition: border-color var(--t-instant), color var(--t-instant), background var(--t-instant);
  user-select: none;
  flex-shrink: 0;
}
.filter-pill:hover {
  border-color: var(--border-active);
  color: var(--text-primary);
}
.filter-pill .filter-pill-chevron {
  display: inline-block;
  width: 10px;
  height: 10px;
  transition: transform var(--t-fast);
}
.filter-pill.is-open {
  background: var(--bg-raised);
  border-color: var(--border-active);
  color: var(--text-primary);
}
.filter-pill.is-open .filter-pill-chevron {
  transform: rotate(180deg);
}
.filter-pill.is-active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: var(--bg-primary);
  font-weight: var(--font-weight-bold);
}
.filter-pill.is-active:hover {
  color: var(--bg-primary);
}
.filter-pill.is-disabled {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

/* Suppress browser focus ring on mouse click; show only on keyboard */
.filter-pill:focus {
  outline: none;
}
.filter-pill:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

/* When a panel is open, lift filter-bar above backdrop (z:199)
   and disable scroll clipping so panels can overflow visually */
.filter-bar.has-open-panel {
  z-index: var(--z-overlay);
}
.filter-bar.has-open-panel .filter-bar-scroll {
  overflow: visible;
}

.filter-pill-dismiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 2px;
  margin-right: -4px;
  border-radius: var(--radius-circle);
  font-size: var(--type-ui);
  line-height: 1;
  color: var(--bg-primary);
  cursor: pointer;
  text-decoration: none;
}
.filter-pill-dismiss:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
.filter-pill-dismiss:hover {
  opacity: 0.8;
  text-decoration: none;
  color: var(--bg-primary);
}

@media (max-width: 767px) {
  .filter-pill { min-height: 44px; padding: 10px 16px; }
}

/* ── Filter Dropdown Panels ───────────────────── */

.filter-panel-anchor {
  position: relative;
}

.filter-panel {
  display: none;
  position: absolute;
  top: calc(100% + var(--space-sm));
  left: 0;
  min-width: 280px;
  max-height: 400px;
  overflow-y: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  padding: var(--space-md);
  z-index: var(--z-overlay);
  opacity: 0;
  transform: translateY(-4px);
}
.filter-panel.is-open {
  display: block;
  opacity: 1;
  transform: translateY(0);
  animation: filterPanelIn var(--t-fast) var(--ease-out);
}

@keyframes filterPanelIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.filter-panel-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay-below);
  background: transparent;
}
.filter-panel-backdrop.is-open {
  display: block;
}

/* ── Mobile Sheet Elements (hidden on desktop) ── */

.filter-sheet-handle {
  display: none;
}
.filter-sheet-title {
  display: none;
}

/* ── Mobile Bottom Sheets ────────────────────── */

@media (max-width: 767px) {
  .filter-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    min-width: 0;
    max-height: 70vh;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: var(--space-md) var(--space-md) calc(var(--space-md-lg) + var(--safe-bottom));
    z-index: var(--z-overlay);
    border: none;
    box-shadow: 0 -4px 32px rgba(0, 0, 0, 0.5);
  }
  .filter-panel.is-open {
    animation: sheetSlideUp var(--t-moderate) var(--ease-out);
  }

  .filter-panel-backdrop {
    z-index: var(--z-overlay-below);
  }
  .filter-panel-backdrop.is-open {
    background: var(--bg-overlay);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }

  .filter-sheet-handle {
    display: block;
    width: 40px;
    height: 4px;
    background: var(--border-default);
    border-radius: 2px;
    margin: 0 auto var(--space-md);
  }
  .filter-sheet-title {
    display: block;
    font-size: var(--type-body);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin-bottom: var(--space-md);
  }
}

@keyframes sheetSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* ── Type Panel ───────────────────────────────── */

.filter-type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
}

@media (max-width: 767px) {
  .filter-type-grid { grid-template-columns: 1fr 1fr; }
  .filter-panel[data-panel-for="type"] { min-width: 0; }
}

.filter-type-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: var(--space-sm-md) 14px;
  background: var(--bg-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 13px;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.filter-type-tile:hover {
  border-color: var(--border-default);
  text-decoration: none;
  color: var(--text-primary);
}
.filter-type-tile.is-selected {
  border-color: var(--tile-color, var(--accent-primary));
  background: color-mix(in srgb, var(--tile-color, var(--accent-primary)) 15%, transparent);
}

.filter-type-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-circle);
  flex-shrink: 0;
}

.filter-type-label {
  flex: 1;
  min-width: 0;
}

.filter-type-count {
  font-size: var(--type-ui);
  color: var(--text-tertiary);
  flex-shrink: 0;
}

/* Type panel wider for 3-column grid */
.filter-panel[data-panel-for="type"] { min-width: 420px; }

/* ── Filter Panel Footer ─────────────────────── */

.filter-panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm-md) 0 0;
  margin-top: var(--space-sm-md);
  border-top: 1px solid var(--border-subtle);
}

.filter-reset {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--t-fast);
}
.filter-reset:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.filter-panel-footer-count {
  font-size: var(--type-ui);
  color: var(--text-tertiary);
}

/* ── Price / Sort Panels (Radio List) ─────────── */

.filter-radio-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.filter-radio-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: var(--space-sm-md) 14px;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  text-decoration: none;
  font-size: var(--type-small);
  transition: background var(--t-fast);
}
.filter-radio-row:hover {
  background: var(--bg-raised);
  text-decoration: none;
  color: var(--text-primary);
}

.filter-radio-circle {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-default);
  border-radius: var(--radius-circle);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--t-fast);
}
.filter-radio-row.is-selected .filter-radio-circle {
  border-color: var(--accent-primary);
}
.filter-radio-row.is-selected .filter-radio-circle::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: var(--radius-circle);
  background: var(--accent-primary);
}

.filter-radio-label { flex: 1; }
.filter-radio-count {
  font-size: var(--type-ui);
  color: var(--text-tertiary);
}

/* ── Panel Close Button (desktop only) ────────── */

.filter-panel-close {
  display: none;
  position: absolute;
  top: var(--space-sm-md);
  right: var(--space-sm-md);
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-size: var(--type-small);
  line-height: 1;
  cursor: pointer;
  border-radius: var(--radius-sm);
  padding: 0;
  transition: color var(--t-fast), background var(--t-fast);
}
.filter-panel-close:hover {
  color: var(--text-primary);
  background: var(--bg-raised);
}

@media (min-width: 768px) {
  .filter-panel-close { display: flex; }
  .filter-panel { padding-top: 20px; }
}

/* ── Result Count + Clear All ─────────────────── */

.filter-bar-meta {
  margin-left: auto;
  display: flex;
  gap: var(--space-md);
  align-items: center;
  flex-shrink: 0;
}

.filter-result-count {
  font-size: var(--type-ui);
  font-weight: var(--font-weight-regular);
  color: var(--text-tertiary);
  white-space: nowrap;
}

.filter-clear-all {
  font-size: var(--type-ui);
  font-weight: var(--font-weight-regular);
  color: var(--text-tertiary);
  text-decoration: none;
  white-space: nowrap;
}
.filter-clear-all:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

/* ── Date Group Header offset when filter bar present ── */

.has-filter-bar .date-group-header {
  top: 120px; /* 64px nav + 56px filter bar */
}

@media (max-width: 767px) {
  .has-filter-bar .date-group-header {
    top: 108px; /* 56px nav + 52px filter bar */
  }
}

/* ── List Row Card ──────────────────────────────── */

.event-card-list {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-top: 1px solid var(--border-subtle);
  position: relative;
  isolation: isolate;
}

.event-card-list:has(.card-link:focus-visible) {
  outline: 2px solid var(--focus-ring);
  outline-offset: var(--space-xs);
  border-radius: var(--radius-md);
}

.list-image-wrapper {
  width: 200px;
  height: 112px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  overflow: hidden;
  position: relative;
}

.list-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.list-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.event-card-list:hover .card-title {
  color: var(--accent-primary);
}

@media (max-width: 767px) {
  .list-image-wrapper {
    width: 120px;
    height: 67px;
  }
}

/* ── Feature Card ───────────────────────────────── */

.event-card-feature {
  display: block;
  width: 100%;
  position: relative;
  isolation: isolate;
}

.event-card-feature:has(.card-link:focus-visible) {
  outline: 2px solid var(--focus-ring);
  outline-offset: var(--space-xs);
  border-radius: var(--radius-md);
}

.feature-image-wrapper {
  position: relative;
  padding-top: 56.25%; /* 16:9 aspect ratio */
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  overflow: hidden;
}

.feature-image-wrapper img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-base) var(--ease-out);
}

.event-card-feature:hover .feature-image-wrapper img {
  transform: scale(1.02);
}

.feature-body {
  padding: var(--space-md) 0 0;
}

.feature-body .card-title {
  font-size: var(--type-h2);
  line-height: var(--leading-snug);
}

.feature-description {
  font-size: var(--type-body);
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: var(--space-sm);
}

/* ── Hero Section ───────────────────────────────── */

.hero-section {
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: var(--space-md-lg);
  padding-bottom: var(--space-md-lg);
}

.hero-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.hero-heading {
  font-size: var(--type-h2);
  font-weight: var(--font-weight-bold);
}

.hero-see-all {
  font-size: var(--type-small);
  font-weight: var(--font-weight-regular);
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--t-fast);
}
.hero-see-all:hover {
  color: var(--accent-primary);
  text-decoration: underline;
}

.hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-md-lg);
}

/* ── Hero Featured Card ─────────────────────────── */

.hero-card {
  text-decoration: none;
  color: inherit;
  display: block;
}
.hero-card:hover { text-decoration: none; color: inherit; }

.hero-card--featured .hero-card-image-wrapper {
  position: relative;
  padding-top: 56.25%; /* 16:9 */
  border-radius: 12px;
  background: var(--bg-elevated);
  overflow: hidden;
}

.hero-card-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-base) var(--ease-out);
}
.hero-card--featured:hover .hero-card-image {
  transform: scale(1.03);
}

.hero-card-body {
  padding: var(--space-sm-md) 0 0;
}

.hero-card-title {
  font-size: var(--type-h2);
  font-weight: var(--font-weight-bold);
  line-height: 1.15;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--t-instant);
}
.hero-card--featured:hover .hero-card-title {
  color: var(--accent-primary);
}

.hero-card-desc {
  font-size: var(--type-small);
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 6px;
}

/* ── Hero Pick Cards ────────────────────────────── */

.hero-picks {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-card--pick {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}
.hero-card--pick:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.hero-pick-image {
  width: 120px;
  height: 80px;
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--bg-elevated);
  overflow: hidden;
  position: relative;
}
.hero-pick-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-pick-body {
  flex: 1;
  min-width: 0;
}

.hero-pick-title {
  font-size: 15px;
  font-weight: var(--font-weight-bold);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--t-instant);
}
.hero-card--pick:hover .hero-pick-title {
  color: var(--accent-primary);
}

.hero-card--pick .card-date {
  font-size: 12px;
}
.hero-card--pick .card-venue {
  font-size: 12px;
}

/* ── Hero Responsive ────────────────────────────── */

@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-picks {
    flex-direction: row;
    overflow-x: auto;
    gap: 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .hero-picks::-webkit-scrollbar { display: none; }

  .hero-card--pick {
    flex-direction: column;
    min-width: 160px;
    flex-shrink: 0;
    padding-bottom: 0;
    border-bottom: none;
  }
  .hero-pick-image {
    width: 100%;
    height: 100px;
  }
}

@media (max-width: 767px) {
  .hero-heading { font-size: var(--type-h3); }
  .hero-card-title { font-size: var(--type-h3); }
  .hero-card--pick { min-width: 140px; }
  .hero-pick-image { height: 88px; }
}

/* ── Content Page ───────────────────────────────── */

.content-page-body {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-xl-2xl) var(--space-lg-xl);
}

.content-page-body h1 {
  font-size: var(--type-h1);
  font-weight: var(--font-weight-bold);
  line-height: 1.15;
  margin-bottom: var(--space-md-lg);
}

.content-page-body h2 {
  font-size: var(--type-h2);
  font-weight: var(--font-weight-bold);
  line-height: 1.2;
  margin-top: var(--space-lg-xl);
  margin-bottom: var(--space-md);
}

.content-page-body h3 {
  font-size: var(--type-h3);
  font-weight: var(--font-weight-bold);
  line-height: 1.3;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm-md);
}

.content-page-body p {
  font-size: var(--type-body);
  line-height: 1.55;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.content-page-body p:last-child { margin-bottom: 0; }

.content-page-body ul,
.content-page-body ol {
  font-size: var(--type-body);
  line-height: 1.55;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  padding-left: var(--space-lg);
}
.content-page-body li { margin-bottom: var(--space-xs); }
.content-page-body li strong { color: var(--text-primary); }

.content-page-body a {
  color: var(--accent-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.content-page-body a:hover {
  color: var(--accent-primary);
  filter: brightness(1.15);
}

.content-page-body blockquote {
  border-left: 3px solid var(--border-default);
  padding-left: var(--space-md);
  margin: var(--space-lg) 0;
  color: var(--text-tertiary);
  font-style: italic;
}

@media (max-width: 1024px) {
  .content-page-body { padding: 36px 24px; }
}

@media (max-width: 767px) {
  .content-page-body { padding: 24px 16px; }
  .content-page-body h1 { font-size: 32px; }
  .content-page-body h2 { font-size: 24px; }
  .content-page-body h3 { font-size: 18px; }
}

/* ── Search Overlay ────────────────────────── */

.search-overlay {
  display: none;
  position: fixed; inset: 0; z-index: var(--z-modal);
  isolation: isolate;
  align-items: flex-start; justify-content: center;
  padding-top: 15vh;
}
.search-overlay.is-open { display: flex; }

.search-overlay-backdrop {
  position: fixed; inset: 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.search-overlay-panel {
  position: relative;
  max-width: 600px; width: 90%;
  max-height: 80vh;
  background: var(--bg-elevated);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,.5);
}

.search-input-wrapper {
  display: flex; align-items: center; gap: var(--space-sm-md);
  padding: var(--space-md) var(--space-md-lg);
  border-bottom: 1px solid var(--border-subtle);
}

.search-input-icon {
  flex-shrink: 0;
  color: var(--text-tertiary);
}

.search-input {
  flex: 1;
  font-family: var(--font-primary);
  font-size: max(16px, var(--type-body));
  background: transparent;
  border: none; outline: none;
  color: var(--text-primary);
}
.search-input::placeholder { color: var(--text-tertiary); }
.search-input:focus-visible { outline: none; box-shadow: 0 1px 0 0 var(--focus-ring); }

.search-results { padding: var(--space-sm) 0; }

.search-group { display: none; }
.search-group-title {
  font-size: var(--type-ui);  /* was --type-caption (11px) — bumped to 12px minimum */
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  padding: var(--space-sm-md) var(--space-md-lg) var(--space-xs);
}

.search-result-item {
  display: flex; align-items: center; gap: var(--space-sm-md);
  padding: var(--space-sm-md) var(--space-md-lg);
  text-decoration: none;
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--t-instant);
}
.search-result-item:hover {
  background: var(--bg-raised);
  text-decoration: none;
  color: var(--text-primary);
}

.search-result-thumb {
  width: 48px; height: 32px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}
.search-result-thumb-placeholder {
  width: 48px; height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-raised);
  flex-shrink: 0;
}

.search-result-text { min-width: 0; }

.search-result-title {
  font-size: var(--type-small);
  font-weight: var(--font-weight-bold);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-result-meta {
  font-size: var(--type-ui);
  color: var(--text-secondary);
}

.search-empty {
  text-align: center;
  padding: var(--space-lg) var(--space-md-lg);
  color: var(--text-tertiary);
  font-size: var(--type-small);
}

/* Close button */
.search-close-btn {
  position: absolute; top: var(--space-sm-md); right: var(--space-sm-md);
  width: 36px; height: 36px;
  background: none; border: none; cursor: pointer;
  color: var(--text-secondary); display: flex;
  align-items: center; justify-content: center;
  border-radius: var(--radius-md); z-index: 1;
  transition: background var(--t-fast);
}
.search-close-btn:hover { background: var(--bg-raised); }

/* Clear button */
.search-clear-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text-tertiary); font-size: 20px;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* Skeleton loading */
.search-skeleton { padding: var(--space-sm) 0; }
.skeleton-row {
  display: flex; align-items: center; gap: var(--space-sm-md);
  padding: var(--space-sm-md) var(--space-md-lg);
}
.skeleton-thumb {
  width: 48px; height: 32px;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-surface) 50%, var(--bg-elevated) 75%);
  background-size: 400% 100%;
  animation: skeleton-sweep 1.4s ease infinite;
}
.skeleton-lines { flex: 1; }
.skeleton-line {
  height: 12px; border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-surface) 50%, var(--bg-elevated) 75%);
  background-size: 400% 100%;
  animation: skeleton-sweep 1.4s ease infinite;
  margin-bottom: 6px;
}
.skeleton-line.short { width: 60%; }
@keyframes skeleton-sweep {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Sold-out state — activates when template emits data-sold-out */
.event-card[data-sold-out] .card-image-wrapper {
  filter: grayscale(0.6);
  opacity: 0.7;
}
.event-card[data-sold-out] .card-body { opacity: 0.6; }
.card-badge-sold-out {
  position: absolute;
  top: var(--space-sm); right: var(--space-sm);
  font-size: var(--type-ui);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  background: var(--status-error);
  color: var(--text-primary);
  line-height: 1;
}

/* Active item highlight (keyboard nav) */
.search-result-item.is-active {
  background: var(--bg-raised);
  outline: 2px solid var(--focus-ring);
  outline-offset: -2px;
}

/* See all link */
.search-see-all {
  display: block;
  padding: var(--space-sm) var(--space-md-lg);
  font-size: var(--type-ui);
  color: var(--accent-primary);
  text-decoration: none;
}
.search-see-all:hover { text-decoration: underline; }

/* Screen reader only */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Popular / Recent sections */
.search-popular, .search-recent { padding: var(--space-sm) 0; }

@media (max-width: 767px) {
  .search-overlay { padding-top: 0; align-items: stretch; }
  .search-overlay-panel {
    width: 100%; max-width: 100%;
    max-height: 100%; height: 100%;
    border-radius: 0;
  }
}

/* ── Page Header ────────────────────────────────── */

.page-header { margin-bottom: 16px; }
.page-header-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-md);
}
.page-header h1 { font-size: var(--type-h1); margin: 0; }
.last-update { font-size: var(--type-ui); color: var(--text-tertiary); white-space: nowrap; flex-shrink: 0; }
.related-pages { margin: var(--space-md-lg) 0; padding: var(--space-md); background: var(--bg-surface); border-radius: var(--radius-md); }
.related-pages ul { list-style: none; display: flex; gap: var(--space-md); flex-wrap: wrap; margin-top: var(--space-sm); }

/* ── Venue Pages ────────────────────────────────── */

.venue-page-content { max-width: 800px; margin: 0 auto; padding: var(--space-md-lg); }
.venue-page-content .breadcrumb { font-size: var(--type-small); color: var(--text-secondary); margin-bottom: var(--space-md-lg); }
.venue-header { margin-bottom: var(--space-lg); border-bottom: 2px solid var(--border-default); padding-bottom: var(--space-md-lg); }
.venue-header h1 { font-size: var(--type-h1); margin-bottom: var(--space-sm-md); }
.venue-meta { color: var(--text-secondary); font-size: var(--type-body); }
.venue-meta p { margin: var(--space-xs) 0; }
.venue-events { margin: var(--space-lg) 0; }
.venue-events h2 { font-size: var(--type-h3); margin-bottom: var(--space-md-lg); }
.venue-events .venue-event-list { list-style: none; display: flex; flex-direction: column; }
.venue-events .venue-event-list .event-card-list:first-child { border-top: none; }
.more-events { color: var(--text-secondary); font-style: italic; margin-top: var(--space-md-lg); }
.venue-map { margin-bottom: var(--space-lg); }
.venue-map h2 { font-size: var(--type-h3); margin-bottom: var(--space-sm-md); }
.venue-map iframe { display: block; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); }
.venue-map-attribution { display: block; margin-top: var(--space-xs); font-size: var(--type-ui); color: var(--text-tertiary); }
.venue-map-attribution a { color: var(--text-tertiary); }

/* Venue index */
.venue-index-content { max-width: 800px; margin: 0 auto; padding: var(--space-md-lg); }
.venue-index-header { margin-bottom: var(--space-lg); border-bottom: 2px solid var(--border-default); padding-bottom: var(--space-md-lg); }
.venue-index-header h1 { font-size: var(--type-h1); margin-bottom: var(--space-sm-md); }
.venue-list { list-style: none; }
.venue-list li { padding: var(--space-md) 0; border-bottom: 1px solid var(--border-subtle); display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: var(--space-sm-md); }
.venue-list a { font-weight: 500; }
.event-count { color: var(--text-secondary); font-size: var(--type-small); }
.neighborhood { display: inline-block; background: var(--bg-surface); font-size: var(--type-ui); padding: 2px var(--space-sm); border-radius: var(--radius-full); color: var(--text-secondary); }

/* ── Error Page ─────────────────────────────────── */

.error-page { max-width: 600px; margin: 0 auto; padding: var(--space-2xl) var(--space-md); text-align: center; min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.error-code { font-size: var(--type-hero); font-weight: var(--font-weight-bold); color: var(--text-muted); line-height: 1; margin-bottom: var(--space-md); }
.error-page h1 { font-size: var(--type-h2); margin-bottom: var(--space-md); }
.error-page p { font-size: var(--type-body); color: var(--text-secondary); line-height: 1.6; margin-bottom: var(--space-lg); }
.error-home-link { display: inline-block; padding: var(--space-sm-md) var(--space-lg); background: var(--accent-primary); color: var(--bg-primary); font-weight: var(--font-weight-bold); border-radius: var(--radius-full); text-decoration: none; transition: opacity var(--t-fast); }
.error-home-link:hover { opacity: 0.85; text-decoration: none; color: var(--bg-primary); }

/* ── Hub Pages ─────────────────────────────────── */

/* Answer Capsule — accent-primary left border (context 5 of 5) */
.hub-answer-capsule {
  padding: var(--space-lg);
  background: var(--bg-surface);
  border-left: 4px solid var(--accent-primary);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-xl);
}
.answer-capsule-text {
  font-size: var(--type-body-lg);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  font-weight: var(--font-weight-regular);
  max-width: 65ch;
}
.hub-stats {
  color: var(--text-secondary);
  font-size: var(--type-small);
  margin-top: var(--space-sm);
}
.hub-stats a { color: var(--text-secondary); text-decoration: none; }
.hub-stats a:hover { color: var(--accent-primary); text-decoration: underline; }

/* Hub Navigation Grid (homepage) */
.hub-nav-section { margin-bottom: var(--space-lg); }
.hub-nav-heading {
  font-size: var(--type-small);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  margin-bottom: var(--space-md);
}
.hub-nav-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm);
}
.hub-card {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 12px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-primary);
  transition: border-color var(--t-fast) var(--ease-out);
}
.hub-card:hover { border-color: var(--accent-primary); }
.hub-card:hover .hub-card-title { color: var(--accent-primary); }
.hub-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-circle);
  flex-shrink: 0;
}
.hub-card-body { display: flex; flex-direction: column; min-width: 0; }
.hub-card-title { font-size: var(--type-small); font-weight: var(--font-weight-bold); }
.hub-card-count { font-size: 0.75rem; color: var(--text-tertiary); }

/* Terminal CTA (homepage footer navigation) */
.terminal-cta {
  text-align: center;
  padding: var(--space-lg);
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  margin: var(--space-xl) 0;
}
.terminal-cta-heading {
  font-size: var(--type-small);
  color: var(--text-tertiary);
  margin-bottom: var(--space-sm);
}
.terminal-cta-links a {
  color: var(--accent-primary);
  text-decoration: none;
  font-size: var(--type-small);
}
.terminal-cta-links a:hover { text-decoration: underline; }

/* Mobile: 2-col hub grid, cap visible cards */
@media (max-width: 767px) {
  .hub-nav-grid { grid-template-columns: repeat(2, 1fr); }
  .hub-card:nth-child(n+7) { display: none; }
}

/* Comparison Table */
.hub-comparison-table-section { margin: var(--space-lg) 0; }
.table-scroll-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.hub-comparison-table { width: 100%; border-collapse: collapse; font-size: var(--type-small); }
.hub-comparison-table th {
  text-align: left;
  font-weight: var(--font-weight-bold);
  font-size: var(--type-ui);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-tertiary);
  padding: var(--space-sm) var(--space-md);
  border-bottom: 2px solid var(--border-default);
  white-space: nowrap;
  position: sticky;
  top: 0;
  background: var(--bg-primary);
}
.hub-comparison-table td {
  padding: var(--space-sm) var(--space-md);
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}
.hub-comparison-table tr:hover { background: rgba(240, 240, 240, 0.04); }
.hub-comparison-table a { color: var(--text-primary); text-decoration: none; }
.hub-comparison-table a:hover { text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 767px) {
  .hub-comparison-table td,
  .hub-comparison-table th {
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--type-ui);
  }
}

/* Event Blocks */
.hub-event-blocks { margin: var(--space-xl) 0; }
.hub-event-block { margin-bottom: var(--space-lg); padding-bottom: var(--space-lg); border-bottom: 1px solid var(--border-subtle); }
.hub-event-block:last-child { border-bottom: none; }
.hub-event-block h3 { margin-bottom: var(--space-xs); }
.hub-event-block h3 a { color: var(--text-primary); text-decoration: none; }
.hub-event-block h3 a:hover { color: var(--accent-primary); }
.hub-event-meta { font-size: var(--type-small); color: var(--text-secondary); margin-bottom: var(--space-sm); }
.hub-event-excerpt { color: var(--text-primary); line-height: var(--leading-normal); }

/* FAQ Accordion */
.hub-faq { margin: var(--space-xl) 0; }
.hub-faq h2 {
  font-size: var(--type-h2);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}
.hub-faq details { border-bottom: 1px solid var(--border-subtle); }
.hub-faq details:first-of-type { border-top: 1px solid var(--border-subtle); }
.hub-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) 0;
  cursor: pointer;
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  font-size: var(--type-body);
  font-family: var(--font-primary);
  list-style: none;
  min-height: 44px;
}
.hub-faq summary:hover { color: var(--text-secondary); }
.hub-faq summary::marker { display: none; }
.hub-faq summary::-webkit-details-marker { display: none; }
.hub-faq summary:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: -2px;
}

/* Chevron indicator */
.hub-faq summary::after {
  content: '';
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--text-tertiary);
  border-bottom: 2px solid var(--text-tertiary);
  transform: rotate(45deg);
  transition: transform var(--t-fast) var(--ease-out);
  flex-shrink: 0;
  margin-left: var(--space-md);
}
.hub-faq details[open] summary::after {
  transform: rotate(-135deg);
}
@media (prefers-reduced-motion: reduce) {
  .hub-faq summary::after { transition: none; }
}

.faq-answer {
  padding: 0 0 var(--space-md);
  color: var(--text-secondary);
  line-height: var(--leading-normal);
  font-size: var(--type-body);
}

/* Seasonal Narrative */
.hub-seasonal-narrative { margin: var(--space-xl) 0; }
.hub-seasonal-narrative:empty { display: none; }

/* Hub "See all" overflow link */
.hub-see-all-wrapper {
  text-align: center;
  margin: var(--space-lg) 0;
}
.hub-see-all {
  display: inline-block;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent-primary);
  text-decoration: none;
  border: 1px solid var(--accent-primary);
  border-radius: var(--radius-sm);
  transition: background var(--t-fast), color var(--t-fast);
}
.hub-see-all:hover {
  background: var(--accent-primary);
  color: var(--text-on-bright);
}

/* Overflow page back navigation */
.overflow-back {
  margin: var(--space-md) 0;
}
.overflow-back a {
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
}
.overflow-back a:hover { text-decoration: underline; }
