/* =============================================================
   AgendaTulum — selva profunda · mar Caribe · piedra maya
   1. Tokens
   ============================================================= */
:root {
  color-scheme: dark;    /* controles nativos (calendario, scroll) en oscuro */
  --bg:       #0B1310;   /* verde-negro selva, nunca #000 */
  --bg-2:     #0F1A15;
  --bg-3:     #16241D;   /* tarjetas */
  --bg-4:     #1D2F26;
  --cream:    #EFEDE2;   /* texto, nunca blanco puro */
  --cream-2:  #CBCBBB;
  --mute:     #8CA093;
  --turq:     #3FD8C2;   /* mar Caribe */
  --turq-deep: #1FA38F;
  --terra:    #D97A4E;   /* terracota maya */
  --stone:    #D8C39A;   /* piedra caliza */
  --line:     rgba(239, 237, 226, 0.13);
  --shadow:   0 18px 50px rgba(0, 0, 0, 0.45);

  --font-display: "Syne", sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);

  --radius: 14px;
  --nav-h: 64px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--cream);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
body.nav-locked { overflow: hidden; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
p { text-wrap: pretty; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  text-wrap: balance;
  line-height: 1.05;
  letter-spacing: -0.01em;
}
::selection { background: var(--turq); color: var(--bg); }
:focus-visible { outline: 2px solid var(--turq); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: 0.6rem 1rem; background: var(--turq); color: var(--bg);
  z-index: 9999; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

.mono { font-family: var(--font-mono); }
.container { width: min(1200px, 100% - var(--gutter) * 2); margin-inline: auto; }

/* Defensa: elementos con reveal + data-split nunca invisibles */
.reveal[data-split] { opacity: 1; transform: none; }

@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) {
  animation-duration: 0.45s;
  animation-timing-function: var(--ease-out);
}

/* =============================================================
   3. Greca maya (divisor cultural, sutil)
   ============================================================= */
.greca {
  height: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='12' viewBox='0 0 48 12'%3E%3Cpath d='M0 12V8h4V4h4V0h4v4H8v4H4v4zM24 12V8h4V4h4V0h4v4h-4v4h-4v4zM16 0h4v4h-4zM40 0h4v4h-4z' fill='%23D8C39A' fill-opacity='0.28'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  margin: 0 auto;
  width: min(1200px, 100% - var(--gutter) * 2);
}

/* =============================================================
   4. Nav
   ============================================================= */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 700;
  height: var(--nav-h);
  display: flex; align-items: center;
  transition: background 0.35s var(--ease-soft), border-color 0.35s;
  border-bottom: 1px solid transparent;
}
.nav.is-solid {
  background: rgba(11, 19, 16, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.nav-inner {
  width: min(1200px, 100% - var(--gutter) * 2);
  margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand {
  font-family: var(--font-display); font-weight: 800; font-size: 1.15rem;
  letter-spacing: 0.02em; display: flex; align-items: center; gap: 0.5rem;
}
.brand-sun {
  width: 20px; height: 20px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--stone), var(--terra));
  box-shadow: 0 0 14px rgba(217, 122, 78, 0.55);
}
.nav-links { display: none; align-items: center; gap: 1.6rem; font-size: 0.92rem; font-weight: 500; }
.nav-links a { position: relative; padding: 0.3rem 0; color: var(--cream-2); transition: color 0.25s; }
.nav-links a:hover, .nav-links a.is-current { color: var(--cream); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: var(--turq); transition: width 0.3s var(--ease-out);
}
.nav-links a:hover::after, .nav-links a.is-current::after { width: 100%; }
.nav-cta {
  display: none;
  padding: 0.5rem 1rem; border-radius: 999px;
  background: var(--turq); color: var(--bg); font-weight: 600; font-size: 0.88rem;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s;
}
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(63, 216, 194, 0.35); }

.lang-switch { display: flex; gap: 0.15rem; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; }
.lang-switch button { padding: 0.35rem 0.45rem; color: var(--mute); border-radius: 6px; transition: color 0.25s; }
.lang-switch button.is-active { color: var(--turq); }
.lang-switch button:hover { color: var(--cream); }

.nav-toggle { display: grid; place-items: center; width: 42px; height: 42px; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--cream); position: relative; transition: background 0.2s; }
.nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: var(--cream);
  transition: transform 0.3s var(--ease-out);
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

.nav-mobile {
  position: fixed; inset: 0; z-index: 600;
  background: var(--bg-2);
  display: grid; place-content: center; gap: 1.4rem; text-align: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s var(--ease-soft);
}
.nav-mobile.is-open { opacity: 1; pointer-events: auto; }
.nav-mobile a { font-family: var(--font-display); font-weight: 700; font-size: 1.9rem; }
.nav-mobile a:hover { color: var(--turq); }

/* =============================================================
   5. Hero (home)
   ============================================================= */
.hero {
  position: relative; min-height: 92svh;
  display: flex; align-items: flex-end;
  padding: calc(var(--nav-h) + 3rem) 0 3.5rem;
}
.hero-bg { position: absolute; inset: 0; overflow: hidden; }
.hero-bg img { width: 100%; height: 112%; object-fit: cover; filter: saturate(1.08) contrast(1.02); }
.hero-tint {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(11, 19, 16, 0.55) 0%, rgba(11, 19, 16, 0.25) 40%, rgba(11, 19, 16, 0.92) 100%),
    radial-gradient(90% 60% at 15% 100%, rgba(11, 19, 16, 0.75), transparent 70%);
}
.hero-glow {
  position: absolute; inset: auto -10% -35% -10%; height: 70%;
  background: radial-gradient(50% 45% at 50% 100%, rgba(63, 216, 194, 0.16), transparent 75%);
  filter: blur(60px); pointer-events: none;
}
.hero-content { position: relative; z-index: 2; }
.hero .kicker {
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--turq); margin-bottom: 1.1rem;
}
.hero h1 {
  font-size: clamp(2.5rem, 8.5vw, 5.6rem);
  font-weight: 800; max-width: 16ch;
}
.hero h1 em { font-style: normal; color: var(--turq); }
.hero-sub { margin-top: 1.2rem; max-width: 52ch; color: var(--cream-2); font-size: 1.02rem; }
.hero-actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.8rem; }

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.5rem; border-radius: 999px;
  font-weight: 600; font-size: 0.95rem;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s, background 0.25s, color 0.25s;
}
.btn-primary { background: var(--turq); color: var(--bg); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(63, 216, 194, 0.35); }
.btn-ghost { border: 1.5px solid var(--line); color: var(--cream); }
.btn-ghost:hover { border-color: var(--turq); color: var(--turq); transform: translateY(-2px); }
.btn-terra { background: var(--terra); color: var(--bg); }
.btn-terra:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(217, 122, 78, 0.4); }

/* =============================================================
   6. Secciones / cabeceras
   ============================================================= */
.section { padding: clamp(3.2rem, 8vw, 5.5rem) 0; }
.section-head { margin-bottom: 2rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.6rem 1.4rem; justify-content: space-between; }
.section-head h2 { font-size: clamp(1.7rem, 4.5vw, 2.6rem); }
.section-head p { color: var(--mute); font-size: 0.95rem; }
.section-head .link-more { font-family: var(--font-mono); font-size: 0.8rem; color: var(--turq); letter-spacing: 0.06em; }
.section-head .link-more:hover { text-decoration: underline; }

.page-header { padding: calc(var(--nav-h) + 2.5rem) 0 1.6rem; }
.page-header h1 { font-size: clamp(2rem, 6vw, 3.4rem); }
.page-header p { color: var(--mute); margin-top: 0.6rem; max-width: 58ch; }

/* Banner de temporada */
.season {
  margin-top: 1.2rem;
  padding: 0.7rem 1rem; border-radius: 10px;
  font-size: 0.85rem; line-height: 1.45;
  border: 1px solid var(--line);
  color: var(--cream-2);
  background: linear-gradient(90deg, rgba(63, 216, 194, 0.07), transparent 65%);
}
.season.is-alta { background: linear-gradient(90deg, rgba(217, 122, 78, 0.1), transparent 65%); }

/* =============================================================
   7. Barra de filtros (eventos)
   ============================================================= */
.filterbar {
  position: sticky; top: var(--nav-h); z-index: 500;
  background: rgba(11, 19, 16, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-block: 1px solid var(--line);
  padding: 0.7rem 0;
}
.filterbar-inner { display: grid; gap: 0.65rem; }
.quick-dates { display: flex; gap: 0.4rem; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.quick-dates::-webkit-scrollbar { display: none; }
.qd {
  flex: 0 0 auto;
  padding: 0.45rem 0.95rem; border-radius: 999px;
  font-size: 0.85rem; font-weight: 600; white-space: nowrap;
  border: 1.5px solid var(--line); color: var(--cream-2);
  transition: all 0.22s var(--ease-out);
}
.qd:hover { border-color: var(--turq); color: var(--turq); }
.qd.is-active { background: var(--turq); border-color: var(--turq); color: var(--bg); }
.qd-heart.is-active { background: var(--terra); border-color: var(--terra); }

/* Periodo concreto (calendario desde/hasta) */
.date-range {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.15rem 0.6rem 0.15rem 0.8rem;
  border: 1.5px solid var(--line); border-radius: 999px;
  transition: border-color 0.22s;
}
.date-range.is-active { border-color: var(--stone); }
.dr-label { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); }
.date-range.is-active .dr-label { color: var(--stone); }
.date-range input[type="date"] {
  background: transparent; border: 0; color: var(--cream);
  font-family: var(--font-body); font-size: 0.82rem;
  padding: 0.32rem 0.1rem; width: 8.6em; cursor: pointer;
}
.date-range input[type="date"]:focus { outline: none; color: var(--turq); }
.date-range input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: 0.65; }
.date-range input[type="date"]::-webkit-calendar-picker-indicator:hover { opacity: 1; }

.filter-selects { display: flex; gap: 0.45rem; overflow-x: auto; scrollbar-width: none; }
.filter-selects::-webkit-scrollbar { display: none; }
.filter-selects select {
  flex: 0 0 auto;
  appearance: none; -webkit-appearance: none;
  background: var(--bg-3) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238CA093'/%3E%3C/svg%3E") no-repeat right 0.8rem center;
  border: 1px solid var(--line); border-radius: 999px;
  color: var(--cream); font-family: var(--font-body); font-size: 0.83rem;
  padding: 0.45rem 2rem 0.45rem 0.9rem;
  max-width: 210px; text-overflow: ellipsis;
  cursor: pointer; transition: border-color 0.2s;
}
.filter-selects select:hover, .filter-selects select:focus { border-color: var(--turq); }

.filter-meta { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip {
  padding: 0.3rem 0.7rem; border-radius: 999px; font-size: 0.78rem;
  background: var(--bg-4); color: var(--cream-2);
  border: 1px solid var(--line);
  transition: all 0.2s;
}
.chip:hover { border-color: var(--terra); color: var(--terra); }
.chip-clear { background: transparent; color: var(--mute); }

.result-bar { display: flex; align-items: center; gap: 0.9rem; }
.result-count { font-family: var(--font-mono); font-size: 0.78rem; color: var(--mute); letter-spacing: 0.05em; }
.view-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.view-toggle button {
  padding: 0.35rem 0.85rem; font-size: 0.78rem; font-weight: 600; color: var(--mute);
  transition: all 0.2s;
}
.view-toggle button.is-active { background: var(--bg-4); color: var(--turq); }

/* =============================================================
   8. Tarjetas de evento
   ============================================================= */
.grid-cards {
  display: grid; gap: 1.1rem;
  grid-template-columns: 1fr;
  padding: 1.6rem 0 3rem;
}
.card {
  display: flex; flex-direction: column;
  background: var(--bg-3); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s, border-color 0.35s;
}
.card:hover {
  transform: translateY(-5px);
  border-color: rgba(63, 216, 194, 0.4);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(63, 216, 194, 0.12), 0 8px 40px rgba(63, 216, 194, 0.08);
}
.card-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease-out), filter 0.6s; }
.card:hover .card-media img { transform: scale(1.07); filter: saturate(1.15) brightness(1.05); }
.card-cat {
  position: absolute; left: 0.7rem; bottom: 0.7rem;
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.28rem 0.7rem; border-radius: 999px;
  font-size: 0.74rem; font-weight: 600;
  background: rgba(11, 19, 16, 0.82); color: var(--cream);
  border-left: 3px solid var(--cat, var(--turq));
  backdrop-filter: blur(6px);
}
.card-featured {
  position: absolute; right: 0.7rem; top: 0.7rem;
  padding: 0.24rem 0.65rem; border-radius: 999px;
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase;
  background: var(--stone); color: var(--bg);
}
.card-body { padding: 1rem 1.1rem 0.4rem; flex: 1; }
.card-date { font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--turq); }
.card-date.is-today { color: var(--terra); font-weight: 600; }
.card-title { font-size: 1.18rem; margin-top: 0.4rem; }
.card-title a:hover { color: var(--turq); }
.card-venue { margin-top: 0.35rem; font-size: 0.85rem; color: var(--mute); }
.card-meta { margin-top: 0.7rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag {
  padding: 0.2rem 0.6rem; border-radius: 6px;
  font-size: 0.72rem; font-weight: 500;
  background: var(--bg-4); color: var(--cream-2);
}
.tag-price { color: var(--stone); font-family: var(--font-mono); }
.tag-rec { color: var(--turq); }
.card-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.8rem 1.1rem 1rem;
}
.btn-card {
  padding: 0.5rem 1.05rem; border-radius: 999px;
  font-size: 0.84rem; font-weight: 600;
  border: 1.5px solid var(--line); color: var(--cream);
  transition: all 0.25s var(--ease-out);
}
.card:hover .btn-card, .btn-card:hover { background: var(--turq); border-color: var(--turq); color: var(--bg); }
.heart { color: var(--mute); padding: 0.4rem; border-radius: 50%; transition: color 0.25s, transform 0.25s var(--ease-out); }
.heart:hover { color: var(--terra); transform: scale(1.15); }
.heart.is-saved { color: var(--terra); }
.heart.is-saved svg path { fill: currentColor; }

.card-big .card-media { aspect-ratio: 16 / 9; }
.card-big .card-title { font-size: 1.45rem; }

.empty { padding: 3rem 0; color: var(--mute); text-align: center; grid-column: 1 / -1; }

/* =============================================================
   9. Agenda (vista cronológica)
   ============================================================= */
.agenda { padding: 1.4rem 0 3rem; display: grid; gap: 1.8rem; }
.agenda-day { border-top: 1px solid var(--line); padding-top: 0.9rem; }
.agenda-date {
  font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--stone); font-weight: 500; margin-bottom: 0.7rem;
}
.agenda-date.is-today { color: var(--terra); }
.agenda-row {
  display: grid; grid-template-columns: 3.4rem 10px 1fr auto;
  align-items: center; gap: 0.7rem;
  padding: 0.65rem 0.6rem; border-radius: 10px;
  transition: background 0.2s;
}
.agenda-row:hover { background: var(--bg-3); }
.agenda-time { font-size: 0.78rem; color: var(--mute); }
.agenda-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--cat, var(--turq)); box-shadow: 0 0 8px var(--cat, var(--turq)); }
.agenda-main strong { display: block; font-weight: 600; font-size: 0.98rem; line-height: 1.3; }
.agenda-sub { font-size: 0.78rem; color: var(--mute); }
.agenda-price { font-size: 0.78rem; color: var(--stone); }

/* =============================================================
   10. Home: categorías, venues, CTA
   ============================================================= */
.grid-cats { display: grid; gap: 0.8rem; grid-template-columns: repeat(2, 1fr); }
.cat-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: 0 14px 36px rgba(0,0,0,.5); }
.cat-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(0.9) brightness(0.55); transition: filter 0.4s, transform 0.6s var(--ease-out); }
.cat-card:hover img { filter: saturate(1.1) brightness(0.7); transform: scale(1.06); }
.cat-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(11,19,16,.88));
}
.cat-name {
  position: absolute; left: 0.9rem; bottom: 0.8rem; z-index: 2;
  font-family: var(--font-display); font-weight: 700; font-size: 1.02rem;
  display: flex; align-items: center; gap: 0.45rem;
  padding-left: 0.6rem; border-left: 3px solid var(--cat, var(--turq));
}
.cat-n {
  position: absolute; right: 0.8rem; top: 0.7rem; z-index: 2;
  font-size: 0.72rem; padding: 0.2rem 0.55rem; border-radius: 999px;
  background: rgba(11,19,16,.75); color: var(--cat, var(--turq));
  border: 1px solid var(--line);
}

.strip { display: grid; grid-auto-flow: column; grid-auto-columns: 78%; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 0.8rem; }
.strip > * { scroll-snap-align: start; }
.strip::-webkit-scrollbar { height: 6px; }
.strip::-webkit-scrollbar-thumb { background: var(--bg-4); border-radius: 3px; }

.grid-venues { display: grid; gap: 0.9rem; grid-template-columns: repeat(2, 1fr); }
.venue-card {
  position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  transition: transform 0.3s var(--ease-out);
}
.venue-card:hover { transform: translateY(-4px); }
.venue-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(0.6); transition: transform 0.6s var(--ease-out), filter 0.4s; }
.venue-card:hover img { transform: scale(1.06); filter: brightness(0.72); }
.venue-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(11,19,16,.9)); }
.venue-name { position: absolute; left: 0.9rem; bottom: 1.8rem; z-index: 2; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.venue-zone { position: absolute; left: 0.9rem; bottom: 0.6rem; z-index: 2; font-size: 0.68rem; color: var(--turq); letter-spacing: 0.08em; }

.cta-organiza {
  border: 1px solid var(--line); border-radius: calc(var(--radius) + 6px);
  padding: clamp(1.8rem, 5vw, 3.2rem);
  background:
    radial-gradient(70% 120% at 90% 0%, rgba(217, 122, 78, 0.14), transparent 60%),
    radial-gradient(60% 120% at 0% 100%, rgba(63, 216, 194, 0.1), transparent 60%),
    var(--bg-2);
  display: grid; gap: 1rem; justify-items: start;
}
.cta-organiza h2 { font-size: clamp(1.5rem, 4vw, 2.2rem); }
.cta-organiza p { color: var(--cream-2); max-width: 46ch; }

/* =============================================================
   11. Mapa
   ============================================================= */
.map-wrap { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
#map { height: min(68vh, 620px); background: var(--bg-2); z-index: 1; }
.leaflet-tile-pane { filter: brightness(0.62) saturate(0.55) contrast(1.06) hue-rotate(-8deg); }
.leaflet-container { font-family: var(--font-body); }
.leaflet-popup-content-wrapper { background: var(--bg-3); color: var(--cream); border-radius: 10px; border: 1px solid var(--line); }
.leaflet-popup-tip { background: var(--bg-3); }
.leaflet-popup-content a { color: var(--turq); font-weight: 600; }
.pin { background: none; border: none; }
.pin-dot {
  display: block; width: 12px; height: 12px; border-radius: 50%;
  background: var(--turq); box-shadow: 0 0 0 4px rgba(63, 216, 194, 0.25), 0 0 14px var(--turq);
}
.pin-label {
  position: absolute; left: 16px; top: -4px; white-space: nowrap;
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.04em;
  color: var(--cream); text-shadow: 0 1px 4px rgba(0,0,0,.9), 0 0 10px rgba(0,0,0,.8);
}
.map-zones { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 1rem; }

/* =============================================================
   12. Fichas (evento / venue)
   ============================================================= */
.detail-hero { position: relative; height: min(52vh, 480px); overflow: hidden; }
.detail-hero img { width: 100%; height: 100%; object-fit: cover; }
.detail-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,19,16,.6) 0%, rgba(11,19,16,.15) 45%, var(--bg) 100%);
}
.detail-head { position: relative; margin-top: -5rem; z-index: 2; }
.detail-head .card-cat { position: static; margin-bottom: 0.9rem; }
.detail-head h1 { font-size: clamp(1.9rem, 6vw, 3.2rem); max-width: 22ch; }
.detail-sub { margin-top: 0.6rem; color: var(--mute); }
.detail-grid { display: grid; gap: 2.2rem; padding: 2.2rem 0 3.5rem; }
.detail-desc { font-size: 1.05rem; color: var(--cream-2); max-width: 62ch; }
.detail-aside { display: grid; gap: 1.4rem; align-content: start; }
.info-block {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.2rem 1.3rem; background: var(--bg-2);
  display: grid; gap: 0.55rem;
}
.info-block h2 { font-size: 0.78rem; font-family: var(--font-mono); font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--stone); }
.info-block ul { display: grid; gap: 0.4rem; font-size: 0.9rem; }
.info-block li.is-today { color: var(--terra); }
.info-row { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.9rem; border-bottom: 1px dashed var(--line); padding-bottom: 0.45rem; }
.info-row:last-child { border-bottom: 0; padding-bottom: 0; }
.info-row .k { color: var(--mute); }
.detail-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.4rem; }
.btn-save { border: 1.5px solid var(--line); border-radius: 999px; padding: 0.85rem 1.4rem; display: inline-flex; gap: 0.5rem; align-items: center; font-weight: 600; font-size: 0.95rem; transition: all .25s var(--ease-out); }
.btn-save:hover, .btn-save.is-saved { border-color: var(--terra); color: var(--terra); }
.btn-save.is-saved svg path { fill: currentColor; }

/* =============================================================
   13. Formulario publica
   ============================================================= */
.pub-form { display: grid; gap: 1rem; max-width: 640px; padding-bottom: 1rem; }
.field { display: grid; gap: 0.35rem; }
.field label { font-size: 0.82rem; font-weight: 600; color: var(--cream-2); }
.field input, .field select, .field textarea {
  background: var(--bg-3); border: 1px solid var(--line); border-radius: 10px;
  color: var(--cream); font-family: var(--font-body); font-size: 0.95rem;
  padding: 0.75rem 0.95rem; width: 100%;
  transition: border-color 0.2s;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--turq); outline: none; }
.field-row { display: grid; gap: 1rem; }
.pub-nota { font-size: 0.82rem; color: var(--mute); max-width: 60ch; }
.pub-nota a { color: var(--turq); }

/* =============================================================
   14. Footer
   ============================================================= */
.footer { border-top: 1px solid var(--line); padding: 2.6rem 0 2rem; margin-top: 2rem; }
.footer-inner { display: grid; gap: 1.6rem; }
.footer .brand { font-size: 1rem; }
.footer-tag { color: var(--mute); font-size: 0.88rem; max-width: 44ch; margin-top: 0.5rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.2rem; font-size: 0.86rem; color: var(--cream-2); }
.footer-links a:hover { color: var(--turq); }
.footer-fine { font-family: var(--font-mono); font-size: 0.68rem; color: var(--mute); letter-spacing: 0.04em; }
.footer-fine a { text-decoration: underline; }

/* =============================================================
   15. Efectos
   ============================================================= */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease-soft), transform 0.7s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }
html:not(.is-ready) .reveal { opacity: 1; transform: none; }

/* =============================================================
   16. Responsive (mobile-first)
   ============================================================= */
@media (min-width: 540px) {
  .grid-cards { grid-template-columns: repeat(2, 1fr); }
  .strip { grid-auto-columns: 46%; }
  .field-row { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 720px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
  .nav-toggle { display: none; }
  .grid-cats { grid-template-columns: repeat(4, 1fr); }
  .grid-venues { grid-template-columns: repeat(3, 1fr); }
  .filterbar-inner { grid-template-columns: auto 1fr; align-items: center; }
  .filter-meta { grid-column: 1 / -1; }
  .detail-grid { grid-template-columns: 1.5fr 1fr; }
  .agenda-row { grid-template-columns: 4.2rem 10px 1fr auto; }
  .footer-inner { grid-template-columns: 1fr auto; align-items: start; }
}
@media (min-width: 960px) {
  .grid-cards { grid-template-columns: repeat(3, 1fr); }
  .strip { grid-auto-columns: 31%; }
  .grid-venues { grid-template-columns: repeat(6, 1fr); }
  .grid-destacados { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
}
@media (min-width: 1280px) {
  .grid-cards { grid-template-columns: repeat(4, 1fr); }
}

/* =============================================================
   17. Reduced motion (solo lo intrusivo)
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-bg img { transform: none !important; }
  /* Tilts, hovers, fades y transiciones se mantienen: son micro-interacciones */
}
