/* ==========================================================================
   LARES DUO - LANDING PAGE ANIMATIONS (anim.css)
   Lightweight, cozy, and progressive animations respecting brand design.
   Only transforms and opacity are animated.
   ========================================================================== */

/* --- 1. Floating Hero Elements --- */
@keyframes gentle-float-1 {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}

@keyframes gentle-float-2 {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(8px);
  }
}

.floating-card-left {
  animation: gentle-float-1 4s ease-in-out infinite;
  will-change: transform;
}

.floating-card-right {
  animation: gentle-float-2 5.5s ease-in-out infinite 0.8s;
  will-change: transform;
}

/* Pause infinite animations when off-screen or tab hidden */
.floating-card.is-paused,
.cupido-icon-glow.is-paused::before {
  animation-play-state: paused !important;
}

/* --- 2. Cupido AI Ambient Pulse Aura --- */
.cupido-icon-glow {
  position: relative;
}

.cupido-icon-glow::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 0.85rem;
  background: radial-gradient(circle, rgba(231, 111, 81, 0.4) 0%, rgba(66, 84, 192, 0.15) 60%, transparent 75%);
  pointer-events: none;
  z-index: 0;
  animation: cupido-aura-pulse 3.5s ease-in-out infinite;
  will-change: transform, opacity;
}

.cupido-icon-glow > * {
  position: relative;
  z-index: 1;
}

@keyframes cupido-aura-pulse {
  0%, 100% {
    transform: scale(0.96);
    opacity: 0.35;
  }
  50% {
    transform: scale(1.18);
    opacity: 0.85;
  }
}

/* --- 3. Scroll Reveal with Progressive Enhancement --- */
/* Elements are only hidden if JS has loaded and added .js-anim to <html> */
html.js-anim .reveal-item {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 500ms cubic-bezier(0.16, 1, 0.3, 1), transform 500ms cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

html.js-anim .reveal-item.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* --- 4. Interactive Opus Points Demo --- */
.opus-demo-card {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border-radius: 1.25rem;
  background: rgba(246, 244, 238, 0.7);
  border: 1px dashed rgba(122, 139, 250, 0.45);
  position: relative;
}

.opus-demo-btn {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  padding: 0.625rem 0.875rem;
  border-radius: 0.875rem;
  background: #ffffff;
  border: 1px solid rgba(229, 231, 235, 0.9);
  color: #1e1e38;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 200ms ease, box-shadow 200ms ease, transform 150ms ease;
  text-align: left;
  position: relative;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.opus-demo-btn:hover {
  border-color: rgba(66, 84, 192, 0.4);
  box-shadow: 0 2px 10px rgba(66, 84, 192, 0.08);
}

.opus-demo-btn:active {
  transform: scale(0.98);
}

.opus-demo-checkbox {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 0.375rem;
  border: 1.5px solid #9ca3af;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  transition: background-color 200ms ease, border-color 200ms ease;
  flex-shrink: 0;
}

.opus-demo-checkbox .material-symbols-outlined {
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 180ms ease, transform 180ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-size: 0.875rem;
  color: #ffffff;
  line-height: 1;
}

.opus-demo-btn[aria-pressed="true"] .opus-demo-checkbox {
  background-color: #4254c0;
  border-color: #4254c0;
  animation: opus-spring-pop 320ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.opus-demo-btn[aria-pressed="true"] .opus-demo-checkbox .material-symbols-outlined {
  opacity: 1;
  transform: scale(1);
}

@keyframes opus-spring-pop {
  0% {
    transform: scale(0.8);
  }
  60% {
    transform: scale(1.18);
  }
  100% {
    transform: scale(1);
  }
}

.opus-demo-badge {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  background: #FEF9E7;
  color: #92400E;
  border: 1px solid rgba(212, 175, 55, 0.45);
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  opacity: 0;
  will-change: transform, opacity;
}

.opus-demo-badge.is-animating {
  animation: opus-float-badge 900ms cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
}

@keyframes opus-float-badge {
  0% {
    opacity: 0;
    transform: translateY(-50%) translateY(4px) scale(0.9);
  }
  25% {
    opacity: 1;
    transform: translateY(-50%) translateY(-10px) scale(1.05);
  }
  75% {
    opacity: 0.95;
    transform: translateY(-50%) translateY(-20px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-50%) translateY(-26px) scale(0.95);
  }
}

/* --- 5. Accessibility: prefers-reduced-motion --- */
@media (prefers-reduced-motion: reduce) {
  html.js-anim .reveal-item {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .floating-card-left,
  .floating-card-right,
  .cupido-icon-glow::before {
    animation: none !important;
    transform: none !important;
  }
  .opus-demo-checkbox {
    animation: none !important;
    transition: none !important;
  }
  .opus-demo-badge {
    display: none !important;
  }
}
