/* FAQ editorial: hierarchy on the left, interaction on the right. */

body.biograph-theme .faq-layout {
  display: grid;
  gap: clamp(2.75rem, 7vw, 5rem);
}

body.biograph-theme .faq-intro {
  display: grid;
  max-width: 38rem;
  align-content: start;
  justify-items: start;
  gap: 1.25rem;
}

body.biograph-theme .faq-intro :is(h1, h2) {
  max-width: 11ch;
  color: var(--ink-soft);
  font-size: clamp(2.5rem, 9vw, 4.5rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

body.biograph-theme .faq-intro__copy {
  max-width: 27rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

body.biograph-theme .faq-intro .text-link {
  margin-top: 0.25rem;
}

body.biograph-theme .faq-list {
  width: 100%;
  max-width: none;
  margin: 0;
  border-top: 0.0625rem solid var(--line);
}

body.biograph-theme .faq-item {
  position: relative;
  border-bottom: 0.0625rem solid var(--line);
  background-color: transparent;
  transition: background-color var(--duration-short) var(--ease);
}

body.biograph-theme .faq-item::before {
  position: absolute;
  z-index: 1;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0.1875rem;
  background: var(--brand);
  content: "";
  opacity: 0;
  transform: scaleY(0.35);
  transform-origin: center;
  transition:
    opacity var(--duration-short) var(--ease),
    transform var(--duration-short) var(--ease);
}

body.biograph-theme .faq-item.is-open {
  background-color: rgba(255, 255, 255, 0.78);
}

body.biograph-theme .faq-item.is-open::before {
  opacity: 1;
  transform: scaleY(1);
}

body.biograph-theme .faq-question {
  display: grid;
  min-height: 5.5rem;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem 1.25rem 1.25rem 1.5rem;
  font-size: clamp(1.0625rem, 4.8vw, 1.375rem);
  font-weight: 500;
  line-height: 1.28;
}

body.biograph-theme .faq-question::before {
  display: none;
}

body.biograph-theme .faq-question::after {
  position: static;
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border: 0.0625rem solid var(--line);
  border-radius: 50%;
  color: var(--ink-soft);
  background: transparent;
  content: "+";
  font-size: 1.375rem;
  font-weight: 400;
  line-height: 1;
  transform: none;
  transition:
    color var(--duration-short) var(--ease),
    background-color var(--duration-short) var(--ease),
    border-color var(--duration-short) var(--ease);
}

body.biograph-theme .faq-question[aria-expanded="true"]::after,
body.biograph-theme .faq-item.is-open .faq-question::after {
  border-color: var(--brand);
  color: var(--paper);
  background-color: var(--brand);
  content: "\2212";
  transform: none;
}

body.biograph-theme .faq-answer:not([hidden]),
html.no-js body.biograph-theme .faq-answer[hidden] {
  max-width: 46rem;
  padding: 0 5rem 1.75rem 1.5rem;
  animation: none;
}

body.biograph-theme .faq-answer :where(p, li) {
  line-height: 1.7;
}

@media (hover: hover) and (pointer: fine) {
  body.biograph-theme .faq-item:not(.is-open):hover {
    background-color: rgba(255, 255, 255, 0.42);
  }

  body.biograph-theme .faq-question:hover::after {
    border-color: var(--brand);
    color: var(--brand);
  }

  body.biograph-theme .faq-item.is-open .faq-question:hover::after {
    color: var(--paper);
  }
}

@media (min-width: 64rem) {
  body.biograph-theme .faq-layout {
    grid-template-columns: minmax(18rem, 0.68fr) minmax(0, 1.32fr);
    align-items: start;
    column-gap: clamp(4rem, 8vw, 8rem);
  }

  body.biograph-theme .faq-intro {
    position: sticky;
    top: calc(var(--header-height) + 2rem);
  }
}

@media (max-width: 39.99rem) {
  body.biograph-theme .faq-answer:not([hidden]),
  html.no-js body.biograph-theme .faq-answer[hidden] {
    padding-right: 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.biograph-theme .faq-item,
  body.biograph-theme .faq-item::before,
  body.biograph-theme .faq-question::after {
    transition: none;
  }
}

/* FAQ: título curto no topo e retrato no lugar do texto introdutório. */
body.biograph-theme .faq-intro :is(h1, h2) { max-width: none; font-size: clamp(2.25rem, 4.2vw, 3.5rem); text-wrap: balance; }
body.biograph-theme .faq-intro__photo { width: 100%; max-width: 31rem; margin: 0.25rem 0 0; overflow: hidden; aspect-ratio: 4 / 5; border: 0.0625rem solid var(--line); border-radius: var(--radius-media); background: var(--line); }
body.biograph-theme .faq-intro__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; }
@media (min-width: 64rem) {
  body.biograph-theme .faq-layout { grid-template-columns: minmax(22rem, 0.8fr) minmax(0, 1.2fr); }
  body.biograph-theme .faq-intro { position: static; top: auto; }
}
@media (max-width: 63.99rem) { body.biograph-theme .faq-intro__photo { max-height: 32rem; aspect-ratio: 4 / 3; } }
/* FAQ: perguntas em cards contornados. */
body.biograph-theme .faq-list { display: grid; gap: 0.75rem; border-top: 0; }
body.biograph-theme .faq-item {
  overflow: hidden;
  border: 0.0625rem solid rgba(17, 18, 20, 0.14);
  border-radius: 0.875rem;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 0.25rem 0.875rem rgba(15, 30, 51, 0.035);
}
body.biograph-theme .faq-item.is-open {
  border-color: rgba(12, 108, 243, 0.42);
  background: var(--paper);
  box-shadow: 0 0.5rem 1.5rem rgba(12, 108, 243, 0.08);
}
body.biograph-theme .faq-item::before { border-radius: 0.875rem 0 0 0.875rem; }
/* FAQ: separação por fundo, sem indicador lateral azul. */
body.biograph-theme .faq-item,
body.biograph-theme .faq-item.is-open {
  border-color: rgba(17, 18, 20, 0.12);
  background: #eef0f3;
  box-shadow: none;
}
body.biograph-theme .faq-item.is-open { background: #e7ebf0; }
body.biograph-theme .faq-item::before,
body.biograph-theme .faq-item.is-open::before { display: none; content: none; }
@media (hover: hover) and (pointer: fine) {
  body.biograph-theme .faq-item:not(.is-open):hover { background: #e8ebef; }
}
/* FAQ: título compacto em até duas linhas. */
body.biograph-theme .faq-intro :is(h1, h2) {
  max-width: 20ch;
  font-size: clamp(2rem, 3.2vw, 2.75rem);
  line-height: 1.02;
  text-wrap: balance;
}
@media (min-width: 64rem) {
  body.biograph-theme .faq-layout { grid-template-columns: minmax(29rem, 0.9fr) minmax(0, 1.1fr); }
}
/* FAQ: título em exatamente duas linhas no desktop. */
@media (min-width: 64rem) {
  body.biograph-theme .faq-intro :is(h1, h2) { max-width: none; font-size: clamp(2rem, 2.65vw, 2.5rem); white-space: nowrap; }
}
/* FAQ: caixa alta permanece contida nas duas linhas. */
@media (min-width: 64rem) {
  body.biograph-theme .faq-intro :is(h1, h2) { max-width: 100%; overflow: hidden; font-size: clamp(1.75rem, 2.15vw, 2.25rem); letter-spacing: -0.04em; }
}
/* FAQ: preserva os acentos superiores do título em caixa alta. */
@media (min-width: 64rem) {
  body.biograph-theme .faq-intro :is(h1, h2) { overflow: visible; padding-top: 0.12em; }
}
/* FAQ: título e foto acompanham a leitura até o fim da seção. */
@media (min-width: 64rem) {
  body.biograph-theme .faq-layout { align-items: start; }
  body.biograph-theme .faq-intro {
    position: sticky;
    top: calc(var(--header-height) + 1.25rem);
    align-self: start;
    max-height: calc(100vh - var(--header-height) - 2.5rem);
  }
  body.biograph-theme .faq-intro__photo {
    width: auto;
    max-width: 100%;
    height: min(66vh, 38rem);
    min-height: 24rem;
    aspect-ratio: 4 / 5;
  }
}