@font-face {
  font-family: 'Avenir SLI';
  src: url('../fonts/AvenirLTStd-Book.otf') format('opentype');
  font-weight: 400; font-style: normal; font-display: swap;
}

:root {
  --primary: #071321;
  --accent: #4A9CC7;
  --success: #2AA040;
  --card-bg: #F0F2F5;
  --border: #D0D5DD;
  --text-primary: #1A1A2E;
  --text-secondary: #6B7C93;
  --surface: #ffffff;
  --font-body: 'Avenir SLI', system-ui, sans-serif;
  --font-heading: 'Inter', -apple-system, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-primary);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
[data-lang="en"] [lang="es"] { display: none; }
[data-lang="es"] [lang="en"] { display: none; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 2.5rem); }

/* ===== Header ===== */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(1.2) blur(6px);
  border-bottom: 1px solid var(--border);
}
header.site .bar { display: flex; align-items: center; gap: 2.2rem; padding: 0.85rem 0; }
header.site .brand { display: flex; align-items: center; gap: 0.6rem; flex: none; }
header.site .brand img.isotipo { height: 32px; width: 32px; object-fit: contain; margin-left: 0.4rem; }
nav.main { display: flex; align-items: center; gap: 1.7rem; margin-right: auto; }
nav.main a.navlink { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); }
nav.main a.navlink:hover { color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 0.9rem; flex: none; }
.btn-login { background: var(--primary); color: #fff; padding: 0.55rem 1.2rem; border-radius: 0.375rem; font-size: 0.85rem; font-weight: 600; white-space: nowrap; }

/* Selector de idioma — lista desplegable con bandera */
.lang-dd { position: relative; }
.lang-dd .lang-current {
  display: flex; align-items: center; gap: 0.4rem;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 0.375rem;
  padding: 0.4rem 0.65rem; font-family: var(--font-heading); font-size: 0.8rem; font-weight: 700;
  color: var(--text-primary); cursor: pointer;
}
.lang-dd .lang-current .flag-icon[hidden] { display: none; }
.lang-dd .lang-current .flag-icon { display: inline-flex; line-height: 1; }
.lang-dd .lang-current svg[width="18"] { border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,0.08); display: block; }
.lang-dd .lang-current svg { stroke: var(--text-secondary); transition: transform .15s; }
.lang-dd.open .lang-current svg { transform: rotate(180deg); }
.lang-menu {
  position: absolute; top: calc(100% + 6px); right: 0; min-width: 152px;
  background: #fff; border: 1px solid var(--border); border-radius: 0.5rem;
  box-shadow: 0 8px 24px rgba(16,24,40,0.12); padding: 0.35rem; display: none; z-index: 60;
}
.lang-dd.open .lang-menu { display: block; }
.lang-menu button {
  display: flex; align-items: center; gap: 0.55rem; width: 100%; text-align: left;
  background: none; border: none; cursor: pointer; padding: 0.5rem 0.6rem; border-radius: 0.375rem;
  font-family: var(--font-body); font-size: 0.85rem; color: var(--text-primary);
}
.lang-menu button:hover { background: var(--card-bg); }
.lang-menu button svg { flex: none; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,0.08); }
.lang-menu button.active { font-weight: 700; color: var(--accent); }

.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.4rem; }
.menu-toggle svg { stroke: var(--primary); }
@media (max-width: 860px) {
  nav.main.desktop-nav { display: none; }
  a.btn-login.desktop-nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .header-actions { margin-left: auto; }
}
#mobileNav {
  display: none; flex-direction: column; gap: 0.2rem;
  position: absolute; top: 100%; left: 0; right: 0;
  background: #fff; border-top: 1px solid var(--border);
  box-shadow: 0 16px 28px rgba(16,24,40,0.14);
  padding: 0.6rem clamp(1.25rem, 4vw, 2.5rem) 1.1rem;
}
#mobileNav.open { display: flex; }
#mobileNav a { padding: 0.6rem 0.2rem; font-weight: 600; }
#mobileNav .btn-login { justify-content: center; text-align: center; }

/* ===== Hero (gradiente + partículas real del login) ===== */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #060e1a 0%, #0a1e30 60%, #0d2840 100%);
  padding: clamp(3.8rem, 8vw, 6rem) 0 clamp(3rem, 6vw, 4.5rem);
}
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero .wrap { position: relative; z-index: 2; max-width: 960px; }
.hero .eyebrow { font-family: var(--font-heading); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); font-weight: 700; margin-bottom: 1.2rem; }
.hero h1 { font-family: var(--font-heading); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; font-size: clamp(2.1rem, 5.2vw, 3.9rem); color: #fff; margin: 0 0 1.2rem; text-wrap: balance; }
.hero p.dek { color: rgba(255,255,255,0.78); font-size: clamp(1rem, 1.4vw, 1.25rem); line-height: 1.6; max-width: 64ch; margin: 0 0 2.2rem; }
.hero .cta-row { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 2.75rem; padding: 0 1.5rem; border-radius: 0.5rem; font-weight: 600; font-size: 0.95rem; cursor: pointer; border: none; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-ghost-light { background: transparent; border: 1px solid rgba(255,255,255,0.35); color: #fff; }

/* ===== Módulos ===== */
.section { padding: clamp(2.5rem, 5vw, 3.75rem) 0; }
.section-head { max-width: 640px; margin: 0 auto 2rem; text-align: center; }
.section-head.wide { max-width: 820px; }
.nowrap-heading { white-space: normal; }
@media (min-width: 640px) { .nowrap-heading { white-space: nowrap; } }

/* ===== Vista previa de la plataforma (recreación real del login) ===== */
.device-frame { background: #fff; border-radius: 1rem; overflow: hidden; box-shadow: 0 24px 60px rgba(7,19,33,0.22); border: 1px solid var(--border); }
.device-bar { display: flex; gap: 6px; padding: 0.65rem 0.9rem; background: #eef0f3; border-bottom: 1px solid var(--border); }
.device-dot { width: 9px; height: 9px; border-radius: 50%; background: #d4d8de; }

.login-replica { display: flex; min-height: 440px; }
@media (max-width: 760px) { .login-replica { flex-direction: column; min-height: 0; } }

.lp-dark { flex: 1 1 56%; position: relative; overflow: hidden; background: linear-gradient(145deg, #060e1a 0%, #0a1e30 60%, #0d2840 100%); padding: clamp(1.4rem, 3vw, 2.2rem); display: flex; flex-direction: column; justify-content: space-between; color: #fff; min-width: 0; }
.lp-dark canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.lp-eyebrow { position: relative; z-index: 2; font-family: var(--font-heading); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.6); font-weight: 700; }
.lp-stats { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 1.3rem 1rem; margin: auto 0; }
.lp-stat-num { font-family: var(--font-heading); font-weight: 800; font-size: 1.7rem; }
.lp-stat-num.muted { color: rgba(255,255,255,0.55); }
.lp-stat-num.accent { color: var(--accent); }
.lp-stat-label { font-size: 0.66rem; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.03em; margin-top: 0.2rem; }
.lp-tagline { position: relative; z-index: 2; font-size: 0.84rem; color: rgba(255,255,255,0.68); line-height: 1.6; max-width: 30ch; border-top: 1px solid rgba(255,255,255,0.12); padding-top: 1rem; margin-top: 1rem; }
.lp-footer { position: relative; z-index: 2; display: flex; align-items: center; gap: 0.6rem; margin-top: 1.1rem; font-size: 0.7rem; color: rgba(255,255,255,0.45); }
.lp-dots { display: flex; gap: 4px; }
.lp-dots span { width: 15px; height: 3px; border-radius: 2px; background: rgba(255,255,255,0.25); }
.lp-dots span.on { background: var(--accent); width: 24px; }

.lp-card { flex: 1 1 44%; background: #fff; padding: clamp(1.5rem, 3.5vw, 2.4rem); display: flex; flex-direction: column; justify-content: center; gap: 0.95rem; min-width: 0; }
.lp-card img { height: 32px; margin: 0 auto 0.3rem; }
.lp-card h3 { font-family: var(--font-heading); font-weight: 700; font-size: 1.2rem; margin: 0; }
.lp-card .lp-sub { color: var(--text-secondary); font-size: 0.82rem; margin: -0.55rem 0 0; }
.lp-field label { font-size: 0.74rem; font-weight: 600; display: block; margin-bottom: 0.3rem; }
.lp-field .lp-input { height: 2.2rem; border: 1px solid var(--border); border-radius: 0.375rem; background: var(--card-bg); display: flex; align-items: center; padding: 0 0.7rem; font-size: 0.8rem; color: var(--text-secondary); position: relative; }
.lp-field .lp-input svg { position: absolute; right: 0.65rem; stroke: var(--text-secondary); }
.lp-row-between { display: flex; align-items: center; justify-content: space-between; font-size: 0.76rem; }
.lp-row-between .lp-remember { display: flex; align-items: center; gap: 0.4rem; color: var(--text-secondary); }
.lp-row-between .lp-remember input { margin: 0; }
.lp-row-between a { color: var(--accent); font-weight: 600; }
.lp-btn { height: 2.4rem; border-radius: 0.375rem; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 0.86rem; }
.lp-help { text-align: center; font-size: 0.76rem; color: var(--text-secondary); }
.lp-help a { color: var(--accent); font-weight: 600; }

/* ===== CTA banner (full-bleed, cubre todo el ancho) ===== */
.cta-banner-section {
  background: linear-gradient(120deg, var(--primary) 0%, #0d2840 100%);
  padding: clamp(2.4rem, 6vw, 3.5rem) 0;
  text-align: center;
}
.cta-banner-section h2 { font-family: var(--font-heading); font-weight: 800; color: #fff; font-size: clamp(1.4rem, 2.8vw, 1.9rem); margin: 0 0 0.6rem; }
.cta-banner-section p { color: rgba(255,255,255,0.75); margin: 0 auto 1.4rem; max-width: 50ch; }
.module-card .card-cta svg { stroke: currentColor; transition: transform .15s; }
.module-card .card-cta:hover svg { transform: translateX(3px); }
.eyebrow-light { font-family: var(--font-heading); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); font-weight: 700; margin-bottom: 0.7rem; }
.section-head h2 { font-family: var(--font-heading); font-weight: 800; font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 0.7rem; letter-spacing: -0.01em; }
.section-head p { color: var(--text-secondary); font-size: 1rem; line-height: 1.6; margin: 0; }

/* Grid con subgrid: los 6 bloques de cada tarjeta (icono/título/frase/texto/checklist/botón)
   se alinean exactamente entre las 4 tarjetas, fila por fila. */
.module-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
@media (max-width: 980px) { .module-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .module-grid { grid-template-columns: 1fr; } }

.module-card {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 6;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(16,24,40,0.05);
}
.module-card .icon { padding: 1.2rem 1.4rem 0.4rem; display: flex; align-items: center; justify-content: center; }
.module-card .icon svg { stroke: var(--accent); }
.module-card h3 { padding: 0 1.4rem; margin: 0; font-family: var(--font-heading); font-weight: 700; font-size: 1.08rem; text-align: center; }
.module-card .tagline { padding: 0.2rem 1.4rem 0; color: var(--accent); font-weight: 600; font-size: 0.86rem; text-align: center; line-height: 1.3; }
.module-card p.body { padding: 0.4rem 1.4rem 0; margin: 0; color: var(--text-secondary); font-size: 0.86rem; line-height: 1.5; text-align: center; }
.module-card ul { align-self: start; padding: 0.6rem 1.4rem 0.9rem; margin: 0; list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }
.module-card ul li { font-size: 0.82rem; color: var(--text-primary); display: flex; gap: 0.5rem; align-items: flex-start; text-align: left; }
.module-card ul li svg { flex: none; stroke: var(--success); margin-top: 0.15rem; }
.module-card .card-cta { align-self: end; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; gap: 0.4rem; padding: 0.7rem; font-weight: 600; font-size: 0.85rem; }
.module-card .card-cta:hover { background: var(--accent); }

/* ===== Seguridad / confianza ===== */
.trust {
  background: var(--primary);
  border-radius: 1rem;
  padding: 1.5rem clamp(2.2rem, 5vw, 3.2rem);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}
@media (max-width: 760px) { .trust { grid-template-columns: 1fr; } }
.trust h2 { font-family: var(--font-heading); font-weight: 800; color: #fff; font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin: 0 0 0.8rem; letter-spacing: -0.01em; }
.trust p { color: rgba(255,255,255,0.75); font-size: 0.98rem; line-height: 1.65; margin: 0; }
.account-diagram-wrap { width: 100%; }
.account-diagram { width: 100%; height: auto; display: block; }

/* ===== Contacto ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-copy { display: flex; flex-direction: column; align-items: flex-start; }
.contact-copy .contact-icon { margin-bottom: 1.1rem; }
.contact-copy h2 { font-family: var(--font-heading); font-weight: 800; font-size: clamp(1.5rem, 2.8vw, 2rem); margin: 0 0 0.8rem; }
.contact-copy p { color: var(--text-secondary); line-height: 1.6; max-width: 42ch; }
.contact-form { background: var(--card-bg); border: 1px solid var(--border); border-radius: 0.75rem; padding: 1.6rem; display: flex; flex-direction: column; gap: 1rem; }
.field label { display: block; font-size: 0.8rem; font-weight: 600; margin-bottom: 0.35rem; color: var(--text-primary); }
.field input, .field textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 0.375rem; background: #fff;
  padding: 0.55rem 0.75rem; font-size: 0.9rem; font-family: var(--font-body); color: var(--text-primary);
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(74,156,199,0.18); }
.contact-form .btn-accent { align-self: flex-start; }
.form-note { font-size: 0.82rem; }
.form-note.ok { color: var(--success); font-weight: 600; }
.form-note.error { color: #DC2626; font-weight: 600; }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }

/* ===== Footer ===== */
footer.site { background: var(--primary); color: rgba(255,255,255,0.7); padding: 2.5rem 0; margin-top: 2rem; }
footer.site .foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.2rem; align-items: center; }
footer.site .brand-line { display: flex; align-items: center; gap: 0.6rem; color: #fff; font-family: var(--font-heading); font-weight: 700; font-size: 0.95rem; }
footer.site .brand-line img { height: 20px; }
footer.site .legal-links { display: flex; gap: 1.4rem; font-size: 0.82rem; }
footer.site .legal-links .link-btn:hover { color: #fff; }
footer.site .copy { font-size: 0.76rem; margin-top: 1.4rem; color: rgba(255,255,255,0.45); }

.link-btn { background: none; border: none; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: none; }

/* ===== Modal flotante (Privacidad / Términos / Seguridad) ===== */
.modal-overlay { position: fixed; inset: 0; background: rgba(6,10,16,0.55); display: none; align-items: center; justify-content: center; padding: 1.25rem; z-index: 100; }
.modal-overlay.open { display: flex; }
.modal-box { background: #fff; border-radius: 1rem; max-width: 640px; width: 100%; max-height: 82vh; display: flex; flex-direction: column; box-shadow: 0 30px 70px rgba(0,0,0,.35); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--border); flex: none; }
.modal-head h3 { margin: 0; font-family: var(--font-heading); font-weight: 700; font-size: 1.1rem; }
.modal-close { background: var(--card-bg); border: none; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-secondary); flex: none; }
.modal-close:hover { background: var(--border); color: var(--text-primary); }
.modal-close svg { stroke: currentColor; }
.modal-body { padding: 1.2rem 1.4rem 1.6rem; overflow-y: auto; font-size: 0.88rem; line-height: 1.65; color: var(--text-secondary); }
.modal-body h4 { font-family: var(--font-heading); font-weight: 700; font-size: 0.95rem; color: var(--text-primary); margin: 1.2rem 0 0.4rem; }
.modal-body h4:first-child { margin-top: 0; }
.modal-body ul { margin: 0.4rem 0; padding-left: 1.2rem; }
.modal-body li { margin-bottom: 0.3rem; }
.modal-body strong { color: var(--text-primary); }
body.modal-lock { overflow: hidden; }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
