/* GLOS — landing cinemática
   Paleta GLOS (logotipo, aplicación y presentaciones de módulo):
   berenjena #140A19 · púrpura #5B2A8C / #7A2B91 · magenta #B0006D / #E0409F
   resuelto #3FA63F · pendiente #E0A537 · claros #FFFFFF / #F5F7F9 · texto #20232A / #66717C */

/* Fuentes alojadas en el propio sitio */
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/poppins-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/poppins-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/poppins-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/roboto-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/roboto-latin-500-normal.woff2") format("woff2"); }

:root {
  --purple: #5B2A8C;
  --violet: #7A2B91;
  --magenta: #B0006D;
  --mag-l: #E0409F;                     /* magenta legible sobre oscuro */
  --lilac: #B48BE0;                     /* púrpura legible sobre oscuro */
  --mag-soft: rgba(224, 64, 159, .16);
  --mag-line: rgba(224, 64, 159, .55);
  --ok: #3FA63F;
  --ok-l: #6CC86C;
  --amber: #E0A537;
  --ink: #140A19;                       /* berenjena profunda para escenas */
  --ink-2: #1D1024;
  --charcoal: #20232A;
  --slate: #66717C;
  --cloud: #F5F7F9;
  --white: #FFFFFF;
  --text-on-dark: rgba(255, 255, 255, .92);
  --muted-on-dark: rgba(240, 230, 245, .66);
  --hairline-dark: rgba(255, 255, 255, .13);
  --hairline-light: rgba(32, 35, 42, .11);
  --grad: linear-gradient(90deg, #5B2A8C 0%, #8A2E9E 45%, #C2369F 75%, #B0006D 100%);
  --grad-on-dark: linear-gradient(90deg, #B48BE0 0%, #D47BD0 50%, #F06AB2 100%);

  --font-head: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;

  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --radius: 14px;
  --gutter: clamp(20px, 5vw, 72px);
  --maxw: 1260px;
  --nav-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--nav-h); }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text-on-dark);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button, select { font: inherit; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.1; margin: 0; letter-spacing: -.02em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--mag-l); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--magenta); color: var(--white); padding: 10px 16px; border-radius: 8px;
  font-weight: 500; text-decoration: none;
}
.skip-link:focus { top: 12px; }

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

/* ---------- Tipografía utilitaria ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; line-height: 1.4;
  font-family: var(--font-head); font-weight: 600; font-size: 12.5px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--mag-l);
}
.eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--grad-on-dark); }
.section-white .eyebrow, .section-light .eyebrow { color: var(--magenta); }
.section-white .eyebrow::before, .section-light .eyebrow::before { background: var(--grad); }
.display { font-size: clamp(40px, 6vw, 88px); font-weight: 700; letter-spacing: -.03em; }
.h2 { font-size: clamp(30px, 4vw, 56px); font-weight: 700; letter-spacing: -.025em; }
.lead { font-size: clamp(17px, 1.3vw, 19.5px); color: var(--muted-on-dark); max-width: 58ch; }
.accent { background: var(--grad-on-dark); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 24px; border-radius: 999px;
  font-family: var(--font-head); font-weight: 600; font-size: 15px; letter-spacing: .005em;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: background-color .25s var(--ease-out), box-shadow .25s var(--ease-out), color .25s, transform .2s var(--ease-out);
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--magenta); color: var(--white); box-shadow: 0 10px 30px -12px rgba(176, 0, 109, .7); }
.btn-primary:hover { background: #C5107F; box-shadow: 0 14px 34px -12px rgba(224, 64, 159, .8); }
.btn .arrow { transition: transform .25s var(--ease-out); }
.btn:hover .arrow { transform: translateX(3px); }
.link-arrow {
  display: inline-flex; align-items: center; gap: 8px; color: var(--white);
  font-family: var(--font-head); font-weight: 500; font-size: 15px; text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.3); padding-bottom: 2px; transition: border-color .2s;
}
.link-arrow:hover { border-color: var(--mag-l); }

/* ---------- Navegación: blanca, como la cabecera de la aplicación ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline-light);
  color: var(--charcoal);
  transition: box-shadow .4s var(--ease-out);
}
.nav.is-solid { box-shadow: 0 10px 30px -20px rgba(20, 10, 25, .55); }
.nav .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo { display: inline-flex; align-items: center; flex: none; text-decoration: none; }
.logo img { display: block; height: 44px; width: auto; }
.nav-links { display: flex; gap: clamp(18px, 2vw, 32px); list-style: none; margin: 0; padding: 0; }
.nav-links a { position: relative; text-decoration: none; font-family: var(--font-head); font-weight: 500; font-size: 14.5px; color: #4A4F58; transition: color .2s; padding: 6px 0; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; border-radius: 2px; background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease-out); }
.nav-links a:hover, .nav-links a[aria-current="true"] { color: var(--magenta); }
.nav-links a[aria-current="true"]::after { transform: scaleX(1); }
.nav .btn { min-height: 42px; font-size: 14px; padding: 0 20px; }
.nav-toggle { display: none; background: none; border: 0; color: var(--charcoal); width: 44px; height: 44px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: currentColor; margin: 5px auto; transition: transform .3s var(--ease-out), opacity .2s; }

.lang-switch { display: flex; align-items: center; gap: 2px; margin-left: auto; margin-right: 4px; font-family: var(--font-head); font-size: 12.5px; font-weight: 600; letter-spacing: .08em; }
.lang-switch a { padding: 8px 8px; text-decoration: none; color: #8A8F98; border-radius: 6px; transition: color .2s; }
.lang-switch a:hover, .lang-switch a[aria-current="true"] { color: var(--purple); }
.lang-switch a + a { position: relative; }
.lang-switch a + a::before { content: ""; position: absolute; left: -1px; top: 50%; height: 12px; width: 1px; background: var(--hairline-light); transform: translateY(-50%); }
@media (min-width: 1141px) { .lang-switch { margin-left: 0; } }

/* ---------- Escenas cinemáticas ---------- */
.scene { position: relative; height: 100vh; height: 100svh; overflow: hidden; background: var(--ink); }
.scene-media { position: absolute; inset: 0; }
.scene-media canvas, .scene-media img.poster { width: 100%; height: 100%; object-fit: cover; }
.scene-media img.poster { position: absolute; inset: 0; opacity: 0; transition: opacity .6s; }
.scene.is-static .scene-media img.poster { opacity: 1; }
.scene.is-static .scene-media canvas { display: none; }
.scene-shade { position: absolute; inset: 0; pointer-events: none; }
.shade-left { background: linear-gradient(90deg, rgba(20,10,25,.92) 0%, rgba(20,10,25,.66) 38%, rgba(20,10,25,.1) 72%), linear-gradient(0deg, rgba(20,10,25,.8) 0%, rgba(20,10,25,0) 32%); }
.shade-bottom { background: linear-gradient(0deg, rgba(20,10,25,.94) 0%, rgba(20,10,25,.72) 32%, rgba(20,10,25,.12) 62%, rgba(20,10,25,.4) 100%); }
.shade-modules { background: linear-gradient(90deg, rgba(20,10,25,.93) 0%, rgba(20,10,25,.78) 36%, rgba(20,10,25,.35) 70%, rgba(20,10,25,.5) 100%), radial-gradient(ellipse at 72% 55%, rgba(122,43,145,.28) 0%, rgba(20,10,25,0) 60%); }
.scene-overlay { position: absolute; inset: 0; display: flex; align-items: center; padding-top: var(--nav-h); }
.scene-overlay > .container { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: center; }
.overlay-bottom { align-items: flex-end; }
.overlay-bottom > .container { justify-content: flex-end; padding-bottom: clamp(48px, 8vh, 92px); }
.scene-copy { max-width: 620px; display: grid; gap: 22px; }
.scene-copy .h2 { max-width: 16ch; }
.reveal { will-change: opacity, transform; }
.progress-rail { position: absolute; right: calc(var(--gutter) / 2); top: 50%; transform: translateY(-50%); width: 2px; height: 120px; background: var(--hairline-dark); border-radius: 2px; overflow: hidden; }
.progress-rail i { position: absolute; inset: 0; background: linear-gradient(180deg, var(--lilac), var(--mag-l)); transform-origin: top; transform: scaleY(0); }

/* Hero */
.hero .scene-copy { max-width: 760px; }
.hero .display { max-width: 14ch; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-top: 6px; }
.spec-strip { position: absolute; left: 0; right: 0; bottom: 0; border-top: 1px solid var(--hairline-dark); background: rgba(20,10,25,.6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.spec-strip ul { list-style: none; margin: 0; padding: 18px 0; display: flex; flex-wrap: wrap; gap: 10px 30px; font-family: var(--font-head); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-on-dark); }
.spec-strip li { display: flex; align-items: center; gap: 10px; }
.spec-strip li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--mag-l); }
.scroll-hint { position: absolute; right: var(--gutter); bottom: 86px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-on-dark); display: flex; align-items: center; gap: 10px; }
.scroll-hint i { width: 1px; height: 36px; background: linear-gradient(var(--mag-l), transparent); }

/* Nodo (lenguaje visual compartido) */
.node {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 10px;
  background: rgba(29, 16, 36, .8); border: 1px solid var(--hairline-dark);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font-family: var(--font-head); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-on-dark);
  white-space: nowrap; transition: border-color .4s var(--ease-out), color .4s, background-color .4s, box-shadow .4s;
}
.node::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.3); transition: background-color .4s, box-shadow .4s; }
.node.is-on { border-color: var(--mag-line); }
.node.is-on::before { background: var(--mag-l); box-shadow: 0 0 0 4px var(--mag-soft); }
.node.is-core { border-color: var(--mag-line); background: rgba(91, 42, 140, .55); }
.node.is-core::before { background: var(--mag-l); box-shadow: 0 0 0 4px var(--mag-soft); }

/* ---------- Problema: versiones distintas ---------- */
.problem-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 12px; }
.problem-list li { display: flex; align-items: center; gap: 14px; font-family: var(--font-head); font-weight: 500; font-size: clamp(17px, 1.45vw, 20px); color: var(--white); }
.problem-list li span.k { width: 34px; height: 1.5px; background: rgba(255,255,255,.35); flex: none; }
.versions { position: absolute; right: var(--gutter); top: 50%; transform: translateY(-44%); width: min(400px, 36vw); display: grid; gap: 10px; perspective: 900px; }
.versions-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-family: var(--font-head); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-on-dark); margin-bottom: 4px; }
.tag-mini { padding: 3px 9px; border-radius: 999px; border: 1px solid var(--hairline-dark); font-size: 10.5px; letter-spacing: .08em; white-space: nowrap; }
.vcard {
  display: grid; grid-template-columns: 1fr auto auto; align-items: baseline; gap: 10px;
  padding: 14px 18px; border-radius: 12px;
  background: rgba(29, 16, 36, .82); border: 1px solid var(--hairline-dark);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: border-color .4s, transform .5s var(--ease-out);
}
.vcard .src { font-family: var(--font-head); font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-on-dark); }
.vcard b { font-family: var(--font-head); font-size: 26px; font-weight: 700; color: var(--white); font-variant-numeric: tabular-nums; }
.vcard .u { font-size: 13px; color: var(--muted-on-dark); }
.vcard.is-off { border-color: rgba(224,165,55,.65); }
.vcard.is-off b { color: var(--amber); }
.versions-q { margin-top: 6px; font-family: var(--font-head); font-weight: 500; font-size: 15px; color: var(--mag-l); }

/* ---------- Plataforma: convergencia en GLOS ---------- */
.platform .scene-copy { max-width: 470px; }
.conv { position: absolute; right: var(--gutter); top: 50%; transform: translateY(-46%); width: min(520px, 40vw); aspect-ratio: 560 / 440; }
.conv svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.conv-in, .conv-out { fill: none; stroke-width: 1.5; }
.conv-in { stroke: rgba(180, 139, 224, .75); }
.conv-out { stroke: rgba(224, 64, 159, .85); }
.conv .node { position: absolute; transform: translate(-50%, -50%); font-size: 11px; padding: 7px 12px; }
.conv-dst { border-color: var(--mag-line); }
.conv-dst::before { background: var(--mag-l); }
.core {
  position: absolute; transform: translate(-50%, -50%); width: clamp(96px, 9vw, 128px); aspect-ratio: 1;
  border-radius: 50%; display: grid; place-items: center; align-content: center; gap: 2px;
  background: radial-gradient(circle at 50% 40%, #FFFFFF 0%, #F6EEF8 70%);
  box-shadow: 0 0 0 1px rgba(255,255,255,.4), 0 0 0 10px rgba(224,64,159,.12), 0 0 60px 10px rgba(176,0,109,.45);
}
.core img { width: 52%; height: auto; }
.core span { font-family: var(--font-head); font-weight: 700; font-size: 12px; letter-spacing: .16em; color: var(--purple); }
.core::after { content: ""; position: absolute; inset: -14px; border-radius: 50%; border: 1px solid rgba(224,64,159,.5); animation: ring 3.2s var(--ease-out) infinite; }
@keyframes ring { from { transform: scale(.9); opacity: .9; } to { transform: scale(1.35); opacity: 0; } }

/* ---------- Módulos: escenario 3D ---------- */
.modules .scene-overlay > .container { justify-content: center; gap: clamp(18px, 3.5vh, 36px); }
.mod-head { display: grid; gap: 14px; max-width: 760px; }
.mod-head .h2 { font-size: clamp(28px, 3.2vw, 46px); max-width: 22ch; }
.mod-grid { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: clamp(28px, 4vw, 64px); align-items: center; }
.mod-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mod-list button {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  padding: 10px 0 10px 18px; border-left: 2px solid var(--hairline-dark);
  color: var(--muted-on-dark); display: grid; grid-template-columns: 30px 1fr; column-gap: 8px;
  transition: color .35s var(--ease-out), border-color .35s var(--ease-out);
}
.mod-list .n { font-family: var(--font-head); font-size: 12px; font-weight: 600; letter-spacing: .08em; padding-top: 4px; color: inherit; }
.mod-list .t { font-family: var(--font-head); font-size: clamp(16px, 1.35vw, 19px); font-weight: 600; }
.mod-list .d { grid-column: 2; font-size: 14.5px; line-height: 1.5; max-height: 0; opacity: 0; overflow: hidden; transition: max-height .5s var(--ease-out), opacity .4s, margin .4s; color: var(--muted-on-dark); }
.mod-list li.is-active button { color: var(--white); border-image: linear-gradient(180deg, var(--lilac), var(--mag-l)) 1; }
.mod-list li.is-active .n { color: var(--mag-l); }
.mod-list li.is-active .d { max-height: 96px; opacity: 1; margin-top: 6px; }
.mod-stage-wrap { justify-self: end; width: min(680px, 100%); }
.mod-stage-wrap { perspective: 1800px; perspective-origin: 20% 40%; }
.mod-stage { position: relative; width: 100%; aspect-ratio: 1200 / 749; transform-style: preserve-3d; transform: rotateY(calc(-14deg + var(--tilt-x, 0deg))) rotateX(calc(5deg + var(--tilt-y, 0deg))); transition: transform .6s var(--ease-out); }
.mod-panel {
  position: absolute; inset: 0; margin: 0; border-radius: 12px; overflow: hidden; background: var(--white);
  box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 50px 90px -40px rgba(0,0,0,.85), 0 0 80px -30px rgba(176,0,109,.55);
  transform-origin: 50% 50%; backface-visibility: hidden; will-change: transform, opacity;
}
.mod-panel img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.mod-panel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, rgba(255,255,255,.18) 0%, rgba(255,255,255,0) 35%); pointer-events: none; }
.shot-note { margin-top: 18px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; font-family: var(--font-head); font-weight: 500; color: var(--muted-on-dark); text-align: right; }
.modules-mobile { display: none; }

/* ---------- Caso ---------- */
.case .scene-copy { max-width: 560px; }
.case-guard { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--text-on-dark); padding: 14px 16px; border-radius: 12px; border: 1px solid var(--hairline-dark); background: rgba(29,16,36,.6); max-width: 52ch; }
.case-guard::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: var(--ok-l); box-shadow: 0 0 0 4px rgba(63,166,63,.2); }
.case-pos { position: absolute; right: var(--gutter); top: 50%; transform: translateY(-44%); width: min(420px, 38vw); }
.case-card {
  padding: 20px 22px; border-radius: 16px;
  background: rgba(255,255,255,.97); color: var(--charcoal);
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.4);
  display: grid; gap: 16px;
}
.cc-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--hairline-light); }
.cc-mod { font-family: var(--font-head); font-size: 13.5px; font-weight: 600; color: var(--purple); }
.cc-grid { display: grid; grid-template-columns: repeat(5, auto); justify-content: space-between; gap: 6px 10px; margin: 0; }
.cc-grid dt { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--slate); }
.cc-grid dd { margin: 2px 0 0; font-family: var(--font-head); font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; }
.cc-diff dd { color: #B26A00; }
.case-card.is-closed .cc-diff dd { color: var(--slate); text-decoration: line-through; }
.cc-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; position: relative; }
.cc-steps li { position: relative; display: grid; gap: 2px; padding: 8px 0 8px 30px; color: #9AA0A8; transition: color .4s var(--ease-out); }
.cc-steps li::before { content: ""; position: absolute; left: 4px; top: 13px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #D5D8DD; background: var(--white); transition: all .4s var(--ease-out); }
.cc-steps li + li::after { content: ""; position: absolute; left: 9px; top: -8px; height: 21px; width: 2px; background: #E4E6EA; }
.cc-steps b { font-family: var(--font-head); font-weight: 600; font-size: 14.5px; }
.cc-steps span { font-size: 13px; }
.cc-steps li.is-on { color: var(--charcoal); }
.cc-steps li.is-on span { color: var(--slate); }
.cc-steps li.is-on::before { border-color: var(--magenta); background: var(--magenta); box-shadow: 0 0 0 4px rgba(176,0,109,.14); }
.cc-steps li.is-on + li::after, .cc-steps li.is-on.is-done + li::after { background: var(--magenta); }
.cc-steps li.is-ok::before { border-color: var(--ok); background: var(--ok); box-shadow: 0 0 0 4px rgba(63,166,63,.16); }
.cc-foot { font-size: 11.5px; color: var(--slate); letter-spacing: .04em; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; font-family: var(--font-head); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.badge-ok { background: rgba(63,166,63,.14); color: #2E7D2E; }
.badge-warn { background: rgba(224,165,55,.18); color: #94600A; }
.badge-mag { background: rgba(176,0,109,.1); color: var(--magenta); }

/* ---------- Base común ---------- */
.connected-copy { max-width: 980px; }
.connected-copy .h2 { max-width: 22ch; }
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 4px; }
.pillars p { display: grid; gap: 6px; color: var(--text-on-dark); font-size: 15.5px; border-top: 1px solid var(--hairline-dark); padding-top: 14px; align-content: start; }
.pillars span { font-family: var(--font-head); font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--mag-l); }
.net-layer { position: absolute; inset: 0; pointer-events: none; }
.net-layer svg { width: 100%; height: 100%; }
.net-edge { fill: none; stroke: rgba(224, 64, 159, .6); stroke-width: 1.25; }
.net-node { position: absolute; transform: translate(-50%, -50%); }

/* ---------- Secciones de contenido ---------- */
.section { position: relative; padding: clamp(88px, 11vw, 150px) 0; }
.section-dark { background: var(--ink); }
.section-light { background: var(--cloud); color: var(--charcoal); }
.section-white { background: var(--white); color: var(--charcoal); }
.section-light .lead, .section-white .lead { color: var(--slate); }
.section-light .h2, .section-white .h2 { color: var(--charcoal); }
.section-head { display: grid; gap: 20px; max-width: 760px; margin-bottom: clamp(48px, 6vw, 80px); }

.outcomes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--hairline-dark); }
.outcomes > div { padding: 28px 28px 0 0; display: grid; gap: 10px; align-content: start; }
.outcomes > div + div { padding-left: 28px; border-left: 1px solid var(--hairline-dark); }
.outcomes h3 { font-size: 19px; font-weight: 600; }
.outcomes p { color: var(--muted-on-dark); font-size: 16px; }

/* Para quién */
.fit-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(36px, 6vw, 96px); align-items: start; }
.fit-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.fit-col { padding: 28px; border-radius: var(--radius); border: 1px solid var(--hairline-light); background: var(--white); display: grid; gap: 18px; align-content: start; box-shadow: 0 30px 60px -45px rgba(91,42,140,.45); }
.fit-col h3 { font-size: 18px; font-weight: 600; color: var(--charcoal); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.checks li { position: relative; padding-left: 28px; color: #474C55; font-size: 16px; line-height: 1.5; }
.checks li::before { content: ""; position: absolute; left: 0; top: 7px; width: 14px; height: 14px; border-radius: 4px; background: var(--grad); }
.checks.is-ok li::before { border-radius: 50%; background: var(--ok); }
.checks.is-ok li::after { content: ""; position: absolute; left: 4.5px; top: 10px; width: 5px; height: 7px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* Implantación */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; position: relative; }
.steps::before { content: ""; position: absolute; left: 0; right: 0; top: 19px; height: 2px; background: var(--hairline-light); }
.steps .step-line { position: absolute; left: 0; top: 19px; height: 2px; width: 100%; background: var(--grad); transform-origin: left; transform: scaleX(0); }
.step { position: relative; padding-right: 24px; display: grid; gap: 12px; align-content: start; }
.step .dot { width: 40px; height: 40px; border-radius: 50%; background: var(--white); border: 1.5px solid #D5D8DD; display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; font-size: 14px; color: var(--charcoal); position: relative; z-index: 1; transition: all .4s var(--ease-out); }
.step.is-on .dot { background: var(--magenta); border-color: var(--magenta); color: var(--white); }
.step h3 { font-size: 18px; font-weight: 600; color: var(--charcoal); }
.step p { color: var(--slate); font-size: 15.5px; }
.fitscope { margin-top: clamp(48px, 6vw, 80px); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; padding: clamp(26px, 3vw, 40px); border-radius: 18px; color: var(--white); background: linear-gradient(120deg, #3E1C61 0%, #5B2A8C 45%, #8A2E9E 75%, #B0006D 100%); box-shadow: 0 40px 80px -45px rgba(91,42,140,.8); }
.fitscope > div { display: grid; gap: 10px; max-width: 60ch; }
.fitscope .eyebrow { color: #F7C6E3; }
.fitscope .eyebrow::before { background: #F7C6E3; }
.fitscope h3 { font-size: clamp(22px, 2.2vw, 30px); font-weight: 700; }
.fitscope p { color: rgba(255,255,255,.85); }
.fitscope .btn-primary { background: var(--white); color: var(--magenta); box-shadow: none; }
.fitscope .btn-primary:hover { background: #FBEFF6; }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.faq-list { border-top: 1px solid var(--hairline-light); }
.faq-list details { border-bottom: 1px solid var(--hairline-light); }
.faq-list summary { list-style: none; cursor: pointer; padding: 24px 44px 24px 0; position: relative; font-family: var(--font-head); font-weight: 600; font-size: clamp(17px, 1.35vw, 19.5px); color: var(--charcoal); transition: color .2s; }
.faq-list summary:hover { color: var(--magenta); }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 11px; height: 11px; border-right: 2px solid var(--magenta); border-bottom: 2px solid var(--magenta); transform: translateY(-70%) rotate(45deg); transition: transform .3s var(--ease-out); }
.faq-list details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq-list .answer { padding: 0 44px 26px 0; color: var(--slate); font-size: 16.5px; }

/* Cierre */
.final-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 500px); gap: clamp(32px, 5vw, 80px); align-items: center; width: 100%; }
.final .scene-copy { max-width: 600px; }
.final .h2 { max-width: 16ch; font-size: clamp(30px, 3.4vw, 50px); }
.final .lead { font-size: 16.5px; }
.final-questions { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.final-questions li { font-family: var(--font-head); font-size: clamp(16px, 1.45vw, 20px); font-weight: 500; color: var(--white); padding-left: 18px; border-left: 2px solid var(--mag-l); }
.form-panel { padding: clamp(22px, 2.4vw, 30px); border-radius: var(--radius); background: rgba(29, 16, 36, .86); border: 1px solid var(--hairline-dark); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 30px 60px -30px rgba(0,0,0,.6); }
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 7px; }
.field label { font-size: 14px; font-weight: 500; color: var(--text-on-dark); }
.field input, .field textarea, .field select {
  width: 100%; padding: 13px 16px; border-radius: 10px; border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.05); color: var(--white); font: inherit; font-size: 16px;
  transition: border-color .2s, background-color .2s;
}
.field select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--mag-l) 50%), linear-gradient(135deg, var(--mag-l) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.field select option { color: var(--charcoal); background: var(--white); }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--mag-l); background-color: rgba(255,255,255,.08); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form .privacy { font-size: 13px; color: var(--muted-on-dark); }
.form-status { font-size: 14px; color: var(--ok-l); min-height: 1.4em; }

.footer { padding: 32px 0; background: #0E0712; border-top: 1px solid var(--hairline-dark); font-size: 14px; color: var(--muted-on-dark); }
.footer .container { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: center; }
.foot-brand { display: inline-flex; align-items: center; gap: 12px; }
.foot-brand img { width: 28px; height: 28px; background: #fff; border-radius: 50%; padding: 3px; }
.footer nav { display: flex; gap: 24px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--white); }

/* Cargador del primer frame */
.scene-loader { position: absolute; left: var(--gutter); bottom: 24px; height: 2px; width: 120px; background: var(--hairline-dark); overflow: hidden; border-radius: 2px; transition: opacity .5s; }
.scene-loader i { display: block; height: 100%; width: 0; background: var(--grad-on-dark); transition: width .3s; }
.scene.is-ready .scene-loader { opacity: 0; }

/* Fundido al saltar entre secciones lejanas */
.veil { position: fixed; inset: 0; z-index: 45; background: var(--ink); opacity: 0; pointer-events: none; transition: opacity .28s var(--ease-out); }
.veil.is-on { opacity: 1; }

/* ---------- Responsive ---------- */
@media (max-width: 1140px) {
  .nav-links, .nav .btn-nav { display: none; }
  .nav-toggle { display: block; }
  .nav.is-open { height: auto; padding-bottom: 20px; align-items: flex-start; background: rgba(255,255,255,.99); }
  .nav.is-open .container { flex-wrap: wrap; padding-top: 12px; }
  .nav.is-open .nav-links { display: grid; gap: 4px; width: 100%; order: 3; padding-top: 12px; }
  .nav.is-open .nav-links a { display: block; padding: 12px 0; font-size: 19px; color: var(--charcoal); }
  .nav.is-open .btn-nav { display: inline-flex; order: 4; margin-top: 10px; }
  .nav.is-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.is-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav.is-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 36px 0; }
  .steps::before, .steps .step-line { display: none; }
  .pillars { grid-template-columns: repeat(2, 1fr); gap: 16px 24px; }
  .fit-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1024px) {
  .versions, .case-pos { width: min(380px, 42vw); }
  .conv { width: min(460px, 46vw); }
  .mod-grid { grid-template-columns: minmax(250px, 320px) 1fr; }
}

@media (max-width: 860px) {
  :root { --nav-h: 64px; }
  body { font-size: 16.5px; }
  .logo img { height: 38px; }
  .display { font-size: clamp(36px, 10vw, 54px); }
  .h2 { font-size: clamp(29px, 8vw, 40px); }
  .lead { font-size: 16.5px; }
  .shade-left { background: linear-gradient(0deg, rgba(20,10,25,.96) 0%, rgba(20,10,25,.8) 45%, rgba(20,10,25,.22) 80%); }
  .scene-overlay { align-items: flex-end; }
  .scene-overlay > .container { justify-content: flex-end; padding-bottom: 88px; }
  .hero .scene-overlay > .container { padding-bottom: 150px; }
  .scroll-hint, .progress-rail { display: none; }
  .spec-strip ul { gap: 6px 16px; font-size: 10.5px; padding: 14px 0; }

  /* Overlays laterales: arriba y compactos */
  .versions, .case-pos, .conv { position: absolute; left: var(--gutter); right: var(--gutter); top: calc(var(--nav-h) + 14px); width: auto; transform: none; }
  .versions { gap: 6px; }
  .versions-head { font-size: 10.5px; }
  .vcard { padding: 8px 12px; }
  .vcard b { font-size: 19px; }
  .vcard .src { font-size: 11px; }
  .versions-q, .problem-list { display: none; }
  .conv { aspect-ratio: auto; height: 34vh; }
  .conv .node { font-size: 9.5px; padding: 5px 8px; }
  .conv .node::before { display: none; }
  .core { width: 74px; }
  .core::after { inset: -8px; }
  .case-card { padding: 14px 16px; gap: 10px; }
  .cc-grid { grid-template-columns: repeat(3, auto); }
  .cc-steps li { padding: 4px 0 4px 26px; }
  .cc-steps span, .cc-foot { display: none; }
  .cc-steps li::before { top: 8px; }
  .cc-steps li + li::after { top: -4px; height: 13px; }
  .case .lead { display: none; }
  .case-guard { font-size: 14px; }
  .net-layer .net-node { font-size: 9px; padding: 5px 8px; }
  .net-layer .net-node::before { display: none; }
  .pillars { grid-template-columns: 1fr 1fr; gap: 12px 18px; }
  .pillars p { font-size: 14px; }

  /* Módulos: en móvil, tarjetas en sección normal */
  .modules { display: none; }
  .modules-mobile { display: block; padding-top: 64px; }
  .mod-cards { display: grid; gap: 16px; }
  .mod-card { border-radius: 14px; overflow: hidden; border: 1px solid var(--hairline-dark); background: rgba(255,255,255,.03); }
  .mod-card img { width: 100%; height: auto; background: #fff; }
  .mod-card > div { padding: 18px 20px 22px; display: grid; gap: 6px; }
  .mod-card .n { font-family: var(--font-head); font-size: 12px; font-weight: 600; color: var(--mag-l); letter-spacing: .1em; }
  .mod-card h3 { font-size: 19px; font-weight: 600; }
  .mod-card p { font-size: 15px; color: var(--muted-on-dark); }
  .logistics-note { margin-top: 22px; font-size: 13.5px; color: var(--muted-on-dark); }

  .outcomes { grid-template-columns: 1fr; }
  .outcomes > div, .outcomes > div + div { padding: 22px 0; border-left: 0; border-bottom: 1px solid var(--hairline-dark); }
  .fit-cols, .faq-grid, .final-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 26px; }
  .field-row { grid-template-columns: 1fr; }

  /* En móvil el cierre no se fija: texto y formulario uno debajo del otro */
  .final { height: auto; min-height: 100svh; }
  .final .scene-overlay { position: relative; padding: calc(var(--nav-h) + 32px) 0 48px; }
  .final .scene-overlay > .container { height: auto; }
  .final .scene-shade { background: rgba(20,10,25,.8); }
  .final .reveal { opacity: 1 !important; transform: none !important; visibility: visible !important; }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
}
.reduced .scene { height: auto; min-height: 100vh; min-height: 100svh; }
.reduced .scene-overlay { position: relative; min-height: 100vh; min-height: 100svh; padding-top: calc(var(--nav-h) + 40px); padding-bottom: 60px; }
.reduced .reveal { opacity: 1 !important; transform: none !important; }
.reduced .versions, .reduced .case-pos, .reduced .conv { position: relative; right: auto; left: auto; top: auto; transform: none; margin-top: 32px; width: 100%; max-width: 460px; }
.reduced .conv { aspect-ratio: 560 / 440; height: auto; }
.reduced .mod-list .d { max-height: none; opacity: 1; margin-top: 6px; }
.reduced .mod-list li button { color: var(--white); }
.reduced .modules { display: none; }
.reduced .modules-mobile { display: block; }
.reduced .mod-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.reduced .mod-card { border-radius: 14px; overflow: hidden; border: 1px solid var(--hairline-dark); }
.reduced .mod-card img { width: 100%; height: auto; }
.reduced .mod-card > div { padding: 18px 20px 22px; display: grid; gap: 6px; }
.reduced .mod-card .n { color: var(--mag-l); font-family: var(--font-head); font-size: 12px; }
.reduced .mod-card p { color: var(--muted-on-dark); font-size: 15px; }
.reduced .hero .scene-overlay > .container { padding-bottom: 80px; }
