/* Estilos de las páginas estáticas de contenido (ver scripts/build-seo-pages.mjs).
   Tokens copiados de constants/colors.web.ts — la app y estas páginas comparten
   marca: papel cálido, verde azulado como estructura, terracota para el llamado
   a la acción. Solo tema claro, como el resto del sitio. */
:root {
  --primary: #146b5e;
  --primary-light: #dceae6;
  --primary-dark: #0e4c42;
  --text: #1c1a13;
  --text-secondary: #6b6a5a;
  --background: #f2eee2;
  --background-secondary: #e7e1d0;
  --paper: #fffdf7;
  --border: #ded7c2;
  --border-paper: #e3dcc8;
  --dark: #16261f;
  --sage: #9fb3a8;
  --cta: #a84a28;
  --cta-hover: #8f3e20;
  --shadow-tint: rgba(20, 38, 31, 0.18);

  --serif: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --sans: 'Public Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --radius-lg: 16px;
  --radius-xl: 22px;
  --measure: 44rem;
  --wide: 72.5rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--primary);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--primary-dark);
  text-decoration-thickness: 2px;
}

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

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-weight: 600;
}

.skip:focus {
  top: 1rem;
}

/* ---------- Encabezado ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem 2rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

.brand:hover {
  color: var(--text);
}

.brand__mark {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  background: var(--primary);
  color: var(--background);
  font-size: 1.1rem;
}

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.25rem 1.5rem;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.4rem 0;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover,
.site-nav a[aria-current='page'] {
  border-bottom-color: var(--primary);
}

.pill {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  background: var(--primary);
  color: var(--background) !important;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: 0 2px 8px var(--shadow-tint);
  border-bottom: 0 !important;
  transition: background-color 0.15s ease-out;
}

.pill:hover {
  background: var(--primary-dark);
}

.pill--cta {
  background: var(--cta);
  padding: 0.9rem 1.7rem;
  font-size: 1rem;
  box-shadow: 0 8px 24px var(--shadow-tint);
}

.pill--cta:hover {
  background: var(--cta-hover);
}

.pill__short {
  display: none;
}

@media (max-width: 720px) {
  .site-header__inner {
    padding: 0.8rem 1rem 0;
    gap: 0.5rem 1rem;
  }

  /* Marca y botón en la primera fila; el menú en una sola fila deslizable. */
  .site-header .pill {
    margin-left: auto;
    padding: 0.55rem 1.05rem;
  }

  .pill__long {
    display: none;
  }

  .pill__short {
    display: inline;
  }

  .site-nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    flex-wrap: nowrap;
    gap: 1.25rem;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
  }

  .site-nav::-webkit-scrollbar {
    display: none;
  }

  .site-nav a {
    padding: 0.55rem 0 0.6rem;
  }
}

/* ---------- Página ---------- */
.page {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 3rem 1.5rem 4.5rem;
}

.crumbs {
  margin: 0 0 2rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.crumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.crumbs li + li::before {
  content: '/';
  margin-right: 0.35rem;
  color: var(--border);
}

.crumbs a {
  color: var(--text-secondary);
}

.eyebrow {
  margin: 0 0 1rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

h1,
h2 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--text);
  text-wrap: balance;
}

h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2.1rem, 5.2vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.lede {
  margin: 0 0 2.5rem;
  max-width: 38rem;
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--text-secondary);
  text-wrap: pretty;
}

.prose > :first-child {
  margin-top: 0;
}

.prose p,
.prose ul,
.prose ol {
  margin: 0 0 1.25rem;
  text-wrap: pretty;
}

.prose h2 {
  margin: 3rem 0 0.9rem;
  font-size: clamp(1.5rem, 3.2vw, 1.85rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.prose h3 {
  margin: 2rem 0 0.5rem;
  font-family: var(--sans);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.35;
}

.prose ul,
.prose ol {
  padding-left: 1.3rem;
}

.prose li {
  margin-bottom: 0.5rem;
  padding-left: 0.2rem;
}

.prose li::marker {
  color: var(--primary);
}

/* Solo las listas ordenadas son secuencias reales (pasos): llevan número
   monoespaciado. Las demás son listas comunes. */
.prose ol {
  list-style: none;
  counter-reset: paso;
  padding-left: 0;
}

.prose ol > li {
  counter-increment: paso;
  position: relative;
  padding: 0 0 0 3rem;
  margin-bottom: 1.1rem;
}

.prose ol > li::before {
  content: counter(paso, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.15em;
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--primary);
}

.prose strong {
  font-weight: 600;
}

.prose blockquote {
  margin: 1.75rem 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 2px solid var(--border);
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--text-secondary);
}

.prose hr {
  margin: 2.5rem 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  display: block;
  overflow-x: auto;
}

.prose th,
.prose td {
  padding: 0.6rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.meta {
  margin: 2.5rem 0 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

/* ---------- Llamado a la acción ---------- */
.cta {
  margin: 3.5rem 0 0;
  padding: 2rem;
  background: var(--paper);
  border: 1px solid var(--border-paper);
  border-radius: var(--radius-xl);
  box-shadow: 0 8px 24px var(--shadow-tint);
}

.cta h2 {
  margin: 0 0 0.6rem;
  font-size: 1.5rem;
}

.cta p {
  margin: 0 0 1.4rem;
  color: var(--text-secondary);
  max-width: 34rem;
}

/* ---------- Seguí leyendo ---------- */
.related {
  margin: 3.5rem 0 0;
}

.related h2 {
  margin: 0 0 1rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.related ul {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
}

.related li {
  border-bottom: 1px solid var(--border);
}

.related a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 0;
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
}

.related a::after {
  content: '→';
  color: var(--primary);
  transition: transform 0.15s ease-out;
}

.related a:hover {
  color: var(--primary);
}

.related a:hover::after {
  transform: translateX(3px);
}

/* ---------- Pie ---------- */
.site-footer {
  background: var(--dark);
  color: var(--background);
}

.site-footer__inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 3rem 1.5rem 1.75rem;
}

.site-footer__top {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(242, 238, 226, 0.14);
}

.site-footer .brand {
  color: var(--background);
}

.site-footer__tagline {
  margin: 0.6rem 0 0;
  max-width: 20rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--sage);
}

.site-footer nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.75rem;
}

.site-footer nav a {
  color: var(--sage);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
}

.site-footer nav a:hover {
  color: var(--background);
  text-decoration: underline;
}

.site-footer__copy {
  margin: 1.25rem 0 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--sage);
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
