/* =========================================================
   Section 6 — Frequently Asked Questions
   Figma node 2132:3823 (desktop 1512 × 785, bg #0D1117)
   ========================================================= */

.faq {
  position: relative;
  padding-block: 96px;
  /* #020D18 from section 5 fades into #0D1117 */
  background: linear-gradient(180deg, #020d18 0, #020d18 60px, var(--color-bg-fade) 210px);
}

/* ---------- Heading ---------- */
.faq__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.faq__title {
  font-size: 52px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.52px;
  color: var(--color-white);
}

.faq__title-accent { color: var(--color-amber); }

.faq__subtitle {
  max-width: 880px;
  font-size: 20px;
  line-height: 1.7;
  color: var(--color-text-muted);
}

/* ---------- Accordion ---------- */
.faq__list {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-top: 41px;
}

.faq-item {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 24px;
  background:
    linear-gradient(169.15deg, rgba(22, 27, 34, 0.2) 71.337%, rgba(255, 255, 255, 0.2) 110.66%),
    #161b22;
  box-shadow:
    0 5.021px 10.878px 0 rgba(8, 8, 8, 0.12),
    0 20.083px 20.083px -13.389px rgba(8, 8, 8, 0.08);
  transition: background 0.3s ease;
}

.faq-item.is-open {
  background:
    linear-gradient(160.51deg, rgba(22, 27, 34, 0.2) 71.337%, rgba(255, 255, 255, 0.2) 110.66%),
    #161b22;
}

/* stroke + inner highlight, inside the card like Figma */
.faq-item::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 1px solid #30363d;
  border-radius: inherit;
  box-shadow: inset 1.674px 3.347px 13.389px 0 rgba(253, 253, 253, 0.05);
  pointer-events: none;
}

/* soft light near the top of each card (Figma "Ellipse 46675") */
.faq-item::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 305px;
  top: -141px;
  width: 640px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0));
  filter: blur(30px);
  pointer-events: none;
}

/* square grid pattern on the right */
.faq-item__pattern {
  position: absolute;
  z-index: -1;
  top: -1px;
  right: 7px;
  width: 281px;
  height: 141px;
  max-width: none;
  pointer-events: none;
}

.faq-item__question {
  margin: 0;
  font: inherit;
}

.faq-item__trigger {
  display: flex;
  align-items: center;
  gap: 28px;
  width: 100%;
  padding: 18px 20px;
  text-align: left;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--color-white);
  cursor: pointer;
}

.faq-item__trigger:focus-visible {
  outline: 2px solid var(--color-amber);
  outline-offset: -4px;
  border-radius: 24px;
}

.faq-item__label { flex: 1 1 auto; min-width: 0; }

.faq-item__icon {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1.543px solid #414141;
  border-radius: 50%;
  background: radial-gradient(circle 17.8px at 50% 0, #202020, #141414);
  box-shadow: inset 0 0.159px 0 #777, 0 3.492px 0.794px rgba(0, 0, 0, 0.3);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.faq-item__icon img {
  width: 30px;
  height: 30px;
  transform: rotate(90deg);                /* closed ↘ */
  transition: transform 0.35s var(--ease-out);
}

.faq-item.is-open .faq-item__icon img { transform: rotate(0deg); }   /* open ↗ */

.faq-item__trigger:hover .faq-item__icon {
  border-color: var(--color-amber);
  box-shadow: inset 0 0.159px 0 #777, 0 0 14px rgba(255, 179, 0, 0.25);
}

/* smooth height animation via grid rows */
.faq-item__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s var(--ease-out), margin-top 0.4s var(--ease-out);
}

/* answer starts 8px under the 42px question row (Figma) */
.faq-item.is-open .faq-item__panel {
  grid-template-rows: 1fr;
  margin-top: -10px;
}

.faq-item__panel > div { overflow: hidden; }

.faq-item__answer {
  margin: 0;
  padding: 0 20px 18px;
  font-size: 18px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.3s ease, transform 0.4s var(--ease-out);
}

.faq-item.is-open .faq-item__answer {
  opacity: 1;
  transform: none;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1199px) {
  .faq__title { font-size: 44px; }
}

@media (max-width: 991px) {
  .faq__title    { font-size: 40px; }
  .faq__subtitle { font-size: 18px; }
  .faq-item__trigger { font-size: 20px; }
  .faq-item__answer  { font-size: 16px; }
}

/* Mobile — matches section_6_mobile.png (430 wide) */
@media (max-width: 767px) {
  .faq {
    padding-top: 31px;
    padding-bottom: 32px;
    background: linear-gradient(180deg, #020d18 0, var(--color-bg-fade) 120px);
  }

  .faq__head { gap: 16px; }

  .faq__title {
    font-size: 26px;
    letter-spacing: -0.26px;
  }

  .faq__subtitle { font-size: 16px; }

  .faq__list { gap: 22px; }

  .faq-item__trigger {
    gap: 16px;
    padding: 14.5px 19px;
    font-size: 18px;
    font-weight: 600;
    line-height: 30px;
  }

  .faq-item__icon {
    width: 34px;
    height: 34px;
    background: radial-gradient(circle 14.4px at 50% 0, #202020, #141414);
  }

  .faq-item__icon img { width: 24px; height: 24px; }

  .faq-item.is-open .faq-item__panel { margin-top: -6.5px; }

  .faq-item__answer {
    padding: 0 19px 14.5px;
    font-size: 14px;
  }

  .faq-item__pattern {
    width: 200px;
    height: auto;
    right: 0;
    opacity: 0.5;
  }
}

/* Phones & tablets: the glow gradient is already soft — skip blur(30px) */
@media (max-width: 991px), (hover: none) and (pointer: coarse) {
  .faq-item::before {
    filter: none;
    background: radial-gradient(closest-side, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025) 60%, rgba(255, 255, 255, 0));
  }
}
