@font-face { font-family: "Sora"; src: url(/fonts/sora.woff2) format("woff2"); font-weight: 100 800; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url(/fonts/instrument-sans.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }
:root {
  --vacio: #050914;
  --noche: #0b1230;
  --papel: #eaf2ff;
  --tenue: #a3b4d6;
  --linea: rgb(234 242 255 / .14);
  --aurora: #34d6c3;
  --alba: #ffc872;
  --indigo: #7aa8ff;
  --f-marca: "Sora", "Segoe UI", system-ui, sans-serif;
  --f-texto: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; background: var(--vacio); }
body { margin: 0; color: var(--papel); font-family: var(--f-texto); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--alba); outline-offset: 4px; border-radius: 8px; }
.visualmente-oculto { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.envoltura { width: min(1180px, 100%); margin-inline: auto; padding-inline: clamp(20px, 5vw, 40px); }

/* Cielo */
#cielo { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; pointer-events: none; }
.velo { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(50% 45% at 82% 8%, rgb(122 168 255 / .20), transparent 70%),
    radial-gradient(55% 50% at 6% 92%, rgb(52 214 195 / .15), transparent 70%),
    radial-gradient(40% 35% at 55% 100%, rgb(255 200 114 / .08), transparent 70%); }

/* Cabecera */
.cabecera { position: sticky; top: 0; z-index: 10; background: linear-gradient(to bottom, rgb(5 9 20 / .85), rgb(5 9 20 / 0)); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.cabecera .envoltura { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; }
.marca { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-family: var(--f-marca); font-size: 20px; line-height: 1; letter-spacing: .02em; }
.marca b { font-weight: 600; }
.marca span { font-weight: 400; opacity: .8; }
.marca svg { width: 38px; height: 38px; }
nav { display: flex; align-items: center; gap: clamp(8px, 2.4vw, 28px); }
nav a { text-decoration: none; color: var(--tenue); font-size: 15px; padding: 8px 4px; }
nav a:hover { color: var(--papel); }
nav a.entrar { color: var(--papel); border: 1px solid var(--linea); border-radius: 999px; padding: 9px 20px; transition: border-color .2s, background .2s; }
nav a.entrar:hover { border-color: var(--aurora); background: rgb(52 214 195 / .08); }
@media (max-width: 760px) { nav a:not(.entrar) { display: none; } }

/* Botones */
.boton { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px; border-radius: 999px; font-weight: 600; font-size: 16px; text-decoration: none; border: 1px solid transparent; transition: transform .2s, box-shadow .2s, border-color .2s, background .2s; }
.boton.principal { color: #04121f; background: linear-gradient(100deg, var(--aurora), var(--indigo)); box-shadow: 0 12px 34px -14px var(--aurora); }
.boton.principal:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -14px var(--aurora); }
.boton.suave { color: var(--papel); border-color: var(--linea); }
.boton.suave:hover { border-color: var(--papel); }

/* Portada */
.portada { position: relative; min-height: min(100svh, 880px); display: flex; align-items: center; padding-block: 24px 72px; }
.portada .envoltura { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(16px, 4vw, 56px); align-items: center; }
.portada h1 { font-family: var(--f-marca); font-weight: 300; font-size: clamp(44px, 7.2vw, 104px); line-height: .98; letter-spacing: -.04em; text-wrap: balance; }
.portada .bajada { margin-top: 28px; max-width: 46ch; font-size: clamp(18px, 1.8vw, 21px); color: var(--tenue); }
.portada .acciones { margin-top: 38px; display: flex; flex-wrap: wrap; gap: 14px; }
.escena { position: relative; justify-self: end; width: min(100%, 600px); aspect-ratio: 1; }
.escena canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.escena .halo { position: absolute; inset: 6%; border-radius: 50%; background: radial-gradient(closest-side, rgb(122 168 255 / .16), transparent 72%); filter: blur(14px); }
@media (max-width: 900px) {
  .portada { min-height: 0; padding-top: 8px; }
  .portada .envoltura { grid-template-columns: 1fr; }
  .escena { order: -1; width: min(86%, 420px); justify-self: center; margin-bottom: -12px; }
}

/* Secciones */
.seccion { padding-block: clamp(72px, 11vw, 150px); }
.seccion h2 { font-family: var(--f-marca); font-weight: 300; font-size: clamp(32px, 4.6vw, 60px); line-height: 1.05; letter-spacing: -.03em; max-width: 18ch; text-wrap: balance; }
.seccion .intro { margin-top: 22px; max-width: 52ch; color: var(--tenue); }

/* Módulos: constelación */
.mapa { position: relative; margin-top: clamp(48px, 7vw, 88px); }
.modulos { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.modulo { padding-inline: 6px; }
.modulo:nth-child(2n) { margin-top: 70px; }
.modulo .fig { width: 120px; height: 120px; display: block; margin-bottom: 14px; margin-left: -10px; }
.modulo .fig canvas { width: 100%; height: 100%; display: block; }
.modulo h3 { font-family: var(--f-marca); font-size: 19px; line-height: 1.2; font-weight: 600; letter-spacing: .01em; }
.modulo h3 span { font-weight: 400; opacity: .8; }
.modulo .estado { display: inline-block; margin-top: 8px; font-size: 13.5px; color: var(--aurora); }
.modulo .estado.pronto { color: var(--tenue); }
.modulo p { margin-top: 10px; color: var(--tenue); font-size: 15.5px; max-width: 24ch; }
@media (max-width: 960px) {
  .modulos { grid-template-columns: 1fr; gap: 40px; padding-left: 8px; }
  .modulo:nth-child(2n) { margin-top: 0; }
  .modulo { display: grid; grid-template-columns: 96px 1fr; column-gap: 20px; align-items: start; }
  .modulo .fig { width: 96px; height: 96px; margin: 0; grid-row: span 3; }
  .modulo p { max-width: 40ch; }
}

/* Personas */
.personas-cuerpo { margin-top: clamp(32px, 5vw, 64px); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 72px); align-items: start; }
.retrato { position: sticky; top: 110px; aspect-ratio: 1; width: 100%; max-width: 480px; }
.retrato canvas { width: 100%; height: 100%; display: block; }
.personas { border-top: 1px solid var(--linea); }
.persona { display: grid; gap: 10px; padding-block: clamp(24px, 3.4vw, 40px); border-bottom: 1px solid var(--linea); cursor: default; opacity: .55; transition: opacity .35s; outline-offset: -4px; }
.persona h3 { font-family: var(--f-marca); font-weight: 300; font-size: clamp(28px, 3.6vw, 44px); letter-spacing: -.03em; line-height: 1.05; }
.persona p { color: var(--tenue); max-width: 46ch; }
.persona.activa, .persona:hover, .persona:focus-visible { opacity: 1; }
@media (max-width: 900px) {
  .personas-cuerpo { grid-template-columns: 1fr; }
  .retrato { position: sticky; top: 64px; z-index: 2; height: 38svh; aspect-ratio: auto; max-width: none; background: linear-gradient(to bottom, var(--vacio) 0 80%, transparent); }
}

/* Instituciones */
.instituciones .envoltura { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 7vw, 100px); align-items: start; }
.puntos { display: grid; gap: 34px; }
.punto { display: grid; grid-template-columns: 22px 1fr; gap: 18px; }
.punto svg { width: 22px; height: 22px; margin-top: 4px; overflow: visible; }
.punto circle { fill: var(--alba); filter: drop-shadow(0 0 3px var(--alba)); }
.punto h3 { font-family: var(--f-marca); font-weight: 600; font-size: 19px; letter-spacing: .01em; }
.punto p { margin-top: 6px; color: var(--tenue); max-width: 44ch; }
.instituciones .acciones { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 14px; }
@media (max-width: 860px) { .instituciones .envoltura { grid-template-columns: 1fr; } }

/* Pie */
.pie { border-top: 1px solid var(--linea); padding-block: 36px 48px; color: var(--tenue); font-size: 14.5px; }
.pie .envoltura { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.pie a { text-underline-offset: 4px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
    .boton, .persona { transition: none; }
}

/* Cierre */
.cierre { text-align: center; padding-bottom: clamp(80px, 12vw, 160px); }
.cierre .envoltura { display: flex; flex-direction: column; align-items: center; }
.sello { width: min(70vw, 340px); aspect-ratio: 1; }
.sello canvas { width: 100%; height: 100%; display: block; }
.cierre h2 { margin-top: 12px; max-width: 20ch; }
.cierre .acciones { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

/* bordes suaves: los lienzos se funden con el cielo */
.escena canvas, .modulo .fig canvas { -webkit-mask-image: radial-gradient(closest-side, #000 82%, transparent 100%); mask-image: radial-gradient(closest-side, #000 82%, transparent 100%); }
@media (max-width: 900px) { .retrato canvas { -webkit-mask-image: radial-gradient(closest-side, #000 88%, transparent 100%); mask-image: radial-gradient(closest-side, #000 88%, transparent 100%); } }

/* ---------- Por qué Atlas ---------- */
.razones { margin-top: clamp(40px, 6vw, 72px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(32px, 6vw, 96px); border-top: 1px solid var(--linea); }
.razon { display: grid; grid-template-columns: 40px 1fr; gap: 18px; padding-block: clamp(26px, 3.2vw, 40px); border-bottom: 1px solid var(--linea); }
.razon svg { width: 40px; height: 40px; overflow: visible; margin-top: 2px; }
.razon path { fill: none; stroke: rgb(190 212 255 / .55); stroke-width: .9; }
.razon circle { fill: #eaf2ff; filter: drop-shadow(0 0 4px rgb(160 190 255 / .9)); }
.razon circle[r="2.8"] { fill: var(--alba); filter: drop-shadow(0 0 5px var(--alba)); }
.razon h3 { font-family: var(--f-marca); font-weight: 400; font-size: clamp(21px, 2vw, 26px); letter-spacing: -.015em; line-height: 1.15; }
.razon p { margin-top: 8px; color: var(--tenue); max-width: 40ch; }
@media (max-width: 760px) { .razones { grid-template-columns: 1fr; } }

/* ---------- Formulario de demostración ---------- */
.con-demo { overflow: hidden; }
.demo { width: min(720px, calc(100% - 24px)); max-height: calc(100svh - 24px); padding: 0; border: 0; background: transparent; color: var(--papel); overflow: visible; }
.demo::backdrop { background: radial-gradient(ellipse at 50% 30%, rgb(11 18 48 / .78), rgb(5 9 20 / .94)); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.demo[open] { animation: demo-entra .45s cubic-bezier(.2, .8, .2, 1); }
@keyframes demo-entra { from { opacity: 0; transform: translateY(14px) scale(.985); } }
.demo-panel { position: relative; max-height: calc(100svh - 24px); overflow-y: auto; padding: clamp(28px, 5vw, 52px); border-radius: 28px; border: 1px solid var(--linea);
  background:
    radial-gradient(circle at 12% 8%, rgb(255 255 255 / .55) 0 1px, transparent 1.5px),
    radial-gradient(circle at 78% 14%, rgb(255 255 255 / .4) 0 1px, transparent 1.5px),
    radial-gradient(circle at 92% 62%, rgb(255 255 255 / .35) 0 1px, transparent 1.5px),
    radial-gradient(circle at 34% 94%, rgb(255 255 255 / .3) 0 1px, transparent 1.5px),
    radial-gradient(ellipse at 100% 0%, rgb(122 168 255 / .16), transparent 55%),
    radial-gradient(ellipse at 0% 100%, rgb(52 214 195 / .12), transparent 55%),
    linear-gradient(160deg, #0d1638, #070c1f 70%);
  box-shadow: 0 40px 120px -40px rgb(0 0 0 / .9), inset 0 1px 0 rgb(255 255 255 / .06); }
.demo-cerrar { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--linea); background: transparent; color: var(--papel); cursor: pointer; transition: border-color .2s; }
.demo-cerrar:hover { border-color: var(--papel); }
.demo-cerrar svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.demo h2 { font-family: var(--f-marca); font-weight: 300; font-size: clamp(28px, 4vw, 40px); letter-spacing: -.03em; line-height: 1.08; padding-right: 48px; }
.demo-bajada { margin-top: 10px; color: var(--tenue); max-width: 46ch; }
.campos { margin-top: 30px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 24px; }
.campo { display: grid; gap: 6px; }
.campo.ancho { grid-column: 1 / -1; }
.campo span { font-size: 14.5px; color: var(--tenue); }
.campo i { font-style: normal; opacity: .65; margin-left: 4px; }
.campo input, .campo select, .campo textarea { width: 100%; font: inherit; font-size: 16px; color: var(--papel); background: rgb(234 242 255 / .04); border: 1px solid var(--linea); border-radius: 14px; padding: 12px 14px; transition: border-color .2s, background .2s, box-shadow .2s; }
.campo textarea { resize: vertical; min-height: 84px; }
.campo select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--tenue) 50%), linear-gradient(-45deg, transparent 50%, var(--tenue) 50%);
  background-position: calc(100% - 22px) 52%, calc(100% - 16px) 52%; background-size: 6px 6px; background-repeat: no-repeat; }
.campo select option { background: var(--noche); color: var(--papel); }
.campo input::placeholder, .campo textarea::placeholder { color: rgb(163 180 214 / .5); }
.campo input:hover, .campo select:hover, .campo textarea:hover { border-color: rgb(234 242 255 / .28); }
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: none; border-color: var(--aurora); background: rgb(52 214 195 / .05); box-shadow: 0 0 0 4px rgb(52 214 195 / .14); }
.campo [aria-invalid="true"] { border-color: #ff9b8a; box-shadow: 0 0 0 4px rgb(255 155 138 / .12); }
.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.acepto { margin-top: 24px; display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; font-size: 15px; color: var(--tenue); cursor: pointer; }
.acepto input { appearance: none; -webkit-appearance: none; width: 22px; height: 22px; margin: 1px 0 0; border: 1px solid rgb(234 242 255 / .35); border-radius: 7px; display: grid; place-items: center; cursor: pointer; }
.acepto input::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--alba); box-shadow: 0 0 8px var(--alba); transform: scale(0); transition: transform .2s; }
.acepto input:checked { border-color: var(--alba); }
.acepto input:checked::after { transform: scale(1); }
.acepto input[aria-invalid="true"] { border-color: #ff9b8a; }
.demo-error { margin-top: 18px; padding: 12px 16px; border-radius: 14px; background: rgb(255 155 138 / .1); border: 1px solid rgb(255 155 138 / .35); color: #ffd3cb; font-size: 15px; }
.demo-acciones { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 14px; }
.demo-acciones .boton { min-width: 200px; cursor: pointer; font-family: inherit; }
.demo-acciones .boton:disabled { opacity: .6; cursor: progress; transform: none; }
.demo-listo { text-align: center; padding-block: 20px 8px; outline: none; }
.demo-listo svg { width: 140px; height: 94px; margin-inline: auto; display: block; overflow: visible; }
.demo-listo path { fill: none; stroke: rgb(190 212 255 / .55); stroke-width: 1; stroke-dasharray: 160; stroke-dashoffset: 160; animation: traza 1.4s .15s ease forwards; }
.demo-listo circle { fill: #eaf2ff; filter: drop-shadow(0 0 4px rgb(160 190 255 / .9)); }
.demo-listo circle.oro { fill: var(--alba); filter: drop-shadow(0 0 8px var(--alba)); }
@keyframes traza { to { stroke-dashoffset: 0; } }
.demo-listo h2 { margin-top: 18px; padding-right: 0; }
.demo-listo p { margin: 12px auto 0; color: var(--tenue); max-width: 40ch; }
.demo-listo .boton { margin-top: 28px; cursor: pointer; font-family: inherit; background: transparent; }
@media (max-width: 600px) {
  .campos { grid-template-columns: 1fr; gap: 18px; }
  .demo-panel { border-radius: 22px; }
}
@media (prefers-reduced-motion: reduce) { .demo[open] { animation: none; } .demo-listo path { animation: none; stroke-dashoffset: 0; } }

/* Los iconos vectoriales tienen margen propio: conserva las esquinas del libro y calendario. */
.modulo .fig canvas { -webkit-mask-image: none; mask-image: none; }

/* ---------- Pie y página legal ---------- */
.pie-enlaces { display: inline-flex; flex-wrap: wrap; gap: 12px 28px; }
.acepto a { color: var(--papel); text-underline-offset: 3px; }
.pagina-legal { background: radial-gradient(ellipse at 85% -10%, rgb(122 168 255 / .14), transparent 50%), radial-gradient(ellipse at -10% 110%, rgb(52 214 195 / .08), transparent 50%), var(--vacio); min-height: 100vh; }
.legal { padding-block: clamp(40px, 7vw, 96px) clamp(72px, 10vw, 140px); max-width: 820px; }
.legal h1 { font-family: var(--f-marca); font-weight: 300; font-size: clamp(38px, 6vw, 68px); letter-spacing: -.035em; line-height: 1.02; }
.legal .vigencia { margin-top: 14px; color: var(--tenue); }
.legal .indice { margin-top: 36px; padding-block: 18px; border-block: 1px solid var(--linea); display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 15px; }
.legal .indice a { color: var(--tenue); text-decoration: none; }
.legal .indice a:hover { color: var(--papel); }
.legal section { margin-top: clamp(44px, 6vw, 64px); scroll-margin-top: 96px; }
.legal h2 { font-family: var(--f-marca); font-weight: 400; font-size: clamp(24px, 2.8vw, 32px); letter-spacing: -.02em; line-height: 1.15; }
.legal p, .legal ul { margin-top: 14px; color: #c9d5ec; max-width: 66ch; }
.legal ul { display: grid; gap: 10px; }
.legal li { position: relative; padding-left: 24px; }
.legal li::before { content: ""; position: absolute; left: 4px; top: .7em; width: 5px; height: 5px; border-radius: 50%; background: var(--alba); box-shadow: 0 0 6px var(--alba); }
.legal strong { color: var(--papel); font-weight: 600; }
.legal a { color: var(--aurora); text-underline-offset: 3px; }
@media (max-width: 760px) { .pagina-legal nav a:not(.entrar) { display: inline; } .pagina-legal nav a[href="/"] { display: none; } }
