/* ============================================================================
 * Rooster Capital — Motion Layer (additive aesthetic refresh)
 * v1.0 — 2026-06-01
 *
 * Additive, opt-in CSS scoped to body.rc-motion-on. The body class is added
 * by rc-motion.js ONLY on pages that load this stylesheet, so login.html,
 * site/admin/, rooster-flow.html, _consent/, ai-chat.html, land-pricer-v3.html,
 * comp-map.html, and gmap.html are NEVER affected — they do not include the
 * link or the script.
 *
 * Tokens mirror src/styles/main.css (Modern Patriot palette). This file
 * does NOT redefine any of those tokens; it only consumes them and adds
 * the cinematic-refresh effects from the Claude Design preview:
 *   - Scroll progress bar
 *   - Reveal-on-scroll animations
 *   - Terracotta-tinted card lift on hover
 *   - Animated count-up shimmer
 *
 * Load AFTER tailwind.*.css so these rules win on the public marketing pages.
 * Respects prefers-reduced-motion.
 * ========================================================================== */

/* ─── Scroll progress bar (top of viewport) ───────────────────────────── */
body.rc-motion-on .rc-scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #B85C3E 0%, #C89B3C 100%);
  z-index: 2147483647;
  transition: width 0.06s linear;
  pointer-events: none;
}

/* ─── Reveal-on-scroll primitive ──────────────────────────────────────── */
body.rc-motion-on .rc-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
body.rc-motion-on .rc-reveal.rc-in {
  opacity: 1;
  transform: none;
}
body.rc-motion-on .rc-reveal.rc-d1 { transition-delay: 0.08s; }
body.rc-motion-on .rc-reveal.rc-d2 { transition-delay: 0.16s; }
body.rc-motion-on .rc-reveal.rc-d3 { transition-delay: 0.24s; }

/* ─── Enhanced lift on existing card-like surfaces ────────────────────── */
body.rc-motion-on .stat-card,
body.rc-motion-on .deal-card,
body.rc-motion-on .rc-lift {
  transition:
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
body.rc-motion-on .stat-card:hover,
body.rc-motion-on .deal-card:hover,
body.rc-motion-on .rc-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 44px rgba(184, 92, 62, 0.18);
}

/* ─── Count-up shimmer (subtle glow while numbers tick) ───────────────── */
body.rc-motion-on .rc-counting {
  background: linear-gradient(90deg, #B85C3E, #9D4D32, #B85C3E);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: rc-motion-shimmer 1.2s ease-in-out;
}
@keyframes rc-motion-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* ─── Eyebrow refinement (gold uppercase micro-label) ─────────────────── */
body.rc-motion-on .ssr-section h2 + .lede,
body.rc-motion-on .ssr-section .eyebrow {
  /* additive — uses existing tokens only */
}

/* ─── Reduced-motion respect ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  body.rc-motion-on .rc-reveal,
  body.rc-motion-on .rc-reveal.rc-in {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  body.rc-motion-on .rc-scroll-progress { display: none !important; }
  body.rc-motion-on .rc-counting {
    animation: none !important;
    background: none !important;
    -webkit-text-fill-color: initial !important;
    color: inherit !important;
  }
  body.rc-motion-on .stat-card,
  body.rc-motion-on .deal-card,
  body.rc-motion-on .rc-lift {
    transition: none !important;
  }
}
