/* ==========================================================================
   prestamOS — Landing page
   Design system basado en la paleta corporativa de la app (ui/theme/Color.kt)
   Tipografía: Comfortaa (la familia global del ecosistema web), AUTOALOJADA.
   Antes se pedía a Google Fonts; ahora los dos subconjuntos viven en
   `landing/fonts/`, así que no hay ninguna petición a un tercero y la fuente
   arranca antes (sin DNS ni TLS de fonts.gstatic.com).
   ========================================================================== */

/* ---------- Tipografía ---------- */
/* Variable (300–700) en dos subconjuntos. `font-display: swap` pinta ya con el
   respaldo y cambia a Comfortaa en cuanto llega, para no bloquear el render. */
@font-face {
  font-family: "Comfortaa";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/comfortaa-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Comfortaa";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/comfortaa-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */
:root {
  /* Marca */
  --navy-900: #001b46;
  --navy-800: #071f4d;
  --navy-700: #143063;
  --navy-600: #1d3f7a;
  --emerald: #006c49;
  --emerald-dark: #006d5b;
  --mint: #6ffbbe;
  --mint-soft: #d6fbee;

  /* Neutros */
  --ink: #0b1220;
  --slate: #44464f;
  --slate-soft: #6b7280;
  --line: #e2e8f0;
  --line-strong: #d1d5db;
  --bg: #ffffff;
  --bg-soft: #f5f7fa;
  --bg-blue: #edf4fc;
  --surface-container: #e8eff7;

  /* Estados */
  --success: #4caf50;
  --warning: #ffb300;
  --danger: #f44336;

  /* Efectos */
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --shadow-sm: 0 1px 2px rgba(11, 18, 32, 0.06), 0 2px 8px rgba(11, 18, 32, 0.04);
  --shadow: 0 12px 32px rgba(11, 18, 32, 0.08);
  --shadow-lg: 0 28px 70px rgba(0, 27, 70, 0.18);
  --ring: 0 0 0 4px rgba(0, 108, 73, 0.18);

  --maxw: 1180px;
  --nav-h: 72px;
}

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

* {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

/* Deja aire bajo el nav fijo al saltar a una sección */
section[id],
footer[id] {
  scroll-margin-top: calc(var(--nav-h) + 18px);
}

body {
  font-family: "Comfortaa", "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}

ul {
  list-style: none;
}

:focus-visible {
  outline: 3px solid var(--emerald);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection {
  background: var(--mint);
  color: var(--navy-900);
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 22px;
}

.section {
  padding: clamp(42px, 4.6vw, 58px) 0;
  position: relative;
}

.section--soft {
  background: var(--bg-soft);
}

.section--blue {
  background: linear-gradient(180deg, #ffffff 0%, var(--bg-blue) 100%);
}

.section--dark {
  background:
    radial-gradient(900px 420px at 12% 0%, rgba(0, 108, 73, 0.28), transparent 60%),
    radial-gradient(760px 420px at 92% 12%, rgba(111, 251, 190, 0.14), transparent 62%),
    linear-gradient(160deg, var(--navy-900) 0%, var(--navy-700) 100%);
  color: #fff;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy-900);
  color: #fff;
  padding: 12px 18px;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 200;
}

.skip-link:focus {
  left: 0;
}

/* ---------- Section headings ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--emerald);
  background: var(--mint-soft);
  border: 1px solid rgba(0, 108, 73, 0.15);
  padding: 7px 14px;
  border-radius: 999px;
}

.section--dark .eyebrow {
  color: var(--mint);
  background: rgba(111, 251, 190, 0.1);
  border-color: rgba(111, 251, 190, 0.25);
}

.section-head {
  max-width: 720px;
  margin: 0 auto clamp(22px, 2.8vw, 34px);
  text-align: center;
}

.section-head h2 {
  font-size: clamp(1.75rem, 3.6vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 800;
  margin: 16px 0 14px;
  color: var(--navy-900);
}

.section--dark .section-head h2 {
  color: #fff;
}

.section-head p {
  color: var(--slate);
  font-size: 1.05rem;
}

.section--dark .section-head p {
  color: rgba(255, 255, 255, 0.78);
}

.grad-text {
  background: linear-gradient(100deg, var(--emerald) 0%, var(--mint) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease,
    color 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: linear-gradient(135deg, var(--emerald) 0%, var(--emerald-dark) 100%);
  color: #fff;
  box-shadow: 0 10px 26px rgba(0, 108, 73, 0.28);
}

.btn--primary:hover {
  box-shadow: 0 16px 34px rgba(0, 108, 73, 0.36);
}

.btn--mint {
  background: var(--mint);
  color: var(--navy-900);
  box-shadow: 0 10px 26px rgba(111, 251, 190, 0.28);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(6px);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.16);
}

.btn--outline {
  background: #fff;
  color: var(--navy-900);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.btn--outline:hover {
  border-color: var(--emerald);
  color: var(--emerald);
}

.btn--lg {
  padding: 17px 30px;
  font-size: 1rem;
}

/* Destello que recorre el botón al pasar el cursor */
.btn--shine {
  position: relative;
  overflow: hidden;
}

.btn--shine::after {
  content: "";
  position: absolute;
  top: -20%;
  left: -130%;
  width: 55%;
  height: 140%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: skewX(-18deg);
  transition: left 0.65s ease;
  pointer-events: none;
}

.btn--shine:hover::after {
  left: 135%;
}

.btn__icon {
  width: 18px;
  height: 18px;
  flex: none;
}

/* ---------- Navbar ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  transition: background 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  border-bottom: 1px solid transparent;
}

.nav.is-stuck {
  background: rgba(0, 27, 70, 0.9);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 30px rgba(0, 27, 70, 0.3);
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 1.08rem;
  color: #fff;
  transition: color 0.25s ease;
}

.brand img {
  height: 34px;
  width: auto;
}

.brand__word span {
  color: var(--mint);
}

.nav.is-stuck .brand {
  color: #fff;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

/* Comfortaa es más ancha que la tipografía anterior: con este ajuste fino la
   barra horizontal sigue entrando sin desbordar hasta que se colapsa. */
.nav__links > a {
  padding: 9px 11px;
  border-radius: 999px;
  font-size: 0.87rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav__links > a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.nav.is-stuck .nav__links > a {
  color: rgba(255, 255, 255, 0.88);
}

.nav.is-stuck .nav__links > a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.nav__cta {
  margin-left: 6px;
}

/* Los accesos de la barra solo se ven en escritorio; en móvil se inyectan
   dentro del menú desplegable (ver @media max-width 1100px). */
.nav__links-acciones {
  display: none;
}

/* Velo detrás del menú móvil abierto: lo separa del contenido como una capa
   modal. Solo existe en móvil. */
.nav__backdrop {
  display: none;
}

.nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.nav.is-stuck .nav__toggle {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.24);
}

.nav__toggle svg {
  width: 22px;
  height: 22px;
}

/* ---------- Barra de progreso de lectura ---------- */
.progress {
  position: fixed;
  inset: 0 auto auto 0;
  height: 3px;
  width: 0;
  z-index: 130;
  background: linear-gradient(90deg, var(--emerald), var(--mint));
  box-shadow: 0 0 12px rgba(111, 251, 190, 0.55);
  transition: width 0.08s linear;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: calc(var(--nav-h) + clamp(44px, 5.4vw, 70px)) 0 clamp(46px, 5vw, 72px);
  background:
    radial-gradient(880px 460px at 8% -6%, rgba(0, 108, 73, 0.4), transparent 58%),
    radial-gradient(760px 460px at 96% 6%, rgba(111, 251, 190, 0.16), transparent 60%),
    linear-gradient(158deg, #001433 0%, var(--navy-900) 42%, var(--navy-700) 100%);
  color: #fff;
  overflow: hidden;
}

.hero::before {
  /* rejilla sutil */
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 72%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -60%;
  width: 120%;
  height: 70%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(111, 251, 190, 0.12), transparent 65%);
  pointer-events: none;
}

.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(36px, 5vw, 64px);
  align-items: center;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 8px 15px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}

.hero__badge b {
  color: var(--mint);
  font-weight: 700;
}

.hero__badge--plain svg {
  width: 16px;
  height: 16px;
  color: var(--mint);
}

.hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero__note {
  margin-top: 18px;
  font-size: 0.86rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.72);
}

.dot-live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 0 rgba(111, 251, 190, 0.7);
  animation: pulse 2.4s infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 10px rgba(111, 251, 190, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(111, 251, 190, 0);
  }
}

.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.7rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
  font-weight: 800;
  margin: 22px 0 20px;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--mint) 0%, #b8ffe0 60%, #ffffff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lead {
  font-size: clamp(1rem, 1.4vw, 1.14rem);
  color: rgba(255, 255, 255, 0.8);
  max-width: 560px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 32px;
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.hero__trust li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
}

.hero__trust svg {
  width: 18px;
  height: 18px;
  color: var(--mint);
  flex: none;
}

/* ---------- Marco del teléfono (hero) ---------- */
.showcase {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.showcase__glow {
  position: absolute;
  inset: 8% 6%;
  background: radial-gradient(circle at 50% 40%, rgba(111, 251, 190, 0.35), transparent 62%);
  filter: blur(28px);
  z-index: 0;
}

.phone {
  position: relative;
  z-index: 1;
  width: min(322px, 100%);
  border-radius: 42px;
  padding: 11px;
  background: linear-gradient(160deg, #16233f, #050b18);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* Visor del hero: capturas reales que se turnan dentro del marco.
   Proporción 578x1255, la misma de las capturas. */
.phone__viewer {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  background: #f5f7fa;
  aspect-ratio: 578 / 1255;
  cursor: pointer;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.75s ease, transform 1.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* Destello al cambiar de pantalla (da la sensación de toque) */
.phone__viewer::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.34) 50%, transparent 62%);
}

.phone__viewer.is-sweeping::after {
  animation: sweep 0.9s ease-out;
}

@keyframes sweep {
  from {
    opacity: 1;
    transform: translateX(-105%);
  }

  to {
    opacity: 1;
    transform: translateX(105%);
  }
}

/* Puntos de navegación bajo el teléfono */
.viewer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 16px;
}

.viewer-nav__cap {
  display: none;
  flex-basis: 100%;
  text-align: center;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.82);
}

.dots {
  display: flex;
  align-items: center;
  gap: 2px;
}

/* El botón es más grande que el punto: se puede tocar con el dedo. */
.dot {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  background: none;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  transition: width 0.25s ease, background 0.25s ease;
}

.dot:hover::before {
  background: rgba(255, 255, 255, 0.55);
}

.dot.is-active::before {
  width: 16px;
  background: var(--mint);
}

/* Captura real usada por el visor ampliado */
.phone__shot {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 32px;
  background: #f5f7fa;
}

/* Tarjeta flotante */
.float-card {
  position: absolute;
  z-index: 2;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--navy-900);
  white-space: nowrap;
  animation: float 6s ease-in-out infinite;
}

.float-card--tl {
  top: 11%;
  left: -3%;
}

/* La etiqueta del visor cambia con la captura */
.float-card.is-changing {
  animation: card-in 0.45s ease both;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.float-card--br {
  bottom: 13%;
  right: -4%;
  animation-delay: 1.6s;
}

.float-card svg {
  width: 20px;
  height: 20px;
  color: var(--emerald);
  flex: none;
}

@keyframes float {
  50% {
    transform: translateY(-11px);
  }
}

/* ---------- Visor ampliado ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}

.lightbox[hidden] {
  display: none;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 8, 23, 0.86);
  backdrop-filter: blur(6px);
}

.lightbox__panel {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: clamp(8px, 2vw, 26px);
  max-height: 100%;
}

.phone--lg {
  /* Se limita por alto para que la captura siempre entre en la ventana. */
  width: min(320px, 62vw, calc((100vh - 210px) * 0.46));
  animation: lb-in 0.24s ease both;
}

@keyframes lb-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }
}

.lightbox__figure {
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.lightbox__cap {
  text-align: center;
  color: #fff;
  max-width: 460px;
}

.lightbox__cap b {
  display: block;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.lightbox__cap span {
  display: block;
  margin-top: 4px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.72);
}

.lightbox__cap small {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--mint);
}

.lightbox__close,
.lightbox__nav {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.lightbox__close svg,
.lightbox__nav svg {
  width: 20px;
  height: 20px;
}

.lightbox__close:hover,
.lightbox__nav:hover {
  background: var(--mint);
  border-color: var(--mint);
  color: var(--navy-900);
}

.lightbox__close {
  position: fixed;
  top: 18px;
  right: 18px;
}

body.is-locked {
  overflow: hidden;
}

@media (max-width: 720px) {
  .lightbox__panel {
    gap: 0;
  }

  .phone--lg {
    width: min(280px, 68vw);
  }

  .lightbox__close {
    top: 12px;
    right: 12px;
  }

  .lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    background: rgba(2, 8, 23, 0.55);
    backdrop-filter: blur(4px);
  }

  .lightbox__nav--prev {
    left: -2px;
  }

  .lightbox__nav--next {
    right: -2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .phone--lg,
  .reveal.is-visible {
    animation: none;
  }

  /* Sin movimiento: la captura cambia de golpe y sin destello. */
  .slide {
    transition: none;
    transform: none;
  }

  .phone__viewer::after,
  .float-card.is-changing,
  .showcase__glow,
  .hero::after,
  .compare.is-visible tbody tr,
  .flow.is-visible .flow__row,
  .flow.is-visible .flow__connector {
    animation: none;
  }

  .reveal {
    transform: none;
  }
}

/* ---------- Franja tecnológica (marquesina) ---------- */

/* ---------- Franja tecnológica (marquesina) ---------- */
.strip {
  padding: 30px 0 34px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.strip__title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate-soft);
  text-align: center;
  margin-bottom: 20px;
}

.marquee {
  display: flex;
  gap: 44px;
  width: max-content;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee__track {
  display: flex;
  align-items: center;
  gap: 44px;
  animation: marquee 32s linear infinite;
}

@keyframes marquee {
  to {
    transform: translateX(calc(-100% - 44px));
  }
}

.strip:hover .marquee__track {
  animation-play-state: paused;
}

.strip__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy-700);
  opacity: 0.72;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.strip__item:hover {
  opacity: 1;
}

.strip__item svg {
  width: 18px;
  height: 18px;
  color: var(--emerald);
}

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.stat::after {
  content: "";
  position: absolute;
  inset: auto -30% -60% auto;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 108, 73, 0.12), transparent 70%);
}

.stat b {
  display: block;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: -0.04em;
  font-weight: 800;
  color: var(--navy-900);
}

.stat span {
  display: block;
  margin-top: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--slate);
}

/* ---------- Feature grid ---------- */
.grid {
  display: grid;
  gap: 20px;
}

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: rgba(0, 108, 73, 0.35);
}

/* Etiqueta del plan VIP en las tarjetas de funciones */
.card__flag {
  position: absolute;
  top: 18px;
  right: 18px;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, var(--navy-900), var(--emerald));
  padding: 4px 10px;
  border-radius: 999px;
}

.card__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  color: var(--mint);
  margin-bottom: 16px;
}

.card__icon svg {
  width: 24px;
  height: 24px;
}

.card h3 {
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--navy-900);
  margin-bottom: 8px;
}

.card p {
  font-size: 0.93rem;
  color: var(--slate);
}

.card__list {
  margin-top: 14px;
  display: grid;
  gap: 7px;
}

/* Icono en posición absoluta: el texto (y las negritas dentro de él)
   fluye en línea en vez de repartirse como columnas de un flex. */
.card__list li {
  position: relative;
  padding-left: 25px;
  font-size: 0.86rem;
  color: var(--slate);
}

.card__list svg {
  position: absolute;
  left: 0;
  top: 3px;
  width: 16px;
  height: 16px;
  color: var(--emerald);
}

/* ---------- Pros section ---------- */
.pros {
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  gap: clamp(28px, 4vw, 52px);
  align-items: start;
}

.pros__list {
  display: grid;
  gap: 16px;
}

.pro {
  display: flex;
  gap: 15px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}

.pro__check {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--mint-soft);
  color: var(--emerald);
  display: grid;
  place-items: center;
  flex: none;
}

.pro__check svg {
  width: 16px;
  height: 16px;
}

.pro h3 {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: 3px;
}

.pro p {
  font-size: 0.88rem;
  color: var(--slate);
}

/* Tabla comparativa */
.compare {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.compare table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.87rem;
}

.compare th,
.compare td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.compare thead th {
  background: var(--bg-blue);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--slate);
  font-weight: 800;
}

.compare thead th:nth-child(2) {
  color: var(--emerald);
}

.compare tbody tr:last-child td {
  border-bottom: 0;
}

.compare td:nth-child(2),
.compare th:nth-child(2) {
  background: rgba(111, 251, 190, 0.09);
  font-weight: 700;
  color: var(--navy-900);
}

.compare td:first-child {
  color: var(--slate);
  font-weight: 600;
}

.compare td:last-child {
  color: var(--slate-soft);
}

.compare__yes,
.compare__no {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

.compare__yes {
  color: var(--emerald);
}

.compare__yes small {
  font-weight: 600;
  color: var(--slate-soft);
}

.compare__no {
  color: var(--slate-soft);
}

/* ---------- Cloud ---------- */
.cloud {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(30px, 5vw, 60px);
  align-items: center;
}

.cloud h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  letter-spacing: -0.025em;
  font-weight: 800;
  line-height: 1.14;
  margin: 16px 0 16px;
  color: #fff;
}

.cloud p {
  color: rgba(255, 255, 255, 0.8);
}

.cloud__callout {
  display: flex;
  gap: 12px;
  margin-top: 26px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(111, 251, 190, 0.28);
}

.cloud__callout svg {
  width: 20px;
  height: 20px;
  color: var(--mint);
  flex: none;
  margin-top: 2px;
}

.cloud__callout p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.82);
}

.cloud__callout b {
  color: #fff;
}

.cloud__points {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.cloud__point {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.cloud__point span {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(111, 251, 190, 0.12);
  border: 1px solid rgba(111, 251, 190, 0.25);
  color: var(--mint);
  display: grid;
  place-items: center;
  flex: none;
}

.cloud__point svg {
  width: 19px;
  height: 19px;
}

.cloud__point b {
  display: block;
  font-size: 0.96rem;
  color: #fff;
  margin-bottom: 2px;
}

.cloud__point p {
  font-size: 0.87rem;
  color: rgba(255, 255, 255, 0.72);
}

/* Diagrama de sincronización */
.flow {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-xl);
  padding: 30px 26px;
  backdrop-filter: blur(8px);
  display: grid;
  gap: 14px;
}

.flow__row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.node {
  border-radius: var(--radius);
  padding: 16px 14px;
  text-align: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
}

.node svg {
  width: 24px;
  height: 24px;
  margin: 0 auto 8px;
  color: var(--mint);
}

.node b {
  display: block;
  font-size: 0.84rem;
  letter-spacing: -0.01em;
}

.node small {
  display: block;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.62);
  margin-top: 3px;
}

.node--main {
  grid-column: span 3;
  background: linear-gradient(135deg, rgba(111, 251, 190, 0.16), rgba(0, 108, 73, 0.22));
  border-color: rgba(111, 251, 190, 0.35);
}

.flow__connector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.flow__connector svg {
  width: 20px;
  height: 20px;
  color: var(--mint);
}

.flow__note {
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.66);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.flow__note svg {
  width: 15px;
  height: 15px;
  color: var(--mint);
  flex: none;
}

/* ---------- Security ---------- */
.sec-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.sec {
  display: flex;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.sec__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--mint-soft);
  color: var(--emerald);
  display: grid;
  place-items: center;
  flex: none;
}

.sec__icon svg {
  width: 20px;
  height: 20px;
}

.sec b {
  display: block;
  font-size: 0.95rem;
  color: var(--navy-900);
  margin-bottom: 3px;
}

.sec p {
  font-size: 0.85rem;
  color: var(--slate);
}

/* ---------- Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  counter-reset: step;
}

.step {
  position: relative;
  padding-top: 8px;
}

.step__num {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.05rem;
  color: #fff;
  background: linear-gradient(135deg, var(--navy-900), var(--emerald));
  margin-bottom: 16px;
  box-shadow: 0 10px 24px rgba(0, 27, 70, 0.22);
}

.step h3 {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: 6px;
}

.step p {
  font-size: 0.89rem;
  color: var(--slate);
}

.step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 30px;
  left: 60px;
  right: -10px;
  height: 2px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}

/* ---------- Planes ---------- */
.plans {
  align-items: stretch;
}

.plan {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.plan:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.plan--pro {
  border-color: rgba(0, 108, 73, 0.35);
  background:
    radial-gradient(520px 220px at 88% 0%, rgba(0, 108, 73, 0.09), transparent 62%),
    #fff;
}

.plan__tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--emerald);
  background: var(--mint-soft);
  border: 1px solid rgba(0, 108, 73, 0.15);
  padding: 6px 13px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.plan__tag svg {
  width: 15px;
  height: 15px;
}

.plan h3 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--navy-900);
}

.plan__price {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--emerald);
  margin-bottom: 6px;
}

.plan__desc {
  font-size: 0.92rem;
  color: var(--slate);
  margin-bottom: 18px;
}

.plan__list {
  display: grid;
  gap: 11px;
  margin-bottom: 26px;
}

.plan__list li {
  position: relative;
  padding-left: 27px;
  font-size: 0.9rem;
  color: var(--slate);
}

.plan__list svg {
  position: absolute;
  left: 0;
  top: 3px;
  width: 17px;
  height: 17px;
  color: var(--emerald);
}

/* Los ítems marcados como límite del plan se ven en gris */
.plan__list li.is-limit svg {
  color: var(--slate-soft);
}

.plan .btn {
  margin-top: auto;
  width: 100%;
}

.plans__note {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  max-width: 720px;
  margin: 28px auto 0;
  font-size: 0.86rem;
  text-align: center;
  color: var(--slate);
}

.plans__note svg {
  width: 18px;
  height: 18px;
  color: var(--emerald);
  flex: none;
  margin-top: 3px;
}

/* ---------- CTA band ---------- */
.cta {
  position: relative;
  border-radius: var(--radius-xl);
  padding: clamp(38px, 6vw, 66px);
  background:
    radial-gradient(600px 300px at 90% 10%, rgba(111, 251, 190, 0.24), transparent 60%),
    linear-gradient(140deg, var(--navy-900), var(--navy-700));
  color: #fff;
  overflow: hidden;
  text-align: center;
}

.cta h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  letter-spacing: -0.03em;
  font-weight: 800;
  line-height: 1.14;
  max-width: 720px;
  margin: 0 auto 14px;
}

.cta p {
  color: rgba(255, 255, 255, 0.82);
  max-width: 560px;
  margin: 0 auto;
}

.cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 30px;
}

.cta__note {
  margin-top: 22px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.62);
}

/* ---------- FAQ ---------- */
.faq {
  max-width: 860px;
  margin-inline: auto;
  display: grid;
  gap: 12px;
}

.qa {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.qa.is-open {
  border-color: rgba(0, 108, 73, 0.35);
  box-shadow: var(--shadow);
}

.qa__q {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  padding: 19px 22px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--navy-900);
}

.qa__q span {
  margin-left: auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-blue);
  color: var(--emerald);
  display: grid;
  place-items: center;
  flex: none;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.qa.is-open .qa__q span {
  transform: rotate(45deg);
  background: var(--emerald);
  color: #fff;
}

.qa__q svg {
  width: 15px;
  height: 15px;
}

.qa__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.qa__a p {
  padding: 0 22px 20px;
  color: var(--slate);
  font-size: 0.94rem;
}

.qa__a p:first-child {
  padding-top: 0;
}

/* Los enlaces de una respuesta: el panel los deja sin `style` a propósito (el
   diseño va aquí), así que la cadena de la respuesta de «¿Cómo consigo
   prestamOS?» necesita su color desde la hoja. */
.qa__a a {
  color: var(--emerald);
  font-weight: 700;
}

.qa__list {
  display: grid;
  gap: 9px;
  padding: 0 22px 20px;
}

.qa__list li {
  position: relative;
  padding-left: 18px;
  font-size: 0.92rem;
  color: var(--slate);
}

.qa__list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald);
}

.qa__list b {
  color: var(--navy-900);
}

/* ---------- Footer ---------- */
.footer {
  background: #001433;
  color: rgba(255, 255, 255, 0.72);
  padding: 62px 0 26px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
  gap: 34px;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.footer__brand img {
  height: clamp(52px, 7vw, 66px);
  width: auto;
}

.footer__brand b {
  color: #fff;
  font-size: 1.14rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.footer p {
  font-size: 0.88rem;
  max-width: 320px;
}

.footer h4 {
  color: #fff;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  font-weight: 800;
}

.footer ul {
  display: grid;
  gap: 10px;
}

.footer a {
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.footer a:hover {
  color: var(--mint);
}

.footer__contact {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-weight: 700;
  color: #fff;
  font-size: 0.9rem;
}

.footer__contact svg {
  width: 18px;
  height: 18px;
  color: var(--mint);
}

.footer__play {
  width: 100%;
  justify-content: center;
}

.footer__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
}

.footer__badge svg {
  width: 16px;
  height: 16px;
  color: var(--mint);
}

.footer__bottom {
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
}

.footer__bottom span {
  color: rgba(255, 255, 255, 0.5);
}

/* ---------- Reveal on scroll ---------- */
/* La entrada se hace con animación (no con transition) para que el
   transform de :hover siga funcionando después. */
.reveal {
  opacity: 0;
}

.reveal.is-visible {
  opacity: 1;
  animation: reveal-up 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) backwards;
}

@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(26px) scale(0.985);
  }
}

/* Variantes para las columnas de dos bloques */
.reveal--left.is-visible {
  animation-name: reveal-left;
}

@keyframes reveal-left {
  from {
    opacity: 0;
    transform: translateX(-34px);
  }
}

.reveal--right.is-visible {
  animation-name: reveal-right;
}

@keyframes reveal-right {
  from {
    opacity: 0;
    transform: translateX(34px);
  }
}

.reveal--scale.is-visible {
  animation-name: reveal-scale;
}

@keyframes reveal-scale {
  from {
    opacity: 0;
    transform: scale(0.93);
  }
}

/* ---------- Animaciones de la página ---------- */

/* El teléfono respira y el halo del hero se mueve despacio */
.showcase__glow {
  animation: glow-breathe 9s ease-in-out infinite;
}

@keyframes glow-breathe {
  50% {
    transform: scale(1.12);
    opacity: 0.75;
  }
}

.hero::after {
  animation: aurora 14s ease-in-out infinite alternate;
}

@keyframes aurora {
  from {
    transform: translateX(-50%) translateY(0) scale(1);
  }

  to {
    transform: translateX(-46%) translateY(-14px) scale(1.08);
  }
}

/* Iconos y viñetas reaccionan al pasar por encima */
.card__icon svg,
.step__num,
.stat b,
.pro__check svg,
.strip__item svg,
.sec__icon svg {
  transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1), background 0.3s ease,
    color 0.3s ease;
}

.card:hover .card__icon svg {
  transform: scale(1.14) rotate(-5deg);
}

.card:hover .card__list svg {
  transform: translateX(3px);
}

.card__list svg {
  transition: transform 0.3s ease;
}

.stat:hover b {
  transform: translateY(-3px) scale(1.03);
  color: var(--emerald);
}

.step:hover .step__num {
  transform: translateY(-4px) scale(1.06);
}

.pro:hover .pro__check svg {
  transform: scale(1.16);
}

.strip__item:hover svg {
  transform: translateY(-3px) scale(1.15);
}

.sec:hover .sec__icon svg {
  transform: scale(1.16) rotate(4deg);
}

/* La tabla comparativa entra fila por fila */
.compare.is-visible tbody tr {
  animation: row-in 0.55s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.compare.is-visible tbody tr:nth-child(1) { animation-delay: 0.05s; }
.compare.is-visible tbody tr:nth-child(2) { animation-delay: 0.12s; }
.compare.is-visible tbody tr:nth-child(3) { animation-delay: 0.19s; }
.compare.is-visible tbody tr:nth-child(4) { animation-delay: 0.26s; }
.compare.is-visible tbody tr:nth-child(5) { animation-delay: 0.33s; }
.compare.is-visible tbody tr:nth-child(6) { animation-delay: 0.4s; }
.compare.is-visible tbody tr:nth-child(7) { animation-delay: 0.47s; }

@keyframes row-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

.compare tbody tr {
  transition: background 0.2s ease;
}

.compare tbody tr:hover {
  background: var(--bg-blue);
}

/* El flujo de la nube se dibuja paso a paso */
.flow.is-visible .flow__row {
  animation: row-in 0.6s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.flow.is-visible .flow__row:nth-child(1) { animation-delay: 0.08s; }
.flow.is-visible .flow__row:nth-child(2) { animation-delay: 0.2s; }
.flow.is-visible .flow__row:nth-child(3) { animation-delay: 0.32s; }

.flow__connector {
  transform-origin: top center;
}

.flow.is-visible .flow__connector {
  animation: connector-in 0.5s ease-out both;
  animation-delay: 0.16s;
}

@keyframes connector-in {
  from {
    opacity: 0;
    transform: scaleY(0.2);
  }
}

/* Botones y enlaces con respuesta al pasar por encima */
.nav__links > a {
  position: relative;
}

.nav__links > a::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.nav__links > a:hover::after {
  transform: scaleX(1);
}

.plan {
  transition: transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.28s ease,
    border-color 0.28s ease;
}

.plan:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

/* El acordeón de preguntas gira su icono */
.qa__q svg {
  transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.qa.is-open .qa__q svg {
  transform: rotate(135deg);
}

/* ---------- Centrado automático al hacer scroll ---------- */
/* Sin scroll-snap nativo: solo ancla los bloques que caben enteros en la
   ventana y aquí la mayoría de los módulos son más altos. El encuadre lo hace
   #main > section en app.js (ver "Centrado automático"). El aire bajo el menú
   fijo al saltar a una sección lo da scroll-margin-top, definido arriba. */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    animation: none;
  }
  .float-card,
  .dot-live,
  .marquee__track {
    animation: none;
  }
  .btn--shine::after {
    display: none;
  }
}

/* ==========================================================================
   Páginas legales (privacidad.html / terminos.html)
   ========================================================================== */
.legal-hero {
  position: relative;
  padding: calc(var(--nav-h) + 48px) 0 56px;
  background:
    radial-gradient(760px 380px at 10% -10%, rgba(0, 108, 73, 0.35), transparent 58%),
    linear-gradient(158deg, #001433 0%, var(--navy-900) 45%, var(--navy-700) 100%);
  color: #fff;
  overflow: hidden;
}

.legal-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: radial-gradient(circle at 40% 0%, #000, transparent 72%);
  pointer-events: none;
}

.legal-hero__inner {
  position: relative;
  z-index: 1;
}

.legal-topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 40px;
}

.legal-topbar .brand {
  color: #fff;
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  font-size: 0.88rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 9px 16px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.legal-back:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.legal-back svg {
  width: 16px;
  height: 16px;
}

.legal-hero h1 {
  font-size: clamp(1.9rem, 4.4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin-bottom: 16px;
}

.legal-hero p {
  color: rgba(255, 255, 255, 0.8);
  max-width: 640px;
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.legal-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 7px 14px;
  border-radius: 999px;
}

.legal-chip svg {
  width: 15px;
  height: 15px;
  color: var(--mint);
}

.legal-main {
  padding: clamp(40px, 6vw, 72px) 0 clamp(56px, 7vw, 90px);
  background: var(--bg-soft);
}

.legal-wrap {
  max-width: 860px;
  margin-inline: auto;
}

/* El historial de versiones de los documentos legales (lo pinta
   `legales-web.js`) y el aviso de estar viendo una versión antigua. */
.legal-versiones {
  margin-top: 30px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  box-shadow: var(--shadow-sm);
}

.legal-versiones h2 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--slate);
  font-weight: 800;
  margin-bottom: 8px;
}

.legal-versiones__nota {
  color: var(--slate);
  font-size: 0.92rem;
  margin-bottom: 12px;
}

.legal-versiones__lista {
  display: flex;
  flex-direction: column;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.legal-versiones__lista a {
  color: var(--emerald);
  font-weight: 700;
  text-decoration: underline;
}

.legal-versiones__lista span {
  color: var(--slate);
  font-size: 0.9rem;
}

.legal-aviso-version {
  margin-bottom: 18px;
  background: var(--mint-soft);
  border: 1px solid rgba(0, 108, 73, 0.18);
  border-radius: var(--radius);
  padding: 14px 18px;
  color: var(--slate);
  font-size: 0.95rem;
}

.legal-aviso-version a {
  color: var(--emerald);
  font-weight: 700;
  text-decoration: underline;
}

.legal-toc {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 30px;
}

.legal-toc h2 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--slate);
  margin-bottom: 14px;
  font-weight: 800;
}

.legal-toc ol {
  list-style: none;
  display: grid;
  gap: 9px;
  counter-reset: toc;
}

.legal-toc li {
  counter-increment: toc;
  font-size: 0.92rem;
}

.legal-toc a {
  display: flex;
  gap: 10px;
  color: var(--navy-700);
  font-weight: 600;
  transition: color 0.2s ease;
}

.legal-toc a::before {
  content: counter(toc) ".";
  color: var(--emerald);
  font-weight: 800;
  min-width: 18px;
}

.legal-toc a:hover {
  color: var(--emerald);
}

.legal-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 44px);
  box-shadow: var(--shadow-sm);
}

.legal-card > * + * {
  margin-top: 16px;
}

.legal-card h2 {
  font-size: clamp(1.15rem, 2.2vw, 1.35rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--navy-900);
  padding-top: 14px;
  scroll-margin-top: calc(var(--nav-h) + 18px);
}

.legal-card h2:first-child {
  padding-top: 0;
}

.legal-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--emerald);
  scroll-margin-top: calc(var(--nav-h) + 18px);
}

.legal-card p,
.legal-card li {
  font-size: 0.95rem;
  color: var(--slate);
}

.legal-card ul,
.legal-card ol.legal-list {
  display: grid;
  gap: 9px;
  padding-left: 4px;
}

/* Las viñetas van con posicionamiento absoluto: así el texto (y las
   negritas dentro de él) fluye en línea, sin partirse en columnas. */
.legal-card ul li,
.legal-card ol.legal-list li {
  position: relative;
  padding-left: 20px;
}

.legal-card ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
}

.legal-card ol.legal-list {
  counter-reset: legal;
}

.legal-card ol.legal-list li {
  counter-increment: legal;
  padding-left: 26px;
}

.legal-card ol.legal-list li::before {
  content: counter(legal) ".";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 800;
  color: var(--emerald);
}

.legal-card strong {
  color: var(--navy-900);
}

.legal-card a {
  color: var(--emerald);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-note {
  display: flex;
  gap: 12px;
  background: var(--mint-soft);
  border: 1px solid rgba(0, 108, 73, 0.18);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.legal-note svg {
  width: 20px;
  height: 20px;
  color: var(--emerald);
  flex: none;
  margin-top: 2px;
}

.legal-note p {
  font-size: 0.9rem;
  color: var(--navy-900);
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.legal-table th,
.legal-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--slate);
  vertical-align: top;
}

.legal-table th {
  background: var(--bg-blue);
  color: var(--navy-900);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 800;
}

.legal-table tr:last-child td {
  border-bottom: 0;
}

.legal-footer {
  background: #001433;
  color: rgba(255, 255, 255, 0.7);
  padding: 40px 0;
}

.legal-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  align-items: center;
  justify-content: space-between;
  font-size: 0.86rem;
}

.legal-footer a {
  color: var(--mint);
  font-weight: 700;
}

.legal-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  list-style: none;
}

.legal-footer__links a {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 600;
}

.legal-footer__links a:hover,
.legal-footer a:hover {
  color: var(--mint);
}

/* ---------- Página 404 ---------- */
.notfound {
  text-align: center;
}

/* Selector con más especificidad que `.legal-card p` para que el número
   conserve su tamaño y el degradado. */
.notfound .notfound__code {
  font-size: clamp(4rem, 14vw, 7rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  margin-bottom: 6px;
  background: linear-gradient(100deg, var(--navy-900) 0%, var(--emerald) 62%, var(--mint) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.notfound h2,
.notfound h3,
.notfound p {
  text-align: center;
}

.notfound h2 {
  padding-top: 0;
}

/* Los botones dentro de una tarjeta legal deben conservar su propio color
   (la regla .legal-card a los volvía verdes sobre verde). */
.legal-card a.btn {
  text-decoration: none;
}

.legal-card a.btn--primary {
  color: #fff;
}

.legal-card a.btn--outline,
.legal-card a.btn--mint {
  color: var(--navy-900);
}

.notfound__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: 8px 0 4px;
}

.notfound__links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  text-align: left;
  margin-top: 10px;
}

.notfound__links a {
  font-weight: 600;
  color: var(--navy-700);
  text-decoration: none;
}

.notfound__links a:hover {
  color: var(--emerald);
  text-decoration: underline;
}

.notfound .legal-note {
  text-align: left;
  margin-top: 26px;
}

@media (max-width: 720px) {
  .notfound__links {
    grid-template-columns: 1fr;
  }
  .notfound__actions .btn {
    width: 100%;
  }
  .legal-topbar {
    flex-wrap: wrap;
  }
  .legal-back {
    margin-left: 0;
    order: 3;
  }
  .legal-table th,
  .legal-table td {
    padding: 10px 10px;
    font-size: 0.82rem;
  }
}

/* ---------- Responsive ---------- */

/* Nav colapsable: con Comfortaa el menú horizontal necesita algo más de ancho,
   así que colapsa desde 1100px en vez de 1000px para no desbordar la barra. */
@media (max-width: 1100px) {
  /* Menú móvil: fondo institucional SÓLIDO (sin transparencia), por encima de
     todo el contenido y con scroll propio, para que los enlaces y los accesos
     no se fundan con la página ni se recorten al deslizar. */
  .nav__links {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 16px 18px 24px;
    background: var(--navy-900);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 24px 48px rgba(0, 27, 70, 0.4);
    transform: translateY(-130%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.28s ease, opacity 0.28s ease, visibility 0.28s ease;
    margin-left: 0;
    max-height: calc(100dvh - var(--nav-h));
    overflow-y: auto;
    overscroll-behavior: contain;
    z-index: 120;
  }
  .nav__links.is-open {
    transform: none;
    opacity: 1;
    visibility: visible;
  }
  .nav__backdrop {
    display: block;
    position: fixed;
    inset: var(--nav-h) 0 0 0;
    background: rgba(0, 27, 70, 0.55);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s ease;
    z-index: 90;
  }
  .nav__backdrop.is-open {
    opacity: 1;
    visibility: visible;
  }
  .nav__links > a {
    color: rgba(255, 255, 255, 0.9);
    padding: 13px 14px;
    border-radius: 12px;
  }
  .nav__links > a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
  }
  .nav__links-acciones {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
  }
  .nav__links-acciones .btn {
    width: 100%;
    justify-content: center;
  }
  .nav__toggle {
    display: inline-flex;
    margin-left: auto;
  }
  .nav__cta {
    display: none;
  }
}

@media (max-width: 1024px) {
  .hero__grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero__lead {
    margin-inline: auto;
  }
  .hero__actions,
  .hero__trust,
  .hero__tags {
    justify-content: center;
  }
  .showcase {
    margin-top: 20px;
  }
  .float-card--tl {
    left: 2%;
  }
  .float-card--br {
    right: 2%;
  }
  .grid--3,
  .sec-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .pros,
  .cloud {
    grid-template-columns: 1fr;
  }
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
  .step:not(:last-child)::after {
    display: none;
  }
  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .grid--3,
  .grid--2,
  .sec-grid,
  .stats,
  .steps,
  .flow__row {
    grid-template-columns: 1fr;
  }
  .node--main {
    grid-column: span 1;
  }
  .footer__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .float-card {
    display: none;
  }

  /* La tarjeta flotante desaparece: el nombre de la pantalla va bajo los puntos */
  .viewer-nav__cap {
    display: block;
  }

  .phone {
    width: min(310px, 100%);
  }
  .compare th,
  .compare td {
    padding: 12px 12px;
    font-size: 0.8rem;
  }
}

/* ==========================================================================
   Acción de Firebase Auth (correo de restablecer contraseña / verificar)
   Se ve solo con ?mode=…&oobCode=… en la URL (ver auth-action.js). En una
   visita normal la landing se muestra como siempre.
   ========================================================================== */
.auth {
  /* Oculto por defecto: solo se ve cuando auth-flash.js marca la página como
     acción de Firebase Auth. Una visita normal nunca lo encuentra. */
  display: none;
  position: fixed;
  inset: 0;
  z-index: 400;
  overflow-y: auto;
  align-items: center;
  justify-content: center;
  padding: 26px 18px;
  background:
    radial-gradient(880px 460px at 8% -6%, rgba(0, 108, 73, 0.4), transparent 58%),
    radial-gradient(760px 460px at 96% 6%, rgba(111, 251, 190, 0.16), transparent 60%),
    linear-gradient(158deg, #001433 0%, var(--navy-900) 42%, var(--navy-700) 100%);
  animation: auth-in 0.35s ease both;
}

html.is-auth .auth {
  display: flex;
}

/* Los estados del panel se alternan quitando el atributo hidden. */
.auth [hidden] {
  display: none !important;
}

html.is-auth,
html.is-auth body {
  overflow: hidden;
}

.auth__panel {
  margin: auto; /* deja centrar sin cortar el panel si no cabe en la ventana */
  width: min(430px, 100%);
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: clamp(26px, 5.6vw, 36px);
  color: var(--ink);
  text-align: center;
  animation: auth-panel 0.45s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

@keyframes auth-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes auth-panel {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.auth__brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--navy-900);
}

.auth__brand img {
  width: 38px;
  height: 38px;
  border-radius: 11px;
}

.auth__brandname b {
  color: var(--emerald);
}

.auth__title {
  font-size: clamp(1.35rem, 4.6vw, 1.6rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin-bottom: 10px;
}

.auth__lead {
  font-size: 0.94rem;
  color: var(--slate);
  margin-bottom: 22px;
}

.auth__lead b {
  color: var(--navy-900);
  overflow-wrap: anywhere; /* un correo muy largo parte solo si no cabe */
}

/* --- Formulario --- */
.auth__field {
  display: block;
  text-align: left;
  margin-bottom: 14px;
}

.auth__label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy-700);
  margin-bottom: 6px;
}

.auth__control {
  position: relative;
  display: block;
}

.auth__control input {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--bg-soft);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.auth__control input::placeholder {
  color: var(--slate-soft);
}

.auth__control input:focus {
  outline: none;
  background: #fff;
  border-color: var(--emerald);
  box-shadow: var(--ring);
}

.auth__eye {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--slate-soft);
  transition: background 0.18s ease, color 0.18s ease;
}

.auth__eye:hover {
  background: var(--surface-container);
  color: var(--navy-900);
}

.auth__eye svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth__action {
  width: 100%;
  margin-top: 6px;
}

.auth__hint {
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--slate-soft);
  margin-top: 14px;
}

/* Requisitos de la contraseña: van entre los dos campos, así que necesitan aire
   arriba y abajo para no pegarse ni al campo anterior ni al siguiente. */
.auth__hint--reglas {
  margin: 10px 0 16px;
}

.auth__msg {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.45;
  text-align: left;
  padding: 10px 13px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  color: var(--emerald);
  background: var(--mint-soft);
}

.auth__msg.is-error {
  color: #b3261e;
  background: #fdecea;
}

/* --- Estados: esperando, listo y error --- */
.auth__spinner {
  display: block;
  width: 34px;
  height: 34px;
  margin: 6px auto 18px;
  border-radius: 50%;
  border: 3px solid var(--surface-container);
  border-top-color: var(--emerald);
  animation: auth-spin 0.8s linear infinite;
}

@keyframes auth-spin {
  to {
    transform: rotate(360deg);
  }
}

.auth__badge {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 2px auto 18px;
  border-radius: 50%;
}

.auth__badge svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth__badge--ok {
  color: var(--emerald);
  background: var(--mint-soft);
}

.auth__badge--err {
  color: #b3261e;
  background: #fdecea;
}

@media (prefers-reduced-motion: reduce) {
  .auth,
  .auth__panel,
  .auth__spinner {
    animation: none;
  }
}

/* ==========================================================================
   Vista previa del panel (`index.html?borrador`)
   --------------------------------------------------------------------------
   La franja que avisa de que lo que se ve todavía no está publicado. Va como
   primer hijo del cuerpo, así que empuja el menú hacia abajo en vez de taparlo.
   ========================================================================== */

.aviso-borrador {
  background: var(--mint);
  color: var(--navy-900);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.5;
  padding: 10px 18px;
  text-align: center;
}

.aviso-borrador strong {
  font-weight: 800;
}

.aviso-borrador a {
  color: var(--navy-900);
  font-weight: 700;
  text-decoration: underline;
  white-space: nowrap;
}
