/* ---------- Fuente (alojada en local, licencia OFL) ---------- */
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Variables ---------- */
:root {
  --bg: #07070a;
  --ink: #ecebe6;          /* blanco roto */
  --muted: #8d8d96;
  --faint: #5a5a63;
  --line: rgba(236, 235, 230, 0.09);
  --accent: #8fa0ff;       /* único acento, el del orbe */
  --pad: clamp(20px, 5vw, 48px);
  --orb: min(104vw, 66svh, 700px);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, p, dl, dd, ol { margin: 0; padding: 0; }
ol { list-style: none; }
a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: rgba(143, 160, 255, 0.35); }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--pad);
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 8px;
}
.skip:focus { top: 12px; }

/* ---------- Cabecera ---------- */
.top {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 5;
  padding-block: 22px;
}
.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-left: -6px;
  color: #aab6ff;
  border-radius: 50%;
  transition: color 0.2s, filter 0.2s;
}
.brand svg {
  width: 26px;
  height: 26px;
  filter: drop-shadow(0 0 6px rgba(143, 160, 255, 0.55));
}
.brand:hover { color: #d4daff; }
.nav {
  display: none;
  gap: 34px;
  font-size: 0.9375rem;
  color: var(--muted);
}
.nav a { transition: color 0.2s; }
.nav a:hover { color: var(--ink); }
@media (min-width: 800px) { .nav { display: flex; } }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}
.btn:active { transform: scale(0.98); }
.btn-solid { background: var(--ink); color: var(--bg); }
.btn-solid:hover { background: #fff; }
.btn-ghost { border-color: rgba(236, 235, 230, 0.2); color: var(--ink); }
.btn-ghost:hover { border-color: rgba(236, 235, 230, 0.5); }
.btn-small { min-height: 40px; padding: 0 18px; font-size: 0.9375rem; }

.ico { width: 14px; height: 14px; fill: currentColor; flex: none; }
.ico-pause { display: none; }
.is-playing .ico-play { display: none; }
.is-playing .ico-pause { display: block; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(100svh, 1100px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-block: 84px 56px;
  text-align: center;
  overflow: hidden;
}

.orb-stage {
  position: relative;
  flex: none;
  width: var(--orb);
  height: var(--orb);
  margin-top: calc(var(--orb) * -0.14);
  margin-bottom: calc(var(--orb) * -0.25);
  pointer-events: none;
}
.orb-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
/* Orbe estático de reserva: se ve si no hay JavaScript o WebGL */
.orb-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle closest-side, transparent 22%, rgba(60, 75, 200, 0.25) 34%, rgba(215, 222, 255, 0.9) 43%, rgba(60, 75, 200, 0.25) 52%, transparent 70%);
  filter: blur(10px);
}
.orb-stage.is-live::before { display: none; }

.hero-copy { position: relative; z-index: 1; }

h1 {
  font-size: clamp(2.75rem, 8.2vw, 6.25rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
h1 .dim { display: block; color: rgba(236, 235, 230, 0.5); }

.lede {
  max-width: 34ch;
  margin: 26px auto 0;
  color: var(--muted);
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.5;
  text-wrap: balance;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 36px;
}

.demo-note {
  margin-top: 18px;
  color: var(--faint);
  font-size: 0.8125rem;
}

@media (max-width: 480px) {
  .actions { flex-direction: column; align-items: stretch; }
}

/* ---------- Secciones ---------- */
.section { padding-block: clamp(96px, 15vw, 190px); }

.section-head { margin-bottom: clamp(48px, 7vw, 88px); }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px 2px rgba(143, 160, 255, 0.6);
}

h2 {
  max-width: 17ch;
  font-size: clamp(2rem, 5vw, 3.75rem);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

h3 {
  font-size: clamp(1.1875rem, 1.9vw, 1.4375rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

/* Qué hace */
.grid-4 {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--line);
}
.cell {
  padding: 36px 0 40px;
  border-bottom: 1px solid var(--line);
}
.cell .idx {
  display: block;
  margin-bottom: 28px;
  color: var(--faint);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}
.cell h3 { max-width: 22ch; }
.cell p { max-width: 42ch; margin-top: 12px; color: var(--muted); }

@media (min-width: 760px) {
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .cell { padding: 44px 48px 56px 0; }
  .cell:nth-child(even) { padding-left: 48px; padding-right: 0; border-left: 1px solid var(--line); }
}

/* Cómo funciona */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
}
.step .num {
  display: block;
  margin-bottom: 20px;
  font-size: clamp(4rem, 9vw, 7rem);
  font-weight: 200;
  line-height: 0.9;
  letter-spacing: -0.05em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(236, 235, 230, 0.32);
}
.step h3 { padding-top: 22px; border-top: 1px solid var(--line); }
.step p { max-width: 36ch; margin-top: 12px; color: var(--muted); }

@media (min-width: 860px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 40px; }
}

/* Transparencia */
.rows { border-top: 1px solid var(--line); }
.row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding-block: 32px;
  border-bottom: 1px solid var(--line);
}
.row dt {
  font-size: clamp(1.1875rem, 1.9vw, 1.4375rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.row dd { max-width: 46ch; color: var(--muted); }

@media (min-width: 760px) {
  .row { grid-template-columns: 1fr 1fr; gap: 48px; padding-block: 40px; }
}

/* Contacto */
.contact {
  position: relative;
  text-align: center;
  overflow: hidden;
}
.contact::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -55%;
  width: min(1100px, 150vw);
  aspect-ratio: 1;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(96, 112, 240, 0.2) 0, rgba(60, 72, 190, 0.08) 30%, transparent 58%);
  pointer-events: none;
}
.contact-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.contact h2 {
  max-width: none;
  font-size: clamp(3rem, 10vw, 7rem);
  letter-spacing: -0.05em;
  line-height: 1;
}
.contact .lede { margin-top: 24px; margin-bottom: 36px; }
.contact-mail { margin-top: 18px; color: var(--faint); font-size: 0.9375rem; }
.contact-mail a {
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: rgba(236, 235, 230, 0.25);
  text-underline-offset: 4px;
}
.contact-mail a:hover { color: var(--ink); }

/* Footer */
.foot {
  padding-block: 28px 36px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.875rem;
}
.foot-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 28px;
}
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot a { padding-block: 6px; transition: color 0.2s; }
.foot a:hover { color: var(--ink); }

/* ---------- Páginas legales ---------- */
.legal {
  max-width: 760px;
  padding-top: 140px;
  padding-bottom: 120px;
}
.legal h1 {
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  letter-spacing: -0.04em;
}
.legal h2 {
  max-width: none;
  margin-top: 56px;
  margin-bottom: 14px;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.legal p { color: var(--muted); }
.legal p + p { margin-top: 14px; }
.legal a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: rgba(236, 235, 230, 0.3);
  text-underline-offset: 4px;
}
.legal strong { color: var(--ink); font-weight: 500; }
.legal-date { margin-top: 14px; font-size: 0.875rem; }
.legal-data {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 10px 28px;
  margin-bottom: 20px;
  padding: 22px 0;
  border-block: 1px solid var(--line);
}
.legal-data dt { color: var(--faint); }
.legal-data dd { color: var(--ink); overflow-wrap: anywhere; }
.legal-list {
  margin: 0 0 14px;
  padding-left: 1.2em;
  color: var(--muted);
}
.legal-list li + li { margin-top: 8px; }
.foot a[aria-current="page"] { color: var(--ink); }

/* ---------- Aparición al hacer scroll (solo con JS y con movimiento permitido) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
  }
  .js .reveal.in { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; }
}
