/**
 * Quotely Landing — Extra Visual Effects
 * Gradient animations, shimmer, glow, hover cards, mobile menu
 */

/* ═════════════════════════════════════════════════════════════════
   1. SCROLL REVEAL — base + revealed state
   ═════════════════════════════════════════════════════════════════ */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

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

.reveal.revealed.scale {
  transform: scale(1);
}

.reveal.scale {
  transform: scale(0.92);
}

/* Stagger delay utilities */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }
.delay-500 { transition-delay: 500ms; }
.delay-600 { transition-delay: 600ms; }

/* ═════════════════════════════════════════════════════════════════
   2. HERO GRADIENT MESH — animated radial gradients
   ═════════════════════════════════════════════════════════════════ */

.hero-gradient,
.hero {
  position: relative;
  overflow: hidden;
  background-color: #0a0a1a;
}

.hero-gradient::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 30%, rgba(99, 102, 241, 0.25) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 70%, rgba(168, 85, 247, 0.2) 0%, transparent 50%);
  animation: gradientShift 8s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

@keyframes gradientShift {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(-3%, 2%) scale(1.05);
  }
  100% {
    transform: translate(3%, -2%) scale(1);
  }
}

/* ═════════════════════════════════════════════════════════════════
   3. SHIMMER — sweeping light on badges / tags
   ═════════════════════════════════════════════════════════════════ */

.shimmer {
  position: relative;
  overflow: hidden;
}

.shimmer::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.15) 50%,
    transparent 100%
  );
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* ═════════════════════════════════════════════════════════════════
   4. GLOW — CTA button pulse
   ═════════════════════════════════════════════════════════════════ */

.glow-btn,
.cta-btn {
  position: relative;
  z-index: 1;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
  transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.glow-btn:hover,
.cta-btn:hover {
  box-shadow: 0 0 35px rgba(99, 102, 241, 0.6), 0 0 80px rgba(99, 102, 241, 0.2);
  transform: translateY(-2px);
}

.glow-pulse::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  background: rgba(99, 102, 241, 0.3);
  animation: glowPulse 2s ease-in-out infinite;
  z-index: -1;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

/* ═════════════════════════════════════════════════════════════════
   5. GLASS CARDS — hover + tilt base
   ═════════════════════════════════════════════════════════════════ */

.glass-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  transform-style: preserve-3d;
  will-change: transform;
}

.glass-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(99, 102, 241, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Light highlight on hover — follows mouse via JS tilt */
.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    250px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(255, 255, 255, 0.06) 0%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.glass-card:hover::before {
  opacity: 1;
}

/* ═════════════════════════════════════════════════════════════════
   6. RIPPLE — click effect on buttons
   ═════════════════════════════════════════════════════════════════ */

.btn-ripple,
.cta-btn,
button[type="submit"] {
  position: relative;
  overflow: hidden;
}

.ripple-circle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transform: scale(0);
  animation: ripple 0.6s ease-out forwards;
  pointer-events: none;
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ═════════════════════════════════════════════════════════════════
   7. NAVIGATION — frosted glass on scroll + mobile menu
   ═════════════════════════════════════════════════════════════════ */

nav {
  transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

nav.scrolled {
  background: rgba(10, 10, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Mobile menu */
nav .nav-links {
  transition: transform 0.35s ease, opacity 0.35s ease;
}

@media (max-width: 768px) {
  nav .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 75%;
    max-width: 320px;
    height: 100vh;
    background: rgba(10, 10, 26, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    flex-direction: column;
    padding: 80px 32px 32px;
    transform: translateX(100%);
    opacity: 0;
    z-index: 100;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
  }

  nav.open .nav-links {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Hamburger animation */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 200;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

nav.open .hamburger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

nav.open .hamburger span:nth-child(2) {
  opacity: 0;
}

nav.open .hamburger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }
}

/* ═════════════════════════════════════════════════════════════════
   8. PRICING — strikethrough + toggle styles
   ═════════════════════════════════════════════════════════════════ */

.price-strikethrough {
  text-decoration: line-through;
  opacity: 0;
  transition: opacity 0.3s ease;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.85em;
}

.price-strikethrough.visible {
  opacity: 1;
}

.pricing-toggle,
.billing-toggle {
  appearance: none;
  width: 52px;
  height: 28px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  position: relative;
  cursor: pointer;
  transition: background 0.3s ease;
}

.pricing-toggle::after,
.billing-toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.3s ease;
}

.pricing-toggle:checked,
.billing-toggle:checked {
  background: rgba(99, 102, 241, 0.7);
}

.pricing-toggle:checked::after,
.billing-toggle:checked::after {
  transform: translateX(24px);
}

/* ═════════════════════════════════════════════════════════════════
   9. REDUCED MOTION — disable all animations
   ═════════════════════════════════════════════════════════════════ */

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}