/* =====================================================================
   ISEF · Sitio público
   ===================================================================== */

/* ---------------------------------------------------------------------
   Contenedor
   ------------------------------------------------------------------ */

.wrap-page {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px);
}

.section { padding: var(--sp-8) 0; }
.section--tight { padding: var(--sp-6) 0; }
.section--first { padding-top: var(--sp-6); }
.section + .section { padding-top: 0; }

.section-divider {
  height: 1px;
  background: var(--line);
  margin: var(--sp-7) 0;
}

/* ---------------------------------------------------------------------
   Barra superior
   ------------------------------------------------------------------ */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--glass);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.3s var(--ease-out), background-color 0.3s var(--ease-out);
}

.site-nav.is-stuck { box-shadow: var(--shadow-2); }

.site-nav__inner {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: var(--sp-5);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  flex: 0 0 auto;
}

.brand__mark {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--brand-solid);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  box-shadow: var(--shadow-1);
}

.brand__text { display: flex; flex-direction: column; line-height: 1.1; }

.brand__name {
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.brand__sub {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0 0 0 auto;
  padding: 0;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 9px 14px;
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--body);
  border-radius: var(--r-sm);
  position: relative;
  transition: color 0.2s, background-color 0.2s;
}

.nav-links a:hover { color: var(--ink); background: var(--surface-2); }

.nav-links a.is-active { color: var(--brand); }

.nav-links a.is-active::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 3px;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
}

.nav-tools { display: flex; align-items: center; gap: var(--sp-2); flex: 0 0 auto; }

.nav-burger {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

@media (max-width: 900px) {
  .nav-burger { display: inline-flex; }
  .nav-links {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: var(--sp-3);
    box-shadow: var(--shadow-2);
    display: none;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 13px 14px; border-radius: var(--r-sm); }
  .nav-links a.is-active::after { display: none; }
  .nav-links a.is-active { background: var(--brand-tint); }
}

/* ---------------------------------------------------------------------
   Portada
   ------------------------------------------------------------------ */

.hero { padding: var(--sp-7) 0 var(--sp-6); position: relative; overflow: hidden; }

.hero::before {
  content: '';
  position: absolute;
  width: 520px;
  height: 520px;
  right: -180px;
  top: -220px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--brand-tint), transparent 66%);
  pointer-events: none;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(24px, 3.5vw, 44px);
  align-items: start;
  position: relative;
}

@media (max-width: 980px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
}

/* Artículo destacado */
.feature { display: block; text-decoration: none; }

.feature__frame {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-2);
  margin-bottom: var(--sp-5);
}

.feature__img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  transition: transform 0.7s var(--ease-out);
}

.feature:hover .feature__img { transform: scale(1.032); }

.feature__stamp {
  position: absolute;
  left: 16px;
  top: 16px;
  background: var(--brand-solid);
  color: #fff;
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 11px;
  border-radius: var(--r-xs);
  box-shadow: var(--shadow-2);
}

.feature__title {
  font-size: clamp(1.7rem, 3.5vw, 2.85rem);
  font-weight: 600;
  line-height: 1.08;
  color: var(--ink);
  margin: 0 0 var(--sp-3);
  transition: color 0.24s var(--ease-out);
}

.feature:hover .feature__title { color: var(--brand); }

.feature__excerpt {
  color: var(--muted);
  font-size: var(--fs-lead);
  line-height: 1.62;
  margin: 0 0 var(--sp-4);
  max-width: 62ch;
}

.byline {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--muted);
  letter-spacing: 0.03em;
}

.byline__sep { color: var(--faint); }
.byline__author { color: var(--ink); font-weight: 500; }

/* ---------------------------------------------------------------------
   Consola en vivo (elemento distintivo)
   ------------------------------------------------------------------ */

.live-console {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  position: relative;
}

.live-console::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-solid), var(--brand-solid-900));
}

.live-console__head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.live-console__state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
}

.live-console__state.is-live { color: var(--danger); }
.live-console__state.is-off { color: var(--muted); }

.live-console__body { padding: var(--sp-5); }

.live-console__title {
  font-size: 1.32rem;
  margin: 0 0 var(--sp-2);
  color: var(--ink);
  line-height: 1.16;
}

.live-console__note {
  color: var(--muted);
  font-size: var(--fs-small);
  margin: 0 0 var(--sp-4);
  line-height: 1.55;
}

.countdown {
  display: flex;
  gap: 6px;
  margin: 0 0 var(--sp-4);
}

.countdown__cell {
  flex: 1 1 0;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 10px 6px;
  text-align: center;
}

.countdown__num {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.28rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.countdown__lbl {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 3px;
}

.live-console__facts {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  overflow: hidden;
  margin-bottom: var(--sp-4);
}

.live-fact {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: 10px 13px;
  background: var(--surface);
  font-size: var(--fs-micro);
}

.live-fact__k {
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-size: var(--fs-eyebrow);
}

.live-fact__v { color: var(--ink); font-weight: 600; text-align: right; }

/* ---------------------------------------------------------------------
   Lista lateral de artículos
   ------------------------------------------------------------------ */

.side-list { display: flex; flex-direction: column; }

.side-item {
  display: flex;
  gap: var(--sp-4);
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--line-soft);
  text-decoration: none;
  transition: transform 0.24s var(--ease-out);
}

.side-item:last-child { border-bottom: 0; }
.side-item:hover { transform: translateX(3px); }

.side-item__thumb {
  width: 92px;
  height: 68px;
  flex: 0 0 auto;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--surface-2);
}

.side-item__thumb img { width: 100%; height: 100%; object-fit: cover; }

.side-item__body { min-width: 0; flex: 1 1 auto; }

.side-item__title {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
  margin: 0 0 5px;
  transition: color 0.2s;
}

.side-item:hover .side-item__title { color: var(--brand); }

.side-item__meta {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.side-item__index {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--faint);
  flex: 0 0 auto;
  padding-top: 2px;
}

/* ---------------------------------------------------------------------
   Tarjeta de artículo
   ------------------------------------------------------------------ */

.grid-articles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));
  gap: clamp(18px, 2.4vw, 28px);
}

.post {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  height: 100%;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}

.post:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-2);
  border-color: var(--line-strong);
}

.post__thumb { aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); position: relative; }
.post__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease-out); }
.post:hover .post__thumb img { transform: scale(1.05); }

.post__thumb--empty {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--surface-2), var(--surface-3));
  color: var(--faint);
  font-family: var(--font-display);
  font-size: 2.4rem;
}

.post__body { padding: var(--sp-4) var(--sp-5) var(--sp-5); flex: 1 1 auto; display: flex; flex-direction: column; }

.post__title {
  font-size: 1.14rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.26;
  margin: 0 0 var(--sp-2);
  transition: color 0.22s;
}

.post:hover .post__title { color: var(--brand); }

.post__excerpt {
  color: var(--muted);
  font-size: var(--fs-small);
  line-height: 1.58;
  margin: 0 0 var(--sp-4);
  flex: 1 1 auto;
}

.post__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ---------------------------------------------------------------------
   Tarjeta de video
   ------------------------------------------------------------------ */

.grid-media {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
  gap: clamp(16px, 2.2vw, 24px);
}

.vcard {
  display: flex;
  flex-direction: column;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  font: inherit;
  color: inherit;
  height: 100%;
  transition: transform 0.28s var(--ease-out), box-shadow 0.28s var(--ease-out), border-color 0.28s var(--ease-out);
}

.vcard:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-2);
  border-color: var(--line-strong);
}

.vcard__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--surface-3);
  overflow: hidden;
}

.vcard__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease-out); }
.vcard:hover .vcard__thumb img { transform: scale(1.06); }

.vcard__thumb--empty {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--surface-2), var(--surface-3));
  color: var(--faint);
  font-size: 2rem;
}

.vcard__play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(164, 21, 25, 0.94);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.26s var(--ease-out), transform 0.32s var(--ease-out);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.34);
  pointer-events: none;
}

.vcard:hover .vcard__play,
.vcard:focus-visible .vcard__play { opacity: 1; transform: scale(1); }

.vcard__badge {
  position: absolute;
  left: 9px;
  top: 9px;
  z-index: 2;
}

.vcard__dur {
  position: absolute;
  right: 8px;
  bottom: 8px;
  background: rgba(6, 8, 12, 0.86);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  padding: 3px 6px;
  border-radius: 4px;
  z-index: 2;
}

.vcard__body { padding: var(--sp-3) var(--sp-4) var(--sp-4); flex: 1 1 auto; display: flex; flex-direction: column; gap: 6px; }

.vcard__title {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.36;
  margin: 0;
  transition: color 0.2s;
}

.vcard:hover .vcard__title { color: var(--brand); }

.vcard__meta {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-top: auto;
  padding-top: 5px;
}

/* ---------------------------------------------------------------------
   Selector de secciones
   ------------------------------------------------------------------ */

.tabbar {
  display: flex;
  gap: 4px;
  padding: 5px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow-x: auto;
  scrollbar-width: none;
  position: relative;
}

.tabbar::-webkit-scrollbar { display: none; }

.tabbar__btn {
  position: relative;
  z-index: 1;
  border: 0;
  background: transparent;
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--muted);
  padding: 9px 16px;
  border-radius: var(--r-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.22s var(--ease-out);
  flex: 0 0 auto;
}

.tabbar__btn:hover { color: var(--ink); }
.tabbar__btn.is-active { color: #fff; }

.tabbar__pill {
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 0;
  background: var(--brand-solid);
  border-radius: var(--r-sm);
  z-index: 0;
  box-shadow: var(--shadow-1);
}

.tabbar__count {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  opacity: 0.72;
  margin-left: 6px;
}

.panel-swap { display: none; }
.panel-swap.is-active { display: block; }

/* ---------------------------------------------------------------------
   Filtros y buscador
   ------------------------------------------------------------------ */

.filters {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

.search-box { position: relative; flex: 1 1 260px; max-width: 420px; }

.search-box .input { padding-left: 2.4rem; }

.search-box__icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--faint);
  pointer-events: none;
  font-size: 0.95rem;
}

.pill-row { display: flex; gap: 6px; flex-wrap: wrap; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--body);
  font-size: var(--fs-micro);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
}

.pill:hover { border-color: var(--brand); color: var(--brand); }

.pill.is-active {
  background: var(--brand-solid);
  border-color: var(--brand-solid);
  color: #fff;
}

/* ---------------------------------------------------------------------
   Artículo
   ------------------------------------------------------------------ */

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

@media (max-width: 1000px) {
  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .article-aside { order: 2; }
}

.article-head { margin-bottom: var(--sp-6); }

.article-title {
  font-size: clamp(1.9rem, 4.2vw, 3.15rem);
  line-height: 1.06;
  margin: var(--sp-3) 0 var(--sp-4);
  color: var(--ink);
  max-width: 20ch;
}

.article-lead {
  font-size: var(--fs-lead);
  color: var(--body);
  line-height: 1.68;
  max-width: 66ch;
  padding-left: var(--sp-4);
  border-left: 2px solid var(--brand);
  margin: 0 0 var(--sp-5);
}

.article-hero {
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: var(--sp-6);
  background: var(--surface-2);
}

.article-hero img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; display: block; }

.prose {
  font-size: 1.02rem;
  line-height: 1.78;
  color: var(--body);
  max-width: 70ch;
}

.prose > * + * { margin-top: 1.05em; }

.prose h2 {
  font-size: 1.62rem;
  margin-top: 2.1em;
  margin-bottom: 0.55em;
  color: var(--ink);
}

.prose h3 {
  font-size: 1.28rem;
  margin-top: 1.7em;
  margin-bottom: 0.45em;
  color: var(--ink);
}

.prose p { margin-bottom: 0; }
.prose a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:hover { text-decoration-thickness: 2px; }

.prose img,
.prose iframe {
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  display: block;
  margin: 1.7em 0;
  max-width: 100%;
}

.prose blockquote {
  margin: 1.7em 0;
  padding: var(--sp-4) var(--sp-5);
  border-left: 3px solid var(--brand);
  background: var(--surface-2);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-style: italic;
  color: var(--ink);
}

.prose blockquote p:last-child { margin-bottom: 0; }

.prose ul, .prose ol { padding-left: 1.35em; margin-bottom: 0; }
.prose li { margin-bottom: 0.5em; }
.prose li::marker { color: var(--brand); }

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-small);
  margin: 1.7em 0;
}

.prose th, .prose td {
  padding: 10px 13px;
  border: 1px solid var(--line);
  text-align: left;
}

.prose th { background: var(--surface-2); font-weight: 600; color: var(--ink); }

.prose code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--brand);
}

.prose pre {
  background: var(--surface-inv);
  color: var(--surface);
  padding: var(--sp-4);
  border-radius: var(--r-md);
  overflow-x: auto;
  font-size: var(--fs-small);
}

.prose pre code { background: transparent; color: inherit; padding: 0; }

/* Barra de progreso de lectura */
.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--brand-solid);
  z-index: 950;
  width: 0;
  transition: width 0.08s linear;
}

/* Compartir */
.share-row { display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; }

.share-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  text-decoration: none;
}

.share-btn:hover { background: var(--brand-solid); border-color: var(--brand-solid); color: #fff; transform: translateY(-2px); }

.article-aside { position: sticky; top: calc(var(--nav-h) + 20px); }

/* ---------------------------------------------------------------------
   Comentarios
   ------------------------------------------------------------------ */

.comments { max-width: 780px; }

.comment-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  margin-bottom: var(--sp-6);
}

.comment-item {
  display: flex;
  gap: var(--sp-4);
  padding: var(--sp-5) 0;
  border-bottom: 1px solid var(--line-soft);
}

.comment-item:last-child { border-bottom: 0; }

.comment-item__body { flex: 1 1 auto; min-width: 0; }

.comment-item__head {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-bottom: 5px;
}

.comment-item__name { font-weight: 600; color: var(--ink); font-size: var(--fs-small); }

.comment-item__time {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--faint);
  letter-spacing: 0.04em;
}

.comment-item__text {
  color: var(--body);
  font-size: var(--fs-small);
  line-height: 1.65;
  margin: 0;
  overflow-wrap: anywhere;
}

.comment-reply {
  margin-top: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--brand-tint);
  border-radius: var(--r-sm);
  border-left: 2px solid var(--brand);
}

.comment-reply__label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
  display: block;
  margin-bottom: 4px;
}

.comment-reply__text { font-size: var(--fs-micro); color: var(--body); margin: 0; line-height: 1.6; }

.comments-empty {
  text-align: center;
  padding: var(--sp-7) var(--sp-4);
  color: var(--muted);
}

.comments-empty i { font-size: 2rem; color: var(--faint); display: block; margin-bottom: var(--sp-3); }

/* ---------------------------------------------------------------------
   Aviso de contenido nuevo
   ------------------------------------------------------------------ */

.newdrop {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1200;
  width: min(360px, calc(100vw - 40px));
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-3);
  padding: var(--sp-4);
  display: none;
}

.newdrop.is-shown { display: block; }

.newdrop__head {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-2);
}

.newdrop__label {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 500;
}

.newdrop__time { font-family: var(--font-mono); font-size: 0.64rem; color: var(--faint); margin-left: auto; }

.newdrop__title {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
  margin: 0 0 var(--sp-3);
}

.newdrop__actions { display: flex; gap: var(--sp-2); }

.newdrop__close {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 0;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
  font-size: 1rem;
  padding: 3px;
  line-height: 1;
}

.newdrop__close:hover { color: var(--ink); }

/* ---------------------------------------------------------------------
   Estados vacíos
   ------------------------------------------------------------------ */

.empty {
  text-align: center;
  padding: var(--sp-8) var(--sp-5);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
  color: var(--muted);
  background: var(--surface);
}

.empty__icon { font-size: 2.2rem; color: var(--faint); display: block; margin-bottom: var(--sp-3); }
.empty__title { font-family: var(--font-body); font-size: var(--fs-body); font-weight: 600; color: var(--ink); margin: 0 0 var(--sp-2); }
.empty p { margin: 0; font-size: var(--fs-small); }

/* ---------------------------------------------------------------------
   Pie
   ------------------------------------------------------------------ */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  margin-top: var(--sp-8);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: clamp(24px, 4vw, 56px);
  padding: var(--sp-7) 0 var(--sp-6);
}

@media (max-width: 760px) {
  .site-footer__grid { grid-template-columns: 1fr; gap: var(--sp-5); }
}

.footer-title {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 var(--sp-4);
  font-weight: 500;
}

.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; }
.footer-links a { color: var(--body); font-size: var(--fs-small); }
.footer-links a:hover { color: var(--brand); }

.site-footer__bar {
  border-top: 1px solid var(--line-soft);
  padding: var(--sp-4) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ---------------------------------------------------------------------
   Volver arriba
   ------------------------------------------------------------------ */

.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 850;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-2);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out), background-color 0.2s;
}

.to-top.is-shown { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { background: var(--brand-solid); color: #fff; border-color: var(--brand-solid); }

/* Deja espacio si el aviso de contenido nuevo está visible */
.newdrop.is-shown ~ .to-top { bottom: 168px; }

/* ---------------------------------------------------------------------
   Contacto
   ------------------------------------------------------------------ */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}

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

.info-row {
  display: flex;
  gap: var(--sp-4);
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--line-soft);
}

.info-row:last-child { border-bottom: 0; }

.info-row__icon {
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
  background: var(--brand-tint);
  color: var(--brand);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-size: 1.05rem;
}

.info-row__k {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-bottom: 3px;
}

.info-row__v { color: var(--ink); font-size: var(--fs-small); font-weight: 500; }

/* ---------------------------------------------------------------------
   Carga incremental
   ------------------------------------------------------------------ */

.load-slot { min-height: 60px; position: relative; }
.load-slot.is-busy { opacity: 0.42; pointer-events: none; }

/* =====================================================================
   PORTADA · BLOQUES NUEVOS
   ===================================================================== */

/* ---------------------------------------------------------------------
   Encabezado de panel lateral
   Lo reutiliza el archivo de artículos de la portada.
   ------------------------------------------------------------------ */

.queue__head {
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}

.queue__title {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
  font-weight: 500;
}

/* ---------------------------------------------------------------------
   Parrilla semanal
   ------------------------------------------------------------------ */

.week {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: var(--sp-4);
}

.wcard {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--sp-5);
  background: var(--surface);
  position: relative;
  overflow: hidden;
  transition: border-color 0.24s var(--ease-out), transform 0.24s var(--ease-out);
}

.wcard:hover { border-color: var(--line-strong); transform: translateY(-2px); }

.wcard.is-live {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-tint);
}

.wcard__day {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--brand);
  display: block;
  margin-bottom: var(--sp-3);
}

.wcard__title {
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 var(--sp-2);
  line-height: 1.28;
}

.wcard__hour {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--body);
  display: flex;
  align-items: center;
  gap: 6px;
}

.wcard__note {
  font-size: var(--fs-micro);
  color: var(--muted);
  margin: var(--sp-3) 0 0;
  line-height: 1.55;
}

/* ---------------------------------------------------------------------
   Franja de cierre
   ------------------------------------------------------------------ */

.closer {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(28px, 5vw, 52px);
  background:
    radial-gradient(circle at 12% 0%, var(--brand-tint), transparent 55%),
    var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  flex-wrap: wrap;
}

.closer__text { flex: 1 1 340px; }

.closer__title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 var(--sp-3);
  line-height: 1.18;
  max-width: 20ch;
}

.closer__sub {
  color: var(--muted);
  font-size: var(--fs-small);
  margin: 0;
  max-width: 52ch;
  line-height: 1.65;
}

.closer__actions { display: flex; gap: var(--sp-3); flex-wrap: wrap; }

/* ---------------------------------------------------------------------
   Encabezado con enlace a la derecha
   ------------------------------------------------------------------ */

.section-head__link {
  flex: 0 0 auto;
  align-self: flex-end;
}

@media (max-width: 640px) {
  .section-head__link { align-self: flex-start; }
}

/* =====================================================================
   NORMALIZACIÓN DE TARJETAS
   Las tarjetas que son <button> llevan <span> dentro, porque un botón
   solo admite contenido de frase: un <div> ahí es HTML inválido. Pero un
   <span> es inline por defecto, así que sin esto los marcos colapsan a
   cero de alto y los elementos absolutos se van a la esquina. Era el
   motivo de que el último video saliera como un rectángulo negro con el
   play cortado en el borde izquierdo.
   ===================================================================== */

/* Las tarjetas cuyo contenedor ya es flex (.vcard, .post, .side-item,
   .qitem) no necesitan nada: sus hijos directos se convierten en bloque
   solos. Y NO deben tocarse, porque .vcard__title lleva .clamp-2, que
   necesita `display: -webkit-box` para recortar a dos líneas.

   Solo se declaran aquí los que podrían quedar dentro de un contenedor
   que no sea flex. */

.cover__media,
.cover__title { display: block; }

/* =====================================================================
   PORTADA 2.2
   Cintillo de transmisión + dos portadas equivalentes: el último
   artículo y el último video, con el mismo peso visual.
   ===================================================================== */

/* ---------------------------------------------------------------------
   Cintillo de transmisión
   ------------------------------------------------------------------ */

.live-bar {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 30px);
  flex-wrap: wrap;
  padding: var(--sp-4) clamp(18px, 2.6vw, 28px);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--r-md);
  background:
    linear-gradient(90deg, var(--brand-tint), transparent 62%),
    var(--surface);
  margin-bottom: clamp(24px, 4vw, 44px);
}

.live-bar__lead { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 260px; }

.live-bar__label {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
  display: block;
}

.live-bar__title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  margin: 2px 0 0;
  line-height: 1.25;
}

.live-bar__clock {
  display: flex;
  align-items: baseline;
  gap: 3px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  font-size: 1.28rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.live-bar__clock small {
  font-size: 0.6rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-right: 7px;
}

.live-bar__clock span:not(.live-bar__sep):not(small) { min-width: 2ch; text-align: center; }
.live-bar__sep { color: var(--faint); font-weight: 400; }

.live-bar__when {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  color: var(--muted);
  white-space: nowrap;
}

@media (max-width: 720px) {
  .live-bar { flex-direction: column; align-items: flex-start; }
  .live-bar .btn { width: 100%; }
}

/* ---------------------------------------------------------------------
   Las dos portadas
   ------------------------------------------------------------------ */

.cover-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  gap: clamp(18px, 2.4vw, 30px);
  align-items: stretch;
}

@media (max-width: 940px) {
  .cover-grid { grid-template-columns: minmax(0, 1fr); }
}

.cover {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface);
  width: 100%;
  padding: 0;
  margin: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  position: relative;
  transition: border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out),
              transform 0.3s var(--ease-out);
}

.cover:hover { border-color: var(--line-strong); box-shadow: var(--shadow-2); }
.cover--video { cursor: pointer; }
.cover--video:hover { border-color: var(--brand); transform: translateY(-3px); }

.cover__media { position: relative; overflow: hidden; background: var(--surface-3); }
.cover__media::before { content: ''; display: block; padding-top: 56.25%; }

.cover__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.85s var(--ease-out);
}

.cover:hover .cover__img { transform: scale(1.04); }

.cover__fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--faint);
  font-size: 2.4rem;
  background: var(--surface-3);
}

.cover__tag {
  position: absolute;
  top: 13px;
  left: 13px;
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  z-index: 2;
}

.cover__stamp {
  background: var(--brand-solid);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 6px 11px;
  border-radius: var(--r-xs);
  box-shadow: 0 5px 20px rgba(164, 21, 25, 0.42);
}

/* Botón de reproducción */
.cover__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 8, 12, 0.14) 0%, rgba(6, 8, 12, 0.5) 100%);
  opacity: 0;
  transition: opacity 0.32s var(--ease-out);
}

.cover--video:hover .cover__scrim { opacity: 1; }

.cover__play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: var(--brand-solid);
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  padding-left: 4px;
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.46);
  transition: transform 0.36s var(--ease-out), background-color 0.28s, color 0.28s;
  z-index: 2;
}

.cover--video:hover .cover__play {
  transform: translate(-50%, -50%) scale(1.12);
  background: var(--brand-solid);
  color: #fff;
}

.cover__dur {
  position: absolute;
  right: 12px;
  bottom: 12px;
  background: rgba(6, 8, 12, 0.84);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  padding: 4px 8px;
  border-radius: var(--r-xs);
  z-index: 2;
}

/* Cuerpo */
.cover__body {
  padding: clamp(20px, 2.6vw, 30px);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  flex: 1 1 auto;
  min-width: 0;
}

.cover__kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.cover__kicker b { color: var(--brand); font-weight: 500; }

.cover__title {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.14;
  letter-spacing: -0.012em;
  margin: 0;
}

.cover--article .cover__title { font-size: clamp(1.5rem, 2.7vw, 2.15rem); }
.cover--video .cover__title { font-size: clamp(1.12rem, 1.7vw, 1.4rem); line-height: 1.24; }

.cover__title a {
  color: inherit;
  text-decoration: none;
  background-image: linear-gradient(var(--brand), var(--brand));
  background-size: 0% 2px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.45s var(--ease-out), color 0.26s;
}

.cover__title a:hover { color: var(--brand); background-size: 100% 2px; }

.cover__text {
  color: var(--body);
  font-size: var(--fs-small);
  line-height: 1.68;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cover__foot {
  margin-top: auto;
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

.cover__who { display: flex; align-items: center; gap: 9px; min-width: 0; }
.cover__who-name { font-weight: 600; color: var(--ink); font-size: var(--fs-micro); display: block; }

.cover__who-role {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
}

.cover__cta { margin-left: auto; }

/* Botón simulado dentro del <button> del video */
.cover__fake-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: var(--r-sm);
  background: var(--brand-solid);
  color: #fff;
  font-size: var(--fs-micro);
  font-weight: 600;
  margin-left: auto;
  transition: filter 0.24s;
}

.cover--video:hover .cover__fake-btn { filter: brightness(1.12); }

/* ---------------------------------------------------------------------
   Carrusel de videos recientes
   ------------------------------------------------------------------ */

.rail-wrap { position: relative; }

.rail {
  display: flex;
  gap: var(--sp-4);
  overflow-x: auto;
  padding-bottom: var(--sp-4);
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scroll-behavior: smooth;
}

.rail::-webkit-scrollbar { height: 6px; }
.rail::-webkit-scrollbar-track { background: var(--surface-2); border-radius: 3px; }
.rail::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 3px; }
.rail::-webkit-scrollbar-thumb:hover { background: var(--brand); }

.rail > * {
  flex: 0 0 clamp(228px, 25vw, 284px);
  scroll-snap-align: start;
}

.rail-nav { display: flex; gap: 6px; }

/* ---------------------------------------------------------------------
   Franja alterna
   ------------------------------------------------------------------ */

.band { background: var(--surface-2); border-block: 1px solid var(--line); }

/* ---------------------------------------------------------------------
   Tira de cifras
   ------------------------------------------------------------------ */

.figures {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(18px, 4vw, 54px);
  margin-top: clamp(22px, 3vw, 34px);
  padding-top: clamp(18px, 2.4vw, 26px);
  border-top: 1px solid var(--line);
}

.figure { display: flex; align-items: baseline; gap: 9px; }

.figure__num {
  font-family: var(--font-mono);
  font-size: 1.32rem;
  font-weight: 600;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.figure__lbl {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.figures__note {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

@media (max-width: 640px) {
  .figures__note { display: none; }
}

.section-head__link { flex: 0 0 auto; align-self: flex-end; }

@media (max-width: 640px) {
  .section-head__link { align-self: flex-start; }
}
