/* ============================================================================
   PACHOCAMBIOS — Página de presentación
   ----------------------------------------------------------------------------
   Hoja independiente de `theme.css`: la landing es material de marketing y la
   aplicación es una herramienta de trabajo, así que no comparten tokens. Se
   apoya en la retícula y las utilidades de Bootstrap 5 (cargado en local) y
   añade encima la capa visual propia.

   Paleta: navy profesional + azul de acción, sobre fondo casi blanco.
   Sin modo oscuro por defecto (decisión del sistema de diseño: en una página
   de venta B2B el modo claro transmite mejor confianza).

   Índice
     1. Fuentes y tokens
     2. Base y tipografía
     3. Botones y enlaces
     4. Navegación
     5. Hero
     6. Secciones y tarjetas
     7. Planes
     8. Pie
     9. Animación de entrada y accesibilidad
   ========================================================================== */

/* ── 1. Fuentes y tokens ────────────────────────────────────────────────── */
@font-face { font-family: 'Calistoga'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../vendor/inter/calistoga-latin-400-normal.woff2') format('woff2'); }

:root {
  /* Color */
  --l-primary:      #0f172a;
  --l-primary-soft: #1e293b;
  --l-secondary:    #334155;
  --l-accent:       #0369a1;
  --l-accent-hover: #025a87;
  --l-accent-soft:  #e8f2fa;
  --l-bg:           #f8fafc;
  --l-surface:      #ffffff;
  --l-fg:           #020617;
  --l-muted-bg:     #e8ecf1;
  --l-muted-fg:     #4b5768;   /* 7.1:1 sobre blanco */
  --l-border:       #e2e8f0;
  --l-success:      #0f7a48;
  --l-danger:       #dc2626;

  /* Tipografía */
  --l-font-head: 'Calistoga', Georgia, 'Times New Roman', serif;
  --l-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --l-font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Espaciado en escala de 8 */
  --l-sp-1: 4px;  --l-sp-2: 8px;  --l-sp-3: 16px; --l-sp-4: 24px;
  --l-sp-5: 32px; --l-sp-6: 48px; --l-sp-7: 64px; --l-sp-8: 96px;

  /* Radios y sombras */
  --l-r-sm: 8px; --l-r-md: 12px; --l-r-lg: 18px; --l-r-full: 999px;
  --l-sh-1: 0 1px 2px rgba(2, 6, 23, .04), 0 1px 3px rgba(2, 6, 23, .06);
  --l-sh-2: 0 4px 12px -2px rgba(2, 6, 23, .08), 0 2px 6px -2px rgba(2, 6, 23, .04);
  --l-sh-3: 0 24px 48px -12px rgba(2, 6, 23, .18);

  --l-ease: cubic-bezier(.4, 0, .2, 1);
  --l-t: 200ms var(--l-ease);
}

/* ── 2. Base y tipografía ───────────────────────────────────────────────── */
body.landing {
  margin: 0;
  font-family: var(--l-font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--l-fg);
  background: var(--l-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.landing h1, .landing h2, .landing h3 {
  font-family: var(--l-font-head);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -.015em;
  color: var(--l-primary);
}

.landing h1 { font-size: clamp(2.25rem, 5.2vw, 3.75rem); }
.landing h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); margin-bottom: var(--l-sp-3); }
.landing h3 { font-size: 1.1875rem; }
.landing h4 { font-family: var(--l-font-body); font-size: 1rem; font-weight: 600; color: var(--l-primary); }

.landing p { margin: 0 0 var(--l-sp-3); }

/* Longitud de línea legible: 60–75 caracteres. */
.l-measure { max-width: 62ch; }
.l-measure-narrow { max-width: 52ch; }

.l-lead { font-size: 1.1875rem; color: var(--l-secondary); line-height: 1.6; }
.l-muted { color: var(--l-muted-fg); }
.l-mono { font-family: var(--l-font-mono); font-variant-numeric: tabular-nums; }

/* Etiqueta que abre cada sección */
.l-eyebrow {
  display: inline-flex; align-items: center; gap: var(--l-sp-2);
  margin-bottom: var(--l-sp-3);
  font-size: .8125rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--l-accent);
}
.l-eyebrow::before {
  content: ''; width: 22px; height: 2px; background: var(--l-accent); border-radius: 2px;
}

/* ── 3. Botones y enlaces ───────────────────────────────────────────────── */
.l-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--l-sp-2);
  min-height: 48px;                 /* área táctil holgada */
  padding: 0 var(--l-sp-4);
  font-family: var(--l-font-body); font-size: 1rem; font-weight: 600; line-height: 1;
  border: 1px solid transparent; border-radius: var(--l-r-md);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background var(--l-t), border-color var(--l-t), box-shadow var(--l-t), transform var(--l-t);
}
.l-btn:hover { text-decoration: none; }
.l-btn:active { transform: translateY(1px); }
.l-btn:focus-visible { outline: 3px solid var(--l-accent); outline-offset: 3px; }

.l-btn--primary {
  color: #fff;
  background: linear-gradient(180deg, #0479bd 0%, var(--l-accent) 100%);
  box-shadow: var(--l-sh-2);
}
.l-btn--primary:hover { background: var(--l-accent-hover); color: #fff; box-shadow: var(--l-sh-3); }

.l-btn--ghost { color: var(--l-primary); background: var(--l-surface); border-color: var(--l-border); }
.l-btn--ghost:hover { background: var(--l-muted-bg); color: var(--l-primary); }

.l-btn--dark { color: #fff; background: var(--l-primary); }
.l-btn--dark:hover { background: var(--l-primary-soft); color: #fff; }

.l-btn--lg { min-height: 54px; padding: 0 var(--l-sp-5); font-size: 1.0625rem; }

.l-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--l-accent); font-weight: 600; text-decoration: none;
}
.l-link:hover { color: var(--l-accent-hover); text-decoration: underline; }
.l-link svg { transition: transform var(--l-t); }
.l-link:hover svg { transform: translateX(3px); }

/* ── 4. Navegación ──────────────────────────────────────────────────────── */
.l-nav {
  position: sticky; top: 0; z-index: 1030;
  background: rgba(248, 250, 252, .82);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: border-color var(--l-t), box-shadow var(--l-t);
}
.l-nav.is-stuck { border-bottom-color: var(--l-border); box-shadow: var(--l-sh-1); }

.l-nav__inner { display: flex; align-items: center; gap: var(--l-sp-4); height: 68px; }

.l-brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--l-font-head); font-size: 1.25rem; color: var(--l-primary); text-decoration: none;
}
.l-brand:hover { color: var(--l-primary); text-decoration: none; }
.l-brand__mark {
  display: grid; place-items: center; width: 34px; height: 34px;
  color: #fff; background: var(--l-primary); border-radius: 9px;
}

.l-nav__links { display: flex; align-items: center; gap: var(--l-sp-4); margin-left: auto; }
.l-nav__link {
  position: relative; padding: 6px 2px;
  color: var(--l-secondary); font-size: .9375rem; font-weight: 500; text-decoration: none;
  transition: color var(--l-t);
}
.l-nav__link:hover { color: var(--l-primary); text-decoration: none; }
.l-nav__link::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px;
  background: var(--l-accent); border-radius: 2px; transition: right var(--l-t);
}
.l-nav__link:hover::after { right: 0; }

.l-nav__toggle {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin-left: auto;
  color: var(--l-primary); background: none; border: 1px solid var(--l-border); border-radius: var(--l-r-sm);
  cursor: pointer;
}

@media (max-width: 991.98px) {
  .l-nav__toggle { display: inline-flex; }
  .l-nav__links {
    position: fixed; inset: 68px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: var(--l-sp-3);
    background: var(--l-surface); border-bottom: 1px solid var(--l-border);
    box-shadow: var(--l-sh-2);
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity var(--l-t), transform var(--l-t);
  }
  .l-nav__links.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .l-nav__link { padding: 14px 8px; border-bottom: 1px solid var(--l-border); }
  .l-nav__link::after { display: none; }
  .l-nav__links .l-btn { margin-top: var(--l-sp-3); }
}

/* ── 5. Hero ────────────────────────────────────────────────────────────── */
.l-hero { position: relative; padding: var(--l-sp-8) 0 var(--l-sp-7); overflow: hidden; }
.l-hero::before {                    /* halo suave, decorativo */
  content: ''; position: absolute; top: -320px; left: 50%; width: 900px; height: 640px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(3, 105, 161, .10), transparent 68%);
  pointer-events: none;
}
.l-hero__content { position: relative; }

.l-badge {
  display: inline-flex; align-items: center; gap: var(--l-sp-2);
  padding: 6px 14px 6px 10px; margin-bottom: var(--l-sp-4);
  font-size: .8125rem; font-weight: 500; color: var(--l-secondary);
  background: var(--l-surface); border: 1px solid var(--l-border); border-radius: var(--l-r-full);
  box-shadow: var(--l-sh-1);
}
.l-badge__dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--l-success);
  box-shadow: 0 0 0 3px rgba(15, 122, 72, .16);
}

.l-hero__title em { font-style: normal; color: var(--l-accent); }
.l-hero__actions { display: flex; flex-wrap: wrap; gap: var(--l-sp-3); margin-top: var(--l-sp-5); }

/* Franja de datos verificables bajo el hero */
.l-facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--l-sp-3); margin-top: var(--l-sp-7);
  padding-top: var(--l-sp-5); border-top: 1px solid var(--l-border);
}
.l-fact__value {
  font-family: var(--l-font-head); font-size: 1.75rem; color: var(--l-primary);
  font-variant-numeric: tabular-nums; line-height: 1.1;
}
.l-fact__label { font-size: .8125rem; color: var(--l-muted-fg); margin-top: 4px; }

/* Maqueta del panel */
.l-mock {
  position: relative;
  background: var(--l-surface); border: 1px solid var(--l-border);
  border-radius: var(--l-r-lg); box-shadow: var(--l-sh-3); overflow: hidden;
}
.l-mock__bar {
  display: flex; align-items: center; gap: 6px;
  padding: 12px var(--l-sp-3); background: #f1f5f9; border-bottom: 1px solid var(--l-border);
}
.l-mock__dot { width: 10px; height: 10px; border-radius: 50%; background: #cbd5e1; }
.l-mock__body { padding: var(--l-sp-3); }
/* Rejilla de tres columnas en lugar de `space-between`: con flex, el importe
   flota según el ancho de la etiqueta y las cifras quedan desalineadas entre
   filas. En un producto financiero los números tienen que formar columna. */
.l-mock__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px 76px;
  align-items: center; gap: var(--l-sp-3);
  padding: 11px var(--l-sp-2); border-bottom: 1px solid var(--l-border);
  font-size: .875rem;
}
.l-mock__row:last-child { border-bottom: 0; }
.l-mock__amount {
  font-family: var(--l-font-mono); font-variant-numeric: tabular-nums;
  font-weight: 500; text-align: right; white-space: nowrap;
}
.l-mock__tag {
  justify-self: end;
  padding: 3px 9px; font-size: .75rem; font-weight: 600; border-radius: var(--l-r-full);
}
.l-mock__tag--buy  { color: var(--l-success); background: #e7f5ee; }
.l-mock__tag--sell { color: var(--l-accent);  background: var(--l-accent-soft); }

.l-mock__kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--l-sp-2); margin-bottom: var(--l-sp-3); }
.l-mock__kpi { padding: var(--l-sp-3); background: var(--l-bg); border-radius: var(--l-r-sm); }
.l-mock__kpi-label { font-size: .6875rem; text-transform: uppercase; letter-spacing: .05em; color: var(--l-muted-fg); }
.l-mock__kpi-value { font-family: var(--l-font-mono); font-size: 1.0625rem; font-weight: 600; color: var(--l-primary); margin-top: 3px; }

/* ── 6. Secciones y tarjetas ────────────────────────────────────────────── */
.l-section { padding: var(--l-sp-8) 0; }
.l-section--tint { background: var(--l-surface); border-block: 1px solid var(--l-border); }
.l-section--dark { background: var(--l-primary); color: #cbd5e1; }
.l-section--dark h2, .l-section--dark h3, .l-section--dark h4 { color: #fff; }
.l-section--dark .l-eyebrow { color: #7dd3fc; }
.l-section--dark .l-eyebrow::before { background: #7dd3fc; }

.l-section__head { max-width: 44rem; margin-bottom: var(--l-sp-6); }

.l-card {
  height: 100%; padding: var(--l-sp-4);
  background: var(--l-surface); border: 1px solid var(--l-border); border-radius: var(--l-r-md);
  transition: border-color var(--l-t), box-shadow var(--l-t), transform var(--l-t);
}
.l-card:hover { border-color: #c7d2e0; box-shadow: var(--l-sh-2); transform: translateY(-3px); }
.l-card__icon {
  display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: var(--l-sp-3);
  color: var(--l-accent); background: var(--l-accent-soft); border-radius: 10px;
}
.l-card h3 { margin-bottom: 6px; font-family: var(--l-font-body); font-size: 1.0625rem; font-weight: 600; }
.l-card p { margin: 0; font-size: .9375rem; color: var(--l-muted-fg); line-height: 1.6; }

.l-section--dark .l-card {
  background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .12);
}
.l-section--dark .l-card:hover { border-color: rgba(255, 255, 255, .24); transform: none; }
.l-section--dark .l-card p { color: #94a3b8; }
.l-section--dark .l-card__icon { color: #7dd3fc; background: rgba(125, 211, 252, .12); }

/* Lista de comprobaciones */
.l-check { display: flex; gap: var(--l-sp-3); margin-bottom: var(--l-sp-3); }
.l-check__icon { flex-shrink: 0; color: var(--l-success); margin-top: 3px; }
.l-check p { margin: 0; font-size: .9375rem; color: var(--l-muted-fg); }
.l-check strong { color: var(--l-primary); font-weight: 600; }
.l-section--dark .l-check strong { color: #fff; }
.l-section--dark .l-check__icon { color: #4ade80; }
.l-section--dark .l-check p { color: #94a3b8; }

/* Pasos numerados */
.l-step { position: relative; padding-left: 56px; padding-bottom: var(--l-sp-5); }
.l-step:last-child { padding-bottom: 0; }
.l-step::before {                    /* línea que une los pasos */
  content: ''; position: absolute; left: 17px; top: 38px; bottom: 0; width: 2px; background: var(--l-border);
}
.l-step:last-child::before { display: none; }
.l-step__num {
  position: absolute; left: 0; top: 0;
  display: grid; place-items: center; width: 36px; height: 36px;
  font-family: var(--l-font-mono); font-size: .875rem; font-weight: 600;
  color: var(--l-accent); background: var(--l-accent-soft);
  border: 2px solid var(--l-surface); border-radius: 50%;
}
.l-step h3 { font-family: var(--l-font-body); font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.l-step p { margin: 0; font-size: .9375rem; color: var(--l-muted-fg); }

/* Perfiles de usuario */
.l-role { height: 100%; padding: var(--l-sp-4); background: var(--l-surface);
  border: 1px solid var(--l-border); border-radius: var(--l-r-md); }
.l-role__head { display: flex; align-items: center; gap: var(--l-sp-3); margin-bottom: var(--l-sp-3); }
.l-role__avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; color: #fff; }
.l-role__name { font-weight: 600; color: var(--l-primary); }
.l-role__scope { font-size: .8125rem; color: var(--l-muted-fg); }
.l-role ul { margin: 0; padding-left: 18px; font-size: .9375rem; color: var(--l-muted-fg); }
.l-role li { margin-bottom: 5px; }

/* Pila tecnológica */
.l-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; margin: 0 var(--l-sp-2) var(--l-sp-2) 0;
  font-size: .875rem; font-weight: 500; color: var(--l-secondary);
  background: var(--l-surface); border: 1px solid var(--l-border); border-radius: var(--l-r-full);
}

/* ── 7. Planes ──────────────────────────────────────────────────────────── */
.l-plan {
  position: relative; height: 100%;
  display: flex; flex-direction: column;
  padding: var(--l-sp-5) var(--l-sp-4);
  background: var(--l-surface); border: 1px solid var(--l-border); border-radius: var(--l-r-lg);
}
.l-plan--featured {
  border-color: var(--l-accent); border-width: 2px; box-shadow: var(--l-sh-3);
}
.l-plan__flag {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  padding: 5px 14px; font-size: .75rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: #fff; background: var(--l-accent); border-radius: var(--l-r-full); white-space: nowrap;
}
.l-plan__name { font-family: var(--l-font-head); font-size: 1.375rem; color: var(--l-primary); }
.l-plan__price { display: flex; align-items: baseline; gap: 6px; margin: var(--l-sp-3) 0 var(--l-sp-4); }
.l-plan__amount { font-family: var(--l-font-head); font-size: 2.75rem; color: var(--l-primary); font-variant-numeric: tabular-nums; line-height: 1; }
.l-plan__period { font-size: .9375rem; color: var(--l-muted-fg); }
.l-plan__list { flex: 1; margin: 0 0 var(--l-sp-4); padding: 0; list-style: none; }
.l-plan__list li {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 7px 0; font-size: .9375rem; color: var(--l-secondary);
  border-bottom: 1px solid var(--l-border);
}
.l-plan__list li:last-child { border-bottom: 0; }
.l-plan__list svg { flex-shrink: 0; margin-top: 3px; }
.l-plan__list .is-yes { color: var(--l-success); }
.l-plan__list .is-no  { color: #94a3b8; }
.l-plan__list li.is-off { color: var(--l-muted-fg); }

/* ── 8. Pie ─────────────────────────────────────────────────────────────── */
.l-footer { padding: var(--l-sp-7) 0 var(--l-sp-5); background: var(--l-primary); color: #94a3b8; font-size: .9375rem; }
.l-footer h4 { color: #fff; font-size: .875rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: var(--l-sp-3); }
.l-footer a { color: #cbd5e1; text-decoration: none; }
.l-footer a:hover { color: #fff; text-decoration: underline; }
.l-footer ul { margin: 0; padding: 0; list-style: none; }
.l-footer li { margin-bottom: 9px; }
.l-footer__bottom {
  display: flex; flex-wrap: wrap; gap: var(--l-sp-3); justify-content: space-between;
  margin-top: var(--l-sp-6); padding-top: var(--l-sp-4);
  border-top: 1px solid rgba(255, 255, 255, .12); font-size: .875rem;
}

/* Llamada final */
.l-cta {
  padding: var(--l-sp-7) var(--l-sp-4); text-align: center;
  background: linear-gradient(135deg, var(--l-primary) 0%, #17293f 100%);
  border-radius: var(--l-r-lg);
}
.l-cta h2 { color: #fff; }
.l-cta p { max-width: 46ch; margin: 0 auto var(--l-sp-5); color: #cbd5e1; }
.l-cta__actions { display: flex; flex-wrap: wrap; gap: var(--l-sp-3); justify-content: center; }

/* ── 9. Animación de entrada y accesibilidad ────────────────────────────── */
.l-reveal { opacity: 0; transform: translateY(18px); }
.l-reveal.is-visible {
  opacity: 1; transform: none;
  transition: opacity 420ms var(--l-ease), transform 420ms var(--l-ease);
}

.l-skip {
  position: absolute; top: -80px; left: 16px; z-index: 2000;
  padding: 12px 18px; color: #fff; background: var(--l-primary); border-radius: var(--l-r-sm);
}
.l-skip:focus { top: 12px; color: #fff; }

/* Sin JavaScript, el contenido debe verse igual. */
.no-js .l-reveal { opacity: 1; transform: none; }

/* Quien pide menos movimiento, no recibe ninguno. */
@media (prefers-reduced-motion: reduce) {
  .l-reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

@media (max-width: 767.98px) {
  body.landing { font-size: 16px; }
  .l-section, .l-hero { padding: var(--l-sp-7) 0; }
  .l-hero__actions .l-btn { width: 100%; }
  .l-mock__kpis { grid-template-columns: 1fr; }
}

@media print {
  .l-nav, .l-hero__actions, .l-cta, .l-btn { display: none !important; }
}
