/* ============================================================
   FAQs page styles.
   Source: /docs/mockups/faqs.html.

   The page is a single-column composition: a dark photographic
   topo hero with the search input, then a light section with a
   sticky category sidebar + grouped FAQ list, then the shared
   CTA section.

   Categories and labels live in src/_data/faqs_page.yml. The
   FAQ entries themselves live in collections.faqs. Search,
   category filter, and highlight are wired up in the page-level
   <script> block in src/faqs.njk.

   Sections:
   - .faqs-hero            Dark photographic topo hero, pulled
                           under the transparent nav. Hosts the
                           search input.
   - .faqs-section         Light grid with sticky sidebar (desktop)
                           or pill row (mobile) + grouped list.
   - .faqs-item            <details>/<summary> accordion with a
                           rotating + → × toggle. Distinct from
                           the bordered (+/−) variant on Pricing
                           and the chevron variant on Creator —
                           reconcile if a fourth FAQ treatment
                           triggers the lift.
   ============================================================ */

/* === HERO === */

.faqs-hero {
  background:
    radial-gradient(ellipse 700px 450px at 88% 10%, rgba(220, 115, 76, 0.18), transparent 65%),
    radial-gradient(ellipse 600px 420px at 5% 95%, rgba(22, 93, 148, 0.18), transparent 65%),
    #0a1828;
  position: relative;
  overflow: hidden;
  color: var(--text-light);
  /* Pull under the transparent nav-wrap--over-hero (driven by --nav-h). */
  margin-top: calc(var(--nav-h) * -1);
  padding-top: var(--nav-h);
}

.faqs-hero .hero-topo { opacity: 0.85; }

.faqs-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 24, 40, 0.35) 0%,
    rgba(10, 24, 40, 0.10) 40%,
    rgba(10, 24, 40, 0.45) 100%
  );
  pointer-events: none;
  z-index: 1;
}

.faqs-hero-inner {
  position: relative;
  padding: 56px 0 72px;
  z-index: 2;
}

.faqs-hero-content {
  max-width: 760px;
  position: relative;
  z-index: 3;
}

.faqs-hero .eyebrow {
  color: var(--orange-bright);
  display: block;
  margin-bottom: 24px;
}

.faqs-hero h1 {
  font-size: 52px;
  line-height: 1.05;
  letter-spacing: var(--tracking-display);
  color: var(--text-light);
  margin-bottom: 20px;
}

.faqs-hero-sub {
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-light-2);
  max-width: 620px;
  margin-bottom: 36px;
}

/* === SEARCH === */

.faqs-search {
  position: relative;
  max-width: 560px;
  margin-top: 8px;
}
.faqs-search-input {
  width: 100%;
  padding: 16px 48px 16px 52px;
  background: rgba(10, 24, 40, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  color: var(--text-light);
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.faqs-search-input::placeholder { color: var(--text-light-3); }
.faqs-search-input:focus {
  border-color: rgba(232, 129, 96, 0.5);
  background: rgba(10, 24, 40, 0.7);
}
/* Hide the native clear button — we render our own. */
.faqs-search-input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }

.faqs-search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-light-3);
  pointer-events: none;
}

.faqs-search-clear {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-light-2);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  font-family: inherit;
}
.faqs-search-clear:hover { background: rgba(255, 255, 255, 0.14); }
.faqs-search-clear.is-visible { display: flex; }
.faqs-search-clear svg { width: 12px; height: 12px; }

.faqs-search-meta {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-light-3);
  min-height: 18px;
}
.faqs-search-meta strong { color: var(--text-light-2); font-weight: var(--weight-medium); }

/* === FAQ SECTION (light) === */

.faqs-section {
  padding: 80px 0 96px;
  background: var(--bg-light);
  color: var(--text-dark);
}

.faqs-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 64px;
  align-items: start;
}

/* Sidebar */
.faqs-sidebar {
  position: sticky;
  top: 24px;
}
.faqs-sidebar-label {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 18px;
  font-weight: var(--weight-medium);
}
.faqs-sidebar-list {
  list-style: none;
  display: grid;
  gap: 4px;
  padding: 0;
  margin: 0;
}
.faqs-sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-dark-2);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font-family: inherit;
}
.faqs-sidebar-link:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-dark);
}
.faqs-sidebar-link.is-active {
  background: rgba(22, 93, 148, 0.08);
  color: var(--blue);
  font-weight: var(--weight-medium);
}
.faqs-sidebar-link > span:first-child { flex: 1; }
.faqs-count {
  font-size: 12px;
  color: var(--text-dark-3);
  font-weight: var(--weight-regular);
}
.faqs-sidebar-link.is-active .faqs-count { color: var(--blue); opacity: 0.7; }

.faqs-sidebar-foot {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--border-on-light);
  font-size: 12.5px;
  color: var(--text-dark-3);
  line-height: 1.55;
}
.faqs-sidebar-foot strong {
  display: block;
  color: var(--text-dark-2);
  font-weight: var(--weight-medium);
  margin-bottom: 6px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* List */
.faqs-list { display: grid; gap: 56px; }
.faqs-category[hidden] { display: none; }

.faqs-category-head {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-on-light);
}
.faqs-category-head h2 {
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin: 0 0 6px;
}
.faqs-category-head p {
  font-size: 14px;
  color: var(--text-dark-2);
  line-height: 1.5;
  margin: 0;
}
.faqs-category-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--blue);
  text-decoration: none;
  transition: color 0.2s ease;
}
.faqs-category-link:hover { color: var(--orange); }
.faqs-category-link .arrow { transition: transform 0.3s var(--ease-out); }
.faqs-category-link:hover .arrow { transform: translateX(3px); }

.faqs-items { display: grid; gap: 0; }

.faqs-item {
  border-bottom: 1px solid var(--border-on-light);
  transition: opacity 0.2s ease;
}
.faqs-item:last-child { border-bottom: none; }
.faqs-item[hidden] { display: none; }

.faqs-item summary { list-style: none; cursor: pointer; }
.faqs-item summary::-webkit-details-marker { display: none; }

.faqs-q {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  font-family: inherit;
  color: var(--text-dark);
  padding: 22px 40px 22px 0;
  font-size: 16px;
  font-weight: var(--weight-medium);
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  transition: color 0.2s ease;
}
.faqs-item:hover .faqs-q { color: var(--orange); }
.faqs-toggle {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--text-dark-3);
  transition: transform 0.3s var(--ease-out), color 0.2s ease;
}
.faqs-toggle svg { width: 100%; height: 100%; display: block; }
.faqs-item:hover .faqs-toggle { color: var(--orange); }
.faqs-item[open] .faqs-toggle { transform: rotate(45deg); }

.faqs-a {
  padding: 0 40px 28px 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-dark-2);
}
.faqs-a p { margin: 0 0 12px; }
.faqs-a p:last-child { margin-bottom: 0; }
.faqs-a a {
  color: var(--blue);
  text-decoration: none;
  border-bottom: 1px solid rgba(22, 93, 148, 0.3);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.faqs-a a:hover { color: var(--orange); border-bottom-color: var(--blue); }

/* Search-match highlight */
.faqs-q mark, .faqs-a mark {
  background: rgba(232, 129, 96, 0.25);
  color: inherit;
  padding: 1px 2px;
  border-radius: 2px;
}

/* Empty state */
.faqs-empty {
  padding: 64px 24px;
  text-align: center;
  background: var(--bg-light-2);
  border: 1px dashed var(--border-on-light);
  border-radius: 12px;
}
.faqs-empty[hidden] { display: none; }
.faqs-empty h3 {
  font-size: 20px;
  margin: 0 0 8px;
  color: var(--text-dark);
}
.faqs-empty p {
  font-size: 14px;
  color: var(--text-dark-2);
  line-height: 1.6;
  margin: 0 0 18px;
}
.faqs-empty button {
  padding: 10px 18px;
  background: transparent;
  border: 1px solid var(--border-strong-on-light);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: var(--weight-medium);
  color: var(--text-dark);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s ease;
}
.faqs-empty button:hover { background: rgba(0, 0, 0, 0.04); }

/* === Responsive === */

@media (max-width: 980px) {
  .faqs-hero h1 { font-size: 40px; }
  .faqs-hero-sub { font-size: 16px; }
  .faqs-layout { grid-template-columns: 1fr; gap: 32px; }
  .faqs-sidebar { position: static; }
  .faqs-sidebar-label { margin-bottom: 12px; }
  .faqs-sidebar-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .faqs-sidebar-link {
    padding: 8px 14px;
    border: 1px solid var(--border-on-light);
    border-radius: 999px;
    width: auto;
  }
  .faqs-sidebar-link.is-active {
    background: var(--text-dark);
    color: var(--text-light);
    border-color: var(--text-dark);
  }
  .faqs-sidebar-link.is-active .faqs-count { color: var(--text-light); opacity: 0.7; }
  .faqs-sidebar-foot { display: none; }
}

@media (max-width: 640px) {
  .faqs-hero-inner { padding: 40px 0 48px; }
  .faqs-hero h1 { font-size: 32px; }
  .faqs-section { padding: 56px 0 72px; }
  .faqs-list { gap: 44px; }
  .faqs-category-head h2 { font-size: 22px; }
  .faqs-q { font-size: 15px; padding: 18px 32px 18px 0; }
  .faqs-a { padding: 0 0 22px 0; font-size: 14px; }
}
