/* IVANUKI | Fase 2: ambiente vivo (2026-11-03)
   No afecta precios, carteles, botones, formularios ni zonas pulsables.
   Hojas animadas reales. Capas de profundidad de la ilustracion existente.
   Transiciones de entrada de encabezados sin ocultar contenido antes del JS. */

/* Leaf fall: independent vertical travel + oscillating rotation. No static leaf backgrounds. */
.iv-amb-foliage{position:fixed;inset:0;z-index:24;overflow:hidden;pointer-events:none!important;user-select:none;contain:layout paint style}
.iv-amb-foliage[hidden]{display:none!important}
.iv-amb-leaf{position:absolute;left:var(--iv-leaf-left);top:-14vh;width:var(--iv-leaf-size);height:var(--iv-leaf-size);opacity:0;pointer-events:none;animation:iv-amb-fall var(--iv-leaf-time) linear var(--iv-leaf-delay) infinite;will-change:transform,opacity}
.iv-amb-leaf>img{display:block;width:100%;height:100%;object-fit:contain;user-select:none;pointer-events:none;filter:drop-shadow(0 3px 3px rgba(0,16,18,.14));animation:iv-amb-sway var(--iv-sway-time) ease-in-out var(--iv-sway-delay) infinite alternate;transform-origin:53% 42%;will-change:transform}
.iv-amb-leaf--back>img{filter:blur(.35px) drop-shadow(0 2px 3px rgba(0,12,18,.09))}
@keyframes iv-amb-fall{
  0%{opacity:0;transform:translate3d(0,-3vh,0)}
  8%{opacity:var(--iv-leaf-alpha)}
  24%{transform:translate3d(var(--iv-drift-1),28vh,0)}
  48%{transform:translate3d(var(--iv-drift-2),60vh,0)}
  72%{transform:translate3d(var(--iv-drift-3),91vh,0)}
  91%{opacity:var(--iv-leaf-alpha)}
  100%{opacity:0;transform:translate3d(var(--iv-drift-4),139vh,0)}
}
@keyframes iv-amb-sway{
  0%{transform:translate3d(-8px,0,0) rotate(-24deg) rotateY(-27deg)}
  50%{transform:translate3d(7px,4px,0) rotate(11deg) rotateY(16deg)}
  100%{transform:translate3d(12px,-2px,0) rotate(34deg) rotateY(57deg)}
}

/* Main hero: split its *existing* image and gradient into layers to gain shallow depth.
   All text retains its existing geometry and has a solid shaded contrast overlay. */
.site-main>.v21-hero.iv-amb-hero{position:relative!important;isolation:isolate!important;overflow:hidden!important;background:#083445!important}
.site-main>.v21-hero.iv-amb-hero .iv-amb-hero-art,
.site-main>.v21-hero.iv-amb-hero .iv-amb-hero-tint{position:absolute;inset:0;pointer-events:none!important;user-select:none}
.site-main>.v21-hero.iv-amb-hero .iv-amb-hero-art{
  z-index:0;inset:-5px -12px;
  background-image:var(--hero-art);
  background-size:cover;
  background-position:60% center;
  background-repeat:no-repeat;
  transform:translate3d(0,0,0) scale(1.025);
  animation:iv-amb-hero-depth 28s ease-in-out infinite alternate;
  will-change:transform;
}
.site-main>.v21-hero.iv-amb-hero .iv-amb-hero-tint{
  z-index:1;
  background:linear-gradient(90deg,rgba(4,31,43,.97) 0%,rgba(5,37,51,.93) 34%,rgba(8,48,64,.44) 56%,rgba(8,48,64,0) 82%);
}
.site-main>.v21-hero.iv-amb-hero .v21-hero-copy{position:relative!important;z-index:2!important}
@keyframes iv-amb-hero-depth{
  0%{transform:translate3d(-5px,0,0) scale(1.025)}
  100%{transform:translate3d(5px,-3px,0) scale(1.045)}
}

/* Section heading reveals: JS only applies class *as section is visible*.
   No opacity:0 baseline, so SEO, accessibility and load failure stay safe. */
.iv-amb-reveal{animation:iv-amb-enter .65s cubic-bezier(.17,.7,.25,1) both}
@keyframes iv-amb-enter{
  from{opacity:.72;transform:translate3d(0,9px,0)}
  to{opacity:1;transform:translate3d(0,0,0)}
}
/* Mobile: cheaper, less distracting, and preserve original compact hero backdrop. */
@media(max-width:760px){
  .iv-amb-foliage{z-index:10}
  .iv-amb-leaf>img{filter:none}
  .site-main>.v21-hero.iv-amb-hero .iv-amb-hero-art{
    background-position:68% center;
    inset:0;
    transform:none!important;
    animation:none!important;
  }
  .site-main>.v21-hero.iv-amb-hero .iv-amb-hero-tint{
    background:linear-gradient(90deg,rgba(6,43,62,.96) 0%,rgba(7,49,67,.90) 58%,rgba(7,49,67,.53) 100%);
  }
  .iv-amb-reveal{animation-duration:.45s}
}
@media(prefers-reduced-motion:reduce){
  .iv-amb-foliage{display:none!important}
  .iv-amb-leaf,.iv-amb-leaf>img,.iv-amb-reveal{animation:none!important;transition:none!important}
  .site-main>.v21-hero.iv-amb-hero .iv-amb-hero-art{animation:none!important;transform:none!important}
}
