/* ============================================================
   PRLA AGRO — GLOBAL ANIMATION LAYER
   Linked from all pages. Do not put layout styles here.
   ============================================================ */

/* 1 · Smooth scroll */
html { scroll-behavior: smooth; }

/* 2 · Page fade-in on load */
@keyframes pageFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
body { animation: pageFadeIn .4s ease both; }

/* 3 · Navbar — smooth shrink + stronger shadow when scrolled */
nav {
  transition: height .35s cubic-bezier(.4,0,.2,1),
              box-shadow .35s cubic-bezier(.4,0,.2,1),
              background .35s cubic-bezier(.4,0,.2,1) !important;
}
nav.dark {
  height: 62px !important;
  box-shadow: 0 2px 28px rgba(0,0,0,0.10) !important;
  background: rgba(242,247,242,0.99) !important;
}

/* 4 · Button shimmer — light sweep on hover */
.btn-primary,
.btn-sage {
  position: relative !important;
  overflow: hidden !important;
}
.btn-primary::after,
.btn-sage::after {
  content: '';
  position: absolute;
  top: 0; left: -110%;
  width: 55%; height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,0.24) 50%,
    transparent 100%
  );
  transform: skewX(-18deg);
  transition: left .55s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
}
.btn-primary:hover::after,
.btn-sage:hover::after {
  left: 155%;
}

/* 5 · Hero entrance — staggered cascade */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ha1 { animation: heroFadeUp .72s cubic-bezier(.4,0,.2,1) .06s both; }
.ha2 { animation: heroFadeUp .72s cubic-bezier(.4,0,.2,1) .22s both; }
.ha3 { animation: heroFadeUp .72s cubic-bezier(.4,0,.2,1) .38s both; }
.ha4 { animation: heroFadeUp .72s cubic-bezier(.4,0,.2,1) .52s both; }
.ha5 { animation: heroFadeUp .72s cubic-bezier(.4,0,.2,1) .66s both; }

/* 6 · Scroll-reveal directional variants */
.sr-left {
  opacity: 0;
  transform: translateX(-28px);
  transition: opacity .75s cubic-bezier(.4,0,.2,1),
              transform .75s cubic-bezier(.4,0,.2,1);
}
.sr-left.in  { opacity: 1; transform: none; }

.sr-right {
  opacity: 0;
  transform: translateX(28px);
  transition: opacity .75s cubic-bezier(.4,0,.2,1),
              transform .75s cubic-bezier(.4,0,.2,1);
}
.sr-right.in { opacity: 1; transform: none; }

.sr-scale {
  opacity: 0;
  transform: scale(.93);
  transition: opacity .65s cubic-bezier(.4,0,.2,1),
              transform .65s cubic-bezier(.4,0,.2,1);
}
.sr-scale.in { opacity: 1; transform: none; }

/* Shared delays for new variants */
.sr-left.d1, .sr-right.d1, .sr-scale.d1 { transition-delay: .10s; }
.sr-left.d2, .sr-right.d2, .sr-scale.d2 { transition-delay: .20s; }
.sr-left.d3, .sr-right.d3, .sr-scale.d3 { transition-delay: .30s; }

/* 7 · Eyebrow line draw — animates when parent .sr gets .in */
.sr .eyebrow-line,
.sr-left .eyebrow-line,
.sr-right .eyebrow-line {
  display: inline-block;
  width: 0 !important;
  height: 1.5px;
  flex-shrink: 0;
  transition: width .85s cubic-bezier(.4,0,.2,1) .45s !important;
}
.sr.in .eyebrow-line,
.sr-left.in .eyebrow-line,
.sr-right.in .eyebrow-line {
  width: 28px !important;
}
/* Also animate standalone eyebrow-lines */
.eyebrow-line {
  display: inline-block;
  height: 1.5px;
  flex-shrink: 0;
}

/* 8 · Stat counter pop */
@keyframes numPop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.10); }
  100% { transform: scale(1); }
}
.num-counted { animation: numPop .45s cubic-bezier(.4,0,.2,1) both; }

/* 9 · Section rule/underline draw-in */
.sr .rule {
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .85s cubic-bezier(.4,0,.2,1) .35s;
}
.sr.in .rule {
  transform: scaleX(1);
}

/* 10 · Floating badge / decorative element */
@keyframes gentleFloat {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-7px); }
}
.float-anim {
  animation: gentleFloat 3.8s ease-in-out infinite;
}

/* 11 · Link underline hover (for inline text links) */
.text-link {
  position: relative;
  text-decoration: none;
}
.text-link::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0;
  width: 0; height: 1px;
  background: currentColor;
  transition: width .3s cubic-bezier(.4,0,.2,1);
}
.text-link:hover::after { width: 100%; }

/* 12 · Hover lift for generic cards/panels */
.hover-lift {
  transition: transform .3s cubic-bezier(.4,0,.2,1),
              box-shadow .3s cubic-bezier(.4,0,.2,1) !important;
}
.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 44px rgba(26,46,20,0.10);
}
