/* =========================================================================
   Remote Revenue — Blog
   Hereda tokens de styles.css (:root). No define paleta ni tipografia propia.
   ========================================================================= */

/* ---------- Migas de pan ---------- */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 0.86rem; color: var(--ink-mute); }
.crumbs a { color: var(--ink-soft); font-weight: 600; }
.crumbs a:hover { color: var(--olive); }
.crumbs span[aria-hidden] { color: var(--ink-mute); }
.crumbs .crumbs__current { color: var(--ink-mute); }

/* ---------- Cabecera de listado /blog ---------- */
.blog-hero { padding-top: clamp(130px, 18vw, 190px); padding-bottom: clamp(40px, 6vw, 64px); }
.blog-hero h1 { margin-top: 18px; max-width: 18ch; }
.blog-hero .lead { margin-top: 18px; max-width: 58ch; }

.blog-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; margin-top: clamp(28px, 4vw, 48px); }
.blog-card {
  display: flex; flex-direction: column; background: var(--card);
  border-radius: var(--r-soft); overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--line-soft);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.blog-card:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-amb); }
.blog-card__img { aspect-ratio: 1200 / 630; width: 100%; object-fit: cover; background: var(--paper-3); }
.blog-card__body { padding: clamp(20px, 2.4vw, 28px); display: flex; flex-direction: column; gap: 10px; flex: 1; }
.blog-card__tag { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--clay); }
.blog-card__title { font-family: var(--font-display); font-size: clamp(1.12rem, 1.6vw, 1.3rem); font-weight: 560; line-height: 1.28; letter-spacing: -0.01em; }
.blog-card__excerpt { color: var(--ink-soft); font-size: 0.92rem; line-height: 1.55; flex: 1; }
.blog-card__meta { font-size: 0.8rem; color: var(--ink-mute); margin-top: auto; }

/* ---------- Cabecera de artículo ---------- */
.article-hero { padding-top: clamp(120px, 16vw, 176px); padding-bottom: clamp(20px, 3vw, 32px); }
.article-hero__eyebrow { margin-top: 22px; }
.article-hero h1 { margin-top: 14px; max-width: 22ch; }
.article-meta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 20px; color: var(--ink-mute); font-size: 0.88rem; }
.article-meta span { display: inline-flex; align-items: center; gap: 6px; }
.article-meta svg { width: 15px; height: 15px; }

.article-cover { margin: clamp(28px, 4vw, 44px) 0; border-radius: var(--r-soft); overflow: hidden; box-shadow: var(--shadow-amb); }
.article-cover img { width: 100%; height: auto; display: block; }

/* ---------- Cuerpo del artículo (prosa) ---------- */
.article-layout { display: grid; grid-template-columns: minmax(0, 68ch) 1fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
.prose { max-width: 68ch; font-size: 1.06rem; }
.prose > * + * { margin-top: 1.35em; }
.prose h2 { font-family: var(--font-display); font-size: clamp(1.4rem, 2.4vw, 1.85rem); font-weight: 560; letter-spacing: -0.015em; line-height: 1.22; margin-top: 1.9em; }
.prose h3 { font-family: var(--font-display); font-size: clamp(1.15rem, 1.8vw, 1.35rem); font-weight: 560; letter-spacing: -0.01em; line-height: 1.28; margin-top: 1.6em; }
.prose p { color: var(--ink-soft); line-height: 1.72; }
.prose strong { color: var(--ink); font-weight: 650; }
.prose a { color: var(--olive); font-weight: 650; text-underline-offset: 3px; text-decoration: underline; text-decoration-color: var(--line); }
.prose a:hover { text-decoration-color: currentColor; }
.prose ul, .prose ol { padding-left: 1.3em; color: var(--ink-soft); }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 0.5em; }
.prose blockquote {
  border-left: 3px solid var(--olive);
  padding: 0.2em 0 0.2em 1.2em;
  font-family: var(--font-display); font-style: italic; font-weight: 380;
  font-size: 1.2rem; color: var(--ink);
}
.prose .note {
  background: var(--paper-2); border-radius: var(--r-card); padding: 16px 18px;
  font-size: 0.92rem; color: var(--ink-mute);
}

/* ---------- TOC lateral (desktop) ---------- */
.article-toc { position: sticky; top: 120px; display: none; }
.article-toc h4 { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 12px; }
.article-toc a { display: block; padding: 6px 0; font-size: 0.9rem; color: var(--ink-soft); border-left: 2px solid var(--line); padding-left: 14px; }
.article-toc a:hover { color: var(--olive); border-color: var(--olive); }

/* ---------- CTA final del artículo ---------- */
.article-cta {
  margin-top: clamp(48px, 6vw, 72px); background: var(--ink); color: var(--paper);
  border-radius: var(--r-soft); padding: clamp(32px, 4vw, 52px); position: relative; overflow: hidden;
}
.article-cta::after { content: ""; position: absolute; right: -40px; top: -40px; width: 220px; height: 220px; border-radius: 50%; background: var(--mesh); opacity: 0.18; filter: blur(8px); }
.article-cta__head { position: relative; max-width: 52ch; }
.article-cta h3 { font-family: var(--font-display); font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-weight: 560; letter-spacing: -0.015em; }
.article-cta p { margin-top: 10px; color: rgba(251,248,242,0.72); }
.article-cta .btn { margin-top: 22px; position: relative; }
.article-cta .btn--primary { background: var(--amber); color: var(--ink); }
.article-cta .btn--primary:hover { background: var(--paper); }

/* ---------- Artículos relacionados ---------- */
.related { margin-top: clamp(48px, 6vw, 72px); }
.related h3 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 560; }
.related__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 20px; }

@media (min-width: 960px) {
  .article-toc { display: block; }
}

@media (max-width: 720px) {
  .blog-grid { grid-template-columns: 1fr; }
  .related__grid { grid-template-columns: 1fr; }
  .article-layout { grid-template-columns: 1fr; }
}
