/**
 * FAQ accordion — Figma desktop 1920.
 * Left: heading + quote + dark CTA. Right: 1117px accordion column.
 */

.home-v2 .v2-section--faq,
.v2-section--faq {
  padding-block: clamp(48px, 6.25vw, 120px);
}

.v2-faq__layout {
  display: grid;
  grid-template-columns: minmax(0, clamp(280px, 31.89vw, 574px)) minmax(0, 1fr);
  gap: clamp(32px, 6.042vw, 109px);
  align-items: stretch;
}

.v2-faq__aside {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.v2-faq__aside-sticky {
  flex: 1 1 auto;
  min-height: 0;
}

.v2-faq__head {
  display: flex;
  flex-direction: column;
  gap: calc(100vw * 20 / 1920);
  position: sticky;
  top: clamp(64px, 4.688vw, 90px);
  align-self: flex-start;
  z-index: 5;
  width: 100%;
  max-width: min(31.89vw, 574px);
  background: var(--color-canvas);
  padding-bottom: clamp(16px, 1.042vw, 20px);
}

.v2-faq__head .v2-descriptor {
  margin: 0;
  gap: 15px;
  font-size: clamp(16px, 1.042vw, 20px);
  line-height: 1;
  color: rgba(32, 32, 32, 0.4);
}

.v2-faq__head .v2-descriptor__dot {
  width: 10px;
  height: 10px;
  background: #64db69;
}

.v2-faq__heading {
  margin: 0;
  max-width: 100%;
  font-size: clamp(32px, 4.271vw, 82px);
  font-weight: 500;
  line-height: 1.05;
}

.v2-faq__heading-line {
  display: block;
  color: #202020;
}

.v2-faq__heading-accent {
  color: #64db69;
}

.v2-faq__foot {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 1.563vw, 30px);
  max-width: min(31.89vw, 574px);
  margin-top: auto;
  flex-shrink: 0;
  position: relative;
  z-index: 6;
}

.v2-faq__quote {
  margin: 0;
  font-size: clamp(16px, 1.042vw, 20px);
  font-weight: 400;
  line-height: 1.2;
  color: rgba(32, 32, 32, 0.4);
}

.v2-faq__accordion {
  min-width: 0;
  border-top: 1px dotted rgba(32, 32, 32, 0.2);
}

.v2-faq__item {
  border-bottom: 1px dotted rgba(32, 32, 32, 0.2);
}

.v2-faq__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(16px, 2.083vw, 40px);
  width: 100%;
  padding-block: clamp(20px, 2.083vw, 40px);
  padding-inline: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.v2-faq__question {
  flex: 1;
  min-width: 0;
  font-size: clamp(20px, 1.667vw, 32px);
  font-weight: 500;
  line-height: 1;
  color: #202020;
}

.v2-faq__question-set--mobile {
  display: none;
}

.v2-faq__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: clamp(40px, 3.125vw, 60px);
  height: clamp(40px, 3.125vw, 60px);
  border-radius: 50%;
  background: #202020;
  transition: background-color 0.5s ease;
}

.v2-faq__toggle img {
  display: block;
  width: clamp(16px, 1.146vw, 22px);
  height: clamp(16px, 1.146vw, 22px);
  transition: transform 0.3s ease;
}

.v2-faq__item.is-open .v2-faq__toggle {
  background: #64db69;
}

.v2-faq__item.is-open .v2-faq__toggle img {
  transform: rotate(45deg);
}

.v2-faq__panel {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition:
    max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.2s ease;
  will-change: max-height;
}

.v2-faq__item.is-open .v2-faq__panel {
  max-height: var(--v2-faq-panel-height, 1000px);
  opacity: 1;
}

.v2-faq__panel-inner {
  min-height: 0;
}

.v2-faq__answer {
  margin: 0;
  max-width: min(27.67vw, 498px);
  padding-top: clamp(8px, 1.563vw, 30px);
  padding-bottom: clamp(20px, 2.083vw, 40px);
  font-size: clamp(16px, 1.042vw, 20px);
  font-weight: 400;
  line-height: 1.2;
  color: rgba(32, 32, 32, 0.6);
}

@media (max-width: 1023px) {
  .home-v2 .v2-section--faq,
  .v2-section--faq {
    padding-top: var(--v2-section-gap);
    padding-bottom: calc(100vw * 100 / 390);
  }

  .v2-faq__layout {
    display: flex;
    flex-direction: column;
    gap: calc(100vw * 28 / 390);
  }

  .v2-faq__aside {
    display: contents;
  }

  .v2-faq__aside-sticky {
    order: 1;
    display: block;
    width: 100%;
  }

  .v2-faq__head {
    gap: calc(100vw * 15 / 390);
    position: sticky;
    top: calc(100vw * 70 / 390 + 8px);
    z-index: 5;
    width: 100%;
    max-width: none;
    background: var(--color-canvas);
    padding-bottom: calc(100vw * 12 / 390);
  }

  .v2-section--faq .v2-faq__head .v2-descriptor {
    gap: calc(100vw * 10 / 390);
    font-size: calc(100vw * 12 / 390);
    font-weight: 400;
    line-height: 1;
    color: rgba(32, 32, 32, 0.4);
  }

  .v2-section--faq .v2-faq__head .v2-descriptor__dot {
    width: calc(100vw * 6 / 390);
    height: calc(100vw * 6 / 390);
    background: #64db69;
  }

  .v2-faq__heading {
    font-size: calc(100vw * 34 / 390);
    line-height: 1.05;
  }

  .v2-faq__heading-line {
    display: block;
  }

  .v2-faq__heading-main,
  .v2-faq__heading-accent {
    display: block;
  }

  .v2-faq__accordion {
    order: 2;
    border-top: 1px dotted rgba(32, 32, 32, 0.2);
  }

  .v2-faq__item {
    border-bottom: 1px dotted rgba(32, 32, 32, 0.2);
  }

  .v2-faq__trigger {
    align-items: flex-start;
    gap: calc(100vw * 16 / 390);
    padding-block: calc(100vw * 20 / 390);
  }

  .v2-faq__question {
    font-size: calc(100vw * 18 / 390);
    font-weight: 500;
    line-height: 1.12;
  }

  .v2-faq__question-set--desktop {
    display: none;
  }

  .v2-faq__question-set--mobile {
    display: block;
  }

  .v2-faq__question-set--mobile .v2-faq__question-line {
    display: block;
  }

  .v2-faq__toggle {
    align-self: flex-start;
    width: calc(100vw * 40 / 390);
    height: calc(100vw * 40 / 390);
  }

  .v2-faq__toggle img {
    width: calc(100vw * 16 / 390);
    height: calc(100vw * 16 / 390);
  }

  .v2-faq__answer {
    max-width: none;
    padding-top: calc(100vw * 8 / 390);
    padding-bottom: calc(100vw * 20 / 390);
    font-size: calc(100vw * 14 / 390);
    line-height: 1.2;
    color: rgba(32, 32, 32, 0.6);
  }

  .v2-faq__foot {
    order: 3;
    display: flex;
    flex-direction: column;
    gap: calc(100vw * 20 / 390);
    max-width: none;
    width: 100%;
    position: relative;
    z-index: 6;
  }

  .v2-faq__quote {
    font-size: calc(100vw * 14 / 390);
    line-height: 1.2;
    color: rgba(32, 32, 32, 0.4);
  }

  .v2-section--faq .v2-faq__foot .v2-btn--dark {
    --cta-size: calc(100vw * 60 / 390);
    display: flex;
    align-items: center;
    width: 100%;
    max-width: none;
    height: var(--cta-size);
    gap: 0;
    text-decoration: none;
  }

  .v2-section--faq .v2-faq__foot .v2-btn--dark .v2-btn__text {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    height: var(--cta-size);
    min-height: var(--cta-size);
    padding: calc(100vw * 14 / 390) calc(100vw * 28 / 390);
    font-size: calc(100vw * 16 / 390);
  }

  .v2-section--faq .v2-faq__foot .v2-btn--dark .v2-btn__icon {
    width: var(--cta-size);
    min-width: var(--cta-size);
    height: var(--cta-size);
  }
}

@media (min-width: 1024px) {
  .v2-faq__layout {
    grid-template-columns:
      var(--v2-grid-col-1, calc(100vw * 663 / 1920))
      var(--v2-grid-main-width, calc(100vw * 1117 / 1920));
    gap: var(--v2-grid-gap, calc(100vw * 20 / 1920));
  }

  .v2-faq__head,
  .v2-faq__foot {
    max-width: var(--v2-grid-col-1, calc(100vw * 663 / 1920));
  }

  .v2-faq__item.is-open .v2-faq__trigger {
    padding-bottom: 0;
  }

  .v2-faq__answer {
    padding-top: calc(100vw * 40 / 1920);
    padding-bottom: calc(100vw * 40 / 1920);
  }

  .v2-faq__quote-line,
  .v2-faq__question-line {
    display: block;
  }
}

/* Meta FAQ — grouped accordion (A/B/C/D). */
.v2-section--meta-faq .v2-faq__group + .v2-faq__group {
  margin-top: clamp(24px, calc(100vw * 40 / 1920), 40px);
}

.v2-section--meta-faq .v2-faq__group-label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.28em;
  margin: 0;
  padding-block: clamp(16px, calc(100vw * 20 / 1920), 20px);
  font-size: clamp(16px, 1.042vw, 20px);
  font-weight: 400;
  line-height: 1;
  color: rgba(32, 32, 32, 0.4);
}

.v2-section--meta-faq .v2-faq__group:first-child .v2-faq__group-label {
  padding-top: 0;
}

.v2-section--meta-faq .v2-faq__group-mark,
.v2-section--meta-faq .v2-faq__group-name {
  display: inline;
}

@media (max-width: 1023px) {
  .v2-section--meta-faq .v2-faq__group + .v2-faq__group {
    margin-top: calc(100vw * 24 / 390);
  }

  .v2-section--meta-faq .v2-faq__group-label {
    gap: 0.2em;
    padding-block: calc(100vw * 16 / 390);
    font-size: calc(100vw * 12 / 390);
  }
}
