/* =============================================
   VANISUR — css/scroll-fx.css
   Capa de mejora: scroll-driven motion + holo purple/blue fade
   Cargá DESPUÉS de css/style.css.
   ============================================= */

/* Tipografía premium: Space Grotesk (body) + Bebas Neue ya cargado */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

:root {
  /* === Holo palette — púrpura / azul === */
  --holo-1: #7c3aed;
  --holo-2: #a78bfa;
  --holo-3: #60a5fa;
  --holo-4: #3b82f6;
  --holo-5: #8b5cf6;

  /* JS pinta esta var en cada scroll tick */
  --holo: #a78bfa;
  --holo-rgb: 167, 139, 250;

  /* Fondo del sitio */
  --bg-shift: #07070a;
}

/* Conecta el púrpura/azul al sistema de variables de la página */
:root {
  --blue:    var(--holo);
  --blue2:   var(--holo);
  --borderA: rgba(var(--holo-rgb), 0.28);
  --borderC: rgba(var(--holo-rgb), 0.14);
  --glow-b:  rgba(var(--holo-rgb), 0.40);
  --glow-v:  rgba(var(--holo-rgb), 0.28);
}

/* Tipografía: actualizo body de forma global, sin tocar style.css */
body {
  background-color: var(--bg-shift);
  font-family: 'Space Grotesk', 'Outfit', system-ui, sans-serif;
  transition: background-color 800ms ease;
  letter-spacing: -0.005em;
}

/* === BOTONES BLANCOS preservados con halo holo =============== */
.btn-primary,
.plan-btn-featured,
.nav-cta {
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.4s ease,
              background-color 0.3s ease, color 0.3s ease;
}
.btn-primary:hover,
.plan-btn-featured:hover,
.nav-cta:hover {
  box-shadow: 0 14px 44px -12px rgba(var(--holo-rgb), 0.65),
              0 0 0 2px rgba(var(--holo-rgb), 0.42);
}

/* === Texto holográfico animado ============================== */
.holo-text,
.section-title .g,
.stats-title .g,
.hero h1 em,
.hero-em {
  background: linear-gradient(
    100deg,
    var(--holo-1) 0%,
    var(--holo-2) 18%,
    var(--holo-3) 38%,
    var(--holo-4) 58%,
    var(--holo-2) 78%,
    var(--holo-1) 100%
  ) !important;
  background-size: 220% 100% !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
  animation: holoSlide 6s ease-in-out infinite;
  display: inline-block;
  filter: drop-shadow(0 0 18px rgba(var(--holo-rgb), 0.35))
          drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
  text-shadow: none !important;
}
/* Hero em entra con su propio fade-up (su texto no se parte en chars) */
.hero h1 em,
.hero-em {
  opacity: 0;
  transform: translateY(40px);
  animation:
    holoSlide 6s ease-in-out infinite,
    heroEmIn 0.9s 0.6s cubic-bezier(.2,.7,.2,1) forwards;
}
@keyframes heroEmIn {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes holoSlide {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* === HERO ==================================================== */
.hero h1 .vfx-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(110%);
  animation: vfxCharIn 0.85s cubic-bezier(.2,.7,.2,1) forwards;
}
@keyframes vfxCharIn {
  to { opacity: 1; transform: translateY(0); }
}
.hero-dashboard {
  transition: transform 0.4s cubic-bezier(.2,.7,.2,1);
  will-change: transform;
}

/* === MARQUEE distort ======================================== */
.marquee {
  transition: transform 0.3s cubic-bezier(.2,.7,.2,1);
  will-change: transform;
}
.marquee-item:nth-child(3n+1) { color: var(--holo); }

/* === KINETIC CROSS — gigante atravesando ==================== */
.kinetic-cross {
  position: relative;
  padding: 84px 0;
  overflow: hidden;
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: #07070a;
}
.kinetic-cross-track {
  display: flex;
  gap: 64px;
  white-space: nowrap;
  font-family: 'Bebas Neue', 'Space Grotesk', sans-serif;
  font-size: clamp(64px, 12vw, 180px);
  line-height: 0.9;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  will-change: transform;
}
.kc-item {
  display: inline-flex; align-items: center; gap: 48px;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255,255,255,0.42);
}
.kc-item.solid {
  color: transparent;
  background: linear-gradient(100deg, var(--holo-1), var(--holo-3), var(--holo-4), var(--holo-2));
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-stroke: 0;
  animation: holoSlide 6s ease-in-out infinite;
  filter: drop-shadow(0 0 24px rgba(var(--holo-rgb), 0.4));
}
.kc-item::after {
  content: "✦";
  font-size: 0.4em;
  color: var(--holo);
  -webkit-text-stroke: 0;
}

/* === PORTFOLIO ============================================== */
.portfolio-grid {
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.portfolio-grid::-webkit-scrollbar { display: none; }

.slide {
  scroll-snap-align: center;
  position: relative;
  transition: transform 0.7s cubic-bezier(.2,.7,.2,1);
  will-change: transform;
}
.slide.in-vp { transform: scale(1.0); }
.slide:not(.in-vp) { transform: scale(0.94); }

.slide-front img {
  transition: transform 0.8s cubic-bezier(.2,.7,.2,1),
              filter 0.6s ease;
  will-change: transform;
}
.slide:hover .slide-front img {
  transform: scale(1.06);
  filter: saturate(1.15) brightness(1.05);
}
.slide::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: 0 0 0 0 rgba(var(--holo-rgb), 0);
  transition: box-shadow 0.6s ease;
}
.slide.in-vp::after {
  box-shadow: 0 30px 80px -30px rgba(var(--holo-rgb), 0.45),
              inset 0 0 0 1px rgba(var(--holo-rgb), 0.18);
}

/* === REVEAL con stagger ===================================== */
.stat-3d,
.svc-card,
.saas-card,
.plan-card {
  transition: transform 0.6s cubic-bezier(.2,.7,.2,1),
              opacity 0.6s ease,
              border-color 0.5s ease,
              box-shadow 0.5s ease;
  will-change: transform, opacity;
}
.svc-card:hover,
.saas-card:hover {
  border-color: rgba(var(--holo-rgb), 0.5);
}

[data-vfx-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s cubic-bezier(.2,.7,.2,1),
              transform 0.9s cubic-bezier(.2,.7,.2,1);
}
[data-vfx-reveal].in {
  opacity: 1;
  transform: translateY(0);
}


/* === MOBILE — comodidad de navegación ======================= */
@media (max-width: 720px) {
  /* tipografía proporcional y respiración */
  .hero h1 { font-size: clamp(44px, 12vw, 72px) !important; line-height: 0.95; }
  .hero-sub { font-size: 16px !important; line-height: 1.5; }
  .section-title { font-size: clamp(36px, 9vw, 56px) !important; line-height: 0.95; }
  .stats-title { font-size: clamp(36px, 8vw, 56px) !important; }

  /* trust stats apilados con más aire */
  .hero-trust { flex-wrap: wrap; gap: 16px !important; justify-content: flex-start; }
  .trust-sep { display: none; }

  /* CTAs anchos para tocar fácil */
  .hero-btns { flex-direction: column; align-items: stretch; gap: 12px; }
  .hero-btns .btn-primary,
  .hero-btns .btn-ghost { width: 100%; justify-content: center; padding: 16px 22px; font-size: 16px; }

  /* botones de planes a ancho completo */
  .plan-btn,
  .plan-btn-featured,
  .saas-cta { width: 100%; text-align: center; }

  /* kinetic cross más chico */
  .kinetic-cross { padding: 56px 0; }
  .kinetic-cross-track { font-size: clamp(48px, 12vw, 96px); gap: 36px; }

  /* portfolio: slides más cómodos en touch */
  .slide { min-width: 86vw; }

  /* badges de planes legibles */
  .badge-popular { font-size: 11px; padding: 5px 10px; }
}

@media (max-width: 480px) {
  /* nav 80px + marquee ~34px + aire = necesita al menos 120px
     96px causaba que el eyebrow quedara tapado por el marquee fijo */
  .hero { padding-top: 128px; }
  .marquee-wrap { font-size: 12px; }
  .hero-eyebrow { font-size: 11px; }
}

/* === REDUCED MOTION ========================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
