/* ==========================================================================
   AGROLIF — APPLE MINIMALIST DESIGN SYSTEM (LIGHT PREDOMINANT & DARK PRO)
   Tecnología de Inteligencia Hídrica y Riego Autónomo
   Colores: Blanco Predominante + Verde Vida + Azul Eléctrico
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* PERMANENT DARK PRO THEME (APPLE MINIMALIST) */
  color-scheme: dark;
  --canvas-bg: #07080a;
  --canvas-subtle: #0d1017;
  --surface-card: #121620;
  --surface-card-hover: #161c28;
  --surface-glass: rgba(7, 8, 10, 0.85);
  
  --text-primary: #f5f5f7;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.08);
  --card-shadow: 0 8px 32px -4px rgba(0, 0, 0, 0.6);
  --card-shadow-hover: 0 20px 48px -8px rgba(0, 0, 0, 0.8), 0 0 30px -10px rgba(0, 230, 118, 0.15);
  
  /* BRAND COLORS */
  --verde-vida: #00e676;
  --verde-vida-hover: #0df883;
  --verde-vida-glow: rgba(0, 230, 118, 0.35);
  --verde-vida-tint: rgba(0, 230, 118, 0.12);

  --azul-electrico: #2997ff;
  --azul-electrico-hover: #0071e3;
  --azul-electrico-glow: rgba(41, 151, 255, 0.35);
  --azul-electrico-tint: rgba(41, 151, 255, 0.12);

  --radius-card: 28px;
  --radius-pill: 9999px;
  --nav-height: 52px;
}

/* DARK MODE (APPLE PRO DARK — ACTIVADO CON BOTÓN O CLASE .dark) */
html.dark {
  --canvas-bg: #07080a;
  --canvas-subtle: #0d1017;
  --surface-card: #121620;
  --surface-card-hover: #161c28;
  --surface-glass: rgba(14, 17, 24, 0.82);
  
  --text-primary: #f5f5f7;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.08);
  --card-shadow: 0 8px 32px -4px rgba(0, 0, 0, 0.6);
  --card-shadow-hover: 0 20px 48px -8px rgba(0, 0, 0, 0.8), 0 0 30px -10px rgba(0, 230, 118, 0.15);
  
  --verde-vida: #00e676;
  --verde-vida-hover: #0df883;
  --verde-vida-glow: rgba(0, 230, 118, 0.35);
  --verde-vida-tint: rgba(0, 230, 118, 0.12);

  --azul-electrico: #2997ff;
  --azul-electrico-hover: #0071e3;
  --azul-electrico-glow: rgba(41, 151, 255, 0.35);
  --azul-electrico-tint: rgba(41, 151, 255, 0.12);
}

/* Base typography & resets (Apple Neutral & Pure System) */
html {
  overflow-x: hidden;
  scroll-behavior: smooth;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", -apple-system-font, "Helvetica Neue", Helvetica, Arial, sans-serif;
  background-color: var(--canvas-bg);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  transition: background-color 0.4s ease, color 0.4s ease;
}

body {
  overflow-x: hidden;
  font-family: inherit;
  background-color: var(--canvas-bg);
  color: var(--text-primary);
  transition: background-color 0.4s ease, color 0.4s ease;
}

::selection {
  background: var(--verde-vida-glow);
  color: var(--text-primary);
}

/* Apple Typography Hierarchy */
.tracking-apple-hero {
  letter-spacing: -0.035em;
}

.tracking-apple-headline {
  letter-spacing: -0.025em;
}

.tracking-apple-body {
  letter-spacing: -0.015em;
}

/* Pure Apple Numerical Alignment (Tabular Figures) */
.tabular-nums, .font-mono, .font-mono-tech {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* Secondary Monospace (Used exclusively for raw RF LoRa packet terminal) */
.font-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Apple Text Gradients */
.text-gradient-title {
  background: linear-gradient(180deg, #1d1d1f 0%, #434344 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

html.dark .text-gradient-title {
  background: linear-gradient(180deg, #ffffff 0%, #a1a1a6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-brand {
  background: linear-gradient(90deg, var(--verde-vida) 0%, var(--azul-electrico) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Navigation Bar */
.apple-nav {
  height: var(--nav-height);
  background: var(--surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Pill Buttons */
.pill-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--verde-vida);
  color: #ffffff;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
  padding: 11px 24px;
  border-radius: var(--radius-pill);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 16px var(--verde-vida-glow);
}

html.dark .pill-btn-primary {
  color: #07080a;
}

.pill-btn-primary:hover {
  transform: translateY(-1px) scale(1.02);
  background-color: var(--verde-vida-hover);
  box-shadow: 0 6px 22px var(--verde-vida-glow);
}

.pill-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: transparent;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.01em;
  padding: 11px 24px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.pill-btn-secondary:hover {
  background-color: var(--canvas-subtle);
  border-color: var(--azul-electrico);
  color: var(--azul-electrico);
  transform: translateY(-1px);
}

.pill-btn-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--verde-vida);
  color: #ffffff;
  font-weight: 600;
  font-size: 12px;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  transition: all 0.2s ease;
  box-shadow: 0 2px 10px var(--verde-vida-glow);
}

html.dark .pill-btn-nav {
  color: #07080a;
}

.pill-btn-nav:hover {
  background-color: var(--verde-vida-hover);
  transform: scale(1.03);
}

/* Theme Toggle Button */
.theme-toggle-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--canvas-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.25s ease;
}

.theme-toggle-btn:hover {
  background-color: var(--verde-vida-tint);
  border-color: var(--verde-vida);
  transform: rotate(15deg);
}

/* Apple Bento Cards */
.bento-card {
  background-color: var(--surface-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.bento-card:hover {
  box-shadow: var(--card-shadow-hover);
  border-color: rgba(0, 168, 84, 0.3);
  transform: translateY(-3px);
}

/* Subtle Stage Backgrounds */
.stage-subtle {
  background-color: var(--canvas-subtle);
  border-radius: var(--radius-card);
  border: 1px solid var(--border-subtle);
}

/* Pulsing Status Dot */
.pulsing-dot {
  position: relative;
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--verde-vida);
}

.pulsing-dot::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--verde-vida-glow);
  animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.5); opacity: 0.9; }
  80%, 100% { transform: scale(2.2); opacity: 0; }
}

/* Radio waves for LiRed Mesh */
@keyframes meshWave {
  0% { r: 6; opacity: 0.9; stroke-width: 2; }
  100% { r: 54; opacity: 0; stroke-width: 0.5; }
}

.wave-animation {
  animation: meshWave 2.8s cubic-bezier(0.1, 0.8, 0.3, 1) infinite;
}

.wave-delay-1 { animation-delay: 0.7s; }
.wave-delay-2 { animation-delay: 1.4s; }

/* Device Mockup Shells */
.macbook-frame {
  border: 10px solid #1c2028;
  border-bottom: 18px solid #1c2028;
  border-radius: 18px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.08);
  background-color: #0b0d11;
  position: relative;
}

html.dark .macbook-frame {
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.ipad-frame {
  border: 12px solid #181b22;
  border-radius: 32px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.08);
  background-color: #0b0d11;
}

.iphone-frame {
  border: 9px solid #1a1e27;
  border-radius: 40px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(0, 0, 0, 0.08);
  background-color: #0b0d11;
  position: relative;
}

.iphone-island {
  position: absolute;
  top: 9px;
  left: 50%;
  transform: translateX(-50%);
  width: 78px;
  height: 20px;
  background-color: #07080a;
  border-radius: 20px;
  z-index: 20;
}

/* Custom Range Slider */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: #e5e5ea;
  border-radius: 3px;
  outline: none;
  transition: background 0.3s;
}

html.dark input[type="range"] {
  background: #1e2430;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--verde-vida);
  cursor: pointer;
  box-shadow: 0 0 12px var(--verde-vida-glow);
  transition: transform 0.15s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

/* Modal Backdrop */
.modal-backdrop {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

html.dark .modal-backdrop {
  background: rgba(4, 5, 7, 0.85);
  backdrop-filter: blur(28px);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 7px;
}

::-webkit-scrollbar-track {
  background: var(--canvas-bg);
}

::-webkit-scrollbar-thumb {
  background: #d1d1d6;
  border-radius: 4px;
}

html.dark ::-webkit-scrollbar-thumb {
  background: #1e2430;
}

::-webkit-scrollbar-thumb:hover {
  background: #a1a1a6;
}

html.dark ::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* ==========================================================================
   BUTTON ATTENTION PULSE (EVERY 3 SECONDS) & HOVER EXPANSION
   ========================================================================== */
@keyframes btnPulse3s {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 5px 18px rgba(41, 151, 255, 0.28);
  }
  8% {
    transform: scale(1.06);
    box-shadow: 0 10px 28px rgba(41, 151, 255, 0.55);
  }
  16% {
    transform: scale(1.015);
    box-shadow: 0 6px 20px rgba(41, 151, 255, 0.32);
  }
  24% {
    transform: scale(1.045);
    box-shadow: 0 8px 24px rgba(41, 151, 255, 0.45);
  }
  32%, 88% {
    transform: scale(1);
    box-shadow: 0 5px 18px rgba(41, 151, 255, 0.28);
  }
}

.btn-pulse-3s {
  animation: btnPulse3s 3s cubic-bezier(0.34, 1.56, 0.64, 1) infinite;
  transform-origin: center center;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, background-color 0.2s ease;
  will-change: transform, box-shadow;
}

.btn-pulse-3s:hover {
  animation-play-state: paused;
  transform: scale(1.07) !important;
  box-shadow: 0 14px 40px rgba(41, 151, 255, 0.65) !important;
}

.btn-pulse-3s:active {
  transform: scale(1.03) !important;
}

html.dark .btn-pulse-3s {
  box-shadow: 0 6px 24px rgba(41, 151, 255, 0.45);
}

/* ==========================================================================
   ANIMACIÓN CINEMATOGRÁFICA HERO — SECUENCIA FLUIDA, ORGÁNICA Y ELEGANTE
   Orquestación al entrar o recargar la página (corta, breve y refinada):
   Paso 1: Iluminación verde (Bloom orgánico inicial 0.04s)
   Paso 2: Imagen de la plataforma (Emerge desde el aura verde 0.22s)
   Paso 3: Título, subtítulo, botón CTA y llamadas de impacto (0.46s - 1.15s)
   Duración total cinemática: 2.0s | Curva oficial Apple: cubic-bezier(0.16, 1, 0.3, 1)
   ========================================================================== */
@keyframes heroGlowBloom {
  0% {
    opacity: 0;
    transform: scale3d(0.85, 0.85, 1);
  }
  100% {
    opacity: 1;
    transform: scale3d(1, 1, 1);
  }
}

@keyframes heroPlatformRise {
  0% {
    opacity: 0;
    transform: translate3d(0, 18px, 0) scale3d(0.98, 0.98, 1);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale3d(1, 1, 1);
  }
}

@keyframes heroTextGlide {
  0% {
    opacity: 0;
    transform: translate3d(0, 12px, 0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

/* ==========================================================================
   SECUENCIA HERO: TEXTOS -> PLATAFORMA -> BOTÓN CTA AL FINAL (2.0s TOTAL)
   1. Primero: Destello verde (Bloom de atmósfera)
   2. Segundo: Textos juntos (Titular "El poder del riego inteligente" + Subtítulo)
   3. Tercero: Imagen de la plataforma AgroLIF y columnas de impacto
   4. Cuarto (ÚLTIMO): Botón "Reservar acceso prioritario"
   ========================================================================== */

/* Paso 1: Destello verde (0.05s - 0.90s) */
.hero-seq-glow {
  animation: heroGlowBloom 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.05s both;
  will-change: transform, opacity;
  transform-origin: center top;
}

/* Paso 2: Textos juntos (0.35s - 1.10s) */
.hero-seq-title {
  animation: heroTextGlide 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both;
  will-change: transform, opacity;
}

.hero-seq-subtitle {
  animation: heroTextGlide 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both;
  will-change: transform, opacity;
}

/* Paso 3: Imagen de la plataforma y columnas de impacto (0.85s - 1.60s) */
.hero-seq-platform {
  animation: heroPlatformRise 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.85s both;
  will-change: transform, opacity;
  transform-origin: center center;
  backface-visibility: hidden;
}

.hero-seq-callouts {
  animation: heroTextGlide 0.65s cubic-bezier(0.16, 1, 0.3, 1) 1.05s both;
  will-change: transform, opacity;
}

/* Paso 4 (ÚLTIMO EN APARECER): Botón "Reservar acceso prioritario" (1.40s - 2.00s) */
.hero-seq-cta {
  animation: heroTextGlide 0.60s cubic-bezier(0.16, 1, 0.3, 1) 1.40s both;
  will-change: transform, opacity;
}

@keyframes appleSmoothEntry {
  0% {
    opacity: 0;
    transform: translate3d(0, 10px, 0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes appleNavFade {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.apple-enter {
  animation: appleSmoothEntry 0.65s cubic-bezier(0.16, 1, 0.3, 1) both;
  will-change: transform, opacity;
  backface-visibility: hidden;
}

.apple-nav-enter {
  animation: appleNavFade 0.65s cubic-bezier(0.16, 1, 0.3, 1) both;
  will-change: opacity;
}

/* Micro-despliegue en Scroll ligero para secciones posteriores */
.reveal-on-scroll {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

/* Entrada delicada solo si JS inicializó scroll reveal */
.js-scroll-active .reveal-on-scroll:not(.is-revealed) {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
}

.reveal-on-scroll.is-revealed {
  opacity: 1 !important;
  transform: translate3d(0, 0, 0) !important;
}

@media (prefers-reduced-motion: reduce) {
  .hero-seq-glow,
  .hero-seq-platform,
  .hero-seq-title,
  .hero-seq-subtitle,
  .hero-seq-cta,
  .hero-seq-callouts,
  .apple-enter,
  .apple-nav-enter,
  .reveal-on-scroll {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}


/* ==========================================================================
   LI-RED INTERACTIVE MESH & HYDRAULIC SIMULATION STYLES
   ========================================================================== */
@keyframes liredWaterFlow {
  from {
    stroke-dashoffset: 40;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes liredRfPulse {
  0% {
    r: 12px;
    opacity: 0.9;
    stroke-width: 2.5px;
  }
  50% {
    opacity: 0.45;
    stroke-width: 1.8px;
  }
  100% {
    r: 155px;
    opacity: 0;
    stroke-width: 0.5px;
  }
}

@keyframes liredWifiWave {
  0% {
    opacity: 0.25;
    transform: scale(0.9);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
  }
  100% {
    opacity: 0.25;
    transform: scale(0.9);
  }
}

@keyframes liredCloudGlow {
  0%, 100% {
    filter: drop-shadow(0 0 14px rgba(56, 189, 248, 0.45));
  }
  50% {
    filter: drop-shadow(0 0 26px rgba(41, 151, 255, 0.8));
  }
}

@keyframes liredDataBeam {
  0% {
    stroke-dashoffset: 48;
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 0.35;
  }
}

@keyframes liredPulsePacket {
  0%, 100% {
    r: 4.5px;
    opacity: 0.7;
  }
  50% {
    r: 7px;
    opacity: 1;
    filter: drop-shadow(0 0 8px #00e676);
  }
}

.lired-water-active {
  animation: liredWaterFlow 1s linear infinite !important;
  stroke: url(#liredWaterGrad) !important;
  opacity: 1 !important;
}

.lired-water-stopped {
  stroke-dasharray: none !important;
  animation: none !important;
  stroke: #1e293b !important;
  opacity: 0.22 !important;
  transition: all 0.5s ease;
}

.lired-rf-wave-1 {
  animation: liredRfPulse 3.2s cubic-bezier(0.25, 1, 0.5, 1) infinite;
  transform-origin: 500px 175px;
}
.lired-rf-wave-2 {
  animation: liredRfPulse 3.2s cubic-bezier(0.25, 1, 0.5, 1) 1.05s infinite;
  transform-origin: 500px 175px;
}
.lired-rf-wave-3 {
  animation: liredRfPulse 3.2s cubic-bezier(0.25, 1, 0.5, 1) 2.1s infinite;
  transform-origin: 500px 175px;
}

.lired-wifi-wave {
  animation: liredWifiWave 1.8s ease-in-out infinite;
  transform-origin: center;
}

.lired-cloud-pulsing {
  animation: liredCloudGlow 3.5s ease-in-out infinite;
}

.lired-beam-active {
  animation: liredDataBeam 0.9s linear infinite;
}

.lired-packet-pulsing {
  animation: liredPulsePacket 1.5s ease-in-out infinite;
}


/* ==========================================================================
   AGROLIF LI-RED SECTORIAL STYLES & ANIMATIONS
   ========================================================================== */
@keyframes flow {
  to {
    stroke-dashoffset: -30px;
  }
}

/* Flujo fluido continuo para manguera de agua (no simples líneas punteadas) */
@keyframes waterStream {
  from {
    stroke-dashoffset: 0;
  }
  to {
    stroke-dashoffset: -52px;
  }
}

.animate-flow {
  animation: flow 1.2s linear infinite;
}

.animate-water-stream {
  animation: waterStream 1.05s linear infinite;
}

/* Ondas concéntricas de radiofrecuencia LI-RED para todos los equipos de campo */
@keyframes deviceRadiate {
  0% {
    r: 12px;
    opacity: 0.9;
    stroke-width: 2px;
  }
  60% {
    opacity: 0.45;
  }
  100% {
    r: 58px;
    opacity: 0;
    stroke-width: 0.4px;
  }
}

.animate-device-radiate {
  animation: deviceRadiate 2.4s cubic-bezier(0.16, 0.8, 0.3, 1) infinite;
}

/* Onda expansiva de largo alcance emitida por el LIFApex Central */
@keyframes apexRadiate {
  0% {
    r: 16px;
    opacity: 0.95;
    stroke-width: 2.5px;
  }
  60% {
    opacity: 0.5;
  }
  100% {
    r: 96px;
    opacity: 0;
    stroke-width: 0.4px;
  }
}

.animate-apex-radiate {
  animation: apexRadiate 3.2s cubic-bezier(0.16, 0.8, 0.3, 1) infinite;
}

.animate-radiate {
  animation: apexRadiate 3.2s cubic-bezier(0.16, 0.8, 0.3, 1) infinite;
}

.dt-node-wrapper {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 20;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  touch-action: pan-y;
}

.dt-node-wrapper:active {
  transform: translate(-50%, -50%) scale(0.95);
}


/* ==========================================================================
   LI-RED DOWNWARD SIGNAL WAVE ANIMATION (ONDAS DESCENDENTES)
   ========================================================================== */
@keyframes waveRadiateDown {
  0% {
    transform: translateY(0px) scale(0.35);
    opacity: 0;
    stroke-width: 2.4px;
  }
  14% {
    opacity: 0.85;
    filter: drop-shadow(0 2px 8px rgba(0, 230, 118, 0.65));
  }
  35% {
    opacity: 0.45;
    stroke-width: 1.8px;
    filter: drop-shadow(0 3px 10px rgba(41, 151, 255, 0.35));
  }
  60% {
    opacity: 0.18;
    stroke-width: 1.3px;
    filter: none;
  }
  80% {
    opacity: 0.05;
    stroke-width: 0.9px;
  }
  100% {
    transform: translateY(68px) scale(1.18);
    opacity: 0;
    stroke-width: 0.5px;
  }
}

.downward-wave {
  opacity: 0;
  transform-origin: 250px 0px;
  animation: waveRadiateDown 3.8s cubic-bezier(0.22, 0.55, 0.35, 1) infinite;
  animation-fill-mode: backwards;
  will-change: transform, opacity;
}

.wave-1 {
  animation-delay: 0s;
}

.wave-2 {
  animation-delay: 0.95s;
}

.wave-3 {
  animation-delay: 1.9s;
}

.wave-4 {
  animation-delay: 2.85s;
}

/* ==========================================================================
   LIF-CORE HARDWARE SHOWCASE & GREEN GLOW (RETROILUMINACIÓN AMPLIA Y RADIANTE)
   ========================================================================== */
.lifcore-glow-container {
  position: relative;
}

.lifcore-ambient-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 660px;
  height: 660px;
  background: radial-gradient(circle, rgba(0, 230, 118, 0.40) 0%, rgba(0, 168, 84, 0.28) 32%, rgba(0, 168, 84, 0.12) 55%, rgba(0, 168, 84, 0.04) 75%, rgba(0, 168, 84, 0.008) 88%, transparent 100%);
  filter: blur(85px);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  animation: lifcoreGlowPulse 5s ease-in-out infinite alternate;
}

.lifcore-glow-core {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 380px;
  height: 520px;
  background: radial-gradient(ellipse at center, rgba(0, 230, 118, 0.40) 0%, rgba(0, 168, 84, 0.25) 50%, transparent 75%);
  filter: blur(50px);
  border-radius: 40%;
  pointer-events: none;
  z-index: 0;
}

@keyframes lifcoreGlowPulse {
  0% {
    transform: translate(-50%, -50%) scale(0.95);
    opacity: 0.8;
    filter: blur(70px);
  }
  100% {
    transform: translate(-50%, -50%) scale(1.12);
    opacity: 1;
    filter: blur(88px);
  }
}

.lifcore-device-img {
  filter: drop-shadow(0 20px 45px rgba(0, 230, 118, 0.45)) drop-shadow(0 8px 25px rgba(0, 168, 84, 0.50)) drop-shadow(0 4px 12px rgba(0, 0, 0, 0.6));
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s ease;
}

.lifcore-device-img:hover {
  transform: translateY(-6px) scale(1.04);
  filter: drop-shadow(0 28px 60px rgba(0, 230, 118, 0.60)) drop-shadow(0 12px 35px rgba(0, 168, 84, 0.65)) drop-shadow(0 6px 18px rgba(0, 0, 0, 0.7));
}


/* ==========================================================================
   LIF-APEX HARDWARE SHOWCASE & GREEN GLOW (RETROILUMINACIÓN HORIZONTAL PRO)
   ========================================================================== */
.lifapex-glow-container {
  position: relative;
  width: 100%;
}

.lifapex-ambient-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 96%;
  max-width: 1050px;
  height: 500px;
  background: radial-gradient(ellipse at center, rgba(0, 230, 118, 0.38) 0%, rgba(0, 168, 84, 0.25) 35%, rgba(0, 168, 84, 0.10) 58%, rgba(0, 168, 84, 0.03) 78%, rgba(0, 168, 84, 0.006) 90%, transparent 100%);
  filter: blur(85px);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  animation: lifapexGlowPulse 5.5s ease-in-out infinite alternate;
}

.lifapex-glow-core {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 65%;
  max-width: 650px;
  height: 280px;
  background: radial-gradient(ellipse at center, rgba(0, 230, 118, 0.48) 0%, rgba(0, 168, 84, 0.22) 50%, transparent 72%);
  filter: blur(52px);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

@keyframes lifapexGlowPulse {
  0% {
    transform: translate(-50%, -50%) scale(0.94);
    opacity: 0.82;
    filter: blur(75px);
  }
  100% {
    transform: translate(-50%, -50%) scale(1.08);
    opacity: 1;
    filter: blur(95px);
  }
}

.lifapex-device-img {
  filter: drop-shadow(0 22px 55px rgba(0, 230, 118, 0.45)) drop-shadow(0 10px 30px rgba(0, 168, 84, 0.50)) drop-shadow(0 4px 16px rgba(0, 0, 0, 0.7));
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s ease;
}

.lifapex-device-img:hover {
  transform: translateY(-6px) scale(1.025);
  filter: drop-shadow(0 30px 70px rgba(0, 230, 118, 0.60)) drop-shadow(0 14px 40px rgba(0, 168, 84, 0.65)) drop-shadow(0 6px 20px rgba(0, 0, 0, 0.8));
}

/* ==========================================================================
   APPLE DYNAMIC ISLAND & LIQUID GLASS COMPONENT (CUPERTINO FROSTED GLASS)
   ========================================================================== */
.apple-dynamic-island {
  background: rgba(10, 14, 22, 0.72);
  backdrop-filter: blur(28px) saturate(190%) contrast(105%);
  -webkit-backdrop-filter: blur(28px) saturate(190%) contrast(105%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 
    0 20px 48px -10px rgba(0, 0, 0, 0.8),
    0 0 24px -4px rgba(0, 230, 118, 0.08),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.32),
    inset 0 -1px 1px 0 rgba(0, 0, 0, 0.5);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.apple-dynamic-island:hover {
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 
    0 24px 54px -10px rgba(0, 0, 0, 0.9),
    0 0 32px -4px rgba(0, 230, 118, 0.15),
    inset 0 1px 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -1px 1px 0 rgba(0, 0, 0, 0.5);
}

.liquid-glass-pill {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.18);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.liquid-glass-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.3);
  transform: translateY(-0.5px);
}

/* ==========================================================================
   ANIMACIÓN PÁGINA DISPOSITIVOS
   Fase 1 (0.05s - 0.55s): Título Dispositivos AgroLIF e Imágenes JUNTOS
   Fase 2 (0.55s - 1.05s): Nombres de dispositivos y textos extras (subtítulo y descripciones)
   Fase 3 (1.05s - 1.60s): Botón "Reservar acceso prioritario" (ÚLTIMO EN APARECER)
   ========================================================================== */
@keyframes dispPhase1Title {
  0% {
    opacity: 0;
    transform: translate3d(0, 20px, 0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes dispPhase1Images {
  0% {
    opacity: 0;
    transform: translate3d(0, 16px, 0) scale(0.93);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes dispPhase2Texts {
  0% {
    opacity: 0;
    transform: translate3d(0, 14px, 0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes dispPhase3Cta {
  0% {
    opacity: 0;
    transform: translate3d(0, 16px, 0) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

/* Fase 1: Título e Imágenes emergen juntos al inicio (0.05s a 0.55s) */
.anim-disp-phase1-title {
  animation: dispPhase1Title 0.50s cubic-bezier(0.16, 1, 0.3, 1) 0.05s both;
  will-change: transform, opacity;
}

.anim-disp-phase1-images {
  animation: dispPhase1Images 0.50s cubic-bezier(0.16, 1, 0.3, 1) 0.05s both;
  will-change: transform, opacity;
}

/* Fase 2: Nombres y textos extras emergen después (0.50s a 1.00s) */
.anim-disp-phase2-texts {
  animation: dispPhase2Texts 0.50s cubic-bezier(0.16, 1, 0.3, 1) 0.50s both;
  will-change: transform, opacity;
}

/* Fase 3: Botón Reservar Acceso Prioritario - ÚLTIMO EN APARECER (0.95s a 1.50s) */
.anim-disp-phase3-cta {
  animation: dispPhase3Cta 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0.95s both;
  will-change: transform, opacity;
}


/* ==========================================================================
   ANIMACIÓN DE DESPLIEGUE ORGÁNICO DE BARRA DE NAVEGACIÓN (SÓLO NOSOTROS)
   Aparece después de 0.75 segundos, deslizándose suave y orgánicamente hacia abajo
   ========================================================================== */
@keyframes navbarUnfoldDown {
  0% {
    transform: translate3d(0, -100%, 0);
    opacity: 0;
    pointer-events: none;
  }
  35% {
    opacity: 0.6;
    pointer-events: auto;
  }
  100% {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }
}

.anim-navbar-unfold {
  animation: navbarUnfoldDown 0.95s cubic-bezier(0.16, 1, 0.3, 1) 1.35s both;
  will-change: transform, opacity;
}

/* ==========================================================================
   DESTELLO ÓPTICO INICIAL (ESFERA COMPACTA A LA MITAD) Y APARICIÓN DE ONDAS
   Esfera de destello reducida a la mitad, con ondas un poco más grandes (~230px).
   ========================================================================== */
@keyframes destelloFlashBurst {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    filter: brightness(3);
  }
  35% {
    opacity: 1;
    filter: brightness(2.6) drop-shadow(0 0 14px #00e676) drop-shadow(0 0 24px #2997ff);
  }
  65% {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(1.1);
    filter: brightness(1.5) blur(1.5px);
  }
  100% {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 0.15;
    filter: brightness(1) blur(3px);
  }
}

@keyframes destelloStreakExpand {
  0% {
    width: 0px;
    opacity: 0;
  }
  35% {
    width: 200px;
    opacity: 1;
    filter: drop-shadow(0 0 10px #00e676);
  }
  70% {
    width: 160px;
    opacity: 0.85;
  }
  100% {
    width: 120px;
    opacity: 0.75;
    filter: drop-shadow(0 0 4px #00e676);
  }
}

@keyframes destelloCoreBloom {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  35% {
    transform: scale(1.4);
    opacity: 1;
  }
  70% {
    transform: scale(1.1);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.nosotros-destello-container {
  width: 1px;
  height: 1px;
}

.nosotros-destello-flash {
  left: 50%;
  top: 0;
  animation: destelloFlashBurst 1.0s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.nosotros-destello-streak {
  animation: destelloStreakExpand 1.0s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.nosotros-destello-core {
  animation: destelloCoreBloom 1.0s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

/* Revelado suave de las ondas emergiendo desde el destello en 1 segundo (inicio a los 0.2s) */
@keyframes wavesDestelloReveal {
  0% {
    opacity: 0;
    transform: scale(0.72) translateY(-10px);
    filter: brightness(2.2) drop-shadow(0 0 28px rgba(0, 230, 118, 0.95));
  }
  35% {
    opacity: 0.65;
    filter: brightness(1.7) drop-shadow(0 0 20px rgba(0, 230, 118, 0.75));
  }
  70% {
    opacity: 0.9;
    filter: brightness(1.2) drop-shadow(0 0 10px rgba(41, 151, 255, 0.5));
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: brightness(1);
  }
}

.nosotros-waves-wrapper {
  animation: wavesDestelloReveal 1.0s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

/* ==========================================================================
   ANIMACIÓN ONDAS LI-RED PARA PÁGINA NOSOTROS (UN POCO MÁS GRANDE)
   Ondas de radiofrecuencia con mayor amplitud y alcance (~230px), manteniendo
   la mitad inferior completamente libre y despejada para textos o botones.
   ========================================================================== */
@keyframes nosotrosWaveRadiateDown {
  0% {
    transform: translateY(0px) scale(0.40);
    opacity: 0;
    stroke-width: 3.2px;
  }
  14% {
    opacity: 0.95;
    filter: drop-shadow(0 2px 12px rgba(0, 230, 118, 0.85));
  }
  35% {
    opacity: 0.68;
    stroke-width: 2.5px;
    filter: drop-shadow(0 4px 16px rgba(41, 151, 255, 0.5));
  }
  60% {
    opacity: 0.32;
    stroke-width: 1.7px;
    filter: drop-shadow(0 5px 18px rgba(41, 151, 255, 0.22));
  }
  80% {
    opacity: 0.10;
    stroke-width: 1.1px;
    filter: none;
  }
  100% {
    transform: translateY(230px) scale(1.50);
    opacity: 0;
    stroke-width: 0.5px;
    filter: none;
  }
}

.nosotros-hero-wave {
  opacity: 0;
  transform-origin: 500px 0px;
  animation: nosotrosWaveRadiateDown 3.8s cubic-bezier(0.22, 0.55, 0.35, 1) infinite;
  animation-fill-mode: backwards;
  will-change: transform, opacity;
}

.nosotros-wave-1 {
  animation-delay: 0.2s;
}

.nosotros-wave-2 {
  animation-delay: 0.96s;
}

.nosotros-wave-3 {
  animation-delay: 1.72s;
}

.nosotros-wave-4 {
  animation-delay: 2.48s;
}

.nosotros-wave-5 {
  animation-delay: 3.24s;
}

/* ==========================================================================
   CONTENIDO HERO NOSOTROS (A G R O L I F, SUBTÍTULO, BOTÓN Y FRASE)
   Entrada suave y orgánica en sincronía con el avance de las ondas
   ========================================================================== */
@keyframes nosotrosContentFadeUp {
  0% {
    opacity: 0;
    transform: translate3d(0, 18px, 0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.anim-nosotros-title {
  animation: nosotrosContentFadeUp 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.60s both;
  will-change: transform, opacity;
}

.anim-nosotros-subcontent {
  animation: nosotrosContentFadeUp 0.85s cubic-bezier(0.16, 1, 0.3, 1) 1.10s both;
  will-change: transform, opacity;
}

/* ==========================================================================
   FASE SECUENCIAL ORGÁNICA: TEXTOS Y DEMÁS IMÁGENES (MISIÓN, VISIÓN Y CELULAR)
   Emergen suavemente justo después de que concluye la animación superior (~1.85s)
   ========================================================================== */
.anim-nosotros-phase-body {
  animation: nosotrosContentFadeUp 0.90s cubic-bezier(0.16, 1, 0.3, 1) 1.85s both;
  will-change: transform, opacity;
}

.anim-nosotros-phase-img {
  animation: nosotrosContentFadeUp 0.95s cubic-bezier(0.16, 1, 0.3, 1) 2.05s both;
  will-change: transform, opacity;
}

/* ==========================================================================
   FASE SECUENCIAL ORGÁNICA: PÁGINAS INICIO Y DISPOSITIVOS
   El contenido posterior emerge con suavidad al concluir la animación superior
   ========================================================================== */
.anim-home-phase-body {
  animation: sectionOrganicReveal 0.90s cubic-bezier(0.16, 1, 0.3, 1) 2.05s both;
  will-change: transform, opacity;
}

.anim-disp-phase-body {
  animation: sectionOrganicReveal 0.90s cubic-bezier(0.16, 1, 0.3, 1) 1.55s both;
  will-change: transform, opacity;
}

@keyframes sectionOrganicReveal {
  0% {
    opacity: 0;
    transform: translate3d(0, 24px, 0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}


/* ==========================================================================
   ANIMACIÓN ONDAS DE SEÑAL EMERGIENDO DEL CELULAR (MISIÓN Y VISIÓN)
   Ondas concéntricas y arcos de radiofrecuencia saliendo de la imagen
   ========================================================================== */
.phone-signal-container {
  overflow: visible;
}

.signal-arc {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: phoneArcRadiate 2.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
  will-change: opacity, transform;
}

.signal-arc-1 {
  animation-delay: 2.15s;
}

.signal-arc-2 {
  animation-delay: 2.65s;
}

.signal-arc-3 {
  animation-delay: 3.15s;
}

@keyframes phoneArcRadiate {
  0% {
    opacity: 0;
    stroke-width: 2.4px;
    transform: scale(0.96);
  }
  25% {
    opacity: 0.95;
    stroke-width: 2.2px;
    filter: drop-shadow(0 0 6px #00e676);
  }
  60% {
    opacity: 0.48;
    stroke-width: 1.6px;
    filter: drop-shadow(0 0 10px #2997ff);
  }
  90% {
    opacity: 0.08;
    stroke-width: 1px;
    filter: none;
  }
  100% {
    opacity: 0;
    transform: scale(1.06);
    filter: none;
  }
}


/* Utilities for responsive canvas and smooth scrolling */
.scrollbar-none::-webkit-scrollbar {
  display: none;
}
.scrollbar-none {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Ensure no element forces horizontal scroll on mobile */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* ==========================================================================
   OCULTAR INSIGNIA FLOTANTE DE GOOGLE RECAPTCHA INVISIBLE
   (Conforme a la directriz oficial de Google para reCAPTCHA Invisible)
   ========================================================================== */
.grecaptcha-badge {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  left: -9999px !important;
}
