/* ==========================================================================
   Oktify FAQ — page composition
   Layout only. All colours, sizes and components come from tokens.css and
   components.css; nothing here redefines a component.
   ========================================================================== */

/* Hero --------------------------------------------------------------------
   Uses the brand's own `gradient.hero` — the light accent/indigo wash defined
   in the Oktify token source — so the search layer reads as a distinct band
   without turning the top of a help page into a dark marketing hero. */
.hero {
  position: relative;
  isolation: isolate;
  padding-block: var(--space-8) var(--space-6);
  background: var(--gradient-hero);
  border-bottom: var(--border-hairline);
}
/* Grid texture over the gradient wash, matching the brand site's hero. It sits
   on a negative-z pseudo-element so it paints above the hero's own gradient but
   below the content. Masked at BOTH ends: it fades in from under the gradient's
   strongest point at the top — so the rule reads as emerging from behind the
   wash rather than being laid on top of it — and washes out over the lower half
   so the transition into the white page stays soft. Both fades are long: a short
   ramp reads as a hard edge with a blur on it, not as depth. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--pattern-grid);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgb(0 0 0 / 0.35) 20%, #000 44%, rgb(0 0 0 / 0.55) 74%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, rgb(0 0 0 / 0.35) 20%, #000 44%, rgb(0 0 0 / 0.55) 74%, transparent 100%);
  pointer-events: none;
}
.hero__title { margin-bottom: var(--space-4); }
.hero__lead { margin-bottom: var(--space-6); }
.hero__search { max-width: 680px; }
.hero__search .search { box-shadow: var(--elevation-card); }

@media (max-width: 640px) {
  .hero { padding-block: var(--space-6) var(--space-5); }
}

/* Popular questions -------------------------------------------------------
   A shortcut layer, not a second list: each row carries its category so the
   reader knows where the answer lives. */
.popular { padding-block: var(--space-6) var(--space-4); }
.popular__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-4); }
.popular__head h2 { font-size: var(--fs-heading-lg); line-height: var(--lh-heading-lg); letter-spacing: var(--ls-heading-lg); }
.popular__head p { margin: 0; font-size: var(--fs-label-sm); color: var(--color-text-subtle); }
.popular__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
@media (max-width: 680px) { .popular__list { grid-template-columns: 1fr; } }

.popular__item { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
.popular__q { display: block; font-size: var(--fs-body-sm); font-weight: var(--fw-medium); line-height: var(--lh-heading-md); color: var(--color-text-primary); }
.popular__cat { display: block; margin-top: var(--space-1); font-size: var(--fs-label-sm); color: var(--color-text-subtle); }
.popular__item .icon { flex: none; color: var(--color-text-subtle); transition: transform var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out); }
a.popular__item:hover .icon { color: var(--color-text-accent); transform: translateX(2px); }

/* FAQ body ----------------------------------------------------------------
   Category headings hang their icon in the left margin on wide screens so the
   heading text starts on exactly the same rail as every question below it. */
.faq { padding-block: var(--space-6) var(--space-8); }
/* Grid gap rather than sibling margins: a category hidden by a search must not
   leave its spacing behind, and `gap` ignores display:none children. */
.faq > .container { display: grid; gap: var(--space-8); }

.faq-category { scroll-margin-top: calc(var(--header-height) + 88px); }
.faq-category__head {
  position: relative;
  display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-3);
  margin-bottom: var(--space-4);
}
/* Category headings take the heading-lg role, not heading-xl: at the source
   scale heading-xl clamps to 36px, which against 18px question rows reads as a
   2:1 jump and pushes the list apart. 22px + semibold separates by size AND
   weight while keeping the list dense. */
.faq-category__head h2 {
  font-size: var(--fs-heading-lg);
  line-height: var(--lh-heading-lg);
  letter-spacing: var(--ls-heading-lg);
  font-weight: var(--fw-semibold);
}
.faq-category__head .icon-tile { flex: none; }
.faq-category__toggle { margin-left: auto; flex: none; color: var(--color-text-subtle); }
.faq-category__toggle:hover { color: var(--color-text-accent); }

@media (min-width: 1120px) {
  .faq-category__head .icon-tile { position: absolute; left: calc(var(--space-8) * -1); top: 50%; transform: translateY(-50%); }
}
@media (max-width: 560px) {
  .faq-category__toggle { min-height: var(--tap-target); margin-left: 0; }
}

/* Still need help ---------------------------------------------------------- */
.help-cta { padding-bottom: var(--space-8); }
.help-cta__panel { padding: var(--space-7); }
.help-cta__title { display: flex; align-items: center; gap: var(--space-4); margin-bottom: var(--space-4); }
.help-cta__title h2 { font-size: var(--fs-heading-lg); line-height: var(--lh-heading-lg); letter-spacing: var(--ls-heading-lg); font-weight: var(--fw-semibold); }
.help-cta__panel .icon-tile {
  width: 48px; height: 48px; flex: none;
  background: rgba(255, 255, 255, 0.10);
  color: var(--color-text-on-ink-accent);
}
.help-cta__panel p { max-width: 60ch; }
.help-cta__actions { margin-top: var(--space-5); display: flex; flex-wrap: wrap; gap: var(--space-3); }
.help-cta__actions .btn--secondary {
  background: transparent;
  color: var(--color-text-on-ink);
  border-color: var(--color-border-on-ink);
}
.help-cta__actions .btn--secondary:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.4); color: var(--color-text-on-ink); }
@media (max-width: 680px) {
  .help-cta__panel { padding: var(--space-5); }
  .help-cta__title h2 { font-size: var(--fs-heading-md); }
}

/* Footer ------------------------------------------------------------------- */
.site-footer__logo { height: 30px; width: auto; }
.site-footer__brand { display: flex; align-items: center; gap: var(--space-4); }
