/* =========================================================
   CLOUD-TECNOLOGIES — index.css
   Animaciones del Hero y utilidades globales de página
   ========================================================= */

body {
  overflow-x: hidden;
  font-family: 'Hanken Grotesk', sans-serif;
  background-color: var(--ct-bg-dark);
}

.main-content {
  position: relative;
}

/* =========================================================
   1. HERO — Overlay con gradiente premium
   ========================================================= */
.hero-overlay {
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.88) 0%,
    rgba(10, 10, 15, 0.72) 50%,
    rgba(234, 88, 12, 0.10) 100%
  );
}

/* =========================================================
   2. CYBERSECURITY GRID — Malla animada de fondo
   ========================================================= */
.hero-grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(234, 88, 12, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(234, 88, 12, 0.05) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridPulse 4s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes gridPulse {
  0%, 100% { opacity: 0.6; }
  50%       { opacity: 1; }
}

/* =========================================================
   3. TEXT REVEAL — Clip-path de izquierda a derecha
   ========================================================= */
@keyframes textReveal {
  from {
    clip-path: inset(0 100% 0 0);
    opacity: 0;
  }
  to {
    clip-path: inset(0 0% 0 0);
    opacity: 1;
  }
}

.text-reveal {
  animation: textReveal 0.85s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.text-reveal-delay-1 { animation-delay: 150ms; }
.text-reveal-delay-2 { animation-delay: 300ms; }
.text-reveal-delay-3 { animation-delay: 450ms; }

/* =========================================================
   4. BOUNCE IN (originales — mantenidas)
   ========================================================= */
@keyframes bounceInLeft {
  0%   { opacity: 0; transform: translateX(-50px); }
  60%  { opacity: 1; transform: translateX(10px); }
  80%  { transform: translateX(-5px); }
  100% { transform: translateX(0); }
}

@keyframes bounceInRight {
  0%   { opacity: 0; transform: translateX(50px); }
  60%  { opacity: 1; transform: translateX(-10px); }
  80%  { transform: translateX(5px); }
  100% { transform: translateX(0); }
}

.bounce-in-left {
  animation: bounceInLeft 0.9s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.bounce-in-right {
  animation: bounceInRight 0.9s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  animation-delay: 150ms;
  opacity: 0;
}

/* =========================================================
   5. FLOAT — Flotación suave para elementos decorativos
   ========================================================= */
@keyframes floatY {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-12px); }
}

.float-anim {
  animation: floatY 3s ease-in-out infinite;
}

/* =========================================================
   6. GLOW PULSE — Para logo y CTAs
   ========================================================= */
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 10px rgba(234, 88, 12, 0.30); }
  50%       { box-shadow: 0 0 28px rgba(234, 88, 12, 0.65); }
}

.glow-pulse {
  animation: glowPulse 2.5s ease-in-out infinite;
}

/* =========================================================
   7. SHIMMER — Efecto destello en botones al hover
   ========================================================= */
@keyframes shimmer {
  from { background-position: -200% center; }
  to   { background-position:  200% center; }
}

.btn-shimmer {
  background: linear-gradient(
    90deg,
    var(--ct-orange) 0%,
    var(--ct-orange-light) 50%,
    var(--ct-orange) 100%
  );
  background-size: 200% auto;
  transition: background-position 0.4s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.btn-shimmer:hover {
  animation: shimmer 1.5s linear infinite;
  box-shadow: 0 8px 28px rgba(234, 88, 12, 0.50);
  transform: translateY(-2px);
}

/* =========================================================
   8. SCROLL INDICATOR — Flecha pulsante en el hero
   ========================================================= */
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 10;
  cursor: pointer;
}

.text-heroic {
  font-size: clamp(2rem, 3.8vw, 4.2rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 24px rgba(0,0,0,0.45);
}

.scroll-indicator span {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(241, 240, 238, 0.5);
}

.scroll-indicator-arrow {
  width: 28px;
  height: 28px;
  border-right: 2px solid rgba(234, 88, 12, 0.7);
  border-bottom: 2px solid rgba(234, 88, 12, 0.7);
  transform: rotate(45deg);
  animation: scrollBounce 1.6s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: rotate(45deg) translateY(0); opacity: 0.6; }
  50%       { transform: rotate(45deg) translateY(6px); opacity: 1; }
}

/* =========================================================
   9. HERO GLASSMORPHISM FORM — Premium
   ========================================================= */
.hero-form-glass {
  background: rgba(10, 12, 20, 0.72);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(234, 88, 12, 0.30);
  border-radius: 20px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255,255,255,0.06);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.hero-form-glass:hover {
  border-color: rgba(234, 88, 12, 0.55);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(234, 88, 12, 0.15),
    inset 0 1px 0 rgba(255,255,255,0.08);
}

/* Inputs premium con fondo oscuro y borde sutil */
.input-underline {
  background: rgba(255,255,255,0.05) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  border-radius: 10px !important;
  color: #f1f5f9 !important;
  padding: 10px 14px !important;
  font-size: 0.875rem !important;
  width: 100%;
  transition:
    border-color 0.25s ease,
    background   0.25s ease,
    box-shadow   0.25s ease !important;
}

.input-underline::placeholder {
  color: rgba(148, 163, 184, 0.65) !important;
  font-size: 0.85rem !important;
}

.input-underline:focus {
  outline: none !important;
  background: rgba(234, 88, 12, 0.08) !important;
  border-color: var(--ct-orange) !important;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.18) !important;
}

/* =========================================================
   10. CARRUSEL — hover scale (original)
   ========================================================= */
.carousel-track img:hover {
  transform: scale(1.1) rotate(10deg);
}

/* =========================================================
   11. FADE IN UP (fade de hero badge)
   ========================================================= */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
  animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.fade-in-up-d1 { animation-delay: 100ms; }
.fade-in-up-d2 { animation-delay: 250ms; }
.fade-in-up-d3 { animation-delay: 400ms; }
.fade-in-up-d4 { animation-delay: 550ms; }

/* =========================================================
   12. HERO — Animaciones de entrada (sin scroll observer)
   ========================================================= */
@keyframes heroSlideLeft {
  from { opacity: 0; transform: translateX(-50px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes heroSlideRight {
  from { opacity: 0; transform: translateX(50px); }
  to   { opacity: 1; transform: translateX(0); }
}

.hero-slide-left {
  animation: heroSlideLeft 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

.hero-slide-right {
  animation: heroSlideRight 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.4s both;
}

/* =========================================================
   12. PREFERS-REDUCED-MOTION — Accesibilidad
   ========================================================= */
/* =========================================================
   13. PRELOADER
   ========================================================= */
#ct-preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #0a0a0f;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}
#ct-preloader.fade-out {
  opacity: 0;
  visibility: hidden;
}
.ct-preloader-logo {
  height: 64px;
  width: auto;
  filter: brightness(0) invert(1);
  margin-bottom: 28px;
  animation: preloaderPulse 1.6s ease-in-out infinite;
}
@keyframes preloaderPulse {
  0%, 100% { opacity: 0.6; transform: scale(0.97); }
  50%       { opacity: 1;   transform: scale(1); }
}
.ct-preloader-bar {
  width: 200px;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
}
.ct-preloader-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--ct-orange), var(--ct-orange-light));
  border-radius: 2px;
  animation: preloaderLoad 1.1s cubic-bezier(0.4, 0, 0.2, 1) 0.1s forwards;
}
@keyframes preloaderLoad {
  from { width: 0; }
  to   { width: 100%; }
}

/* =========================================================
   14. TYPEWRITER CURSOR
   ========================================================= */
.typewriter-cursor {
  display: inline-block;
  color: var(--ct-orange);
  font-weight: 900;
  animation: cursorBlink 0.85s ease-in-out infinite;
  margin-left: 1px;
}
@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* =========================================================
   15. CTA SECTION ANTES DEL FOOTER
   ========================================================= */
.ct-cta-section {
  background: linear-gradient(180deg, #ffffff 0%, #f8f7f5 60%, #fff8f4 100%);
  position: relative;
  overflow: hidden;
}
.ct-cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 20% 50%, rgba(234, 88, 12, 0.07) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 80% 50%, rgba(249, 115, 22, 0.04) 0%, transparent 70%);
  pointer-events: none;
}
.ct-cta-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

/* =========================================================
   13. reCAPTCHA — Ocultar badge flotante (funcionalidad activa)
   ========================================================= */
.grecaptcha-badge {
  visibility: hidden !important;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero-grid-overlay {
    animation: none;
    opacity: 0.5;
  }

  .scroll-indicator-arrow {
    animation: none;
    opacity: 0.7;
  }

  .float-anim,
  .glow-pulse {
    animation: none;
  }

  .btn-shimmer:hover {
    animation: none;
  }
}