/* FAQ page (Abbas, 2026-08-11 redesign) — replaces the old flat
   Shopify-style <details>/<summary> list with rounded category cards and a
   custom smooth accordion, matching the site's card/rounded-corner language
   used elsewhere (hero headers, dropdown panels).

   Smooth-height technique: the answer wrapper is a CSS grid whose row track
   animates between 0fr and 1fr — no JS height measurement, no jank, and it
   naturally handles dynamic content length. Scoped under html.js (the same
   progressive-enhancement convention the scroll-reveal system already uses
   sitewide) so with JS disabled every answer just renders open/visible
   instead of being permanently stuck collapsed. */

html.js .faq-answer-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 350ms cubic-bezier(0, 0, 0.2, 1);
}

html.js .faq-answer-wrap.is-open {
  grid-template-rows: 1fr;
}

.faq-answer-inner {
  overflow: hidden;
  min-height: 0;
}

/* Custom plus/minus toggle: a horizontal line that's always present, and a
   vertical line that fades + rotates away on open, leaving a minus. Sits in
   a circular taupe-bordered button matching the site's other icon-button
   chrome (theme toggle, cart, nav chevrons). */
.faq-icon-line {
  position: absolute;
  top: 50%;
  left: 50%;
  background-color: currentColor;
  transition: opacity 250ms ease, transform 250ms ease;
}

.faq-icon-line--h {
  width: 10px;
  height: 1.5px;
  transform: translate(-50%, -50%);
}

.faq-icon-line--v {
  width: 1.5px;
  height: 10px;
  transform: translate(-50%, -50%);
}

.faq-question[aria-expanded="true"] .faq-icon-line--v {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(90deg);
}

.faq-question[aria-expanded="true"] .faq-icon {
  background-color: rgba(166, 138, 114, 0.12); /* Taupe/12 */
  border-color: rgba(166, 138, 114, 0.5);
}

@media (prefers-reduced-motion: reduce) {
  html.js .faq-answer-wrap {
    transition: none;
  }
  .faq-icon-line {
    transition: none;
  }
}
