/* ============================================================
   ConsorcioOS — Landing v2: profundidad, glassmorphism, tilt 3D,
   hero oscuro con rotación de capturas reales del sistema.
   ============================================================ */

/* ---------- Navbar con barra activa deslizante ---------- */
.nav-underline-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
}
.nav-item-link {
  position: relative;
  z-index: 1;
}
.nav-underline {
  position: absolute;
  bottom: -2px;
  left: 0;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8, #6366f1, #a855f7);
  box-shadow: 0 0 14px rgba(99, 102, 241, 0.7);
  width: var(--underline-width, 0px);
  transform: translateX(var(--underline-x, 0px)) scaleX(0.5);
  transform-origin: center;
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.25s ease, width 0.35s cubic-bezier(0.34, 1.4, 0.64, 1);
  pointer-events: none;
}
.nav-underline-wrap[data-active='true'] .nav-underline {
  opacity: 1;
  transform: translateX(var(--underline-x, 0px)) scaleX(1);
}

/* ---------- Header glass ---------- */
#landing-header.is-scrolled .header-shell {
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 10px 40px -12px rgba(2, 6, 23, 0.5);
}

/* ============================================================
   HERO — dark con mesh gradient, orbes y grid
   ============================================================ */
.landing-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(52rem 34rem at 78% -12%, rgba(99, 102, 241, 0.34), transparent 62%),
    radial-gradient(46rem 30rem at 8% 108%, rgba(56, 189, 248, 0.22), transparent 60%),
    linear-gradient(180deg, #0b1220 0%, #101b33 58%, #0e1830 100%);
}
.landing-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.07) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(70rem 40rem at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(70rem 40rem at 50% 30%, #000 30%, transparent 75%);
  pointer-events: none;
}
.hero-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(70px);
  pointer-events: none;
  animation: hero-orb-float 14s ease-in-out infinite;
}
.hero-orb-1 { width: 420px; height: 420px; top: -120px; right: -80px; background: rgba(99, 102, 241, 0.5); }
.hero-orb-2 { width: 340px; height: 340px; bottom: -140px; left: -100px; background: rgba(56, 189, 248, 0.4); animation-delay: -5s; }
.hero-orb-3 { width: 260px; height: 260px; top: 40%; left: 42%; background: rgba(168, 85, 247, 0.28); animation-delay: -9s; }
@keyframes hero-orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -24px) scale(1.06); }
  66% { transform: translate(-22px, 18px) scale(0.97); }
}

.hero-title {
  background: linear-gradient(110deg, #f8fafc 20%, #93c5fd 55%, #a5b4fc 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-subtitle {
  color: rgba(203, 213, 225, 0.92);
}

/* KPIs glass */
.kpi-glass {
  position: relative;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 1.25rem;
  box-shadow: 0 12px 32px -12px rgba(2, 6, 23, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.09);
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}
.kpi-glass:hover {
  transform: translateY(-4px);
  border-color: rgba(147, 197, 253, 0.4);
  background: rgba(255, 255, 255, 0.09);
}
.kpi-glass dt { color: rgba(203, 213, 225, 0.7); }
.kpi-glass dd {
  background: linear-gradient(90deg, #7dd3fc, #818cf8, #c4b5fd);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Mockup de navegador con rotación de capturas ---------- */
.hero-stage {
  position: relative;
  perspective: 1400px;
}
.hero-browser {
  position: relative;
  border-radius: 1.4rem;
  overflow: hidden;
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow:
    0 60px 120px -30px rgba(2, 6, 23, 0.85),
    0 24px 48px -16px rgba(2, 6, 23, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transform: rotateY(-6deg) rotateX(2deg);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  animation: hero-browser-float 7s ease-in-out infinite;
}
.hero-stage:hover .hero-browser {
  transform: rotateY(0deg) rotateX(0deg) translateY(-4px);
}
@keyframes hero-browser-float {
  0%, 100% { margin-top: 0; }
  50% { margin-top: -10px; }
}
.hero-browser .shot-chrome {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  position: relative;
  z-index: 5;
}
.shot-dot { width: 11px; height: 11px; border-radius: 999px; }
.shot-url {
  margin-left: 10px;
  flex: 1;
  max-width: 320px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 0.72rem;
  color: rgba(203, 213, 225, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero-slides {
  position: relative;
  height: 430px;
}
.hero-slides .hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 1s ease, transform 1.4s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.hero-slides .hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}
.hero-slides img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}
.hero-slide-tag {
  position: absolute;
  left: 16px;
  bottom: 14px;
  z-index: 6;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #e2e8f0;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.hero-slide-dots {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 6;
  display: flex;
  gap: 6px;
}
.hero-slide-dots button {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}
.hero-slide-dots button.is-active {
  width: 24px;
  background: linear-gradient(90deg, #38bdf8, #818cf8);
}

/* Tarjetas flotantes del hero */
.hero-float-card {
  position: absolute;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 1.1rem;
  box-shadow: 0 30px 60px -18px rgba(2, 6, 23, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  z-index: 8;
  animation: float-card 6s ease-in-out infinite;
}
.hero-float-card-1 { bottom: -26px; left: -30px; padding: 14px 18px; }
.hero-float-card-2 { top: -24px; right: -26px; padding: 14px 18px; animation-delay: -2.5s; }
@keyframes float-card {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.hero-glow-ring {
  position: absolute;
  inset: -14px;
  border-radius: 1.7rem;
  background: linear-gradient(120deg, rgba(56, 189, 248, 0.35), rgba(99, 102, 241, 0.4), rgba(168, 85, 247, 0.3));
  filter: blur(28px);
  opacity: 0.55;
  z-index: -1;
}

/* ============================================================
   SECCIONES — fondos con pattern y gradientes
   ============================================================ */
.section-band {
  position: relative;
  background:
    radial-gradient(40rem 22rem at 90% 0%, rgba(99, 102, 241, 0.09), transparent 60%),
    radial-gradient(36rem 20rem at 0% 100%, rgba(56, 189, 248, 0.08), transparent 55%);
}
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.28);
  color: #6366f1;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ============================================================
   CARDS DE MÓDULOS — tilt 3D + spotlight + borde gradiente
   ============================================================ */
.module-card {
  position: relative;
  border-radius: 1.75rem;
  background: var(--card-bg, #ffffff);
  border: 1px solid rgba(148, 163, 184, 0.28);
  padding: 1.75rem;
  transform-style: preserve-3d;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease, border-color 0.3s ease;
  box-shadow:
    0 18px 40px -18px rgba(2, 6, 23, 0.28),
    0 4px 12px rgba(2, 6, 23, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  overflow: hidden;
  will-change: transform;
}
.module-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(480px circle at var(--mx, 50%) var(--my, 50%), rgba(99, 102, 241, 0.13), transparent 42%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.module-card:hover {
  transform: translateY(-8px) rotateX(4deg) rotateY(-4deg) scale(1.015);
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow:
    0 40px 80px -24px rgba(2, 6, 23, 0.45),
    0 10px 24px rgba(2, 6, 23, 0.12),
    0 0 0 1px rgba(99, 102, 241, 0.12);
}
.module-card:hover::before { opacity: 1; }
.module-card .module-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 0.5s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.module-card:hover .module-img { opacity: 0.14; transform: scale(1.02); }
.module-card .card-content { position: relative; z-index: 2; transform: translateZ(24px); }
.module-tile {
  width: 52px;
  height: 52px;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 10px 22px -8px rgba(2, 6, 23, 0.4);
  transition: transform 0.3s ease;
}
.module-card:hover .module-tile { transform: scale(1.1) rotate(-4deg); }
.module-chip {
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(255, 255, 255, 0.55);
}

/* ============================================================
   CARRUSEL — profundidad y glass
   ============================================================ */
.landing-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 1.75rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow:
    0 50px 100px -30px rgba(2, 6, 23, 0.55),
    0 16px 40px -16px rgba(2, 6, 23, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.landing-carousel .track { display: flex; transition: transform 0.75s cubic-bezier(0.22, 1, 0.36, 1); }
.landing-carousel .slide { min-width: 100%; position: relative; }
.landing-carousel .slide img { display: block; width: 100%; height: auto; object-fit: cover; }
.landing-carousel .slide-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 3rem 1.9rem 1.4rem;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.88));
  color: #fff;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.landing-carousel .slide.is-active .slide-caption { opacity: 1; transform: translateY(0); }
.carousel-dot {
  width: 9px; height: 9px; border-radius: 999px;
  background: rgba(100, 116, 139, 0.5);
  transition: all 0.3s ease;
  cursor: pointer;
}
.carousel-dot.is-active { width: 30px; background: linear-gradient(90deg, #38bdf8, #818cf8); box-shadow: 0 0 12px rgba(99, 102, 241, 0.6); }
.carousel-btn {
  transition: all 0.25s ease;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: 0 10px 24px -8px rgba(2, 6, 23, 0.4);
}
.carousel-btn:hover { background: linear-gradient(90deg, #38bdf8, #818cf8); color: #fff; transform: scale(1.08); }

/* ============================================================
   MARCO LEGAL — checks con glow
   ============================================================ */
.legal-check {
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.25);
}
.legal-photo {
  border-radius: 2rem;
  overflow: hidden;
  box-shadow: 0 50px 100px -30px rgba(2, 6, 23, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.legal-quote {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 30px 60px -20px rgba(2, 6, 23, 0.4);
}

/* ============================================================
   CTA — panel con gradiente vivo
   ============================================================ */
.cta-panel {
  position: relative;
  overflow: hidden;
  border-radius: 2.5rem;
  background:
    radial-gradient(40rem 26rem at 15% -10%, rgba(56, 189, 248, 0.35), transparent 55%),
    radial-gradient(36rem 24rem at 95% 115%, rgba(168, 85, 247, 0.4), transparent 55%),
    linear-gradient(125deg, #2563eb 0%, #4f46e5 55%, #7c3aed 100%);
  box-shadow: 0 60px 120px -32px rgba(79, 70, 229, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.cta-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: radial-gradient(50rem 30rem at 50% 40%, #000, transparent 75%);
  -webkit-mask-image: radial-gradient(50rem 30rem at 50% 40%, #000, transparent 75%);
  pointer-events: none;
}
.cta-shine {
  position: absolute;
  top: -60%;
  left: -30%;
  width: 60%;
  height: 220%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
  transform: rotate(20deg);
  animation: cta-shine 6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes cta-shine { 0%, 60% { left: -40%; } 100% { left: 130%; } }

/* ---------- Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px) scale(0.985);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0) scale(1); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ---------- Hero texto en modo claro: la sección es siempre dark ---------- */
.landing-hero .text-hero { color: #f1f5f9; }
.landing-hero .text-hero-muted { color: rgba(203, 213, 225, 0.85); }

@media (max-width: 767px) {
  .nav-links-desktop { display: none; }
  .hero-slides { height: 260px; }
}
