/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(var(--motion-travel));
  transition: opacity var(--motion-duration) var(--motion-easing),
              transform var(--motion-duration) var(--motion-easing);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.stagger > * { opacity: 0; transform: translateY(var(--motion-travel)); }
.stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
  transition: opacity var(--motion-duration) var(--motion-easing),
              transform var(--motion-duration) var(--motion-easing);
}
.stagger.visible > *:nth-child(1) { transition-delay: calc(var(--motion-stagger) * 0); }
.stagger.visible > *:nth-child(2) { transition-delay: calc(var(--motion-stagger) * 1); }
.stagger.visible > *:nth-child(3) { transition-delay: calc(var(--motion-stagger) * 2); }
.stagger.visible > *:nth-child(4) { transition-delay: calc(var(--motion-stagger) * 3); }
.stagger.visible > *:nth-child(5) { transition-delay: calc(var(--motion-stagger) * 4); }
.stagger.visible > *:nth-child(6) { transition-delay: calc(var(--motion-stagger) * 5); }
.stagger.visible > *:nth-child(7) { transition-delay: calc(var(--motion-stagger) * 6); }
.stagger.visible > *:nth-child(8) { transition-delay: calc(var(--motion-stagger) * 7); }
.stagger.visible > *:nth-child(9) { transition-delay: calc(var(--motion-stagger) * 8); }
.stagger.visible > *:nth-child(n+10) { transition-delay: calc(var(--motion-stagger) * 9); }

/* ===== WORD-BY-WORD REVEAL ===== */
.word-reveal .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s var(--motion-easing),
              transform 0.3s var(--motion-easing);
}
.word-reveal.visible .word {
  opacity: 1;
  transform: translateY(0);
}

/* ===== PULSE DOT ===== */
.pulse-dot {
  width: 10px;
  height: 10px;
  background: var(--success);
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}
.pulse-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid var(--success);
  animation: pulse-ring 2s ease-out infinite;
}
@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* ===== HERO GLOW ===== */
.hero-glow {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dk) 100%);
  padding: 5rem 0 4rem;
  color: var(--white);
  text-align: center;
}
.hero-glow h1 {
  color: var(--white);
  font-size: clamp(2rem, 5vw, 3.25rem);
  margin-bottom: 1.25rem;
}
.hero-glow__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  padding: 0.5rem 1.25rem;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}
.hero-glow__sub {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.85);
  max-width: 640px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}
.hero-glow__ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}
.hero-glow::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  left: var(--glow-x, 50%);
  top: var(--glow-y, 50%);
  transform: translate(-50%, -50%);
  transition: left 0.15s ease, top 0.15s ease;
}

/* Hero with embedded form */
.hero-glow--form {
  text-align: center;
  padding: 4rem 0 3.5rem;
}
.hero-glow--form h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
}
.hero-glow--form .hero-glow__sub {
  margin: 0 auto 1.5rem;
  max-width: 480px;
  font-size: 1.05rem;
}
.hero-glow__split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.hero-glow__content {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-glow__content .stats {
  margin-top: 2rem;
  width: 100%;
  justify-content: center;
}
.hero-glow__form {
  background: var(--white);
  border-radius: var(--radius-xl, 1rem);
  padding: 2rem 1.75rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  position: relative;
  z-index: 1;
}
.hero-glow__form-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--g900);
  margin-bottom: 0.75rem;
  text-align: center;
}
.hero-glow__form .form-container {
  color: var(--g800);
}
.hero-glow__form .form-step__title {
  color: var(--g900);
  font-size: 1.1rem;
}
.hero-glow__form .form-step__sub {
  color: var(--g500);
  font-size: 0.9rem;
}
.hero-glow__form .form-progress {
  margin-bottom: 1.25rem;
}
/* Breadcrumbs inside hero-glow */
.hero-glow--form .breadcrumbs {
  margin-bottom: 1rem;
}
.hero-glow--form .breadcrumbs a,
.hero-glow--form .breadcrumbs li {
  color: rgba(255,255,255,0.7);
}
.hero-glow--form .breadcrumbs a:hover {
  color: var(--white);
}
@media (max-width: 900px) {
  .hero-glow__split {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .hero-glow--form {
    text-align: center;
    padding: 3rem 0 2rem;
  }
  .hero-glow__content {
    align-items: center;
  }
  .hero-glow--form .hero-glow__sub {
    margin-left: auto;
    margin-right: auto;
    max-width: 540px;
  }
  .hero-glow__content .stats {
    justify-content: center;
  }
  .hero-glow__form {
    max-width: 480px;
    margin: 0 auto;
  }
}

/* ===== TILT CARD ===== */
.tilt-card {
  transform-style: preserve-3d;
  perspective: 1000px;
  transition: transform var(--motion-duration) var(--motion-easing);
}

/* ===== MAGNETIC BUTTON ===== */
.magnetic {
  transition: transform 0.2s var(--motion-easing);
}

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background: var(--blue);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--motion-duration) var(--motion-easing);
  z-index: 900;
  cursor: pointer;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  background: var(--blue-dk);
  transform: translateY(-4px);
}
.back-to-top svg {
  width: 20px;
  height: 20px;
}

/* ===== URGENCY BAR ===== */
.urgency-bar {
  background: var(--g900);
  color: var(--white);
  text-align: center;
  padding: 0.625rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  position: relative;
  z-index: 1001;
}
.urgency-bar__text {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.urgency-bar__close {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0.25rem;
  line-height: 1;
}
.urgency-bar__close:hover {
  color: var(--white);
}
.urgency-bar.hidden {
  display: none;
}

/* ===== EXIT POPUP ===== */
.exit-popup {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.exit-popup.active {
  display: flex;
}
.exit-popup__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
}
.exit-popup__card {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 3rem 2.5rem;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-xl);
  animation: popup-in 0.4s var(--spring-easing);
}
@keyframes popup-in {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.exit-popup__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--g100);
  cursor: pointer;
  transition: background 0.2s;
}
.exit-popup__close:hover {
  background: var(--g200);
}
.exit-popup__close svg {
  width: 18px;
  height: 18px;
  stroke: var(--g600);
}
.exit-popup__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}
.exit-popup__text {
  color: var(--g500);
  margin-bottom: 1.5rem;
  font-size: 1rem;
  line-height: 1.6;
}
.exit-popup__actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* ===== SOCIAL PROOF TOAST ===== */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  background: var(--white);
  border: 1px solid var(--g200);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 360px;
  z-index: 9000;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s var(--motion-easing);
  pointer-events: none;
}
.toast.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.toast__dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  flex-shrink: 0;
}
.toast__text {
  font-size: 0.85rem;
  color: var(--g700);
  line-height: 1.4;
}
.toast__text strong {
  font-weight: 600;
}
.toast__time {
  font-size: 0.75rem;
  color: var(--g400);
}
.toast__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: none;
  border: none;
  color: var(--g400);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0.25rem;
}

/* ===== STICKY SIDEBAR (desktop) ===== */
.sticky-sidebar {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 998;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sticky-sidebar__item {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--red);
  color: var(--white);
  text-decoration: none;
  padding: 0.75rem;
  transition: all 0.25s var(--motion-easing);
  overflow: hidden;
}
.sticky-sidebar__item:first-child {
  border-radius: 0 var(--radius-md) 0 0;
}
.sticky-sidebar__item:last-child {
  border-radius: 0 0 var(--radius-md) 0;
  background: var(--blue);
}
.sticky-sidebar__item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke: var(--white);
  fill: none;
}
.sticky-sidebar__label {
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--white);
  transition: max-width 0.3s var(--motion-easing), margin 0.3s var(--motion-easing);
  margin-left: 0;
}
.sticky-sidebar__item:hover {
  background: var(--red-dk);
  padding-right: 1rem;
}
.sticky-sidebar__item:last-child:hover {
  background: var(--blue-dk);
}
.sticky-sidebar__item:hover .sticky-sidebar__label {
  max-width: 120px;
  margin-left: 0.5rem;
}

/* ===== MOBILE BOTTOM NAV ===== */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: var(--g900);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
}
.mobile-nav__urgency {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(0,0,0,0.2);
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  font-family: var(--font-display);
  letter-spacing: 0.02em;
}
.mobile-nav__buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  max-width: 480px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
}
.mobile-nav .btn {
  padding: 0.875rem;
  font-size: 0.9rem;
  border-radius: var(--radius-md);
  justify-content: center;
}

/* Hide sticky sidebar on mobile, show mobile nav */
@media (max-width: 768px) {
  .sticky-sidebar { display: none; }
}

/* ===== PREFERS REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .stagger > * { opacity: 1; transform: none; }
  .word-reveal .word { opacity: 1; transform: none; }
}
