/* ══════════════════════════════════════════
   ANIMATIONS — Stacks Tree Service
   ══════════════════════════════════════════ */

/* ── Reveal states ── */
.reveal-fade {
  opacity: 0;
  transition: opacity var(--duration-slow) var(--ease-out);
}

.reveal-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity var(--duration-slow) var(--ease-out), transform var(--duration-slow) var(--ease-out);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity var(--duration-slow) var(--ease-out), transform var(--duration-slow) var(--ease-out);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity var(--duration-slow) var(--ease-out), transform var(--duration-slow) var(--ease-out);
}

.reveal-fade.is-visible,
.reveal-up.is-visible,
.reveal-left.is-visible,
.reveal-right.is-visible {
  opacity: 1;
  transform: none;
}

/* ── Stagger delays ── */
.reveal-up:nth-child(2) { transition-delay: 0.1s; }
.reveal-up:nth-child(3) { transition-delay: 0.2s; }
.reveal-up:nth-child(4) { transition-delay: 0.3s; }

/* ── Hero title overflow container ── */
.hero-title-line1,
.hero-title-line2 {
  display: block;
}

/* ── Scroll line animation ── */
@keyframes scrollLine {
  0%   { transform: scaleY(0); transform-origin: top; opacity: 0; }
  40%  { transform: scaleY(1); transform-origin: top; opacity: 1; }
  60%  { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* ── Grid overlay (replacing blueprint with subtle tree pattern) ── */
.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(200,168,75,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200,168,75,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 1;
}

/* ── Floating leaf particles ── */
@keyframes leafDrift {
  0%   { transform: translateY(0px) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.12; }
  90%  { opacity: 0.12; }
  100% { transform: translateY(-100px) rotate(20deg); opacity: 0; }
}

@keyframes leafSway {
  0%, 100% { transform: translateY(0px) rotate(-8deg); }
  50%      { transform: translateY(-18px) rotate(8deg); }
}

.leaf-particle {
  position: absolute;
  font-family: 'remixicon' !important;
  font-size: var(--size, 1.2rem);
  color: var(--color-accent);
  opacity: 0;
  pointer-events: none;
  animation: leafDrift var(--duration, 8s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  user-select: none;
  line-height: 1;
}

.leaf-particle.sway {
  opacity: var(--max-opacity, 0.10);
  animation: leafSway var(--duration, 7s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

/* ── Glow pulse on hero CTA ── */
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 4px 24px rgba(200,168,75,0.35); }
  50%       { box-shadow: 0 4px 48px rgba(200,168,75,0.65); }
}

.btn-primary {
  animation: glowPulse 3s ease-in-out infinite;
}

.btn-primary:hover {
  animation: none;
}

/* ── Gallery track transition ── */
.gallery-track {
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Tab panel transitions ── */
.tab-panel {
  animation: tabFadeIn 0.35s var(--ease-out);
}

@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* ── Counter number ── */
.stat-number {
  transition: color 0.3s ease;
}