/* Turniai — landing page. Se carga después de design-system/tokens.css y design-system/componentes.css
   y solo usa sus variables: los colores, radios y espacios salen del sistema de diseño. */

html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; }
img, svg { max-width: 100%; }
a { color: var(--brand); }
a:hover { color: var(--brand-strong); }
h1, h2, h3, p { margin: 0; }
.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; }

.saltar { position: absolute; left: var(--space-4); top: -60px; z-index: 100; background: var(--brand); color: var(--on-brand); padding: var(--space-2) var(--space-4); border-radius: var(--radius-sm); font-weight: 600; text-decoration: none; }
.saltar:focus { top: var(--space-2); color: var(--on-brand); }

.contenedor { width: min(1160px, 100% - 2 * var(--space-5)); margin-inline: auto; }
@media (max-width: 640px) { .contenedor { width: calc(100% - 2 * var(--space-4)); } }

.marca { font: 700 22px/24px var(--font-sans); letter-spacing: -0.02em; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: var(--space-2); }
.marca b { font-weight: 700; } .marca__ai { color: var(--brand); }
.marca:hover { color: var(--ink); }
.marca img { width: 28px; height: 28px; }

/* ---------- Cabecera */
.cabecera { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--surface-0) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.cabecera--sombra { border-bottom-color: var(--line); }
.cabecera__fila { display: flex; align-items: center; gap: var(--space-5); min-height: 64px; }
.menu { display: flex; align-items: center; gap: var(--space-1); margin: 0; padding: 0; list-style: none; }
.menu a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 var(--space-3); border-radius: var(--radius-sm); color: var(--ink-muted); font-weight: 500; text-decoration: none; }
.menu a:hover { background: var(--surface-2); color: var(--ink); }
.cabecera__acciones { display: flex; align-items: center; gap: var(--space-2); margin-left: auto; }
.boton-icono { display: inline-grid; place-items: center; width: var(--size-control); height: var(--size-control); border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface-1); color: var(--ink); cursor: pointer; padding: 0; }
.boton-icono:hover { background: var(--surface-2); }
.icono-noche { display: none; }
[data-theme="dark"] .icono-dia { display: none; }
[data-theme="dark"] .icono-noche { display: block; }
.solo-movil { display: none; }
@media (max-width: 900px) {
  .solo-movil { display: inline-grid; }
  .cabecera__acciones .tn-btn--ghost { display: none; }
  .navegacion { position: fixed; inset: 64px 0 auto 0; background: var(--surface-1); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-2); padding: var(--space-3) var(--space-4) var(--space-4); display: none; }
  .navegacion--abierta { display: block; }
  .menu { flex-direction: column; align-items: stretch; }
  .menu a { min-height: 44px; font-size: 16px; }
  .menu__entrar { display: list-item !important; }
}
.menu__entrar { display: none; }
@media (max-width: 420px) { .cabecera__fila { gap: var(--space-3); } .cabecera__acciones .tn-btn--primary { padding: 0 var(--space-3); } }
@media (max-width: 360px) { .marca__turni, .marca__ai { font-size: 19px; } .cabecera__acciones .tn-btn--primary { font-size: 14px; } }

/* ---------- Secciones */
.seccion { padding: 96px 0; }
.seccion--alterna { background: var(--surface-1); border-block: 1px solid var(--line); }
@media (max-width: 640px) { .seccion { padding: 64px 0; } }
.seccion__cabeza { max-width: 680px; margin-bottom: var(--space-7); display: flex; flex-direction: column; gap: var(--space-3); }
.seccion__cabeza--centro { margin-inline: auto; text-align: center; align-items: center; }
.titulo { font: 600 36px/42px var(--font-sans); letter-spacing: -0.02em; text-wrap: balance; }
.entradilla { font-size: 18px; line-height: 28px; color: var(--ink-muted); text-wrap: pretty; }
@media (max-width: 640px) { .titulo { font-size: 28px; line-height: 34px; } .entradilla { font-size: 16px; line-height: 24px; } }

/* ---------- Portada */
.portada { padding: 72px 0 96px; position: relative; overflow: hidden; }
.portada::before { content: ""; position: absolute; inset: -40% -10% auto auto; width: 720px; height: 720px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--brand) 14%, transparent), transparent); pointer-events: none; }
.portada__rejilla { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: var(--space-7); align-items: center; position: relative; }
.portada__texto { display: flex; flex-direction: column; gap: var(--space-5); }
.portada h1 { font: 700 54px/60px var(--font-sans); letter-spacing: -0.03em; text-wrap: balance; }
.portada h1 em { font-style: normal; color: var(--brand); }
.portada__acciones { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.portada__acciones .tn-btn { min-height: 48px; padding: 0 var(--space-5); font-size: 16px; }
.portada__nota { font-size: 13px; line-height: 18px; color: var(--ink-muted); display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); }
.portada__nota span { display: inline-flex; align-items: center; gap: var(--space-1); }
.portada__nota .tn-icon { width: 16px; height: 16px; color: var(--ok); }
@media (max-width: 1000px) { .portada__rejilla { grid-template-columns: minmax(0, 1fr); } .portada h1 { font-size: 44px; line-height: 50px; } }
@media (max-width: 640px) { .portada { padding: 40px 0 64px; } .portada h1 { font-size: 34px; line-height: 40px; } .portada__acciones .tn-btn { flex: 1 1 100%; } .maqueta__cuerpo { padding: var(--space-3); } }
.portada h1, .titulo { overflow-wrap: break-word; }

/* Maqueta del producto en la portada */
.maqueta { display: flex; flex-direction: column; gap: var(--space-3); margin: 0; }
.maqueta .tn-progress__meta { flex-wrap: wrap; }
.maqueta__ventana { background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-2); overflow: hidden; }
.maqueta__barra { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--line); background: var(--surface-1); flex-wrap: wrap; }
.maqueta__barra .h3 { margin-right: auto; }
.maqueta__cuerpo { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-4); }
.maqueta .tn-roster { width: 100%; }
.maqueta .tn-roster table { width: 100%; }
.maqueta .tn-roster th[scope="row"] { min-width: 112px; }
.maqueta .tn-roster th, .maqueta .tn-roster td { min-width: 40px; }
.maqueta .tn-shift { min-width: 26px; justify-content: center; }
.maqueta__pie { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
@media (max-width: 560px) { .maqueta__pie { grid-template-columns: 1fr; } }
.celda-nueva { animation: aparecer .35s ease both; }
@keyframes aparecer { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .celda-nueva { animation: none; } .tn-progress__track i { transition: none; } }

.lista-check { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.lista-check li { display: grid; grid-template-columns: 20px 1fr; gap: var(--space-3); align-items: start; }
.lista-check .tn-icon { width: 20px; height: 20px; color: var(--ok); margin-top: 1px; }

/* ---------- Transparencia */
.transparencia { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: var(--space-7); align-items: center; }
.transparencia__demo { display: flex; flex-direction: column; gap: var(--space-4); }
.transparencia .seccion__cabeza { margin-bottom: 0; }
.transparencia__texto { display: flex; flex-direction: column; gap: var(--space-6); }
.medidores { display: flex; flex-direction: column; gap: var(--space-4); }
@media (max-width: 1000px) { .transparencia { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Precios */
.planes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); align-items: stretch; }
.plan { display: flex; flex-direction: column; gap: var(--space-5); padding: var(--space-6); position: relative; }
.plan--destacado { border: 2px solid var(--brand); box-shadow: var(--shadow-2); }
.plan__sello { position: absolute; top: -13px; left: var(--space-6); }
.plan__precio { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--space-2); }
.plan__precio b { font: 600 48px/52px var(--font-sans); letter-spacing: -0.02em; white-space: nowrap; flex: none; }
.plan__precio span { color: var(--ink-muted); }
.plan__para { color: var(--ink-muted); min-height: 44px; }
.plan .lista-check { flex: 1; }
.plan .tn-btn { min-height: 48px; }
@media (max-width: 1000px) { .planes { grid-template-columns: minmax(0, 1fr); max-width: 560px; margin-inline: auto; } .plan__para { min-height: 0; } }
.precios__nota { margin-top: var(--space-5); text-align: center; color: var(--ink-muted); font-size: 13px; line-height: 18px; }

/* ---------- Llamada final */
.final { text-align: center; }
.final__caja { padding: var(--space-7) var(--space-5); border-radius: var(--radius-lg); background: var(--brand); color: var(--on-brand); display: flex; flex-direction: column; align-items: center; gap: var(--space-4); position: relative; overflow: hidden; }
.final__caja .titulo { max-width: 20ch; }
.final__caja p { max-width: 56ch; opacity: .9; font-size: 17px; line-height: 26px; }
.final__caja .tn-btn--secondary { background: var(--on-brand); color: var(--brand); border-color: transparent; min-height: 48px; padding: 0 var(--space-5); font-size: 16px; }
.final__caja .tn-btn--secondary:hover { background: var(--brand-tint); }
.final__caja .tn-btn--enlace { color: var(--on-brand); border-color: color-mix(in srgb, var(--on-brand) 50%, transparent); background: transparent; min-height: 48px; }
.final__caja .tn-btn--enlace:hover { background: color-mix(in srgb, var(--on-brand) 12%, transparent); }
.final__caja :focus-visible { outline-color: var(--on-brand); }
.final__mosaico { position: absolute; right: -20px; bottom: -20px; display: grid; grid-template-columns: repeat(5, 28px); gap: 6px; opacity: .22; transform: rotate(-8deg); pointer-events: none; }
.final__mosaico i { height: 20px; border-radius: var(--radius-xs); background: var(--on-brand); }
.final__mosaico i:nth-child(4n) { background: var(--alba); }

/* ---------- Pie */
.pie { padding: var(--space-7) 0 var(--space-6); border-top: 1px solid var(--line); background: var(--surface-1); }
.pie__rejilla { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: var(--space-6); }
.pie h2 { font: 600 12px/16px var(--font-sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: var(--space-3); }
.pie ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.pie a { color: var(--ink); text-decoration: none; }
.pie a:hover { color: var(--brand); text-decoration: underline; }
.pie__marca p { color: var(--ink-muted); margin-top: var(--space-3); max-width: 36ch; font-size: 14px; line-height: 20px; }
.pie__base { margin-top: var(--space-6); padding-top: var(--space-4); border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-3); font-size: 13px; color: var(--ink-muted); }
@media (max-width: 800px) { .pie__rejilla { grid-template-columns: 1fr 1fr; } .pie__marca { grid-column: 1 / -1; } }

/* ---------- Páginas legales y 404 */
.documento { padding: var(--space-7) 0 96px; }
.documento .contenedor { max-width: 760px; }
.documento h1 { font: 600 36px/42px var(--font-sans); letter-spacing: -0.02em; margin-bottom: var(--space-3); }
.documento h2 { font: 600 21px/28px var(--font-sans); margin: var(--space-6) 0 var(--space-3); }
.documento p, .documento li { color: var(--ink); font-size: 16px; line-height: 26px; }
.documento p + p { margin-top: var(--space-3); }
.documento ul { padding-left: var(--space-5); display: flex; flex-direction: column; gap: var(--space-2); }
.pendiente { background: var(--warn-tint); color: var(--warn); padding: 0 var(--space-1); border-radius: var(--radius-xs); font-family: var(--font-mono); font-size: 14px; }
.error-404 { min-height: 70vh; display: grid; place-items: center; text-align: center; }
.error-404 .tn-empty { max-width: 520px; margin-inline: auto; background: var(--surface-1); }

/* Anchos de las barras (sin atributos style: la CSP no permite estilos en línea) */
.ancho-0 { width: 0%; }
.ancho-2 { width: 2%; }
.ancho-4 { width: 4%; }
.ancho-6 { width: 6%; }
.ancho-8 { width: 8%; }
.ancho-10 { width: 10%; }
.ancho-12 { width: 12%; }
.ancho-14 { width: 14%; }
.ancho-16 { width: 16%; }
.ancho-18 { width: 18%; }
.ancho-20 { width: 20%; }
.ancho-22 { width: 22%; }
.ancho-24 { width: 24%; }
.ancho-26 { width: 26%; }
.ancho-28 { width: 28%; }
.ancho-30 { width: 30%; }
.ancho-32 { width: 32%; }
.ancho-34 { width: 34%; }
.ancho-35 { width: 35%; }
.ancho-36 { width: 36%; }
.ancho-38 { width: 38%; }
.ancho-40 { width: 40%; }
.ancho-42 { width: 42%; }
.ancho-44 { width: 44%; }
.ancho-45 { width: 45%; }
.ancho-46 { width: 46%; }
.ancho-48 { width: 48%; }
.ancho-50 { width: 50%; }
.ancho-52 { width: 52%; }
.ancho-54 { width: 54%; }
.ancho-55 { width: 55%; }
.ancho-56 { width: 56%; }
.ancho-58 { width: 58%; }
.ancho-60 { width: 60%; }
.ancho-62 { width: 62%; }
.ancho-64 { width: 64%; }
.ancho-65 { width: 65%; }
.ancho-66 { width: 66%; }
.ancho-68 { width: 68%; }
.ancho-70 { width: 70%; }
.ancho-72 { width: 72%; }
.ancho-74 { width: 74%; }
.ancho-75 { width: 75%; }
.ancho-76 { width: 76%; }
.ancho-78 { width: 78%; }
.ancho-80 { width: 80%; }
.ancho-82 { width: 82%; }
.ancho-84 { width: 84%; }
.ancho-85 { width: 85%; }
.ancho-86 { width: 86%; }
.ancho-88 { width: 88%; }
.ancho-90 { width: 90%; }
.ancho-92 { width: 92%; }
.ancho-94 { width: 94%; }
.ancho-95 { width: 95%; }
.ancho-96 { width: 96%; }
.ancho-98 { width: 98%; }
.ancho-100 { width: 100%; }
.marca-objetivo-50 { left: 50%; } .marca-objetivo-70 { left: 70%; } .marca-objetivo-75 { left: 75%; } .marca-objetivo-80 { left: 80%; }

/* Festivo: toda la columna teñida con el color de festivo del sistema de diseño (y la palabra para lectores de
   pantalla y en el título de la cabecera). */
.tn-roster .tn-festivo { background-color: var(--holiday-tint); }
.tn-roster thead th.tn-festivo { background-color: var(--holiday-tint); color: var(--holiday); }
.tn-roster thead th.tn-festivo small { color: var(--holiday); }
.leyenda-festivo { display: inline-block; width: 12px; height: 12px; border-radius: var(--radius-xs); vertical-align: -1px; background: var(--holiday-tint); border: 1px solid color-mix(in srgb, var(--holiday) 40%, transparent); }

/* Resumen de reglas bajo el cuadrante (sin la puntuación técnica del optimizador) */
.reglas { display: grid; grid-template-columns: 20px 1fr; gap: var(--space-2); align-items: start; padding: var(--space-3); border-radius: var(--radius-sm); font-size: 13px; line-height: 18px; }
.reglas .tn-icon { width: 20px; height: 20px; }
.reglas b { display: block; font-size: 14px; line-height: 20px; }
.reglas--ok { background: var(--ok-tint); color: var(--ok); }
.reglas--warn { background: var(--warn-tint); color: var(--warn); }
.reglas--brand { background: var(--brand-tint); color: var(--brand); }

.plan__anual { margin-top: calc(-1 * var(--space-3)); font-size: 14px; line-height: 20px; color: var(--ink-muted); }
