/* Formsis · sitio de presentación. Marca v1: Tinta, Sello, Papel; Schibsted Grotesk, Figtree, IBM Plex Mono. */

@font-face { font-family: "Schibsted Grotesk"; src: url("fuentes/schibsted.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fuentes/figtree.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fuentes/plex-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fuentes/plex-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --tinta: #0f1c2e;
  --tinta-2: #15253b;
  --tinta-3: #1d324d;
  --linea-osc: rgba(221, 227, 232, 0.12);
  --sello: #22c17f;
  --sello-prof: #0b7a50;
  --papel: #f4f6f7;
  --blanco: #ffffff;
  --niebla: #dde3e8;
  --pizarra: #4f5d6e;
  --texto-osc: #e8eef3;
  --texto-osc-2: #a3b3c4;
  --azul: #1f4fd1;
  --azul-bg: #e7eefd;
  --ambar: #8a5300;
  --ambar-bg: #fdf1dc;
  --verde: #0e7c52;
  --verde-bg: #e3f6ec;
  --rojo: #b3362e;
  --display: "Schibsted Grotesk", system-ui, sans-serif;
  --ui: "Figtree", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --radio: 14px;
  --ancho: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--ui);
  font-size: 17px;
  line-height: 1.6;
  color: var(--tinta);
  background: var(--papel);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--sello-prof); text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--sello); outline-offset: 3px; border-radius: 6px; }
.oscuro :focus-visible { outline-color: #5fe0a8; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); }
.envoltura { width: min(100% - 32px, var(--ancho)); margin-inline: auto; }
.saltar { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--sello); color: var(--tinta); padding: 10px 16px; border-radius: 8px; font-weight: 700; text-decoration: none; }
.saltar:focus { top: 12px; }

/* ---------- Botones ---------- */
.boton {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px;
  font-weight: 700; font-size: 16px; text-decoration: none; line-height: 1;
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform 0.2s var(--ease), background-color 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.boton svg { width: 18px; height: 18px; transition: transform 0.25s var(--ease); }
.boton:hover svg { transform: translateX(3px); }
.boton:active { transform: scale(0.97); }
.boton-sello { background: var(--sello); color: var(--tinta); }
.boton-sello:hover { background: #3fd394; box-shadow: 0 10px 30px -10px rgba(34, 193, 127, 0.7); }
.boton-linea { border-color: rgba(232, 238, 243, 0.35); color: var(--texto-osc); }
.boton-linea:hover { border-color: var(--texto-osc); background: rgba(255, 255, 255, 0.06); }
.boton-tinta { background: var(--tinta); color: #fff; }
.boton-tinta:hover { background: var(--tinta-3); }
.boton-chico { padding: 10px 16px; font-size: 15px; }

/* ---------- Navegación ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  transition: background-color 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.nav .envoltura { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 72px; }
.nav-logo img { height: 30px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--texto-osc); text-decoration: none; font-weight: 600; font-size: 15px; opacity: 0.85; transition: opacity 0.2s; }
.nav-links a:hover { opacity: 1; }
.nav-links a.boton { opacity: 1; }
.nav.solida { background: rgba(15, 28, 46, 0.95); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); border-color: var(--linea-osc); }
.nav-clara { position: sticky; background: rgba(244, 246, 247, 0.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-color: var(--niebla); }
.nav-clara .nav-links a { color: var(--tinta); }
.progreso { position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; background: var(--sello); transform-origin: 0 50%; transform: scaleX(0); }

@media (max-width: 860px) {
  .nav-links a:not(.boton) { display: none; }
  .nav-links { gap: 10px; }
}

/* ---------- Secciones ---------- */
.oscuro { background: var(--tinta); color: var(--texto-osc); }
.seccion { padding: clamp(80px, 12vw, 150px) 0; position: relative; }
.antetitulo { font-family: var(--mono); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--sello-prof); margin: 0 0 18px; display: inline-flex; align-items: center; gap: 10px; }
.antetitulo::before { content: ""; width: 22px; height: 2px; background: currentColor; border-radius: 2px; }
.oscuro .antetitulo { color: var(--sello); }
.titulo { font-family: var(--display); font-weight: 800; font-size: clamp(36px, 6vw, 76px); line-height: 0.98; letter-spacing: -0.035em; margin: 0; text-wrap: balance; }
.bajada { font-size: clamp(18px, 2vw, 21px); color: var(--pizarra); max-width: 34ch; margin: 22px 0 0; }
.oscuro .bajada { color: var(--texto-osc-2); }

/* Aparición al hacer scroll */
.aparece { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.aparece.visible { opacity: 1; transform: none; }
.aparece[data-retraso="1"] { transition-delay: 0.1s; }
.aparece[data-retraso="2"] { transition-delay: 0.2s; }
.aparece[data-retraso="3"] { transition-delay: 0.3s; }

/* ---------- Hero ---------- */
.hero { min-height: 100svh; display: flex; align-items: center; overflow: hidden; padding: 110px 0 70px; }
#campo { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: 180px; background: linear-gradient(transparent, var(--tinta)); pointer-events: none; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(40px, 6vw, 90px); align-items: center; }
.hero h1 { font-family: var(--display); font-weight: 800; font-size: clamp(42px, 5.8vw, 88px); line-height: 0.94; letter-spacing: -0.045em; margin: 0; }
.hero h1 .linea { display: block; white-space: nowrap; }
.hero h1 .aprob { position: relative; display: inline-block; color: var(--sello); }
.hero h1 .aprob svg { position: absolute; left: -2%; bottom: -0.16em; width: 104%; height: 0.32em; overflow: visible; }
.hero h1 .aprob path { fill: none; stroke: var(--sello); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 600; stroke-dashoffset: 600; animation: trazo 1.4s 0.9s var(--ease) forwards; }
.hero .bajada { margin-top: 28px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-sellos { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 40px; font-family: var(--mono); font-size: 13px; color: var(--texto-osc-2); }
.hero-sellos span { display: inline-flex; align-items: center; gap: 8px; }
.hero-sellos span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--sello); box-shadow: 0 0 0 4px rgba(34, 193, 127, 0.18); }
@keyframes trazo { to { stroke-dashoffset: 0; } }

/* Juguete: armar un formulario */
.juguete { position: relative; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; cursor: grab;
  padding: 9px 14px 9px 10px; border-radius: 999px; font-weight: 600; font-size: 14px;
  background: var(--tinta-2); border: 1px solid rgba(232, 238, 243, 0.18); color: var(--texto-osc);
  transition: background-color 0.2s, border-color 0.2s, transform 0.2s var(--ease), opacity 0.3s;
}
.chip:hover { background: #163a3a; border-color: var(--sello); transform: translateY(-2px); }
.chip:active { cursor: grabbing; }
.chip .glifo { font-family: var(--mono); font-size: 11px; min-width: 26px; height: 22px; padding: 0 5px; border-radius: 6px; display: grid; place-items: center; background: rgba(34, 193, 127, 0.18); color: #7debb9; }
.chip[disabled] { opacity: 0.35; cursor: default; transform: none; }
.chip[disabled] .glifo { background: transparent; }
.ficha {
  position: relative; background: var(--blanco); color: var(--tinta); border-radius: 20px; padding: 22px;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: transform 0.6s var(--ease), box-shadow 0.4s;
  min-height: 420px; display: flex; flex-direction: column;
}
.ficha.soltando { box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.6), 0 0 0 3px var(--sello); }
.ficha-cabeza { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ficha-cabeza strong { font-family: var(--display); font-size: 19px; letter-spacing: -0.01em; }
.barra { height: 6px; border-radius: 6px; background: var(--papel); margin: 14px 0 18px; overflow: hidden; }
.barra i { display: block; height: 100%; width: 0; background: var(--sello); border-radius: inherit; transition: width 0.6s var(--ease); }
.campos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.vacio { flex: 1; display: grid; place-content: center; min-height: 220px; border: 2px dashed var(--niebla); border-radius: 12px; padding: 26px 16px; text-align: center; color: var(--pizarra); font-size: 15px; }
.vacio .mono { display: block; font-size: 22px; color: var(--sello-prof); margin-bottom: 4px; }
.campo { animation: entra 0.55s var(--ease) both; }
.campo label, .campo .etq { display: block; font-size: 12.5px; font-weight: 700; color: var(--pizarra); margin-bottom: 5px; }
.caja { display: flex; align-items: center; gap: 10px; min-height: 44px; border: 1.5px solid var(--niebla); border-radius: 10px; padding: 8px 12px; font-size: 15px; background: #fbfcfc; }
.caja .ok { margin-left: auto; color: var(--verde); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.caja .ok svg { width: 14px; height: 14px; }
.cursor::after { content: ""; display: inline-block; width: 1.5px; height: 1em; background: var(--tinta); margin-left: 2px; vertical-align: -2px; animation: parpadeo 1s steps(1) infinite; }
.bandera { width: 22px; height: 15px; border-radius: 3px; overflow: hidden; flex: none; box-shadow: 0 0 0 1px var(--niebla); }
.archivo { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: center; width: 100%; }
.archivo .pdf { grid-row: span 2; width: 30px; height: 36px; border-radius: 5px; background: var(--rojo); color: #fff; font: 700 9px var(--mono); display: grid; place-items: end center; padding-bottom: 5px; }
.archivo small { color: var(--pizarra); font-size: 12px; }
.archivo .carga { grid-column: 2; height: 4px; border-radius: 4px; background: var(--papel); overflow: hidden; }
.archivo .carga i { display: block; height: 100%; background: var(--sello); animation: llena 1.4s var(--ease) forwards; width: 0; }
.firma svg { width: 100%; height: 56px; }
.firma path { fill: none; stroke: var(--tinta); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 500; stroke-dashoffset: 500; animation: trazo 1.8s var(--ease) forwards; }
.selfie .caja { gap: 14px; }
.ovalo-mini { width: 40px; height: 50px; border-radius: 50%; border: 2.5px solid var(--sello); position: relative; overflow: hidden; flex: none; background: radial-gradient(circle at 50% 40%, #e6ecf1 0 30%, transparent 31%), radial-gradient(ellipse at 50% 110%, #e6ecf1 0 45%, transparent 46%); }
.ovalo-mini::after { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: var(--sello); box-shadow: 0 0 10px var(--sello); animation: escaneo 1.6s ease-in-out infinite alternate; }
.ficha-pie { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.ficha-pie small { color: var(--pizarra); font-family: var(--mono); font-size: 12px; }
.enviar { border: 0; border-radius: 10px; padding: 12px 20px; font-weight: 700; background: var(--tinta); color: #fff; cursor: pointer; transition: background-color 0.2s, opacity 0.2s, transform 0.2s; }
.enviar:hover:not([disabled]) { background: var(--tinta-3); }
.enviar[disabled] { opacity: 0.35; cursor: not-allowed; }
.estado { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; padding: 5px 11px; border-radius: 999px; background: var(--papel); color: var(--pizarra); transition: background-color 0.3s, color 0.3s; white-space: nowrap; }
.estado::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.estado[data-e="enviado"] { background: var(--azul-bg); color: var(--azul); }
.estado[data-e="revision"] { background: var(--ambar-bg); color: var(--ambar); }
.estado[data-e="aprobado"] { background: var(--verde-bg); color: var(--verde); }
.timbre {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; border-radius: 20px;
  background: rgba(255, 255, 255, 0); transition: background-color 0.4s;
}
.timbre .sello-circ { width: 170px; height: 170px; opacity: 0; transform: scale(2.2) rotate(-18deg); }
.ficha.aprobada .timbre { background: rgba(255, 255, 255, 0.72); }
.ficha.aprobada .timbre .sello-circ { animation: timbrar 0.55s cubic-bezier(0.3, 1.6, 0.5, 1) forwards; }
.ficha.aprobada { animation: golpe 0.4s 0.35s ease-out; }
.reiniciar { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); pointer-events: auto; opacity: 0; transition: opacity 0.3s 0.8s; }
.ficha.aprobada .reiniciar { opacity: 1; }
.ficha:not(.aprobada) .reiniciar { visibility: hidden; }

@keyframes entra { from { opacity: 0; transform: translateY(-14px) scale(0.97); } }
@keyframes parpadeo { 50% { opacity: 0; } }
@keyframes llena { to { width: 100%; } }
@keyframes escaneo { from { top: 10%; } to { top: 85%; } }
@keyframes timbrar { to { opacity: 1; transform: scale(1) rotate(-12deg); } }
@keyframes golpe { 30% { transform: scale(0.985) translateY(3px); } }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 120px; }
  .ficha { min-height: 360px; }
}

/* ---------- Cómo funciona (relato con escenario fijo) ---------- */
.relato { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 6vw, 90px); margin-top: 40px; }
.pasos { list-style: none; margin: 0; padding: 0; }
.paso { min-height: 78vh; display: flex; flex-direction: column; justify-content: center; opacity: 0.28; transition: opacity 0.5s; }
.paso.activo { opacity: 1; }
.paso .num { font-family: var(--mono); font-size: 14px; color: var(--sello-prof); }
.paso h3 { font-family: var(--display); font-size: clamp(40px, 5.5vw, 72px); line-height: 1; letter-spacing: -0.04em; margin: 8px 0 14px; }
.paso p { margin: 0; font-size: 19px; color: var(--pizarra); max-width: 26ch; }
.escenario-col { position: relative; }
.escenario { position: sticky; top: 14vh; height: 72vh; max-height: 620px; }
.pantalla { position: relative; height: 100%; border-radius: 24px; background: var(--tinta); overflow: hidden; box-shadow: 0 50px 90px -40px rgba(15, 28, 46, 0.55); }
.pantalla::before { content: ""; position: absolute; inset: 0 0 auto; height: 40px; background: var(--tinta-2); border-bottom: 1px solid var(--linea-osc); z-index: 2; }
.pantalla::after { content: ""; position: absolute; top: 15px; left: 18px; width: 10px; height: 10px; border-radius: 50%; background: #3a4c63; box-shadow: 16px 0 0 #3a4c63, 32px 0 0 #3a4c63; z-index: 3; }
.escena { position: absolute; inset: 40px 0 0; display: grid; place-items: center; padding: 28px; opacity: 0; transform: scale(0.96); transition: opacity 0.5s, transform 0.6s var(--ease); color: var(--texto-osc); }
.escena.on { opacity: 1; transform: none; }
.puntos-paso { position: absolute; right: -26px; top: 50%; transform: translateY(-50%); display: grid; gap: 10px; }
.puntos-paso i { width: 8px; height: 8px; border-radius: 50%; background: var(--niebla); transition: background-color 0.3s, transform 0.3s; }
.puntos-paso i.on { background: var(--sello-prof); transform: scale(1.4); }

/* Escena 1: constructor */
.constructor { display: grid; grid-template-columns: 110px 1fr; gap: 16px; width: 100%; max-width: 520px; }
.paleta { display: grid; gap: 8px; align-content: start; }
.paleta span { font: 500 12px var(--mono); padding: 9px 10px; border-radius: 8px; background: var(--tinta-3); color: var(--texto-osc-2); }
.paleta span:nth-child(2) { background: rgba(34, 193, 127, 0.2); color: #7debb9; }
.lienzo { background: var(--tinta-2); border: 1px dashed rgba(232, 238, 243, 0.22); border-radius: 14px; padding: 16px; display: grid; gap: 12px; align-content: start; min-height: 300px; }
.lienzo .fila { background: var(--tinta-3); border-radius: 10px; padding: 12px; }
.lienzo .fila b { display: block; height: 8px; width: 40%; border-radius: 4px; background: #5f7590; margin-bottom: 9px; }
.lienzo .fila i { display: block; height: 22px; border-radius: 6px; border: 1.5px solid #3a4f6b; }
.lienzo .fila.sel { outline: 2px solid var(--sello); }
.escena.on .lienzo .fila { animation: cae 0.6s var(--ease) both; }
.escena.on .lienzo .fila:nth-child(2) { animation-delay: 0.25s; }
.escena.on .lienzo .fila:nth-child(3) { animation-delay: 0.5s; }
.escena.on .lienzo .fila:nth-child(4) { animation-delay: 0.75s; }
@keyframes cae { from { opacity: 0; transform: translate(-60px, -10px) rotate(-3deg); } }

/* Escena 2: compartir */
.compartir { display: grid; gap: 22px; justify-items: center; }
.enlace { display: inline-flex; align-items: center; gap: 10px; font: 500 15px var(--mono); padding: 12px 16px; border-radius: 12px; background: var(--tinta-3); border: 1px solid var(--linea-osc); }
.enlace b { color: var(--sello); font-weight: 500; }
.qr { width: 190px; height: 190px; padding: 12px; background: #fff; border-radius: 16px; display: grid; grid-template-columns: repeat(21, 1fr); gap: 0; }
.qr i { background: var(--tinta); transform: scale(0); transition: transform 0.3s var(--ease); border-radius: 1px; }
.qr i.blanco { background: transparent; }
.escena.on .qr i { transform: scale(1); }
.avion { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--texto-osc-2); }
.avion svg { width: 22px; height: 22px; color: var(--sello); }
.escena.on .avion svg { animation: vuela 2.4s var(--ease) infinite; }
@keyframes vuela { 0% { transform: translate(0, 0); opacity: 1; } 60% { transform: translate(26px, -16px); opacity: 0; } 61% { transform: translate(-10px, 6px); opacity: 0; } 100% { transform: translate(0, 0); opacity: 1; } }

/* Escena 3: verificar */
.verifica { position: relative; width: 240px; height: 300px; }
.verifica svg { width: 100%; height: 100%; overflow: visible; }
.verifica .anillo { fill: none; stroke: var(--sello); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 820; stroke-dashoffset: 820; }
.escena.on .verifica .anillo { animation: anillo 2.4s 0.3s var(--ease) forwards; }
.verifica .hito { fill: var(--sello); opacity: 0; }
.escena.on .verifica .hito { animation: hito 0.4s forwards; }
.verifica .barrido { fill: url(#gradBarrido); }
.escena.on .verifica .barrido { animation: barre 1.6s ease-in-out 2 alternate; }
.veredicto { position: absolute; left: 50%; bottom: -14px; transform: translate(-50%, 10px); white-space: nowrap; font-weight: 700; font-size: 14px; padding: 8px 14px; border-radius: 999px; background: var(--sello); color: var(--tinta); opacity: 0; display: inline-flex; align-items: center; gap: 6px; }
.veredicto svg { width: 16px; height: 16px; }
.escena.on .veredicto { animation: sube 0.5s 2.6s var(--ease) forwards; }
@keyframes anillo { to { stroke-dashoffset: 0; } }
@keyframes hito { to { opacity: 1; } }
@keyframes barre { from { transform: translateY(0); } to { transform: translateY(220px); } }
@keyframes sube { to { opacity: 1; transform: translate(-50%, 0); } }

/* Escena 4: aprobar */
.cadena { display: grid; gap: 0; width: 100%; max-width: 360px; }
.nivel { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 14px; padding: 10px 0; }
.nivel .nodo { width: 44px; height: 44px; border-radius: 50%; border: 2px solid #3a4f6b; display: grid; place-items: center; transition: background-color 0.4s, border-color 0.4s; }
.nivel .nodo svg { width: 20px; height: 20px; stroke: var(--tinta); opacity: 0; transition: opacity 0.3s; }
.nivel b { font-family: var(--display); font-size: 19px; }
.nivel small { display: block; color: var(--texto-osc-2); font-size: 13px; font-weight: 400; font-family: var(--ui); }
.nivel .mono { font-size: 12px; color: var(--texto-osc-2); }
.union { width: 2px; height: 26px; margin-left: 21px; background: #3a4f6b; position: relative; overflow: hidden; }
.union::after { content: ""; position: absolute; inset: 0; background: var(--sello); transform: scaleY(0); transform-origin: top; transition: transform 0.5s var(--ease); }
.cadena .estado { margin-top: 18px; justify-self: start; }
.nivel.ok .nodo { background: var(--sello); border-color: var(--sello); }
.nivel.ok .nodo svg { opacity: 1; }
.union.ok::after { transform: none; }

@media (max-width: 860px) {
  .relato { grid-template-columns: 1fr; }
  .escenario-col { order: -1; position: sticky; top: 72px; z-index: 2; height: 46vh; }
  .escenario { position: relative; top: 0; height: 100%; }
  .puntos-paso { display: none; }
  .paso { min-height: 60vh; justify-content: flex-start; padding-top: 6vh; }
  .escena { transform: scale(0.8); }
  .escena.on { transform: scale(0.8); }
  .qr { width: 160px; height: 160px; }
}

/* ---------- 27 tipos de campo ---------- */
.tipos-cabeza { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; }
.cifra { font-family: var(--display); font-weight: 900; font-size: clamp(120px, 20vw, 260px); line-height: 0.8; letter-spacing: -0.06em; color: transparent; -webkit-text-stroke: 2px var(--sello); }
.rejilla { display: grid; grid-template-columns: repeat(9, 1fr); gap: 0; margin-top: 56px; background: var(--tinta); border: 1px solid var(--linea-osc); border-radius: 18px; overflow: hidden; position: relative; }
.tipo { background: var(--tinta); box-shadow: 0 0 0 0.5px var(--linea-osc); padding: 22px 16px 18px; min-height: 132px; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; position: relative; isolation: isolate; transition: background-color 0.3s; }
.tipo::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity 0.3s; background: radial-gradient(240px circle at var(--x, 50%) var(--y, 50%), rgba(34, 193, 127, 0.16), transparent 60%); }
.rejilla:hover .tipo::before { opacity: 1; }
.tipo:hover { background: var(--tinta-2); }
.tipo .g { font-family: var(--mono); font-weight: 500; font-size: 26px; color: var(--sello); line-height: 1; transition: transform 0.35s var(--ease); }
.tipo:hover .g { transform: translateY(-4px) scale(1.08); }
.tipo span:last-child { font-weight: 600; font-size: 15px; }
.tipo.diseno .g { color: var(--texto-osc-2); }

/* ---------- Prueba de vida interactiva ---------- */
.vida { background: var(--tinta-2); }
.vida-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 90px); align-items: center; }
.camara { position: relative; aspect-ratio: 4 / 5; max-height: 600px; border-radius: 28px; background: radial-gradient(ellipse at 50% 40%, #223a59, var(--tinta) 70%); overflow: hidden; touch-action: pan-y; cursor: ew-resize; user-select: none; -webkit-user-select: none; }
.camara:focus-visible { outline-offset: 6px; }
.esquinas { position: absolute; inset: 22px; pointer-events: none; }
.esquinas i { position: absolute; width: 34px; height: 34px; border: 3px solid rgba(232, 238, 243, 0.55); }
.esquinas i:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; border-radius: 12px 0 0 0; }
.esquinas i:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; border-radius: 0 12px 0 0; }
.esquinas i:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 12px; }
.esquinas i:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; border-radius: 0 0 12px 0; }
.rostro { position: absolute; inset: 0; display: grid; place-items: center; }
.rostro svg { width: 62%; overflow: visible; }
.rostro .cabeza { fill: #2c4566; stroke: rgba(232, 238, 243, 0.25); stroke-width: 2; }
.rostro .rasgos { transition: transform 0.12s linear; }
.rostro .rasgos * { fill: none; stroke: #c9d6e3; stroke-width: 4; stroke-linecap: round; }
.rostro .rasgos .ojo { fill: #c9d6e3; stroke: none; }
.rostro .guia { fill: none; stroke: rgba(232, 238, 243, 0.4); stroke-width: 3; stroke-dasharray: 10 12; transition: stroke 0.4s; }
.rostro .malla circle { fill: var(--sello); opacity: 0.85; }
.camara.lista .rostro .guia { stroke: var(--sello); stroke-dasharray: none; }
.indicacion { position: absolute; left: 50%; top: 28px; transform: translateX(-50%); padding: 8px 16px; border-radius: 999px; background: rgba(15, 28, 46, 0.75); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); font-weight: 700; font-size: 15px; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.flecha-izq, .flecha-der { position: absolute; top: 50%; transform: translateY(-50%); font: 500 26px var(--mono); color: var(--sello); opacity: 0; transition: opacity 0.3s; }
.flecha-izq { left: 26px; }
.flecha-der { right: 26px; }
.camara[data-reto="izq"] .flecha-izq, .camara[data-reto="der"] .flecha-der { opacity: 1; animation: empuja 1.2s ease-in-out infinite; }
@keyframes empuja { 50% { transform: translate(var(--dx, -6px), -50%); } }
.flecha-der { --dx: 6px; }
.retos { list-style: none; padding: 0; margin: 34px 0 0; display: grid; gap: 12px; }
.retos li { display: flex; align-items: center; gap: 14px; font-size: 18px; font-weight: 600; color: var(--texto-osc-2); transition: color 0.3s; }
.retos li i { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #3a4f6b; display: grid; place-items: center; transition: background-color 0.3s, border-color 0.3s; flex: none; }
.retos li i svg { width: 16px; height: 16px; stroke: var(--tinta); opacity: 0; }
.retos li.ok { color: var(--texto-osc); }
.retos li.ok i { background: var(--sello); border-color: var(--sello); }
.retos li.ok i svg { opacity: 1; }
.resultado-vida { margin-top: 30px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; min-height: 48px; }
.resultado-vida .estado { font-size: 15px; padding: 8px 14px; }
.texto-boton { background: none; border: 0; color: var(--texto-osc-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 6px; font-size: 15px; }
.texto-boton:hover { color: var(--texto-osc); }
.vida-notas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 36px; }
.etiqueta { font: 500 13px var(--mono); padding: 8px 12px; border-radius: 999px; border: 1px solid var(--linea-osc); color: var(--texto-osc-2); display: inline-flex; gap: 8px; align-items: center; }
.etiqueta b { color: var(--sello); font-weight: 500; }

@media (max-width: 860px) {
  .vida-grid { grid-template-columns: 1fr; }
  .camara { max-height: 460px; aspect-ratio: 1 / 1; }
  .rostro svg { width: 44%; }
}

/* ---------- Tu marca ---------- */
.marca-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(40px, 6vw, 90px); align-items: center; }
.muestras { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.muestra { width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer; position: relative; transition: transform 0.25s var(--ease); background: var(--c); }
.muestra:hover { transform: scale(1.1); }
.muestra[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--papel), 0 0 0 5px var(--c); }
.portal {
  --marca: #0f1c2e;
  border-radius: 24px; overflow: hidden; background: #fff;
  box-shadow: 0 50px 90px -40px rgba(15, 28, 46, 0.45), 0 0 0 1px var(--niebla);
}
.portal-cabeza { background: var(--marca); color: #fff; padding: 22px 26px; display: flex; align-items: center; gap: 14px; transition: background-color 0.5s var(--ease); }
.portal-logo { width: 40px; height: 40px; border-radius: 10px; background: rgba(255, 255, 255, 0.16); display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 20px; }
.portal-cabeza strong { font-family: var(--display); font-size: 19px; }
.portal-cuerpo { padding: 26px; display: grid; gap: 14px; }
.portal-pasos { display: flex; gap: 6px; }
.portal-pasos i { flex: 1; height: 5px; border-radius: 5px; background: var(--niebla); }
.portal-pasos i.on { background: var(--marca); transition: background-color 0.5s; }
.portal-cuerpo .caja { color: var(--pizarra); }
.portal-cuerpo .boton-marca { justify-self: end; background: var(--marca); color: #fff; border: 0; border-radius: 10px; padding: 12px 22px; font-weight: 700; transition: background-color 0.5s var(--ease); }
.portal-pie { border-top: 1px solid var(--niebla); padding: 14px 26px; font-size: 12.5px; color: var(--pizarra); display: flex; align-items: center; gap: 8px; }
.portal-pie img { width: 16px; height: 16px; }

@media (max-width: 860px) { .marca-grid { grid-template-columns: 1fr; } }

/* ---------- Control (mosaico) ---------- */
.mosaico { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-top: 56px; }
.tesela { background: #fff; border: 1px solid var(--niebla); border-radius: 22px; padding: 28px; display: flex; flex-direction: column; justify-content: space-between; gap: 26px; min-height: 260px; overflow: hidden; position: relative; transition: transform 0.4s var(--ease), box-shadow 0.4s; }
.tesela:hover { transform: translateY(-4px); box-shadow: 0 30px 60px -30px rgba(15, 28, 46, 0.3); }
.tesela h3 { font-family: var(--display); font-size: 26px; letter-spacing: -0.02em; line-height: 1.05; margin: 0; }
.tesela p { margin: 6px 0 0; color: var(--pizarra); font-size: 15.5px; }
.t-a { grid-column: span 3; }
.t-b { grid-column: span 3; background: var(--tinta); color: var(--texto-osc); border-color: var(--tinta); }
.t-b p { color: var(--texto-osc-2); }
.t-c, .t-d, .t-e { grid-column: span 2; }
.roles { display: flex; gap: 10px; flex-wrap: wrap; }
.rol { padding: 10px 14px; border-radius: 12px; background: var(--papel); font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; }
.rol i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 500 11px var(--mono); color: #fff; background: var(--tinta); font-style: normal; }
.rol:nth-child(2) i { background: var(--sello-prof); }
.rol:nth-child(3) i { background: var(--azul); }
.bitacora { font: 13px/1.9 var(--mono); color: var(--texto-osc-2); margin: 0; padding: 0; list-style: none; }
.bitacora li { display: flex; gap: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bitacora li b { color: var(--sello); font-weight: 500; }
.observado { display: grid; gap: 8px; }
.observado .caja { font-size: 14px; }
.observado .nota { font-size: 13px; background: var(--ambar-bg); color: var(--ambar); padding: 8px 12px; border-radius: 10px; font-weight: 600; }
.niveles-mini { display: flex; align-items: center; gap: 6px; }
.niveles-mini i { width: 34px; height: 34px; border-radius: 50%; background: var(--sello); display: grid; place-items: center; }
.niveles-mini i svg { width: 16px; height: 16px; stroke: var(--tinta); }
.niveles-mini i.no { background: var(--papel); border: 2px dashed var(--niebla); }
.niveles-mini b { width: 18px; height: 2px; background: var(--niebla); }
.exporta { font: 500 13px var(--mono); color: var(--pizarra); display: grid; gap: 6px; }
.exporta span { display: flex; justify-content: space-between; border-bottom: 1px dashed var(--niebla); padding-bottom: 6px; }

@media (max-width: 960px) {
  .mosaico { grid-template-columns: 1fr 1fr; }
  .t-a, .t-b { grid-column: span 2; }
  .t-c, .t-d { grid-column: span 1; }
  .t-e { grid-column: span 2; }
}
@media (max-width: 600px) {
  .mosaico { grid-template-columns: 1fr; }
  .t-a, .t-b, .t-c, .t-d, .t-e { grid-column: auto; }
}

/* ---------- Conexión (webhooks) ---------- */
.conecta { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0; margin-top: 60px; }
.conecta .origen img { width: 84px; height: 84px; border-radius: 22px; box-shadow: 0 0 0 8px rgba(34, 193, 127, 0.12); }
.cables { position: relative; height: 220px; }
.cables svg { width: 100%; height: 100%; overflow: visible; }
.cables path { fill: none; stroke: rgba(232, 238, 243, 0.18); stroke-width: 2; }
.cables .paquete { position: absolute; left: 0; top: 0; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--sello); box-shadow: 0 0 12px var(--sello); opacity: 0; }
.destinos { display: grid; gap: 22px; }
.destino { font: 500 14px var(--mono); padding: 14px 18px; border-radius: 12px; background: var(--tinta-2); border: 1px solid var(--linea-osc); min-width: 140px; transition: border-color 0.3s, color 0.3s; }
.destino.ping { border-color: var(--sello); color: var(--sello); }
.carga-util { margin-top: 44px; font: 13.5px/1.75 var(--mono); background: var(--tinta-2); border: 1px solid var(--linea-osc); border-radius: 16px; padding: 22px 24px; color: var(--texto-osc-2); overflow-x: auto; white-space: pre; }
.carga-util .k { color: #8fb7ff; }
.carga-util .v { color: #7debb9; }
@media (max-width: 760px) {
  .conecta { grid-template-columns: 1fr; justify-items: center; gap: 18px; }
  .cables { display: none; }
  .destinos { grid-template-columns: repeat(3, auto); gap: 10px; }
  .destino { min-width: 0; padding: 10px 12px; font-size: 12.5px; }
}

/* ---------- Cierre ---------- */
.cierre { text-align: center; overflow: hidden; }
.cierre .titulo { font-size: clamp(44px, 8vw, 120px); max-width: 14ch; margin-inline: auto; }
.cierre .titulo em { font-style: normal; color: var(--sello); }
.cierre .hero-cta { justify-content: center; }
.cierre-marca { position: absolute; left: 50%; bottom: -14vw; transform: translateX(-50%); width: 46vw; opacity: 0.035; pointer-events: none; }

/* ---------- Pie ---------- */
.pie { background: var(--tinta); color: var(--texto-osc-2); padding: 56px 0 40px; border-top: 1px solid var(--linea-osc); font-size: 15px; }
.pie-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.pie img { height: 28px; width: auto; }
.pie nav { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.pie a { color: var(--texto-osc); text-decoration: none; }
.pie a:hover { color: var(--sello); }
.pie-legal { margin-top: 36px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 13.5px; }

/* ---------- Páginas de lectura (información y legales) ---------- */
.lectura-cabeza { background: var(--tinta); color: var(--texto-osc); padding: 140px 0 70px; position: relative; overflow: hidden; }
.lectura-cabeza .titulo { font-size: clamp(40px, 6vw, 72px); }
.lectura-cabeza p { color: var(--texto-osc-2); margin: 18px 0 0; max-width: 60ch; }
.lectura-cabeza .meta { font-family: var(--mono); font-size: 13px; margin-top: 22px; }
.lectura { display: grid; grid-template-columns: 250px 1fr; gap: clamp(32px, 6vw, 80px); padding: 64px 0 110px; align-items: start; }
.indice { position: sticky; top: 100px; font-size: 14.5px; }
.indice strong { display: block; font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--pizarra); margin-bottom: 12px; }
.indice ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; border-left: 2px solid var(--niebla); }
.indice a { display: block; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--pizarra); text-decoration: none; line-height: 1.35; }
.indice a:hover { color: var(--tinta); }
.indice a.actual { color: var(--tinta); border-color: var(--sello-prof); font-weight: 700; }
.prosa { max-width: 72ch; }
.prosa h2 { font-family: var(--display); font-size: clamp(28px, 3.4vw, 38px); letter-spacing: -0.025em; line-height: 1.1; margin: 64px 0 16px; scroll-margin-top: 100px; }
.prosa h2:first-child { margin-top: 0; }
.prosa h3 { font-family: var(--display); font-size: 21px; margin: 32px 0 8px; scroll-margin-top: 100px; }
.prosa p, .prosa li { color: #263548; }
.prosa ul, .prosa ol { padding-left: 22px; }
.prosa li { margin: 6px 0; }
.prosa li::marker { color: var(--sello-prof); }
.prosa table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 15.5px; display: block; overflow-x: auto; }
.prosa th, .prosa td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--niebla); vertical-align: top; }
.prosa th { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--pizarra); font-weight: 500; }
.prosa code { font-family: var(--mono); font-size: 0.88em; background: #e9edf0; padding: 2px 6px; border-radius: 5px; }
.aviso { background: var(--ambar-bg); color: #5c3800; border-radius: 14px; padding: 16px 20px; font-size: 15.5px; margin: 0 0 32px; }
.destacado { background: #fff; border: 1px solid var(--niebla); border-radius: 16px; padding: 20px 24px; margin: 22px 0; }
.lista-tipos { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; padding: 0 !important; list-style: none; }
.lista-tipos li { background: #fff; border: 1px solid var(--niebla); border-radius: 10px; padding: 10px 12px; margin: 0; font-size: 15px; }
.lista-tipos li b { display: block; }
.lista-tipos li span { color: var(--pizarra); font-size: 13.5px; }
details { border-bottom: 1px solid var(--niebla); padding: 14px 0; }
summary { cursor: pointer; font-weight: 700; font-size: 17.5px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--mono); color: var(--sello-prof); font-size: 22px; line-height: 1; transition: transform 0.25s; }
details[open] summary::after { transform: rotate(45deg); }
details p { margin: 10px 0 0; }

@media (max-width: 900px) {
  .lectura { grid-template-columns: 1fr; padding-top: 32px; }
  .indice { position: static; }
  .indice ol { display: flex; flex-wrap: wrap; gap: 6px; border: 0; }
  .indice a { border: 1px solid var(--niebla); border-radius: 999px; padding: 6px 12px; margin: 0; background: #fff; font-size: 13.5px; }
  .indice a.actual { border-color: var(--sello-prof); }
}

/* ---------- 404 ---------- */
.error { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: 32px 16px; }
.error .cifra { font-size: clamp(120px, 26vw, 240px); }

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .aparece { opacity: 1; transform: none; }
  .paso { opacity: 1; }
}

.escena.on .verifica .hito:nth-of-type(1) { animation-delay: 0.5s; }
.escena.on .verifica .hito:nth-of-type(2) { animation-delay: 0.7s; }
.escena.on .verifica .hito:nth-of-type(3) { animation-delay: 0.9s; }
.escena.on .verifica .hito:nth-of-type(4) { animation-delay: 1.1s; }
.escena.on .verifica .hito:nth-of-type(5) { animation-delay: 1.3s; }

.etq { display: block; font-size: 12.5px; font-weight: 700; color: var(--pizarra); margin-bottom: 5px; }
.portal-cuerpo .etq { margin-bottom: -8px; }
@media (max-width: 1100px) { .rejilla { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); } }
@media (max-width: 600px) {
  .rejilla { grid-template-columns: repeat(3, 1fr); }
  .tipo { min-height: 104px; padding: 16px 12px 12px; }
  .tipo .g { font-size: 20px; }
  .tipo span:last-child { font-size: 13px; line-height: 1.25; }
}
@media (max-width: 860px) { .paso { opacity: 1; } }
.error .bajada { margin-inline: auto; } .error .hero-cta { justify-content: center; }
.vacio[hidden] { display: none; }
