/* =========================================================================
   Funneld — Blog / Recursos (índice + artículos)
   Reutiliza variables de styles.css y tipografía de cuerpo de legal.css
   ========================================================================= */

/* ---------------- INDEX ---------------- */
.blog-hero {
  padding: clamp(48px, 6vw, 92px) 0 clamp(28px, 4vw, 48px);
  border-bottom: 1px solid var(--line-2);
}
.blog-hero__crumb {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
  display: flex; gap: 8px; align-items: center; margin-bottom: 22px;
}
.blog-hero__crumb a { color: var(--muted); }
.blog-hero__crumb a:hover { color: var(--ink); }
.blog-hero__crumb .sep { opacity: .5; }
.blog-hero h1 {
  font-size: clamp(40px, 6vw, 84px); font-weight: 460; letter-spacing: -0.038em;
  line-height: .98; max-width: 16ch;
}
.blog-hero h1 em { font-family: var(--serif); font-style: italic; font-weight: 400; }
.blog-hero p { margin-top: 22px; color: var(--muted); font-size: clamp(16px, 1.5vw, 19px); max-width: 60ch; line-height: 1.5; }

.blog-filters {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 24px 0 0;
}
.blog-filter {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.04em;
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink-2);
  background: var(--card); cursor: pointer; transition: all var(--t-fast);
}
.blog-filter:hover { border-color: var(--ink); }
.blog-filter.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.blog-section { padding: clamp(40px, 5vw, 72px) 0; }
.blog-section__label {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 22px;
  display: flex; gap: 12px; align-items: center;
}
.blog-section__label::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }

.postgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 920px) { .postgrid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .postgrid { grid-template-columns: 1fr; } }

.post {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--card); border: 1px solid var(--line-2);
  border-radius: var(--r-lg); padding: 26px 24px;
  transition: border-color var(--t-base), transform var(--t-base), background var(--t-base);
  min-height: 256px;
}
.post:hover { border-color: var(--ink); transform: translateY(-2px); background: #fff; }
.post__cat { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.post__t { font-size: 21px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.18; }
.post__d { font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.post__meta { margin-top: auto; display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 11px; color: var(--muted-2); letter-spacing: 0.02em; }
.post__meta .arr { margin-left: auto; color: var(--accent); transition: transform var(--t-base); }
.post:hover .post__meta .arr { transform: translateX(4px); }

/* Featured post (first row, spans wide) */
.post--feat { grid-column: 1 / -1; flex-direction: row; align-items: stretch; gap: 32px; min-height: 0; }
@media (max-width: 720px) { .post--feat { flex-direction: column; gap: 12px; } }
.post--feat .post__body { display: flex; flex-direction: column; gap: 14px; flex: 1; }
.post--feat .post__t { font-size: clamp(26px, 3vw, 40px); font-weight: 470; letter-spacing: -0.028em; line-height: 1.05; max-width: 20ch; }
.post--feat .post__d { font-size: 15px; max-width: 56ch; }
.post--feat .post__side {
  flex: 0 0 220px; border-left: 1px solid var(--line-2); padding-left: 28px;
  display: flex; flex-direction: column; justify-content: center; gap: 10px;
}
@media (max-width: 720px) { .post--feat .post__side { border-left: none; border-top: 1px solid var(--line-2); padding-left: 0; padding-top: 18px; flex-basis: auto; } }
.post--feat .post__side .big { font-size: 40px; font-weight: 470; letter-spacing: -0.03em; line-height: 1; }
.post--feat .post__side .lbl { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: 0.04em; }

.is-hidden { display: none !important; }

/* ---------------- ARTICLE ---------------- */
.article { padding: clamp(40px, 5vw, 72px) 0 clamp(56px, 7vw, 110px); }
.article__crumb {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 24px;
}
.article__crumb a { color: var(--muted); }
.article__crumb a:hover { color: var(--ink); }
.article__crumb .sep { opacity: .5; }
.article__crumb .current { color: var(--ink); }

.article__head { max-width: 78ch; margin-bottom: clamp(32px, 4vw, 52px); padding-bottom: clamp(24px, 3vw, 40px); border-bottom: 1px solid var(--line-2); }
.article__cat { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.article__title {
  font-size: clamp(34px, 4.6vw, 64px); font-weight: 460; letter-spacing: -0.034em;
  line-height: 1.02; margin: 16px 0 18px; text-wrap: balance;
}
.article__title em { font-family: var(--serif); font-style: italic; font-weight: 400; }
.article__standfirst { font-size: clamp(17px, 1.7vw, 21px); color: var(--ink-2); line-height: 1.5; max-width: 64ch; }
.article__byline {
  margin-top: 24px; display: flex; gap: 18px; flex-wrap: wrap; align-items: center;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.03em; color: var(--muted);
}
.article__byline .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--line); }
.article__byline strong { color: var(--ink); font-weight: 500; }

.article__layout {
  display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(36px, 5vw, 80px); align-items: start;
}
@media (max-width: 980px) { .article__layout { grid-template-columns: 1fr; } }

.article__toc { position: sticky; top: 88px; align-self: start; padding: 22px; background: var(--card); border: 1px solid var(--line-2); border-radius: var(--r); }
@media (max-width: 980px) { .article__toc { position: static; } }
.article__toc h4, .article__toc .toc__h { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.article__toc ol { list-style: none; padding: 0; margin: 0; counter-reset: toc; display: flex; flex-direction: column; gap: 8px; }
.article__toc li { counter-increment: toc; }
.article__toc a { display: flex; gap: 10px; align-items: baseline; font-size: 13.5px; line-height: 1.4; color: var(--muted); padding: 4px 0; }
.article__toc a::before { content: counter(toc, decimal-leading-zero); font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.04em; color: var(--accent); min-width: 22px; }
.article__toc a:hover { color: var(--ink); }

/* Article body reuses legal body type tokens but defined here for portability */
.article__body { max-width: 72ch; min-width: 0; }
.article__body section { margin-bottom: clamp(36px, 4vw, 56px); scroll-margin-top: 92px; }
.article__body h2 { font-size: clamp(24px, 2.6vw, 34px); line-height: 1.12; letter-spacing: -0.02em; font-weight: 500; margin: 0 0 16px; display: flex; gap: 14px; align-items: baseline; }
.article__body h2 .n { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: var(--accent); font-weight: 500; }
.article__body h3 { font-size: 18px; font-weight: 540; margin: 26px 0 10px; letter-spacing: -0.01em; }
.article__body p { margin: 0 0 14px; color: var(--ink); line-height: 1.7; font-size: 16.5px; }
.article__body ul, .article__body ol { margin: 0 0 16px 0; padding-left: 22px; color: var(--ink); }
.article__body li { line-height: 1.65; margin-bottom: 8px; font-size: 16px; }
.article__body li strong { color: var(--ink); font-weight: 540; }
.article__body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.article__body a:hover { color: var(--ink); }
.article__body strong { font-weight: 540; }

.article__body .lede { font-size: 18px; color: var(--ink-2); line-height: 1.6; }
.article__body .callout {
  margin: 22px 0; padding: 20px 24px; background: var(--card);
  border: 1px solid var(--line-2); border-left: 3px solid var(--accent); border-radius: var(--r);
  font-size: 15px; color: var(--ink-2); line-height: 1.6;
}
.article__body .callout strong { color: var(--ink); }
.article__body blockquote {
  margin: 26px 0; padding: 6px 0 6px 24px; border-left: 3px solid var(--accent);
  font-family: var(--serif); font-style: italic; font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.3; color: var(--ink); letter-spacing: -0.01em;
}

.article__body .data-table { width: 100%; border-collapse: collapse; margin: 18px 0 22px; font-size: 14.5px; }
.article__body .data-table th, .article__body .data-table td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line-2); vertical-align: top; line-height: 1.45; }
.article__body .data-table thead th { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 500; background: var(--card); }
.article__body .data-table tbody th { font-weight: 540; color: var(--ink); }
.article__body .data-table .yes { color: var(--good); font-weight: 540; }
.article__body .data-table .no { color: var(--muted-2); }
.article__body .data-table .accent-col { background: rgba(168,67,31,.05); }
.article__body .data-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.article__tags { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 8px; }
.article__tags span { font-family: var(--mono); font-size: 11px; letter-spacing: 0.03em; color: var(--muted); padding: 5px 11px; border: 1px solid var(--line-2); border-radius: 999px; }

.article__cta {
  margin-top: clamp(40px, 5vw, 64px); padding: clamp(28px, 4vw, 44px);
  border-radius: var(--r-lg); background: var(--ink); color: var(--paper);
}
.article__cta h3 { color: var(--paper); margin: 0 0 10px; font-size: clamp(22px, 2.4vw, 30px); font-weight: 480; letter-spacing: -0.02em; }
.article__cta h3 em { font-family: var(--serif); font-style: italic; font-weight: 400; }
.article__cta p { color: rgba(236,230,215,.72); margin: 0 0 20px; font-size: 15px; line-height: 1.6; max-width: 60ch; }
.article__cta .btn-row { gap: 10px; }

.article__related { margin-top: clamp(48px, 6vw, 80px); }
.article__related h4 { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.article__related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 760px) { .article__related-grid { grid-template-columns: 1fr; } }
.article__related a { display: flex; flex-direction: column; gap: 8px; padding: 20px; background: var(--card); border: 1px solid var(--line-2); border-radius: var(--r); transition: border-color var(--t-fast); min-height: 120px; }
.article__related a:hover { border-color: var(--ink); }
.article__related .rc { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.article__related .rt { font-size: 15px; font-weight: 500; line-height: 1.3; letter-spacing: -0.012em; color: var(--ink); }

/* ---------------- EDITORIAL IMAGERY / FIGURES ---------------- */
/* Article hero illustration (data-art SVG banner) */
.article__hero-fig {
  margin: 0 0 clamp(28px, 4vw, 44px);
  border: 1px solid var(--line-2); border-radius: var(--r-lg);
  overflow: hidden; background: var(--card);
  box-shadow: 0 30px 70px -42px rgba(20,15,5,.22);
}
.article__hero-fig svg, .article__hero-fig img { display: block; width: 100%; height: auto; }

/* Index post thumbnail strip */
.post__thumb { margin: -6px -4px 4px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line-2); background: var(--canvas); }
.post__thumb svg, .post__thumb img { display: block; width: 100%; height: auto; }
.post--feat .post__thumb { flex: 0 0 300px; margin: 0; align-self: stretch; display: flex; }
@media (max-width: 720px) { .post--feat .post__thumb { flex-basis: auto; width: 100%; } }
.post--feat .post__thumb svg, .post--feat .post__thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Inline figure */
.fig { margin: 26px 0; }
.fig__frame { border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; background: var(--card); }
.fig__frame svg, .fig__frame img { display: block; width: 100%; height: auto; }
.fig figcaption { margin-top: 10px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.02em; color: var(--muted); line-height: 1.5; display: flex; gap: 8px; }
.fig figcaption::before { content: "Fig."; color: var(--accent); font-weight: 500; flex-shrink: 0; }

/* Key takeaways box */
.takeaways {
  margin: 0 0 clamp(28px, 4vw, 40px); padding: 24px 26px;
  background: var(--canvas); border: 1px solid var(--line-2);
  border-left: 3px solid var(--accent); border-radius: var(--r);
}
.takeaways h2 { font-size: 13px !important; font-family: var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 500 !important; margin: 0 0 14px !important; display: block !important; }
.takeaways ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.takeaways li { position: relative; padding-left: 26px; font-size: 15.5px; line-height: 1.5; color: var(--ink); }
.takeaways li::before { content: "→"; position: absolute; left: 0; top: 0; color: var(--accent); font-family: var(--mono); }

/* Stat band */
.statband { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line-2); border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; margin: 24px 0; }
@media (max-width: 620px) { .statband { grid-template-columns: 1fr 1fr; } }
.statband > div { background: var(--card); padding: 22px 20px; }
.statband .n { font-size: clamp(26px, 3vw, 38px); font-weight: 470; letter-spacing: -0.03em; line-height: 1; color: var(--accent); }
.statband .l { font-size: 12px; color: var(--muted); margin-top: 8px; line-height: 1.4; }
