/* ══════════════════════════════════════════════════════
   VEXTRA — CSS global del sitio institucional
   Paleta, tipografia, layout, componentes compartidos.
   Importado por todas las paginas publicas (no toca el panel).
   ══════════════════════════════════════════════════════ */

:root {
  /* Paleta */
  --bg:        #010604;
  --bg-2:      #061a0e;
  --bg-3:      #041E16;
  --bg-4:      #041B10;
  --border:    #0A3524;
  --border-2:  #143726;
  --green:     #266247;
  --green-2:   #2d7354;
  --green-soft: rgba(38, 98, 71, 0.15);
  --green-line: rgba(38, 98, 71, 0.35);
  --text:      #F2F2F2;
  --muted:     #9CA3AF;
  --warn:      #E0A458;
  --error:     #D9544A;

  /* Fuentes */
  --font-display: 'Outfit', 'Segoe UI', sans-serif;
  --font-body:    'DM Sans', 'Segoe UI', sans-serif;

  /* Layout */
  --container: 1280px;
  --container-wide: 1560px;
  --pad-x:    20px;
  --pad-x-md: 32px;
  --pad-x-lg: 48px;
  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 24px;
  --shadow:    0 24px 60px rgba(38, 98, 71, .15);
  --shadow-2:  0 30px 80px rgba(1, 6, 4, .8);

  /* Header */
  --nav-h:     74px;
}

/* ── Reset minimo ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 4px; }

/* ── Tipografia ───────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 .5em;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2.4rem, 5vw, 4.4rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.5vw, 3rem); }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); }
h4 { font-size: 1.1rem; font-weight: 600; }
p  { margin: 0 0 1em; color: var(--muted); }
.lead { font-size: clamp(1rem, 1.4vw, 1.15rem); color: var(--muted); line-height: 1.75; }
strong { color: var(--text); font-weight: 600; }

/* Texto con gradiente para palabras clave del hero */
.text-gradient {
  background: linear-gradient(130deg, var(--text) 20%, var(--green) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Eyebrow (etiqueta arriba de cada h2) */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--green);
  margin: 0 0 18px;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--green);
}

/* ── Layout / Container ───────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}
.container-wide { max-width: var(--container-wide); }
@media (min-width: 768px)  { .container { padding-inline: var(--pad-x-md); } }
@media (min-width: 1024px) { .container { padding-inline: var(--pad-x-lg); } }

.section {
  position: relative;
  padding-block: clamp(64px, 9vw, 140px);
  overflow: hidden;
}
.section--bg2 { background: var(--bg-2); }
.section--bg3 { background: var(--bg-3); }
.section--bg4 { background: var(--bg-4); }
.section--border-y { border-block: 1px solid var(--border); }

/* Decoracion: orbe difuso */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
  /* Magnitudes del drift; mobile las baja ~30% (ver media query mas abajo).
     Cada variante tiene su propio par dx/dy para que los orbs no se muevan
     en sincro y el conjunto se sienta organico. */
  --orb-dx-a: 38px;  --orb-dy-a: 22px;
  --orb-dx-b: -42px; --orb-dy-b: 18px;
  --orb-dx-c: 28px;  --orb-dy-c: -26px;
}
.orb--green { background: rgba(38, 98, 71, .12); }
.orb--dark  { background: rgba(4, 30, 22, .7); }
.section > .container { position: relative; z-index: 1; }

/* Drift en bucle: 3 patrones (a/b/c) con duraciones y delays distintos
   asignados via :nth-of-type. Como los orbs comparten siblings con otros
   <div>, el matcheo no es 100% determinista por orb concreto, pero esa
   aleatoriedad natural ayuda a que el movimiento se sienta organico,
   no coreografiado. animation-direction: alternate evita el snap al
   inicio del ciclo. */
@keyframes vx-orb-drift-a {
  from { transform: translate(0, 0); }
  to   { transform: translate(var(--orb-dx-a), var(--orb-dy-a)); }
}
@keyframes vx-orb-drift-b {
  from { transform: translate(0, 0); }
  to   { transform: translate(var(--orb-dx-b), var(--orb-dy-b)); }
}
@keyframes vx-orb-drift-c {
  from { transform: translate(0, 0); }
  to   { transform: translate(var(--orb-dx-c), var(--orb-dy-c)); }
}

@media (prefers-reduced-motion: no-preference) {
  .orb {
    will-change: transform;
    animation-iteration-count: infinite;
    animation-direction: alternate;
    animation-timing-function: ease-in-out;
  }
  .orb:nth-of-type(odd)  { animation-name: vx-orb-drift-a; animation-duration: 26s; }
  .orb:nth-of-type(even) { animation-name: vx-orb-drift-b; animation-duration: 22s; animation-delay: -7s;  }
  .orb:nth-of-type(3n)   { animation-name: vx-orb-drift-c; animation-duration: 30s; animation-delay: -12s; }
}

/* Mobile: distancia reducida ~30% para liberar trabajo del compositor en
   gama media. Las animaciones siguen activas, solo se acortan los rangos. */
@media (max-width: 767px) {
  .orb {
    --orb-dx-a: 26px;  --orb-dy-a: 15px;
    --orb-dx-b: -28px; --orb-dy-b: 12px;
    --orb-dx-c: 20px;  --orb-dy-c: -18px;
  }
}

/* Grid de fondo (hero) */
.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(38, 98, 71, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(38, 98, 71, .08) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  opacity: .55;
  z-index: 0;
}

/* ── Botones ──────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 12px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn:hover  { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.97); transition-duration: 80ms; }
.btn--primary {
  background: var(--green);
  color: #fff;
}
.btn--primary:hover {
  background: var(--green-2);
  box-shadow: 0 16px 40px rgba(38, 98, 71, .35);
}
.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--green-line);
}
.btn--ghost:hover {
  border-color: var(--green);
  background: rgba(38, 98, 71, .08);
}
.btn--lg { padding: 18px 36px; font-size: 17px; border-radius: 14px; }
.btn--block { width: 100%; }
.btn .arrow {
  width: 18px; height: 18px;
  transition: transform .2s ease;
}
.btn:hover .arrow { transform: translateX(3px); }

/* ── Header ───────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: transparent;
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease;
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.site-header.is-scrolled {
  background: rgba(1, 6, 4, .92);
  border-bottom-color: rgba(38, 98, 71, .2);
  box-shadow: 0 8px 24px rgba(1, 6, 4, .55);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nav-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.nav-logo img { height: 36px; width: auto; }

.nav-links {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 28px;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: color .2s ease;
}
.nav-links a:hover, .nav-links a.is-active { color: var(--text); }

.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-login {
  font-size: 14px;
  color: var(--muted);
  padding: 10px 14px;
  display: none;
}
.nav-login:hover { color: var(--text); }
.nav-cta {
  background: var(--green);
  color: #fff;
  padding: 11px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  border: 0;
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.nav-cta:hover {
  background: var(--green-2);
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(38, 98, 71, .3);
}
.nav-toggle {
  background: transparent;
  border: 0;
  color: var(--text);
  padding: 8px;
  display: inline-flex;
}
.nav-toggle svg { width: 24px; height: 24px; }

@media (min-width: 1024px) {
  .nav-links { display: flex; }
  .nav-login { display: inline-block; }
  .nav-toggle { display: none; }
}

/* Drawer mobile */
.nav-drawer {
  position: fixed;
  top: var(--nav-h);
  inset-inline: 0;
  background: rgba(4, 27, 16, .98);
  border-top: 1px solid var(--border);
  padding: 24px var(--pad-x);
  display: none;
  flex-direction: column;
  gap: 4px;
  z-index: 49;
  backdrop-filter: blur(20px);
}
.nav-drawer.is-open { display: flex; }
.nav-drawer a {
  color: var(--text);
  font-weight: 500;
  font-size: 16px;
  padding: 14px 8px;
  border-bottom: 1px solid rgba(10, 53, 36, .6);
}
.nav-drawer a:last-of-type { border-bottom: 0; }
.nav-drawer .nav-cta {
  margin-top: 12px;
  padding: 14px;
  text-align: center;
  justify-content: center;
}
@media (min-width: 1024px) {
  .nav-drawer { display: none !important; }
}

/* Espacio bajo el header fijo. Aplicado via clase para no romper
   paginas standalone que ya tienen su propio padding-top. */
.has-global-header { padding-top: var(--nav-h); }
.has-global-header > main:first-of-type { padding-top: 0; }

/* ── Footer ───────────────────────────────────────────── */
.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding-block: 48px 32px;
}
.site-footer .container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
@media (min-width: 768px) {
  .site-footer .container { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 48px; }
}
.footer-col h5 {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text);
  margin: 0 0 16px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 14px; color: var(--muted); transition: color .2s ease; }
.footer-col a:hover { color: var(--text); }
.footer-brand img { height: 32px; width: auto; margin-bottom: 16px; }
.footer-brand p { font-size: 13px; max-width: 320px; }
.footer-bottom {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: rgba(156, 163, 175, .6);
}

/* ── Hero generico ───────────────────────────────────── */
.hero {
  position: relative;
  padding-block: clamp(64px, 12vw, 160px);
  overflow: hidden;
}
.hero--lg { min-height: calc(100vh - var(--nav-h)); display: flex; align-items: center; }
.hero h1 {
  margin-bottom: 24px;
  letter-spacing: -.02em;
}
.hero .lead { max-width: 620px; margin-bottom: 36px; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 48px;
}
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
}
.hero-stats > div { min-width: 0; }
.hero-stats .num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.6rem, 2.4vw, 2.2rem);
  color: var(--text);
  display: block;
  margin-bottom: 4px;
  line-height: 1;
}
.hero-stats .lbl { font-size: 12px; color: var(--muted); }

/* Pill / chip para hero */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(10, 53, 36, .6);
  border: 1px solid rgba(38, 98, 71, .35);
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 28px;
}
.pill .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: .5; transform: scale(.85); }
  50%      { opacity: 1; transform: scale(1.1);  }
}

/* ── Cards ───────────────────────────────────────────── */
.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.card:hover {
  border-color: rgba(38, 98, 71, .4);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.card--lg { padding: 36px; border-radius: var(--radius-lg); }
.card--feature { background: var(--bg-3); border-color: rgba(38, 98, 71, .35); }
.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--green);
}
.card-icon svg { width: 22px; height: 22px; }
.card h3 { font-family: var(--font-display); font-size: 1.15rem; margin-bottom: 12px; color: var(--text); }
.card p  { font-size: .95rem; color: var(--muted); margin-bottom: 0; line-height: 1.65; }
.card .card-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 12px;
}

/* Grid de cards */
.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: 1fr 1fr; }
@media (min-width: 640px)  {
  .grid--2 { grid-template-columns: 1fr 1fr; }
  .grid--3 { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .grid--4 { grid-template-columns: repeat(4, 1fr); gap: 24px; }
}

/* ── Lista con check ─────────────────────────────────── */
.checklist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.checklist li {
  display: flex;
  gap: 12px;
  font-size: .95rem;
  color: var(--muted);
  line-height: 1.55;
}
.checklist li::before {
  content: "";
  flex-shrink: 0;
  margin-top: 6px;
  width: 14px; height: 14px;
  border-radius: 4px;
  background: rgba(38, 98, 71, .25);
  border: 1px solid var(--green);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23F2F2F2' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 70%;
}

/* ── Bloque hero / CTA ───────────────────────────────── */
.cta-band {
  background: var(--bg-3);
  border-radius: var(--radius-lg);
  padding: clamp(40px, 6vw, 72px);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band h2 { margin-bottom: 16px; }
.cta-band .lead { margin-inline: auto; margin-bottom: 32px; }

/* ── Forms ────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.field label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text);
}
.field label .req { color: var(--green); margin-left: 2px; }
.field input,
.field select,
.field textarea {
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 14px 16px;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  transition: border-color .2s ease, background .2s ease;
  width: 100%;
}
.field input::placeholder,
.field textarea::placeholder { color: rgba(156, 163, 175, .55); }
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--green); }
.field textarea { resize: vertical; min-height: 110px; }

/* ── Reveal on scroll ────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s cubic-bezier(.4, 0, .2, 1), transform .7s cubic-bezier(.4, 0, .2, 1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* Stagger: delay incremental para hijos directos .reveal de [data-stagger].
   Hasta 6 hijos reciben delay (0, 80, 160, 240, 320, 400 ms). El hijo
   numero 7 en adelante queda sin delay (var fallback 0). */
[data-stagger] > .reveal               { transition-delay: calc(var(--reveal-i, 0) * 80ms); }
[data-stagger] > .reveal:nth-child(1)  { --reveal-i: 0; }
[data-stagger] > .reveal:nth-child(2)  { --reveal-i: 1; }
[data-stagger] > .reveal:nth-child(3)  { --reveal-i: 2; }
[data-stagger] > .reveal:nth-child(4)  { --reveal-i: 3; }
[data-stagger] > .reveal:nth-child(5)  { --reveal-i: 4; }
[data-stagger] > .reveal:nth-child(6)  { --reveal-i: 5; }

/* ── Util ────────────────────────────────────────────── */
.text-center { text-align: center; }
.mx-auto    { margin-inline: auto; }
.muted      { color: var(--muted); }
.max-prose  { max-width: 720px; }
.max-narrow { max-width: 560px; }
.mb-0  { margin-bottom: 0 !important; }
.mb-2  { margin-bottom: 8px; }
.mb-4  { margin-bottom: 16px; }
.mb-6  { margin-bottom: 24px; }
.mb-8  { margin-bottom: 32px; }
.mb-12 { margin-bottom: 48px; }
.mb-16 { margin-bottom: 64px; }
.mt-8  { margin-top: 32px; }
.mt-12 { margin-top: 48px; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--green); border-radius: 4px; }

/* Sticky mobile CTA: oculto en desktop, slide-up en mobile tras scroll */
.sticky-mobile-cta {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 49;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  background: rgba(4, 27, 16, .96);
  border-top: 1px solid rgba(38, 98, 71, .25);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transform: translateY(110%);
  transition: transform .25s ease;
  display: none;
}
.sticky-mobile-cta.is-visible { transform: translateY(0); }
@media (max-width: 767px) {
  .sticky-mobile-cta { display: block; }
}

/* Anti-blink en navegacion entre paginas. Funciona en navegadores con
   soporte de @starting-style (Chrome 117+, Safari 17.5+). En el resto
   degrada a navegacion normal sin transicion. */
@media (prefers-reduced-motion: no-preference) {
  body { opacity: 1; transition: opacity .25s ease; }
  @starting-style { body { opacity: 0; } }
}

/* Print */
@media print {
  .site-header, .site-footer, .nav-cta, .cta-band, .sticky-mobile-cta { display: none !important; }
}
