/* ============================================================
   45 DIGITAL NOTICIAS — Columnas · sistema de diseño (machote)
   Paleta navy + ámbar (continuidad del ecosistema).
   Sensibilidad: ojo de Dios / lectura sistémica — sobrio pero inmersivo.
   ============================================================ */

:root {
  /* color */
  /* Paleta "Carta estelar / Observatorio": tinta fría casi negra,
     texto hueso cálido, acento latón. Se conservan los nombres de
     variables para no tocar el resto del CSS. */
  --navy-900: #080b11;   /* tinta noche (fondo base) */
  --navy-850: #0b0f16;
  --navy-800: #0f141d;
  --navy-700: #171f2b;
  --navy-600: #232f3e;
  --amber:    #cca15a;   /* latón */
  --amber-bright: #ecc77f;
  --amber-dim:  #a37f44;
  --ink:      #ebe5d6;   /* hueso / pergamino */
  --ink-soft: #c2bcad;
  --muted:    #918b7d;
  --line:     rgba(204,161,90,.18);
  --line-soft: rgba(235,229,214,.06);

  /* type */
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body:    "Newsreader", Georgia, serif;
  --ui:      "Inter", system-ui, -apple-system, sans-serif;

  /* layout */
  --maxw: 1180px;
  --measure: 40rem;
  --radius: 4px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--navy-900);
  color: var(--ink);
  font-family: var(--body);
  font-size: 19px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- utilidades ---------- */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(20px, 5vw, 48px); }
.kicker {
  font-family: var(--ui);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--amber);
}
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--navy-900) 82%, transparent);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .wrap { position: relative; display: flex; align-items: center; justify-content: space-between; height: 68px; }
.menu-toggle { display: none; background: none; border: 0; color: var(--ink); font-size: 1.6rem; line-height: 1; cursor: pointer; padding: 4px 8px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand .mark { width: 26px; height: 26px; flex: none; }
.brand .name { font-family: var(--ui); font-weight: 700; letter-spacing: .04em; font-size: .95rem; }
.brand .name b { color: var(--amber); font-weight: 800; }
.brand-logo { height: 40px; width: auto; display: block; }
.nav { display: flex; gap: 28px; font-family: var(--ui); font-size: .85rem; color: var(--ink-soft); }
.nav a { padding: 6px 0; border-bottom: 2px solid transparent; transition: .2s; }
.nav a:hover { color: var(--ink); border-color: var(--amber); }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
  background: var(--navy-900);
}
/* capa de fondo vectorial que gira lentamente alrededor del centro (ojo de Dios) */
.hero-bg {
  position: absolute; top: 50%; left: 50%;
  width: 150vmax; height: 150vmax;
  transform: translate(-50%, -50%);
  transform-origin: center;
  z-index: 0; pointer-events: none; user-select: none;
  animation: vortex-spin 220s linear infinite;
}
@keyframes vortex-spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}
/* velo de legibilidad: oscuro a la izquierda (texto), deja respirar la imagen a la derecha */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(90deg, var(--navy-900) 0%, rgba(8,11,17,.84) 36%, rgba(8,11,17,.46) 68%, rgba(8,11,17,.66) 100%),
    radial-gradient(120% 90% at 85% -10%, rgba(204,161,90,.10), transparent 55%);
  pointer-events: none;
}
.hero .vantage { display: none; } /* el fondo SVG ya aporta el motivo del vórtice */
.hero .wrap { position: relative; z-index: 2; padding-block: clamp(56px, 9vw, 110px); }
.hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero .eyebrow { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.hero .eyebrow .line { flex: 1; height: 1px; background: var(--line); }
.hero h1 {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 1.02; letter-spacing: -.02em; margin: 0 0 22px;
  font-optical-sizing: auto;
}
.hero .dek { font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--ink-soft); max-width: 40ch; margin: 0 0 28px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 18px; font-family: var(--ui); font-size: .8rem; color: var(--muted); }
.meta-row b { color: var(--ink-soft); font-weight: 600; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--ui); font-size: .85rem; font-weight: 600; letter-spacing: .02em;
  color: var(--navy-900); background: var(--amber);
  padding: 13px 22px; border-radius: var(--radius);
  margin-top: 30px; transition: .2s;
}
.btn:hover { background: var(--amber-bright); transform: translateY(-1px); }
.hero-aside { font-family: var(--ui); font-size: .82rem; color: var(--muted); border-left: 1px solid var(--line); padding-left: 22px; }
.hero-aside p { margin: 0 0 14px; }

/* ---------- sección índice ---------- */
.section { padding-block: clamp(48px, 7vw, 86px); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 36px; gap: 20px; }
.section-head h2 { font-family: var(--display); font-weight: 600; font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0; letter-spacing: -.01em; }
.section-head a { font-family: var(--ui); font-size: .82rem; color: var(--amber); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); }
.card {
  background: var(--navy-850);
  display: flex; flex-direction: column;
  overflow: hidden;
  transition: background .25s;
}
.card:hover { background: var(--navy-800); }
.card-img { aspect-ratio: 16 / 9; overflow: hidden; background: var(--navy-800); }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .45s ease; }
.card:hover .card-img img { transform: scale(1.045); }
.card-body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card .date { font-family: var(--ui); font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--amber); }
.card h3 { font-family: var(--display); font-weight: 600; font-size: 1.32rem; line-height: 1.14; margin: 0; letter-spacing: -.01em; }
.card p { font-size: .92rem; color: var(--ink-soft); margin: 0; }
.card .more { margin-top: auto; font-family: var(--ui); font-size: .78rem; color: var(--amber); letter-spacing: .04em; }
.card:hover .more { color: var(--amber-bright); }

/* ---------- Recién publicadas (banda de la última entrega) ---------- */
.recientes { padding-block: clamp(26px, 4vw, 40px); background: var(--navy-850); border-bottom: 1px solid var(--line-soft); }
.recientes[hidden] { display: none; }
.recientes-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.recientes-head .kicker { display: inline-flex; align-items: center; gap: 9px; }
.recientes-head .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--amber-bright); box-shadow: 0 0 0 0 rgba(236,199,127,.55); animation: recPulse 2.6s ease-out infinite; }
@keyframes recPulse { 0% { box-shadow: 0 0 0 0 rgba(236,199,127,.5); } 70% { box-shadow: 0 0 0 9px rgba(236,199,127,0); } 100% { box-shadow: 0 0 0 0 rgba(236,199,127,0); } }
@media (prefers-reduced-motion: reduce) { .recientes-head .pulse { animation: none; } }
.recientes-sub { font-family: var(--ui); font-size: .8rem; color: var(--muted); letter-spacing: .02em; }
.recientes-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.rec-card { display: flex; gap: 14px; align-items: stretch; background: var(--navy-800); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 11px; transition: border-color .2s, background .2s, transform .2s; }
.rec-card:hover { border-color: var(--line); background: var(--navy-700); transform: translateY(-2px); }
.rec-thumb { flex: 0 0 86px; align-self: stretch; aspect-ratio: 1 / 1; border-radius: 3px; overflow: hidden; background: var(--navy-900); }
.rec-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.rec-card:hover .rec-thumb img { transform: scale(1.05); }
.rec-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 2px 4px 2px 0; }
.rec-pill { align-self: flex-start; font-family: var(--ui); font-size: .56rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--navy-900); background: var(--amber); padding: 3px 9px; border-radius: 999px; }
.rec-cat { font-family: var(--ui); font-size: .62rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--amber); }
.rec-title { font-family: var(--display); font-weight: 600; font-size: 1.02rem; line-height: 1.16; color: var(--ink); letter-spacing: -.01em; }
.rec-more { margin-top: auto; font-family: var(--ui); font-size: .72rem; color: var(--amber); letter-spacing: .04em; }
.rec-card:hover .rec-more { color: var(--amber-bright); }
@media (max-width: 920px) { .recientes-row { grid-template-columns: 1fr; } }

/* ---------- franja ethos ---------- */
.ethos { background: var(--navy-850); border-block: 1px solid var(--line-soft); }
.ethos .wrap { padding-block: clamp(40px, 6vw, 72px); display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(24px,5vw,60px); align-items: center; }
.ethos blockquote { font-family: var(--display); font-weight: 500; font-size: clamp(1.3rem, 2.6vw, 1.9rem); line-height: 1.3; margin: 0; letter-spacing: -.01em; }
.ethos blockquote .amber { color: var(--amber); }
.ethos .note { font-family: var(--ui); font-size: .85rem; color: var(--muted); line-height: 1.7; }

/* ---------- footer ---------- */
.site-footer { padding-block: 48px; border-top: 1px solid var(--line-soft); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; align-items: center; }
.site-footer .sig { font-family: var(--display); font-style: italic; font-size: 1.15rem; }
.site-footer .small { font-family: var(--ui); font-size: .75rem; color: var(--muted); }

/* ============================================================
   ARTÍCULO (plantilla de columna)
   ============================================================ */
.article { padding-block: clamp(40px, 6vw, 80px); }
.article-head { max-width: 52rem; margin-inline: auto; text-align: left; margin-bottom: 44px; }
.article-head .eyebrow { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.article-head .eyebrow .line { flex: 1; height: 1px; background: var(--line); }
.article-head h1 {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.05; letter-spacing: -.02em; margin: 0 0 20px;
}
.article-head .dek { font-size: clamp(1.1rem, 2vw, 1.35rem); color: var(--ink-soft); line-height: 1.5; margin: 0 0 26px; font-style: italic; }
.article-meta { display: flex; flex-wrap: wrap; gap: 22px; font-family: var(--ui); font-size: .8rem; color: var(--muted); padding-block: 18px; border-block: 1px solid var(--line-soft); }
.article-meta b { color: var(--ink-soft); font-weight: 600; }

/* imagen de la columna (16:9, fija) */
.article-figure { max-width: var(--measure); margin: 0 auto 44px; }
.article-figure img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--navy-850); }
.article-figure figcaption { font-family: var(--ui); font-size: .76rem; color: var(--muted); margin-top: 10px; text-align: right; }

.prose { max-width: var(--measure); margin-inline: auto; }
.prose > p { margin: 0 0 1.4em; }
.prose > p:first-of-type::first-letter {
  font-family: var(--display); font-weight: 600; float: left;
  font-size: 3.6em; line-height: .82; padding: 6px 12px 0 0; color: var(--amber);
}
.prose h2 { font-family: var(--display); font-weight: 600; font-size: 1.7rem; letter-spacing: -.01em; margin: 1.8em 0 .5em; }
.prose a { color: var(--amber); border-bottom: 1px solid var(--line); }
.prose a:hover { border-color: var(--amber); }
.pull {
  font-family: var(--display); font-weight: 500; font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.25; color: var(--ink); letter-spacing: -.01em;
  border-left: 3px solid var(--amber); padding: 6px 0 6px 26px; margin: 1.6em 0;
}
.fuentes { max-width: var(--measure); margin: 56px auto 0; padding-top: 28px; border-top: 1px solid var(--line); }
.fuentes h2 { font-family: var(--ui); font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--amber); margin: 0 0 16px; }
.fuentes ol { font-family: var(--ui); font-size: .85rem; color: var(--ink-soft); line-height: 1.7; padding-left: 1.2em; text-align: justify; -webkit-hyphens: auto; hyphens: auto; }
.fuentes li { text-align: justify; }
.fuentes a { color: var(--amber); }
.signoff { max-width: var(--measure); margin: 40px auto 0; font-family: var(--display); font-style: italic; font-size: 1.15rem; color: var(--ink-soft); text-align: right; }
.back { display: inline-flex; gap: 8px; font-family: var(--ui); font-size: .82rem; color: var(--amber); margin-top: 48px; }

/* nota de díptico (columna companion) */
.dipt { max-width: var(--measure); margin: 28px auto 0; font-family: var(--ui); font-size: .9rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; }
.dipt a { color: var(--amber-bright); }

/* archivo: filtros + buscador */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 30px; }
.filter-btn { font-family: var(--ui); font-size: .8rem; color: var(--ink-soft); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 7px 16px; cursor: pointer; transition: .2s; }
.filter-btn:hover { border-color: var(--amber); color: var(--amber-bright); }
.filter-btn.active { background: var(--amber); border-color: var(--amber); color: #0b0f16; font-weight: 600; }
.search-box { margin-left: auto; }
.search-box input { font-family: var(--ui); font-size: .85rem; color: var(--ink-soft); background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 999px; padding: 8px 18px; min-width: 220px; outline: none; }
.search-box input:focus { border-color: var(--amber); }
.card.hidden { display: none !important; }
.no-results { font-family: var(--ui); color: var(--muted); padding: 24px 0; display: none; }
@media (max-width: 560px){ .search-box { margin-left: 0; width: 100%; } .search-box input { width: 100%; } }

/* imagen de la portada rotativa */
.hero-figure-link { display: block; }
.hero-figure { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); display: block; box-shadow: 0 18px 50px rgba(0,0,0,.45); }
.hero-tagline { font-family: var(--ui); font-size: .86rem; color: var(--muted); margin-top: 14px; }

/* enlace "Ver todas" del encabezado de sección, más visible (pill) */
.section-head a { font-family: var(--ui); font-size: .88rem; font-weight: 600; color: var(--amber-bright); border: 1px solid var(--line); border-radius: 999px; padding: 8px 18px; transition: .2s; white-space: nowrap; }
.section-head a:hover { border-color: var(--amber); background: rgba(204,161,90,.10); }

/* CTA grande "Ver todas las columnas" al pie del mosaico */
.see-all-wrap { text-align: center; margin-top: 44px; }
.see-all { display: inline-flex; align-items: center; gap: 10px; font-family: var(--ui); font-weight: 700; font-size: 1.02rem; color: #0b0f16; background: var(--amber); border-radius: 999px; padding: 14px 34px; transition: .2s; box-shadow: 0 10px 30px rgba(204,161,90,.18); }
.see-all:hover { background: var(--amber-bright); transform: translateY(-2px); box-shadow: 0 14px 38px rgba(204,161,90,.28); }

/* compartir el sitio (portada) */
.share-site { text-align: center; padding: 44px 0 8px; }
.share-site h3 { font-family: var(--ui); font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 16px; font-weight: 600; }
.share-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.share-ico { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); color: var(--amber-bright); background: transparent; cursor: pointer; transition: .2s; }
.share-ico:hover { border-color: var(--amber); background: rgba(204,161,90,.12); transform: translateY(-2px); }
.share-ico svg { width: 20px; height: 20px; fill: currentColor; }
.share-ico.copied { color: #0b0f16; background: var(--amber); border-color: var(--amber); }
.share-site.compact { padding: 30px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.share-site.compact h3 { margin-bottom: 13px; }
.share-ico.sm { width: 40px; height: 40px; }
.share-ico.sm svg { width: 18px; height: 18px; }

/* explora por tema (series) */
.serie-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 760px) { .serie-grid { grid-template-columns: 1fr; } }
.serie-card { display: block; padding: 28px 26px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(160deg, rgba(204,161,90,.06), rgba(0,0,0,0)); transition: .2s; text-decoration: none; text-align: center; }
.serie-card:hover { border-color: var(--amber); transform: translateY(-3px); box-shadow: 0 16px 40px rgba(0,0,0,.35); }
.serie-card h3 { font-family: 'Fraunces', Georgia, serif; font-size: 1.55rem; color: #ebe5d6; margin: 0 0 4px; }
.serie-card .serie-n { font-family: var(--ui, 'Inter', sans-serif); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--amber-bright, #ecc77f); }
.serie-card p { margin: 12px 0 16px; color: var(--muted, #9aa39b); font-size: .96rem; line-height: 1.5; }
.serie-card .more { font-family: var(--ui, 'Inter', sans-serif); font-size: .8rem; color: var(--amber-bright, #ecc77f); font-weight: 600; }
.serie-ico { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; border: 1px solid var(--line); border-radius: 11px; color: var(--amber-bright, #ecc77f); background: rgba(204,161,90,.05); transition: .2s; }
.serie-ico svg { width: 23px; height: 23px; display: block; }
.serie-card:hover .serie-ico { border-color: var(--amber); background: rgba(204,161,90,.12); transform: scale(1.05); }

/* fondo de página (Acerca / Expedientes) */
.page-hero { position: relative; background-color: var(--navy-900); background-size: cover; background-position: center right; background-repeat: no-repeat; }
.page-hero::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, var(--navy-900) 0%, rgba(8,11,17,.86) 42%, rgba(8,11,17,.55) 75%, rgba(8,11,17,.72) 100%); }
.page-hero > .wrap { position: relative; z-index: 1; }

/* botones de compartir */
.share { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; max-width: var(--measure); margin: 0 auto 38px; }
.share-label { font-family: var(--ui); font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.share-btn { font-family: var(--ui); font-size: .8rem; color: var(--ink-soft); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 7px 16px; cursor: pointer; transition: .2s; text-decoration: none; }
.share-btn:hover { border-color: var(--amber); color: var(--amber-bright); }

/* ---------- motion ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
/* tablet: 2 columnas */
@media (max-width: 980px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-aside { border-left: 0; border-top: 1px solid var(--line); padding: 22px 0 0; }
  .ethos .wrap { grid-template-columns: 1fr; }
}
/* móvil: menú hamburguesa desplegable */
@media (max-width: 760px) {
  .menu-toggle { display: block; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0;
    background: var(--navy-850); border-bottom: 1px solid var(--line-soft);
    max-height: 0; overflow: hidden; transition: max-height .32s ease;
  }
  .nav.open { max-height: 320px; }
  .nav a { padding: 16px 24px; border-bottom: 1px solid var(--line-soft); }
}
/* celular: una columna + tipografía un punto menor */
@media (max-width: 620px) {
  .cards { grid-template-columns: 1fr; }
  body { font-size: 18px; }
  .article-meta { gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-bg { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- textos justificados (preferencia del usuario) ---------- */
.prose > p,
.hero .dek,
.article-head .dek,
.card p,
.ethos .note,
.fuentes p {
  text-align: justify;
  text-justify: inter-word;
  -webkit-hyphens: auto;
  hyphens: auto;
}
