/* ============================================================
   nelsongranja.com · blog.css
   Sección blog — índice + artículo. Hereda tokens de styles.css.
   ni pánico, ni euforia — método
   ============================================================ */

/* ---------- shared blog header band ---------- */
.blog-hero { padding-block: clamp(96px, 12vw, 150px) clamp(40px, 6vw, 72px); }
.blog-hero .lead { max-width: 56ch; }
.blog-hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.04; letter-spacing: -0.02em;
  margin: 14px 0 18px; max-width: 18ch;
}

/* ---------- tag filter bar ---------- */
.tag-filter {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-top: clamp(28px, 4vw, 44px);
}
.tag-chip {
  font-family: var(--body); font-weight: 600;
  font-size: 0.82rem; letter-spacing: 0.01em;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--cream-2);
  padding: 8px 15px; border-radius: var(--radius-pill);
  cursor: pointer; transition: all 0.18s var(--ease-smooth);
  white-space: nowrap;
}
.tag-chip:hover { border-color: var(--sage); color: var(--ink); }
.tag-chip.active {
  background: var(--navy-800); color: var(--cream);
  border-color: var(--navy-800);
}

/* ---------- post grid (index) ---------- */
.post-grid {
  display: grid; gap: clamp(22px, 3vw, 36px);
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  margin-top: clamp(32px, 4vw, 52px);
}
.post-card {
  display: flex; flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--cream-2);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s var(--ease-smooth);
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.post-card.is-hidden { display: none; }
.post-card a.card-link { display: flex; flex-direction: column; height: 100%; }
.post-card .card-media {
  aspect-ratio: 16 / 10; background: var(--navy-700);
  overflow: hidden;
}
.post-card .card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card .card-media.no-img {
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-600));
}
.post-card .card-media.no-img span {
  font-family: var(--display); font-weight: 700;
  color: var(--sage-300); font-size: 0.78rem;
  letter-spacing: var(--tracking-label); text-transform: uppercase;
}
.post-card .card-body { padding: 22px 22px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-card .card-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.post-card .card-tags .t {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--sage-700);
}
.post-card h2 {
  font-family: var(--display); font-weight: 600;
  font-size: 1.28rem; line-height: 1.16; letter-spacing: -0.015em;
  color: var(--ink); margin: 0;
}
.post-card .card-excerpt { font-size: 0.96rem; color: var(--ink-soft); line-height: 1.5; margin: 0; }
.post-card time { font-size: 0.8rem; color: var(--ink-mute); margin-top: auto; padding-top: 6px; }

.empty-note { margin-top: 40px; color: var(--ink-mute); font-size: 1rem; }

/* ============================================================
   ARTICLE PAGE
   ============================================================ */
.article-head { padding-block: clamp(92px, 11vw, 140px) clamp(22px, 3vw, 38px); }
.breadcrumb {
  font-size: 0.82rem; color: var(--ink-mute);
  display: flex; flex-wrap: wrap; gap: 7px; align-items: center;
  margin-bottom: 22px;
}
.breadcrumb a { color: var(--ink-mute); transition: color 0.2s; }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb .sep { opacity: 0.5; }
.article-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  font-size: 0.85rem; color: var(--ink-mute); margin-bottom: 16px;
}
.article-meta .dot-sep { width: 4px; height: 4px; border-radius: 50%; background: var(--sage); }
.article-head h1 {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(2rem, 5vw, 3.3rem); line-height: 1.05;
  letter-spacing: -0.022em; color: var(--ink);
  max-width: 20ch; margin: 0 0 18px;
}
.article-head .standfirst {
  font-size: var(--t-lead); line-height: 1.4; color: var(--ink-soft);
  max-width: 60ch; margin: 0;
}

.article-figure { margin: 0; }
.article-figure .wrap { padding-block: clamp(8px, 2vw, 24px); }
.article-figure img {
  width: 100%; max-width: 100%; height: auto; display: block;
  border-radius: var(--radius); border: 1px solid var(--cream-2);
}

/* readable prose column */
.prose { max-width: 68ch; margin-inline: auto; }
.prose > * + * { margin-top: 1.25em; }
.prose p { font-size: 1.16rem; line-height: 1.7; color: var(--ink); }
.prose strong { color: var(--ink); font-weight: 700; }
.prose em { font-style: italic; }
.prose a { color: var(--sage-700); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--coral); }
.prose h2 {
  font-family: var(--display); font-weight: 600;
  font-size: 1.7rem; line-height: 1.18; letter-spacing: -0.018em;
  color: var(--ink); margin-top: 1.8em;
}
.prose h3 { font-family: var(--display); font-weight: 600; font-size: 1.32rem; color: var(--ink); margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { font-size: 1.16rem; line-height: 1.65; color: var(--ink); margin-top: 0.5em; }
.prose ul li { list-style: none; position: relative; }
.prose ul li::before {
  content: ""; position: absolute; left: -1.1em; top: 0.62em;
  width: 7px; height: 7px; background: var(--coral); border-radius: 50%;
}
.prose blockquote {
  border-left: 3px solid var(--sage); padding-left: 22px;
  font-family: var(--display); font-weight: 500; font-size: 1.4rem;
  line-height: 1.3; color: var(--ink); font-style: normal;
}

/* tag list at article foot */
.article-tags { max-width: 68ch; margin: clamp(40px,5vw,64px) auto 0; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.article-tags .lbl { font-size: 0.78rem; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--ink-mute); }
.article-tags a {
  font-size: 0.82rem; font-weight: 600; color: var(--sage-700);
  background: var(--paper); border: 1px solid var(--cream-2);
  padding: 6px 13px; border-radius: var(--radius-pill); transition: all 0.18s;
}
.article-tags a:hover { border-color: var(--sage); color: var(--ink); }

/* article CTA (navy) */
.article-cta { text-align: center; }
.article-cta h2 { font-family: var(--display); font-weight: 600; font-size: clamp(1.6rem,3.2vw,2.3rem); line-height: 1.12; color: var(--cream); max-width: 24ch; margin: 0 auto 14px; }
.article-cta h2 em { color: var(--sage-300); font-style: italic; }
.article-cta p { color: var(--mist); margin: 0 auto 26px; max-width: 50ch; }

/* related posts */
.related { }
.related .related-h { font-size: 0.78rem; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--sage-700); margin-bottom: 22px; }

@media (max-width: 560px) {
  .post-grid { grid-template-columns: 1fr; }
  .prose p, .prose li { font-size: 1.08rem; }
}
