/* NARRA · estilos compartidos por todas las páginas. Sin build: se edita aquí y ya. */

html { scroll-behavior: smooth; }
body { margin: 0; background: #F4F5F2; color: #14181B; font-family: "IBM Plex Sans", system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: #0E5544; }
a:hover { color: #09352B; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
table { border-collapse: collapse; }
[id] { scroll-margin-top: 84px; }
/* El pie queda abajo también en las páginas cortas. */
body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; }

/* Foco visible, también sobre fondo oscuro. */
:focus-visible { outline: 2px solid #0E5544; outline-offset: 3px; border-radius: 4px; }
.dark :focus-visible { outline-color: #4BB58F; }

.serif { font-family: "Instrument Serif", Georgia, serif; font-weight: 400; letter-spacing: -0.01em; }
.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; }
.eyebrow { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: #5C6670; }
.dark .eyebrow { color: #8A9690; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding-inline: 32px; box-sizing: border-box; }
.card { background: #FFFFFF; border: 1px solid #E2E5E0; border-radius: 10px; padding: 24px; box-sizing: border-box; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ── Secciones ──────────────────────────────────────────────────────────── */
.section { padding: 88px 0; }
.section--white { background: #FFFFFF; border-block: 1px solid #DDE0DB; }
.dark { background: #14181B; color: #F4F5F2; }
.h-xl { font-size: 72px; line-height: 1.03; }
.h-lg { margin-top: 20px; font-size: 52px; line-height: 1.08; }
.h-md { margin-top: 20px; font-size: 44px; line-height: 1.1; }
.lead { margin-top: 22px; font-size: 18px; line-height: 1.6; max-width: 58ch; color: #3C454E; }
.dark .lead { color: #C9D1CC; }
.note { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 11px; line-height: 1.6; color: #6B7580; }

/* ── Botones ────────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: 8px; border: 1px solid transparent; font: inherit; font-size: 15px; font-weight: 500; text-decoration: none; cursor: pointer; box-sizing: border-box; }
.btn--primary { background: #0E5544; color: #FFFFFF; }
.btn--primary:hover { background: #09352B; color: #FFFFFF; }
.btn--light { background: #F4F5F2; color: #14181B; }
.btn--light:hover { background: #FFFFFF; color: #14181B; }
.btn--ghost { border-color: #C9CEC7; color: #14181B; background: transparent; }
.btn--ghost:hover { border-color: #0E5544; color: #0E5544; }
.dark .btn--ghost { border-color: #3C454E; color: #F4F5F2; }
.btn--sm { min-height: 44px; padding: 0 20px; font-size: 14px; }

/* La llamada al final de cada bloque: una pregunta y el botón. */
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 48px; }
.cta-row p { font-size: 17px; line-height: 1.5; color: #14181B; font-weight: 500; }
.dark .cta-row p { color: #F4F5F2; }

/* ── Menú fijo ──────────────────────────────────────────────────────────── */
.site-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid #DDE0DB; background: rgba(244, 245, 242, 0.94); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.site-header .wrap { display: flex; align-items: center; gap: 12px 28px; padding-top: 14px; padding-bottom: 14px; }
.logo { display: flex; align-items: baseline; gap: 10px; text-decoration: none; color: inherit; margin-right: auto; }
.logo:hover { color: inherit; }
.logo__name { font-size: 26px; letter-spacing: 0.06em; }
.logo__tag { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: #5C6670; }
.site-nav { display: flex; gap: 22px; font-size: 14px; }
.site-nav a { text-decoration: none; color: #3C454E; padding: 6px 0; }
.site-nav a:hover { color: #0E5544; }
.site-nav a[aria-current="page"] { color: #0E5544; font-weight: 500; }

/* Barra fija abajo, solo en celular. */
.mobile-bar { display: none; }

/* ── Pie ────────────────────────────────────────────────────────────────── */
.site-footer { padding: 28px 0 40px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 36px; align-items: baseline; padding-top: 28px; border-top: 1px solid #2A3137; }
.site-footer .logo__name { font-size: 22px; margin-right: auto; }
.site-footer a, .site-footer span.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 12px; color: #8A9690; text-decoration: none; }
.site-footer a:hover { color: #F4F5F2; text-decoration: underline; }
.site-footer span.mono { color: #6B7580; }

/* ── Bloque 2: los cinco momentos ───────────────────────────────────────── */
.moments { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; }
.moments .dot { display: block; width: 12px; height: 12px; border-radius: 999px; background: #0E5544; margin-bottom: 18px; }
.moments h3 { font-size: 16px; font-weight: 600; }
.moments p { margin-top: 8px; font-size: 14px; line-height: 1.55; color: #5C6670; }

/* ── Bloque 3: las cifras ───────────────────────────────────────────────── */
.figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 44px; }
.figures--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.figure__num { font-size: 64px; line-height: 1; color: #0E5544; }
.figure__bar { display: block; margin-top: 14px; height: 10px; background: #E4E8E2; border-radius: 999px; overflow: hidden; }
.figure__bar > span { display: block; height: 100%; border-radius: 999px; background: #0E5544; }
.figure__text { margin-top: 14px; font-size: 15px; line-height: 1.55; color: #3C454E; }
.callout { margin-top: 36px; padding: 20px 24px; background: #F4F5F2; border: 1px solid #E2E5E0; border-radius: 10px; font-size: 16px; line-height: 1.6; }

/* ── Bloque 4: el ciclo ─────────────────────────────────────────────────── */
.loop-points { flex: 999 1 460px; min-width: 0; display: grid; gap: 22px; }
.loop-points li { border-top: 2px solid #3C454E; padding-top: 12px; }
.loop-points li:first-child, .loop-points li:last-child { border-top-color: #4BB58F; }
.loop-points p { margin-top: 6px; font-size: 16px; line-height: 1.55; color: #C9D1CC; }

/* ── Formularios ────────────────────────────────────────────────────────── */
.form { display: grid; gap: 16px; }
.field label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.field input, .field textarea { width: 100%; box-sizing: border-box; min-height: 46px; padding: 10px 12px; border: 1px solid #C9CEC7; border-radius: 8px; background: #FFFFFF; color: #14181B; font: inherit; font-size: 15px; }
.field textarea { min-height: 88px; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid #0E5544; outline-offset: 1px; border-color: #0E5544; }
.field input[aria-invalid="true"] { border-color: #A33C28; }
.field__error { margin-top: 6px; font-size: 13px; line-height: 1.4; color: #A33C28; }
.field__error:empty { display: none; }
.field label.check, .check { display: flex; font-weight: 400; margin-bottom: 0; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.5; color: #3C454E; }
.check input { flex: 0 0 auto; width: 18px; height: 18px; margin: 1px 0 0; accent-color: #0E5544; }
.form__status { font-size: 14px; line-height: 1.5; color: #A33C28; }
.form__status:empty { display: none; }
.form__hint { font-size: 13px; color: #5C6670; }

/* ── Páginas interiores ─────────────────────────────────────────────────── */
.page-head { padding: 80px 0 48px; }
.list-ideas { margin-top: 40px; border-top: 1px solid #DDE0DB; }
.list-ideas li { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: baseline; justify-content: space-between; padding: 22px 0; border-bottom: 1px solid #DDE0DB; }
.list-ideas h2 { font-size: 26px; line-height: 1.2; max-width: 36ch; }
.badge { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: #5C6670; border: 1px solid #C9CEC7; border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.prose { max-width: 64ch; }
.prose h2 { margin-top: 36px; font-size: 20px; font-weight: 600; }
.prose p, .prose li { margin-top: 12px; font-size: 16px; line-height: 1.65; color: #3C454E; }
.prose ul { padding-left: 20px; list-style: disc; }

/* ── Entradas al hacer scroll. Sin soporte, el contenido sale fijo. ──────── */
@supports (animation-timeline: view()) {
  .enter { animation: rise linear both; animation-timeline: view(); animation-range: entry 5% cover 26%; }
  /* Escalonado: las tarjetas de una fila no entran todas de golpe. */
  .stagger > *:nth-child(1) { animation-range: entry 4% cover 24%; }
  .stagger > *:nth-child(2) { animation-range: entry 7% cover 27%; }
  .stagger > *:nth-child(3) { animation-range: entry 10% cover 30%; }
  .stagger > *:nth-child(4) { animation-range: entry 13% cover 33%; }
  .stagger > *:nth-child(5) { animation-range: entry 16% cover 36%; }
}
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

/* ── Barras y líneas que crecen desde la izquierda. ─────────────────────── */
.grow { transform-origin: left center; }
@supports (animation-timeline: view()) {
  .grow { animation: grow linear both; animation-timeline: view(); animation-range: entry 10% cover 40%; }
}
@keyframes grow { from { transform: scaleX(0.02); } to { transform: scaleX(1); } }

/* ── La línea que une los cinco momentos. ───────────────────────────────── */
.thread { transform-origin: left center; }
@supports (animation-timeline: view()) {
  .thread { animation: grow linear both; animation-timeline: view(); animation-range: entry 2% cover 30%; }
}

/* ── El punto que recorre el ciclo, y el latido del indicador. ──────────── */
.orbit { animation: spin 16s linear infinite; transform-origin: 150px 150px; }
@keyframes spin { to { transform: rotate(360deg); } }
.pulse { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.caret { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .enter, .grow, .thread, .orbit, .pulse, .caret { animation: none !important; }
}

/* ── Tableta ────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .moments { grid-template-columns: 1fr; gap: 22px; }
  .moments li { display: grid; grid-template-columns: 12px 1fr; column-gap: 16px; }
  .moments .dot { grid-row: span 2; margin: 5px 0 0; }
  .moments-thread { display: none; }
  .figures { grid-template-columns: 1fr; gap: 28px; }
}

/* ── Celular ────────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .wrap { padding-inline: 20px; }
  .section { padding: 64px 0; }
  .h-xl { font-size: 48px; }
  .h-lg { font-size: 38px; }
  .h-md { font-size: 34px; }
  .lead { font-size: 17px; }
  .figure__num { font-size: 52px; }
  .figures--two { grid-template-columns: 1fr; }
  .logo__tag { display: none; }
  .site-header .wrap { gap: 10px 16px; padding-top: 10px; padding-bottom: 10px; }
  .logo__name { font-size: 22px; }
  .site-nav { gap: 14px; font-size: 13.5px; }
  .site-header .btn { display: none; }
  .mobile-bar { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(244, 245, 242, 0.96); border-top: 1px solid #DDE0DB; transition: transform .2s ease; }
  .mobile-bar .btn { width: 100%; }
  .mobile-bar.is-hidden { transform: translateY(110%); }
  body.has-mobile-bar { padding-bottom: 72px; }
  .cta-row .btn { width: 100%; }
  .list-ideas h2 { font-size: 22px; }
}
.sr-only:focus { position: fixed; top: 8px; left: 8px; z-index: 50; width: auto; height: auto; margin: 0; clip: auto; padding: 10px 14px; background: #FFFFFF; color: #14181B; border-radius: 8px; }
