/* =========================================================
   FAQ — "Good to know."
   ========================================================= */
.faq {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(60% 260px at 50% 0%, rgba(90, 24, 170, .16), transparent 75%),
    radial-gradient(34% 50% at 20% 78%, rgba(130, 40, 230, .32), transparent 70%),
    radial-gradient(40% 50% at 75% 30%, rgba(80, 20, 160, .2), transparent 72%),
    #050307;
}
.faq::before {                              /* seamless join with the section above */
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 60px;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to bottom, #050307, rgba(5, 3, 7, 0));
}
.faq::after {                               /* fade the bottom glow into the next section */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 140px;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to top, #050307, rgba(5, 3, 7, 0));
}
.faq__dust {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

.faq__inner {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(40px, 5vw, 80px) clamp(16px, 3vw, 40px) clamp(16px, 2vw, 32px);
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(28px, 6vw, 96px);
  align-items: start;
}

/* ---------- left intro ---------- */
.faq__intro { position: relative; }

.faq__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px 6px 7px;
  border-radius: 999px;
  font-family: var(--sans, "Inter", system-ui, sans-serif);
  font-weight: 500;
  font-size: 14px;
  color: #f2eafc;
  background: linear-gradient(180deg, rgba(130, 50, 230, .55), rgba(80, 22, 150, .55));
  border: 1px solid rgba(200, 150, 255, .4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 0 18px rgba(140, 50, 255, .3);
}
.faq__badge-icon {
  display: grid;
  place-items: center;
  width: 20px; height: 20px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
  color: #2b0b52;
  background: radial-gradient(circle at 35% 30%, #f3d9ff, #c48aff);
  box-shadow: 0 0 10px rgba(200, 140, 255, .8);
}
.faq.is-in .faq__badge-icon { animation: qWobble 4s ease-in-out 1.6s infinite; }

.faq__title {
  margin: 18px 0 0;
  font-family: "Crimson Text", Georgia, serif;
  font-weight: 500;
  font-size: clamp(40px, 4.6vw, 64px);
  line-height: 1.02;
  letter-spacing: -.01em;
  color: #f7f3fb;
}
.faq__title .ch {                           /* letters are wrapped by faq.js */
  display: inline-block;
  opacity: 0;
  transform: translateY(.45em) rotate(4deg);
  transition: opacity .7s var(--ease, ease), transform .7s var(--ease, ease);   /* no blur in the reveal: a blur transition per element re-rasterises every frame and made reveals stutter */
  transition-delay: calc(.15s + var(--i) * 28ms);
}
.faq.is-in .faq__title .ch { opacity: 1; transform: none; filter: none; }

.faq__lead {
  margin: 14px 0 0;
  max-width: 340px;
  font-family: var(--sans, "Inter", system-ui, sans-serif);
  font-size: clamp(15px, 1.25vw, 17px);
  line-height: 1.5;
  color: #e4ddee;
}

.faq__rule {                                /* diamond + gold line */
  position: relative;
  display: block;
  width: 130px;
  height: 7px;
  margin-top: 22px;
}
.faq__rule::before {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 7px; height: 7px;
  background: #f7c47c;
  transform: rotate(45deg) scale(0);
  box-shadow: 0 0 8px rgba(247, 196, 124, .9);
  transition: transform .6s cubic-bezier(.34, 1.56, .64, 1) .5s;
}
.faq__rule i {
  position: absolute;
  left: 14px; right: 0; top: 3px;
  height: 1px;
  background: linear-gradient(90deg, #f7c47c, rgba(247, 196, 124, 0));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 1s var(--ease, ease) .7s;
}
.faq.is-in .faq__rule::before { transform: rotate(45deg) scale(1); }
.faq.is-in .faq__rule i { transform: scaleX(1); }

.faq__badge, .faq__lead {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .8s var(--ease, ease), transform .8s var(--ease, ease);
}
.faq__lead { transition-delay: .45s; }
.faq.is-in .faq__badge, .faq.is-in .faq__lead { opacity: 1; transform: none; }

/* ---------- om + book illustration ---------- */
.faq__art {
  position: relative;
  width: 112%;
  max-width: 520px;
  margin: clamp(10px, 2vw, 24px) 0 0 -6%;
  aspect-ratio: 1838 / 856;
  transform: perspective(900px) rotateX(var(--ax, 0deg)) rotateY(var(--ay, 0deg));
  transition: transform .6s var(--ease, ease);
}
.faq__art-glow {                            /* pulsing light behind the om */
  position: absolute;
  left: 50%; top: 36%;
  width: 40%; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 210, 140, .45), rgba(170, 80, 255, .3) 45%, transparent 70%);   /* gradient is already soft: no filter blur */
  will-change: transform, opacity;
  opacity: 0;
  transition: opacity 1.2s ease .9s;
  pointer-events: none;
}
.faq.is-in .faq__art-glow { opacity: 1; animation: qGlow 4.5s ease-in-out 2s infinite; }
.faq__art-img {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  mix-blend-mode: screen;                   /* image's dark sky melts into the section background */
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 55%, transparent 100%);
          mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 55%, transparent 100%);
  opacity: 0;
  transform: translateY(30px) scale(.94);
  transition: opacity 1.2s var(--ease, ease) .6s, transform 1.4s var(--ease, ease) .6s;
}
.faq.is-in .faq__art-img { opacity: 1; transform: none; animation: qFloat 6s ease-in-out 2s infinite; }

/* ---------- accordion ---------- */
.faq__list {
  display: grid;
  gap: 12px;
}
.faq-item {
  --mx: 50%; --my: 50%;
  position: relative;
  border-radius: 12px;
  background:
    radial-gradient(220px 90px at var(--mx) var(--my), rgba(180, 110, 255, .12), transparent 70%),
    linear-gradient(180deg, rgba(40, 16, 72, .55), rgba(22, 9, 40, .55));
  border: 1px solid rgba(180, 130, 240, .22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  opacity: 0;
  transform: translateX(26px);
  transition: opacity .7s var(--ease, ease), transform .7s var(--ease, ease), border-color .35s, background-color .35s, box-shadow .35s;
}
.faq.is-in .faq-item { opacity: 1; transform: none; }
.faq.is-in .faq-item:nth-child(1) { transition-delay: .3s, .3s, 0s, 0s, 0s; }
.faq.is-in .faq-item:nth-child(2) { transition-delay: .4s, .4s, 0s, 0s, 0s; }
.faq.is-in .faq-item:nth-child(3) { transition-delay: .5s, .5s, 0s, 0s, 0s; }
.faq.is-in .faq-item:nth-child(4) { transition-delay: .6s, .6s, 0s, 0s, 0s; }
.faq.is-in .faq-item:nth-child(5) { transition-delay: .7s, .7s, 0s, 0s, 0s; }
.faq.is-in .faq-item:nth-child(n+6) { transition-delay: .8s, .8s, 0s, 0s, 0s; }

.faq-item::before {                         /* accent bar on the left edge of the open item */
  content: "";
  position: absolute;
  left: -1px; top: 14px; bottom: 14px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(to bottom, #f7c47c, #b46bff);
  box-shadow: 0 0 10px rgba(200, 130, 255, .8);
  transform: scaleY(0);
  transition: transform .5s var(--ease, ease);
}
.faq-item:hover { border-color: rgba(200, 150, 255, .4); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 8px 30px rgba(90, 20, 180, .25); }
.faq-item.is-open {
  border-color: rgba(200, 150, 255, .45);
  background:
    radial-gradient(260px 110px at var(--mx) var(--my), rgba(180, 110, 255, .14), transparent 70%),
    linear-gradient(180deg, rgba(60, 24, 104, .62), rgba(30, 12, 56, .62));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 0 0 1px rgba(170, 90, 255, .08), 0 12px 40px rgba(110, 30, 220, .3);
}
.faq-item.is-open::before { transform: scaleY(1); }

.faq-item__h { margin: 0; }
.faq-item__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border: 0;
  background: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--sans, "Inter", system-ui, sans-serif);
  font-weight: 500;
  font-size: clamp(15px, 1.25vw, 17px);
  color: #f2ecf9;
  border-radius: 12px;
  -webkit-tap-highlight-color: transparent;
}
.faq-item__q > span { transition: transform .35s var(--ease, ease), color .3s; }
.faq-item__q:hover > span { transform: translateX(4px); color: #fff; }
.faq-item__q:focus-visible { outline: 2px solid rgba(247, 196, 124, .7); outline-offset: 2px; }

/* plus → minus */
.faq-item__icon {
  position: relative;
  flex: 0 0 auto;
  width: 28px; height: 28px;
  border-radius: 50%;
  transition: background-color .3s, box-shadow .3s, transform .5s var(--ease, ease);
}
.faq-item__icon::before, .faq-item__icon::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 14px; height: 1.6px;
  margin: -.8px 0 0 -7px;
  border-radius: 2px;
  background: #f2ecf9;
  transition: transform .45s var(--ease, ease), background-color .3s;
}
.faq-item__icon::after { transform: rotate(90deg); }
.faq-item__q:hover .faq-item__icon { background: rgba(190, 120, 255, .16); box-shadow: 0 0 14px rgba(170, 90, 255, .45); }
.faq-item.is-open .faq-item__icon { transform: rotate(180deg); }
.faq-item.is-open .faq-item__icon::after { transform: rotate(0deg); }
.faq-item.is-open .faq-item__icon::before, .faq-item.is-open .faq-item__icon::after { background: #f7c47c; }

/* answer: smooth height via grid rows */
.faq-item__a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .5s var(--ease, ease);
}
.faq-item.is-open .faq-item__a { grid-template-rows: 1fr; }
.faq-item__a-inner { overflow: hidden; min-height: 0; }
.faq-item__a p {
  margin: 0;
  padding: 0 56px 18px 20px;
  font-family: var(--sans, "Inter", system-ui, sans-serif);
  font-size: clamp(14px, 1.1vw, 15px);
  line-height: 1.65;
  color: #cfc5dd;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .35s ease, transform .45s var(--ease, ease);
}
.faq-item.is-open .faq-item__a p { opacity: 1; transform: none; transition-delay: .12s; }

/* ---------- keyframes ---------- */
@keyframes qWobble { 0%, 86%, 100% { transform: rotate(0); } 89% { transform: rotate(-16deg) scale(1.1); } 93% { transform: rotate(12deg) scale(1.1); } 96% { transform: rotate(-6deg); } }
@keyframes qGlow   { 0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: .85; } 50% { transform: translate(-50%, -50%) scale(1.14); opacity: 1; } }
@keyframes qFloat  { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .faq__inner { grid-template-columns: 1fr; gap: 28px; }
  .faq__intro { text-align: center; }
  .faq__lead { margin-left: auto; margin-right: auto; }
  .faq__rule { margin-left: auto; margin-right: auto; }
  .faq__art { width: min(100%, 460px); margin: 8px auto 0; }
}
@media (max-width: 560px) {
  .faq-item__q { padding: 14px 16px; }
  .faq-item__a p { padding: 0 16px 16px; }
  .faq__badge { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .faq *, .faq *::before, .faq *::after { animation: none !important; }
  .faq__badge, .faq__lead, .faq-item, .faq__art-img, .faq__art-glow, .faq__title .ch { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }
  .faq__rule::before { transform: rotate(45deg) !important; }
  .faq__rule i { transform: none !important; }
}

/* =========================================================
   Accordion motion upgrades
   ========================================================= */
/* after the entrance, drop stagger delays so hover / press respond instantly */
.faq.is-in.is-settled .faq-item:nth-child(n) { transition-delay: 0s; }
.faq.is-in .faq-item:hover { transform: translateY(-2px); }
.faq.is-in .faq-item:active { transform: translateY(0) scale(.995); }

/* light sweep across the item when it opens */
.faq-item::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(220, 180, 255, .14) 45%, rgba(255, 220, 170, .18) 50%, rgba(220, 180, 255, .14) 55%, transparent 70%) no-repeat;
  background-size: 250% 100%;
  background-position: 150% 0;
  opacity: 0;
}
.faq-item.is-opening::after { animation: qSweep 1.1s var(--ease, ease) forwards; }
.faq-item.is-opening::before { animation: qBar 1.2s ease-out; }

/* icon: spring rotate + sparks */
.faq-item__icon { transition: background-color .3s, box-shadow .3s, transform .6s cubic-bezier(.34, 1.56, .64, 1); }
.faq-item.is-opening .faq-item__icon { box-shadow: 0 0 18px rgba(247, 196, 124, .55); }
.faq-item__spark {
  position: absolute;
  left: 50%; top: 50%;
  width: 4px; height: 4px;
  margin: -2px 0 0 -2px;
  border-radius: 50%;
  background: #f7c47c;
  box-shadow: 0 0 6px #f7c47c;
  pointer-events: none;
  animation: qSpark .6s cubic-bezier(.2, .8, .3, 1) forwards;
}

/* question text lifts a little when open */
.faq-item.is-open .faq-item__q > span { color: #fff; }

/* answer writes itself word by word */
.faq-item__a p .w { display: inline-block; }
.faq-item.is-opening .faq-item__a p .w {
  animation: qWord .55s var(--ease, ease) both;
  animation-delay: calc(.12s + var(--w) * 28ms);
}

/* ---------- keyframes ---------- */
@keyframes qSweep { 0% { opacity: 1; background-position: 150% 0; } 100% { opacity: 1; background-position: -50% 0; } }
@keyframes qBar   { 0% { box-shadow: 0 0 10px rgba(200, 130, 255, .8); } 30% { box-shadow: 0 0 22px rgba(247, 196, 124, 1); } 100% { box-shadow: 0 0 10px rgba(200, 130, 255, .8); } }
@keyframes qSpark { from { transform: translate(0, 0) scale(1); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; } }
@keyframes qWord  { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .faq-item::after, .faq-item__spark { display: none; }
  .faq.is-in .faq-item:hover, .faq.is-in .faq-item:active { transform: none; }
}
