/* Motion — respects prefers-reduced-motion */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .marquee-track { animation: none !important; }
}

/* Ambient background */
.orb { animation: orb-drift 18s ease-in-out infinite alternate; }
.orb-2 { animation-delay: -6s; animation-duration: 22s; }
.orb-3 { animation-delay: -12s; animation-duration: 16s; }

@keyframes orb-drift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, -20px) scale(1.08); }
}

.mesh-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(37, 99, 235, 0.12), transparent),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(132, 204, 22, 0.08), transparent),
    radial-gradient(ellipse 40% 30% at 90% 70%, rgba(251, 191, 36, 0.1), transparent);
  pointer-events: none;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image: url("../assets/grid-pattern.svg");
  opacity: 0.7;
  mask-image: linear-gradient(to bottom, black 0%, transparent 85%);
  pointer-events: none;
}

/* Hero entrance */
.hero-copy { animation: hero-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) both; }
.hero-visual-wrap { animation: hero-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both; }

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

/* Gradient text shimmer */
.gradient-text {
  background-size: 200% auto;
  animation: shimmer 6s linear infinite;
}
@keyframes shimmer {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* Floating badges */
.float-badge {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  z-index: 2;
}
.float-badge--points { color: var(--accent); top: 12%; left: -4%; animation: float-badge 5s ease-in-out infinite; }
.float-badge--star { color: var(--orange); top: 55%; right: -8%; animation: float-badge 4.2s ease-in-out infinite 0.6s; }
.float-badge--done { color: var(--success); bottom: 18%; left: 0; animation: float-badge 4.8s ease-in-out infinite 1.2s; }

.float-badge-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.75rem;
}
.float-badge--points .float-badge-icon { background: var(--accent-light); }
.float-badge--star .float-badge-icon { background: #FEF3C7; }
.float-badge--done .float-badge-icon { background: #D1FAE5; }

@keyframes float-badge {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-14px) rotate(1deg); }
}

/* Phone mockup */
.phone-mockup {
  position: relative;
  width: min(280px, 100%);
  margin: 0 auto;
  z-index: 1;
}
.phone-frame {
  position: relative;
  padding: 12px;
  background: linear-gradient(145deg, #1e293b, #0f172a);
  border-radius: 40px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.1) inset,
    0 25px 60px -12px rgba(15, 23, 42, 0.45),
    0 0 80px rgba(37, 99, 235, 0.15);
  animation: phone-tilt 8s ease-in-out infinite;
}
.phone-notch {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 24px;
  background: #0f172a;
  border-radius: 0 0 14px 14px;
  z-index: 3;
}
.phone-screen {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  background: linear-gradient(160deg, var(--accent), var(--accent-dark));
  aspect-ratio: 9/19;
  min-height: 420px;
}
.phone-screenshot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.phone-screen-inner {
  position: absolute;
  inset: 0;
  padding: 48px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.phone-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.phone-header img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.phone-header-text strong {
  display: block;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
}
.phone-header-text span {
  color: rgba(255,255,255,0.7);
  font-size: 0.75rem;
}

.quest-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.95);
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  animation: quest-slide-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.quest-chip:nth-child(2) { animation-delay: 0.15s; }
.quest-chip:nth-child(3) { animation-delay: 0.3s; }
.quest-chip:nth-child(4) { animation-delay: 0.45s; }
.quest-chip:nth-child(5) { animation-delay: 0.6s; }

.quest-chip-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.quest-chip-icon--blue { background: #DBEAFE; }
.quest-chip-icon--green { background: #D1FAE5; }
.quest-chip-icon--amber { background: #FEF3C7; }

.quest-chip-text {
  flex: 1;
  min-width: 0;
}
.quest-chip-text strong {
  display: block;
  font-size: 0.8rem;
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.quest-chip-text span {
  font-size: 0.7rem;
  color: var(--text-2);
}
.quest-chip-pts {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent);
}

.quest-chip--done {
  opacity: 0.85;
  animation: quest-complete 0.8s ease 2s both;
}
.quest-chip:last-of-type {
  animation: quest-slide-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.45s both,
    quest-pulse 3s ease-in-out 2.5s infinite;
}
@keyframes quest-pulse {
  0%, 100% { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
  50% { box-shadow: 0 4px 20px rgba(37, 99, 235, 0.25); }
}
@keyframes quest-slide-in {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes quest-complete {
  0% { background: rgba(255,255,255,0.95); }
  50% { background: #D1FAE5; transform: scale(1.02); }
  100% { background: #D1FAE5; }
}

.phone-glow {
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle, rgba(37,99,235,0.25) 0%, transparent 70%);
  z-index: -1;
  animation: glow-pulse 4s ease-in-out infinite;
}
@keyframes glow-pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}
@keyframes phone-tilt {
  0%, 100% { transform: perspective(800px) rotateY(-4deg) rotateX(2deg); }
  50% { transform: perspective(800px) rotateY(4deg) rotateX(-1deg); }
}

/* Hero scene backdrop */
.hero-scene-bg {
  position: absolute;
  inset: -10% -15%;
  width: 130%;
  max-width: none;
  opacity: 0.9;
  z-index: 0;
  pointer-events: none;
}

/* Stats */
.stat {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s;
}
.stat:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.stat-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: icon-pop 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.stat:nth-child(1) .stat-icon { background: #DBEAFE; animation-delay: 0.1s; }
.stat:nth-child(2) .stat-icon { background: #D1FAE5; animation-delay: 0.2s; }
.stat:nth-child(3) .stat-icon { background: #FEF3C7; animation-delay: 0.3s; }

@keyframes icon-pop {
  from { transform: scale(0.6); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.stat-value {
  background: linear-gradient(135deg, var(--accent), var(--green));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Feature cards */
.feature-card {
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--green), var(--orange));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.feature-card:hover::before { transform: scaleX(1); }

.feature-card img {
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.feature-card:hover img {
  transform: scale(1.08) rotate(-3deg);
}

/* Showcase */
.showcase-panel {
  position: relative;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transition: transform 0.4s, box-shadow 0.4s;
}
.showcase-panel:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.12);
}
.showcase-panel--parent { border-top: 4px solid var(--success); }
.showcase-panel--child { border-top: 4px solid var(--accent); }

.showcase-panel img {
  width: 100%;
  border-radius: 12px;
  margin-top: 16px;
}

.showcase-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.showcase-label--parent { background: #D1FAE5; color: #059669; }
.showcase-label--child { background: var(--accent-light); color: var(--accent-dark); }

/* Steps animation */
.steps li {
  opacity: 0;
  transform: translateX(-16px);
  transition: opacity 0.5s, transform 0.5s;
}
.steps.visible li {
  opacity: 1;
  transform: translateX(0);
}
.steps.visible li:nth-child(1) { transition-delay: 0.1s; }
.steps.visible li:nth-child(2) { transition-delay: 0.25s; }
.steps.visible li:nth-child(3) { transition-delay: 0.4s; }

.step-num {
  transition: transform 0.3s;
}
.steps li:hover .step-num {
  transform: scale(1.1) rotate(-5deg);
}

/* How flow SVG */
.how-flow-img {
  animation: how-float 6s ease-in-out infinite;
}
@keyframes how-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Marquee */
.marquee-section {
  padding: 24px 0;
  overflow: hidden;
  border-block: 1px solid var(--border);
  background: var(--surface);
}
.marquee-track {
  display: flex;
  gap: 48px;
  width: max-content;
  animation: marquee 28s linear infinite;
}
.marquee-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
}
.marquee-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.5;
}
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Testimonials */
.testimonial-card {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: transform 0.35s, box-shadow 0.35s;
}
.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.testimonial-stars {
  color: var(--yellow);
  font-size: 1rem;
  letter-spacing: 2px;
  margin-bottom: 12px;
}
.testimonial-quote {
  margin: 0 0 20px;
  font-size: 0.95rem;
  color: var(--text-2);
  line-height: 1.65;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.testimonial-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
}
.testimonial-author strong {
  display: block;
  font-size: 0.9rem;
}
.testimonial-author span {
  font-size: 0.8rem;
  color: var(--text-3);
}

/* Download CTA */
.download-card {
  position: relative;
  overflow: hidden;
}
.download-card::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
  animation: cta-glow 6s ease-in-out infinite;
}
.download-deco {
  position: absolute;
  right: 48px;
  bottom: -20px;
  opacity: 0.2;
  animation: float-badge 5s ease-in-out infinite;
}
@keyframes cta-glow {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-20px, 10px); }
}

/* Store badges — hover on img via styles.css */

/* Button shine */
.btn-primary {
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  animation: btn-shine 4s ease-in-out infinite;
}
@keyframes btn-shine {
  0%, 100% { left: -100%; }
  50% { left: 150%; }
}

/* Eyebrow pulse */
.eyebrow {
  animation: eyebrow-glow 3s ease-in-out infinite;
}
@keyframes eyebrow-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
  50% { box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08); }
}

/* Stagger children */
.stagger-children.visible > * {
  animation: stagger-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.stagger-children.visible > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-children.visible > *:nth-child(2) { animation-delay: 0.12s; }
.stagger-children.visible > *:nth-child(3) { animation-delay: 0.19s; }
.stagger-children.visible > *:nth-child(4) { animation-delay: 0.26s; }
.stagger-children.visible > *:nth-child(5) { animation-delay: 0.33s; }
.stagger-children.visible > *:nth-child(6) { animation-delay: 0.4s; }

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

/* Confetti dots in hero */
.confetti {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  opacity: 0.6;
  animation: confetti-fall 12s linear infinite;
}
.confetti:nth-child(1) { left: 10%; background: var(--accent); animation-delay: 0s; }
.confetti:nth-child(2) { left: 25%; background: var(--green); animation-delay: 2s; width: 6px; height: 6px; }
.confetti:nth-child(3) { left: 60%; background: var(--orange); animation-delay: 4s; }
.confetti:nth-child(4) { left: 80%; background: var(--yellow); animation-delay: 1s; width: 10px; height: 10px; border-radius: 50%; }
.confetti:nth-child(5) { left: 45%; background: var(--accent); animation-delay: 6s; }

@keyframes confetti-fall {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.4; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}
