/* ═══════════════════════════════════════════════════════════════════
   MOTION.CSS — Animations, transitions, scroll reveals, signature motion
   Signature: Horizontal scroll hero with cinematic panel navigation
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Reduced motion override (WCAG AA) ────────────────────────── */

@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;
  }

  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  .hero-panel__inner > * {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ─── Page entrance — hero panel 1 ─────────────────────────────── */

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes clip-reveal-x {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0% 0 0); }
}

@keyframes clip-reveal-y {
  from { clip-path: inset(100% 0 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}

@keyframes line-grow {
  from { transform: scaleX(0); transform-origin: left; }
  to   { transform: scaleX(1); transform-origin: left; }
}

/* Hero panel 1 entrance — staggered */
.hero-panel--headline .kicker {
  animation: fade-up var(--duration-slow) var(--ease-out-expo) 0.1s both;
}

.hero-panel--headline .hero-headline {
  animation: fade-up 0.7s var(--ease-out-expo) 0.2s both;
}

.hero-panel--headline .hero-sub {
  animation: fade-up 0.6s var(--ease-out-expo) 0.4s both;
}

.hero-panel--headline .btn-primary {
  animation: fade-up var(--duration-slow) var(--ease-out-expo) 0.55s both;
}

.hero-panel--headline .badge {
  animation: fade-up var(--duration-slow) var(--ease-out-expo) 0.7s both;
}

/* Ruled line grow animation */
.ruled-line--animate {
  animation: line-grow 0.6s var(--ease-out-expo) 0.3s both;
}

/* Hero image panel — subtle zoom in */
.hero-panel--image img {
  animation: subtle-zoom 8s ease-in-out infinite alternate;
}

@keyframes subtle-zoom {
  from { transform: scale(1); }
  to   { transform: scale(1.04); }
}

/* ─── Scroll-line animation (scroll hint) ───────────────────────── */

@keyframes scroll-line {
  0%   { top: -100%; }
  100% { top: 200%; }
}

/* ─── Stat number count-up impression ──────────────────────────── */

@keyframes stat-reveal {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.stat-hero {
  animation: stat-reveal 0.6s var(--ease-out-expo) both;
}

/* Stagger stats in panel 2 */
.hero-panel--stats .stat-hero:nth-child(1) { animation-delay: 0.05s; }
.hero-panel--stats .stat-hero:nth-child(2) { animation-delay: 0.15s; }
.hero-panel--stats .stat-hero:nth-child(3) { animation-delay: 0.25s; }

/* ─── Background numeral float ──────────────────────────────────── */

@keyframes num-float {
  0%   { transform: translateY(-50%) translateX(0); }
  50%  { transform: translateY(-52%) translateX(-8px); }
  100% { transform: translateY(-50%) translateX(0); }
}

.reason-bg-num {
  animation: num-float 8s ease-in-out infinite;
}

/* ─── Clip-path wipe reveal for h2s ────────────────────────────── */

.heading-wipe {
  overflow: hidden;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.7s var(--ease-out-expo);
}

.heading-wipe.is-visible {
  clip-path: inset(0 0% 0 0);
}

/* ─── Hover: image zoom ─────────────────────────────────────────── */

.reason-img-wrap {
  overflow: hidden;
}

.reason-img-wrap img {
  transition: transform 0.6s var(--ease-out-expo),
              filter 0.4s ease;
}

.reason-img-wrap:hover img {
  transform: scale(1.05);
}

/* ─── Hover: CTA image ──────────────────────────────────────────── */

.cta-img-frame {
  overflow: hidden;
}

.cta-img-frame img {
  transition: transform 0.8s var(--ease-out-expo);
}

.cta-img-frame:hover img {
  transform: scale(1.04);
}

/* ─── Hover: button shine effect ────────────────────────────────── */

.btn-primary {
  overflow: hidden;
}

/* Shine overlay on hover — moves left to right */
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.12) 50%,
    transparent 100%
  );
  transform: skewX(-15deg);
  transition: left 0.5s var(--ease-out-expo);
  z-index: 2;
}

.btn-primary:hover::before {
  left: 160%;
}

/* ─── FAQ item open animation ───────────────────────────────────── */

details.faq-item {
  overflow: hidden;
}

.faq-answer {
  animation: fade-up 0.3s var(--ease-out-expo) both;
}

/* ─── Takeaway card hover ────────────────────────────────────────── */

.takeaway {
  transition: background var(--duration-mid) ease,
              border-color var(--duration-mid) ease;
}

.takeaway:hover {
  background: rgba(28, 14, 20, 0.35);
  border-color: rgba(196, 146, 42, 0.4);
}

/* ─── Bottom nav entrance ───────────────────────────────────────── */

.bottom-nav {
  animation: slide-up-nav 0.5s var(--ease-out-expo) 0.8s both;
}

@keyframes slide-up-nav {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

/* ─── Parallax wrapper ──────────────────────────────────────────── */

.parallax-wrap {
  will-change: transform;
}

/* ─── Scroll progress indicator ─────────────────────────────────── */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--brand-secondary);
  z-index: 200;
  transition: width 0.1s linear;
}
