/* faq.css: the FAQ page (design\components.md; the tokens of system.css only). Parts: hero, faq, close. */

/* =================== hero: a real photo band, the search on its foot, the topics under it =================== */
.phead--band { position: relative; isolation: isolate; overflow: hidden; overflow: clip; display: grid; align-items: end; min-height: min(92svh, 800px); background: var(--c-ink); }
.phead--band .phead__media { z-index: -2; --pos: 62% 0%; }
.phead--band .phead__media img { inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; }
/* the picture starts under the header, fading in, so the phone in it stays clear of the menu's words */
@media (min-width: 761px) {
  .phead--band .phead__media img { top: 56px; height: calc(100% - 55px); -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 60px); mask-image: linear-gradient(180deg, transparent 0, #000 60px); }
}
.phead--band .phead__shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, color-mix(in srgb, var(--c-ink) 90%, transparent) 0%, color-mix(in srgb, var(--c-ink) 66%, transparent) 42%, transparent 72%), linear-gradient(180deg, color-mix(in srgb, var(--c-ink) 74%, transparent) 0%, transparent 20%, transparent 60%, var(--c-ink) 100%); }
.phead--band .phead__in { padding-block: 150px 44px; }
.phead--band .display { max-width: 15ch; font-size: clamp(40px, 5.2vw, 76px); }
.phead--band .display .gold { display: block; }
.faq-search { position: relative; display: flex; align-items: center; gap: 14px; max-width: 760px; margin-top: clamp(28px, 3.6vw, 48px); padding: 10px 14px 10px 22px; border-radius: var(--radius-m); background: var(--c-brand); box-shadow: var(--shadow-l), inset 0 0 0 1.5px color-mix(in srgb, var(--c-on-ink) 18%, transparent); color: var(--c-on-ink); }
.faq-search svg { flex: none; width: 24px; height: 24px; color: var(--c-accent); }
.faq-search input { flex: 1; min-width: 0; height: 52px; padding: 0 12px; border: 0; border-radius: 12px; background: var(--c-paper); color: var(--c-ink); font: 500 18px/1.2 var(--font-text); }
.faq-search input::placeholder { color: var(--c-ink-soft); opacity: 1; }
.faq-search input:focus { outline: 3px solid var(--c-accent); outline-offset: 2px; }
.faq-topics { display: flex; flex-wrap: wrap; gap: 8px; max-width: 900px; margin-top: 16px; }
.faq-topics a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border-radius: 999px; background: color-mix(in srgb, var(--c-ink) 66%, transparent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c-on-ink) 26%, transparent); color: var(--c-on-ink); font: 720 15.5px/1.1 var(--font-display); font-stretch: var(--wide-ui); text-decoration: none; transition: background-color var(--dur-fast) linear, color var(--dur-fast) linear; }
.faq-topics a:hover { background: var(--c-accent); color: var(--c-on-gold); }

/* =================== faq: by topic =================== */
.faq { background: var(--c-ink); padding-top: clamp(40px, 5vw, 70px); }
.faq__count { min-height: 1.4em; margin: 0 0 18px; color: var(--c-accent); font: 700 16px/1.4 var(--font-text); }
.faq__topic { padding-block: clamp(30px, 4vw, 54px); scroll-margin-top: 80px; }
.faq__topic + .faq__topic { border-top: 1px solid var(--c-line-on-ink); }
.faq__topic[hidden] { display: none; }
.faq__name { font-size: clamp(26px, 2.6vw, 38px); }
.faq__topic .qa__list details[hidden] { display: none; }
.faq__none { margin: 20px 0 40px; font-size: 18px; color: var(--c-soft-on-ink); }
.faq__none a { color: var(--c-accent); }

/* =================== close =================== */
.faq-close .band__media { --pos: 70% 40%; }
.faq-close .pclose__title { max-width: 14ch; }
.faq-close__link { margin-top: 18px; color: var(--c-on-ink); font: 700 17px/1.3 var(--font-text); text-decoration: underline; text-underline-offset: 4px; }
.faq-close__link:hover { color: var(--c-accent); }

@media (max-width: 760px) {
  .phead--band { min-height: 0; }
  .phead--band .phead__media { --pos: 74% 20%; }
  .phead--band .phead__shade { background: linear-gradient(180deg, color-mix(in srgb, var(--c-ink) 74%, transparent) 0%, color-mix(in srgb, var(--c-ink) 40%, transparent) 40%, var(--c-ink) 100%); }
  .phead--band .phead__in { padding-block: 112px 30px; }
  .faq-search { padding: 8px 8px 8px 14px; gap: 8px; }
  .faq-search input { font-size: 16px; }
  .faq-topics a { font-size: 15px; padding: 8px 13px; }
  /* words on the shade at the foot, the owner above them */
  .pclose.faq-close { padding-top: 300px; padding-bottom: 96px; }
  .faq-close .band__media { --pos: 80% 20%; }
  .faq-close .pclose__shade { background: linear-gradient(180deg, var(--c-ink) 0, transparent 40px, transparent 220px, color-mix(in srgb, var(--c-ink) 88%, transparent) 320px, color-mix(in srgb, var(--c-ink) 92%, transparent) 100%); }
}
