/* ================================================================
   ACA MOTION LAYER — acapracticesuccess.com
   Additive only. Remove <link> tag in HTML to revert everything.
   Does not override or modify any rules in styles.css.
   ================================================================ */


/* ── HERO: AMBIENT GLOW DRIFT ─────────────────────────────────
   Injected divs (.hero-orb-a, .hero-orb-b) placed by motion.js
   inside the hero so overflow:hidden cannot clip them.
   The existing hero::after (styles.css) is left untouched.
   ──────────────────────────────────────────────────────────── */
.hero-orb-a,
.hero-orb-b {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.hero-orb-a {
  width: 560px;
  height: 560px;
  bottom: 40px;
  left: 40px;
  background: radial-gradient(circle, rgba(200,150,62,.52) 0%, rgba(200,150,62,.18) 40%, transparent 68%);
  animation: acaDriftA 11s ease-in-out infinite;
}

.hero-orb-b {
  width: 480px;
  height: 480px;
  top: 60px;
  right: 60px;
  background: radial-gradient(circle, rgba(200,150,62,.46) 0%, rgba(200,150,62,.14) 42%, transparent 65%);
  animation: acaDriftB 7s ease-in-out infinite;
}

@keyframes acaDriftA {
  0%,  100% { transform: translate(0px,   0px)  scale(1);    opacity: .6; }
  35%        { transform: translate(60px, -40px) scale(1.18); opacity: 1;  }
  70%        { transform: translate(-25px, 45px) scale(.9);   opacity: .5; }
}

@keyframes acaDriftB {
  0%,  100% { opacity: .55; transform: scale(1);    }
  50%        { opacity: 1;   transform: scale(1.14); }
}

/* ── HERO CHART LINE ──────────────────────────────────────────
   SVG injected by motion.js. A stock-chart-style gold line that
   draws itself from lower-left to upper-right, trending up with
   realistic dips and rises, then fades and repeats.
   ──────────────────────────────────────────────────────────── */
.hero-chart-line {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}


/* ── HERO LOAD-IN STAGGER ─────────────────────────────────────
   JS adds .hero-load-item + a staggered animation-delay to each
   hero element. They cascade in on page load.
   ──────────────────────────────────────────────────────────── */
.hero-load-item {
  animation: heroReveal .72s cubic-bezier(.22,.68,0,1.1) both;
}

@keyframes heroReveal {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0);    }
}


/* ── CURSOR SPOTLIGHT ─────────────────────────────────────────
   A soft gold glow that follows the mouse inside the hero.
   Injected by motion.js. Opacity driven by JS mousemove/leave.
   ──────────────────────────────────────────────────────────── */
.hero-spotlight {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200,150,62,.13) 0%, transparent 62%);
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity .5s ease;
  will-change: transform;
}


/* ── SECTION LABEL UNDERLINE DRAW ─────────────────────────────
   A gold line extends left→right under .section-label elements
   when they enter the viewport (.motion-visible added by JS).
   ──────────────────────────────────────────────────────────── */
.section-label {
  position: relative;
  display: inline-block;
}

.section-label::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  height: 1.5px;
  width: 0;
  background: var(--c-gold);
  transition: width .65s cubic-bezier(.77, 0, .18, 1);
  border-radius: 2px;
}

.section-label.label-drawn::after {
  width: 100%;
}


/* ── CYCLING EYEBROW ──────────────────────────────────────────
   JS replaces the static eyebrow with a cycling animated phrase.
   Each market name slides up in, holds, slides up out.
   ──────────────────────────────────────────────────────────── */
.hero-eyebrow .eyebrow-prefix {
  color: rgba(255,255,255,.45);
}

.hero-eyebrow .eyebrow-cycle-wrap {
  display: inline;
  margin-left: 4px;
}

.eyebrow-cycle-word {
  display: inline;
  color: var(--c-gold);
  animation: eyebrowIn .4s ease forwards;
}

.eyebrow-cycle-word.exit {
  animation: eyebrowOut .35s ease forwards;
}

@keyframes eyebrowIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes eyebrowOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}


/* ── MARQUEE STRIP ────────────────────────────────────────────
   Injected by motion.js between the hero and formula sections.
   Fully removable — delete motion.js link to revert.
   ──────────────────────────────────────────────────────────── */
.marquee-section {
  background: rgba(200,150,62,.055);
  border-top: 1px solid rgba(200,150,62,.18);
  border-bottom: 1px solid rgba(200,150,62,.18);
  padding: 13px 0;
  overflow: hidden;
  white-space: nowrap;
}

.marquee-track {
  display: inline-flex;
  align-items: center;
  animation: marqueeScroll 38s linear infinite;
  will-change: transform;
}

.marquee-section:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-item {
  display: inline-flex;
  align-items: center;
  padding: 0 28px;
  font-family: var(--font-heading);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(200,150,62,.78);
  white-space: nowrap;
  flex-shrink: 0;
}

a.marquee-item {
  text-decoration: none;
  cursor: pointer;
  transition: color .2s ease, opacity .2s ease;
}

a.marquee-item:hover {
  color: rgba(200,150,62,1);
  opacity: 1;
}

.marquee-sep {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(200,150,62,.35);
  flex-shrink: 0;
}

@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}


/* ── STAT COUNTERS ────────────────────────────────────────────
   The .stat-value spans are targeted by motion.js.
   This class marks a counter as having fired once.
   ──────────────────────────────────────────────────────────── */
.stat-value.counting {
  display: inline-block;
}


/* ── PRODUCT CARD HOVER LIFT + GOLD EDGE ──────────────────────
   Lifts photo cards and adds a faint gold border glow on hover.
   ──────────────────────────────────────────────────────────── */
.product-card--photo {
  transition: transform .32s cubic-bezier(.22,.68,0,1.2),
              box-shadow .32s ease;
  will-change: transform;
}

.product-card--photo:hover {
  transform: translateY(-7px);
  box-shadow:
    0 24px 48px rgba(27,58,107,.14),
    0 0 0 1.5px rgba(200,150,62,.35);
}

/* Stagger the product grid reveals for a cascade effect */
.product-grid .product-card--photo:nth-child(1) { transition-delay: .05s; }
.product-grid .product-card--photo:nth-child(2) { transition-delay: .10s; }
.product-grid .product-card--photo:nth-child(3) { transition-delay: .15s; }
.product-grid .product-card--photo:nth-child(4) { transition-delay: .20s; }
.product-grid .product-card--photo:nth-child(5) { transition-delay: .05s; }
.product-grid .product-card--photo:nth-child(6) { transition-delay: .10s; }
.product-grid .product-card--photo:nth-child(7) { transition-delay: .15s; }
.product-grid .product-card--photo:nth-child(8) { transition-delay: .20s; }


/* ── SCROLL FADE-UP ───────────────────────────────────────────
   Applied by motion.js via IntersectionObserver.
   .motion-ready = initial hidden state
   .motion-visible = animated in state
   ──────────────────────────────────────────────────────────── */
.motion-fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .6s ease, transform .6s cubic-bezier(.22,.68,0,1.1);
}

.motion-fade-up.motion-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Cascade delays for sibling cards */
.motion-fade-up:nth-child(2) { transition-delay: .12s; }
.motion-fade-up:nth-child(3) { transition-delay: .24s; }
.motion-fade-up:nth-child(4) { transition-delay: .36s; }


/* ── TESTIMONIALS SECTION ─────────────────────────────────────
   Completely new section — styles isolated here.
   ──────────────────────────────────────────────────────────── */
.testimonials-section {
  background: var(--c-navy);
  padding-block: var(--sp-20);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--sp-6);
  margin-top: var(--sp-12);
}

.testimonial-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-xl);
  padding: var(--sp-8) var(--sp-8) var(--sp-7);
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  position: relative;
  transition: border-color .3s ease, background .3s ease;
}

.testimonial-card:hover {
  background: rgba(255,255,255,.07);
  border-color: rgba(200,150,62,.3);
}

.testimonial-quote-mark {
  font-family: Georgia, serif;
  font-size: 5rem;
  line-height: .7;
  color: var(--c-gold);
  opacity: .45;
  user-select: none;
  margin-bottom: var(--sp-1);
}

.testimonial-text {
  font-size: var(--text-base);
  color: rgba(255,255,255,.78);
  line-height: 1.75;
  flex: 1;
}

.testimonial-author {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-top: var(--sp-4);
  border-top: 1px solid rgba(255,255,255,.08);
}

.testimonial-name {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--c-white);
}

.testimonial-credential {
  font-size: var(--text-xs);
  color: rgba(255,255,255,.42);
  letter-spacing: .02em;
}

.testimonial-tag {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-gold);
  background: rgba(200,150,62,.1);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  align-self: flex-start;
}


/* ── CTA BANNER: GOLD PULSE ───────────────────────────────────
   Gentle glow pulse on the CTA section background.
   ──────────────────────────────────────────────────────────── */
.cta-banner {
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(.8);
  width: 600px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(200,150,62,.12) 0%, transparent 70%);
  pointer-events: none;
  animation: ctaPulse 5s ease-in-out infinite;
}

@keyframes ctaPulse {
  0%,  100% { opacity: .6; transform: translate(-50%, -50%) scale(.8);  }
  50%        { opacity: 1;  transform: translate(-50%, -50%) scale(1.1); }
}


/* ── FORMULA CARDS: HOVER GLOW ────────────────────────────────
   Adds a subtle lift to the formula cards on hover.
   ──────────────────────────────────────────────────────────── */
.formula-card {
  transition: transform .3s ease, box-shadow .3s ease;
}

.formula-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(27,58,107,.1);
}


/* ── SECTION DIVIDERS ─────────────────────────────────────────
   Soft gradient fade between light and dark sections.
   ──────────────────────────────────────────────────────────── */
.section--dark + .section,
.section--dark + .section--alt {
  position: relative;
}

.section--dark + .section::before,
.section--dark + .section--alt::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200,150,62,.2), transparent);
  pointer-events: none;
}


/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 640px) {
  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .motion-fade-up:nth-child(2),
  .motion-fade-up:nth-child(3),
  .motion-fade-up:nth-child(4) {
    transition-delay: 0s;
  }
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  .hero-orb-a,
  .hero-orb-b,
  .hero-chart-line,
  .hero-load-item,
  .cta-banner::before,
  .marquee-track {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .eyebrow-cycle-word,
  .eyebrow-cycle-word.exit {
    animation: none;
  }

  .section-label::after {
    transition: none;
  }

  .motion-fade-up {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .product-card--photo {
    transition: none;
  }
}
