/* modulo-01-landing/styles/main.css */
/* Utilidades personalizadas y texturas premium */

/* 1. Grain/Noise Texture */
.bg-noise {
  position: relative;
  z-index: 0;
  background-color: var(--color-canvas);
}

.bg-noise::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.15;
  background-image: 
    radial-gradient(circle at 2px 2px, rgba(0,0,0,0.05) 1px, transparent 0);
  background-size: 40px 40px;
}

.bg-noise::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -2;
  background: 
    radial-gradient(circle at 0% 0%, rgba(214,38,40,0.03) 0%, transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(0,0,0,0.02) 0%, transparent 50%);
}

/* 2. Ghost Button (Red Security Scanner Effect) */
.btn-ghost-sec {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  font-family: var(--font-body);
  color: var(--color-emphasis);
  background: transparent;
  border: 1px solid rgba(214, 38, 40, 0.4);
  border-radius: var(--radius-md);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.875rem;
}

.btn-ghost-sec::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg, 
    transparent, 
    rgba(214, 38, 40, 0.2), 
    transparent
  );
  transition: all 0.5s ease;
  z-index: -1;
}

.btn-ghost-sec:hover {
  border-color: var(--color-primary);
  box-shadow: 0 0 15px var(--color-primary-glow);
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.btn-ghost-sec:hover::before {
  left: 100%;
}

/* Primary Button (Solid Red) */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  font-weight: 600;
  font-family: var(--font-body);
  color: #fff;
  background-color: var(--color-primary);
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.875rem;
  box-shadow: 0 4px 14px rgba(214, 38, 40, 0.4);
}

.btn-primary:hover {
  background-color: #b91d1f;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(214, 38, 40, 0.6);
}

/* 3. Section Dividers (HUD style) */
.section-hud {
  position: relative;
  border-top: 1px solid var(--color-canvas-border);
}

/* 4. Marquee Infinito (Marcas) */
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.animate-marquee-container {
  display: flex;
  overflow: hidden;
  user-select: none;
  mask-image: linear-gradient(
    to right, 
    transparent, 
    black 10%, 
    black 90%, 
    transparent
  );
  -webkit-mask-image: -webkit-linear-gradient(left, transparent, black 10%, black 90%, transparent);
}

.animate-marquee-content {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-around;
  min-width: 200%;
  animation: marquee 30s linear infinite;
}

.brand-logo {
  filter: grayscale(0%) brightness(1);
  opacity: 0.75;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  max-width: 140px;
  max-height: 48px;
  object-fit: contain;
  margin: 0 2.5rem;
}

.brand-logo:hover {
  opacity: 1;
  transform: scale(1.05);
}

/* 5. Navigation Scroll State (Premium Control) */
#navbar {
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  background: transparent;
  border-bottom: 1px solid transparent;
}

#navbar.navbar-scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
  padding: 0.75rem 0;
}

#navbar a {
  color: var(--color-text-main);
  transition: color 0.3s ease;
}

#navbar a:hover {
  color: var(--color-primary);
}

/* 6. Utilidades de Animación de Entrada (Scroll Reveal) */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Retrasos escalonados */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }

/* ═══════════════════════════════════════════════════════
   7. HERO — Antigravity Radical Hierarchy
   ═══════════════════════════════════════════════════════ */

/* Background Auroras Fluid Movement */
.animate-aurora-1 { animation: auroraFlow1 18s ease-in-out infinite alternate; }
.animate-aurora-2 { animation: auroraFlow2 22s ease-in-out infinite alternate-reverse; }
.animate-aurora-3 { animation: auroraFlow3 25s ease-in-out infinite alternate; }

@keyframes auroraFlow1 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(15%, 10%) scale(1.1); }
  100% { transform: translate(-5%, 20%) scale(0.9); }
}
@keyframes auroraFlow2 {
  0% { transform: translate(0, 0) scale(0.9); }
  50% { transform: translate(-10%, -15%) scale(1.05); }
  100% { transform: translate(10%, -5%) scale(1.15); }
}
@keyframes auroraFlow3 {
  0% { transform: translate(0, 0) scale(1.1); }
  50% { transform: translate(5%, -20%) scale(0.95); }
  100% { transform: translate(-15%, 15%) scale(1); }
}

/* Levitación de Grupo: Transmite tecnología y ligereza */
.antigravity-levitation-group {
  animation: groupLevitate 10s cubic-bezier(0.45, 0, 0.55, 1) infinite;
  will-change: transform;
}

@keyframes groupLevitate {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-30px); }
}

/* Escala Elástica: Entrada con impacto orgánico */
.animate-elastic-scale {
  animation: elasticScale 1.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes elasticScale {
  0% { transform: scale(0.6); opacity: 0; filter: blur(10px); }
  60% { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; filter: blur(0); }
}

/* Fade-in Retardado: Soporte visual elegante */
.animate-fade-in-delayed {
  animation: fadeInDelayed 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.8s both;
}

@keyframes fadeInDelayed {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 0.6; transform: translateY(0); }
}

/* Logo: Glassy Fade In (Antigravity Style) */
.hero-logo-entrance {
  animation: heroLogoSoftIn 2s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

@keyframes heroLogoSoftIn {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.9);
    filter: blur(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* Title Lines: Blur + Translate Reveal (Ultra Premium) */
.hero-text-blur {
  display: block;
  animation: blurReveal 1.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-delay-1 { animation-delay: 0.4s; }
.hero-delay-2 { animation-delay: 0.6s; }
.hero-delay-3 { animation-delay: 0.8s; }

@keyframes blurReveal {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
    filter: blur(12px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* Subtitle & CTAs: Gentle float up */
.hero-subtitle {
  animation: heroFloatUp 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) 1.1s both;
}

.hero-ctas {
  animation: heroFloatUp 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) 1.3s both;
}

@keyframes heroFloatUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ═══════════════════════════════════════════════════════
   8. HERO — Floating Icons (Spring/Float Simulation)
   ═══════════════════════════════════════════════════════ */

@keyframes floatIcon {
  0% { transform: translateY(0) translateX(0) rotate(0); }
  25% { transform: translateY(-8px) translateX(6px) rotate(5deg); }
  50% { transform: translateY(0) translateX(0) rotate(0); }
  75% { transform: translateY(8px) translateX(-6px) rotate(-5deg); }
  100% { transform: translateY(0) translateX(0) rotate(0); }
}

.animate-float-icon-1 { animation: floatIcon 6s ease-in-out infinite alternate; }
.animate-float-icon-2 { animation: floatIcon 8s ease-in-out infinite alternate-reverse; }
.animate-float-icon-3 { animation: floatIcon 5s ease-in-out infinite alternate; }
.animate-float-icon-4 { animation: floatIcon 7s ease-in-out infinite alternate-reverse; }

/* ═══════════════════════════════════════════════════════
   9. HERO — Animated Shiny Text
   ═══════════════════════════════════════════════════════ */

.text-shiny-animated {
  background: linear-gradient(90deg, #2c2c2c 0%, #ffffff 50%, #2c2c2c 100%);
  background-size: 200% auto;
  color: transparent !important;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shinyText 4s ease-in-out infinite alternate;
  transition: text-shadow 0.3s ease;
}

.text-shiny-animated:hover {
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

@keyframes shinyText {
  0% { background-position: 0% 0%; }
  100% { background-position: 100% 0%; }
}
