/* Licensed to account 52c7da1aea3f, 2026-10-19. Moving parts. */
/* FAQ accordion, the mechanics: the question as a button, its sign, the box that opens.
   Moving parts. What a question and its answer do in each state, on attributes the engine writes; the look of the preview follows.
   Readable source: components/faq-accordion/faq-accordion.css */

/* ---------- colours and sizes of the states ---------- */

/* One colour and four sizes, zero specificity.
   Set any of them on the block marked data-faq, or on anything above it:
   --faq-ink, --faq-gutter, --faq-pad, --faq-mark and --faq-stroke. */
:where([data-faq]) {
  --faq-css: 1;
  --faq-ink: #15100c;
  --faq-gutter: clamp(30px, 2.8vw, 40px);
  --faq-pad: 12px;
  --faq-mark: 11px;
  --faq-stroke: 1.5px;
}

/* One number runs everything that moves: 0 closed, 1 open. At rest it
   comes from the attribute, in between the engine writes it on the item. */
[data-faq-item] {
  --faq-p: 0;
}

[data-faq-item][data-faq-open] {
  --faq-p: 1;
}

/* ---------- the question ---------- */

/* The button the engine puts in the heading: it takes the heading's own
   type, and the whole row is the target. The sign stands in a column of
   its own before the words, and the answer starts under the words. */
[data-faq-trigger] {
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: var(--faq-gutter) minmax(0, 1fr);
  align-items: baseline;
  width: 100%;
  margin: 0;
  padding: var(--faq-pad) 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--faq-ink);
  font: inherit;
  letter-spacing: inherit;
  text-align: inherit;
  text-transform: inherit;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

[data-faq-trigger]:focus-visible {
  outline: 2px solid var(--faq-ink);
  outline-offset: 4px;
}

/* ---------- the sign ---------- */

/* A plus on the first line of the question. Its upright bar draws in as
   the answer opens, and the plus is a minus. */
[data-faq-mark] {
  position: relative;
  align-self: start;
  width: var(--faq-mark);
  height: 1.3em;
  height: 1lh;
}

[data-faq-mark]::before,
[data-faq-mark]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  margin-top: calc(var(--faq-stroke) / -2);
  border-top: var(--faq-stroke) solid currentColor;
}

[data-faq-mark]::after {
  transform: rotate(90deg) scaleX(calc(1 - var(--faq-p)));
}

/* Under the pointer the plus of a closed question makes a quarter turn. */
[data-faq-mark] {
  transition: transform 0.6s cubic-bezier(0.3, 0, 0.1, 1);
}

@media (hover: hover) {
  [data-faq-item]:not([data-faq-open]) [data-faq-trigger]:hover [data-faq-mark] {
    transform: rotate(90deg);
  }
}

/* ---------- the answer ---------- */

/* The box that opens: one grid row, from nothing to the height of the
   answer, with nothing measured. */
[data-faq-region] {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 0fr;
  overflow: hidden;
  overflow: clip;
}

[data-faq-item][data-faq-open] [data-faq-region] {
  grid-template-rows: 1fr;
}

/* A browser that cannot search a closed answer hides it the plain way. */
[data-faq-region][hidden]:not([hidden="until-found"]) {
  display: none;
}

/* The box inside it, which starts the answer under the words of the
   question. It has no padding of its own above or below, so that a closed
   box is nothing at all. */
[data-faq-slide] {
  min-height: 0;
  padding-left: var(--faq-gutter);
}

/* For the time of a move each word of the answer is a box, and the engine
   tells it when its line sets off, --faq-at, and how long it has,
   --faq-for. A line rises from behind its
   own lower edge: the word comes up by its height while a cut of the same
   height holds what is still under the edge. */
[data-faq-word] {
  --faq-q: clamp(0, calc((var(--faq-p) - var(--faq-at, 0)) / var(--faq-for, 1)), 1);
  display: inline-block;
  text-decoration: inherit;
  transform: translateY(calc((1 - var(--faq-q)) * 100%));
  clip-path: inset(-0.2em -0.2em calc((1 - var(--faq-q)) * 100%) -0.2em);
}

/* While the engine holds the pressed question in place, the browser does
   not anchor the scroll as well. */
:root:has([data-faq-holding]),
:root:has([data-faq-holding]) body {
  overflow-anchor: none;
}

/* A space between two words of a link, boxed so that the line under the
   link moves in one piece. */
[data-faq-word="space"] {
  white-space: pre;
}

/* The bullet or the number of a list line cannot be moved, so it comes
   with the first line of its item instead: clear until that line is half
   up, whole when it has landed. */
[data-faq-bullet] {
  --faq-q: clamp(0, calc((var(--faq-p) - var(--faq-at, 0)) / var(--faq-for, 1)), 1);
}

[data-faq-bullet]::marker {
  color: color-mix(in srgb, currentColor clamp(0%, calc((var(--faq-q) - 0.5) * 200%), 100%), transparent);
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  [data-faq-mark] {
    transition: none;
  }
}

/* ---------- look, left out of the Webflow Embed ---------- */

/* Clinix Studio: the look of the preview (the faq-* classes, set in
   Instrument Sans and Geist Mono on #f4ece0) is left out of this copy on
   purpose. The FAQ section keeps the site's own look, on its design
   tokens, in src/components/Faq.astro. The mechanics above are the file
   as shipped. */
