/* v3 faq. Figma: FAQ 11001:2979 (1440), mobile 11307:11197 (430). */
.v3-faq {
  --faq-dash-v: repeating-linear-gradient(180deg, var(--v3-gray-50) 0 3px, transparent 3px 5px);
  --faq-dash-h: repeating-linear-gradient(90deg, var(--v3-gray-50) 0 3px, transparent 3px 5px);
  --faq-col: 320px;                                  /* group-title column */
  --faq-line-l: calc(var(--v3-gutter) - 12px);       /* outer guide lines sit 12px outside the content */
  --faq-line-c: calc(var(--v3-gutter) + var(--faq-col) + 6px);
  --faq-top: var(--v3-header-h, 62px);
  position: relative;
  padding-block: 0;
  background: var(--v3-bg-gray);
  overflow-x: clip;                                  /* clip, not hidden: the group cards are sticky */
  isolation: isolate;
}
.v3-faq::before,
.v3-faq__group::before,
.v3-faq__top::before,
.v3-faq::after,
.v3-faq__group::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  max-width: var(--v3-container-max);
  margin-inline: auto;
  pointer-events: none;
}
.v3-faq::before,
.v3-faq__group::before {                             /* dashed guide lines: outer + title/items separator */
  background:
    var(--faq-dash-v) var(--faq-line-l) 0 / 1px 100% no-repeat,
    var(--faq-dash-v) var(--faq-line-c) 0 / 1px 100% no-repeat,
    var(--faq-dash-v) right var(--faq-line-l) top 0 / 1px 100% no-repeat;
}
.v3-faq::after,
.v3-faq__group::after {                              /* noise */
  max-width: none;
  opacity: 0.04;
  background: url("../../../images/v3/hero/noise.webp") 0 0 / 1024px;
}
.v3-faq__group::before {                             /* + dashed line above the items */
  background:
    var(--faq-dash-v) var(--faq-line-l) 0 / 1px 100% no-repeat,
    var(--faq-dash-v) var(--faq-line-c) 0 / 1px 100% no-repeat,
    var(--faq-dash-v) right var(--faq-line-l) top 0 / 1px 100% no-repeat,
    var(--faq-dash-h) var(--faq-line-c) 0 / calc(100% - var(--faq-line-c) - var(--faq-line-l)) 1px no-repeat;
}

/* ---- header: label | heading ---- */
.v3-faq__top {
  position: relative;
  padding-top: var(--v3-section-pad);
  padding-bottom: 80px;
}
.v3-faq__top::before {                               /* the two extra guide lines that only run beside the heading */
  background:
    var(--faq-dash-v) 50% 0 / 1px 100% no-repeat,
    var(--faq-dash-v) 73.06% 0 / 1px 100% no-repeat;
}
.v3-faq__head,
.v3-faq__grid {
  display: grid;
  grid-template-columns: var(--faq-col) minmax(0, 1fr);
  column-gap: 12px;
  align-items: start;
}
.v3-faq__label {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  margin: 0;
  font-size: var(--v3-fs-caption);
  font-weight: 700;
  line-height: var(--v3-lh-tight);
  text-transform: uppercase;
}
.v3-faq__label::before { content: ""; flex: none; width: 8px; height: 8px; background: var(--v3-primary); }
.v3-faq__title { grid-column: 2; margin: 0; max-width: 652px; color: var(--v3-dark); }
.v3-faq__accent { display: block; color: var(--v3-gray-200); }

/* ---- groups: sticky cards, each next one slides over the previous ---- */
.v3-faq__group {
  top: var(--faq-top);
  isolation: isolate;
  min-height: calc(100vh - var(--faq-top));          /* tall enough to fully cover the previous card */
  min-height: calc(100svh - var(--faq-top));
  padding-bottom: var(--v3-section-pad);
  background: var(--v3-bg-gray);
}
.v3-faq.is-js .v3-faq__group { position: sticky; }                /* only with JS: it can unpin a card taller than the visible area */
.v3-faq.is-js .v3-faq__group.is-tall { position: static; }       /* set by faq.js */
.v3-faq__group-title {
  margin: 0;
  padding-top: 50px;                                 /* aligns with the first question */
  font-size: var(--v3-fs-h3);
  font-weight: 700;
  line-height: var(--v3-lh-tight);
  color: var(--v3-gray-200);
}
.v3-faq__items { min-width: 0; }

/* ---- accordion item ---- */
.v3-faq__item {
  padding-bottom: 27px;                              /* 24px button padding + 27px = 51px under a closed question */
  background: var(--faq-dash-h) 0 100% / 100% 1px no-repeat;
}
.v3-faq__q { margin: 0; }
.v3-faq__btn {
  display: grid;
  grid-template-columns: 51px minmax(0, 1fr) 29px;
  align-items: start;
  width: 100%;
  margin: 0;
  padding: 50px 0 24px;
  border: 0;
  border-radius: 0;
  background: none;
  font: inherit;
  text-align: left;
  color: var(--v3-dark);
  cursor: pointer;
}
.v3-faq__btn:focus-visible { outline: 2px solid var(--v3-primary); outline-offset: -2px; }
.v3-faq__num,
.v3-faq__text {
  font-size: var(--v3-fs-h3);
  font-weight: 700;
  line-height: var(--v3-lh-tight);
}
.v3-faq__num { color: var(--v3-gray-100); }
.v3-faq__text { padding-right: 91px; }               /* wraps at 813px like the frame */
.v3-faq__icon {
  width: 29px;
  height: 29px;
  background: url("../../../images/v3/faq/icon-plus.svg") center / 100% 100% no-repeat;
}
.v3-faq:not(.is-js) .v3-faq__icon,
.v3-faq__item.is-open .v3-faq__icon { background-image: url("../../../images/v3/faq/icon-minus.svg"); }

.v3-faq__a { display: grid; grid-template-rows: 1fr; }   /* without JS every answer stays visible */
.v3-faq.is-ready .v3-faq__a { transition: grid-template-rows 0.3s ease, visibility 0s linear 0.3s; }   /* is-ready: after the initial collapse, so it is instant */
.v3-faq.is-js .v3-faq__item:not(.is-open) .v3-faq__a { grid-template-rows: 0fr; visibility: hidden; }
.v3-faq.is-ready .v3-faq__item.is-open .v3-faq__a { transition-delay: 0s; }
.v3-faq__a-clip { min-height: 0; overflow: hidden; }
.v3-faq__a-body {
  padding: 0 91px 24px 51px;
  font-size: var(--v3-fs-body-m);
  line-height: var(--v3-lh-body-m);
  color: var(--v3-gray-200);
}
.v3-faq__a-body > :first-child { margin-top: 0; }
.v3-faq__a-body > :last-child { margin-bottom: 0; }
.v3-faq__a-body p { margin: 0 0 12px; }
.v3-faq__a-body ul { margin: 0; padding-left: 20px; }
.v3-faq__a-body li + li { margin-top: 4px; }
.v3-faq__a-body a { color: var(--v3-primary); text-decoration: underline; }

@media (max-width: 1280px) {
  .v3-faq { --faq-col: 240px; }
  .v3-faq__text, .v3-faq__a-body { padding-right: 24px; }
  .v3-faq__a-body { padding-right: 24px; }
}
@media (max-width: 1024px) {
  .v3-faq { --faq-col: 200px; }
  .v3-faq__top { padding-bottom: 56px; }
  .v3-faq__group-title { font-size: 20px; }
}

/* ---- mobile: plain flow, no stacking ---- */
@media (max-width: 768px) {
  .v3-faq {
    --faq-col: 0px;
    background:
      var(--faq-dash-v) calc(var(--v3-gutter) - 4px) 0 / 1px 100% no-repeat,
      var(--faq-dash-v) right calc(var(--v3-gutter) - 4px) top 0 / 1px 100% no-repeat,
      var(--faq-dash-h) 0 0 / 100% 1px no-repeat,
      var(--faq-dash-h) 0 100% / 100% 1px no-repeat,
      var(--v3-bg-gray);
  }
  .v3-faq::before,
  .v3-faq__top::before,
  .v3-faq__group::before,
  .v3-faq__group::after { display: none; }
  .v3-faq__top { padding-bottom: 36px; }
  .v3-faq__head { grid-template-columns: minmax(0, 1fr); row-gap: 12px; }
  .v3-faq__label { height: 20px; }
  .v3-faq__title { grid-column: 1; }
  .v3-faq__accent { display: inline; }
  .v3-faq.is-js .v3-faq__group { position: static; }
  .v3-faq__group {
    min-height: 0;
    padding-bottom: 20px;
    background: none;
  }
  .v3-faq__group:last-child { padding-bottom: var(--v3-section-pad); }
  .v3-faq__grid { grid-template-columns: minmax(0, 1fr); row-gap: 20px; }
  .v3-faq__group-title { padding-top: 0; font-size: 20px; }
  .v3-faq__items { background: var(--faq-dash-h) 0 0 / 100% 1px no-repeat; }
  .v3-faq__item { padding-bottom: 1px; }
  .v3-faq__btn { grid-template-columns: 43px minmax(0, 1fr) 29px; padding: 20px 0; }
  .v3-faq__num, .v3-faq__text { font-size: 20px; }
  .v3-faq__text { padding-right: 34px; }
  .v3-faq__a-body { padding: 0 0 20px 43px; }
}

@media (prefers-reduced-motion: reduce) {
  .v3-faq.is-js .v3-faq__group { position: static; }
  .v3-faq__group { min-height: 0; }
  .v3-faq.is-ready .v3-faq__a { transition: none; }
}
