/* Runward: estilos compartidos de artículos del blog (ES y EN).
   Mismo sistema visual que el resto del sitio (paleta lila/púrpura, Poppins + Inter),
   pensado para lectura larga: columna de 720px, cuerpo a 1.075rem, contraste AA. */

:root {
  --white:    #FFFFFF;
  --mid:      #F5F7FA;
  --lavender: #EEE8F5;
  --mint:     #D4F0EC;
  --accent:   #7C4DDB;
  --accent-ink: #5B33B0;
  --teal:     #00C8C8;
  --ink:      #1A1A1A;
  --body:     #2A2A2A;
  --sub:      #4A4A4A;
  --muted:    #5F5F5F;
  --border:   rgba(0,0,0,0.08);
  --ease-out:    cubic-bezier(0.23, 1, 0.32, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--white);
  color: var(--body);
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; border-radius: 4px; }

/* ─── NAV ─── */
.nav {
  position: sticky; top: 0; z-index: 90;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 48px;
  height: 64px; display: flex; align-items: center; justify-content: space-between;
}
.wordmark {
  font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1.3rem;
  color: var(--ink); letter-spacing: -0.3px; text-decoration: none;
}
.wordmark .dot { color: var(--accent); }
.nav-right { display: flex; align-items: center; gap: 14px; }
.nav-cta {
  font-family: 'Poppins', sans-serif; font-size: 0.82rem; font-weight: 600;
  color: var(--white); background: var(--accent);
  padding: 9px 20px; border-radius: 6px; border: none; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 2px 8px rgba(124,77,219,0.15);
  transition: opacity 160ms var(--ease-out), transform 120ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .nav-cta:hover { opacity: 0.88; } }
.nav-cta:active { transform: scale(0.97); }
.lang-switch {
  font-family: 'Poppins', sans-serif; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em;
  color: var(--sub); text-decoration: none; padding: 5px 10px;
  border: 1px solid var(--border); border-radius: 6px; white-space: nowrap;
  transition: color 160ms var(--ease-out), border-color 160ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .lang-switch:hover { color: var(--ink); border-color: rgba(0,0,0,0.16); } }

/* Indicador de progreso de lectura: mejora progresiva, solo donde existan
   scroll-driven animations. Anima transform (GPU), sin JavaScript. */
.nav::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: 0 50%;
  pointer-events: none;
}
@supports (animation-timeline: scroll()) {
  .nav::after { animation: read-progress linear both; animation-timeline: scroll(root block); }
}
@keyframes read-progress { to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .nav::after { display: none; } }

/* ─── ARTICLE ─── */
.article { max-width: 720px; margin: 0 auto; padding: 64px 24px 24px; }

.article-meta {
  display: flex; flex-wrap: wrap; gap: 6px 22px;
  font-size: 0.86rem; color: var(--muted); margin-bottom: 22px;
}

.article h1 {
  font-family: 'Poppins', sans-serif; font-weight: 700;
  font-size: clamp(2rem, 4.2vw, 3rem); line-height: 1.14; letter-spacing: -0.9px;
  color: var(--ink); text-wrap: balance; margin-bottom: 22px;
}
.article-deck {
  font-size: 1.2rem; line-height: 1.65; color: var(--sub); text-wrap: pretty;
}

.article p { font-size: 1.075rem; line-height: 1.8; color: var(--body); text-wrap: pretty; }
.article p + p { margin-top: 18px; }
.article strong { color: var(--ink); font-weight: 600; }
.article h2 {
  font-family: 'Poppins', sans-serif; font-weight: 600;
  font-size: clamp(1.3rem, 2.2vw, 1.55rem); line-height: 1.3; letter-spacing: -0.3px;
  color: var(--ink); text-wrap: balance; margin: 52px 0 16px;
}
.article a:not(.btn-primary) {
  color: var(--accent-ink); text-decoration: underline;
  text-decoration-color: rgba(91,51,176,0.35); text-underline-offset: 3px;
  transition: text-decoration-color 160ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .article a:not(.btn-primary):hover { text-decoration-color: var(--accent-ink); }
}

/* Entrada: solo transform, el contenido siempre es visible. */
.rise { animation: rise 420ms var(--ease-out) both; }
@keyframes rise { from { transform: translateY(8px); } to { transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .rise { animation: none; } }

/* ─── MIGAS DE PAN ─── */
.crumbs { margin-bottom: 18px; font-size: 0.84rem; color: var(--muted); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 8px; }
.crumbs li + li::before { content: '/'; margin-right: 8px; color: #8A8A8A; }
.article .crumbs a { color: var(--muted); text-decoration-color: rgba(95,95,95,0.35); }
@media (hover: hover) and (pointer: fine) { .article .crumbs a:hover { color: var(--accent-ink); } }

/* ─── BLOG: LISTA DE ARTÍCULOS Y TEMAS ─── */
.article .hub-intro { font-size: 1.15rem; line-height: 1.7; color: var(--sub); }
.post-list { list-style: none; margin-top: 4px; }
.post-row {
  position: relative; display: grid; grid-template-columns: 148px 1fr; gap: 6px 24px;
  padding: 26px 0; border-bottom: 1px solid var(--border);
}
.post-row:first-child { border-top: 1px solid var(--border); }
.post-date { font-size: 0.88rem; color: var(--muted); padding-top: 4px; }
.post-title { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 1.28rem; line-height: 1.3; letter-spacing: -0.3px; color: var(--ink); text-wrap: balance; }
.article .post-title a { color: inherit; text-decoration: none; }
.article .post-title a::after { content: ''; position: absolute; inset: 0; }
.article .post-excerpt { margin-top: 10px; font-size: 0.98rem; line-height: 1.7; color: var(--sub); }
.article .post-meta { margin: 10px 0 0; font-size: 0.84rem; line-height: 1.5; color: var(--muted); }
@media (hover: hover) and (pointer: fine) {
  .post-row { transition: background 160ms var(--ease-out); }
  .post-row:hover { background: rgba(124,77,219,0.04); }
  .article .post-row:hover .post-title a { color: var(--accent-ink); }
}
.post-row:focus-within { background: rgba(124,77,219,0.04); }
.topic-list { list-style: none; margin-top: 4px; }
.topic-list li { padding: 14px 0; border-bottom: 1px solid var(--border); font-size: 0.96rem; line-height: 1.6; color: var(--sub); }
.topic-list li:first-child { border-top: 1px solid var(--border); }
.topic-list a { font-weight: 500; }
.article .article-back { margin-top: 26px; font-size: 0.95rem; }
@media (max-width: 900px) { .post-row { grid-template-columns: 1fr; padding: 22px 0; } .post-date { padding-top: 0; } }

/* ─── ESTADO DE LA INFORMACIÓN ─── */
.ledger {
  margin: 40px 0 8px; padding: 4px 28px;
  background: var(--lavender); border: 1px solid rgba(124,77,219,0.2); border-radius: 16px;
}
.ledger-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px;
  padding: 20px 0 16px; border-bottom: 1px solid rgba(26,26,26,0.12);
}
.article .ledger-title { margin: 0; font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 1rem; letter-spacing: 0; color: var(--ink); }
.ledger-date { font-size: 0.84rem; color: #4F4466; }
.ledger-row {
  display: grid; grid-template-columns: 176px 1fr; gap: 8px 20px;
  padding: 18px 0; border-bottom: 1px solid rgba(26,26,26,0.08);
}
.ledger-row:last-child { border-bottom: none; }
.ledger dt {
  display: flex; align-items: flex-start; gap: 10px;
  font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 0.92rem; color: var(--ink); line-height: 1.5;
}
.ledger dd { font-size: 0.98rem; line-height: 1.7; color: #2F2F2F; }
.mark { flex-shrink: 0; width: 11px; height: 11px; margin-top: 6px; }
.mark-known { border-radius: 50%; background: #00806F; }
.mark-unverified { border-radius: 50%; border: 2px solid var(--accent-ink); }
.mark-none { height: 2px; margin-top: 10px; background: var(--sub); }

/* ─── ALCANCE DEL LISTADO ─── */
.scope { margin: 28px 0 32px; }
.scope-grid { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; }
.scope-node { padding: 22px; border-radius: 14px; }
.scope-node.named { background: var(--lavender); border: 1px solid rgba(124,77,219,0.3); }
.scope-node.absent { border: 1.5px dashed #767676; }
.article .scope-tag { margin: 0 0 8px; font-size: 0.82rem; font-weight: 500; line-height: 1.4; color: var(--muted); }
.article .scope-name { margin: 0 0 6px; font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 1.02rem; line-height: 1.35; color: var(--ink); }
.article .scope-desc { margin: 0; font-size: 0.9rem; line-height: 1.6; color: var(--sub); }
.scope-link {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 124px; padding: 0 10px; text-align: center; font-size: 0.78rem; line-height: 1.4; color: var(--muted);
}
.scope-link::before { content: ''; width: 100%; border-top: 1.5px dashed #767676; margin-bottom: 8px; }
.scope figcaption { margin-top: 14px; font-size: 0.88rem; line-height: 1.6; color: var(--muted); }

/* ─── FUENTES ─── */
.sources { list-style: none; margin-top: 4px; }
.sources li { padding: 14px 0; border-bottom: 1px solid var(--border); font-size: 0.95rem; line-height: 1.6; color: var(--sub); }
.sources li:first-child { border-top: 1px solid var(--border); }
.sources li:last-child { border-bottom: none; }
.sources a { font-weight: 500; }

/* ─── CIERRE ─── */
.article-end { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--border); }
.article-end p { font-size: 1rem; color: var(--sub); }
.article-end .btn-primary { margin-top: 22px; }
.btn-primary {
  display: inline-block; padding: 12px 24px; background: var(--accent); color: var(--white);
  font-family: 'Poppins', sans-serif; font-size: 0.88rem; font-weight: 600;
  border-radius: 10px; text-decoration: none; border: none; cursor: pointer;
  box-shadow: 0 8px 24px rgba(124,77,219,0.28);
  transition: opacity 160ms var(--ease-out), transform 120ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .btn-primary:hover { opacity: 0.92; } }
.btn-primary:active { transform: scale(0.97); }

@media (max-width: 900px) {
  .nav-inner { padding: 0 24px; }
  .nav-cta { padding: 8px 14px; font-size: 0.78rem; }
  .article { padding-top: 40px; }
  .ledger { padding: 2px 20px; }
  .ledger-row { grid-template-columns: 1fr; gap: 6px; }
  .scope-grid { grid-template-columns: 1fr; }
  .scope-link { width: auto; flex-direction: row; gap: 10px; padding: 12px 0; }
  .scope-link::before { width: 28px; margin: 0; }
}

/* ─── FOOTER ─── */
.footer { max-width: 1200px; margin: 64px auto 0; padding: 28px 48px; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border); }
.footer-wordmark { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 1rem; color: var(--ink); letter-spacing: -0.2px; text-decoration: none; }
.footer-wordmark .dot { color: var(--accent); }
.footer-note { font-size: 0.76rem; color: var(--muted); }
@media (max-width: 900px) { .footer { padding: 24px; flex-direction: column; gap: 8px; text-align: center; } }

/* ─── CONTACT DRAWER (mismo comportamiento que el resto del sitio) ─── */
.drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0); z-index: 100; pointer-events: none; transition: background 320ms var(--ease-out); }
.drawer-overlay.open { background: rgba(0,0,0,0.4); pointer-events: all; }
.drawer { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%) translateY(100%); width: 100%; max-width: 480px; background: #FFFFFF; border-radius: 20px 20px 0 0; padding: 12px 0 calc(24px + env(safe-area-inset-bottom)); z-index: 101; transition: transform 460ms var(--ease-drawer); }
.drawer.open { transform: translateX(-50%) translateY(0); }
.drawer-handle { width: 36px; height: 4px; border-radius: 2px; background: rgba(0,0,0,0.18); margin: 0 auto 20px; }
.drawer-title { font-family: 'Poppins', sans-serif; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); text-align: center; margin-bottom: 16px; padding: 0 24px; }
.drawer-options { display: flex; flex-direction: column; gap: 8px; padding: 0 16px; }
.drawer-option { display: flex; align-items: center; gap: 16px; padding: 16px 20px; background: rgba(0,0,0,0.04); border: 1px solid rgba(0,0,0,0.07); border-radius: 14px; text-decoration: none; cursor: pointer; transition: background 140ms var(--ease-out), border-color 140ms var(--ease-out), transform 120ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .drawer-option:hover { background: rgba(0,0,0,0.08); border-color: rgba(0,0,0,0.14); } }
.drawer-option:active { transform: scale(0.98); }
.drawer-option-icon { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.15rem; flex-shrink: 0; }
.drawer-option-icon.email    { background: rgba(0,200,200,0.15); color: #7C4DDB; }
.drawer-option-icon.calendar { background: rgba(124,77,219,0.12);  color: #009999; }
.drawer-option-label { font-family: 'Poppins', sans-serif; font-size: 0.9rem; font-weight: 600; color: var(--ink); display: block; margin-bottom: 2px; }
.drawer-option-sub { font-size: 0.75rem; color: var(--muted); font-weight: 400; }
.drawer-option-arrow { margin-left: auto; color: var(--muted); font-size: 0.9rem; flex-shrink: 0; }
