/* ==========================================================================
   Rediseño 2026 (rama `rediseno`): capa sobre styles.css.
   Video real en el hero, bento con fotos, app en acción, parallax,
   galería en movimiento, partículas y botones magnéticos.
   Todo el movimiento se apaga con prefers-reduced-motion.
   ========================================================================== */

:root {
  --indigo: #4f5bff;
  --mauve: #c98ad8;
  --abyss: #07081a;
  --r-xl: 28px;
  --r-lg: 20px;
}

body {
  background: var(--abyss);
}

.grad {
  background: linear-gradient(90deg, var(--accent-cyan), var(--indigo) 45%, var(--accent-violet) 75%, var(--mauve));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---------- Capas de fondo ---------- */
.particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}
.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1;
  width: 520px;
  height: 520px;
  margin: -260px 0 0 -260px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(47, 168, 220, 0.14), rgba(122, 92, 240, 0.08) 40%, transparent 70%);
  transform: translate3d(var(--cx, -999px), var(--cy, -999px), 0);
  transition: opacity 0.4s;
}
main,
footer {
  position: relative;
  z-index: 2;
}

/* ---------- Marca ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  box-shadow: 0 0 18px rgba(47, 168, 220, 0.6), 0 0 32px rgba(47, 168, 220, 0.35);
}
.nav-cta {
  padding: 0.5rem 1rem !important;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--indigo), var(--accent-violet));
  color: #fff !important;
}

/* ---------- Hero con video ---------- */
.hero-x {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: calc(var(--header-h) + 3rem) 0 5rem;
}
.hero-video-wrap {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  animation: hero-zoom 18s ease-in-out infinite alternate;
}
@keyframes hero-zoom {
  to { transform: scale(1.14) translate3d(-1.5%, -1%, 0); }
}
.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 8, 26, 0.94) 0%, rgba(7, 8, 26, 0.72) 45%, rgba(7, 8, 26, 0.25) 100%),
    linear-gradient(0deg, var(--abyss) 0%, transparent 30%);
}
.hero-scan {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}
.hero-x-inner {
  position: relative;
  max-width: 1200px;
}
.hero-title {
  font-family: var(--font-title);
  font-size: clamp(2.6rem, 7vw, 5.6rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  max-width: 14ch;
  margin: 1.2rem 0 1.4rem;
}
.split-word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 0.08em;
}
.split-word > span {
  display: inline-block;
  transform: translateY(110%) rotate(4deg);
  opacity: 0;
  transition: transform 0.9s var(--ease-out), opacity 0.9s var(--ease-out);
  transition-delay: calc(var(--i) * 70ms + 150ms);
}
.is-split .split-word > span {
  transform: none;
  opacity: 1;
}
.hero-lead {
  max-width: 46ch;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--text-muted);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}
.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  color: var(--text);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}
.btn {
  border-radius: 999px;
}
.magnetic {
  transform: translate3d(var(--tx, 0), var(--ty, 0), 0);
  transition: transform 0.35s var(--ease-spring), background 0.2s, box-shadow 0.3s;
}
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  margin: 3.2rem 0 0;
  padding: 0;
  list-style: none;
}
.hero-stats li {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.hero-stats strong {
  font-family: var(--font-title);
  font-size: 2.4rem;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 1.8rem;
  width: 26px;
  height: 42px;
  margin-left: -13px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 14px;
}
.scroll-hint span {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--accent-cyan);
  animation: scroll-dot 1.8s var(--ease-out) infinite;
}
@keyframes scroll-dot {
  0% { transform: translateY(0); opacity: 1; }
  80% { transform: translateY(16px); opacity: 0; }
  100% { opacity: 0; }
}

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--border);
  background: linear-gradient(90deg, rgba(47, 168, 220, 0.08), rgba(122, 92, 240, 0.08));
  padding: 1.1rem 0;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 2rem;
  width: max-content;
  animation: marquee 38s linear infinite;
}
.marquee-track span {
  font-family: var(--font-title);
  font-size: clamp(1.1rem, 2.4vw, 1.6rem);
  font-weight: 600;
  white-space: nowrap;
}
.marquee-track i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
  box-shadow: 0 0 12px var(--accent-cyan);
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ---------- Bento de servicios ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 250px;
  gap: 1rem;
}
.bento-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  background: #0c0e24;
  padding: 0 !important;
  display: flex;
  align-items: flex-end;
  isolation: isolate;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.5s var(--ease-out), border-color 0.3s, box-shadow 0.4s;
}
.bento-card.big {
  grid-column: span 2;
  grid-row: span 2;
}
.bento-card.wide {
  grid-column: span 2;
}
.bento-card img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 1.2s var(--ease-out), filter 0.6s;
  filter: saturate(0.9) brightness(0.8);
}
.bento-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, transparent 20%, rgba(7, 8, 26, 0.92) 85%);
}
.bento-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(47, 168, 220, 0.22), transparent 45%);
  opacity: 0;
  transition: opacity 0.3s;
}
.bento-card:hover {
  border-color: rgba(47, 168, 220, 0.5);
  box-shadow: 0 30px 80px rgba(79, 91, 255, 0.25);
}
.bento-card:hover::after {
  opacity: 1;
}
.bento-card:hover img {
  transform: scale(1.12);
  filter: saturate(1.1) brightness(0.9);
}
.bento-body {
  padding: 1.5rem;
}
.bento-body h3 {
  font-family: var(--font-title);
  font-size: 1.3rem;
  margin: 0.3rem 0 0.4rem;
}
.bento-card.big .bento-body h3 {
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
}
.bento-body p {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.95rem;
}
.bento-num {
  font-family: var(--font-title);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  color: var(--accent-cyan);
}

/* ---------- La app en acción ---------- */
.app-show {
  position: relative;
}
.app-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 4rem;
  align-items: center;
}
.app-copy h2 {
  font-family: var(--font-title);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.05;
  margin: 0.6rem 0 1rem;
}
.app-copy > p {
  color: var(--text-muted);
  max-width: 46ch;
}
.app-points {
  list-style: none;
  padding: 0;
  margin: 1.6rem 0 2rem;
  display: grid;
  gap: 0.8rem;
}
.app-points li {
  display: flex;
  gap: 0.7rem;
  align-items: center;
}
.app-points span {
  color: var(--accent-cyan);
}
.app-stage {
  position: relative;
}
.app-frame {
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 40px 120px rgba(79, 91, 255, 0.3), 0 0 0 8px rgba(255, 255, 255, 0.03);
  aspect-ratio: 16 / 9;
  transform: perspective(1200px) rotateY(-8deg) rotateX(3deg);
  transition: transform 0.8s var(--ease-out);
}
.app-stage:hover .app-frame {
  transform: perspective(1200px) rotateY(0) rotateX(0);
}
.app-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.float-chip {
  position: absolute;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  background: rgba(15, 17, 48, 0.78);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
  animation: float 6s ease-in-out infinite;
}
.float-chip b {
  color: var(--accent-cyan);
  margin-right: 0.3rem;
}
.chip-a { top: -18px; left: 8%; }
.chip-b { bottom: 18%; left: -30px; animation-delay: -2s; }
.chip-c { bottom: -18px; right: 6%; animation-delay: -4s; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ---------- Planes con inclinación ---------- */
.plan.tilt {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.5s var(--ease-out), box-shadow 0.4s;
  border-radius: var(--r-xl);
}

/* ---------- Payment chips ---------- */
.payment-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.5rem 0 0;
}
.payment-chips .chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(15, 17, 48, 0.78);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text);
  white-space: nowrap;
}

/* ---------- Marketing ---------- */
.mk-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}
.mk-card {
  position: relative;
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  background: rgba(12, 14, 36, 0.7);
  backdrop-filter: blur(14px);
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  isolation: isolate;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.5s var(--ease-out), border-color 0.3s, box-shadow 0.4s;
}
.mk-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%), rgba(47, 168, 220, 0.18), transparent 50%);
  opacity: 0;
  transition: opacity 0.3s;
}
.mk-card:hover {
  border-color: rgba(47, 168, 220, 0.5);
  box-shadow: 0 30px 80px rgba(79, 91, 255, 0.25);
}
.mk-card:hover::after {
  opacity: 1;
}
.mk-num {
  font-family: var(--font-title);
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(90deg, var(--accent-cyan), var(--indigo) 45%, var(--accent-violet) 75%, var(--mauve));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  margin-bottom: 0.8rem;
}
.mk-card h3 {
  font-family: var(--font-title);
  font-size: 1.2rem;
  margin: 0 0 0.5rem;
}
.mk-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
  flex: 1;
}
.mk-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.mk-metric {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.mk-metric-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
  box-shadow: 0 0 12px var(--accent-cyan);
  flex-shrink: 0;
}

/* ---------- Contacto ---------- */
.contact-form {
  border-radius: var(--r-xl);
}

/* ---------- Botón flotante WhatsApp ---------- */
.wa-float {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 40;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}
.wa-float:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 32px rgba(37, 211, 102, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.15);
}
.wa-float:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 3px;
}
.wa-float svg {
  width: 28px;
  height: 28px;
  color: #fff;
  stroke: #fff;
}
@media (max-width: 600px) {
  .wa-float {
    width: 48px;
    height: 48px;
    right: 1rem;
    bottom: 1rem;
  }
  .wa-float svg {
    width: 24px;
    height: 24px;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .bento {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 220px;
  }
  .app-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .app-frame {
    transform: none;
  }
  .chip-b { left: 4px; }
  .mk-grid {
    grid-template-columns: repeat(2, 1fr);
  }
@media (max-width: 600px) {
  .bento {
    grid-template-columns: 1fr;
  }
  .bento-card.big,
  .bento-card.wide {
    grid-column: span 1;
    grid-row: span 1;
  }
  .bento-card.big {
    grid-row: span 2;
  }
  .hero-stats {
    gap: 1.4rem;
  }
  .hero-stats strong {
    font-size: 1.9rem;
  }
  .float-chip {
    font-size: 0.75rem;
  }
  .cursor-glow {
    display: none;
  }
  .mk-grid {
    grid-template-columns: 1fr;
  }
  .mk-metrics {
    flex-direction: column;
    gap: 0.8rem;
  }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero-video,
  .marquee-track,
  .float-chip,
  .scroll-hint span {
    animation: none !important;
  }
  .split-word > span {
    transform: none;
    opacity: 1;
    transition: none;
  }
  .particles,
  .cursor-glow {
    display: none;
  }
}
