/**
 * Proxy Grove — FAQ, Final CTA, Footer
 * Grove brand tokens only · does not alter prior sections
 */

/* —— FAQ —— */
.pg-faq {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 4.5rem 0 4rem;
  background:
    radial-gradient(ellipse 70% 45% at 50% 0%, rgb(19 0 154 / 0.05), transparent 55%),
    var(--color-surface-body);
}

.pg-faq__grid-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgb(19 0 154 / 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgb(19 0 154 / 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%);
}

.pg-faq__inner {
  position: relative;
  z-index: 1;
  max-width: 48rem;
  margin: 0 auto;
}

.pg-faq__header {
  text-align: center;
  margin-bottom: 2.25rem;
}

.pg-faq__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-heading);
  background: var(--color-surface-raised);
  border: 1px solid rgb(19 0 154 / 0.12);
  box-shadow: 0 4px 20px rgb(19 0 154 / 0.05);
  margin-bottom: 1rem;
}

.pg-faq__eyebrow-dot {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: var(--color-button-primary-bg);
  animation: pg-final-pulse 2.2s ease-out infinite;
}

.pg-faq__title {
  margin: 0;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: clamp(1.85rem, 3.8vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--color-text-heading);
}

.pg-faq__subtitle {
  margin: 0.85rem 0 0;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--color-text-body);
}

.pg-faq__list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.pg-faq__item {
  position: relative;
  border-radius: 1rem;
  background: color-mix(in srgb, var(--color-surface-raised) 94%, transparent);
  box-shadow: var(--shadow-glass);
  overflow: hidden;
  transition: box-shadow 0.25s ease;
}

.pg-faq__item::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    145deg,
    rgb(19 0 154 / 0.16),
    rgb(255 255 255 / 0.5) 50%,
    rgb(19 127 21 / 0.14)
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.pg-faq__item.is-open {
  box-shadow: 0 16px 40px rgb(19 0 154 / 0.1);
}

.pg-faq__question {
  margin: 0;
}

.pg-faq__trigger {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 1.1rem 1.25rem;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  text-align: left;
  color: var(--color-text-heading);
  cursor: pointer;
}

.pg-faq__trigger:focus-visible {
  outline: 2px solid var(--color-text-heading);
  outline-offset: -4px;
  border-radius: 0.75rem;
}

.pg-faq__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 9999px;
  flex-shrink: 0;
  background: rgb(19 0 154 / 0.08);
  color: var(--color-text-heading);
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.pg-faq__icon svg {
  width: 0.95rem;
  height: 0.95rem;
  transition: transform 0.25s ease;
}

.pg-faq__item.is-open .pg-faq__icon {
  background: var(--color-button-primary-bg);
  color: #fff;
}

.pg-faq__item.is-open .pg-faq__icon svg {
  transform: rotate(45deg);
}

.pg-faq__panel {
  height: 0;
  overflow: hidden;
  transition: height 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.pg-faq__panel-inner {
  padding: 0 1.25rem 1.2rem;
}

.pg-faq__answer {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--color-text-body);
}

.pg-faq__empty {
  margin: 0;
  padding: 1.5rem;
  text-align: center;
  color: var(--color-text-body);
  border-radius: 1rem;
  background: var(--color-surface-raised);
  border: 1px dashed rgb(19 0 154 / 0.18);
}

/* —— Final CTA —— */
.pg-final {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 2rem 0 5rem;
  background: var(--color-surface-body);
}

.pg-final__band {
  position: relative;
  border-radius: 1.75rem;
  padding: 3rem 1.75rem;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 80% at 15% 20%, rgb(19 0 154 / 0.12), transparent 55%),
    radial-gradient(ellipse 50% 60% at 90% 80%, rgb(19 127 21 / 0.12), transparent 50%),
    linear-gradient(135deg, #f7f8fc 0%, #eef0f8 50%, #f5faf5 100%);
  box-shadow: var(--shadow-glass);
}

.pg-final__band::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(
    135deg,
    rgb(19 0 154 / 0.35),
    rgb(255 255 255 / 0.6) 45%,
    rgb(19 127 21 / 0.35)
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
}

.pg-final__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

.pg-final__glow--1 {
  width: 16rem;
  height: 16rem;
  top: -4rem;
  right: 10%;
  background: rgb(19 0 154 / 0.2);
  animation: pg-final-drift 12s ease-in-out infinite;
}

.pg-final__glow--2 {
  width: 14rem;
  height: 14rem;
  bottom: -3rem;
  left: 8%;
  background: rgb(19 127 21 / 0.18);
  animation: pg-final-drift 14s ease-in-out infinite reverse;
}

.pg-final__grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 900px) {
  .pg-final__band {
    padding: 3.5rem 3rem;
  }

  .pg-final__grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 2.5rem;
  }
}

.pg-final__title {
  margin: 0;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: clamp(1.85rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: var(--color-text-heading);
}

.pg-final__desc {
  margin: 1rem 0 0;
  max-width: 34rem;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--color-text-body);
}

.pg-final__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.pg-final__btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.9rem 1.6rem;
  border-radius: var(--radius-btn);
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.pg-final__btn--primary {
  color: var(--color-button-primary-text);
  background: var(--color-button-primary-bg);
  box-shadow: 0 0 28px rgb(19 127 21 / 0.35);
}

.pg-final__btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 36px rgb(19 127 21 / 0.45);
}

.pg-final__btn--secondary {
  color: var(--color-text-heading);
  background: rgb(255 255 255 / 0.92);
  border: 1px solid rgb(19 0 154 / 0.15);
}

.pg-final__btn--secondary:hover {
  transform: translateY(-2px);
  border-color: rgb(19 0 154 / 0.28);
  box-shadow: 0 8px 28px rgb(19 0 154 / 0.1);
}

.pg-final__btn:focus-visible {
  outline: 2px solid var(--color-text-heading);
  outline-offset: 3px;
}

.pg-final__btn svg {
  width: 1rem;
  height: 1rem;
}

.pg-final__ripple {
  position: absolute;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.35);
  transform: scale(0);
  animation: pg-final-ripple 0.55s ease-out forwards;
  pointer-events: none;
}

.pg-final__btn--secondary .pg-final__ripple {
  background: rgb(19 0 154 / 0.15);
}

.pg-final__visual {
  position: relative;
  min-height: 12rem;
  content-visibility: auto;
  contain-intrinsic-size: 220px;
}

.pg-final__visual svg {
  width: 100%;
  height: auto;
  display: block;
  max-height: 14rem;
}

.pg-final__float {
  animation: pg-final-float 5.5s ease-in-out infinite;
}

@media (max-width: 479px) {
  .pg-final__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .pg-final__btn {
    width: 100%;
  }
}

/* —— Footer —— */
.pg-footer {
  position: relative;
  color: var(--color-text-on-chrome);
  background:
    radial-gradient(ellipse 80% 60% at 12% 0%, rgb(80 120 255 / 0.22), transparent 55%),
    radial-gradient(ellipse 70% 50% at 88% 100%, rgb(0 40 180 / 0.35), transparent 50%),
    linear-gradient(165deg, #0010c4 0%, #0000ae 38%, #00008a 72%, #000070 100%);
  padding: 3.75rem 0 0;
  overflow: hidden;
}

.pg-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgb(255 255 255 / 0.28) 20%,
    rgb(255 255 255 / 0.4) 50%,
    rgb(255 255 255 / 0.28) 80%,
    transparent 100%
  );
  pointer-events: none;
}

.pg-footer a {
  color: var(--color-text-on-chrome-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.pg-footer a:hover {
  color: var(--color-text-on-chrome);
}

.pg-footer a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
  border-radius: 0.25rem;
}

.pg-footer__top {
  display: grid;
  gap: 2rem;
  padding-bottom: 2.75rem;
}

@media (min-width: 640px) {
  .pg-footer__top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .pg-footer__top {
    grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
  }
}

.pg-footer__logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  margin-bottom: 0.85rem;
  color: #fff;
}

.pg-footer__logo:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
  border-radius: 0.5rem;
}

.pg-footer__logo-img {
  display: block;
  height: 2.35rem;
  width: auto;
}

.pg-footer__logo-mark {
  width: 2.25rem;
  height: 2.25rem;
  display: block;
  border-radius: 0.55rem;
  flex-shrink: 0;
}

.pg-footer__brand-name {
  margin: 0;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1;
}

.pg-footer__brand-name span {
  color: rgb(255 255 255 / 0.7);
  font-weight: 600;
}

.pg-footer__desc {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--color-text-on-chrome-muted);
  max-width: 18rem;
}

.pg-footer__social {
  display: flex;
  gap: 0.55rem;
  margin-top: 1.15rem;
  list-style: none;
  padding: 0;
}

.pg-footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.65rem;
  background: rgb(255 255 255 / 0.08);
  border: 1px solid rgb(255 255 255 / 0.12);
  color: #fff;
  transition: transform 0.2s ease, background 0.2s ease;
}

.pg-footer__social a:hover {
  transform: translateY(-2px);
  background: rgb(255 255 255 / 0.14);
}

.pg-footer__social svg {
  width: 1rem;
  height: 1rem;
}

.pg-footer__col-title {
  margin: 0 0 0.85rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
}

.pg-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.pg-footer__links a {
  font-size: 0.875rem;
}

/* Contact strip — full-width band */
.pg-footer__mid {
  padding: 0 0 2rem;
  border-top: 1px solid rgb(255 255 255 / 0.1);
  padding-top: 1.75rem;
}

.pg-footer__contact {
  display: grid;
  gap: 1.25rem;
  width: 100%;
  max-width: none;
  padding: 1.35rem 1.35rem 1.45rem;
  border-radius: 1.25rem;
  background:
    linear-gradient(135deg, rgb(255 255 255 / 0.1) 0%, rgb(255 255 255 / 0.04) 100%);
  border: 1px solid rgb(255 255 255 / 0.14);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.12),
    0 18px 40px rgb(0 0 40 / 0.18);
  backdrop-filter: blur(14px);
}

@media (min-width: 900px) {
  .pg-footer__contact {
    grid-template-columns: minmax(7rem, auto) minmax(0, 1fr) auto;
    align-items: center;
    gap: 1.75rem 2rem;
    padding: 1.35rem 1.6rem;
  }
}

.pg-footer__contact-title {
  margin: 0;
  font-family: "Space Grotesk", Inter, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.pg-footer__contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--color-text-on-chrome-muted);
}

@media (min-width: 640px) {
  .pg-footer__contact-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem 1.5rem;
  }
}

@media (min-width: 900px) {
  .pg-footer__contact-list {
    gap: 0;
  }

  .pg-footer__contact-list li {
    padding: 0 1.35rem;
    border-left: 1px solid rgb(255 255 255 / 0.14);
  }

  .pg-footer__contact-list li:first-child {
    padding-left: 0;
    border-left: 0;
  }
}

.pg-footer__contact-list strong {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgb(255 255 255 / 0.5);
  margin-bottom: 0.3rem;
}

.pg-footer__contact-list a,
.pg-footer__contact-list span {
  color: #fff;
  font-weight: 500;
  word-break: break-word;
}

.pg-footer__contact-list a:hover {
  color: #c8d4ff;
}

.pg-footer__chat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 0;
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-button-primary-text) !important;
  background: var(--color-button-primary-bg);
  border: 0;
  box-shadow: 0 10px 28px rgb(19 127 21 / 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  white-space: nowrap;
  width: fit-content;
}

.pg-footer__chat:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgb(19 127 21 / 0.38);
  filter: brightness(1.05);
  background: var(--color-button-primary-bg);
}

.pg-footer__chat svg {
  width: 0.95rem;
  height: 0.95rem;
}

@media (max-width: 899px) {
  .pg-footer__chat {
    width: 100%;
  }
}

/* Bottom bar */
.pg-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 0 1.6rem;
  font-size: 0.75rem;
  color: var(--color-text-on-chrome-muted);
  border-top: 1px solid rgb(255 255 255 / 0.1);
}

.pg-footer__copy {
  margin: 0;
}

.pg-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Back to top */
.pg-back-top {
  position: fixed;
  z-index: 40;
  right: 1.25rem;
  bottom: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  border: 1px solid rgb(19 0 154 / 0.15);
  background: var(--color-surface-raised);
  color: var(--color-text-heading);
  box-shadow: 0 12px 32px rgb(19 0 154 / 0.15);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease, box-shadow 0.2s ease;
}

.pg-back-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.pg-back-top:hover {
  box-shadow: 0 16px 40px rgb(19 0 154 / 0.2);
}

.pg-back-top:focus-visible {
  outline: 2px solid var(--color-text-heading);
  outline-offset: 3px;
}

.pg-back-top svg {
  width: 1.15rem;
  height: 1.15rem;
}

@keyframes pg-final-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(10px, -12px) scale(1.06); }
}

@keyframes pg-final-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes pg-final-pulse {
  0% { box-shadow: 0 0 0 0 rgb(19 127 21 / 0.45); }
  70% { box-shadow: 0 0 0 6px rgb(19 127 21 / 0); }
  100% { box-shadow: 0 0 0 0 rgb(19 127 21 / 0); }
}

@keyframes pg-final-ripple {
  to {
    transform: scale(2.4);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pg-faq__eyebrow-dot,
  .pg-final__glow,
  .pg-final__float {
    animation: none !important;
  }

  .pg-faq__panel {
    transition: none;
  }

  .pg-final__btn:hover,
  .pg-footer__social a:hover,
  .pg-footer__chat:hover {
    transform: none;
  }
}
