/* ==========================================================================
   (-) NUM — Animation Styles
   Scroll reveal, parallax, micro-interactions, liquid motion.
   All animations respect prefers-reduced-motion.
   ========================================================================== */

/* ── Scroll Reveal ────────────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity var(--duration-slower) var(--ease-out),
              transform var(--duration-slower) var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal--left {
  transform: translateX(-40px);
}

.reveal--left.visible {
  transform: translateX(0);
}

.reveal--right {
  transform: translateX(40px);
}

.reveal--right.visible {
  transform: translateX(0);
}

.reveal--scale {
  transform: scale(0.95);
}

.reveal--scale.visible {
  transform: scale(1);
}

/* ── Stagger Children ─────────────────────────────────────────────────────── */
.stagger > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}

.stagger.visible > *:nth-child(1) { transition-delay: 0ms; }
.stagger.visible > *:nth-child(2) { transition-delay: 80ms; }
.stagger.visible > *:nth-child(3) { transition-delay: 160ms; }
.stagger.visible > *:nth-child(4) { transition-delay: 240ms; }
.stagger.visible > *:nth-child(5) { transition-delay: 320ms; }
.stagger.visible > *:nth-child(6) { transition-delay: 400ms; }
.stagger.visible > *:nth-child(7) { transition-delay: 480ms; }
.stagger.visible > *:nth-child(8) { transition-delay: 560ms; }

.stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* ── Text Reveal ──────────────────────────────────────────────────────────── */
.text-reveal {
  overflow: hidden;
}

.text-reveal__inner {
  display: inline-block;
  transform: translateY(110%);
  transition: transform var(--duration-slower) var(--ease-out);
}

.text-reveal.visible .text-reveal__inner {
  transform: translateY(0);
}

/* ── Line Reveal ──────────────────────────────────────────────────────────── */
.line-reveal {
  width: 0;
  transition: width var(--duration-slowest) var(--ease-out);
}

.line-reveal.visible {
  width: 60px;
}

/* ── Hero Animations ──────────────────────────────────────────────────────── */
@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes heroPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

@keyframes liquidWave {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes subtleDrift {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(5px, -3px); }
  50% { transform: translate(-3px, 5px); }
  75% { transform: translate(3px, 2px); }
}

.hero__float {
  animation: heroFloat 6s ease-in-out infinite;
}

.hero__pulse {
  animation: heroPulse 4s ease-in-out infinite;
}

/* ── Liquid Background ────────────────────────────────────────────────────── */
.liquid-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.liquid-bg__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  animation: subtleDrift 20s ease-in-out infinite;
}

.liquid-bg__blob--green {
  width: 400px;
  height: 400px;
  background: var(--color-green-primary);
  top: 10%;
  right: -10%;
  animation-delay: -5s;
}

.liquid-bg__blob--brown {
  width: 300px;
  height: 300px;
  background: var(--color-brown-warm);
  bottom: 20%;
  left: -5%;
  animation-delay: -10s;
}

.liquid-bg__blob--cream {
  width: 250px;
  height: 250px;
  background: var(--color-cream);
  top: 40%;
  left: 30%;
  opacity: 0.05;
  animation-delay: -15s;
}

/* ── Subtle Shimmer ───────────────────────────────────────────────────────── */
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.shimmer-text {
  background: linear-gradient(
    90deg,
    var(--color-cream-muted) 0%,
    var(--color-cream) 50%,
    var(--color-cream-muted) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 4s linear infinite;
}

/* ── Counter / Number Animation ───────────────────────────────────────────── */
@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Condensation Dots ────────────────────────────────────────────────────── */
@keyframes condensation {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.2); }
}

.condensation-dots {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.condensation-dot {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(245, 240, 232, 0.3);
  animation: condensation 3s ease-in-out infinite;
}

/* ── Parallax Layer ───────────────────────────────────────────────────────── */
.parallax-layer {
  will-change: transform;
  transition: transform 0.1s linear;
}

/* ── Magnetic Button ─────────────────────────────────────────────────────── */
.magnetic {
  transition: transform var(--duration-normal) var(--ease-spring);
}

/* ── Card Hover Glow ──────────────────────────────────────────────────────── */
.glow-on-hover {
  position: relative;
}

.glow-on-hover::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, 
    rgba(27, 107, 58, 0.15), 
    transparent, 
    rgba(139, 105, 20, 0.1)
  );
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
  pointer-events: none;
  z-index: -1;
}

.glow-on-hover:hover::after {
  opacity: 1;
}

/* ── Smooth Section Transition ────────────────────────────────────────────── */
.section-transition {
  position: relative;
}

.section-transition::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, var(--color-bg-primary), transparent);
  pointer-events: none;
  z-index: 1;
}

/* ── Typing Cursor ────────────────────────────────────────────────────────── */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.typing-cursor::after {
  content: '|';
  color: var(--color-green-light);
  animation: blink 1s step-end infinite;
  margin-left: 2px;
}
