/* FAQ page (src\pages\faq.mjs): hero (a still photo, a white card on the wall beside her: the h1, the search and the
   topics), faq (every question by topic, the topic's name kept in view beside its questions), close (the contractor's
   new booking beside him, the words on the right). Tokens and the faq list come from design\system.css and
   components.css. */

/* ---------- hero: the owner at her window on the right, the card on the plain wall at the left */
.fhero { position: relative; isolation: isolate; overflow: hidden; display: grid; align-items: center; min-height: clamp(560px, 46vw, 700px); padding: clamp(40px, 5vw, 72px) 0; background: var(--c-brand-dark); }
.fhero__media { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.fhero__img { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; object-position: 70% 40%; }
.fhero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.fhero__card { justify-self: center; width: min(100%, 520px); padding: clamp(28px, 3vw, 44px); border-radius: var(--radius-l); background: var(--c-paper); box-shadow: var(--shadow-l); }
.fhero__card h1 { max-width: 12ch; font-size: var(--fs-h1); line-height: var(--lh-snug); color: var(--c-brand); }
.fhero__line { margin: var(--space-3) 0 var(--space-5); font-size: var(--fs-lead); color: var(--c-ink-soft); }
.fhero__search { position: relative; margin: 0; }
.fhero__search-icon { position: absolute; left: 18px; top: 50%; width: 22px; height: 22px; margin-top: -11px; color: var(--c-brand); pointer-events: none; }
.fhero__input { box-sizing: border-box; width: 100%; height: 56px; padding: 0 18px 0 52px; border: 1.5px solid var(--c-line); border-radius: var(--radius-pill); background: var(--c-paper); font: 500 1.0625rem/1.2 var(--font-text); color: var(--c-ink); appearance: none; -webkit-appearance: none; }
.fhero__input::placeholder { color: var(--c-ink-soft); opacity: 1; }
.fhero__input:hover { border-color: color-mix(in srgb, var(--c-brand) 40%, var(--c-line)); }
.fhero__input:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; border-color: var(--c-brand); }
.fhero__count { min-height: 1.3em; margin: 10px 0 0 6px; font: 600 0.875rem/1.3 var(--font-ui); color: var(--c-ink-soft); }
.fhero__topics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--space-5); }
.fchip { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 16px; border-radius: var(--radius-pill); background: var(--c-accent-light); color: var(--c-brand); font: 700 0.9375rem/1.2 var(--font-ui); text-decoration: none; transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); }
.fchip:hover, .fchip:focus-visible { background: var(--c-brand); color: var(--c-on-brand); }

/* ---------- faq: each topic's name beside its questions, kept in view while they scroll */
.ffaq { padding-top: clamp(56px, 7vw, 104px); }
.ffaq__topics { list-style: none; margin: 0; padding: 0; }
.ftopic { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(2rem, 1rem + 4vw, 5rem); align-items: start; padding-block: var(--space-6); border-top: 1px solid var(--c-line); scroll-margin-top: calc(var(--header-h) + 16px); }
.ftopic:first-child { padding-top: 0; border-top: 0; }
.ftopic[hidden] { display: none; }
.ftopic__name { position: sticky; top: calc(var(--header-h) + 28px); padding-top: 18px; font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.125rem); line-height: var(--lh-snug); color: var(--c-brand); }
.ftopic .faq__item[hidden] { display: none; }
.ffaq .faq__a a { color: var(--c-brand); font-weight: 700; text-decoration-color: var(--c-accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.ffaq__none { max-width: 640px; margin: 0 auto; padding: 22px 26px; border-radius: var(--radius-l); background: var(--c-paper-alt); border: 1px solid var(--c-line); font-size: 1.0625rem; color: var(--c-ink); text-align: center; }
.ffaq__none[hidden] { display: none; }
.ffaq__none a { color: var(--c-brand); font-weight: 700; text-decoration-color: var(--c-accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* ---------- close: the contractor on the left with his new booking beside him, the words on the right */
.fclose .band__photo { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; object-position: 40% 8%; }
.fclose__link { margin-top: var(--space-5); align-self: flex-start; color: var(--c-on-brand); }
.fclose__card { position: absolute; z-index: 3; left: clamp(24px, 6vw, 96px); bottom: clamp(32px, 5vw, 64px); display: grid; gap: 10px; width: min(300px, 24vw); }
.fclose__row { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; align-items: center; margin: 0; padding: 12px 14px; border-radius: var(--radius-m); background: var(--c-paper); box-shadow: var(--shadow-l); }
.fclose__icon { grid-row: span 2; width: 22px; height: 22px; color: var(--c-blue); }
.fclose__tick { grid-row: span 2; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--c-accent); color: var(--c-brand); }
.fclose__tick .icon { width: 16px; height: 16px; stroke-width: 2.4; }
.fclose__row b { font: 800 0.9375rem/1.25 var(--font-display); color: var(--c-brand); }
.fclose__row span { font: 600 0.8125rem/1.35 var(--font-ui); color: var(--c-ink-soft); }
.fclose__row { opacity: var(--kit-in, 1); transform: translateY(calc((1 - var(--kit-in, 1)) * 12px)); }
@media (scripting: enabled) { .fclose__row:not(.is-first) { opacity: var(--kit-in, 0); transform: translateY(calc((1 - var(--kit-in, 0)) * 12px)); } }
.fclose__stop { top: auto; right: auto; left: calc(clamp(24px, 6vw, 96px) + min(300px, 24vw) + 12px); bottom: clamp(32px, 5vw, 64px); }

/* ---------- narrower screens */
@media (max-width: 1023.98px) {
  .fhero { display: block; min-height: 0; padding: 0 0 var(--space-6); background: var(--c-paper); }
  .fhero__media { position: relative; inset: auto; z-index: auto; aspect-ratio: 16 / 9; }
  .fhero__img { object-position: 74% 40%; }
  .fhero__grid { display: block; }
  .fhero__card { position: relative; width: auto; max-width: 600px; margin: -88px auto 0; }
  .ftopic { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
  .ftopic__name { position: static; padding-top: 0; }
  .fclose__card { left: 12px; bottom: auto; top: calc(clamp(220px, 62vw, 440px) - 14px); width: min(300px, 40vw); transform: translateY(-100%); }
  .fclose__stop { left: calc(12px + min(300px, 40vw) + 8px); bottom: auto; top: calc(clamp(220px, 62vw, 440px) - 54px); }
}
@media (max-width: 599.98px) {
  .fhero__media { aspect-ratio: 3 / 2; }
  .fhero__img { object-position: 80% 40%; }
  .fhero__card { margin: -64px 0 0; padding: 26px 22px 24px; }
  .fchip { min-height: 38px; padding: 7px 14px; font-size: 0.875rem; }
  .fclose__card { width: min(200px, 52vw); }
  .fclose__card > * { grid-area: 1 / 1; }
  .fclose__stop { left: calc(12px + min(200px, 52vw) + 8px); }
}
