/* =============================================================
   /faq — questions and answers.

   House palette: ink background, cream text, the orange accent. The
   whole page is readable and usable with styles only — the accordion is
   a real <details>, so it opens without script — and faq.js layers the
   filter and the jump nav on top.

   The open/close animation uses the grid-template-rows 0fr → 1fr trick
   rather than animating height: height needs a pixel number to animate
   between, and a fraction does not, so the answer can be any length and
   still ease open smoothly.
   ============================================================= */

.faq-head {
  padding: clamp(56px, 8vw, 104px) 0 clamp(22px, 3vw, 34px);
  background:
    radial-gradient(60% 70% at 50% -10%, rgba(255, 107, 53, .14), transparent 70%),
    var(--bg);
  text-align: center;
}
.faq-head h1 { font-family: var(--head); font-size: clamp(42px, 8vw, 92px); line-height: .94; margin: 10px 0 14px; text-transform: uppercase; }
.faq-head h1 em { font-style: normal; color: var(--acc); }
.faq-lead { max-width: 60ch; margin: 0 auto; color: var(--tx2); font-size: clamp(15px, 1.8vw, 17px); line-height: 1.7; }
.faq-lead a { color: var(--acc); text-decoration: underline; text-underline-offset: 3px; }

/* ---------------- search ---------------- */
.faq-search { max-width: 620px; margin: clamp(22px, 3vw, 34px) auto 0; }
.faq-search-field {
  position: relative; display: flex; align-items: center; gap: 10px;
  padding: 4px 6px 4px 16px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line2);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.faq-search-field:focus-within { border-color: var(--acc); box-shadow: 0 0 0 4px rgba(255, 107, 53, .14); }
.faq-search-field svg { flex: none; width: 19px; height: 19px; fill: var(--tx3); }
.faq-search input {
  flex: 1; min-width: 0; padding: 14px 0; border: 0; background: none;
  color: var(--tx); font-family: var(--body); font-size: 16px; font-weight: 600;
}
.faq-search input::placeholder { color: var(--tx3); font-weight: 400; }
.faq-search input:focus { outline: none; }
.faq-search input::-webkit-search-cancel-button { display: none; }
.faq-search-clear {
  flex: none; width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
  border: 0; background: var(--panel2); color: var(--tx2); font-size: 20px; line-height: 1;
}
.faq-search-clear:hover { background: var(--acc); color: #1A0B04; }
.faq-count { margin: 10px 0 0; font-size: 13px; color: var(--tx3); min-height: 1.2em; }

/* ---------------- jump nav ---------------- */
.faq-jump {
  position: sticky; top: 0; z-index: 30;
  background: rgba(10, 10, 10, .88);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-block: 1px solid var(--line);
}
.faq-jump ul {
  display: flex; gap: 8px; list-style: none; margin: 0; padding: 12px 0;
  overflow-x: auto; scrollbar-width: none;
}
.faq-jump ul::-webkit-scrollbar { display: none; }
.faq-jump a {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  padding: 9px 15px; border-radius: 999px; text-decoration: none;
  background: var(--panel); border: 1px solid var(--line2);
  color: var(--tx2); font-weight: 700; font-size: 13.5px;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.faq-jump a span {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: var(--panel2); color: var(--tx3); font-size: 11px;
}
.faq-jump a:hover { color: var(--tx); border-color: var(--tx3); }
.faq-jump a.is-here { background: var(--acc); border-color: var(--acc); color: #1A0B04; }
.faq-jump a.is-here span { background: rgba(26, 11, 4, .22); color: #1A0B04; }

/* ---------------- groups ---------------- */
.faq-body { padding: clamp(34px, 5vw, 60px) 0 clamp(40px, 6vw, 80px); }
.faq-group { padding-top: clamp(26px, 4vw, 44px); scroll-margin-top: 74px; }
.faq-group[hidden] { display: none; }
.faq-group-head { margin-bottom: 18px; }
.faq-group-head h2 {
  font-family: var(--head); font-size: clamp(24px, 3.4vw, 36px); line-height: 1.05;
  text-transform: uppercase; margin: 0 0 6px;
}
.faq-group-head p { margin: 0; color: var(--tx3); font-size: 14.5px; }

.faq-list { display: flex; flex-direction: column; gap: 10px; }

/* ---------------- one question ---------------- */
.faq-item {
  border: 1px solid var(--line); border-radius: 16px; background: var(--bg2);
  transition: border-color .2s ease, background-color .2s ease;
}
.faq-item[hidden] { display: none; }
.faq-item:hover { border-color: var(--line2); }
.faq-item[open] { border-color: rgba(255, 107, 53, .4); background: var(--panel); }
.faq-item.is-found { border-color: rgba(255, 107, 53, .55); }

.faq-item summary {
  display: flex; align-items: center; gap: 16px; justify-content: space-between;
  padding: 18px 20px; cursor: pointer; list-style: none;
  font-weight: 700; font-size: clamp(15px, 1.9vw, 17px); line-height: 1.45; color: var(--tx);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; border-radius: 16px; }
.faq-item[open] summary { color: var(--acc); }

/* the + that becomes a − */
.faq-mark { position: relative; flex: none; width: 22px; height: 22px; }
.faq-mark::before, .faq-mark::after {
  content: ''; position: absolute; inset: 50% 0 auto; height: 2px; border-radius: 2px;
  background: currentColor; transform: translateY(-50%);
  transition: transform .28s cubic-bezier(.3, .9, .3, 1), opacity .28s ease;
}
.faq-mark::after { transform: translateY(-50%) rotate(90deg); }
.faq-item[open] .faq-mark::after { transform: translateY(-50%) rotate(0deg); opacity: 0; }

/* The answer, opened by a fraction rather than a pixel height. */
.faq-a-wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .32s cubic-bezier(.3, .9, .3, 1); }
.faq-item[open] .faq-a-wrap { grid-template-rows: 1fr; }
.faq-a { overflow: hidden; }
.faq-a > p {
  margin: 0; padding: 0 20px 6px; color: var(--tx2);
  font-size: 15.5px; line-height: 1.75; max-width: 76ch;
}
.faq-link {
  display: inline-block; margin: 10px 20px 18px; font-size: 12.5px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; color: var(--tx3); text-decoration: none;
}
.faq-link:hover { color: var(--acc); }
.faq-link.is-copied { color: var(--grn); }

/* A question arrived at by link gets a moment of attention. */
.faq-item.is-target { animation: faq-ping 1.6s ease-out; }
@keyframes faq-ping {
  0% { box-shadow: 0 0 0 0 rgba(255, 107, 53, .5); }
  100% { box-shadow: 0 0 0 16px rgba(255, 107, 53, 0); }
}

.faq-empty { margin: 40px 0; text-align: center; color: var(--tx2); font-size: 16px; }
.faq-empty a { color: var(--acc); }

/* ---------------- arriving on scroll ---------------- */
.faq-js .faq-item { opacity: 0; transform: translateY(10px); }
.faq-js .faq-item.is-in {
  opacity: 1; transform: none;
  transition: opacity .5s ease calc(var(--i, 0) * 45ms), transform .5s cubic-bezier(.2, .7, .3, 1) calc(var(--i, 0) * 45ms);
}

/* ---------------- the last card ---------------- */
.faq-foot { padding: 0 0 clamp(50px, 7vw, 90px); }
.faq-foot-card {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(24px, 4vw, 48px); align-items: center;
  padding: clamp(28px, 4vw, 46px); border-radius: 26px;
  background:
    radial-gradient(70% 90% at 88% 10%, rgba(255, 107, 53, .12), transparent 62%),
    var(--panel);
  border: 1px solid var(--line2);
}
.faq-foot-card h2 { font-family: var(--head); font-size: clamp(28px, 4vw, 44px); line-height: 1; text-transform: uppercase; margin: 8px 0 12px; }
.faq-foot-card h2 em { font-style: normal; color: var(--acc); }
.faq-foot-card p { color: var(--tx2); font-size: 15.5px; line-height: 1.7; margin: 0; max-width: 46ch; }
.faq-foot-links { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.faq-foot-more { font-size: 13px; color: var(--tx3); margin-top: 4px; }
.faq-foot-more a { color: var(--tx2); text-decoration: underline; text-underline-offset: 3px; }
.faq-foot-more a:hover { color: var(--acc); }

@media (max-width: 760px) {
  .faq-foot-card { grid-template-columns: 1fr; }
  .faq-item summary { padding: 16px; gap: 12px; }
  .faq-a > p { padding-inline: 16px; }
  .faq-link { margin-inline: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .faq-a-wrap, .faq-mark::before, .faq-mark::after { transition: none; }
  .faq-js .faq-item { opacity: 1; transform: none; }
  .faq-item.is-target { animation: none; }
}
