/* Guisera — questions.
 *
 * The previous treatment was the stock SaaS accordion: every question in its own
 * rounded bordered card with a violet + / − on the right. It matched the
 * reference site closely enough to be a problem, and stacking twelve bordered
 * boxes reads as clutter rather than order.
 *
 * This is editorial instead of boxed:
 *   - hairline rules, no cards, so the page is a list and not a pile of chrome
 *   - a numbered index, which is what makes a long list feel organised
 *   - a thin chevron in slate, not a coloured plus
 *   - answers held to a ~66ch measure so long ones stay readable
 *   - on the FAQ page, a sticky category rail doing real navigation
 *
 * Built on <details>/<summary>, so it opens, closes and announces correctly with
 * no JavaScript. The scroll-spy in faq.js is decoration on top of that.
 *
 * Loaded after home.css and pages.css, which no longer carry any .h-faq rules.
 */

/* ==========================================================================
   The list — shared by the homepage, pricing, and the FAQ page
   ========================================================================== */

.faq-list {
  max-width: 780px;
  margin: 0 auto;
  border-top: 1px solid #e9edf4;
}

.faq-item {
  border-bottom: 1px solid #e9edf4;
}

/* The row. Grid rather than flex so the number, question and chevron hold their
   columns however long the question runs. */
.faq-q {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 18px;
  padding: 21px 4px;
  cursor: pointer;
  list-style: none;
  font-size: 16.4px;
  font-weight: 600;
  letter-spacing: -.011em;
  line-height: 1.45;
  color: #0b1220;
  transition: color .15s ease;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q:hover { color: #1d4ed8; }
.faq-q:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 3px;
  border-radius: 6px;
}

/* The index. Tabular figures so 01 and 11 occupy the same width and the
   questions stay on one left edge. */
.faq-n {
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: .04em;
  color: #94a3b8;
  transition: color .15s ease;
  /* Nudged to sit with the cap height of the question rather than its baseline. */
  position: relative;
  top: -1px;
}
.faq-item[open] .faq-n,
.faq-q:hover .faq-n { color: #2563eb; }

/* A drawn chevron, not a glyph — "+" and "−" render at different widths and
   optical weights in most families, so the marker twitches as rows open. */
.faq-mark {
  width: 11px;
  height: 11px;
  border-right: 1.8px solid #94a3b8;
  border-bottom: 1.8px solid #94a3b8;
  transform: rotate(45deg);
  transform-origin: center;
  transition: transform .22s cubic-bezier(.4, 0, .2, 1), border-color .15s ease;
  position: relative;
  top: -3px;
  flex-shrink: 0;
}
.faq-item[open] .faq-mark {
  transform: rotate(-135deg);
  top: 1px;
  border-color: #2563eb;
}
.faq-q:hover .faq-mark { border-color: #2563eb; }

/* The answer, indented to the question's text column so it reads as belonging to
   it. The left rule is the only ornament in the component. */
.faq-a {
  padding: 0 4px 24px 33px;
  margin: -2px 0 0;
  max-width: 66ch;
  font-size: 15.2px;
  line-height: 1.72;
  color: #475569;
  border-left: 2px solid #e4ebf7;
  margin-left: 4px;
  padding-left: 29px;
}
.faq-a p { margin: 0 0 .8em; }
.faq-a p:last-child { margin-bottom: 0; }
.faq-a a { color: #1d4ed8; text-decoration: underline; text-underline-offset: 2px; }
.faq-a ul, .faq-a ol { margin: 0 0 .8em; padding-left: 1.2em; }
.faq-a li { margin-bottom: .35em; }

/* Opening animation. Height cannot be transitioned from auto, so this fades and
   lifts instead — cheap, and it does not fight long answers. */
.faq-item[open] .faq-a {
  animation: faq-reveal .26s cubic-bezier(.4, 0, .2, 1);
}
@keyframes faq-reveal {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .faq-item[open] .faq-a { animation: none; }
  .faq-mark { transition: border-color .15s ease; }
}

/* ==========================================================================
   The FAQ page — sticky rail beside the questions
   ========================================================================== */

.faq-layout {
  display: grid;
  grid-template-columns: 208px 1fr;
  gap: 64px;
  align-items: start;
  max-width: 1060px;
  margin: 0 auto;
}

.faq-rail {
  position: sticky;
  top: 96px;
}
.faq-rail-title {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #94a3b8;
  margin: 0 0 14px;
  padding-left: 13px;
}
.faq-rail a {
  display: block;
  padding: 8px 0 8px 13px;
  font-size: 14.2px;
  font-weight: 550;
  line-height: 1.4;
  color: #64748b;
  /* The indicator is a border on every item, coloured only when current, so
     nothing shifts horizontally as the active section changes. */
  border-left: 2px solid #e9edf4;
  transition: color .15s ease, border-color .15s ease;
}
.faq-rail a:hover { color: #0b1220; border-left-color: #cbd5e1; }
.faq-rail a.is-current {
  color: #1d4ed8;
  font-weight: 650;
  border-left-color: #2563eb;
}

.faq-group + .faq-group { margin-top: 52px; }
.faq-group > h2 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .085em;
  text-transform: uppercase;
  color: #2563eb;
  margin: 0 0 4px;
}
/* Anchored sections need clearance for the fixed nav or the heading lands
   underneath it when the rail scrolls you here. */
.faq-group { scroll-margin-top: 88px; }

.faq-group .faq-list { max-width: none; margin: 0; }

/* Empty state ------------------------------------------------------------- */
.faq-empty {
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
  padding: 52px 24px;
  border: 1px solid #e9edf4;
  border-radius: 16px;
  background: #fff;
}
.faq-empty h3 { margin: 0 0 8px; font-size: 18px; color: #0b1220; }
.faq-empty p { margin: 0; font-size: 15px; color: #64748b; line-height: 1.65; }

/* Responsive -------------------------------------------------------------- */
@media (max-width: 900px) {
  .faq-layout { grid-template-columns: 1fr; gap: 34px; }
  /* The rail becomes a scrolling strip of chips. Still navigation, just
     horizontal — a sticky sidebar has nowhere to live on a phone. */
  .faq-rail {
    position: static;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .faq-rail::-webkit-scrollbar { display: none; }
  .faq-rail-title { display: none; }
  .faq-rail a {
    flex: 0 0 auto;
    border-left: none;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 7px 15px;
    font-size: 13.4px;
    white-space: nowrap;
  }
  .faq-rail a.is-current {
    border-color: #2563eb;
    background: #eff4ff;
  }
}

@media (max-width: 560px) {
  .faq-q { gap: 13px; font-size: 15.6px; padding: 18px 2px; }
  .faq-n { display: none; }          /* the number is the first thing to go */
  .faq-a { padding-left: 0; margin-left: 0; border-left: none; font-size: 14.8px; }
}
