/* ═══════════════════════════════════════════════
   ORANGE FARM — ANIMATIONS & EFFECTS
═══════════════════════════════════════════════ */

/* ── REVEAL ON SCROLL ── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(.4,0,.2,1),
              transform 0.7s cubic-bezier(.4,0,.2,1);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.products-grid .reveal:nth-child(1) { transition-delay: 0ms; }
.products-grid .reveal:nth-child(2) { transition-delay: 120ms; }
.products-grid .reveal:nth-child(3) { transition-delay: 240ms; }

.pricing-grid .reveal:nth-child(1) { transition-delay: 0ms; }
.pricing-grid .reveal:nth-child(2) { transition-delay: 100ms; }
.pricing-grid .reveal:nth-child(3) { transition-delay: 200ms; }

.how-step.reveal:nth-child(1) { transition-delay: 0ms; }
.how-step.reveal:nth-child(3) { transition-delay: 150ms; }
.how-step.reveal:nth-child(5) { transition-delay: 300ms; }
.how-step.reveal:nth-child(7) { transition-delay: 450ms; }

.story-images.reveal { transition-delay: 0ms; }
.story-content.reveal { transition-delay: 150ms; }

/* ── KEYFRAMES ── */

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
  50%       { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

@keyframes scroll-dot {
  0%   { transform: translateY(0); opacity: 1; }
  75%  { transform: translateY(12px); opacity: 0; }
  76%  { transform: translateY(0); opacity: 0; }
  100% { opacity: 1; }
}

@keyframes float-1 {
  0%, 100% { transform: translateY(0px) rotate(-2deg); }
  50%       { transform: translateY(-12px) rotate(2deg); }
}
@keyframes float-2 {
  0%, 100% { transform: translateY(0px) rotate(2deg); }
  50%       { transform: translateY(-16px) rotate(-2deg); }
}
@keyframes float-3 {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-10px); }
}

@keyframes orb-drift-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(60px, -40px) scale(1.05); }
  66%       { transform: translate(-30px, 50px) scale(.95); }
}
@keyframes orb-drift-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%       { transform: translate(-80px, 60px) scale(1.1); }
}
@keyframes orb-drift-3 {
  0%, 100% { transform: translate(0, 0); }
  50%       { transform: translate(40px, -60px); }
}

@keyframes particle-rise {
  0%   { transform: translateY(0) scale(1); opacity: .7; }
  100% { transform: translateY(-100vh) scale(.3); opacity: 0; }
}

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes bounce-arrow {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(4px); }
}

@keyframes counter-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(249, 115, 22, 0.3); }
  50%       { box-shadow: 0 0 40px rgba(249, 115, 22, 0.6); }
}

/* ── APPLY ANIMATIONS ── */

.orb-1 { animation: orb-drift-1 18s ease-in-out infinite; }
.orb-2 { animation: orb-drift-2 14s ease-in-out infinite; }
.orb-3 { animation: orb-drift-3 10s ease-in-out infinite; }

.card-float-1 { animation: float-1 4s ease-in-out infinite; }
.card-float-2 { animation: float-2 5s ease-in-out 0.5s infinite; }
.card-float-3 { animation: float-3 3.5s ease-in-out 1s infinite; }

.tier-standard { animation: glow-pulse 3s ease-in-out infinite; }

.btn-primary svg { animation: bounce-arrow 1.5s ease-in-out infinite; }

/* ── HERO FLOATING PARTICLES ── */
.particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  pointer-events: none;
  animation: particle-rise linear infinite;
}

/* ── NUMBER COUNTER ── */
.stat-num { animation: counter-up .6s ease; }

/* ── SHIMMER HIGHLIGHT ── */
.title-highlight {
  background-size: 200% auto;
  animation: shimmer 4s linear infinite;
}

/* ── HOVER RIPPLE on Cards ── */
.pricing-card {
  isolation: isolate;
}
.pricing-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%),
    rgba(249, 115, 22, .08) 0%, transparent 65%);
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}
.pricing-card:hover::before { opacity: 1; }

/* ── TRUST BAR MARQUEE ── */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
/* applied via JS if desired */

/* ── STORY BADGE PULSE ── */
.story-badge-inner {
  animation: glow-pulse 4s ease-in-out infinite;
}

/* ── GALLERY ITEM LIFT ── */
.gallery-item {
  transition: transform .35s cubic-bezier(.4,0,.2,1),
              box-shadow .35s ease;
}
.gallery-item:hover {
  transform: scale(1.03);
  box-shadow: 0 20px 48px rgba(0,0,0,.18);
}

/* ── STEP NUMBER FLOAT ── */
.how-step:nth-child(1) .step-icon { animation: float-1 4s ease-in-out infinite; }
.how-step:nth-child(3) .step-icon { animation: float-2 5s ease-in-out .5s infinite; }
.how-step:nth-child(5) .step-icon { animation: float-3 3.5s ease-in-out 1s infinite; }
.how-step:nth-child(7) .step-icon { animation: float-1 4.5s ease-in-out 1.5s infinite; }

/* ── PAGE LOADER ── */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: linear-gradient(135deg, #c2440a, #f97316);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .6s ease, visibility .6s ease;
}
.page-loader.done {
  opacity: 0;
  visibility: hidden;
}
.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  color: #fff;
}
.loader-icon { font-size: 4rem; animation: spin-slow 2s linear infinite; }
.loader-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: rgba(255,255,255,.85);
  letter-spacing: .08em;
}
.loader-bar {
  width: 160px;
  height: 3px;
  background: rgba(255,255,255,.2);
  border-radius: 2px;
  overflow: hidden;
}
.loader-bar-fill {
  height: 100%;
  background: #fff;
  border-radius: 2px;
  animation: loader-fill 1.2s ease forwards;
}
@keyframes loader-fill {
  from { width: 0%; }
  to   { width: 100%; }
}

/* ── TAG ENTRANCE ── */
.section-tag {
  animation: none;
}

/* ── BUTTON SHINE SWEEP ── */
@keyframes shine-sweep {
  from { transform: translateX(-100%) skewX(-15deg); }
  to   { transform: translateX(200%) skewX(-15deg); }
}
.btn-primary:hover .btn-shine {
  animation: shine-sweep .6s ease forwards;
}

/* ── FORM INPUT FOCUS GLOW ── */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  animation: none; /* handled via CSS box-shadow transition */
}

/* ── MOBILE MENU SLIDE ITEMS ── */
.mobile-menu ul li {
  animation: none;
  opacity: 1;
}
.mobile-menu.open ul li:nth-child(1) { animation: slide-in-right .4s ease .05s both; }
.mobile-menu.open ul li:nth-child(2) { animation: slide-in-right .4s ease .10s both; }
.mobile-menu.open ul li:nth-child(3) { animation: slide-in-right .4s ease .15s both; }
.mobile-menu.open ul li:nth-child(4) { animation: slide-in-right .4s ease .20s both; }
.mobile-menu.open ul li:nth-child(5) { animation: slide-in-right .4s ease .25s both; }
.mobile-menu.open ul li:nth-child(6) { animation: slide-in-right .4s ease .30s both; }

@keyframes slide-in-right {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
