/* =========================================================
   NEXGEN CAPITAL
   Sociedad costarricense de soluciones financieras e inmobiliarias

   Criterio visual: institucional y sobrio. La identidad (paleta cálida
   marrón/crema, Sora + Manrope) se conserva; el movimiento decorativo no.
   Nada se anima salvo que responda a una acción del usuario.
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  --bg: #f7f3ee;
  --bg-2: #efe7dd;
  --surface: rgba(255, 252, 248, 0.72);
  --surface-solid: #fffdfa;
  --border: rgba(74, 47, 29, 0.10);
  --border-strong: rgba(74, 47, 29, 0.18);

  --text: #2a1c12;
  --text-muted: #6b5849;
  --text-dim: #9c8a7b;

  --violet: #6f4e37;
  --fuchsia: #4a2f1d;
  --aqua: #b08968;
  --grad: linear-gradient(120deg, #4a2f1d 0%, #6f4e37 50%, #b08968 100%);
  --grad-band: linear-gradient(120deg, #2a1a10 0%, #3d2817 45%, #4a2f1d 100%);

  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 1180px;
  --header-h: 88px;
  /* Sombras neutras y cortas. El halo marrón saturado que había antes
     hacía flotar cada tarjeta y leía a plantilla, no a institución. */
  --shadow-sm: 0 6px 18px -12px rgba(45,30,20, 0.22);
  --shadow: 0 18px 44px -24px rgba(45,30,20, 0.28);
  --shadow-color: 0 8px 20px -10px rgba(45,30,20, 0.26);

  --danger: #b42318;
  --success: #166534;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Sora", var(--font);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 18px); }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 6px; }
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }

/* ---------- Scroll progress ---------- */
/* Escala en vez de crecer en ancho: esto se actualiza en cada evento de scroll,
   así que animar width provocaba recálculo de layout en la ruta más caliente. */
.scroll-progress { position: fixed; top: 0; left: 0; height: 3px; width: 100%; transform: scaleX(0); transform-origin: 0 50%; z-index: 300; background: var(--grad); box-shadow: 0 0 12px rgba(111,78,55,.6); transition: transform .1s linear; }

/* ---------- Fondo ----------
   Un solo lavado cálido, estático. Antes había tres manchas desenfocadas
   flotando en bucle, una retícula de puntos y un foco que seguía el cursor:
   ruido permanente que competía con el contenido y es la firma más
   reconocible de una interfaz generada. */
.bg-canvas { position: fixed; inset: 0; z-index: -2; overflow: hidden; background: var(--bg); }
.bg-canvas::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(1100px 620px at 82% -10%, rgba(176,137,104,.20), transparent 68%),
    radial-gradient(880px 520px at 4% 2%,   rgba(111,78,55,.10),  transparent 70%);
}

/* ---------- Rieles de mercado ----------
   Dos columnas de geometría abstracta que se desplazan despacio por los
   márgenes. Lo que las hace admisibles aquí:
   · No hay cifras ni símbolos bursátiles. NEXGEN no cotiza ni opera valores;
     insinuar una cotización en vivo sería afirmar algo falso sobre el negocio.
   · Viven en el canalón, no bajo el texto: el ancho es exactamente el margen
     que sobra a los lados del contenedor, y por debajo de 1360px no se pintan.
   · aria-hidden + pointer-events:none: ni se anuncian ni interceptan el cursor.
   · Solo se animan transform y opacity, y el bucle es de 78-104s: se percibe
     como respiración del fondo, no como algo que pide atención.
   El truco de continuidad: cada trazo contiene dos periodos idénticos y el SVG
   mide el doble del riel, así que translateY(-50%) cae exactamente sobre el
   inicio del segundo periodo y el bucle no tiene costura. */
/* Los dos contenedores decorativos llevan el atributo `hidden` en el HTML y es
   aquí donde se reactivan: una declaración `display` de autor gana a la regla
   [hidden]{display:none} del navegador. Así, si este archivo no llega al
   servidor o queda en caché, los SVG no se pintan y no ocupan nada, en vez de
   estirarse por proporción y hundir el contenido varias pantallas. */
.rails { position: fixed; inset: 0; z-index: -1; pointer-events: none; display: none; }
@media (min-width: 1360px) { .rails { display: block; } }
.rail {
  position: absolute; top: 0; height: 100vh; overflow: hidden;
  width: clamp(72px, calc((100vw - var(--maxw)) / 2 - 8px), 156px);
  /* Se desvanece arriba y abajo (para no chocar con header ni footer) y hacia
     el centro, donde empieza el contenido. */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 9%, #000 91%, transparent 100%), linear-gradient(to right, #000 0, rgba(0,0,0,.42) 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 9%, #000 91%, transparent 100%), linear-gradient(to right, #000 0, rgba(0,0,0,.42) 100%);
  -webkit-mask-composite: source-in;
          mask-composite: intersect;
}
.rail--left { left: 0; }
/* Espejado: el degradado hacia el centro se invierte con él, que es lo que se
   quiere, y las dos cintas no se leen como la misma imagen repetida. */
.rail--right { right: 0; transform: scaleX(-1); }
.rail__svg { display: block; width: 100%; height: 200vh; }
.rail__svg--a { animation: rail-scroll 78s linear infinite; }
.rail__svg--b { animation: rail-scroll 104s linear infinite reverse; }
@keyframes rail-scroll { from { transform: translateY(0); } to { transform: translateY(-50%); } }
.rail__grid line { stroke: rgba(74,47,29,.13); }
.rail__candles rect { fill: rgba(111,78,55,.24); }
.rail__line { stroke: rgba(111,78,55,.40); stroke-width: 1.9; vector-effect: non-scaling-stroke; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: .95rem; padding: 13px 22px; border-radius: 999px; transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .35s, color .35s; }
.btn svg { width: 18px; height: 18px; }
.btn--lg { padding: 15px 28px; font-size: 1rem; }
/* Gradiente fijo. El bucle `gradShift` que recorría el degradado sin parar
   llamaba la atención sobre el botón en vez de sobre lo que ofrece. */
.btn--primary { color: #fff; background: var(--grad); box-shadow: var(--shadow-color); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -12px rgba(45,30,20,.42); }
.btn--primary svg { transition: transform .35s var(--ease); }
.btn--primary:hover svg { transform: translateX(3px); }
.btn--ghost { color: var(--text); background: var(--surface-solid); border: 1px solid var(--border-strong); box-shadow: var(--shadow-sm); }
.btn--ghost:hover { transform: translateY(-2px); border-color: var(--violet); color: var(--violet); }

/* ---------- Header ---------- */
.header { position: fixed; top: 0; left: 0; right: 0; z-index: 100; transition: background .4s, box-shadow .4s, backdrop-filter .4s; }
.header.is-scrolled { background: rgba(255,255,255,.7); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 1px 0 var(--border), 0 12px 30px -22px rgba(45,30,20,.3); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; letter-spacing: -.4px; }
.brand__logo { width: auto; height: 58px; display: block; }
.footer__brand .brand__logo { height: 64px; }
.nav { display: flex; align-items: center; gap: 30px; }
.nav__link { color: var(--text-muted); font-size: .95rem; font-weight: 600; transition: color .25s; position: relative; }
.nav__link::after { content: ""; position: absolute; left: 0; bottom: -6px; width: 100%; height: 2px; background: var(--grad); transform: scaleX(0); transform-origin: 0 50%; transition: transform .3s var(--ease); border-radius: 2px; }
.nav__link:hover { color: var(--text); }
.nav__link:hover::after { transform: scaleX(1); }
.nav__cta { margin-left: 6px; padding: 10px 20px; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .3s var(--ease), opacity .3s; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding: calc(var(--header-h) + 72px) 0 80px; display: grid; grid-template-columns: 1.3fr .7fr; gap: 48px; align-items: center; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
.hero__inner { display: flex; flex-direction: column; align-items: flex-start; }
.pill { display: inline-flex; align-items: center; gap: 9px; font-size: .82rem; font-weight: 600; color: var(--text-muted); padding: 8px 16px; border-radius: 999px; background: var(--surface-solid); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
/* Punto fijo. Latiendo prometía un estado en vivo; la inscripción ante la
   SUGEF es un hecho permanente, no un indicador en tiempo real. */
.pill__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--violet); box-shadow: 0 0 0 3px rgba(111,78,55,.16); }

/* Antes: 4.2rem en una columna de ~610px partía el titular en seis líneas
   y dejaba "en" solo en una. Cuerpo más contenido, columna más ancha y
   text-wrap: balance para que el reparto de líneas sea parejo. */
.hero__title { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.05rem, 4.1vw, 3.4rem); line-height: 1.09; letter-spacing: -.022em; margin-top: 24px; text-wrap: balance; }
/* Color plano, no degradado. El titular necesita el contraste de dos tonos
   —planteamiento en tinta oscura, remate en marrón de marca— y eso se logra
   con un color. El degradado que había aquí no aportaba jerarquía: estrecho
   era invisible y ancho lavaba la última palabra. Contraste 6.7:1 sobre el
   fondo crema. Ya no queda texto con degradado en el sitio. */
.hero__accent { display: block; color: var(--violet); }
.hero__subtitle { color: var(--text-muted); font-size: clamp(1.02rem, 1.6vw, 1.18rem); max-width: 56ch; margin-top: 24px; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 34px; }
.hero__metrics { display: flex; gap: 36px; margin-top: 44px; flex-wrap: wrap; }
.hero__metric strong { display: block; font-family: var(--font-display); font-weight: 800; font-size: 1.85rem; color: var(--fuchsia); letter-spacing: -.02em; }
.hero__metric span { color: var(--text-dim); font-size: .85rem; }

/* ---------- Hero: órbita ----------
   Los anillos vuelven a girar. Lo que se corrigió no es el giro, sino cómo
   estaba hecho: borde punteado (lee a plano técnico), nodos con halo de luz,
   emojis en las fichas y una vuelta cada 14s, que a esa velocidad se percibe
   como adorno inquieto. Ahora: filete continuo, un punto sólido por anillo y
   vueltas de 48 a 96 segundos — el movimiento se nota si uno se detiene a
   mirar, no compite con la lectura. El punto es lo que revela el giro: un
   círculo perfecto rotando sería invisible. */
.hero__visual { display: grid; place-items: center; gap: 26px; }
.orbit { position: relative; width: 300px; height: 300px; display: grid; place-items: center; flex-shrink: 0; }
.orbit__ring { position: absolute; border-radius: 50%; border: 1px solid rgba(74,47,29,.15); }
/* Los retardos negativos arrancan cada anillo ya avanzado, así al cargar los
   tres puntos aparecen repartidos en vez de alineados arriba en vertical. */
.orbit__ring--1 { width: 168px; height: 168px; animation: orbit-spin 48s linear infinite; animation-delay: -13s; }
.orbit__ring--2 { width: 234px; height: 234px; border-color: rgba(74,47,29,.12); animation: orbit-spin 72s linear infinite reverse; animation-delay: -46s; }
.orbit__ring--3 { width: 300px; height: 300px; border-color: rgba(74,47,29,.10); animation: orbit-spin 96s linear infinite; animation-delay: -74s; }
@keyframes orbit-spin { to { transform: rotate(360deg); } }
.orbit__node { position: absolute; top: -4px; left: 50%; width: 9px; height: 9px; border-radius: 50%; background: var(--violet); transform: translateX(-50%); }
.orbit__ring--2 .orbit__node { background: var(--aqua); width: 8px; height: 8px; }
.orbit__ring--3 .orbit__node { background: var(--fuchsia); width: 7px; height: 7px; }
.orbit__core { width: 96px; height: 96px; border-radius: 26px; background: var(--grad); display: grid; place-items: center; box-shadow: var(--shadow-color); }
.orbit__core svg { width: 46px; height: 46px; }

.pledges { display: grid; gap: 12px; width: 100%; max-width: 320px; }
.pledges li { display: flex; align-items: center; gap: 13px; background: var(--surface-solid); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 16px; box-shadow: var(--shadow-sm); font-size: .88rem; font-weight: 600; color: var(--text); }
.pledges svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--violet); }

/* ---------- Capacidades ----------
   Antes era un marquee en bucle infinito. El mismo contenido, ahora legible
   y quieto: se puede leer y hasta seleccionar. */
.capabilities-wrap { padding: 4px 0 60px; text-align: center; }
.capabilities__label { color: var(--text-dim); font-size: .78rem; letter-spacing: 1.6px; text-transform: uppercase; margin-bottom: 18px; }
/* Etiquetas en vez de separadores «·»: al envolverse, un separador entre
   elementos dejaba un «·» huérfano al inicio de la segunda línea. Las
   etiquetas se reacomodan solas y no dependen del punto de corte. */
.capabilities { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 900px; margin-inline: auto; }
.capabilities li { color: var(--text-muted); font-size: .9rem; font-weight: 600; padding: 7px 15px; border: 1px solid var(--border); border-radius: 999px; background: rgba(255,253,250,.6); }

/* ---------- Section base ---------- */
.section { padding: 100px 0; position: relative; }
/* Color plano. Con degradado, una palabra corta lo comprimía y las últimas
   letras salían más claras: leía como fallo de render, no como intención. */
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--violet); margin-bottom: 16px; }
.eyebrow--light { background: none; color: rgba(255,255,255,.85); -webkit-text-fill-color: rgba(255,255,255,.85); }
.section__head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section__title { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.85rem, 3.6vw, 2.5rem); line-height: 1.14; letter-spacing: -.02em; text-wrap: balance; }
.section__title--light { color: #fff; }
.section__lead { color: var(--text-muted); font-size: 1.08rem; margin-top: 18px; }

/* ---------- Servicios cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card { background: var(--surface-solid); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px 28px; position: relative; box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s; overflow: hidden; }
.card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: var(--grad); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .35s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card:hover::after { opacity: 1; }
.card__icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--grad); color: #fff; margin-bottom: 20px; box-shadow: var(--shadow-color); }
.card__icon svg { width: 26px; height: 26px; }
.card__title { font-family: var(--font-display); font-size: 1.22rem; font-weight: 700; margin-bottom: 10px; }
.card__text { color: var(--text-muted); font-size: .96rem; }

/* ---------- Seguridad ---------- */
.security { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
.security__intro .section__title { text-align: left; }
.security__intro .btn { margin-top: 26px; }
.security__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pillar { background: var(--surface-solid); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 24px; box-shadow: var(--shadow-sm); transition: transform .35s var(--ease), box-shadow .35s; }
.pillar:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.pillar__icon { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; color: #fff; background: var(--grad); margin-bottom: 16px; box-shadow: var(--shadow-color); }
.pillar__icon svg { width: 24px; height: 24px; }
.pillar h3 { font-family: var(--font-display); font-size: 1.1rem; margin-bottom: 8px; }
.pillar p { color: var(--text-muted); font-size: .9rem; }

/* ---------- Por qué ---------- */
.why { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.why__item { background: var(--surface-solid); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px 28px; box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s; }
.why__item:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.why__num { font-family: var(--font-display); font-weight: 800; font-size: 1rem; color: var(--aqua); font-variant-numeric: tabular-nums; }
.why__item h3 { font-family: var(--font-display); font-size: 1.3rem; margin: 12px 0 10px; }
.why__item p { color: var(--text-muted); font-size: .96rem; }

/* Reserva dos líneas de título cuando las tarjetas van lado a lado, para que
   el texto de cada columna arranque a la misma altura. En una sola columna
   la reserva sobra, por eso solo aplica de 721px hacia arriba. */
@media (min-width: 721px) {
  .card__title, .pillar h3, .why__item h3 { min-height: 3.2em; }
}

/* ---------- Métricas band ---------- */
/* Degradado fijo y sin retícula de puntos encima: el bucle de 12s y el
   punteado eran adorno sobre un bloque que ya funciona por contraste. */
.section--band { background: var(--grad-band); border-radius: 26px; margin: 0 16px; overflow: hidden; position: relative; }
/* Onda de fondo de la banda: la misma idea de los rieles, aquí en horizontal y
   sobre el bloque oscuro, que es donde un aire de terminal financiera encaja.
   El SVG mide el doble del ancho de la sección y contiene dos periodos, así que
   translateX(-50%) cierra el bucle sin salto. Abstracta y sin escala: acompaña
   a las cifras reales de al lado, no pretende ser una de ellas. */
.section--band > .container { position: relative; z-index: 1; }
.band-chart { display: block; position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
/* Anclada al tercio inferior, no a toda la banda: ocupando el alto completo
   la onda pasaba por detrás del titular y de las cifras y las ensuciaba.
   Abajo lee como gráfico al pie del bloque y deja el texto limpio. */
.band-chart svg { position: absolute; left: 0; bottom: 0; width: 200%; height: 62%; animation: band-drift 52s linear infinite; }
@keyframes band-drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }
/* non-scaling-stroke: el SVG se estira sin conservar proporción, y sin esto el
   trazo se deformaría junto con la geometría. */
.band-chart__line { fill: none; stroke: rgba(232,205,175,.26); stroke-width: 2; vector-effect: non-scaling-stroke; }
.band-chart__line--2 { stroke: rgba(232,205,175,.11); stroke-width: 1.4; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; position: relative; }
.stat { text-align: center; }
.stat__num { display: block; font-family: var(--font-display); font-weight: 800; font-size: clamp(2.2rem, 4vw, 3rem); line-height: 1; color: #fff; letter-spacing: -.02em; }
.stat__label { display: block; margin-top: 12px; color: rgba(255,255,255,.85); font-size: .92rem; }

/* ---------- Flujo de la operación ----------
   Animación con significado: la línea se traza y los hitos se encienden en
   orden, porque el proceso ocurre en ese orden. Se dispara una vez al entrar
   en pantalla y se queda. Nada de bucles.
   Va con transiciones, no con @keyframes, a propósito: la regla global de
   prefers-reduced-motion reduce transition-duration, así que quien pide menos
   movimiento ve el estado final de inmediato en lugar de quedarse sin línea. */
.flow { margin-top: 60px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; position: relative; }
.flow::before {
  content: ""; position: absolute; top: 8px; left: 16.6%; right: 16.6%; height: 1px;
  background: rgba(255,255,255,.25);
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform 1.2s var(--ease) .1s;
}
.flow.is-visible::before { transform: scaleX(1); }
.flow__step { text-align: center; position: relative; }
.flow__dot {
  display: block; width: 17px; height: 17px; margin: 0 auto 18px; border-radius: 50%;
  background: var(--aqua); box-shadow: 0 0 0 4px rgba(255,255,255,.10);
  opacity: 0; transform: scale(.4);
  transition: opacity .45s var(--ease), transform .45s var(--ease);
}
.flow.is-visible .flow__dot { opacity: 1; transform: scale(1); }
.flow.is-visible .flow__step:nth-child(1) .flow__dot { transition-delay: .15s; }
.flow.is-visible .flow__step:nth-child(2) .flow__dot { transition-delay: .70s; }
.flow.is-visible .flow__step:nth-child(3) .flow__dot { transition-delay: 1.25s; }
.flow__step h3 { font-family: var(--font-display); font-size: 1.05rem; color: #fff; margin-bottom: 7px; }
.flow__step p { color: rgba(255,255,255,.72); font-size: .89rem; }

/* ---------- CTA / Contacto ---------- */
.cta__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.cta__copy .section__title { text-align: left; }
.cta__list { display: grid; gap: 12px; margin: 26px 0; }
.cta__list li { display: flex; align-items: center; gap: 12px; color: var(--text-muted); font-size: .98rem; font-weight: 500; }
.cta__list svg { width: 22px; height: 22px; color: #fff; background: var(--grad); border-radius: 50%; padding: 3px; flex-shrink: 0; box-shadow: var(--shadow-color); }
.cta__schedule { margin-top: 6px; }
.cta__direct { margin-top: 16px; color: var(--text-muted); font-size: .92rem; }
.cta__direct a { color: var(--violet); font-weight: 600; }
.contact { background: var(--surface-solid); border: 1px solid var(--border); border-radius: var(--radius); padding: 34px 32px; box-shadow: var(--shadow); }
.contact__title { font-family: var(--font-display); font-size: 1.4rem; margin-bottom: 22px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: .86rem; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; }
.field input, .field textarea { width: 100%; padding: 13px 15px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--border); color: var(--text); font-size: .95rem; font-family: inherit; transition: border-color .3s, box-shadow .3s, background .3s; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-dim); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--violet); background: #fff; box-shadow: 0 0 0 4px rgba(111,78,55,.12); }
.field.is-invalid input, .field.is-invalid textarea { border-color: var(--danger); }
.field__error { display: block; color: var(--danger); font-size: .8rem; margin-top: 6px; }
.captcha__row { display: flex; gap: 10px; align-items: stretch; }
.captcha__row input { flex: 1; }
#captchaQuestion { font-weight: 800; color: var(--violet); }
.captcha__refresh { flex: 0 0 auto; width: 46px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--border); color: var(--text-muted); display: grid; place-items: center; transition: color .25s, border-color .25s, transform .4s var(--ease); }
.captcha__refresh svg { width: 20px; height: 20px; }
.captcha__refresh:hover { color: var(--violet); border-color: var(--violet); transform: rotate(-90deg); }
.contact__submit { width: 100%; justify-content: center; margin-top: 6px; }
.contact__note { color: var(--text-dim); font-size: .8rem; text-align: center; margin-top: 14px; }
.contact__success { color: var(--success); font-weight: 600; font-size: .92rem; text-align: center; margin-top: 14px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 64px 0 30px; margin-top: 60px; }
.footer__inner { display: grid; grid-template-columns: 1.4fr 2fr; gap: 40px; }
.footer__tag { color: var(--text-muted); font-size: .92rem; margin-top: 16px; max-width: 32ch; }
.footer__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.footer__col h4 { font-family: var(--font-display); font-size: .95rem; margin-bottom: 14px; }
.footer__col a { display: block; color: var(--text-muted); font-size: .9rem; padding: 5px 0; transition: color .25s; }
.footer__col a:hover { color: var(--violet); }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); color: var(--text-dim); font-size: .84rem; }
.footer__legal a:hover { color: var(--violet); }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; padding: 24px; }
.modal.is-open { display: flex; }
.modal__overlay { position: absolute; inset: 0; background: rgba(30,20,12,.4); backdrop-filter: blur(8px); animation: fade .3s ease; }
.modal__dialog { position: relative; width: 100%; max-width: 460px; padding: 36px 34px; text-align: center; background: var(--surface-solid); border-radius: var(--radius); box-shadow: var(--shadow); animation: pop .4s var(--ease); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(20px) scale(.96); } }
.modal__close { position: absolute; top: 16px; right: 16px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--text-muted); background: var(--bg-2); transition: color .25s, background .25s; }
.modal__close:hover { color: var(--text); background: var(--border); }
.modal__close svg { width: 18px; height: 18px; }
.modal__dialog h3 { font-family: var(--font-display); font-size: 1.5rem; margin: 8px 0 12px; }
.modal__dialog p { color: var(--text-muted); font-size: .95rem; }
.modal__options { display: grid; gap: 12px; margin: 24px 0 16px; }
.modal__option { padding: 15px; border-radius: var(--radius-sm); background: var(--bg-2); border: 1px solid var(--border); font-weight: 700; transition: transform .3s var(--ease), border-color .3s, color .3s; }
.modal__option:hover { transform: translateY(-2px); border-color: var(--violet); color: var(--violet); }
.modal__alt { font-size: .9rem; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .hero { grid-template-columns: 1fr; }
  /* El visual va DESPUÉS del texto. Antes tenía order:-1 y en móvil empujaba
     el h1 por debajo de un bloque decorativo: quien abre en el teléfono veía
     un recuadro antes de saber qué hace la empresa. */
  .hero__visual { margin-top: 40px; }
  .pledges { max-width: 420px; }
  .cards, .why { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .security, .cta__inner { grid-template-columns: 1fr; gap: 40px; }
  .footer__inner { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  :root { --header-h: 76px; }
  .brand__logo { height: 46px; }
  .footer__brand .brand__logo { height: 54px; }
  .nav { position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 0; padding: 12px 24px 24px; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--border); backdrop-filter: blur(16px); box-shadow: var(--shadow); transform: translateY(-140%); transition: transform .4s var(--ease); }
  .nav.is-open { transform: translateY(0); }
  .nav__link { padding: 14px 0; border-bottom: 1px solid var(--border); }
  .nav__link::after { display: none; }
  .nav__cta { margin: 14px 0 0; justify-content: center; }
  .nav-toggle { display: flex; }
  .hero { padding: calc(var(--header-h) + 52px) 0 60px; }
  .section { padding: 72px 0; }
  .cards, .why, .stats, .security__grid { grid-template-columns: 1fr; }
  /* En una columna la línea horizontal no une nada: se oculta y los hitos
     siguen encendiéndose en orden. */
  .flow { grid-template-columns: 1fr; gap: 24px; margin-top: 44px; }
  .flow::before { display: none; }
  .footer__cols { grid-template-columns: 1fr 1fr; }
  .hero__metrics { gap: 24px; }
  .section--band { margin: 0 8px; border-radius: 26px; }
}
@media (max-width: 420px) {
  .brand__logo { height: 40px; }
  .footer__cols { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}

/* ---------- Páginas legales ---------- */
.legal-hero { padding: calc(var(--header-h) + 62px) 0 30px; }
.legal-hero .eyebrow { margin-bottom: 10px; }
.legal-hero h1 { font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 4.4vw, 3.1rem); line-height: 1.06; letter-spacing: -1.2px; }
.legal-hero .legal-hero__meta { color: var(--text-dim); font-size: .9rem; margin-top: 14px; }
.legal { max-width: 800px; margin: 0 auto; padding: 20px 0 40px; }
.legal__card { background: var(--surface); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: clamp(26px, 4vw, 48px); }
.legal h2 { font-family: var(--font-display); font-weight: 700; font-size: 1.32rem; letter-spacing: -.4px; margin: 34px 0 12px; color: var(--text); }
.legal h2:first-child { margin-top: 0; }
.legal h2 .legal__num { color: var(--violet); font-variant-numeric: tabular-nums; margin-right: 8px; }
.legal h3 { font-size: 1.04rem; font-weight: 700; margin: 22px 0 8px; color: var(--text); }
.legal p { color: var(--text-muted); margin-bottom: 14px; }
.legal ul.legal__list { margin: 0 0 16px; padding: 0; display: grid; gap: 9px; }
.legal ul.legal__list li { position: relative; padding-left: 26px; color: var(--text-muted); }
.legal ul.legal__list li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: var(--grad); }
.legal a { color: var(--violet); font-weight: 600; }
.legal a:hover { text-decoration: underline; }
.legal__back { display: inline-flex; align-items: center; gap: 8px; margin-top: 28px; color: var(--text-muted); font-weight: 600; }
.legal__back svg { width: 18px; height: 18px; }
.legal__back:hover { color: var(--violet); }
.legal__update { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--border); color: var(--text-dim); font-size: .85rem; }

/* ---------- Reduce motion ---------- */
@media (prefers-reduced-motion: reduce) {
  /* Los retardos también se anulan: sin esto, el flujo de la operación seguía
     encendiendo sus hitos escalonadamente (0,15s / 0,70s / 1,25s) aunque cada
     transición durase cero, y eso sigue siendo movimiento para quien pidió que
     no lo hubiera. */
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: .001ms !important; transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  /* El flujo de la operación no se rescataba aquí: .reveal sí, pero los hitos
     parten de opacity:0 / scale(.4) y solo los enciende .is-visible, que lo
     pone el observador de JS. Con movimiento reducido y sin que el observador
     llegue a disparar, se veían los rótulos «Solicitud / Análisis /
     Formalización» sin sus puntos ni la línea que los une. Estado final directo. */
  .flow::before { transform: scaleX(1); }
  .flow__dot { opacity: 1; transform: none; }
}
