/* Preguntas frecuentes. From the FAQ design, ported to dark forest-deep
   (the export used a light surface; kept the page dark per Andrés's call).
   Accordion is native <details>/<summary> for structure and keyboard/screen
   reader support. js/faq.js adds: (1) animated height via the .faq__a-wrap
   grid-rows trick (native open/close alone is an instant, non-animatable
   display swap), (2) exclusive-open-only-one, replacing the old native
   name="faq-accordion" grouping. Without JS: every item still opens/closes
   natively, just instantly and independently (a fine fallback, not broken). */

.faq {
  position: relative;
  background: var(--surface);
  color: var(--on-surface);
  padding-block: 48px 56px;
  scroll-margin-top: calc(var(--header-h) + var(--space-4));
}
/* Softens the seam into the next section (CTA final, plain forest) instead
   of a hard color cut — a short gradient from transparent (FAQ's own
   forest-deep still showing through) to the next section's forest, right
   at the bottom edge. The original brief called for "forest to off-white"
   from an earlier draft of the page that no longer exists — the page never
   ended up with an off-white surface, so this uses the two colors that are
   actually adjacent here now. */
.faq::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 72px;
  background: linear-gradient(to bottom, transparent, var(--color-forest));
  pointer-events: none;
}

.faq__intro {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.faq__eyebrow-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.faq__eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-lime);
}
.faq__eyebrow::before {
  content: '';
  width: 22px;
  height: 2px;
  background: currentColor;
}

.faq__title {
  font-size: var(--text-display);
  font-weight: var(--fw-bold);
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: pretty;
}

/* List. Single column, comfortable reading measure, at both breakpoints. */
.faq__list {
  margin-top: 30px;
  max-width: 64ch;
  display: flex;
  flex-direction: column;
}

.faq__item {
  border-bottom: 1px solid rgb(255 255 255 / 0.18);
}
.faq__item:last-child { border-bottom: none; }
/* Stagger the reveal, capped at 5 chained (item 6+ shares the 5th's delay
   instead of resetting to 0 or climbing further); timing math lives in the
   shared rule in how-it-works.css. */
.faq__item:nth-child(2) { --reveal-i: 1; }
.faq__item:nth-child(3) { --reveal-i: 2; }
.faq__item:nth-child(4) { --reveal-i: 3; }
.faq__item:nth-child(n+5) { --reveal-i: 4; }

.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 56px;
  padding: 16px 4px;
  cursor: pointer;
  list-style: none;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q:hover { background: rgb(255 255 255 / 0.04); }

.faq__q-text {
  font-size: 1.1875rem;
  line-height: 1.3;
  font-weight: var(--fw-semibold);
  color: var(--color-white);
}

/* Plus/minus drawn with pseudo-elements; the whole circle rotates 45° on
   open, turning "+" into "×" as one motion instead of fading a bar. */
.faq__icon {
  position: relative;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  border: 1px solid rgb(255 255 255 / 0.35);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.3, 1), background-color 0.2s ease, border-color 0.2s ease;
}
.faq__icon::before,
.faq__icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  background: var(--color-white);
  transform: translate(-50%, -50%);
}
.faq__icon::before { width: 13px; height: 2px; }
.faq__icon::after { width: 2px; height: 13px; }

/* Open state: same sky-tinted card + lime left-edge accent as the other
   "featured" surfaces on the page (guarantee card, compare's WAAGS column,
   benefits' 4th card). Was lime at 10% opacity, which reads as a muddy
   olive over the dark forest instead of a clean highlight (Andrés's
   feedback, 2026-09-24, same issue as the guarantee section) — lime stays
   in the icon circle, never as a large diluted fill. The icon itself
   still fills solid lime when open. */
.faq__item[open] {
  margin-block: 6px;
  padding: 4px 20px 22px;
  background: rgb(157 196 213 / 0.12);
  border: 1px solid rgb(157 196 213 / 0.32);
  border-left: 3px solid var(--color-lime);
  border-radius: var(--radius-lg);
}
.faq__item[open] .faq__q { padding-inline: 0; }
.faq__item[open] .faq__q-text { font-weight: var(--fw-bold); }
.faq__item[open] .faq__icon {
  transform: rotate(45deg);
  background: var(--color-lime);
  border-color: var(--color-lime);
}
.faq__item[open] .faq__icon::before,
.faq__item[open] .faq__icon::after { background: var(--color-forest); }

@media (prefers-reduced-motion: reduce) {
  .faq__icon { transition: none; }
}

/* Animated height: js/faq.js adds .js-faq-anim once it can also keep
   aria-hidden correct (see the file comment at the top). Without it, native
   <details> still opens/closes instantly and correctly either way. */
.js-faq-anim .faq__a-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.js-faq-anim .faq__item[open] > .faq__a-wrap {
  grid-template-rows: 1fr;
}
.faq__a-wrap > .faq__a { overflow: hidden; min-height: 0; }

@media (prefers-reduced-motion: reduce) {
  .js-faq-anim .faq__a-wrap { transition: none; }
}

.faq__a p {
  padding-top: 4px;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--on-surface-muted);
}

/* DESKTOP: same single-column layout, just roomier. */
@media (min-width: 900px) {
  .faq { padding-block: 88px; }

  .faq__intro { align-items: center; text-align: center; }
  .faq__title { line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance; max-width: 26ch; }

  .faq__list { margin: 48px auto 0; max-width: 70ch; }

  .faq__q { min-height: 64px; padding: 22px 8px; gap: 24px; }
  .faq__q-text { font-size: 1.5rem; line-height: 1.25; }
  .faq__icon { width: 36px; height: 36px; }
  .faq__icon::before { width: 15px; }
  .faq__icon::after { height: 15px; }

  .faq__item[open] { padding: 4px 28px 26px; }
  .faq__a p { font-size: 1.125rem; max-width: 68ch; }
}
