/* ==========================================================================
   Pre-footer Section — AI Gateway page.
   Contains three parts: "Keep Reading" links, a disclaimer, and a dark 
   focal-point CTA banner.
   Transitions the page from the white FAQ section to a light warm tone (#f7f6f2),
   then punches out with a sharp dark banner (#050505) before the global footer.
   Motion: scroll-reveal rise + stagger.
   ========================================================================== */

.pg-prefooter {
  display: flex;
  flex-direction: column;
}

/* --- Top: Keep Reading & Disclaimer --- */
.pg-prefooter__top {
  background-color: #f4f7fd;
  padding: 80px 0 64px;
}

.pg-prefooter__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 80px;
}

.pg-prefooter__keep-reading {
  display: flex;
  align-items: flex-start;
  gap: 40px;
}

.pg-prefooter__kicker {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-weight: 600;
  font-size: 11px;
  line-height: 18px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #8a8a8a;
  margin-top: 12px;
  flex-shrink: 0;
}

.pg-prefooter__links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.pg-prefooter__chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Cabin", sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: #2f5bf0;
  background-color: #fff;
  border: 1px solid #cdd9f7;
  border-radius: 6px;
  padding: 10px 18px;
  text-decoration: none;
  transition: transform 0.35s ease, box-shadow 0.35s ease, color 0.35s ease, border-color 0.35s ease, background-color 0.35s ease;
}

.pg-prefooter__chip span {
  transition: transform 0.3s ease;
}

.pg-prefooter__chip:hover {
  color: #fff;
  border-color: transparent;
  background-image: linear-gradient(90deg, #0036fa, #4e87fc);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 54, 250, 0.22);
}

.pg-prefooter__chip:hover span {
  transform: translateX(4px);
}

.pg-prefooter__disclaimer {
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid #e6e4db;
}

.pg-prefooter__disclaimer p {
  font-family: "Inter", sans-serif;
  font-size: 12px;
  line-height: 1.6;
  color: #8a8a8a;
  max-width: 900px;
}

/* --- Bottom: CTA Banner --- */
.pg-prefooter__cta {
  background-color: #050505;
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}

/* Subtle accent glow in the CTA */
.pg-prefooter__cta::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 60%;
  height: 150%;
  background: radial-gradient(circle, rgba(0, 54, 250, 0.15) 0%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
}

.pg-prefooter__cta-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 80px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  position: relative;
  z-index: 1;
}

.pg-prefooter__cta-title {
  font-family: "Cabin", sans-serif;
  font-weight: 700;
  font-size: 44px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: #fff;
  max-width: 700px;
}

.pg-prefooter__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 54px;
  padding: 0 32px;
  border-radius: 8px;
  font-family: "Cabin", sans-serif;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  background-image: linear-gradient(90deg, #0036fa 0%, #4e87fc 100%);
  color: #fff;
  box-shadow: 0 10px 22px rgba(0, 54, 250, 0.26);
  transition: transform 0.35s ease, box-shadow 0.35s ease, filter 0.35s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.pg-prefooter__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(0, 54, 250, 0.38);
  filter: brightness(1.08);
}

/* --- scroll-reveal (site motion language) --- */
.pg-prefooter__keep-reading,
.pg-prefooter__disclaimer,
.pg-prefooter__cta-title,
.pg-prefooter__btn {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.pg-prefooter__keep-reading.is-in,
.pg-prefooter__disclaimer.is-in,
.pg-prefooter__cta-title.is-in,
.pg-prefooter__btn.is-in {
  opacity: 1;
  transform: none;
}

.pg-prefooter__btn.is-in {
  transition-delay: 0.15s;
}

@media (prefers-reduced-motion: reduce) {
  .pg-prefooter__keep-reading,
  .pg-prefooter__disclaimer,
  .pg-prefooter__cta-title,
  .pg-prefooter__btn {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* --- responsive --- */
@media (max-width: 1040px) {
  .pg-prefooter__inner,
  .pg-prefooter__cta-inner {
    padding: 0 24px;
  }
  .pg-prefooter__keep-reading {
    flex-direction: column;
    gap: 20px;
  }
  .pg-prefooter__cta-title {
    font-size: 36px;
  }
}

@media (max-width: 800px) {
  .pg-prefooter__cta {
    padding: 80px 0;
  }
  .pg-prefooter__cta-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
  }
  .pg-prefooter__cta-title {
    font-size: 32px;
  }
}

@media (max-width: 600px) {
  .pg-prefooter__top {
    padding: 64px 0 48px;
  }
  .pg-prefooter__cta-title {
    font-size: 28px;
  }
}
