/* ==========================================================================
   FAQ — Premium accordion (Apple / Microsoft style)
   ========================================================================== */

.faq--premium {
  position: relative;
  overflow: hidden;
}

/* Reset legacy landing.css per-card box inside grouped layout */
.faq--premium .faq-item--premium {
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.faq--premium .faq-item--premium:hover,
.faq--premium .faq-item--premium.is-open {
  border: none;
  box-shadow: none;
}

.faq--premium .faq-item__panel {
  max-height: none;
  opacity: 1;
  transform: none;
}

.faq__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.faq__aurora {
  position: absolute;
  inset: -15%;
  opacity: 0.85;
  filter: blur(72px) saturate(140%);
  background-image:
    radial-gradient(at 15% 30%, rgba(16, 185, 129, 0.12) 0%, transparent 50%),
    radial-gradient(at 85% 20%, rgba(14, 165, 233, 0.08) 0%, transparent 52%),
    radial-gradient(at 50% 90%, rgba(251, 191, 36, 0.06) 0%, transparent 55%);
  animation: faqAuroraDrift 20s ease-in-out infinite alternate;
}

@keyframes faqAuroraDrift {
  0% { transform: translate3d(-8px, 6px, 0) scale(1.02); }
  100% { transform: translate3d(10px, -8px, 0) scale(1.05); }
}

.faq__container {
  position: relative;
  z-index: 1;
}

/* Single grouped surface — iOS / Fluent style */
.faq__group {
  max-width: 44rem;
  margin-inline: auto;
  border-radius: var(--radius-2xl);
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 16px 48px rgba(15, 23, 42, 0.07);
  overflow: hidden;
}

.faq-item--premium + .faq-item--premium {
  border-top: 1px solid rgba(15, 23, 42, 0.07);
}

.faq-item--premium {
  transition: background-color 0.25s ease;
}

.faq-item--premium.is-open {
  background: rgba(236, 253, 245, 0.45);
}

.faq-item__heading {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
}

.faq-item__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: clamp(18px, 2.2vw, 22px) clamp(20px, 2.4vw, 28px);
  font-family: inherit;
  font-size: clamp(0.9375rem, 1.6vw, 1.0625rem);
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.02em;
  text-align: left;
  color: var(--color-text);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.faq-item__trigger:hover {
  color: var(--color-primary);
}

.faq-item__trigger:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(5, 150, 105, 0.35);
}

.faq-item__question {
  flex: 1;
  min-width: 0;
}

.faq-item__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--color-primary);
  background: rgba(5, 150, 105, 0.08);
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.25s ease,
    color 0.25s ease;
}

.faq-item__icon svg {
  width: 20px;
  height: 20px;
}

.faq-item--premium.is-open .faq-item__icon {
  transform: rotate(180deg);
  background: var(--gradient-primary);
  color: #fff;
}

/* Smooth height via grid */
.faq-item__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.faq-item--premium.is-open .faq-item__panel {
  grid-template-rows: 1fr;
}

.faq-item__panel[hidden] {
  display: none;
}

.faq-item--premium.is-open .faq-item__panel[hidden] {
  display: grid;
}

.faq-item__content {
  overflow: hidden;
  min-height: 0;
}

.faq-item__answer {
  margin: 0;
  padding: 0 clamp(20px, 2.4vw, 28px) clamp(20px, 2.4vw, 26px);
  font-size: var(--text-sm);
  line-height: 1.75;
  color: var(--color-text-secondary);
}

.faq-item--premium.is-open .faq-item__answer {
  animation: faqAnswerIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}

@keyframes faqAnswerIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .faq__aurora {
    animation: none;
  }

  .faq-item__panel {
    transition: none;
  }

  .faq-item--premium.is-open .faq-item__answer {
    animation: none;
  }

  .faq-item__icon {
    transition: background 0.2s ease, color 0.2s ease;
  }
}
