/* FAQ (plan.md "FAQ"): the header's still photo of a bakery owner on a call, with the search and the topics that filter
   the answers below (assets\js\pages\faq.js); the answers grouped by topic, each group's name beside its questions; the
   close on the carpenter's workshop. */

/* #top: the words, the search and the topics on the left over the ink; the photo from 36% across to the right edge,
   faded into the ink on its left, so the owner stands whole at the right. */
.faq-top { position: relative; background: var(--c-ink); isolation: isolate; display: grid; align-items: center; scroll-margin-top: var(--header-h); } /* as tall as its words, so the first questions show on the first screen */
.faq-top__media { position: absolute; inset: 0 0 0 36%; z-index: 0; overflow: hidden; }
.faq-top__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.faq-top__media::after { content: ""; position: absolute; inset: 0 0 0 -2px; pointer-events: none; background: linear-gradient(90deg, var(--c-ink) 0%, rgba(0, 0, 0, .62) 12%, rgba(0, 0, 0, .14) 30%, rgba(0, 0, 0, 0) 42%), linear-gradient(0deg, rgba(0, 0, 0, .4) 0%, rgba(0, 0, 0, 0) 26%); }
.faq-top__in { position: relative; z-index: 1; box-sizing: border-box; padding-block: clamp(34px, 5.4svh, 60px); }
.faq-top__in > * { max-width: 560px; }
.faq-top__title { margin: 0; font-size: clamp(2.3rem, 1.1rem + 2.7vw, 3.7rem); font-weight: 800; line-height: 1.04; letter-spacing: -.03em; text-wrap: balance; }
.faq-top__lead { max-width: 500px; margin: clamp(10px, 1.6svh, 16px) 0 0; font-size: var(--fs-lead); line-height: 1.5; color: rgba(246, 251, 253, .9); text-wrap: pretty; }

/* The search: one glass field, its count under it; the topics as glass pills, the chosen one ringed in cyan. */
.faq-find { margin-top: clamp(20px, 3.4svh, 32px); }
.faq-find__label { display: block; margin-bottom: 8px; font: 600 var(--fs-small)/1.2 var(--font-ui); color: var(--c-quiet); }
.faq-find__box { position: relative; display: flex; align-items: center; border-radius: 999px; background: var(--glass-strong); box-shadow: var(--glow-soft); -webkit-backdrop-filter: blur(var(--glass-blur)); backdrop-filter: blur(var(--glass-blur)); transition: box-shadow var(--dur-fast); }
.faq-find__box:focus-within { box-shadow: var(--glow); }
.faq-find__box svg { position: absolute; left: 20px; top: 50%; width: 20px; height: 20px; margin-top: -10px; color: var(--c-brand); pointer-events: none; }
.faq-find__input { box-sizing: border-box; width: 100%; min-height: 58px; padding: 14px 22px 14px 52px; border: 0; border-radius: 999px; background: transparent; color: var(--c-on-ink); font: 400 1.06rem/1.2 var(--font-text); }
.faq-find__input:focus { outline: none; }
.faq-find__input::placeholder { color: rgba(169, 180, 186, .75); }
.faq-find__input::-webkit-search-cancel-button { filter: invert(1) brightness(1.4); cursor: pointer; }
.faq-find__count { margin: 10px 0 0 4px; font-size: var(--fs-small); line-height: 1.4; color: var(--c-quiet); }
.faq-find__count a { color: var(--c-brand); font-weight: 600; }
.faq-topics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: clamp(16px, 2.6svh, 22px); }
.faq-topic { min-height: 42px; padding: 10px 17px; border: 0; border-radius: 999px; background: rgba(9, 18, 30, .66); box-shadow: inset 0 0 0 1px var(--glass-edge); color: var(--c-on-ink); font: 600 var(--fs-small)/1 var(--font-ui); cursor: pointer; transition: box-shadow var(--dur-fast), background var(--dur-fast), color var(--dur-fast); }
.faq-topic:hover { box-shadow: inset 0 0 0 1px rgba(2, 228, 255, .6); }
.faq-topic[aria-pressed="true"] { background: rgba(2, 228, 255, .14); box-shadow: inset 0 0 0 1.5px var(--c-brand), 0 0 18px rgba(2, 228, 255, .16); color: var(--c-brand-light); }

/* #answers: each topic's name beside its questions; one column on the phone. */
.faq-list { padding-top: clamp(26px, 3.2vw, 44px); }
.faq-list__in { display: grid; }
.faq-group { display: grid; grid-template-columns: minmax(0, .5fr) minmax(0, 1.5fr); gap: clamp(20px, 4vw, 64px); padding-block: clamp(18px, 2.6vw, 30px); }
.faq-group__title { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; margin: 0; padding-top: 17px; font: 800 var(--fs-h3)/1.2 var(--font-display); letter-spacing: -.01em; color: var(--c-navy); }
.faq-group .faq { margin-top: 0; }
.faq__a a { color: var(--c-brand-text); font-weight: 600; }
.faq-none { margin: 12px 0 0; padding: 24px; border-radius: var(--radius-m); background: var(--c-white); box-shadow: inset 0 0 0 1px rgba(11, 23, 38, .1); color: var(--c-text-on-paper); text-align: center; }
.faq-none a { color: var(--c-brand-text); font-weight: 600; }

/* The close: the carpenter at his bench; the clip drawn 1.08 times from its left edge, so the band saw's label stays out
   of the frame; the card at the top right over the windows, clear of the stop icon. */
.faq-close .close__clip video { object-position: 0% 50%; transform: scale(1.08); transform-origin: 0% 50%; }
.faq-close .close__card { top: 14px; bottom: auto; left: auto; right: 56px; transform: none; }

@media (min-width: 1001px) and (max-width: 1279px) {
  .faq-top__in > * { max-width: 500px; }
  .faq-top__media img { object-position: 25% 30%; } /* the owner a little further right, clear of the search */
}
@media (max-width: 1000px) {
  .faq-top { display: flex; flex-direction: column; align-items: stretch; min-height: 0; }
  .faq-top__media { position: relative; inset: auto; height: clamp(260px, 64vw, 460px); }
  .faq-top__media img { object-position: 56% 28%; }
  .faq-top__media::after { inset: 0; background: linear-gradient(0deg, var(--c-ink) 0%, rgba(0, 0, 0, .3) 22%, rgba(0, 0, 0, 0) 40%); }
  .faq-top__in { padding-block: 6px 34px; }
  .faq-top__title { font-size: clamp(2rem, 1.2rem + 4vw, 2.9rem); }
  .faq-top__lead { font-size: 1.04rem; }
}
@media (max-width: 900px) {
  .faq-group { grid-template-columns: 1fr; gap: 14px; }
  .faq-group__title { position: static; padding-top: 0; }
}
@media (max-width: 600px) {
  .faq-close .close__clip { aspect-ratio: 4 / 5; }
  .faq-close .close__clip video { object-position: 29% 50%; transform: none; }
  .faq-close .close__card { left: 14px; right: 62px; width: auto; }
}
