/* SECTION 10: FAQ (agent D, v14, 2026-10-01). Every selector starts with .faq.
   Sola's FAQ (computed at 1440): left column 445 px with 32 px padding, accordion column with 8 px padding,
   items radius 16, summary padding 24, question 16/500/-0.04em, 22 px round icon, open item on #f7f6f0,
   answer 16 px grey-61 in a ~500 px measure. Our answers are longer, so the measure is 62ch.
   Motion: CSS only. ::details-content + interpolate-size give a height animation where supported (Chrome 131+,
   Safari 18.4+ for the pseudo); elsewhere the item opens instantly. */

.faq .faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  border-top: 1px solid var(--token-line);
}
/* the frame lines land on the closing CTA panel, with dots as at the hero's foot */
.faq .faq-dot-bl, .faq .faq-dot-br { top: auto; bottom: -3px; }
.faq .faq-dot-bl { left: -3px; }
.faq .faq-dot-br { right: -3px; left: auto; }

/* the highlighter itself comes from sections.css (main .ph) */
.faq .ph { white-space: nowrap; }

/* ---- left: heading + contact line (sticky while the list scrolls) ---- */
.faq .faq-side { border-right: 1px solid var(--token-line); min-width: 0; }
.faq .faq-head {
  position: sticky; top: calc(var(--nav-h) + 8px);
  display: flex; flex-direction: column; gap: 16px;
  padding: 32px 32px 48px;
}
.faq .faq-title { font-size: 40px; max-width: 9em; }
.faq .faq-more {
  max-width: 320px;
  font-size: 14px; font-weight: 500; line-height: 1.5; letter-spacing: -0.04em;
  color: var(--token-grey-61);
}

/* ---- right: the accordion ---- */
.faq .faq-list { display: flex; flex-direction: column; padding: 8px 8px 64px; min-width: 0; interpolate-size: allow-keywords; }
.faq .faq-item {
  border-radius: 16px;
  background-color: rgba(247, 246, 240, 0);
  /* keeps the .reveal rise (sections.css) and adds the open-state fill */
  transition:
    opacity var(--dur-appear) var(--ease-appear) var(--delay, 0s),
    transform var(--dur-appear) var(--ease-appear) var(--delay, 0s),
    background-color .35s cubic-bezier(.2, .8, .2, 1);
}
.faq .faq-item[open] { background-color: var(--token-surface); }
.faq .faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 24px;
  border-radius: 16px;
  list-style: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .25s;
}
.faq .faq-item summary::-webkit-details-marker { display: none; }
.faq .faq-item summary::marker { content: ""; }
.faq .faq-item:not([open]) summary:hover { background-color: rgba(247, 246, 240, .7); }
.faq .faq-item summary:focus-visible { outline-offset: -2px; }
.faq .faq-q {
  font-size: 16px; font-weight: 500; line-height: 22px; letter-spacing: -0.04em;
  color: var(--token-ink);
  text-wrap: pretty;
}

/* plus → minus: the vertical bar folds flat while the disc turns half a circle */
.faq .faq-icon {
  position: relative; flex: none;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--token-surface);
  transition: background-color .35s, transform .5s cubic-bezier(.2, .8, .2, 1);
}
.faq .faq-icon i {
  position: absolute; left: 50%; top: 50%;
  width: 10px; height: 2px; margin: -1px 0 0 -5px;   /* whole pixels: crisp at 1x */
  border-radius: 1px;
  background: var(--token-ink);
  transition: transform .5s cubic-bezier(.2, .8, .2, 1);
}
.faq .faq-icon i + i { transform: rotate(90deg); }
@media (min-resolution: 2dppx) { .faq .faq-icon i { height: 1.5px; margin-top: -.75px; } }
.faq .faq-item summary:hover .faq-icon { background: #efeee8; }
.faq .faq-item[open] .faq-icon { background: var(--token-bg); transform: rotate(180deg); }
.faq .faq-item[open] .faq-icon i + i { transform: rotate(0deg); }

.faq .faq-a { padding: 0 24px 24px; }
.faq .faq-a p {
  max-width: 62ch;
  font-size: 16px; font-weight: 500; line-height: 1.55; letter-spacing: -0.03em;
  color: var(--token-grey-61);
  text-wrap: pretty;
}
.faq .faq-a p + p { margin-top: .7em; }

/* Height animation (progressive). The answer also fades and settles, as Sola's does. */
@supports (interpolate-size: allow-keywords) and selector(::details-content) {
  .faq .faq-item::details-content {
    block-size: 0;
    overflow-y: clip;
    transition: block-size .5s cubic-bezier(.2, .8, .2, 1), content-visibility .5s allow-discrete;
  }
  .faq .faq-item[open]::details-content { block-size: auto; }
  .faq .faq-a { opacity: 0; transform: translateY(-6px); transition: opacity .3s ease, transform .5s cubic-bezier(.2, .8, .2, 1); }
  .faq .faq-item[open] .faq-a { opacity: 1; transform: none; transition-delay: .06s; }
  /* the closed answer is never styled (content-visibility: hidden), so the fade-in needs a starting style */
  @starting-style { .faq .faq-item[open] .faq-a { opacity: 0; transform: translateY(-6px); } }
}

/* ---------------- Tablet (810-1199): same split as the founder note above ---------------- */
@media (max-width: 1199px) {
  .faq .faq-grid { grid-template-columns: minmax(0, 3fr) minmax(0, 5fr); }
  .faq .faq-head { padding: 32px 24px 40px; }
  .faq .faq-title { font-size: 36px; }
  .faq .faq-list { padding-bottom: 48px; }
  .faq .faq-item summary { padding: 22px 20px; }
  .faq .faq-a { padding: 0 20px 22px; }
}

/* ---------------- Phone (<810): stacked, as on Sola's phone layout ---------------- */
@media (max-width: 809px) {
  .faq .faq-grid { grid-template-columns: minmax(0, 1fr); }
  .faq .faq-side { border-right: 0; border-bottom: 1px solid var(--token-line); }
  .faq .faq-head { position: static; padding: 40px 24px 32px; gap: 14px; }
  .faq .faq-title { font-size: 32px; max-width: none; }
  .faq .faq-list { padding: 8px 8px 40px; }
  .faq .faq-item summary { padding: 18px 16px; gap: 16px; }
  .faq .faq-q { font-size: 15px; line-height: 21px; }
  .faq .faq-a { padding: 0 16px 20px; }
  .faq .faq-a p { font-size: 15px; line-height: 1.55; }
}

@media (prefers-reduced-motion: reduce) {
  .faq .faq-item, .faq .faq-item summary, .faq .faq-icon, .faq .faq-icon i, .faq .faq-a { transition: none !important; }
  .faq .faq-item::details-content { transition: none !important; }
}
