/* ============================================================
   NOTAS · CSS común para /notas/ y /notas/[slug]/
   Hereda variables y sistema visual de index.html.
   ============================================================ */

:root {
  --bg:        #f5f5f3;
  --bg-alt:    #ffffff;
  --bg-dark:   #111110;
  --ink:       #141414;
  --ink-soft:  #5a5a58;
  --ink-muted: #9a9a97;
  --line:      #e0e0dc;
  --white:     #f5f5f3;
  --font: 'Space Grotesk', sans-serif;
  --serif: 'Source Serif 4', 'Georgia', serif;
  --max-w: 1320px;
  --max-prose: 720px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
@media (min-width: 768px)  { .container { padding: 0 48px; } }
@media (min-width: 1200px) { .container { padding: 0 80px; } }

/* ============================================================
   NAV (mismo sistema que home, pero siempre con fondo claro)
   ============================================================ */
nav.notas-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 245, 243, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-logo img {
  height: 16px;
  width: auto;
  display: block;
}
.nav-links {
  display: none;
  list-style: none;
  gap: 36px;
  align-items: center;
}
@media (min-width: 900px) { .nav-links { display: flex; } }
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.2s;
  letter-spacing: 0.01em;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); }
.nav-cta {
  display: none;
  padding: 9px 20px;
  background: var(--ink);
  color: var(--white) !important;
  border-radius: 4px;
  font-weight: 600;
  font-size: 13px;
}
@media (min-width: 900px) { .nav-cta { display: block; } }
.nav-cta:hover { opacity: 0.85; }
.nav-burger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}
@media (min-width: 900px) { .nav-burger { display: none; } }
.nav-burger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
}
.nav-mobile {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg-dark);
  z-index: 99;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  font-size: 32px;
  font-weight: 600;
  color: var(--white);
  letter-spacing: -0.02em;
}
.nav-mobile-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: var(--white);
  font-size: 28px;
  cursor: pointer;
  padding: 8px;
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb {
  padding: 28px 0 0;
  font-size: 13px;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
}
.breadcrumb a {
  color: var(--ink-muted);
  transition: color 0.2s;
}
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb .sep { margin: 0 8px; color: var(--line); }
.breadcrumb .current { color: var(--ink-soft); }

/* ============================================================
   PILLAR HEADER (/notas/)
   ============================================================ */
.pillar-header {
  padding: 64px 0 48px;
}
.section-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 20px;
}
.pillar-title {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--ink);
  max-width: 920px;
}
.pillar-lead {
  font-size: 19px;
  color: var(--ink-soft);
  max-width: var(--max-prose);
  margin-top: 24px;
  line-height: 1.65;
}

.pillar-intro {
  padding: 0 0 96px;
  border-bottom: 1px solid var(--line);
}
.pillar-intro .container { max-width: 920px; }
.pillar-intro p {
  font-size: 17px;
  color: var(--ink-soft);
  line-height: 1.75;
  margin-bottom: 18px;
  max-width: var(--max-prose);
}
.pillar-intro p strong { color: var(--ink); font-weight: 600; }

/* ============================================================
   CLUSTERS GRID
   ============================================================ */
.clusters {
  padding: 96px 0 128px;
}
.clusters-header { margin-bottom: 56px; }
.clusters-title {
  font-size: clamp(26px, 3.5vw, 36px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.clusters-grid {
  display: grid;
  gap: 2px;
  grid-template-columns: 1fr;
}
@media (min-width: 600px) { .clusters-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .clusters-grid { grid-template-columns: 1fr 1fr 1fr; } }

.cluster-card {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  margin: -0.5px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  min-height: 220px;
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
}
.cluster-card:hover { background: var(--ink); }
.cluster-card:hover * { color: var(--white) !important; }
.cluster-card:hover .cluster-arrow { color: var(--white); }

.cluster-meta {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 14px;
}
.cluster-title {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 10px;
}
.cluster-desc {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.55;
  margin-bottom: auto;
}
.cluster-arrow {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  margin-top: 20px;
  letter-spacing: 0.02em;
}
.cluster-card.draft {
  cursor: default;
  opacity: 0.62;
}
.cluster-card.draft:hover { background: var(--bg-alt); }
.cluster-card.draft:hover * { color: inherit !important; }

/* ============================================================
   ARTICLE (página individual)
   ============================================================ */
.article-header {
  padding: 56px 0 40px;
}
.article-header .container { max-width: 820px; }
.article-meta {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 24px;
}
.article-meta .sep { margin: 0 10px; color: var(--line); }
.article-title {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.08;
  color: var(--ink);
}
.article-lead {
  font-size: 19px;
  color: var(--ink-soft);
  line-height: 1.6;
  margin-top: 28px;
  font-weight: 400;
}
.article-byline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-soft);
}
.article-byline strong { color: var(--ink); font-weight: 600; }
.article-byline .dot { color: var(--ink-muted); }

/* ============================================================
   PROSE (cuerpo del artículo)
   ============================================================ */
.prose {
  padding: 24px 0 96px;
}
.prose .container { max-width: 820px; }
.prose-body {
  max-width: var(--max-prose);
}
.prose-body > * { margin-bottom: 20px; }
.prose-body p {
  font-size: 18px;
  line-height: 1.72;
  color: var(--ink);
}
.prose-body p.summary {
  font-size: 18px;
  color: var(--ink-soft);
  border-left: 2px solid var(--ink);
  padding: 4px 0 4px 22px;
  margin: 0 0 32px;
  line-height: 1.65;
}
.prose-body h2 {
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 56px;
  margin-bottom: 12px;
  line-height: 1.2;
  color: var(--ink);
}
.prose-body h3 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: 36px;
  margin-bottom: 10px;
  color: var(--ink);
}
.prose-body strong { font-weight: 600; color: var(--ink); }
.prose-body em { font-style: italic; }
.prose-body a {
  color: var(--ink);
  border-bottom: 1px solid var(--ink-muted);
  transition: border-color 0.2s;
}
.prose-body a:hover { border-color: var(--ink); }

.prose-body ul, .prose-body ol {
  padding-left: 24px;
  font-size: 18px;
  line-height: 1.72;
}
.prose-body li { margin-bottom: 8px; }
.prose-body li::marker { color: var(--ink-muted); }

.prose-body blockquote {
  border-left: 3px solid var(--ink);
  padding: 8px 0 8px 24px;
  margin: 32px 0;
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.55;
  color: var(--ink);
  font-style: italic;
}
.prose-body blockquote cite {
  display: block;
  font-family: var(--font);
  font-style: normal;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 14px;
}

/* Callouts (TL;DR de 40-60 palabras tras cada H2, regla GEO 200/60) */
.callout {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-left: 3px solid var(--ink);
  padding: 20px 24px;
  margin: 12px 0 28px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-soft);
}
.callout-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 8px;
}

/* Tablas */
.prose-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  margin: 24px 0;
}
.prose-body th, .prose-body td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.prose-body th {
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1.5px solid var(--ink);
  letter-spacing: 0.02em;
}
.prose-body td { color: var(--ink-soft); }

/* Datos clave (stats inline) */
.stat-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  margin: 32px 0;
  border: 1px solid var(--line);
  background: var(--line);
}
@media (min-width: 600px) { .stat-strip { grid-template-columns: repeat(3, 1fr); } }
.stat-cell {
  background: var(--bg-alt);
  padding: 20px;
}
.stat-num {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
}
.stat-label {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 8px;
  line-height: 1.4;
}

/* ============================================================
   FUENTES / REFERENCIAS
   ============================================================ */
.sources {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  padding: 64px 0;
}
.sources .container { max-width: 820px; }
.sources-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 20px;
}
.sources-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: var(--max-prose);
}
.sources-list li {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.5;
  padding-left: 22px;
  position: relative;
}
.sources-list li::before {
  content: counter(list-item) ".";
  position: absolute;
  left: 0;
  color: var(--ink-muted);
  font-weight: 600;
}
.sources-list a {
  color: var(--ink);
  border-bottom: 1px solid var(--ink-muted);
}

/* ============================================================
   AUTORES (caja al pie)
   ============================================================ */
.authors {
  padding: 64px 0;
  background: var(--bg);
  border-top: 1px solid var(--line);
}
.authors .container { max-width: 820px; }
.authors-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 28px;
}
.authors-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) { .authors-grid { grid-template-columns: 1fr 1fr; } }
.author-card {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  padding: 28px;
}
.author-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}
.author-role {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 14px;
}
.author-bio {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* ============================================================
   CTA (cierre del artículo + listado)
   ============================================================ */
.cta {
  background: var(--bg-dark);
  padding: 80px 0;
}
.cta .container { max-width: 820px; text-align: center; }
.cta-title {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--white);
  margin-bottom: 16px;
}
.cta-sub {
  font-size: 16px;
  color: rgba(245,245,243,0.55);
  max-width: 540px;
  margin: 0 auto 32px;
  line-height: 1.6;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: var(--white);
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
  border-radius: 4px;
  transition: opacity 0.2s;
  font-family: var(--font);
}
.btn-primary:hover { opacity: 0.88; }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--bg-dark);
  padding: 64px 0 48px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 40px;
}
@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}
.footer-logo img {
  height: 20px;
  width: auto;
  display: block;
  margin-bottom: 10px;
}
.footer-tagline {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(245,245,243,0.3);
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links a {
  font-size: 14px;
  color: rgba(245,245,243,0.45);
  transition: color 0.2s;
  font-weight: 500;
}
.footer-links a:hover { color: var(--white); }
.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
@media (min-width: 600px) {
  .footer-bottom { flex-direction: row; justify-content: space-between; }
}
.footer-copy {
  font-size: 12px;
  color: rgba(245,245,243,0.25);
}
