/* ═══════════════════════════════════════
   VARIABLES GLOBALES
═══════════════════════════════════════ */
:root {
  --bg:       #050810;
  --bg2:      #080d1a;
  --accent:   #4F8EF7;
  --accent2:  #A259FF;
  --text:     #EDF0FA;
  --muted:    #7B84A3;
  --border:   rgba(255,255,255,0.07);
  --glow:     rgba(79,142,247,0.18);
  --radius:   12px;
  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;
}

/* ═══════════════════════════════════════
   RESET Y BASE
═══════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  font-family: var(--font-body);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ═══════════════════════════════════════
   TIPOGRAFÍA
═══════════════════════════════════════ */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
h1 { font-size: clamp(42px, 7vw, 88px); }
h2 { font-size: clamp(28px, 4vw, 48px); }
h3 { font-size: clamp(18px, 2.5vw, 24px); }
p  { color: var(--muted); font-weight: 300; line-height: 1.75; }

/* ═══════════════════════════════════════
   UTILIDADES
═══════════════════════════════════════ */
.gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.page-wrap {
  width: 100%;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(20px, 4vw, 48px);
  padding-right: clamp(20px, 4vw, 48px);
}
.page-main {
  position: relative;
  z-index: 10;
  padding-top: 68px;
}
.section { padding: 100px 0; }

/* ── Hero de inicio ── */
.hero-home {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 0 80px;
}
.hero-home-inner {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-home .hero-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 80px;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255,255,255,0.02);
  max-width: 100%;
}
.hero-home .hero-stat {
  padding: 24px clamp(20px, 4vw, 40px);
  text-align: center;
  border-right: 1px solid var(--border);
}
.hero-home .hero-stat:last-child { border-right: none; }
@media (max-width: 640px) {
  .hero-home { padding: 100px 0 72px; }
  .hero-home .hero-stats { flex-direction: column; width: 100%; }
  .hero-home .hero-stat {
    border-right: none;
    border-bottom: 1px solid var(--border);
    width: 100%;
  }
  .hero-home .hero-stat:last-child { border-bottom: none; }
}

/* ═══════════════════════════════════════
   NAVBAR
═══════════════════════════════════════ */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 48px;
  height: 68px;
  border-bottom: 1px solid var(--border);
  background: rgba(5,8,16,0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: box-shadow .3s;
}
nav.scrolled {
  box-shadow: 0 4px 40px rgba(0,0,0,0.5);
}
.nav-logo {
  font-family: var(--font-display);
  font-weight: 800; font-size: 18px;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.nav-links {
  display: flex; gap: 36px;
  position: absolute; left: 50%; transform: translateX(-50%);
}
.nav-links a {
  color: var(--muted); font-size: 13px; font-weight: 300;
  letter-spacing: 0.02em;
  transition: color .2s;
  position: relative; padding-bottom: 2px;
}
.nav-links a::after {
  content: '';
  position: absolute; bottom: -2px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transform: scaleX(0); transform-origin: left;
  transition: transform .25s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: var(--text); }

.nav-right { display: flex; align-items: center; gap: 12px; }
.nav-cta {
  font-size: 13px; padding: 8px 18px; border-radius: 8px;
  border: 1px solid var(--border); color: var(--text);
  background: rgba(255,255,255,0.05); cursor: pointer;
  font-family: var(--font-body);
  transition: background .2s, border-color .2s;
  white-space: nowrap;
}
.nav-cta:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); }

/* ── Hamburguesa ── */
.nav-hamburger {
  display: none;
  flex-direction: column; justify-content: center;
  gap: 5px; width: 36px; height: 36px;
  background: none; border: none; cursor: pointer;
  padding: 4px; border-radius: 8px;
  transition: background .2s;
}
.nav-hamburger:hover { background: rgba(255,255,255,0.06); }
.nav-hamburger span {
  display: block; height: 1.5px; border-radius: 2px;
  background: var(--text);
  transition: transform .3s ease, opacity .3s ease, width .3s ease;
  transform-origin: center;
}
.nav-hamburger span:nth-child(2) { width: 70%; }
.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── Menú móvil ── */
.nav-mobile {
  display: none;
  position: fixed; top: 68px; left: 0; right: 0; z-index: 99;
  background: rgba(5,8,16,0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  max-height: 0; overflow: hidden;
  transition: max-height .4s cubic-bezier(.4,0,.2,1), padding .4s ease;
}
.nav-mobile.open {
  max-height: 400px;
  padding: 20px 24px 28px;
}
.nav-mobile a {
  display: flex; align-items: center; justify-content: space-between;
  color: var(--muted); font-size: 16px; font-weight: 300;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  transition: color .2s;
}
.nav-mobile a:last-of-type { border-bottom: none; }
.nav-mobile a:hover,
.nav-mobile a.active { color: var(--text); }
.nav-mobile a span { font-size: 12px; color: var(--accent); opacity: 0; transition: opacity .2s; }
.nav-mobile a:hover span,
.nav-mobile a.active span { opacity: 1; }
.nav-mobile-cta {
  margin-top: 20px; width: 100%; padding: 13px;
  border-radius: 10px; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; font-family: var(--font-body); font-size: 15px;
  font-weight: 400; letter-spacing: 0.01em;
}

/* ═══════════════════════════════════════
   BOTONES
═══════════════════════════════════════ */
.btn-primary {
  font-family: var(--font-body); font-size: 15px;
  padding: 14px 32px; border-radius: 10px; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff; transition: transform .2s, box-shadow .2s;
  box-shadow: 0 0 32px var(--glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 48px rgba(79,142,247,0.4); }
.btn-secondary {
  font-family: var(--font-body); font-size: 15px;
  padding: 14px 32px; border-radius: 10px;
  border: 1px solid var(--border); cursor: pointer;
  background: rgba(255,255,255,0.04); color: var(--text);
  transition: background .2s, border-color .2s, transform .2s;
}
.btn-secondary:hover { background: rgba(255,255,255,0.08); transform: translateY(-2px); }

/* ═══════════════════════════════════════
   CARDS
═══════════════════════════════════════ */
.card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color .25s, transform .25s;
}
.card:hover { border-color: rgba(79,142,247,0.3); transform: translateY(-4px); }

/* ═══════════════════════════════════════
   FOOTER
═══════════════════════════════════════ */
footer {
  position: relative; z-index: 10;
  border-top: 1px solid var(--border);
  background: rgba(5,8,16,0.6);
}
.footer-inner {
  max-width: 1100px; margin: 0 auto;
  padding: 56px 48px 32px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}
.footer-brand .footer-logo {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 800;
  margin-bottom: 12px;
}
.footer-brand p {
  font-size: 13px; line-height: 1.7;
  max-width: 220px;
}
.footer-col-title {
  font-size: 11px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--text); margin-bottom: 16px;
}
.footer-col a {
  display: block; color: var(--muted);
  font-size: 13px; font-weight: 300;
  margin-bottom: 10px;
  transition: color .2s;
}
.footer-col a:hover { color: var(--text); }
.footer-col .footer-link-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 300;
  margin-bottom: 10px;
  padding: 0;
  cursor: pointer;
  font-family: var(--font-body);
  transition: color .2s;
}
.footer-col .footer-link-btn:hover { color: var(--text); }
.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 24px;
  color: var(--muted);
  font-size: 12px;
}
.footer-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}
.footer-socials { display: flex; gap: 16px; flex-shrink: 0; }
.footer-socials a {
  width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 14px;
  transition: color .2s, border-color .2s, background .2s;
}
.footer-socials a:hover {
  color: var(--text);
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.06);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 24px;
  width: 100%;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.footer-legal-link {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 300;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: color .2s;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(123,132,163,0.55);
}
.footer-legal-link:hover { color: var(--text); }

/* ── Modales legales ── */
body.legal-modal-open { overflow: hidden; }
.legal-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.legal-modal.is-open {
  display: flex;
}
.legal-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5,8,16,0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.legal-modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  max-height: min(85vh, 720px);
  display: flex;
  flex-direction: column;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.55);
  animation: legalModalIn .28s ease;
}
@keyframes legalModalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.legal-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 24px 0;
  flex-shrink: 0;
}
.legal-modal-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 4vw, 26px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}
.legal-modal-close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}
.legal-modal-close:hover {
  color: var(--text);
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
}
.legal-modal-body {
  padding: 16px 24px 28px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
}
.legal-modal-body h3 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 20px 0 8px;
}
.legal-modal-body h3:first-of-type { margin-top: 12px; }
.legal-modal-body p { margin-bottom: 12px; }
.legal-modal-body ul {
  margin: 0 0 12px 1.1em;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.legal-modal-body strong { color: var(--text); font-weight: 400; }
.legal-modal-body .legal-note {
  font-size: 12px;
  opacity: 0.85;
  margin-top: 8px;
}

/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */
@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 768px) {
  /* Navbar móvil */
  nav { padding: 0 20px; }
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-hamburger { display: flex; }
  .nav-mobile { display: block; }

  /* Footer móvil */
  .footer-inner { padding: 40px 20px 24px; }
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom-row { flex-direction: column; text-align: center; }
  .footer-legal { justify-content: center; gap: 10px 16px; }
  .legal-modal { padding: 16px; }
  .legal-modal-panel { max-height: 90vh; }
  .legal-modal-header { padding: 20px 20px 0; }
  .legal-modal-body { padding: 12px 20px 24px; }
}
