/* Home Soft Hybrid T1 pass — Motion God 2026-11-06
   Late-loading overrides for Design Expert clamps in design-batch-b.css.
   Does not delete layout rules; motion only when html.motion-ready. */

/* --- 1. Hero entrance stagger (override forced-visible clamp) --- */
html.motion-ready .hero .cm-reveal:not(.is-in) {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 360ms var(--cm-ease-out, cubic-bezier(0.16, 1, 0.3, 1)),
    transform 360ms var(--cm-ease-out, cubic-bezier(0.16, 1, 0.3, 1));
  transition-delay: var(--cm-delay, var(--design-delay, 0ms));
  animation: none;
  will-change: opacity, transform;
}

html.motion-ready .hero .cm-reveal.is-in {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 360ms var(--cm-ease-out, cubic-bezier(0.16, 1, 0.3, 1)),
    transform 360ms var(--cm-ease-out, cubic-bezier(0.16, 1, 0.3, 1));
  transition-delay: var(--cm-delay, var(--design-delay, 0ms));
  animation: none;
}

/* --- 2. CTA amber glow + scale (keep ~2px lift; widths untouched) --- */
html.motion-ready .button-primary:not(.tune-disabled):not(:disabled),
html.motion-ready a.cm-glow-btn:not(.tune-disabled) {
  transition:
    transform 220ms var(--cm-ease-out, cubic-bezier(0.16, 1, 0.3, 1)),
    filter 220ms var(--cm-ease-soft, cubic-bezier(0.4, 0, 0.2, 1)),
    box-shadow 240ms var(--cm-ease-soft, cubic-bezier(0.4, 0, 0.2, 1)),
    background-color 160ms ease-out,
    opacity 220ms ease-out;
}

html.motion-ready .button-primary:not(.tune-disabled):not(:disabled):hover,
html.motion-ready .button-primary:not(.tune-disabled):not(:disabled):focus-visible,
html.motion-ready a.cm-glow-btn:not(.tune-disabled):hover,
html.motion-ready a.cm-glow-btn:not(.tune-disabled):focus-visible {
  transform: translateY(-2px) scale(1.02);
  filter: brightness(1.05);
  opacity: 1;
  box-shadow:
    0 8px 24px rgba(212, 165, 116, 0.35),
    0 0 22px rgba(212, 165, 116, 0.32);
}

html.motion-ready .button-primary:not(.tune-disabled):not(:disabled):active,
html.motion-ready a.cm-glow-btn:not(.tune-disabled):active {
  transform: translateY(0) scale(0.99);
  filter: none;
}

/* Secondary: soft lift + amber edge only (preserve outline look; no scale fill) */
html.motion-ready .button-secondary:not(.tune-disabled):not(:disabled):hover,
html.motion-ready .button-secondary:not(.tune-disabled):not(:disabled):focus-visible {
  transform: translateY(-2px);
  opacity: 0.96;
  filter: none;
  box-shadow: 0 0 16px rgba(212, 165, 116, 0.18);
}

html.motion-ready .tune-disabled,
html.motion-ready .tune-disabled:hover,
html.motion-ready .tune-disabled:focus-visible,
html.motion-ready .button-disabled,
html.motion-ready .button-disabled:hover {
  transform: none !important;
  filter: none !important;
  box-shadow: none !important;
  animation: none !important;
  opacity: 1;
}

/* --- 3. Logo dot: one-shot soft ping (glow pulse, no overshoot scale) --- */
@keyframes cm-home-logo-ping {
  0% {
    box-shadow: 0 0 0 0 rgba(212, 165, 116, 0.4);
    opacity: 1;
    transform: scale(1);
  }
  70% {
    box-shadow: 0 0 0 8px transparent;
    opacity: 0.88;
    transform: scale(1);
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
    opacity: 1;
    transform: scale(1);
  }
}

html.motion-ready .logo-ping.cm-ping-soft {
  animation: cm-home-logo-ping 1.1s var(--cm-ease-soft, cubic-bezier(0.4, 0, 0.2, 1)) 1 both;
}

/* --- 4. CEF/RITE card lift + one-time light --- */
html.motion-ready .cf-named.cm-lift {
  transition:
    transform 280ms var(--cm-ease-out, cubic-bezier(0.16, 1, 0.3, 1)),
    box-shadow 280ms var(--cm-ease-soft, cubic-bezier(0.4, 0, 0.2, 1)),
    border-color 180ms var(--cm-ease-soft, cubic-bezier(0.4, 0, 0.2, 1));
}

html.motion-ready .cf-named.cm-lift:hover,
html.motion-ready .cf-named.cm-lift:focus-within {
  transform: translateY(-4px);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(212, 165, 116, 0.28),
    0 0 18px rgba(212, 165, 116, 0.18);
}

html.motion-ready .cf-named.cm-lift.is-lit {
  border-color: rgba(212, 165, 116, 0.42);
  box-shadow: 0 0 18px rgba(212, 165, 116, 0.22);
}

html.motion-ready .cf-named.cm-lift.is-lit:hover,
html.motion-ready .cf-named.cm-lift.is-lit:focus-within {
  transform: translateY(-4px);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(212, 165, 116, 0.4),
    0 0 22px rgba(212, 165, 116, 0.28);
}

/* Name-story term sequence (no map boxes) */
html.motion-ready .cf-name-story .cf-term {
  transition:
    color 280ms var(--cm-ease-soft, cubic-bezier(0.4, 0, 0.2, 1)),
    text-shadow 280ms var(--cm-ease-soft, cubic-bezier(0.4, 0, 0.2, 1));
}

html.motion-ready .cf-name-story .cf-term.is-lit {
  color: var(--cm-accent, #d4a574);
  text-shadow: 0 0 14px rgba(212, 165, 116, 0.4);
}

/* --- 5. Stay / footer already use .cm-reveal; ensure footer bits participate --- */
html.motion-ready .site-footer .footer-disclaimer.cm-reveal:not(.is-in),
html.motion-ready .site-footer .footer-meta.cm-reveal:not(.is-in) {
  opacity: 0;
  transform: translateY(14px);
}

/* --- Reduced motion: kill pass transforms/animations --- */
@media (prefers-reduced-motion: reduce) {
  html.motion-ready .hero .cm-reveal,
  html.motion-ready .hero .cm-reveal:not(.is-in),
  html.motion-ready .hero .cm-reveal.is-in,
  html.motion-ready .cf-named.cm-lift,
  html.motion-ready .cf-named.cm-lift:hover,
  html.motion-ready .cf-named.cm-lift:focus-within,
  html.motion-ready .cf-named.cm-lift.is-lit,
  html.motion-ready .cf-named.cm-lift.is-lit:hover,
  html.motion-ready .cf-name-story .cf-term,
  html.motion-ready .cf-name-story .cf-term.is-lit,
  html.motion-ready .button-primary:not(.tune-disabled):not(:disabled):hover,
  html.motion-ready .button-primary:not(.tune-disabled):not(:disabled):focus-visible,
  html.motion-ready .button-primary:not(.tune-disabled):not(:disabled):active,
  html.motion-ready a.cm-glow-btn:not(.tune-disabled):hover,
  html.motion-ready a.cm-glow-btn:not(.tune-disabled):focus-visible,
  html.motion-ready a.cm-glow-btn:not(.tune-disabled):active,
  html.motion-ready .button-secondary:not(.tune-disabled):not(:disabled):hover,
  html.motion-ready .button-secondary:not(.tune-disabled):not(:disabled):focus-visible,
  html.motion-ready .logo-ping.cm-ping-soft {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    animation: none !important;
    transition: none !important;
    text-shadow: none;
    will-change: auto;
  }

  html.motion-ready .button-primary:not(.tune-disabled):not(:disabled):hover,
  html.motion-ready a.cm-glow-btn:not(.tune-disabled):hover {
    box-shadow: none;
  }
}
