/* Custom styles beyond Tailwind utilities */

/* Scroll-triggered fade-in animation */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children animation */
.fade-in-group > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.fade-in-group.visible > *:nth-child(1) { transition-delay: 0s; }
.fade-in-group.visible > *:nth-child(2) { transition-delay: 0.1s; }
.fade-in-group.visible > *:nth-child(3) { transition-delay: 0.2s; }
.fade-in-group.visible > *:nth-child(4) { transition-delay: 0.3s; }
.fade-in-group.visible > *:nth-child(5) { transition-delay: 0.4s; }

.fade-in-group.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* Hero background pattern */
.hero-pattern {
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.07) 1px, transparent 0);
  background-size: 40px 40px;
}

/* FAQ accordion animation */
details summary {
  cursor: pointer;
  list-style: none;
}

details summary::-webkit-details-marker {
  display: none;
}

details summary .faq-chevron {
  transition: transform 0.3s ease;
}

details[open] summary .faq-chevron {
  transform: rotate(180deg);
}

details .faq-answer {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding-top: 0;
  padding-bottom: 0;
}

details[open] .faq-answer {
  max-height: 500px;
  padding-top: 1rem;
  padding-bottom: 0.5rem;
}

/* Navbar transition */
.nav-scrolled {
  background-color: rgba(75, 51, 94, 0.95) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Price counter animation */
@keyframes countUp {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

.price-reveal {
  animation: countUp 0.5s ease-out forwards;
}

/* Comparison card highlight pulse */
.card-recommended {
  box-shadow: 0 0 0 2px #4B335E, 0 4px 24px rgba(75, 51, 94, 0.2);
}

/* Smooth scroll for the whole page */
html {
  scroll-behavior: smooth;
}

/* Lightbox dialog */
dialog#lightbox {
  border: none;
  outline: none;
  overflow: hidden;
}

dialog#lightbox[open] {
  animation: lightboxIn 0.2s ease-out;
}

@keyframes lightboxIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Mobile floating CTA */
.floating-cta {
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.floating-cta.show {
  transform: translateY(0);
}
