/* ============================================================
   feriasanmarcos.mx — SISTEMA DE DISEÑO (mobile first, 390px)
   ============================================================ */
@import url("/assets/css/variables.css?v=2");

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  transition: background-color .2s ease, color .2s ease;
  overflow-x: hidden;
}

h1, h2, h3, .display { font-family: var(--font-display); line-height: 1.08; font-weight: 700; letter-spacing: -0.01em; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

/* Foco visible del color de sección */
:focus-visible { outline: 3px solid var(--sec); outline-offset: 2px; border-radius: 4px; }

/* Contenedores */
.container { width: 100%; max-width: var(--w-grid); margin-inline: auto; padding-inline: var(--s4); }
.read { max-width: var(--w-read); margin-inline: auto; }

/* Skip link */
.skip { position: absolute; left: -9999px; top: 0; background: var(--marca); color: var(--marca-contrast); padding: var(--s2) var(--s4); z-index: 100; border-radius: 0 0 8px 0; }
.skip:focus { left: 0; }

/* ── Grano global ─────────────────────────────────────────── */
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
main, header, footer { position: relative; z-index: 2; }

/* ── Header ───────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--border);
  transition: transform .25s ease;
}
.site-header.is-hidden { transform: translateY(-100%); }
.header-row { display: flex; align-items: center; gap: var(--s3); height: 56px; }
.brand { display: flex; align-items: center; gap: var(--s2); flex: 0 0 auto; }
.brand-logo { height: 28px; width: auto; display: block; filter: brightness(0) invert(1); } /* logo negro → blanco (tema oscuro por defecto) */
[data-theme="light"] .brand-logo { filter: none; } /* negro sobre fondo claro */
@media (max-width: 480px) { .brand-logo { height: 22px; } }
.badge-unofficial {
  font-size: 0.62rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--text-muted); border: 1px solid var(--border); border-radius: var(--r-pill);
  padding: 2px 8px; white-space: nowrap;
}
.header-spacer { flex: 1; }
.icon-btn {
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--border); border-radius: var(--r-pill); color: var(--text);
}
.icon-btn:hover { border-color: var(--sec); color: var(--sec); }
.header-search { display: flex; align-items: center; gap: var(--s2); }
.header-search input {
  width: 0; padding: 0; border: none; opacity: 0; transition: width .2s ease, opacity .2s ease, padding .2s ease;
  background: var(--surface-2); color: var(--text); border-radius: var(--r-pill); height: 44px;
}
.header-search.open input { width: min(52vw, 260px); padding: 0 var(--s4); opacity: 1; border: 1px solid var(--border); }
.nav-links { display: none; gap: var(--s5); font-size: 0.92rem; }
.nav-links a:hover { color: var(--sec); }

/* ── Barra inferior móvil: píldora flotante "liquid glass" ─────── */
.bottombar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 45;
  display: flex; align-items: center; gap: 4px; padding: 6px;
  border-radius: 999px; max-width: calc(100vw - 20px);
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--border);
  box-shadow: 0 18px 42px -14px rgba(0,0,0,0.55),
              inset 0 1px 1px color-mix(in srgb, var(--text) 22%, transparent);
}
.bottombar::before { /* brillo superior tipo cristal mojado */
  content: ""; position: absolute; inset: 1px; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, color-mix(in srgb, var(--text) 16%, transparent), transparent 55%);
}
.bb-items { position: relative; display: flex; align-items: center; gap: 2px; }
.bb-pill { /* píldora que se desliza bajo el ítem activo */
  position: absolute; top: 0; left: 0; width: 0; height: 54px; border-radius: 20px; z-index: 0;
  background: var(--marca);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--marca) 45%, transparent), inset 0 1px 1px rgba(255,255,255,0.5);
  transition: transform .5s cubic-bezier(0.34,1.2,0.64,1), width .5s cubic-bezier(0.34,1.2,0.64,1);
}
.bb-btn { position: relative; z-index: 1; min-width: 60px; height: 54px; display: flex; align-items: center; justify-content: center;
  border-radius: 20px; padding: 0 8px; color: var(--text-muted); text-decoration: none;
  -webkit-tap-highlight-color: transparent; }
.bb-btn__in { display: flex; flex-direction: column; align-items: center; gap: 3px; transition: transform .18s cubic-bezier(0.32,0.72,0,1); }
.bb-btn svg { width: 22px; height: 22px; }
.bb-label { font-size: 0.6rem; font-weight: 700; white-space: nowrap; line-height: 1; }
.bb-btn.is-active { color: var(--marca-contrast); }
.bb-btn:active .bb-btn__in { transform: scale(0.9); }
.bb-divider { width: 1px; height: 24px; background: var(--border); margin: 0 3px; }
.bb-theme { position: relative; width: 44px; height: 44px; border-radius: 50%; border: none;
  background: transparent; color: var(--text-muted); display: grid; place-items: center; -webkit-tap-highlight-color: transparent; }
.bb-theme svg { width: 20px; height: 20px; }
.bb-ico { position: absolute; display: grid; place-items: center; transition: transform .5s cubic-bezier(0.34,1.2,0.64,1), opacity .3s ease; }
.bb-ico--sun { opacity: 1; transform: rotate(0) scale(1); }
.bb-ico--moon { opacity: 0; transform: rotate(-90deg) scale(0); }
[data-theme="dark"] .bb-ico--sun { opacity: 0; transform: rotate(90deg) scale(0); }
[data-theme="dark"] .bb-ico--moon { opacity: 1; transform: rotate(0) scale(1); }
body { padding-bottom: 96px; } /* espacio para la píldora flotante en móvil */
@media (prefers-reduced-motion: reduce) { .bb-pill, .bb-ico, .bb-btn__in { transition: none; } }

/* ── Botones ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: var(--s2);
  border-radius: var(--r-pill); padding: var(--s3) var(--s5); font-weight: 700;
  border: 1.5px solid var(--border); background: transparent; color: var(--text);
  min-height: 44px; transition: transform .12s ease, box-shadow .2s ease, background-color .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--fill { background: var(--marca); color: var(--marca-contrast); border-color: var(--marca); }
.btn--sec { background: var(--sec); color: #0B0B10; border-color: var(--sec); }
.btn--ghost:hover { border-color: var(--sec); color: var(--sec); }
.btn svg { width: 16px; height: 16px; }

/* ── Secciones y encabezados ──────────────────────────────── */
.section { padding-block: var(--s10); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4); margin-bottom: var(--s6); }
.section-head h2 { font-size: clamp(1.4rem, 5vw, 2rem); margin: 0; }
.section-head .more { font-size: 0.88rem; color: var(--sec-text); font-weight: 600; }
.eyebrow { color: var(--sec-text); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 0.72rem; }

/* Texto contorno: relleno del color del FONDO, solo se ve el contorno exterior
   (no las líneas interiores del glifo). Decorativo/refuerzo. */
.outline-text {
  color: var(--bg); -webkit-text-stroke: 1.5px var(--sec); text-stroke: 1.5px var(--sec);
  paint-order: stroke fill;
  font-family: var(--font-display); font-weight: 800;
}
@supports not ((-webkit-text-stroke: 1px) or (text-stroke: 1px)) {
  .outline-text { color: var(--sec); }
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero { padding-top: var(--s8); padding-bottom: var(--s6); }
.hero h1 { font-size: clamp(2rem, 8vw, 3.2rem); max-height: 30vh; margin: var(--s3) 0; }
.hero .lede { color: var(--text-muted); max-width: 40ch; }
.essential {
  display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s5);
  padding: var(--s4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card);
}
.essential .item { display: flex; flex-direction: column; }
.essential .k { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.essential .v { font-family: var(--font-display); font-weight: 600; }

/* ── Stat tiles / countdown ───────────────────────────────── */
.stats { display: flex; gap: var(--s3); flex-wrap: wrap; }
.stat-tile {
  flex: 1 1 72px; min-width: 72px; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-tile); padding: var(--s4); text-align: center;
}
.stat-tile .num { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.6rem, 7vw, 2.4rem); font-variant-numeric: tabular-nums; line-height: 1; }
.stat-tile .lbl { font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; margin-top: 4px; }
.countdown .stat-tile { border-color: color-mix(in srgb, var(--marca) 40%, var(--border)); }
.flip { display: inline-block; transition: transform .3s ease; }

/* ── Bento grid ───────────────────────────────────────────── */
.bento { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s3); }
.bento-item {
  position: relative; border: 1.5px solid var(--sec); border-radius: var(--r-card);
  background: color-mix(in srgb, var(--sec) 10%, var(--surface));
  padding: var(--s5); min-height: 116px; display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden; transition: transform .12s ease, box-shadow .2s ease;
}
.bento-item:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--sec), 0 8px 26px color-mix(in srgb, var(--sec) 25%, transparent); }
.bento-item .title { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.bento-item .sub { font-size: 0.76rem; color: var(--text-muted); }
.bento-item.wide { grid-column: span 2; min-height: 132px; }
.bento-item.tall { grid-row: span 2; }

/* ── Tarjeta evento/artista ───────────────────────────────── */
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1.5px solid var(--sec); border-radius: var(--r-card);
  overflow: hidden; transition: transform .12s ease, box-shadow .2s ease;
}
.card:hover { box-shadow: 0 0 0 1px var(--sec), 0 10px 28px color-mix(in srgb, var(--sec) 25%, transparent); transform: translateY(-2px); }
.card:active { transform: scale(0.98); }

/* Duotono por sección */
.thumb { position: relative; aspect-ratio: 4 / 3; background: var(--sec); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); mix-blend-mode: luminosity; opacity: .92; transition: filter .3s ease, opacity .3s ease, mix-blend-mode .3s ease; }
.card:hover .thumb img { filter: none; mix-blend-mode: normal; opacity: 1; }
.thumb--ph {
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: color-mix(in srgb, var(--sec) 20%, var(--surface));
  color: var(--text); font-family: var(--font-display); font-weight: 700;
  padding: var(--s4); font-size: 0.95rem;
}
.card-body { padding: var(--s4); display: flex; flex-direction: column; gap: var(--s2); min-width: 0; }
.card-body > * { min-width: 0; }
.card-body .name { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; overflow-wrap: anywhere; }
.card-body .meta { color: var(--text-muted); font-size: 0.82rem; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-body .price { font-weight: 700; overflow-wrap: anywhere; flex: 1 1 auto; min-width: 0; }
.card-body .price.free { color: var(--sec-text); }

/* ── Pills / tags ─────────────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem; font-weight: 600;
  border-radius: var(--r-pill); padding: 4px 10px; border: 1px solid var(--sec); color: var(--text);
  background: transparent; white-space: nowrap;
}
.pill--date { background: var(--sec); color: #0B0B10; border-color: var(--sec); }
.pill--active { background: var(--sec); color: #0B0B10; }
.pill--muted { border-color: var(--border); color: var(--text-muted); }

/* Estado de confirmación (icono + texto, no solo color) */
.status { display: inline-flex; align-items: center; gap: 5px; font-size: 0.72rem; font-weight: 700; border-radius: var(--r-pill); padding: 3px 9px; white-space: nowrap; flex: 0 0 auto; }
.status--confirmado { background: color-mix(in srgb, var(--sec-espectaculos) 22%, transparent); color: var(--text); border: 1px solid var(--sec-espectaculos); }
.status--rumor { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }
.status--por_confirmar { background: var(--surface-2); color: var(--text-muted); border: 1px dashed var(--border); }

/* Estado temporal del evento */
.tstate { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.tstate--hoy { color: color-mix(in srgb, var(--sec-toros) 72%, var(--text)); }
.tstate--proximo { color: var(--text-muted); }
.tstate--finalizado { color: var(--text-muted); opacity: .8; }

/* ── Marco ovalado tipo Wrapped ───────────────────────────── */
.oval { width: 96px; height: 120px; border-radius: 50% / 40%; border: 2px solid var(--sec); overflow: hidden; position: relative; background: color-mix(in srgb, var(--sec) 15%, var(--surface)); }
.oval img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); mix-blend-mode: luminosity; }
.oval .badge-num { position: absolute; top: -6px; left: -6px; background: var(--sec); color: #0B0B10; font-family: var(--font-display); font-weight: 800; border-radius: 50%; width: 26px; height: 26px; display: grid; place-items: center; font-size: 0.85rem; }

/* ── Carrusel foco central ────────────────────────────────── */
.carousel { display: flex; gap: var(--s4); overflow-x: auto; scroll-snap-type: x mandatory; padding: var(--s4) 0; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.carousel::-webkit-scrollbar { display: none; }
.carousel > * { scroll-snap-align: center; flex: 0 0 78%; max-width: 300px; transition: transform .3s ease, opacity .3s ease; }
@media (min-width: 720px) { .carousel > * { flex-basis: 300px; } }
.carousel-wrap { position: relative; }
.carousel-arrow { display: none; }

/* ── Marquee de texto contorno ────────────────────────────── */
.marquee { overflow: hidden; white-space: nowrap; border-block: 1px solid var(--border); padding: var(--s3) 0; }
.marquee__track { display: inline-block; will-change: transform; animation: marquee 60s linear infinite; }
.marquee__track span { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.4rem, 6vw, 2.4rem); padding-right: 1ch; color: var(--bg); -webkit-text-stroke: 1.5px var(--sec); paint-order: stroke fill; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }

/* ── Grids de listado ─────────────────────────────────────── */
.grid-cards { display: grid; grid-template-columns: 1fr; gap: var(--s4); }
@media (min-width: 560px) { .grid-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid-cards { grid-template-columns: repeat(3, 1fr); } }

/* ── Día por día (hubs/cartelera) ─────────────────────────── */
.day-block { margin-bottom: var(--s8); }
.day-head { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; padding-bottom: var(--s2); border-bottom: 2px solid var(--sec); margin-bottom: var(--s4); }

/* ── Filtros ──────────────────────────────────────────────── */
.filters { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s5); }
.filters a { text-decoration: none; }

/* ── Artículo / guía ──────────────────────────────────────── */
.article { padding-block: var(--s8); }
.article h1 { font-size: clamp(1.7rem, 6vw, 2.6rem); margin-bottom: var(--s3); }
.article .lead { font-size: 1.1rem; color: var(--text); }
.article .prose { font-size: 1.02rem; }
.article .prose p { margin-block: var(--s4); }
.article .prose h2, .article .prose h3 { margin-top: var(--s8); }
.meta-line { display: flex; flex-wrap: wrap; gap: var(--s3); color: var(--text-muted); font-size: 0.85rem; margin-block: var(--s4); }
.source-note { font-size: 0.85rem; color: var(--text-muted); border-left: 3px solid var(--sec); padding-left: var(--s3); margin-block: var(--s4); }

/* ── FAQ ──────────────────────────────────────────────────── */
.faq { border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; }
.faq details { border-bottom: 1px solid var(--border); }
.faq details:last-child { border-bottom: none; }
.faq summary { padding: var(--s4); font-family: var(--font-display); font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: var(--s3); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--sec); font-weight: 800; }
.faq details[open] summary::after { content: "–"; }
.faq .answer { padding: 0 var(--s4) var(--s4); color: var(--text-muted); }

/* ── Slots de AdSense (cero CLS) ──────────────────────────── */
.ad { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-card); display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 0.7rem; text-transform: uppercase; letter-spacing: .1em; }
.ad--leaderboard { height: 90px; margin-block: var(--s6); }
.ad--rect { height: 250px; }

/* ── Info / avisos ────────────────────────────────────────── */
.notice { background: color-mix(in srgb, var(--sec) 10%, var(--surface)); border: 1px solid var(--sec); border-radius: var(--r-card); padding: var(--s4); }
.notice--warn { --sec: var(--sec-toros); }

/* ── Footer ───────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--border); margin-top: var(--s16); padding-block: var(--s10); color: var(--text-muted); font-size: 0.85rem; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: var(--s6); }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer h4 { font-family: var(--font-display); color: var(--text); font-size: 0.9rem; margin: 0 0 var(--s3); }
.site-footer a:hover { color: var(--sec); --sec: var(--marca); }
.footer-unofficial { margin-top: var(--s6); padding-top: var(--s4); border-top: 1px solid var(--border); }

/* ── Búsqueda ─────────────────────────────────────────────── */
.searchbox { display: flex; gap: var(--s2); margin-block: var(--s5); }
.searchbox input { flex: 1; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-pill); padding: var(--s3) var(--s5); color: var(--text); min-height: 44px; }
.result-group h3 { margin-top: var(--s8); }

/* ── Breadcrumbs ──────────────────────────────────────────── */
.breadcrumbs { font-size: 0.78rem; color: var(--text-muted); padding-block: var(--s3); display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumbs a:hover { color: var(--sec); }

/* ── Scroll reveal ────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(12px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .5s ease, transform .5s ease; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ── 404 ──────────────────────────────────────────────────── */
.error-page { text-align: center; padding-block: var(--s16); }
.error-page .code { font-family: var(--font-display); font-weight: 800; font-size: clamp(4rem, 20vw, 8rem); color: var(--bg); -webkit-text-stroke: 2px var(--marca); paint-order: stroke fill; }

/* ── Desktop ──────────────────────────────────────────────── */
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .bottombar { display: none; }
  .nav-links { display: flex; }
  .header-row { height: 64px; }
  .bento { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 140px; }
  .bento-item { justify-content: flex-end; }
  .carousel-arrow { display: grid; place-items: center; position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); color: var(--text); font-size: 1.7rem; line-height: 1; cursor: pointer; box-shadow: var(--shadow); z-index: 3; }
  .carousel-arrow:hover { border-color: var(--sec); color: var(--sec-text); }
  .carousel-arrow.prev { left: -8px; } .carousel-arrow.next { right: -8px; }
}

/* ── Robustez responsiva, contraste y anti-desbordamiento ─────────── */

/* Sin scroll horizontal por elementos anchos; medios fluidos */
html, body { max-width: 100%; }
img, svg, video, iframe { max-width: 100%; }

/* Enlaces dentro de texto: legibles y con afordancia (no se confunden con el fondo) */
.prose a, .answer a, .article a:not(.btn):not(.pill) { color: var(--sec-text); text-decoration: underline; text-underline-offset: 2px; }

/* Pills/estados/tags no rompen el layout */
.pill, .status, .tstate { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.filters { max-width: 100%; }
.breadcrumbs { max-width: 100%; }

/* Hero de dos columnas (texto + imagen) */
.hero-grid { display: grid; gap: var(--s6); }
.hero-copy { min-width: 0; }
.hero-media img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--r-card); border: 1px solid var(--border); }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; align-items: center; }
  .hero { padding-block: var(--s12); }
}

/* Duotono a color: escritorio con hover; táctil, al tocar (:active/:focus) */
.card:active .thumb img, .card:focus-within .thumb img { filter: none; mix-blend-mode: normal; opacity: 1; }

/* En táctil, neutralizar estados :hover “pegados” tras el tap */
@media (hover: none) {
  .card:hover, .bento-item:hover, .btn:hover, .icon-btn:hover { box-shadow: none; transform: none; }
}

/* Grid intermedio (tablet) para mejor jerarquía */
@media (min-width: 600px) and (max-width: 899px) {
  .bento { grid-template-columns: repeat(3, 1fr); }
  .bento-item.wide { grid-column: span 3; }
}

/* Lectura sin desbordes en móvil */
.read { width: min(100%, var(--w-read)); max-width: 100%; }
.prose, .essential, .essential .v { overflow-wrap: anywhere; max-width: 100%; }

/* ── Hero ─────────────────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; }
.hero .lede { max-width: 46ch; color: var(--text-muted); }
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--s3); margin: var(--s6) 0 var(--s5); }
.hero-cta .btn { min-width: 160px; justify-content: center; }
.hero-meta { color: var(--text-muted); font-size: 0.9rem; margin-top: var(--s4); }
.countdown--compact .stat-tile { padding: var(--s3); flex: 1 1 60px; }
.countdown--compact .stat-tile .num { font-size: clamp(1.3rem, 5vw, 1.9rem); }
.hero-media-wrap { min-width: 0; }

/* Mosaico (escritorio) */
.mosaic-col { display: flex; flex-direction: column; gap: var(--s3); will-change: transform; }
.mosaic-col--up { animation: mosaicUp 42s linear infinite; }
.mosaic-col--down { animation: mosaicDown 42s linear infinite; }
.mosaic-tile { margin: 0; border-radius: var(--r-card); overflow: hidden; border: 1px solid var(--border); aspect-ratio: 4 / 3; background: var(--surface-2); }
.mosaic-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
@keyframes mosaicUp { from { transform: translateY(0); } to { transform: translateY(-50%); } }
@keyframes mosaicDown { from { transform: translateY(-50%); } to { transform: translateY(0); } }
.hero-mosaic:hover .mosaic-col { animation-play-state: paused; }
.hero-mosaic { display: none; }

/* Portada de fondo (móvil) */
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-bg::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, var(--bg) 6%, color-mix(in srgb, var(--bg) 62%, transparent) 42%, color-mix(in srgb, var(--bg) 20%, transparent) 100%); }

/* ── MÓVIL: hero de portada a pantalla completa (propuesta nueva) ── */
@media (max-width: 899px) {
  .hero.container { padding-inline: 0; }
  .hero { min-height: 100svh; display: flex; align-items: flex-end; }
  .hero-grid { position: relative; z-index: 1; width: 100%; padding: var(--s16) var(--s4) calc(64px + var(--s6)); }
  .hero h1 { font-size: clamp(2.6rem, 12vw, 4rem); line-height: 0.98; max-height: none; }
  .hero .lede { color: var(--text); max-width: 36ch; }
  .hero-cta { width: 100%; }
  .hero-cta .btn { flex: 1 1 42%; }
}

/* ── ESCRITORIO: split; el mosaico llega hasta el header y SE CONTIENE ── */
@media (min-width: 900px) {
  .hero-bg { display: none; }
  .hero { padding-top: 0; padding-bottom: var(--s10); }
  /* minmax(0,…) permite que las columnas se encojan y el texto NO invada la galería. */
  .hero-grid--mosaic { grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); align-items: center; gap: var(--s12); min-height: calc(100svh - 72px); }
  .hero-grid--mosaic .hero-copy { min-width: 0; }
  .hero-grid--mosaic .hero h1, .hero-grid--mosaic h1 { font-size: clamp(3rem, 5vw, 4.6rem); line-height: 0.98; max-height: none; overflow-wrap: anywhere; }
  /* Altura FIJA = alto visible del hero. Las columnas (más altas) se recortan
     con overflow:hidden y solo se desplazan dentro; nunca empujan el layout. */
  .hero-mosaic { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3);
    height: calc(100svh - 72px); overflow: hidden; align-self: stretch;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 5%, #000 95%, t