/* ─── Alpine x-cloak — hide until Alpine initialises ────────── */
[x-cloak] { display: none !important; }

/* ─── Google Fonts are loaded in base.html ─────────────────── */

/* ─── SVG icon safety — prevent unsized SVGs blowing up ─────── */
svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
/* Tailwind w-*/h-* classes set width/height via CSS — this caps
   any SVG that slips through without an explicit size class */
svg:not([width]):not([height]):not([class*="w-"]) {
  width:  20px;
  height: 20px;
}

/* ─── Design tokens ─────────────────────────────────────────── */
:root {
  /* Light mode (default) */
  --color-bg:       #F7F7F7;
  --color-surface:  #FFFFFF;
  --color-nav:      #FFFFFF;
  --color-primary:  #000000;
  --color-secondary:#555555;
  --color-border:   rgba(0, 0, 0, 0.08);
  --color-brand:    #F5E20B;

  /* Status */
  --color-success:  #2d7a22;
  --color-pending:  #8a6200;
  --color-error:    #a32d2d;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
}

.dark {
  --color-bg:       #0D0D0D;
  --color-surface:  #1A1A1A;
  --color-nav:      #0D0D0D;
  --color-primary:  #FFFFFF;
  --color-secondary:#AAAAAA;
  --color-border:   rgba(255, 255, 255, 0.08);
  --color-brand:    #F5E20B;
}

/* ─── Base reset ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  background-color: var(--color-bg);
  color: var(--color-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Semantic colour utilities ──────────────────────────────── */
.bg-page     { background-color: var(--color-bg); }
.bg-surface  { background-color: var(--color-surface); }
.bg-nav      { background-color: var(--color-nav); }
.bg-brand    { background-color: var(--color-brand); }
.text-primary   { color: var(--color-primary); }
.text-secondary { color: var(--color-secondary); }
.border-border  { border-color: var(--color-border); }
.font-sans       { font-family: 'Open Sans', sans-serif; }
.font-display    { font-family: 'Mona Sans', 'Open Sans', sans-serif; }
.font-cormorant  { font-family: 'Cormorant Garamond', Georgia, serif; }

/* ─── Typography ─────────────────────────────────────────────── */
/* Headlines use Mona Sans (bold display sans). Body stays Open Sans. */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Mona Sans', 'Open Sans', sans-serif;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--color-primary);
}

/* hero-headline: heaviest Mona Sans weight for max impact.
   Use .accent-word on a single inline <em>/<span> for the Cormorant italic accent. */
.hero-headline {
  font-family: 'Mona Sans', 'Open Sans', sans-serif;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.accent-word {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ─── Cards (generic — used for article cards etc.) ───────────── */
.card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
}

.card-scroll-item > .card {
  height: 100%;
}

.card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.dark .card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* ─── Listing card — full-bleed overlay (events & experiences) ── */
/*
  Entire card IS the image. Text overlaid via gradient.
  Structure:
    <article.listing-card>
      <img.listing-card-img>
      <div.listing-card-gradient>
      <a.listing-card-link>          ← invisible full-card link
      <div.listing-card-top>         ← date + category badges
      <div.listing-card-body>
        <a.listing-card-title-link>
          <h3.listing-card-title>
        <p.listing-card-loc>
        <div.listing-card-actions>
          <span.listing-card-price>  ← ghost pill (price or Free)
          <a.listing-card-cta>       ← yellow pill CTA
*/

.listing-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: #141414;
  /* Subtle resting shadow */
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
  transition:
    transform 0.38s cubic-bezier(0.34, 1.2, 0.64, 1),
    box-shadow 0.35s ease;
  cursor: pointer;
  display: block;
}

.listing-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.12);
}

.dark .listing-card {
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

.dark .listing-card:hover {
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.50);
}

/* Full-bleed image */
.listing-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.listing-card:hover .listing-card-img {
  transform: scale(1.05);
}

/* No-image fallback div (same class, different element) */
div.listing-card-img {
  background: linear-gradient(160deg, #1c1c1c 0%, #2a2a2a 100%);
}

/* Gradient overlay — heavier at bottom for legibility */
.listing-card-gradient {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.92) 0%,
    rgba(0, 0, 0, 0.52) 40%,
    rgba(0, 0, 0, 0.04) 65%,
    transparent 80%
  );
}

/* Invisible full-card link for mouse clicks — skipped by keyboard */
.listing-card-link {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
}

/* Top badge row */
.listing-card-top {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  z-index: 4;
  pointer-events: none; /* decorative — clicks fall through to card link */
}

/* Date pill (events) */
.listing-card-date {
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 100px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  line-height: 1;
}

/* Category pill */
.listing-card-cat {
  background: #F5E20B;
  color: #000;
  font-size: 10px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 100px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1;
}

/* Bottom content body */
.listing-card-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  z-index: 3;
}

/* Title — wrapped in <a> for keyboard nav */
.listing-card-title-link {
  display: block;
  text-decoration: none;
  color: inherit;
  position: relative;
  z-index: 4;
}

.listing-card-title {
  font-family: 'Mona Sans', 'Open Sans', sans-serif;
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 7px;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Location row */
.listing-card-loc {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.70);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 14px;
  line-height: 1.4;
}

/* Excerpt — used by article cards in place of location + actions */
.listing-card-excerpt {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.listing-card-loc svg {
  flex-shrink: 0;
  opacity: 0.75;
}

.listing-card-loc span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Action row: price pill + CTA pill */
.listing-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 12px;
}

/* Price — ghost pill */
.listing-card-price {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-family: 'Mona Sans', 'Open Sans', sans-serif;
  font-size: 15px;
  font-weight: 800;
  padding: 10px 16px;
  border-radius: 100px;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

/* Free events — slightly smaller, uppercase */
.listing-card-price.is-free {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.80);
}

.listing-card-price.is-external {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding-left: 12px;
  padding-right: 12px;
  color: rgba(255, 255, 255, 0.82);
}

/* CTA — yellow pill */
.listing-card-cta {
  flex: 1;
  background: #F5E20B;
  color: #000000;
  font-family: 'Mona Sans', 'Open Sans', sans-serif;
  font-size: 13px;
  font-weight: 800;
  padding: 10px 14px;
  border-radius: 100px;
  text-align: center;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  position: relative;
  z-index: 4; /* above the invisible card link */
  transition: background 0.15s ease, transform 0.12s ease;
}

.listing-card-cta:hover {
  background: #e8d200;
  transform: scale(1.03);
}

.listing-card-cta:active {
  transform: scale(0.98);
}

/* Ensure listing-card works in scroll strips (width set by .card-scroll-item) */
.card-scroll-item > .listing-card {
  width: 100%;
}

/* ─── Buttons ────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background-color: var(--color-brand);
  color: #000000;
  font-family: 'Open Sans', sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s ease, transform 0.1s ease;
  white-space: nowrap;
}

.btn-primary:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background-color: transparent;
  color: var(--color-primary);
  font-family: 'Open Sans', sans-serif;
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-secondary:hover {
  background-color: var(--color-surface);
  border-color: var(--color-secondary);
}

/* ─── Forms ──────────────────────────────────────────────────── */
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-primary);
  font-family: 'Open Sans', sans-serif;
  font-size: 0.9rem;
  padding: 0.65rem 0.9rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(245, 226, 11, 0.15);
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-primary);
  margin-bottom: 0.35rem;
}

.form-error {
  font-size: 0.8rem;
  color: var(--color-error);
  margin-top: 0.3rem;
}

/* ─── Status badges ──────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.badge-live     { background: rgba(45,122,34,0.12); color: var(--color-success); }
.badge-pending  { background: rgba(138,98,0,0.12);  color: var(--color-pending); }
.badge-draft    { background: rgba(0,0,0,0.06);     color: var(--color-secondary); }
.badge-past     { background: rgba(0,0,0,0.06);     color: var(--color-secondary); }
.badge-paid     { background: rgba(45,122,34,0.12); color: var(--color-success); }
.badge-failed   { background: rgba(163,45,45,0.12); color: var(--color-error); }
.badge-free     { background: rgba(245,226,11,0.2); color: #6b5800; }

.dark .badge-draft,
.dark .badge-past  { background: rgba(255,255,255,0.08); }
.dark .badge-free  { color: #a08000; }

/* ─── Layout utilities ───────────────────────────────────────── */
.container-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px)  { .container-page { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .container-page { padding: 0 2rem; } }

/* ─── Section headings ───────────────────────────────────────── */
.section-heading {
  font-family: 'Mona Sans', 'Open Sans', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--color-primary);
  margin-bottom: 1.25rem;
}

/* ─── Image aspect ratios ────────────────────────────────────── */
.aspect-event    { aspect-ratio: 16 / 9; }
.aspect-square   { aspect-ratio: 1 / 1; }
.aspect-portrait { aspect-ratio: 3 / 4; }

.img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ─── Divider ────────────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2rem 0;
}

/* ─── Responsive grid helpers ────────────────────────────────── */
.grid-cards {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

@media (max-width: 640px) {
  .grid-cards { grid-template-columns: 1fr; }
}

/* ─── Horizontal-peek card strip — all screen sizes ─────────── */
/*
  Single row, scrolls left → right with scroll-snap.
  Uses vw-based width so % ambiguity in nested flex never bites.
  Mobile: card = 78vw so next card peeks ~22vw from the right.
  Tablet+: fixed 300–320 px cards, 2–3 visible at once.
  overflow-x: scroll (not auto) forces scroll on iOS Safari.
  No mask-image — breaks WebKit compositing.
*/
.card-scroll-strip {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  overflow-x: scroll;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-right: 1rem;         /* trailing space shows sliver of last card */
}
.card-scroll-strip::-webkit-scrollbar { display: none; }

/* vw-based so it always works regardless of flex container ancestry */
.card-scroll-item {
  flex: 0 0 auto;
  width: calc(78vw);
  scroll-snap-align: start;
}

@media (min-width: 480px)  { .card-scroll-item { width: 300px; } .listing-card { aspect-ratio: 4 / 5; } }
@media (min-width: 768px)  { .card-scroll-item { width: 320px; } }

/* Event detail hero: square on mobile, ultrawide banner on md+ */
.event-detail-hero {
  aspect-ratio: 1 / 1;
  max-height: none;
}
@media (min-width: 768px) {
  .event-detail-hero {
    aspect-ratio: 21 / 9;
    max-height: 340px;
  }
}

/* YouTube facade play button */
.yt-play-btn {
  width: 64px;
  height: 44px;
  background: #ff0000;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, background 0.15s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.yt-play-btn:hover { background: #cc0000; transform: scale(1.08); }

/* Mobile cover image — almost-invisible shadow, light mode only */
.mobile-hero-shadow {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.09);
}
.dark .mobile-hero-shadow {
  box-shadow: none;
}

/* Experience gallery carousel */
.exp-carousel-track {
  display: flex;
  overflow-x: scroll;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-behavior: smooth;
  height: 100%;
}
.exp-carousel-track::-webkit-scrollbar { display: none; }
.exp-carousel-slide {
  flex: 0 0 100%;
  height: 100%;
  scroll-snap-align: start;
}

/* ─── Price display ──────────────────────────────────────────── */
.price-tag {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-primary);
}

.price-free {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-success);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ─── Loading / skeleton ─────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--color-border) 25%, var(--color-surface) 50%, var(--color-border) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.4s infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── Focus visible ──────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
}

/* ─── Hide scrollbar (used on horizontal pill rows) ─────────── */
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

/* ─── Scrollbar (webkit) ─────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 99px; }

/* ─── Tailwind dark mode bridge ──────────────────────────────── */
/* Tailwind darkMode:'class' adds .dark to <html>. Our design tokens
   already use .dark — this ensures body background/colour follow too */
.dark body {
  background-color: var(--color-bg);
  color: var(--color-primary);
}

/* ─── Line clamp (for card titles) ──────────────────────────── */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ─── Tailwind bg-brand / text-brand aliases ─────────────────── */
.text-brand  { color: #F5E20B; }
.bg-brand    { background-color: #F5E20B; }

/* ─── Transition helpers not in Tailwind config ─────────────── */
.transition-colors { transition-property: color, background-color, border-color; transition-duration: 150ms; }

/* ─── Legal page body typography (prose-legal) ───────────────── */
.prose-legal { font-size: 15px; line-height: 1.8; color: var(--color-secondary); }
.prose-legal h1,.prose-legal h2,.prose-legal h3,.prose-legal h4 { font-family: 'Mona Sans', 'Open Sans', sans-serif; color: var(--color-primary); font-weight: 800; letter-spacing: -0.01em; margin-top: 2rem; margin-bottom: 0.75rem; }
.prose-legal h2 { font-size: 1.25rem; }
.prose-legal h3 { font-size: 1.05rem; }
.prose-legal p { margin-bottom: 1rem; }
.prose-legal ul,.prose-legal ol { margin-left: 1.5rem; margin-bottom: 1rem; }
.prose-legal ul { list-style-type: disc; }
.prose-legal ol { list-style-type: decimal; }
.prose-legal li { margin-bottom: 0.35rem; }
.prose-legal a { color: var(--color-primary); text-decoration: underline; }
.prose-legal a:hover { opacity: 0.75; }
.prose-legal strong { color: var(--color-primary); font-weight: 600; }
.prose-legal hr { border: none; border-top: 1px solid var(--color-border); margin: 2rem 0; }
