.faq {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: var(--color-text);
  background: var(--color-gray-light);
}

.faq::before {
  content: "";
  position: absolute;
  inset: auto auto -14rem -12rem;
  z-index: -1;
  width: min(36rem, 78vw);
  height: min(36rem, 78vw);
  background: radial-gradient(
    circle,
    var(--color-hero-warm),
    var(--color-transparent) 70%
  );
  pointer-events: none;
}

.faq__container {
  width: min(100%, calc(var(--container-width) + var(--container-padding) * 2));
  margin-inline: auto;
  padding: clamp(5rem, 10vh, 8rem) var(--container-padding);
}

.faq__heading {
  width: min(100%, 820px);
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

.faq__eyebrow {
  width: fit-content;
  max-width: 100%;
  margin: 0 0 1rem;
  padding: 0.54rem 0.9rem 0.46rem;
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-full);
  color: var(--color-secondary);
  background: var(--color-glass-soft);
  backdrop-filter: blur(12px);
  font-size: clamp(0.76rem, 1vw, 0.9rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.faq__title {
  margin: 0;
  font-family: var(--font-title);
  font-size: clamp(3.2rem, 7vw, 6.4rem);
  font-weight: 400;
  line-height: 0.88;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--color-primary);
  transform: skewX(-6deg);
  transform-origin: left center;
  text-shadow: var(--shadow-title);
}

.faq__intro {
  max-width: 660px;
  margin: 1.25rem 0 0;
  color: var(--color-text-muted);
  font-size: clamp(1rem, 1.35vw, 1.14rem);
  font-weight: 600;
  line-height: 1.6;
}

.faq__list {
  display: grid;
  gap: 0.8rem;
}

.faq__item {
  overflow: hidden;
  border: 1px solid var(--color-border-soft);
  border-radius: 0.5rem;
  background: var(--color-glass-soft);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
  transition:
    border-color 260ms ease,
    background-color 260ms ease,
    transform 260ms ease;
}

.faq__item.is-active {
  border-color: var(--color-border-strong);
  background: var(--color-glass-strong);
}

.faq__question {
  width: 100%;
  min-height: 4.6rem;
  border: 0;
  background: var(--color-transparent);
  color: var(--color-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.35rem 1.5rem;
  text-align: left;
  font: inherit;
  font-size: clamp(1.02rem, 1.35vw, 1.18rem);
  font-weight: 700;
  line-height: 1.3;
  transition:
    color var(--transition-fast),
    background-color var(--transition-fast);
}

.faq__question > span:first-child {
  min-width: 0;
}

.faq__icon {
  flex: 0 0 auto;
  width: 2.55rem;
  height: 2.55rem;
  display: inline-grid;
  place-items: center;
  border-radius: var(--radius-full);
  color: var(--color-white);
  background: var(--color-secondary);
  box-shadow: 0 8px 24px rgba(226, 74, 35, 0.2);
}

.faq__icon svg {
  width: 1.18rem;
  height: 1.18rem;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.faq__item.is-active .faq__icon svg {
  transform: rotate(180deg);
}

.faq__answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.faq__answer > p {
  overflow: hidden;
  margin: 0;
  padding-inline: 1.5rem;
  color: var(--color-text-muted);
  font-size: clamp(1rem, 1.2vw, 1.08rem);
  font-weight: 500;
  line-height: 1.7;
  opacity: 0;
  transform: translate3d(0, -5px, 0);
  transition:
    opacity 220ms ease,
    transform 280ms cubic-bezier(0.22, 1, 0.36, 1),
    padding-bottom 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.faq__item.is-active .faq__answer {
  grid-template-rows: 1fr;
}

.faq__item.is-active .faq__answer > p {
  padding-bottom: 1.35rem;
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.faq__answer a {
  color: var(--color-secondary);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 0.1em;
  text-underline-offset: 0.18em;
}

@media (hover: hover) and (pointer: fine) {
  .faq__question:hover {
    background: rgba(255, 255, 255, 0.24);
  }

  .faq__answer a:hover {
    text-decoration-thickness: 0.14em;
  }
}

/* ================================
   Motion de entrada
   ================================ */

html.motion-enabled .faq__eyebrow {
  opacity: 0;
  transform: translate3d(0, 12px, 0);
  transition:
    opacity 620ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
}

html.motion-enabled .faq__title {
  opacity: 0;
  transform: translate3d(0, 18px, 0) skewX(-6deg);
  transition:
    opacity 760ms 70ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 760ms 70ms cubic-bezier(0.22, 1, 0.36, 1);
}

html.motion-enabled .faq__intro {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
  transition:
    opacity 680ms 150ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 680ms 150ms cubic-bezier(0.22, 1, 0.36, 1);
}

html.motion-enabled .faq__item {
  opacity: 0;
  transform: translate3d(0, 15px, 0);
  transition:
    opacity 620ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 700ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 260ms ease,
    background-color 260ms ease;
}

html.motion-enabled .faq__item:nth-child(1) {
  transition-delay: 210ms, 210ms, 0ms, 0ms;
}

html.motion-enabled .faq__item:nth-child(2) {
  transition-delay: 255ms, 255ms, 0ms, 0ms;
}

html.motion-enabled .faq__item:nth-child(3) {
  transition-delay: 300ms, 300ms, 0ms, 0ms;
}

html.motion-enabled .faq__item:nth-child(4) {
  transition-delay: 345ms, 345ms, 0ms, 0ms;
}

html.motion-enabled .faq__item:nth-child(5) {
  transition-delay: 390ms, 390ms, 0ms, 0ms;
}

html.motion-enabled .faq.is-visible .faq__eyebrow {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

html.motion-enabled .faq.is-visible .faq__title {
  opacity: 1;
  transform: translate3d(0, 0, 0) skewX(-6deg);
}

html.motion-enabled .faq.is-visible .faq__intro {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

html.motion-enabled .faq.is-visible .faq__item {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

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

@media (max-width: 1100px) {
  .faq__heading {
    width: min(100%, 760px);
  }

  .faq__title {
    font-size: clamp(3.2rem, 7vw, 5.8rem);
  }
}

@media (max-width: 900px) {
  .faq__container {
    padding-top: clamp(4.5rem, 8vh, 6.5rem);
    padding-bottom: clamp(4.5rem, 8vh, 6.5rem);
  }

  .faq__heading {
    margin-bottom: clamp(2rem, 5vw, 2.7rem);
  }

  .faq__title {
    font-size: clamp(3.1rem, 9vw, 5.2rem);
  }

  .faq__question {
    min-height: 4.4rem;
  }
}

@media (max-width: 760px) {
  .faq__container {
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
  }

  .faq__title {
    font-size: clamp(3rem, 11vw, 4.8rem);
  }

  .faq__intro {
    max-width: 34rem;
    font-size: 1rem;
  }

  .faq__question {
    gap: 1.25rem;
    padding: 1.25rem 1.3rem;
    font-size: 1.02rem;
    line-height: 1.35;
  }

  .faq__answer > p {
    padding-inline: 1.3rem;
    font-size: 1rem;
    line-height: 1.68;
  }

  .faq__item.is-active .faq__answer > p {
    padding-bottom: 1.25rem;
  }
}

@media (max-width: 560px) {
  .faq__container {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }

  .faq__heading {
    margin-bottom: 2rem;
  }

  .faq__eyebrow {
    margin-bottom: 0.9rem;
    padding: 0.5rem 0.8rem 0.44rem;
    font-size: 0.74rem;
  }

  .faq__title {
    font-size: clamp(2.8rem, 14vw, 4.25rem);
    line-height: 0.91;
  }

  .faq__intro {
    margin-top: 1rem;
    line-height: 1.58;
  }

  .faq__list {
    gap: 0.65rem;
  }

  .faq__question {
    min-height: 4.1rem;
    padding: 1.1rem;
    gap: 1rem;
    font-size: 0.98rem;
  }

  .faq__icon {
    width: 2.4rem;
    height: 2.4rem;
  }

  .faq__icon svg {
    width: 1.05rem;
    height: 1.05rem;
  }

  .faq__answer > p {
    padding-inline: 1.1rem;
    font-size: 0.97rem;
    line-height: 1.66;
  }

  .faq__item.is-active .faq__answer > p {
    padding-bottom: 1.1rem;
  }

  html.motion-enabled .faq__item:nth-child(n) {
    transition-delay: 200ms, 200ms, 0ms, 0ms;
  }
}

@media (max-width: 380px) {
  .faq__container {
    padding-top: 3.75rem;
    padding-bottom: 3.75rem;
  }

  .faq__title {
    font-size: clamp(2.55rem, 13vw, 3.7rem);
  }

  .faq__question {
    padding: 1rem;
    gap: 0.85rem;
    font-size: 0.95rem;
  }

  .faq__icon {
    width: 2.3rem;
    height: 2.3rem;
  }

  .faq__answer > p {
    padding-inline: 1rem;
    font-size: 0.95rem;
  }

  .faq__item.is-active .faq__answer > p {
    padding-bottom: 1rem;
  }
}

@media (max-height: 680px) and (min-width: 761px) {
  .faq__container {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }

  .faq__heading {
    margin-bottom: 2rem;
  }

  .faq__title {
    font-size: clamp(3rem, 6vw, 5rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .faq__eyebrow,
  .faq__title,
  .faq__intro,
  .faq__item {
    opacity: 1;
    transition: none;
  }

  .faq__eyebrow,
  .faq__intro,
  .faq__item {
    transform: none;
  }

  .faq__title {
    transform: skewX(-6deg);
  }

  .faq__answer,
  .faq__answer > p,
  .faq__icon svg {
    transition: none;
  }
}
