/* =========================================================
   CTA — end-of-page call to action with stat numeral
   Mobile-first: base = stacked+centered, desktop = 2-col.
   ========================================================= */

/* ---------------------------------------------------------
   1. BASE (mobile) — stacked, centered
   --------------------------------------------------------- */
.cta {
  position: relative;
  background: var(--green-black);
  color: var(--white);
  padding: var(--space-8) 0;
  overflow: hidden;
}
.cta::before {
  content: '';
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(201,169,106,.08) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 40%, rgba(15,61,50,.35) 0%, transparent 60%);
  animation: ctaGlowPulse 12s ease-in-out infinite;
}

.cta__nodes {
  position: absolute; inset: 0; z-index: 1; opacity: .16;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(201,169,106,.55) 0 2px, transparent 3px),
    radial-gradient(circle at 70% 60%, rgba(201,169,106,.45) 0 2px, transparent 3px),
    radial-gradient(circle at 40% 80%, rgba(201,169,106,.55) 0 2px, transparent 3px),
    radial-gradient(circle at 85% 20%, rgba(201,169,106,.45) 0 2px, transparent 3px);
  will-change: background-position;
  animation: ctaNodesDrift 45s linear infinite;
}

.cta__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: var(--space-7);
}

.cta__content {
  text-align: center;
  max-width: 100%;
}
.cta__content .eyebrow {
  justify-content: center;
  text-align: center;
}
.cta h2,
.cta__content h2 {
  color: var(--white);
  margin: 0 0 var(--space-5);
  text-align: center;
}
.cta p,
.cta__content p {
  color: rgba(255,255,255,.85);
  font-size: var(--text-base);
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
.cta__content .btn {
  display: inline-flex;
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
}

.cta__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-3);
  padding-top: var(--space-7);
  border-top: 1px solid rgba(217,190,131,.35);
  border-left: 0;
  margin: 0;
}
.cta__stat-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(4.5rem, 14vw, 6.5rem);
  line-height: 0.9;
  letter-spacing: -0.06em;
  color: var(--gold-bright);
  display: block;
  margin-bottom: var(--space-2);
}
.cta__stat-label {
  font-family: var(--font-body);
  font-size: .78rem;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(255,255,255,.7);
  line-height: 1.5;
  display: block;
  text-align: center;
}

/* Photo variant (currently unused but kept for parity) */
.cta--photo { padding: 80px 0; }
.cta__media { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.cta__media img { width: 100%; height: 100%; object-fit: cover; }
.cta__overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(110deg, rgba(6,25,19,.94) 0%, rgba(6,25,19,.72) 55%, rgba(6,25,19,.42) 100%);
}
.cta--photo .cta__inner { position: relative; z-index: 2; }
.cta--photo .cta__stat { padding-top: var(--space-7); border-top-color: rgba(217,190,131,.4); border-left: 0; }
.cta--photo.cta--with-stat .cta__stat-num { color: var(--gold-bright); text-shadow: 0 4px 24px rgba(0,0,0,.35); }
.cta--photo.cta--with-stat .cta__stat-label { color: rgba(255,255,255,.8); }

/* ---------------------------------------------------------
   2. DESKTOP (>= 1024px) — 2-column grid
   --------------------------------------------------------- */
@media (min-width: 1024px) {
  .cta { padding: var(--space-9) 0; }
  .cta--photo { padding: 160px 0; }

  .cta__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: var(--space-9);
    align-items: center;
  }

  .cta__content {
    text-align: left;
    max-width: 640px;
  }
  .cta__content .eyebrow { justify-content: flex-start; text-align: left; }
  .cta__content h2 { text-align: left; margin-left: 0; margin-right: 0; }
  .cta__content p { text-align: left; margin-left: 0; margin-right: 0; font-size: var(--text-lg); }
  .cta__content .btn { margin-left: 0; margin-right: 0; }

  .cta__stat {
    padding-top: 0;
    padding-left: var(--space-7);
    border-top: 0;
    border-left: 1px solid rgba(217,190,131,.35);
    align-self: stretch;
    justify-content: center;
  }
  .cta__stat-num { font-size: clamp(6rem, 11vw, 10rem); margin-bottom: var(--space-3); }
  .cta--photo.cta--with-stat .cta__stat {
    padding-left: var(--space-7);
    border-top: 0;
    border-left: 1px solid rgba(217,190,131,.4);
  }
}

/* ---------------------------------------------------------
   3. ANIMATIONS
   --------------------------------------------------------- */
@keyframes ctaNodesDrift {
  0%   { background-position: 0% 0%, 0% 0%, 0% 0%, 0% 0%; }
  50%  { background-position: 30% 20%, -20% 10%, 15% -25%, -15% 30%; }
  100% { background-position: 0% 0%, 0% 0%, 0% 0%, 0% 0%; }
}
@keyframes ctaGlowPulse {
  0%, 100% { opacity: 0.7; }
  50%      { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .cta__nodes,
  .cta::before { animation: none; }
}
