/* Thaniy Escriba · sitio comercial. Tokens de marca en CLAUDE.md (contraste medido en qa/fase0-contraste.txt) */

@font-face {
  font-family: "Source Sans 3";
  src: url("/fuentes/source-sans-3-latin.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --acento: #1179a6;
  --acento-oscuro: #0b5e85;
  --texto: #1d2a2b;
  --tenue: #5f6b6d;
  --fondo: #f3f7fa;
  --blanco: #ffffff;
  --suave: #e4f3fb;
  --borde: #d3e0e8;
  --marca: #53bcec;
  --error: #b42318;
  --exito: #1a7f37;
  --radio: 12px;
  --sombra: 0 1px 2px rgba(29, 42, 43, 0.06), 0 8px 24px rgba(29, 42, 43, 0.08);
  --ancho: 1120px;
  --letra: "Source Sans 3", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--fondo);
  color: var(--texto);
  font-family: var(--letra);
  font-size: 1.0625rem;
  line-height: 1.55;
}

img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 6vw, 3.1rem); font-weight: 750; }
h2 { font-size: clamp(1.6rem, 4.2vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--texto); text-decoration: underline; text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--texto); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

.solo-lector {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.saltar { position: absolute; left: 16px; top: -48px; z-index: 50; background: var(--blanco); padding: 8px 12px; border-radius: 8px; }
.saltar:focus { top: 8px; }

.contenedor { width: 100%; max-width: var(--ancho); margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .contenedor { padding: 0 24px; } }

.seccion { padding: 56px 0; scroll-margin-top: 72px; }
.seccion--franja { background: var(--suave); }
.seccion--blanca { background: var(--blanco); }
.entrada { font-size: 1.15rem; color: var(--tenue); max-width: 46ch; }
.leyenda { font-size: 0.9rem; color: var(--tenue); margin-top: 10px; }

/* Botones: el único lugar donde va el acento */
.boton {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 22px; border-radius: 10px; border: 2px solid var(--acento);
  background: var(--acento); color: var(--blanco); font: inherit; font-weight: 700;
  text-decoration: none; cursor: pointer;
}
.boton:hover { background: var(--acento-oscuro); border-color: var(--acento-oscuro); }
.boton--sec { background: transparent; color: var(--texto); border-color: var(--texto); }
.boton--sec:hover { background: var(--blanco); border-color: var(--texto); }
.boton--chico { min-height: 40px; padding: 8px 16px; font-size: 1rem; }
.boton[disabled] { opacity: 0.7; cursor: progress; }
.botones { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 12px; }

/* Encabezado */
.encabezado { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, 0.96); border-bottom: 1px solid var(--borde); }
.encabezado .contenedor { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.marca { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; text-decoration: none; }
.marca img { width: 36px; height: 36px; border-radius: 8px; }
.menu { display: none; gap: 24px; }
.menu a { text-decoration: none; font-weight: 600; }
.menu a:hover { text-decoration: underline; }
@media (min-width: 900px) { .menu { display: flex; } }

/* Hero */
.hero { padding: 40px 0 56px; background: var(--blanco); }
.hero__rejilla { display: grid; gap: 32px; align-items: center; }
@media (min-width: 960px) { .hero__rejilla { grid-template-columns: 0.9fr 1.1fr; gap: 48px; } .hero { padding: 72px 0; } }
.hero .publico { font-size: 0.98rem; color: var(--tenue); }
.hero .micro { font-size: 0.95rem; color: var(--tenue); margin: 0; }

/* Marco de ventana de Windows para las capturas (sin los botones de Mac) */
.ventana { background: var(--blanco); border: 1px solid var(--borde); border-radius: var(--radio); box-shadow: var(--sombra); overflow: hidden; }
.ventana__barra { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid var(--borde); font-size: 0.85rem; color: var(--tenue); font-weight: 600; }
.ventana__botones { display: inline-flex; gap: 14px; }
.ventana__botones span { width: 10px; height: 10px; position: relative; }
.ventana__botones .min::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1.5px solid var(--tenue); }
.ventana__botones .max { border: 1.5px solid var(--tenue); }
.ventana__botones .cerrar::before, .ventana__botones .cerrar::after { content: ""; position: absolute; left: -1px; right: -1px; top: 50%; border-top: 1.5px solid var(--tenue); transform: rotate(45deg); }
.ventana__botones .cerrar::after { transform: rotate(-45deg); }
.ventana img { width: 100%; }
.captura { border: 1px solid var(--borde); border-radius: 10px; background: var(--blanco); overflow: hidden; }

/* Casos de uso */
.casos { padding: 28px 0; background: var(--fondo); border-bottom: 1px solid var(--borde); }
.casos h2 { font-size: 1.15rem; margin-bottom: 12px; }
.fichas { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; padding: 0; list-style: none; }
.fichas li { background: var(--blanco); border: 1px solid var(--borde); border-radius: 999px; padding: 4px 12px; font-size: 0.95rem; }
.fichas__titulo { font-weight: 700; margin: 0 0 6px; font-size: 0.95rem; }
.casos .firma { margin: 6px 0 0; color: var(--tenue); }

/* Problema */
.lista-hoy { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 10px; }
.lista-hoy li { background: var(--blanco); border: 1px solid var(--borde); border-radius: 10px; padding: 12px 14px; }
@media (min-width: 768px) { .lista-hoy { grid-template-columns: 1fr 1fr; } }

/* Pasos */
.pasos { list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 20px; counter-reset: paso; }
.paso { background: var(--blanco); border: 1px solid var(--borde); border-radius: var(--radio); padding: 18px; }
.paso h3 { display: flex; align-items: center; gap: 10px; }
.paso h3::before { counter-increment: paso; content: counter(paso); display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--suave); color: var(--texto); font-size: 1rem; }
.paso .captura { margin-top: 12px; }
@media (min-width: 960px) { .pasos { grid-template-columns: repeat(3, 1fr); } }

/* Funciones */
.funciones { display: grid; gap: 20px; margin-top: 24px; }
.funcion { background: var(--blanco); border: 1px solid var(--borde); border-radius: var(--radio); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.funcion p { margin: 0; }
.funcion .captura { margin-top: auto; }
@media (min-width: 768px) { .funciones { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .funciones { grid-template-columns: repeat(3, 1fr); } }

/* Comparación: tabla en escritorio, filas apiladas en el celular */
.comparacion { width: 100%; border-collapse: collapse; margin-top: 20px; background: var(--blanco); border-radius: var(--radio); overflow: hidden; border: 1px solid var(--borde); }
.comparacion th, .comparacion td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--borde); vertical-align: top; }
.comparacion thead th { background: var(--suave); }
.comparacion tbody th { font-weight: 700; }
@media (max-width: 719px) {
  .comparacion thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .comparacion tr { display: block; border-bottom: 1px solid var(--borde); padding: 10px 0; }
  .comparacion th, .comparacion td { display: block; border: 0; padding: 4px 14px; }
  .comparacion td::before { content: attr(data-col) ": "; font-weight: 700; color: var(--tenue); }
}
.centrado { text-align: center; margin-top: 24px; }

/* Precios */
.planes { display: grid; gap: 20px; margin-top: 24px; align-items: start; }
@media (min-width: 960px) { .planes { grid-template-columns: repeat(3, 1fr); } }
.plan { position: relative; background: var(--blanco); border: 1px solid var(--borde); border-radius: var(--radio); padding: 22px; }
.plan--destacado { border: 2px solid var(--acento); box-shadow: var(--sombra); }
.plan__etiqueta { position: absolute; top: -13px; left: 18px; background: var(--texto); color: var(--blanco); border-radius: 999px; padding: 2px 12px; font-size: 0.85rem; font-weight: 700; }
.plan__precio { font-size: 2rem; font-weight: 750; margin: 4px 0 12px; }
.plan__precio small { display: block; font-size: 1rem; font-weight: 600; color: var(--tenue); line-height: 1.3; }
.plan ul { padding-left: 1.1em; margin: 0 0 16px; }
.plan .nota { color: var(--tenue); font-size: 0.95rem; margin: 0; }
.bolsas { width: 100%; border-collapse: collapse; margin: 4px 0 14px; font-size: 0.98rem; }
.bolsas th, .bolsas td { padding: 6px 4px; border-bottom: 1px solid var(--borde); text-align: left; }
.bolsas td:last-child, .bolsas th:last-child { text-align: right; }
.bolsas .mejor { font-size: 0.8rem; font-weight: 700; background: var(--suave); border-radius: 999px; padding: 1px 8px; margin-left: 4px; white-space: nowrap; }
.pie-precios { margin-top: 20px; color: var(--tenue); }

details { background: var(--blanco); border: 1px solid var(--borde); border-radius: 10px; padding: 0 16px; margin-bottom: 10px; }
summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style-position: outside; }
details[open] summary { border-bottom: 1px solid var(--borde); margin-bottom: 10px; }
details > p { margin: 0 0 14px; }
.plan details { padding: 0 12px; margin: 0 0 12px; }
.plan summary { font-weight: 600; font-size: 0.98rem; padding: 10px 0; }

/* Quién está detrás */
.autor { display: grid; gap: 24px; align-items: center; }
.autor img { width: 220px; height: 275px; object-fit: cover; border-radius: var(--radio); border: 1px solid var(--borde); }
@media (min-width: 768px) { .autor { grid-template-columns: 220px 1fr; gap: 40px; } }

/* Formulario */
.prueba { display: grid; gap: 32px; }
@media (min-width: 960px) { .prueba { grid-template-columns: 1fr 1fr; align-items: start; } }
.formulario { background: var(--blanco); border: 1px solid var(--borde); border-radius: var(--radio); padding: 20px; box-shadow: var(--sombra); }
.campo { margin-bottom: 16px; }
.campo label, .grupo legend { display: block; font-weight: 700; margin-bottom: 6px; }
.campo input, .campo select, .campo textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; font: inherit; color: var(--texto);
  background: var(--blanco); border: 1.5px solid var(--tenue); border-radius: 8px;
}
.campo textarea { min-height: 120px; resize: vertical; }
.campo input:focus-visible, .campo select:focus-visible, .campo textarea:focus-visible { outline: 3px solid var(--texto); outline-offset: 1px; }
.campo [aria-invalid="true"] { border-color: var(--error); }
.ayuda { font-size: 0.92rem; color: var(--tenue); margin: 4px 0 0; }
.error { color: var(--error); font-size: 0.95rem; font-weight: 600; margin: 4px 0 0; }
.error-general { color: var(--error); font-weight: 600; margin: 12px 0 0; }
.trampa { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.turnstile { min-height: 65px; margin: 8px 0 12px; }
.formulario .nota { font-size: 0.95rem; color: var(--tenue); }
.formulario .legal { font-size: 0.92rem; color: var(--tenue); margin: 12px 0 0; }
.formulario .boton { width: 100%; }
.despues { color: var(--tenue); }
.grupo { border: 0; padding: 0; margin: 0 0 16px; }
.opciones { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.opciones label { display: inline-flex; align-items: center; gap: 8px; font-weight: 400; min-height: 32px; }
.opciones input { width: 20px; height: 20px; accent-color: var(--acento); }
.dos { display: grid; gap: 0 16px; }
@media (min-width: 640px) { .dos { grid-template-columns: 1fr 1fr; } }
.exito { background: var(--blanco); border: 2px solid var(--exito); border-radius: var(--radio); padding: 20px; scroll-margin-top: 80px; }
.exito h2 { color: var(--exito); font-size: 1.4rem; }

/* Pie */
.pie { background: var(--texto); color: var(--blanco); padding: 40px 0 96px; font-size: 0.95rem; }
.pie a { color: var(--blanco); }
.pie .contenedor { display: grid; gap: 10px; }
.pie__marca { font-weight: 700; font-size: 1.1rem; }
.pie__legal { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 8px 0; }
.libro { display: inline-flex; align-items: center; gap: 8px; }
.libro svg { width: 22px; height: 22px; }
.pie .tenue { color: #c9d4d8; }

/* Aviso de cookies y WhatsApp flotante */
.cookies { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 30; max-width: 560px; margin: 0 auto; background: var(--blanco); border: 1px solid var(--borde); border-radius: var(--radio); box-shadow: var(--sombra); padding: 14px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; font-size: 0.95rem; }
.cookies p { margin: 0; flex: 1 1 260px; }
@media (max-width: 600px) {
  .cookies { left: 8px; right: 8px; bottom: 8px; padding: 10px 12px; gap: 8px 12px; font-size: 0.9rem; }
  .cookies .boton { min-height: 40px; padding: 6px 14px; }
}
.whatsapp { position: fixed; right: 16px; bottom: 16px; z-index: 25; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--blanco); border: 1px solid var(--borde); box-shadow: var(--sombra); }
.whatsapp svg { width: 30px; height: 30px; }
@media (min-width: 900px) { .whatsapp { display: none !important; } }

/* Páginas de texto (legales, gracias, 404) */
.pagina { padding: 40px 0 64px; }
.pagina .contenedor { max-width: 780px; }
.borrador { background: #fff4e5; border: 1px solid #f3c58b; color: var(--texto); border-radius: 10px; padding: 10px 14px; font-weight: 700; margin-bottom: 24px; }
.texto-legal h2 { font-size: 1.35rem; margin-top: 1.6em; }
.texto-legal li { margin-bottom: 0.4em; }
.proveedor { background: var(--blanco); border: 1px solid var(--borde); border-radius: 10px; padding: 14px 16px; margin-bottom: 20px; }
.lista-simple { padding-left: 1.2em; }
