/* ==========================================================================
   RUT — TINTA Y SOL · blog-single.css
   Plantilla de artículo individual del blog (single post).
   Requiere tokens.css + base.css + blog.css (reutiliza .card-ed para
   "Sigue leyendo"). Solo estilos propios de esta plantilla.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Cabecera del artículo
   -------------------------------------------------------------------------- */
.post-hero {
  padding-top: calc(var(--header-h) + clamp(36px, 7vh, 80px));
  padding-bottom: clamp(24px, 4vh, 40px);
}
.post-hero__meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px clamp(14px, 2.5vw, 28px);
}
.post-hero__title {
  font-size: var(--step-5);
  margin-top: 16px;
  max-width: 20ch;
}
.post-hero__lead {
  margin-top: clamp(16px, 3vh, 28px);
  max-width: var(--measure);
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--gray-text);
}

/* --------------------------------------------------------------------------
   2. Portada a sangre (imagen destacada, ratio 16:9, arco decorativo)
   -------------------------------------------------------------------------- */
.post-cover { margin: 0 0 clamp(28px, 5vh, 52px); }
.post-cover__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-s);
}
.post-cover__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post-cover__frame .arco {
  position: absolute;
  top: 16px;
  right: 16px;
  width: clamp(48px, 6vw, 72px);
  height: clamp(48px, 6vw, 72px);
  color: var(--white);
  z-index: 1;
}
.post-cover figcaption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: var(--tracking-mono);
  color: var(--gray-text);
}

/* --------------------------------------------------------------------------
   3. Layout del artículo: aside compartir (cols 1–3) + texto (cols 4–11)
   -------------------------------------------------------------------------- */
.post-layout {
  display: grid;
  grid-template-columns: repeat(var(--grid-cols), minmax(0, 1fr));
  column-gap: var(--gutter);
  padding-block: 0 var(--space-section);
}
.post-aside { grid-column: 1 / span 3; }
.post-aside__sticky { position: sticky; top: calc(var(--header-h-compact) + 28px); }
.post-share__label {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--gray-text);
  padding-bottom: 10px;
  border-bottom: var(--rule-ink);
}
.post-share__row { display: flex; gap: 14px; margin-top: 16px; }
.post-share__row a {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  transition: background var(--dur-fast) var(--ease-editorial), color var(--dur-fast) var(--ease-editorial);
}
.post-share__row a svg { width: 16px; height: 16px; fill: currentColor; }
.post-share__row a:hover, .post-share__row a:focus-visible { background: var(--ink); color: var(--white); }
.post-aside__back {
  display: inline-block;
  margin-top: clamp(24px, 4vh, 40px);
  font-weight: 600;
}

.post-article {
  grid-column: 4 / 12;
  max-width: var(--measure);
  font-size: var(--step-0);
}
.post-article p { margin-bottom: 1.1em; }
.post-article p:last-child { margin-bottom: 0; }
.post-article h2 {
  font-size: var(--step-2);
  margin: 1.8em 0 0.65em;
  scroll-margin-top: calc(var(--header-h-compact) + 24px);
}
.post-article h2:first-child { margin-top: 0; }

@media (max-width: 919px) {
  .post-layout { display: block; }
  .post-aside {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-block);
    padding-bottom: var(--space-cluster);
    border-bottom: var(--rule-ink);
  }
  .post-aside__sticky { position: static; display: flex; align-items: center; gap: 24px; }
  .post-share__label { border-bottom: none; padding-bottom: 0; }
  .post-aside__back { margin-top: 0; }
}

/* Cita destacada dentro del cuerpo del artículo */
.post-pullquote {
  margin: clamp(28px, 4vh, 44px) 0;
  padding-left: clamp(20px, 2.4vw, 32px);
  border-left: 4px solid var(--sol);
}
.post-pullquote p {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-style: italic;
  font-weight: 500;
  font-size: var(--step-2);
  line-height: 1.3;
  letter-spacing: var(--tracking-display);
  color: var(--ink);
  text-wrap: balance;
  margin: 0;
}

/* Imagen intercalada en el cuerpo */
.post-inline-figure { margin: clamp(28px, 4vh, 44px) 0; }
.post-inline-figure figcaption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: var(--tracking-mono);
  color: var(--gray-text);
}
