/* ==========================================================================
   RESET & FUNDAMENTOS DE DISEÑO DE LUJO
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: #017744; /* Verde esmeralda profundo de alta gama */
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   1. FONDO CON PATRÓN CONTINUO Y PARALLAX (GPU ACCELERATED)
   ========================================================================== */
.parallax-bg {
  position: absolute;
  /* Margen negativo para absorber el movimiento del parallax sin mostrar bordes vacíos */
  top: -6%;
  left: -6%;
  width: 112vw;
  height: 112vh;
  background-image: url('Pattern.svg');
  background-repeat: repeat;
  background-position: center center;
  background-size: 151.15px 165.45px;
  
  /* Optimización de rendimiento por hardware */
  will-change: transform;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  perspective: 1000px;
  pointer-events: none;
  z-index: 1;
}

/* Viñeta sutil ambiental para dar dramatismo cinematográfico */
.vignette-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at center,
    rgba(1, 119, 68, 0) 25%,
    rgba(1, 60, 35, 0.4) 70%,
    rgba(0, 35, 20, 0.75) 100%
  );
  pointer-events: none;
  z-index: 2;
}

/* ==========================================================================
   2. ESCENARIO CENTRAL Y COMPOSICIÓN SUPERPUESTA
   ========================================================================== */
.stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 3;
  pointer-events: none;
}

.brand-element {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  justify-content: center;
  align-items: center;
  width: 85vw;
  max-width: 680px;
  
  /* Optimización de rendimiento por GPU para transiciones suaves a 60fps */
  will-change: transform, opacity, filter;
  backface-visibility: hidden;
  transform-style: preserve-3d;
}

.brand-element.copy-element {
  max-width: 850px;
}

.brand-svg {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 12px 28px rgba(0, 30, 15, 0.35));
}

/* Adjustments for optimal visual proportion */
.logo-svg {
  max-height: 45vh;
  object-fit: contain;
}

.copy-svg {
  max-height: 25vh;
  object-fit: contain;
}

/* ==========================================================================
   3. ANIMACIÓN Y TIEMPOS (CICLO INFINITO EXACTO DE 9 SEGUNDOS)
   ==========================================================================
   Cálculo exacto del ciclo de 9 segundos (T = 9s):
   - 0.0s a 1.5s ( 0.00% -> 16.67%): Materialización / Opacity 0 -> 1 & Blur 15px -> 0px (1.5s)
   - 1.5s a 4.5s (16.67% -> 50.00%): Mantenimiento estático y nítido (3.0s)
   - 4.5s a 6.0s (50.00% -> 66.67%): Desaparición / Opacity 1 -> 0 & Blur 0px -> 15px (1.5s)
   - 6.0s a 9.0s (66.67% -> 100.00%): Estado oculto completo (3.0s)
   ========================================================================== */

@keyframes crossfadeCycle {
  0% {
    opacity: 0;
    filter: blur(15px);
    transform: translate(-50%, -50%) scale(0.97);
  }
  16.67% {
    opacity: 1;
    filter: blur(0px);
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 1;
    filter: blur(0px);
    transform: translate(-50%, -50%) scale(1);
  }
  66.67% {
    opacity: 0;
    filter: blur(15px);
    transform: translate(-50%, -50%) scale(0.97);
  }
  100% {
    opacity: 0;
    filter: blur(15px);
    transform: translate(-50%, -50%) scale(0.97);
  }
}

.logo-element {
  animation: crossfadeCycle 9s cubic-bezier(0.65, 0, 0.35, 1) infinite;
  animation-fill-mode: both;
}

.copy-element {
  animation: crossfadeCycle 9s cubic-bezier(0.65, 0, 0.35, 1) infinite;
  animation-delay: 4.5s;
  animation-fill-mode: both;
}
