:root {
  --bg: #F5F7FB;
  --surface: #FCFDFF;
  --sunken: #EAF0F8;
  --line: #DCE3EE;
  --ink: #0D1633;
  --muted: #4A5573;
  --accent: #1F4FE0;
  --accent-dark: #0A1E7A;
  --sky: #4CC6F7;
  --ok: #1E7A4F;
  --ok-bg: #E3F3EA;
  --on-ink-muted: #B9C3DA;
  --body-ink: #2A3350;
  --g1: #86CDF8;
  --g2: #2F6FE3;
  --g3: #091C78;
  --gutter: 20px;
  --max: 1120px;
  --r-card: 20px;
  --r-btn: 14px;
  --r-chip: 8px;
  --shadow: 0 1px 3px rgba(13, 22, 51, .06), 0 8px 24px rgba(13, 22, 51, .04);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --display: "Sora", "Figtree", sans-serif;
  --text: "Figtree", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(900px 520px at 85% -120px, rgba(76, 198, 247, .18), transparent 70%),
    radial-gradient(700px 420px at -10% 0, rgba(31, 79, 224, .08), transparent 70%),
    var(--bg);
  color: var(--ink);
  font: 400 16px/1.5 var(--text);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* Encabezado */
.top {
  position: sticky; top: 0; z-index: 10;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.top.scrolled { border-bottom-color: var(--line); background: var(--bg); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); min-height: 44px; }
.brand img { width: 32px; height: 32px; }
.brand span { font: 700 18px/1 var(--display); letter-spacing: -0.02em; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 24px; }
.nav a.link { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 16px; display: none; }
.nav a.link:hover { color: var(--ink); }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: var(--r-btn);
  font: 600 16px/1 var(--text); text-decoration: none; cursor: pointer; border: 0;
  transition: transform .12s var(--ease), background-color .15s var(--ease);
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: var(--surface); }
.btn-primary:active { background: var(--accent-dark); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: 16px; }
@media (hover: hover) {
  .btn-primary:hover { background: var(--accent-dark); }
  .btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--muted); }
}

/* Héroe */
.hero { position: relative; padding: 32px 0 24px; overflow: hidden; }
.hero .arco {
  position: absolute; right: -150px; top: -40px; width: 280px; height: 280px;
  pointer-events: none; opacity: .55;
}
.hero .wrap { position: relative; }
.kicker {
  display: inline-flex; align-items: center; gap: 8px; width: fit-content;
  padding: 4px 12px; border-radius: var(--r-chip); background: var(--sunken);
  color: var(--muted); font: 600 13px/1.4 var(--text);
}
.kicker::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
h1 {
  font: 700 32px/1.1 var(--display); letter-spacing: -0.02em;
  margin: 16px 0 16px; max-width: 14ch; text-wrap: balance;
}
h1 em { font-style: normal; color: var(--accent); white-space: nowrap; }
.lead { font-size: 16px; color: var(--muted); max-width: 46ch; margin: 0 0 32px; }
.lead strong { color: var(--ink); font-weight: 600; }
.acciones { display: flex; flex-direction: column; gap: 12px; }
.acciones .btn { width: 100%; }
.pruebas { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 32px; padding: 0; list-style: none; color: var(--muted); font-size: 16px; }
.pruebas li { display: flex; align-items: center; gap: 8px; }
.pruebas svg { width: 16px; height: 16px; color: var(--ink); flex: none; }

/* Secciones */
section { padding: 48px 0; }
.sec-head { margin-bottom: 32px; max-width: 640px; }
h2 { font: 700 22px/1.2 var(--display); letter-spacing: -0.02em; margin: 0 0 8px; text-wrap: balance; }
.sec-head p { color: var(--muted); margin: 0; }
h3 { font: 600 18px/1.3 var(--display); letter-spacing: -0.01em; margin: 0; }

/* Productos */
.productos { display: grid; gap: 16px; }
.producto {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; min-width: 0;
  position: relative; overflow: hidden;
}
.producto::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--g1), var(--g2) 55%, var(--g3)); }
.producto .fila { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.chip { display: inline-flex; width: fit-content; padding: 4px 8px; border-radius: var(--r-chip); background: var(--sunken); color: var(--muted); font: 600 13px/1.4 var(--text); white-space: nowrap; }
.chip.vivo { background: var(--ok-bg); color: var(--ok); }
.producto p { margin: 0; color: var(--muted); }
.producto ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 16px; }
.producto li { display: flex; gap: 8px; align-items: flex-start; }
.producto li svg { width: 18px; height: 18px; margin-top: 3px; color: var(--ink); flex: none; }
.producto .para { font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; margin-top: auto; }
.producto a.mas { font-weight: 600; font-size: 16px; min-height: 44px; display: inline-flex; align-items: center; }

/* Servicios */
.servicios { display: grid; gap: 24px; }
.servicio { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start; }
.icono { width: 44px; height: 44px; border-radius: var(--r-btn); background: var(--sunken); color: var(--ink); display: grid; place-items: center; }
.icono svg { width: 22px; height: 22px; }
.servicio p { margin: 4px 0 0; color: var(--muted); font-size: 16px; }

/* Método */
.franja { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pasos { display: grid; gap: 24px; counter-reset: paso; }
.paso { padding-left: 48px; position: relative; }
.paso::before {
  counter-increment: paso; content: counter(paso);
  position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%;
  background: var(--ink); color: var(--surface); display: grid; place-items: center;
  font: 600 13px/1 var(--display); font-variant-numeric: tabular-nums;
}
.paso p { margin: 4px 0 0; color: var(--muted); font-size: 16px; }

/* Contacto */
.contacto {
  background: var(--ink); color: var(--bg); border-radius: var(--r-card); padding: 32px 24px;
  display: grid; gap: 24px; position: relative; overflow: hidden;
}
.contacto h2 { color: var(--surface); }
.contacto p { color: var(--on-ink-muted); margin: 0; }
.contacto .btn-primary { background: var(--surface); color: var(--ink); }
.contacto .btn-primary:active { background: var(--sunken); }
@media (hover: hover) { .contacto .btn-primary:hover { background: var(--sunken); } .btn-ghost-claro:hover { box-shadow: inset 0 0 0 1.5px var(--surface); } }
.acciones-contacto { display: grid; gap: 12px; }
.btn-ghost-claro { background: transparent; color: var(--surface); box-shadow: inset 0 0 0 1.5px var(--on-ink-muted); width: 100%; overflow-wrap: anywhere; }
.contacto .btn-primary { width: 100%; }
.contacto .aviso { min-height: 20px; font-size: 13px; color: var(--on-ink-muted); text-align: center; }

/* Pie */
footer { padding: 48px 0 32px; color: var(--muted); font-size: 13px; }
footer .wrap { display: grid; gap: 16px; }
footer .legal-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
footer .legal-links a { color: var(--ink); font-weight: 600; font-size: 13px; min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; }
footer p { margin: 0; }

/* Páginas legales */
.doc { padding: 32px 0 64px; }
.doc .wrap { max-width: 760px; }
.doc h1 { max-width: none; font-size: 32px; }
.doc .meta { color: var(--muted); font-size: 13px; margin: 0 0 32px; }
.doc h2 { font-size: 22px; margin: 40px 0 12px; scroll-margin-top: 80px; }
.doc h3 { font-size: 16px; margin: 24px 0 8px; }
.doc p, .doc li { color: var(--body-ink); }
.doc ul { padding-left: 20px; }
.doc li { margin-bottom: 8px; }
.doc .resumen { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 24px; margin-bottom: 32px; }
.doc .resumen p { margin: 0 0 8px; }
.doc .resumen p:last-child { margin: 0; }
.doc table { width: 100%; border-collapse: collapse; font-size: 13px; display: block; overflow-x: auto; }
.doc th, .doc td { text-align: left; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { color: var(--ink); font-weight: 600; }

/* Entrada escalonada */
.aparece { opacity: 0; transform: translateY(12px); animation: entra .5s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes entra { to { opacity: 1; transform: none; } }
.js .revela { opacity: 0; transform: translateY(12px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.js .revela.visto { opacity: 1; transform: none; }
.arco path.traza { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: dibuja 1.4s var(--ease) .2s forwards; }
@keyframes dibuja { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .aparece { transform: none; animation-name: funde; }
  .js .revela, .js .revela.visto { transform: none; }
  .js .revela { transition: opacity .3s linear; }
  .arco path.traza { animation: none; stroke-dashoffset: 0; }
  html { scroll-behavior: auto; }
}
@keyframes funde { to { opacity: 1; } }

/* Escritorio */
@media (min-width: 720px) {
  .nav a.link { display: inline-flex; }
  h1 { font-size: 48px; }
  .hero { padding: 80px 0 96px; }
  section { padding: 64px 0; }
  .hero .arco { right: -40px; top: -60px; width: 640px; height: 640px; opacity: .8; }
  .acciones { flex-direction: row; }
  .acciones .btn { width: auto; }
  h2 { font-size: 32px; }
  h3 { font-size: 22px; }
  .productos { grid-template-columns: repeat(3, 1fr); }
  .servicios { grid-template-columns: repeat(2, 1fr); gap: 32px 48px; }
  .pasos { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .contacto { grid-template-columns: 1.2fr 1fr; padding: 48px; align-items: center; }
  footer .wrap { grid-template-columns: 1fr auto; align-items: start; }
}
