/* The FAQ (plan.md, FAQ; src\pages\faq.mjs): its still header with the search and the topics, the questions by topic,
   and its close. */

/* ---- hero: the photo still, the woman asking her phone at the left (face at x 33-50%, y 5-32%); the headline, the
   search and the topics over the shelves and the window at the right, on a shade from the right; under 1000 px the
   photo stands as a band and the words follow on the ink ---- */
.faq-hero { position: relative; isolation: isolate; overflow: hidden; display: grid; align-items: center; color: var(--c-on-ink); background: var(--c-ink);
  min-height: clamp(580px, calc(100svh - 80px), 760px); padding: 72px var(--gutter); }
.faq-hero__media { position: absolute; inset: 0; z-index: -1; margin: 0; }
.faq-hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 40% 0%; }
.faq-hero__media::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(270deg, color-mix(in srgb, var(--c-ink) 88%, transparent) 0%, color-mix(in srgb, var(--c-ink) 72%, transparent) 36%, color-mix(in srgb, var(--c-ink) 16%, transparent) 58%, transparent 68%); }
.faq-hero__in { position: relative; display: flex; justify-content: flex-end; }
.faq-hero__copy { width: min(540px, 42%); }
.faq-hero__title { font: 800 var(--fs-h1)/1.02 var(--font-display); letter-spacing: -0.025em; text-wrap: balance; }
.faq-hero__line { margin: 18px 0 28px; font-size: var(--fs-body); color: color-mix(in srgb, var(--c-on-ink) 92%, transparent); text-wrap: pretty; }
.faq-hero__search { position: relative; }
.faq-hero__loupe { position: absolute; left: 20px; top: 50%; width: 22px; height: 22px; margin-top: -11px; fill: none; stroke: var(--c-ink-soft); stroke-width: 2.2; stroke-linecap: round; pointer-events: none; }
.faq-hero__input { -webkit-appearance: none; appearance: none; width: 100%; height: 60px; padding: 0 20px 0 54px; border: 0; border-radius: 999px;
  font: 600 var(--fs-ui)/1 var(--font-ui); color: var(--c-ink); background: var(--c-paper); box-shadow: 0 0 0 1px var(--c-glass-edge), var(--shadow-l); }
.faq-hero__input::placeholder { color: var(--c-ink-soft); opacity: 1; }
.faq-hero__input:focus-visible { outline: 3px solid var(--c-arrow-2); outline-offset: 3px; }
.faq-hero__count { min-height: 1.4em; margin: 10px 0 0 20px; font: 600 var(--fs-small)/1.4 var(--font-ui); color: color-mix(in srgb, var(--c-on-ink) 90%, transparent); }
.faq-hero__count a { color: var(--c-arrow-2); }
.faq-hero__topics { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.faq-hero__topic { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; font: 700 var(--fs-small)/1 var(--font-ui); color: var(--c-on-ink); text-decoration: none;
  background: var(--c-glass); -webkit-backdrop-filter: blur(14px) saturate(1.25); backdrop-filter: blur(14px) saturate(1.25); box-shadow: inset 0 0 0 1px var(--c-glass-edge); transition: background .2s var(--ease-out); }
.faq-hero__topic:hover, .faq-hero__topic:focus-visible { background: color-mix(in srgb, var(--c-on-ink) 20%, transparent); }
@media (max-width: 999px) {
  .faq-hero { display: block; min-height: 0; padding: 0; }
  .faq-hero__media { position: relative; inset: auto; z-index: 0; height: clamp(280px, 66vw, 480px); }
  .faq-hero__media img { object-position: 30% 10%; }
  .faq-hero__media::after { background: linear-gradient(180deg, transparent 60%, color-mix(in srgb, var(--c-ink) 55%, transparent) 100%); }
  .faq-hero__in { display: block; padding: 32px var(--gutter) 48px; }
  .faq-hero__copy { width: auto; max-width: 620px; margin-inline: auto; }
}

/* ---- faq: the questions by topic on the paper; the search hides what does not match ---- */
.faq-page [hidden] { display: none !important; }
.faq-page__in { max-width: 860px; }
.faq-group, .faq-page .faq__item { scroll-margin-top: 104px; }
.faq-group + .faq-group { margin-top: clamp(48px, 5vw, 72px); }
.faq-group__title { margin-bottom: 20px; font: 800 var(--fs-h3)/1.15 var(--font-display); letter-spacing: -0.015em; color: var(--c-wordmark); }
.faq-page .faq__a a { color: var(--c-wordmark); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.faq-page__none { padding: 28px; border-radius: var(--radius-m); font-size: var(--fs-body); text-align: center; background: color-mix(in srgb, var(--c-on-brand) 70%, var(--c-paper)); box-shadow: inset 0 0 0 1px var(--c-line); }
.faq-page__none a { color: var(--c-wordmark); font-weight: 700; }

/* ---- close: a contractor walking an older homeowner through his estimate (faces at x 25-38% and 58-75%, y 8-40%), the
   photo at the right, the card landing on the table at its lower left, the words on the night at the left; under
   1000 px the photo stands first and the card hangs on its foot ---- */
.faq-close { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: minmax(0, 42fr) minmax(0, 58fr); align-items: center;
  min-height: clamp(560px, 46vw, 720px); color: var(--c-on-ink); background: var(--g-night); }
.faq-close__media { position: absolute; inset: 0 0 0 auto; z-index: -1; width: 58%; margin: 0; overflow: hidden; }
.faq-close__media img { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; object-position: 50% 30%; }
.faq-close__media::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(270deg, transparent 72%, color-mix(in srgb, var(--c-ink) 70%, transparent) 100%); }
.faq-close__in { grid-column: 1; justify-self: end; display: grid; justify-items: start; width: 100%; max-width: 560px; padding: var(--section-y) var(--gutter); }
.faq-close__title { margin-bottom: 28px; font: 800 clamp(2.5rem, 1.5rem + 2.6vw, 4rem)/1.03 var(--font-display); letter-spacing: -0.025em; text-wrap: balance; }
.faq-close__note { margin-top: 12px; font: 600 var(--fs-small)/1.4 var(--font-ui); color: color-mix(in srgb, var(--c-on-ink) 88%, transparent); }
.faq-close__more { margin-top: 18px; font-size: var(--fs-small); color: color-mix(in srgb, var(--c-on-ink) 88%, transparent); }
.faq-close__more a { color: var(--c-brand-on-ink); font-weight: 700; }
.faq-close__seq { position: absolute; z-index: 1; left: calc(42% + 28px); bottom: 8%; }
.faq-close__booking { min-width: 270px; opacity: var(--kit-in, 1); transform: translateY(calc((1 - var(--kit-in, 1)) * 12px)); }
.faq-close__booking b { display: block; font: 700 1.125rem/1.2 var(--font-display); }
.faq-close__booking small { display: block; margin-top: 2px; font: 600 var(--fs-small)/1.3 var(--font-ui); color: color-mix(in srgb, var(--c-on-ink) 86%, transparent); }
.faq-close__tile { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 12px; background: var(--g-arrow); color: var(--c-ink); }
.faq-close__tile .mark { width: 24px; height: 24px; }
.faq-close__stop { right: 16px; top: 16px; }
@media (max-width: 999px) {
  .faq-close { display: block; place-items: normal; min-height: 0; padding: 0 0 72px; }
  .faq-close__media { position: relative; inset: auto; z-index: 0; width: auto; aspect-ratio: 3 / 2; }
  .faq-close__media::after { background: linear-gradient(180deg, transparent 62%, color-mix(in srgb, var(--c-ink) 60%, transparent) 100%); }
  .faq-close__seq { left: 16px; top: calc(66.67vw - 56px); bottom: auto; }
  .faq-close__booking { min-width: 0; }
  .faq-close__in { justify-items: center; max-width: 640px; margin: 0 auto; padding: 60px var(--gutter) 0; text-align: center; }
}
