/* Colores del design system de Colobi (lib/core/theme/tokens.dart). */
:root {
  --primario: #0b6670; --sobre-primario: #fff; --contenedor: #cde9ec; --sobre-contenedor: #08363b;
  --acento: #f0a73a; --sobre-acento: #2b1a00; --fondo: #faf8f4; --texto: #1d2325; --texto-suave: #59605d;
  --borde: #ddd7cb; --tarjeta: #fff; --hundido: #efebe3; --vidrio: rgba(250, 248, 244, .72);
  --aprobar: #2f7d4e; --sobre-aprobar: #fff; --rechazar-bg: #f6d9d3; --rechazar: #7d2415;
  --ok-bg: #d3ebdb; --ok: #14472b; --porteria-bg: #e4daf1; --porteria: #3f2a6b;
  --pendiente-bg: #fbe7b0; --pendiente: #4a3200;
  --titulos: "Cabinet Grotesk", "Plus Jakarta Sans", system-ui, sans-serif;
  color-scheme: light dark;
}
/* Oscuro: por el sistema, salvo que el visitante elija claro; o por elección (botón sol/luna). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --primario: #7fd3db; --sobre-primario: #00363b; --contenedor: #0f4d54; --sobre-contenedor: #cdeff2;
    --fondo: #14191a; --texto: #ede9e1; --texto-suave: #b3ada3; --borde: #2f3839;
    --tarjeta: #1e2526; --hundido: #0e1213; --vidrio: rgba(20, 25, 26, .7);
    --aprobar: #7fcf9b; --sobre-aprobar: #0b2e18; --rechazar-bg: #4a211b; --rechazar: #f6c4bb;
    --ok-bg: #1c3d2a; --ok: #bfe6cb; --porteria-bg: #3a2f52; --porteria: #e1d5f5;
    --pendiente-bg: #4a3a12; --pendiente: #fbe7b0;
  }
}
:root[data-theme="dark"] {
  --primario: #7fd3db; --sobre-primario: #00363b; --contenedor: #0f4d54; --sobre-contenedor: #cdeff2;
  --fondo: #14191a; --texto: #ede9e1; --texto-suave: #b3ada3; --borde: #2f3839;
  --tarjeta: #1e2526; --hundido: #0e1213; --vidrio: rgba(20, 25, 26, .7);
  --aprobar: #7fcf9b; --sobre-aprobar: #0b2e18; --rechazar-bg: #4a211b; --rechazar: #f6c4bb;
  --ok-bg: #1c3d2a; --ok: #bfe6cb; --porteria-bg: #3a2f52; --porteria: #e1d5f5;
  --pendiente-bg: #4a3a12; --pendiente: #fbe7b0;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--fondo); color: var(--texto);
  font: 17px/1.6 "Plus Jakarta Sans", system-ui, sans-serif;
  overflow-x: hidden;
}
a { color: var(--primario); }
img { max-width: 100%; height: auto; }
.contenido { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.angosto { max-width: 760px; }
h1, h2, h3 { font-family: var(--titulos); letter-spacing: -0.02em; }
h1 { font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1.05; margin: 0 0 16px; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); line-height: 1.1; margin: 48px 0 16px; }
h3 { font-size: 22px; line-height: 1.2; margin: 0 0 8px; }

/* Navegación: píldora de vidrio flotante. */
.nav { position: sticky; top: 12px; z-index: 10; padding: 0 12px; }
.nav-pildora {
  max-width: 1100px; margin: 12px auto 0; display: flex; align-items: center; gap: 16px;
  padding: 8px 8px 8px 20px; border-radius: 999px; border: 1px solid var(--borde);
  background: var(--vidrio); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.marca {
  display: inline-flex; align-items: center; gap: 8px; font: 800 22px var(--titulos);
  color: var(--texto); text-decoration: none;
}
.nav nav { display: flex; gap: 20px; margin-left: auto; align-items: center; }
.nav-texto { color: var(--texto); text-decoration: none; font-weight: 600; font-size: 15px; }
.nav-texto:hover { color: var(--primario); }
@media (max-width: 720px) { .nav-texto { display: none; } }
.tema {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--borde); background: transparent;
  color: var(--texto); display: grid; place-items: center; cursor: pointer; padding: 0;
}
.tema:hover { color: var(--primario); border-color: var(--primario); }
.tema svg { width: 20px; height: 20px; }
.tema .sol, [data-theme="dark"] .tema .luna { display: none; }
[data-theme="dark"] .tema .sol { display: block; }

.boton {
  display: inline-block; padding: 16px 28px; border-radius: 999px; font-weight: 700;
  text-decoration: none; background: var(--primario); color: var(--sobre-primario);
  transition: transform .3s ease, box-shadow .3s ease;
}
.boton:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -10px var(--primario); }
.boton.secundario { background: var(--contenedor); color: var(--sobre-contenedor); }
.boton.acento { background: var(--acento); color: var(--sobre-acento); }
.boton-chico { padding: 10px 18px; font-size: 15px; }

.tarjeta { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 24px; padding: 28px; }
.tarjeta p { margin: 0; color: var(--texto-suave); }
.grilla { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.heroe { padding: 64px 0 48px; }
.bajada { font-size: 20px; color: var(--texto-suave); max-width: 640px; margin: 0 0 28px; }
.acciones { display: flex; gap: 12px; flex-wrap: wrap; }
.acento-texto { color: var(--acento); }

details { border-bottom: 1px solid var(--borde); padding: 16px 0; }
summary { font-weight: 700; cursor: pointer; font-size: 18px; }
details p { color: var(--texto-suave); }
.legal { white-space: pre-line; }
.nota { background: var(--contenedor); color: var(--sobre-contenedor); border-radius: 16px; padding: 16px 20px; }

footer { border-top: 1px solid var(--borde); margin-top: 96px; padding: 56px 0; font-size: 15px; color: var(--texto-suave); }
.pie { display: grid; gap: 32px; grid-template-columns: 2fr 1fr 1fr; }
.pie nav { display: flex; flex-direction: column; gap: 8px; }
.pie nav strong { color: var(--texto); }
.pie nav a { color: var(--texto-suave); text-decoration: none; }
.pie nav a:hover { color: var(--primario); }
@media (max-width: 720px) { .pie { grid-template-columns: 1fr 1fr; } .pie > div { grid-column: 1 / -1; } }

/* ---------- Inicio ---------- */
.capitulo { padding: 128px 0; }
@media (max-width: 720px) { .capitulo { padding: 80px 0; } }

.portada { position: relative; text-align: center; padding: 120px 0 0; overflow: hidden; }
.portada::before {
  content: ""; position: absolute; inset: -20% -10% auto; height: 120%; z-index: -1;
  background:
    radial-gradient(40% 50% at 30% 30%, color-mix(in srgb, var(--primario) 28%, transparent), transparent 70%),
    radial-gradient(30% 40% at 75% 25%, color-mix(in srgb, var(--acento) 22%, transparent), transparent 70%);
  filter: blur(40px);
}
.portada h1 { max-width: 72rem; margin: 0 auto 24px; font-size: clamp(2.6rem, 5.2vw, 5.4rem); }
.portada .bajada { margin: 0 auto 36px; }
.portada .acciones { justify-content: center; }

/* Capturas reales de la app en marcos de teléfono y tablet. */
.escena { position: relative; max-width: 980px; margin: 80px auto 0; padding-right: 120px; }
.tableta { border-radius: 28px; padding: 12px; background: #0e1213; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .45), inset 0 0 0 2px #2f3839; }
.tableta img, .telefono img { display: block; width: 100%; height: auto; }
.tableta img { border-radius: 18px; }
.telefono { width: 280px; border-radius: 44px; padding: 10px; background: #0e1213; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .45), inset 0 0 0 2px #2f3839; }
.telefono img { border-radius: 34px; }
.escena .telefono { position: absolute; right: 0; bottom: -64px; width: 260px; }
@media (max-width: 720px) {
  .escena { padding-right: 0; margin-bottom: 120px; }
  .escena .telefono { width: 150px; padding: 6px; border-radius: 28px; right: -4px; bottom: -110px; }
  .escena .telefono img { border-radius: 22px; }
  .escena .tableta { padding: 6px; border-radius: 16px; }
  .escena .tableta img { border-radius: 11px; }
}
.chip { border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.porteria { background: var(--porteria-bg); color: var(--porteria); }
.fila { display: flex; justify-content: space-between; align-items: center; gap: 8px; text-align: left; background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 16px; padding: 12px 14px; font-size: 14px; }
.fila b { display: block; font-size: 15px; }
.fila small { color: var(--texto-suave); }

/* Revelado de texto al hacer scroll. */
.manifiesto { font: 700 clamp(1.8rem, 3.6vw, 3.2rem)/1.25 var(--titulos); max-width: 64rem; margin: 0 auto; letter-spacing: -0.02em; }
.manifiesto span { display: inline; }

/* Imágenes dentro del título: estados reales de la visita. */
.en-linea { display: inline-block; vertical-align: middle; border-radius: 999px; padding: .1em .55em; font-size: .55em; font-family: "Plus Jakarta Sans", sans-serif; font-weight: 700; letter-spacing: 0; margin: 0 .15em; }

/* Bento: 4 columnas x 3 filas = 12 celdas; A 2x2, chat 1x2, B 1x1, D 1x1, E 4x1. */
.bento { display: grid; gap: 16px; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(220px, auto); grid-auto-flow: dense; }
.bento .tarjeta { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; transition: transform .7s cubic-bezier(.2, .8, .2, 1), border-color .3s; }
.bento .tarjeta:hover { transform: translateY(-4px); border-color: var(--primario); }
.b-chat { grid-row: span 2; justify-content: flex-start !important; padding-bottom: 28px; }
.b-chat img { width: 70%; margin: 0 auto 20px; border-radius: 20px; border: 1px solid var(--borde); transition: transform .7s cubic-bezier(.2, .8, .2, 1); }
.b-chat:hover img { transform: scale(1.04); }
.b-a { grid-column: span 2; grid-row: span 2; background: linear-gradient(160deg, var(--contenedor), var(--tarjeta) 70%); }
.b-e { grid-column: span 4; flex-direction: row !important; align-items: center; gap: 32px; background: var(--hundido); }
.b-e > div { flex: 1; }
.b-a .mini { display: grid; gap: 10px; margin-bottom: 28px; max-width: 380px; }
.b-a h3 { font-size: clamp(26px, 3vw, 36px); }
.numero { font: 800 56px/1 var(--titulos); color: var(--primario); margin-bottom: 12px; }
@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .b-a, .b-e { grid-column: span 2; }
  .b-a { grid-row: span 1; }
  .b-e { flex-direction: column !important; align-items: flex-start; }
}

/* Comparación con el citófono: la columna de Colobi resaltada. */
.vs { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; margin-top: 40px; font-size: 17px; }
.vs th, .vs td { padding: 20px 24px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--borde); }
.vs thead th { font: 800 22px var(--titulos); border-bottom: 2px solid var(--borde); }
.vs thead .vs-colobi { color: var(--sobre-contenedor); border-radius: 24px 24px 0 0; border-bottom-color: transparent; }
.vs tbody th { font: 700 18px var(--titulos); }
.vs td { line-height: 1.4; }
.vs thead td { width: 24%; }
.vs td svg { width: 22px; height: 22px; fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; margin-right: 10px; vertical-align: -5px; }
.vs-viejo { color: var(--texto-suave); }
.vs-viejo svg { stroke: var(--rechazar); opacity: .7; }
.vs .vs-colobi { background: var(--contenedor); color: var(--sobre-contenedor); font-weight: 600; border-bottom-color: color-mix(in srgb, var(--sobre-contenedor) 15%, transparent); }
.vs-colobi svg { stroke: var(--primario); }
.vs tbody tr:last-child .vs-colobi { border-radius: 0 0 24px 24px; border-bottom: 0; }
.vs tbody tr { transition: background .3s; }
.vs tbody tr:hover th, .vs tbody tr:hover .vs-viejo { background: var(--hundido); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .vs-colobi svg { stroke: var(--sobre-contenedor); } }
:root[data-theme="dark"] .vs-colobi svg { stroke: var(--sobre-contenedor); }
@media (max-width: 720px) {
  .vs thead { display: none; }
  .vs, .vs tbody, .vs tr, .vs th, .vs td { display: block; width: 100%; }
  .vs tbody tr { border: 1px solid var(--borde); border-radius: 20px; overflow: hidden; margin-bottom: 12px; }
  .vs th, .vs td { border-bottom: 0; padding: 14px 18px; }
  .vs tbody th { padding-bottom: 4px; }
  .vs .vs-colobi, .vs tbody tr:last-child .vs-colobi { border-radius: 0; }
  .vs td.vs-viejo::before { content: "Citófono: "; font-weight: 700; }
  .vs td.vs-colobi::before { content: "Colobi: "; font-weight: 800; }
}

/* Pasos con capturas que crecen al entrar. */
.pasos-grandes { display: grid; gap: 96px; }
.paso { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.paso:nth-child(even) .paso-texto { order: 2; }
.paso-texto .numero { color: var(--acento); }
.paso-texto p { font-size: 19px; color: var(--texto-suave); max-width: 460px; }
.paso .telefono, .paso .tableta { margin: 0 auto; }
.paso .tableta { width: 100%; }
.aviso {
  width: 100%; padding: clamp(32px, 6vw, 72px) clamp(16px, 4vw, 40px); border-radius: 32px;
  background: radial-gradient(80% 90% at 30% 20%, color-mix(in srgb, var(--acento) 45%, var(--primario)), var(--primario));
}
.aviso img { display: block; width: 100%; height: auto; border-radius: 26px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .5); }
@media (max-width: 720px) { .paso { grid-template-columns: 1fr; } .paso:nth-child(even) .paso-texto { order: 0; } }

/* Unidades que desfilan en dos filas opuestas, como los botones de la app. */
.unidades .bajada { margin-bottom: 40px; }
.desfile {
  display: grid; gap: 16px; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.desfile-pista { display: flex; gap: 16px; width: max-content; animation: desfile 50s linear infinite; }
.desfile-pista.inversa { animation-direction: reverse; animation-duration: 60s; }
.desfile:hover .desfile-pista { animation-play-state: paused; }
.unidad-chip {
  display: inline-flex; align-items: center; gap: 12px; padding: 18px 26px; border-radius: 20px;
  font: 700 clamp(18px, 2vw, 24px) var(--titulos); white-space: nowrap;
  background: var(--tarjeta); border: 1px solid var(--borde); color: var(--texto);
}
.desfile-pista:not(.inversa) .unidad-chip:nth-child(3n + 1), .desfile-pista.inversa .unidad-chip:nth-child(3n + 2) {
  background: var(--contenedor); border-color: transparent; color: var(--sobre-contenedor);
}
.unidad-chip svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
@keyframes desfile { to { transform: translateX(-50%); } }

/* Roles: qué hace cada uno y qué no ve. */
.roles { display: grid; gap: 16px; grid-template-columns: repeat(4, 1fr); margin-top: 40px; }
.rol-tarjeta {
  background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 28px; padding: 32px 28px;
  display: flex; flex-direction: column; gap: 16px; transition: transform .5s cubic-bezier(.2, .8, .2, 1), border-color .3s;
}
.rol-tarjeta:hover { transform: translateY(-6px); border-color: var(--primario); }
.rol-icono { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--contenedor); color: var(--sobre-contenedor); }
.rol-icono svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rol-tarjeta h3 { margin: 0; font-size: 24px; }
.rol-tarjeta ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; font-size: 16px; }
.rol-tarjeta li { padding-left: 26px; position: relative; }
.rol-tarjeta li::before { content: ""; position: absolute; left: 0; top: .45em; width: 12px; height: 7px; border-left: 2.5px solid var(--primario); border-bottom: 2.5px solid var(--primario); transform: rotate(-45deg); }
.no-ve { margin: auto 0 0; padding-top: 16px; border-top: 1px dashed var(--borde); font-size: 15px; color: var(--texto-suave); }
.no-ve strong { color: var(--texto); }
@media (max-width: 1000px) { .roles { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .roles { grid-template-columns: 1fr; } }

/* Precios. */
.precios { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 40px; }
.plan { border-radius: 32px; padding: 40px; border: 1px solid var(--borde); background: var(--tarjeta); display: flex; flex-direction: column; gap: 20px; }
.plan.destacado { background: var(--primario); color: var(--sobre-primario); border-color: transparent; }
.plan.destacado .plan-nota, .plan.destacado li { color: var(--sobre-primario); }
.plan.destacado .boton { background: var(--sobre-primario); color: var(--primario); }
.precio { font: 800 clamp(48px, 6vw, 72px)/1 var(--titulos); letter-spacing: -0.03em; }
.precio small { font: 600 18px "Plus Jakarta Sans", sans-serif; letter-spacing: 0; }
.fundadores { margin: 0; padding: 14px 18px; border-radius: 16px; font-size: 15px; background: color-mix(in srgb, var(--acento) 22%, transparent); }
.plan.destacado .fundadores { color: var(--sobre-primario); }
.tarifas { width: 100%; border-collapse: collapse; font-size: 17px; }
.tarifas caption { text-align: left; font: 800 22px var(--titulos); margin-bottom: 12px; }
.tarifas th, .tarifas td { padding: 14px 8px; text-align: left; border-bottom: 1px solid var(--borde); }
.tarifas thead th { font-size: 14px; color: var(--texto-suave); font-weight: 600; }
.tarifas tbody th { font-weight: 600; }
.tarifas td { font: 700 18px var(--titulos); white-space: nowrap; }
.tarifas tbody tr { transition: background .25s; }
.tarifas tbody tr:hover { background: var(--hundido); }
.tarifas .medida td { white-space: normal; }
.ahorro { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--ok-bg); color: var(--ok); }
.plan ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.plan li { padding-left: 28px; position: relative; color: var(--texto-suave); }
.plan li::before { content: ""; position: absolute; left: 0; top: .5em; width: 14px; height: 8px; border-left: 3px solid var(--acento); border-bottom: 3px solid var(--acento); transform: rotate(-45deg); }
.plan-nota { color: var(--texto-suave); margin: 0; font-size: 15px; }
.plan .boton { align-self: flex-start; margin-top: auto; }
@media (max-width: 900px) { .precios { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) {
  .plan { padding: 28px 20px; border-radius: 24px; }
  .precio { font-size: 44px; }
  .tarifas { font-size: 15px; }
  .tarifas td { font-size: 16px; }
  .tarifas th, .tarifas td { padding: 12px 4px; }
}

/* Llamado final. */
.cierre { border-radius: 40px; padding: clamp(48px, 8vw, 112px) 24px; text-align: center; background: var(--texto); color: var(--fondo); position: relative; overflow: hidden; }
.cierre::after { content: ""; position: absolute; inset: auto -20% -60% -20%; height: 100%; background: radial-gradient(50% 50% at 50% 50%, color-mix(in srgb, var(--acento) 35%, transparent), transparent 70%); pointer-events: none; }
.cierre h2 { font-size: clamp(2.4rem, 6vw, 5rem); margin: 0 auto 32px; max-width: 60rem; position: relative; }
.cierre .acciones { justify-content: center; position: relative; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .desfile-pista { animation: none; }
  .boton, .bento .tarjeta, .rol-tarjeta { transition: none; }
}
