/* FAQ — oDarkly faceless cinematic page */

html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

/* ── Page shell ── */
.faq-page {
  --faq-glass: rgba(10, 10, 10, 0.72);
  --faq-glass-border: rgba(255, 255, 255, 0.1);
  --faq-accent: var(--fc-purple, #a78bfa);
  --faq-sketch: rgba(255, 255, 255, 0.22);
}

[data-theme="light"] .faq-page {
  --faq-glass: rgba(255, 255, 255, 0.82);
  --faq-glass-border: rgba(9, 9, 11, 0.1);
  --faq-sketch: rgba(9, 9, 11, 0.18);
}

.faq-main {
  width: min(var(--lp-container, 1200px), calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(4rem, 8vw, 7rem);
}

/* ── Scroll progress ── */
.faq-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 200;
  pointer-events: none;
  background: transparent;
}

.faq-progress-bar {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: left center;
  transform: scaleX(0);
  background: var(--faq-accent);
  box-shadow: 0 0 12px var(--fc-purple-glow, rgba(139, 92, 246, 0.35));
}

/* ── Glass panels ── */
.faq-glass {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  background-color: var(--faq-glass);
  border-radius: 24px;
  box-shadow:
    0 24px 56px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}

[data-theme="light"] .faq-glass {
  box-shadow:
    0 20px 48px rgba(9, 9, 11, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.faq-glass.border-gradient::before {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.14) 0%,
    rgba(167, 139, 250, 0.32) 42%,
    rgba(192, 132, 252, 0.22) 68%,
    rgba(255, 255, 255, 0.08) 100%
  );
}

/* ── Hero ── */
.faq-hero {
  position: relative;
  max-width: 860px;
  margin: 0 auto clamp(2.5rem, 6vw, 4.5rem);
  text-align: center;
  padding: clamp(1rem, 3vw, 2rem) 0;
}

.faq-hero-sketches {
  position: absolute;
  inset: -2rem -1rem auto;
  height: min(280px, 38vh);
  pointer-events: none;
  overflow: visible;
}

.faq-sketch {
  position: absolute;
  opacity: 0.85;
}

.faq-sketch path {
  stroke: var(--faq-sketch);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.faq-sketch--question {
  width: 52px;
  top: 10%;
  left: 8%;
  transform: rotate(-6deg);
}

.faq-sketch--star {
  width: 32px;
  top: 6%;
  right: 14%;
  transform: rotate(10deg);
}

.faq-sketch--circle {
  width: 68px;
  bottom: 20%;
  right: 8%;
  transform: rotate(-4deg);
}

.faq-sketch--squiggle {
  width: 96px;
  bottom: 32%;
  left: 12%;
}

.faq-hero-label {
  display: inline-block;
  margin-bottom: 1rem;
}

.faq-hero-title {
  margin: 0 0 1.25rem;
}

.faq-hero-desc {
  max-width: 640px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  line-height: 1.75;
}

/* ── Motion text masks ── */
html.has-motion [data-motion-text],
html.has-motion [data-reveal],
html.has-motion [data-reveal-item] {
  visibility: hidden;
}

.motion-line-mask,
.motion-word-mask {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
}

.motion-line,
.motion-word {
  display: inline-block;
  will-change: transform, opacity;
}

/* ── Search ── */
.faq-search-wrap {
  max-width: 560px;
  margin: 0 auto clamp(2rem, 5vw, 3rem);
}

.faq-search {
  position: relative;
  display: flex;
  align-items: center;
}

.faq-search-icon {
  position: absolute;
  left: 1.1rem;
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

.faq-search-input {
  width: 100%;
  padding: 0.95rem 1.1rem 0.95rem 2.75rem;
  border: 1px solid var(--fc-border);
  border-radius: 16px;
  background: var(--faq-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--text-main);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.faq-search-input::placeholder {
  color: var(--text-muted);
}

.faq-search-input:focus {
  outline: none;
  border-color: var(--faq-accent);
  box-shadow: 0 0 0 3px var(--fc-purple-soft, rgba(167, 139, 250, 0.14));
}

.faq-search-empty {
  display: none;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 2rem 0;
}

.faq-search-empty.is-visible {
  display: block;
}

/* ── Categories ── */
.faq-categories {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 900px;
  margin: 0 auto;
}

.faq-category {
  overflow: hidden;
}

.faq-category-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: clamp(1.1rem, 3vw, 1.35rem) clamp(1.25rem, 3vw, 1.5rem);
  border: 0;
  background: transparent;
  color: var(--text-main);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.faq-category-label {
  flex: 1;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  font-weight: 400;
  letter-spacing: -0.015em;
}

.faq-category-count {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: var(--fc-purple-soft);
  color: var(--faq-accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.faq-category-chevron {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.35s ease, color 0.25s ease;
}

.faq-category.is-open .faq-category-chevron {
  transform: rotate(180deg);
  color: var(--faq-accent);
}

.faq-category-panel {
  overflow: hidden;
  height: auto;
}

.faq-category-panel[hidden] {
  display: none;
}

/* ── FAQ items ── */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0 clamp(1rem, 3vw, 1.5rem) clamp(1rem, 3vw, 1.5rem);
}

.faq-item {
  border: 1px solid var(--fc-border);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.2);
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

[data-theme="light"] .faq-item {
  background: rgba(9, 9, 11, 0.03);
}

.faq-item.is-open {
  border-color: rgba(167, 139, 250, 0.35);
  box-shadow: 0 0 0 1px var(--fc-purple-soft);
}

.faq-item.is-hidden {
  display: none;
}

.faq-item-q {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 1rem 1.15rem;
  border: 0;
  background: transparent;
  color: var(--text-main);
  font: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
}

.faq-item-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--fc-purple-soft);
  color: var(--faq-accent);
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1;
  transition: transform 0.35s ease, background 0.25s ease;
}

.faq-item.is-open .faq-item-icon {
  transform: rotate(45deg);
  background: var(--faq-accent);
  color: var(--bg-0, #000);
}

.faq-item-a {
  overflow: hidden;
  height: 0;
}

.faq-item-a-inner {
  padding: 0 1.15rem 1.15rem;
}

.faq-item-a p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.94rem;
  line-height: 1.75;
}

.faq-item-a p + p {
  margin-top: 0.75rem;
}

/* ── CTA ── */
.faq-cta {
  max-width: 720px;
  margin: clamp(3rem, 8vw, 5rem) auto 2.5rem;
  text-align: center;
  padding: clamp(2rem, 5vw, 3rem);
}

.faq-cta h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 400;
  color: var(--text-main);
}

.faq-cta p {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  max-width: 480px;
  margin-inline: auto;
  line-height: 1.65;
}

/* ── Next link ── */
.faq-next-link {
  max-width: 900px;
  margin: 0 auto;
}

.faq-breadcrumb {
  margin-bottom: 1.5rem;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  html.has-motion [data-motion-text],
  html.has-motion [data-reveal],
  html.has-motion [data-reveal-item] {
    visibility: visible;
  }

  .faq-progress-bar {
    transform: none !important;
    transition: none;
  }

  .fc-sketch-draw {
    stroke-dashoffset: 0 !important;
  }

  .faq-category-chevron,
  .faq-item-icon {
    transition: none;
  }
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .faq-hero-sketches .faq-sketch--squiggle {
    opacity: 0.45;
  }
}

@media (max-width: 480px) {
  .faq-main {
    width: calc(100% - 1.25rem);
  }

  .faq-item-q {
    padding: 0.9rem 1rem;
    font-size: 0.92rem;
  }

  .faq-item-a-inner {
    padding: 0 1rem 1rem;
  }
}
