/* =====================================================================
   Visible · somosvisible.es — estilos del blog
   Se cargan después de styles.css (que aporta tipografía, colores, franja,
   pie, píldoras, botones y puntero). Orden: base · barra de lectura ·
   portada del blog · tarjetas · artículo · llamada final · tablet y móvil.
   ===================================================================== */

/* ---- Base: el blog es claro; la franja va en tono claro y el logo ya está en su sitio ---- */
body.blog-page { background: var(--white); color: var(--black); }
.blog-page .site-header .header-logo { opacity: 1; }
.blog-page .site-header .header-inner { animation: none; }
.blog-page :focus-visible { outline-color: var(--black); }
.blog-page .site-footer :focus-visible { outline-color: var(--white); }

/* ---- Barra de lectura bajo la franja (solo en los artículos) ---- */
.read-progress {
  position: fixed; left: 0; right: 0;
  top: var(--strip-h, 69px);
  height: 2px;
  z-index: 101;                 /* por encima del fundido de la franja, siempre nítida */
  background: var(--black);
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}
@supports (animation-timeline: view()) {
  html { timeline-scope: --post; }
  .post-body { view-timeline: --post block; }
  .read-progress { animation: read-progress linear both; animation-timeline: --post; animation-range: contain 0% contain 100%; }
  @keyframes read-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

/* ---- Portada del blog ---- */
.blog-main { padding-top: calc(var(--strip-h, 69px) + 88px); padding-bottom: 130px; }
.blog-hero, .blog-list-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--gl); padding-right: var(--gr);
}
.blog-hero .about-label { margin-bottom: 28px; }
.blog-title {
  font-size: 104px; font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.06em;
  text-transform: uppercase;
  margin-bottom: 40px;
}
.blog-intro {
  font-size: 40px; font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.045em;
  max-width: 900px;
  color: var(--black);
  text-wrap: balance;
}
.blog-intro em { font-style: normal; color: var(--grey); }
.blog-list-wrap { margin-top: 80px; }
.blog-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; list-style: none; margin-inline: -28px; }   /* el texto de las tarjetas queda alineado con la página */

/* ---- Tarjetas de artículo: solo texto y una línea fina en reposo; al pasar se rellenan de negro y se redondean ---- */
.post-card {
  --ease-out: cubic-bezier(0.2, 0.7, 0.1, 1);
  position: relative;
  display: flex; flex-direction: column;
  min-height: 320px;
  padding: 28px 28px 30px;
  background: transparent;
  border-radius: 10px;
  color: var(--black);
  transition: background 0.35s ease, color 0.35s ease,
              border-radius 0.5s var(--ease-out), translate 0.5s var(--ease-out);
}
.post-card::before {
  content: '';
  position: absolute; left: 28px; right: 28px; top: 0;
  height: 0.5px;
  background: var(--line-light);
  transition: opacity 0.3s ease;
}
.post-card--featured { grid-column: 1 / -1; min-height: 360px; }
.post-card-top { display: flex; align-items: center; gap: 12px; }
.post-card .pill { border-color: currentColor; color: inherit; }
.post-card-date { font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--grey); transition: color 0.35s ease; }
.post-card-title {
  margin-top: 56px;
  max-width: 760px;
  font-size: 34px; font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.post-card--featured .post-card-title { font-size: 56px; max-width: 980px; }
.post-card-link { color: inherit; }
.post-card-link::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }   /* toda la tarjeta es el enlace */
.post-card-excerpt { margin-top: 16px; max-width: 600px; font-size: 15px; line-height: 1.5; color: #555555; transition: color 0.35s ease; }
.post-card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: auto; padding-top: 32px;
  font-size: 12px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase;
}
.post-card-foot .arr { display: inline-block; margin-left: 6px; transition: transform 0.45s var(--ease-out); }
.post-card-time { color: var(--grey); transition: color 0.35s ease; }
.post-card:hover, .post-card:focus-within {
  background: rgba(7, 7, 7, 0.92);
  color: var(--white);
  border-radius: 26px;
  translate: 0 -4px;
}
.post-card:hover::before, .post-card:focus-within::before { opacity: 0; }
.post-card:hover .post-card-excerpt, .post-card:focus-within .post-card-excerpt { color: rgba(255, 255, 255, 0.72); }
.post-card:hover .post-card-date, .post-card:hover .post-card-time,
.post-card:focus-within .post-card-date, .post-card:focus-within .post-card-time { color: rgba(255, 255, 255, 0.6); }
.post-card:hover .arr { transform: translateX(5px); }
.post-card .post-card-link:focus-visible { outline: none; }

/* ---- Artículo ---- */
.post-main { padding-top: calc(var(--strip-h, 69px) + 72px); }
.post-head, .post-layout, .post-cta, .post-related {
  max-width: var(--max-width);
  margin-left: auto; margin-right: auto;
  padding-left: var(--gl); padding-right: var(--gr);
}
.post-crumbs {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 36px;
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey);
}
.post-crumbs a { color: var(--black); transition: color 0.2s ease; }
.post-crumbs a:hover { color: var(--grey); }
.post-title {
  max-width: 1100px;
  font-size: 76px; font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.055em;
  text-wrap: balance;
}
.post-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  margin-top: 34px;
  font-size: 12px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--grey);
}
.post-meta .pill { border-color: var(--black); color: var(--black); }
.post-lead {
  max-width: 880px;
  margin-top: 48px;
  font-size: 27px; font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.03em;
  color: #2B2B2B;
}
.post-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 680px);
  gap: 96px;
  margin-top: 80px;
}
.post-toc { position: sticky; top: calc(var(--strip-h, 69px) + 36px); align-self: start; }
.post-toc .about-label { margin-bottom: 18px; }
.post-toc ol { list-style: none; border-top: 0.5px solid var(--line-light); }
.post-toc a {
  display: block;
  padding: 11px 0;
  border-bottom: 0.5px solid var(--line-light);
  font-size: 13px; line-height: 1.35;
  color: var(--grey);
  transition: color 0.25s ease;
}
.post-toc a > span { display: inline-block; transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.1, 1); }
.post-toc a:hover, .post-toc a.active { color: var(--black); }
.post-toc a:hover > span, .post-toc a.active > span { transform: translateX(6px); }

.post-body { font-size: 18px; line-height: 1.65; color: #262626; }
.post-body > * + * { margin-top: 1.1em; }
.post-body h2 {
  margin-top: 2.3em;
  font-size: 32px; font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: var(--black);
  scroll-margin-top: calc(var(--strip-h, 69px) + 28px);
}
.post-body h2:first-child { margin-top: 0; }
.post-body h3 {
  margin-top: 1.7em;
  font-size: 21px; font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--black);
}
.post-body h3 + p { margin-top: 0.5em; }
.post-body ul, .post-body ol { list-style: none; }
.post-body li { position: relative; padding-left: 32px; }
.post-body li + li { margin-top: 0.6em; }
.post-body ul > li::before {
  content: '';
  position: absolute; left: 6px; top: 0.62em;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--black);
}
.post-body ol { counter-reset: paso; }
.post-body ol > li { counter-increment: paso; }
.post-body ol > li::before {
  content: counter(paso, decimal-leading-zero);
  position: absolute; left: 0; top: 0.42em;
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  color: var(--grey);
}
.post-body a { text-decoration: underline; text-underline-offset: 3px; }

.post-key {
  margin-top: 2.6em;
  padding-top: 22px;
  border-top: 1px solid var(--black);
}
.post-key .about-label { margin-bottom: 16px; }
.post-key ul { list-style: none; }
.post-key li { font-size: 17px; line-height: 1.5; }
.post-closing { margin-top: 2em; font-size: 20px; line-height: 1.45; letter-spacing: -0.015em; color: var(--black); }

/* ---- Llamada final ---- */
.post-cta { margin-top: 110px; }
.post-cta-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 40px;
  padding: 60px 60px 64px;
  background: var(--black);
  color: var(--white);
  border-radius: 26px;
}
.post-cta-box h2 {
  max-width: 760px;
  font-size: 52px; font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.05em;
}
.post-cta-box h2 em { font-style: normal; color: var(--grey); }
.post-cta-box p { max-width: 560px; margin-top: 20px; font-size: 16px; line-height: 1.5; color: rgba(255, 255, 255, 0.7); }
.post-cta-box .btn-cta { height: 46px; padding: 0 26px; }

.post-related { margin-top: 110px; padding-bottom: 130px; }
.post-related .about-label { margin-bottom: 28px; }

/* ---- Tablet ---- */
@media (max-width: 1023px) {
  .blog-title { font-size: 72px; }
  .blog-intro { font-size: 32px; }
  .post-card--featured .post-card-title { font-size: 44px; }
  .post-card-title { font-size: 30px; }
  .post-title { font-size: 54px; }
  .post-lead { font-size: 23px; }
  .post-layout { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 56px; }
  .post-toc { display: none; }
  .post-body { max-width: 680px; }
  .post-cta-box { grid-template-columns: minmax(0, 1fr); padding: 48px 40px 52px; }
  .post-cta-box h2 { font-size: 42px; }
}

/* ---- Móvil ---- */
@media (max-width: 767px) {
  .blog-main { padding-top: calc(var(--strip-h, 62px) + 48px); padding-bottom: 90px; }
  .blog-title { font-size: 48px; margin-bottom: 28px; }
  .blog-intro { font-size: 24px; letter-spacing: -0.04em; }
  .blog-list-wrap { margin-top: 48px; }
  .blog-list { grid-template-columns: minmax(0, 1fr); gap: 4px; margin-inline: -20px; }
  .post-card, .post-card--featured { min-height: 0; padding: 22px 20px 24px; }
  .post-card::before { left: 20px; right: 20px; }
  .post-card-title, .post-card--featured .post-card-title { margin-top: 36px; font-size: 27px; }
  .post-card-excerpt { font-size: 14px; }
  .post-card:hover, .post-card:focus-within { translate: none; }

  .post-main { padding-top: calc(var(--strip-h, 62px) + 40px); }
  .post-crumbs { margin-bottom: 24px; font-size: 11px; }
  .post-title { font-size: 36px; letter-spacing: -0.05em; }
  .post-meta { margin-top: 24px; font-size: 11px; }
  .post-lead { margin-top: 32px; font-size: 20px; }
  .post-layout { margin-top: 40px; }
  .post-body { font-size: 17px; }
  .post-body h2 { font-size: 26px; }
  .post-body h3 { font-size: 19px; }
  .post-key li { font-size: 16px; }
  .post-closing { font-size: 18px; }
  .post-cta { margin-top: 72px; }
  .post-cta-box { padding: 36px 24px 40px; gap: 28px; border-radius: 20px; }
  .post-cta-box h2 { font-size: 32px; }
  .post-cta-box .btn-cta { width: 100%; }
  .post-related { margin-top: 72px; padding-bottom: 90px; }
}

@media (prefers-reduced-motion: reduce) {
  .post-card, .post-card-foot .arr, .post-toc a > span { transition: none; }
}
