.faq-header-icon,
.faq-header h2,
.faq-header p,
.faq-filters,
.faq-cta,
.faq-item:not(.faq-item--filtered) {
  opacity: 0;
  transform: translateY(1.25rem);
}

.faq-header-icon {
  transform: scale(0.72);
}

.faq-section.is-in-view .faq-header-icon {
  animation: products-badge-pop 0.5s cubic-bezier(0.34, 1.45, 0.64, 1) 0s both;
}

.faq-section.is-in-view .faq-header h2 {
  animation: products-slide-up 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.28s both;
}

.faq-section.is-in-view .faq-header p {
  animation: products-slide-up 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.52s both;
}

.faq-section.is-in-view .faq-filters {
  animation: products-slide-up 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.66s both;
}

.faq-section.is-in-view .faq-item:not(.faq-item--filtered):not(.faq-item--filter-in):not(.faq-item--has-entered) {
  animation: products-slide-up 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(0.78s + var(--faq-entrance-index, 0) * 0.12s);
}

.faq-section.is-in-view .faq-item.faq-item--filter-in {
  animation: products-slide-up 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--faq-entrance-index, 0) * 0.12s);
}

.faq-item.faq-item--has-entered:not(.faq-item--filter-in):not(.faq-item--filter-out) {
  opacity: 1;
  transform: none;
}

.faq-item.faq-item--filter-out {
  pointer-events: none;
  animation: faq-filter-fade-out 0.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes faq-filter-fade-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(-0.75rem);
  }
}

.faq-section.is-in-view .faq-cta {
  animation: products-slide-up 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(0.78s + var(--faq-visible-count, 1) * 0.12s + 0.12s);
}

.faq-section {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  margin: 0;
  overflow: visible;
  background: transparent;
}

.faq-container {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
}

.faq-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  padding: 0;
  text-align: center;
}

.faq-header-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  margin: 0 0 1.25rem;
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 9999px;
  background: rgba(6, 182, 212, 0.2);
}

.faq-header-icon svg {
  display: block;
  width: 2rem;
  height: 2rem;
}

.faq-header h2 {
  margin: 0 0 1.25rem;
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
}

.faq-header p {
  margin: 0 0 1.25rem;
  max-width: 36rem;
  font-size: 1.25rem;
  line-height: 1.5;
  color: #9ca3af;
}

.faq-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
}

.faq-filter-pill {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.25;
  color: #d1d5db;
  border: 1px solid #374151;
  border-radius: 9999px;
  background: rgba(31, 41, 55, 0.5);
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.faq-filter-pill:hover {
  color: #e5e7eb;
  border-color: #4b5563;
  background: rgba(55, 65, 81, 0.5);
}

.faq-filter-pill--active,
.faq-filter-pill--active:hover {
  color: #22d3ee;
  border-color: rgba(6, 182, 212, 0.3);
  background: rgba(6, 182, 212, 0.2);
}

.faq-filters--busy {
  pointer-events: none;
}

.faq-filter-pill:disabled {
  cursor: default;
  opacity: 0.85;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  --faq-accordion-padding-x: 2rem;
  --faq-accordion-padding-y: 1.75rem;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 0.5rem;
  background: transparent;
  box-shadow:
    0 40px 120px rgba(0, 0, 0, 0.35),
    0 8px 30px rgba(56, 189, 248, 0.12);
  transition:
    translate 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.faq-item::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.faq-item > * {
  position: relative;
  z-index: 1;
}

.faq-item:hover {
  border-color: rgba(56, 189, 248, 0.45);
  translate: 0 -2px;
}

.faq-item--filtered {
  display: none;
}

.faq-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  margin: 0;
  padding: var(--faq-accordion-padding-y) var(--faq-accordion-padding-x);
  font-family: inherit;
  text-align: left;
  color: inherit;
  border: none;
  background: transparent;
  cursor: pointer;
}

.faq-button:focus-visible {
  outline: 2px solid #22d3ee;
  outline-offset: -2px;
}

.faq-button-main {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.faq-category-badge {
  flex-shrink: 0;
  width: 5rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  color: #22d3ee;
  text-align: center;
  white-space: nowrap;
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 0.25rem;
  background: rgba(6, 182, 212, 0.1);
}

.faq-button h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.35;
  color: #fff;
}

.faq-button-icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  color: #67e8f9;
  transition: transform 0.3s ease;
}

.faq-button-icon--open {
  transform: rotate(180deg);
}

.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  padding: 0 var(--faq-accordion-padding-x);
  transition:
    grid-template-rows 0.35s cubic-bezier(0.4, 1.2, 0.6, 1),
    padding-top 0.35s cubic-bezier(0.4, 1.2, 0.6, 1),
    padding-bottom 0.35s cubic-bezier(0.4, 1.2, 0.6, 1);
}

.faq-item--open .faq-answer {
  grid-template-rows: 1fr;
  padding-top: 0.25rem;
  padding-bottom: var(--faq-accordion-padding-y);
}

.faq-answer > p {
  overflow: hidden;
  min-height: 0;
  max-width: 87ch;
  margin: 0;
  padding: 0;
  font-size: 1rem;
  line-height: 1.625;
  color: #9ca3af;
}

.faq-cta-wrap {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}

.faq-cta {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 1rem 1.25rem;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 0.5rem;
  background: transparent;
  box-shadow:
    0 40px 120px rgba(0, 0, 0, 0.35),
    0 8px 30px rgba(56, 189, 248, 0.12);
}

.faq-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.faq-cta > * {
  position: relative;
  z-index: 1;
}

.faq-cta-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  text-align: left;
}

.faq-cta-content h3 {
  margin: 0 0 0.375rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.faq-cta-content p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #9ca3af;
}

.faq-cta-actions {
  display: flex;
  flex-shrink: 0;
  align-self: stretch;
  flex-direction: row;
  gap: 0.75rem;
}

.faq-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 8rem;
  height: 100%;
  padding: 0 2.5rem;
  font-size: 0.875rem;
  font-weight: 700;
  font-family: inherit;
  line-height: 1.25;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 0.5rem;
  transition:
    background 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease;
}

.faq-cta-btn--discord {
  width: 100%;
  font-size: 1.125rem;
  color: #22d3ee;
  border: 2px solid #06b6d4;
  border-radius: 0.75rem;
  background: transparent;
}

.faq-cta-btn--discord:hover {
  color: #67e8f9;
  border-color: #22d3ee;
  background: rgba(6, 182, 212, 0.1);
}

@media (prefers-reduced-motion: reduce) {
  .faq-header-icon,
  .faq-header h2,
  .faq-header p,
  .faq-filters,
  .faq-item,
  .faq-cta {
    opacity: 1;
    transform: none;
  }

  .faq-section.is-in-view .faq-header-icon,
  .faq-section.is-in-view .faq-header h2,
  .faq-section.is-in-view .faq-header p,
  .faq-section.is-in-view .faq-filters,
  .faq-section.is-in-view .faq-item:not(.faq-item--filtered),
  .faq-section.is-in-view .faq-cta,
  .faq-item.faq-item--filter-in,
  .faq-item.faq-item--filter-out {
    animation: none;
  }

  .faq-item.faq-item--has-entered {
    opacity: 1;
    transform: none;
  }

  .faq-answer {
    transition: none;
  }

  .faq-item--open .faq-answer {
    grid-template-rows: 1fr;
  }

  .faq-item:not(.faq-item--open) .faq-answer {
    grid-template-rows: 0fr;
  }

  .faq-button-icon {
    transition: none;
  }
}

