/* ==========================================================================
   FAQ (accordion) + final call to action
   ========================================================================== */

/* ---------- FAQ ---------- */
.faq__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: start;
  gap: clamp(40px, 6vw, 88px);
}
.faq__intro {
  position: sticky;
  top: calc(var(--nav-h) + 32px);
}
.faq__intro .lead { margin-top: 18px; max-width: 420px; }
.faq__art {
  width: 230px;
  margin-top: 30px;
  overflow: visible;
}
.faq__glass {
  transform-box: fill-box;
  transform-origin: 30% 30%;
  animation: faq-search 5s ease-in-out infinite;
}
.faq__spark {
  transform-box: fill-box;
  transform-origin: center;
  animation: faq-twinkle 3s ease-in-out infinite;
}

.faq__list {
  display: grid;
  gap: 14px;
}
.faq__item {
  border: 2px solid var(--navy);
  border-radius: 20px;
  background: #fff;
  transition: background-color 0.3s, box-shadow 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.faq__item:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-pop-sm); }
.faq__item[open] {
  background: var(--blue-50);
  box-shadow: var(--shadow-pop-sm);
}
.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-radius: 18px;
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.01em;
  list-style: none;
  cursor: pointer;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover span { color: var(--blue); }
.faq__item summary span { transition: color 0.2s; }
.faq__icon {
  position: relative;
  width: 34px;
  height: 34px;
  flex: none;
  border: 2px solid var(--navy);
  border-radius: 50%;
  background: var(--yellow);
  transition: transform 0.4s var(--ease-spring), background-color 0.3s;
}
.faq__icon::before,
.faq__icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 2.5px;
  margin: -1.25px 0 0 -6px;
  border-radius: 2px;
  background: var(--navy);
  transition: transform 0.4s var(--ease-spring), background-color 0.3s;
}
.faq__icon::after { transform: rotate(90deg); }
.faq__item[open]:not(.is-closing) .faq__icon {
  background: var(--navy);
  transform: rotate(180deg);
}
.faq__item[open]:not(.is-closing) .faq__icon::before,
.faq__item[open]:not(.is-closing) .faq__icon::after { background: #fff; }
.faq__item[open]:not(.is-closing) .faq__icon::after { transform: rotate(0); }

.faq__answer { overflow: hidden; }
.faq__answer-inner { padding: 0 22px 22px; }
.faq__answer p {
  max-width: 640px;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--muted);
}
.faq__answer a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- CTA ---------- */
.cta {
  position: relative;
  padding-bottom: clamp(80px, 10vw, 130px);
}
.cta__panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  align-items: center;
  gap: 32px;
  overflow: hidden;
  padding: clamp(40px, 6vw, 76px);
  border: 2px solid var(--navy);
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at 85% 40%, #2f66ff 0%, var(--blue) 45%, var(--blue-600) 100%);
  box-shadow: 10px 10px 0 var(--navy);
  color: #fff;
  isolation: isolate;
}
.cta__deco {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.cta__ring {
  position: absolute;
  right: 14%;
  top: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  animation: cta-spin 40s linear infinite;
}
.cta__ring--1 { width: 640px; height: 640px; margin: -320px -320px 0 0; }
.cta__ring--2 { width: 440px; height: 440px; margin: -220px -220px 0 0; animation-direction: reverse; animation-duration: 30s; }
.cta__ring--3 { width: 260px; height: 260px; margin: -130px -130px 0 0; border-style: solid; border-color: rgba(255, 255, 255, 0.14); }
.cta__spark {
  position: absolute;
  width: 22px;
  height: 22px;
  background: var(--yellow);
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  animation: faq-twinkle 3s ease-in-out infinite;
}
.cta__spark--a { left: 46%; top: 14%; }
.cta__spark--b { left: 6%; bottom: 12%; width: 14px; height: 14px; background: #fff; animation-delay: -1s; }
.cta__spark--c { right: 6%; bottom: 16%; width: 16px; height: 16px; background: var(--green); animation-delay: -2s; }

.cta__title { max-width: 600px; color: #fff; }
.cta__hl {
  color: var(--yellow);
  white-space: nowrap;
}
.cta__text {
  max-width: 500px;
  margin-top: 16px;
  font-size: clamp(1.02rem, 1.4vw, 1.18rem);
  line-height: 1.6;
  color: #fff;
}
.cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.cta__art {
  position: relative;
  width: 100%;
  max-width: 300px;
  aspect-ratio: 1;
  justify-self: center;
}
.cta__shield {
  position: absolute;
  left: 4%;
  bottom: 0;
  width: 74%;
  animation: sm-float 4.5s ease-in-out infinite;
}
.cta__bubble {
  position: absolute;
  right: -4%;
  top: -2%;
  width: 54%;
  transform-origin: 20% 90%;
}
.cta__tick {
  stroke-dasharray: 80;
  stroke-dashoffset: 0;
}
.js .cta__bubble { opacity: 0; }
.js .cta__panel.is-visible .cta__bubble { animation: sm-pop 0.6s var(--ease-spring) 0.5s both; }
.js .cta__tick { stroke-dashoffset: 80; }
.js .cta__panel.is-visible .cta__tick { animation: cta-tick 0.5s var(--ease-out) 1s forwards; }

/* ---------- Keyframes ---------- */
@keyframes faq-search {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  25% { transform: translate(-14px, -18px) rotate(-6deg); }
  50% { transform: translate(-30px, 4px) rotate(4deg); }
  75% { transform: translate(-8px, 14px) rotate(-2deg); }
}
@keyframes faq-twinkle {
  0%, 100% { transform: scale(1) rotate(0); }
  50% { transform: scale(0.6) rotate(45deg); }
}
@keyframes cta-spin { to { transform: rotate(360deg); } }
@keyframes cta-tick { to { stroke-dashoffset: 0; } }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .faq__grid { grid-template-columns: minmax(0, 1fr); }
  .faq__intro { position: static; text-align: center; }
  .faq__intro .lead { margin-inline: auto; }
  .faq__art { width: 190px; margin-inline: auto; }

  .cta__panel {
    grid-template-columns: minmax(0, 1fr);
    text-align: center;
  }
  .cta__title,
  .cta__text { margin-inline: auto; }
  .cta__actions { justify-content: center; }
  .cta__art { order: -1; max-width: 220px; }
  .cta__ring { right: 50%; top: 22%; }
}
@media (max-width: 640px) {
  .faq__item summary { padding: 18px 16px; font-size: 1rem; }
  .faq__answer-inner { padding: 0 16px 18px; }
  .cta__panel { padding: 36px 20px; box-shadow: 6px 6px 0 var(--navy); }
  .cta__actions .btn { width: 100%; }
  .cta__hl { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  .js .cta__bubble { opacity: 1; }
  .js .cta__tick { stroke-dashoffset: 0; }
}
