/* motion.css — animations, transitions, scroll reveals, hover states */

/* ── PAGE ENTRANCE KEYFRAMES ────────────────────────────────── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes wipe-right {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0% 0 0); }
}

@keyframes slide-down {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes count-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

/* ── HERO ENTRANCE ──────────────────────────────────────────── */
.hero-content .cat-badge {
  animation: fade-up 0.55s var(--ease-out) 0.1s both;
}

.hero-content .hero-h1 {
  animation: fade-up 0.7s var(--ease-out) 0.25s both;
}

.hero-content .hero-deck {
  animation: fade-up 0.65s var(--ease-out) 0.4s both;
}

.hero-content .author-box {
  animation: fade-up 0.55s var(--ease-out) 0.55s both;
}

.hero-visual .img-frame {
  animation: fade-in 0.9s var(--ease-out) 0.35s both;
}

/* Wordmark entrance */
.main-nav .wordmark {
  animation: slide-down 0.4s var(--ease-out) both;
}

/* ── SCROLL REVEAL ──────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s var(--ease-out),
              transform 0.65s var(--ease-out);
}

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

/* Staggered children */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s var(--ease-out),
              transform 0.55s var(--ease-out);
}

.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0.05s; opacity: 1; transform: none; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.12s; opacity: 1; transform: none; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.19s; opacity: 1; transform: none; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.26s; opacity: 1; transform: none; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.33s; opacity: 1; transform: none; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 0.40s; opacity: 1; transform: none; }

/* Clip-path wipe for large headings */
.reveal-wipe {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.75s var(--ease-out);
}

.reveal-wipe.is-visible {
  clip-path: inset(0 0% 0 0);
}

/* ── HOVER STATES ───────────────────────────────────────────── */

/* Review cards */
.review-card {
  transition: transform var(--dur-med) var(--ease-out),
              box-shadow var(--dur-med) var(--ease-out),
              border-color var(--dur-med);
}

.review-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-primary);
}

/* Method block */
.method-block {
  transition: box-shadow var(--dur-med) var(--ease-out);
}

.method-block:hover {
  box-shadow: var(--shadow-sm);
}

/* Mini cards */
.mini-card {
  transition: border-color var(--dur-fast),
              background var(--dur-fast);
}

.mini-card:hover {
  border-color: var(--brand-primary);
  background: var(--surface-base);
}

/* FAQ trigger */
.faq-trigger {
  transition: color var(--dur-fast) var(--ease-out);
}

/* Proof bar numbers */
.proof-num {
  transition: color var(--dur-fast);
}

/* g-item guarantee */
.g-item {
  transition: background var(--dur-fast), border-color var(--dur-fast);
}

.g-item:hover {
  background: var(--surface-base);
  border-color: var(--brand-primary);
}

/* Product box */
.product-box {
  transition: box-shadow var(--dur-med) var(--ease-out);
}

.product-box:hover {
  box-shadow: 0 0 0 6px rgba(61, 26, 124, 0.1), var(--shadow-md);
}

/* ── SIGNATURE MOTION: MAGNETIC BUTTON ──────────────────────── */
/* The main CTA in the hero / power sections gets magnetic behavior via JS */
.btn--magnetic {
  transition: transform 0.25s var(--ease-out),
              box-shadow 0.25s var(--ease-out),
              background var(--dur-fast);
}

/* ── COUNTDOWN PULSE ────────────────────────────────────────── */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.7; }
}

.countdown {
  animation: pulse 2s ease-in-out infinite;
}

/* ── STICKY BAR ENTRANCE ────────────────────────────────────── */
.sticky-bar {
  transform: translateY(100%);
  transition: transform 0.45s var(--ease-out);
}

.sticky-bar.sticky-visible {
  transform: translateY(0);
}

/* ── IMAGE PARALLAX CLASS ───────────────────────────────────── */
.parallax-img {
  will-change: transform;
}

/* ── SECTION ENTRY POLISH ───────────────────────────────────── */
.s-comparison .section-title,
.s-features .section-title,
.s-testimonials .section-title {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.s-comparison .section-title.is-visible,
.s-features .section-title.is-visible,
.s-testimonials .section-title.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* ── PROGRESS BAR GLOW ──────────────────────────────────────── */
.progress-bar::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background: var(--brand-secondary);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--brand-secondary);
}

/* ── REDUCED MOTION — already in tokens.css as global rule ──── */
/* (no duplication needed) */
