/* Layout B (relato largo): educa y resuelve objeciones de arriba abajo. Una sola tipografía (Manrope), escala Tailwind, espaciado y radios de la skill landing-page-design. */
@font-face {
  font-family: "Manrope";
  src: url("fuentes/manrope.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Color */
  --bg: #f6f8f8;
  --surface: #ffffff;
  --raised: #eef3f3;
  --ink: #0b1213;
  --muted: #566163;
  --line: #dde4e4;
  --accent: #0b6f78;
  --accent-hover: #095d65;
  --accent-ink: #ffffff;
  --nav-bg: rgba(255, 255, 255, 0.72);
  --panel-bg: rgba(246, 248, 248, 0.94);
  --hero-from: #000000;
  --hero-to: #666666;
  --ridge-1: #cfe3e4;
  --ridge-2: #a9cdd0;
  --ridge-3: #7fb3b8;
  --flag: #f6d77a;
  --flag-ink: #3b2d00;

  /* Tipografía */
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Espaciado (tabla B2) */
  --s-25: 2px; --s-50: 4px; --s-75: 8px; --s-100: 12px; --s-200: 16px; --s-300: 24px;
  --s-400: 32px; --s-500: 40px; --s-600: 48px; --s-700: 64px; --s-800: 80px; --s-900: 96px;

  /* Radios (Tailwind) */
  --r-md: 6px; --r-lg: 8px; --r-xl: 12px; --r-2xl: 16px; --r-3xl: 24px; --r-full: 9999px;

  /* Movimiento (B7) */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #181818; --surface: #1f1f1f; --raised: #272727; --ink: #f2f2f2; --muted: #a6a6a6; --line: #313131;
    --accent: #4fc0c6; --accent-hover: #6fd0d5; --accent-ink: #0b1213;
    --nav-bg: rgba(31, 31, 31, 0.72); --panel-bg: rgba(24, 24, 24, 0.94);
    --hero-from: #ffffff; --hero-to: #9b9b9b;
    --ridge-1: #272727; --ridge-2: #313131; --ridge-3: #1f4a4d;
    --flag: #313131; --flag-ink: #fbe7a6;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #181818; --surface: #1f1f1f; --raised: #272727; --ink: #f2f2f2; --muted: #a6a6a6; --line: #313131;
  --accent: #4fc0c6; --accent-hover: #6fd0d5; --accent-ink: #0b1213;
  --nav-bg: rgba(31, 31, 31, 0.72); --panel-bg: rgba(24, 24, 24, 0.94);
  --hero-from: #ffffff; --hero-to: #9b9b9b;
  --ridge-1: #272727; --ridge-2: #313131; --ridge-3: #1f4a4d;
  --flag: #313131; --flag-ink: #fbe7a6;
  color-scheme: dark;
}

/* ---------- Estilos de texto (B1) ---------- */
.heading-1 { font-size: 3.75rem; line-height: 3.75rem; font-weight: 600; }
.heading-2 { font-size: 3rem; line-height: 3rem; font-weight: 600; }
.heading-3 { font-size: 2.25rem; line-height: 2.5rem; font-weight: 600; }
.heading-4 { font-size: 1.875rem; line-height: 2.25rem; font-weight: 600; }
.heading-5 { font-size: 1.5rem; line-height: 2rem; font-weight: 600; }
.heading-6 { font-size: 1.25rem; line-height: 1.75rem; font-weight: 600; }
.title-1 { font-size: 1.25rem; line-height: 1.75rem; font-weight: 500; }
.title-2 { font-size: 1.125rem; line-height: 1.75rem; font-weight: 500; }
.title-3 { font-size: 1rem; line-height: 1.5rem; font-weight: 500; }
.title-4 { font-size: 0.875rem; line-height: 1.25rem; font-weight: 500; }
.body-1 { font-size: 1rem; line-height: 1.5rem; font-weight: 600; }
.body-2 { font-size: 1rem; line-height: 1.5rem; font-weight: 500; }
.body-3 { font-size: 1rem; line-height: 1.5rem; font-weight: 400; }
.body-6 { font-size: 0.875rem; line-height: 1.25rem; font-weight: 400; }
.button-md { font-size: 1rem; line-height: 1.5rem; font-weight: 600; }
.button-sm { font-size: 0.875rem; line-height: 1.25rem; font-weight: 600; }
.caption-2 { font-size: 0.875rem; line-height: 1.25rem; font-weight: 400; }
.caption-3 { font-size: 0.75rem; line-height: 1rem; font-weight: 600; }
.caption-5 { font-size: 0.75rem; line-height: 1rem; font-weight: 400; }
@media (max-width: 720px) {
  .heading-1 { font-size: 2.25rem; line-height: 2.5rem; }
  .heading-2 { font-size: 1.875rem; line-height: 2.25rem; }
  .heading-3 { font-size: 1.5rem; line-height: 2rem; }
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-padding-top: var(--s-900); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 1rem; line-height: 1.5rem; font-weight: 400;
}
h1, h2, h3, p, ol, ul, dl, dd, figure, blockquote { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
p, li, dd, summary { text-wrap: pretty; }
a { color: var(--accent); text-underline-offset: 4px; transition: color 300ms var(--ease); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-md); }
.muted { color: var(--muted); }
.icon { width: 24px; height: 24px; flex: none; fill: currentColor; }

.wrap {
  max-width: 1120px; margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.skip {
  position: absolute; left: var(--s-200); top: var(--s-200); z-index: 100;
  background: var(--accent); color: var(--accent-ink); padding: var(--s-75) var(--s-100);
  border-radius: var(--r-md); transform: translateY(-200%); transition: transform 300ms var(--ease);
}
.skip:focus { transform: translateY(0); }

/* Marcas de borrador */
.tbd { background: var(--flag); color: var(--flag-ink); padding: 0 var(--s-50); border-radius: var(--r-md); }
.draft-bar { background: var(--flag); color: var(--flag-ink); }
.draft-bar .wrap { padding-block: var(--s-75); }

/* ---------- Navegación flotante ---------- */
.nav-shell {
  position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--s-200)); z-index: 50;
  display: flex; justify-content: center; padding-inline: var(--s-200); pointer-events: none;
}
.nav {
  pointer-events: auto; display: flex; align-items: center; gap: var(--s-300);
  padding: var(--s-75) var(--s-75) var(--s-75) var(--s-300);
  background: var(--nav-bg); border: 1px solid var(--line); border-radius: var(--r-full);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  max-width: 100%;
}
.brand { color: var(--ink); text-decoration: none; white-space: nowrap; }
.nav-links { display: flex; gap: var(--s-50); list-style: none; padding: 0; }
.nav-links a {
  display: block; padding: var(--s-75) var(--s-100); border-radius: var(--r-full);
  color: var(--muted); text-decoration: none; transition: background-color 300ms var(--ease), color 300ms var(--ease);
}
.nav-links a:hover { color: var(--ink); background: var(--raised); }
.nav-links a[aria-current="true"] { color: var(--ink); background: var(--raised); }
.menu-toggle { display: none; }

@media (max-width: 860px) {
  .js .nav { gap: var(--s-200); padding: var(--s-75) var(--s-75) var(--s-75) var(--s-200); }
  .js .nav-links { display: none; }
  .js .menu-toggle {
    display: grid; place-items: center; width: 40px; height: 40px; padding: 0;
    border: 0; border-radius: var(--r-full); background: var(--raised); color: var(--ink); cursor: pointer;
  }
  .menu-toggle .bar {
    grid-area: 1 / 1; display: block; width: 18px; height: 2px; background: currentColor; border-radius: var(--r-full);
    transition: transform 500ms var(--ease);
  }
  .menu-toggle .bar:first-child { transform: translateY(-4px); }
  .menu-toggle .bar:last-child { transform: translateY(4px); }
  .menu-open .menu-toggle .bar:first-child { transform: rotate(45deg); }
  .menu-open .menu-toggle .bar:last-child { transform: rotate(-45deg); }
  /* Sin JavaScript los enlaces quedan visibles y envuelven */
  html:not(.js) .nav { flex-wrap: wrap; border-radius: var(--r-2xl); }
  html:not(.js) .nav-links { flex-wrap: wrap; }
}
.menu-panel {
  position: fixed; inset: 0; z-index: 40; background: var(--panel-bg);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  padding: calc(env(safe-area-inset-top, 0px) + var(--s-900) + var(--s-400)) max(24px, env(safe-area-inset-right, 0px)) var(--s-600) max(24px, env(safe-area-inset-left, 0px));
  opacity: 0; visibility: hidden; transition: opacity 300ms var(--ease), visibility 0s var(--ease) 300ms;
}
.menu-panel ul { list-style: none; padding: 0; display: grid; gap: var(--s-200); }
.menu-panel a { color: var(--ink); text-decoration: none; display: block; padding-block: var(--s-75); }
.menu-panel li { opacity: 0; transform: translateY(24px); transition: opacity 500ms var(--ease), transform 500ms var(--ease); }
.menu-open .menu-panel { opacity: 1; visibility: visible; transition: opacity 300ms var(--ease); }
.menu-open .menu-panel li { opacity: 1; transform: none; }
.menu-panel li:nth-child(2) { transition-delay: 60ms; }
.menu-panel li:nth-child(3) { transition-delay: 120ms; }
.menu-panel li:nth-child(4) { transition-delay: 180ms; }
.menu-panel li:nth-child(5) { transition-delay: 240ms; }
.menu-panel li:nth-child(6) { transition-delay: 300ms; }
@media (min-width: 861px) { .menu-panel { display: none; } }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: var(--s-75);
  padding: var(--s-75) var(--s-100); border-radius: var(--r-lg);
  background: var(--accent); color: var(--accent-ink); text-decoration: none; border: 0;
  transition: background-color 300ms var(--ease), transform 300ms var(--ease);
}
.btn:hover { background: var(--accent-hover); color: var(--accent-ink); transform: translateY(-1px); }
.btn:active { transform: scale(0.98); }
.btn-lg { padding: var(--s-75) var(--s-100); }

/* ---------- Hero ---------- */
.hero { padding-top: var(--s-800); overflow: hidden; }
.hero-inner { display: grid; gap: var(--s-300); justify-items: start; }
.hero h1 {
  max-width: 680px;
  background: linear-gradient(90deg, var(--hero-from), var(--hero-to));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .sub { max-width: 680px; color: var(--muted); }
.proof { display: flex; flex-wrap: wrap; gap: var(--s-75) var(--s-300); color: var(--muted); }
.proof span { display: inline-flex; gap: var(--s-75); align-items: center; }
.proof .icon { width: 20px; height: 20px; color: var(--accent); }
.ridge { display: block; width: 100%; height: 160px; margin-top: var(--s-600); }
.ridge .r1 { fill: var(--ridge-1); }
.ridge .r2 { fill: var(--ridge-2); }
.ridge .r3 { fill: var(--ridge-3); }

/* ---------- Secciones ---------- */
.section { padding-block: var(--s-900); }
.section.alt { background: var(--surface); }
.section > .wrap { display: grid; gap: var(--s-600); }
.section-head { display: grid; gap: var(--s-200); max-width: 680px; }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2xl);
  padding: var(--s-300); display: grid; gap: var(--s-100); align-content: start; min-width: 0;
}
.section.alt .card { background: var(--bg); }
.card .icon-tile {
  width: 40px; height: 40px; display: grid; place-items: center;
  background: var(--raised); color: var(--accent); border-radius: var(--r-lg);
}
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: var(--s-300); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: var(--s-300); }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: var(--s-300); }

/* Problema y solución */
.contrast .card:first-child .icon-tile { color: var(--muted); }

/* Cifras */
.stat b { font-variant-numeric: tabular-nums; }

/* Frase destacada (B11) */
.tagline { padding-block: var(--s-900); }
.tagline p { max-width: 680px; }
.tagline .w { transition: color 500ms var(--ease); }
.js .tagline .w { color: color-mix(in srgb, var(--ink) 30%, transparent); }
.js .tagline .w.on { color: var(--ink); }

/* Cómo funciona */
.steps { list-style: none; padding: 0; counter-reset: paso; }
.steps li { counter-increment: paso; }
.steps .num::before { content: counter(paso); }
.steps .num {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--r-full);
  background: var(--accent); color: var(--accent-ink);
}
.steps ul { padding-left: var(--s-300); color: var(--muted); display: grid; gap: var(--s-50); }

/* Calendario */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-2xl); background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 480px; }
th, td { text-align: left; padding: var(--s-100) var(--s-300); vertical-align: top; }
thead th { color: var(--muted); background: var(--raised); }
tbody tr + tr td { border-top: 1px solid var(--line); }
td.date { font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.key td { color: var(--accent); }

/* Lista de documentos */
.checklist { list-style: none; padding: 0; display: grid; gap: var(--s-100); }
.checklist li { display: flex; gap: var(--s-100); align-items: flex-start; }
.checklist .icon { color: var(--accent); width: 20px; height: 20px; margin-top: var(--s-25); }

/* Prueba social (pendiente) */
blockquote.card { border-style: dashed; }

/* Preguntas */
.faq { display: grid; gap: var(--s-100); max-width: 800px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); }
.section.alt .faq details { background: var(--bg); }
.faq summary {
  cursor: pointer; list-style: none; padding: var(--s-200) var(--s-300);
  display: flex; justify-content: space-between; gap: var(--s-200); align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; color: var(--accent); font-size: 1.5rem; line-height: 2rem; font-weight: 400;
  transition: transform 500ms var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 var(--s-300) var(--s-200); color: var(--muted); }

/* Cierre */
.final .card { padding: var(--s-600); border-radius: var(--r-3xl); gap: var(--s-300); justify-items: start; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: var(--s-300); width: 100%; }
.contact-grid div { display: grid; gap: var(--s-50); min-width: 0; }
.contact-grid dd { overflow-wrap: anywhere; user-select: all; }
@media (max-width: 720px) { .final .card { padding: var(--s-300); } }

/* Pie */
footer { padding-block: var(--s-600); border-top: 1px solid var(--line); }
footer .wrap { display: grid; gap: var(--s-200); color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--s-300); list-style: none; padding: 0; }

/* Páginas simples (privacidad, aviso legal, 404) */
.page { padding-block: var(--s-800); }
.page .wrap { display: grid; gap: var(--s-300); max-width: 760px; }
.page h2 { margin-top: var(--s-300); }

/* ---------- Aparición al hacer scroll (B7) ---------- */
.reveal-pending { opacity: 0; transform: translateY(32px); }
.reveal-in { opacity: 1; transform: none; transition: opacity 700ms var(--ease), transform 700ms var(--ease); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; transition-delay: 0s !important; }
  .reveal-pending { transform: none; }
  .menu-panel li { transform: none; }
}
