/* Rize marketing: keyframes, scroll reveals, illustration motion, reduced motion.
   Everything ambient is slow (7s breath, 40s+ drift). Nothing snaps. */

/* Orb */
@keyframes orb-halo {
  0%, 100% { transform: translateZ(0) scale(0.97); opacity: 0.7; }
  50% { transform: translateZ(0) scale(1.035); opacity: 1; }
}
@keyframes orb-glow {
  0%, 100% { transform: translateZ(0) scale(1); opacity: 0.32; }
  50% { transform: translateZ(0) scale(1.1); opacity: 0.46; }
}
@keyframes orb-breathe {
  0%, 100% { transform: translateZ(0) scale(1); }
  50% { transform: translateZ(0) scale(1.04); }
}
@keyframes orb-shimmer {
  from { transform: translateZ(0) rotate(0deg); }
  to { transform: translateZ(0) rotate(360deg); }
}
@keyframes orb-ripple {
  0% { transform: scale(1); opacity: 0; }
  8% { opacity: 0.55; }
  100% { transform: scale(3.2); opacity: 0; }
}

/* Ambient field */
@keyframes drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  33% { transform: translate3d(6%, -5%, 0) scale(1.08); }
  66% { transform: translate3d(-5%, 6%, 0) scale(0.95); }
  100% { transform: translate3d(3%, 3%, 0) scale(1.04); }
}

/* Hero entrance */
@keyframes word-in {
  to { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes fade-up {
  to { opacity: 1; transform: none; }
}
@keyframes dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.75); }
}
@keyframes cue {
  0% { transform: scaleY(0); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

/* Misc */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breath-idle {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}
@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}
@keyframes marquee {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}

/* Scroll reveals */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--reveal) var(--ease-out), transform var(--reveal) var(--ease-out);
  transition-delay: var(--delay, 0s);
  will-change: opacity, transform;
}
[data-reveal="fade"] { transform: none; }
[data-reveal="left"] { transform: translateX(-32px); }
[data-reveal="right"] { transform: translateX(32px); }
[data-reveal="scale"] { transform: scale(0.94); }
[data-reveal="none"] { opacity: 1; transform: none; transition: none; }
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-reveal].is-visible:not([data-reveal="none"]) { will-change: auto; }

/* Feature illustrations. All transforms use fill-box so they pivot on themselves. */
.viz * { transform-box: fill-box; transform-origin: center; }

.viz-breath circle:not([fill]) { animation: viz-breath var(--breath) var(--ease-breath) infinite; }
.viz-breath circle:nth-child(2) { animation-delay: 0.5s; }
.viz-breath circle:nth-child(3) { animation-delay: 1s; }
@keyframes viz-breath {
  0%, 100% { transform: scale(0.92); opacity: 0.55; }
  50% { transform: scale(1.08); opacity: 1; }
}

.viz-journal path {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: viz-draw 5s var(--ease-soft) infinite alternate;
}
.viz-journal path:nth-of-type(2) { animation-delay: 0.6s; }
.viz-journal path:nth-of-type(3) { animation-delay: 1.2s; }
.viz-journal path:nth-of-type(4) { animation-delay: 1.8s; }
@keyframes viz-draw {
  0%, 15% { stroke-dashoffset: 100; }
  70%, 100% { stroke-dashoffset: 0; }
}

.viz-meditate .ripple {
  opacity: 0;
  animation: viz-ripple 7.5s var(--ease-soft) infinite;
}
.viz-meditate .ripple:nth-of-type(2) { animation-delay: 2.5s; }
.viz-meditate .ripple:nth-of-type(3) { animation-delay: 5s; }
@keyframes viz-ripple {
  0% { transform: scale(0.15); opacity: 0; }
  10% { opacity: 0.8; }
  100% { transform: scale(1.05); opacity: 0; }
}

.viz-lumina .core { animation: orb-breathe var(--breath) var(--ease-breath) infinite; }
.viz-lumina .orbit { animation: spin 36s linear infinite; }
.viz-lumina .orbit-2 { animation-duration: 58s; animation-direction: reverse; }

.viz-checkin rect {
  transform-origin: bottom center;
  animation: viz-bars 6s var(--ease-breath) infinite alternate;
}
.viz-checkin rect:nth-of-type(2) { animation-delay: -0.8s; }
.viz-checkin rect:nth-of-type(3) { animation-delay: -1.6s; }
.viz-checkin rect:nth-of-type(4) { animation-delay: -2.4s; }
.viz-checkin rect:nth-of-type(5) { animation-delay: -3.2s; }
.viz-checkin rect:nth-of-type(6) { animation-delay: -4s; }
.viz-checkin rect:nth-of-type(7) { animation-delay: -4.8s; }
@keyframes viz-bars {
  from { transform: scaleY(0.55); opacity: 0.55; }
  to { transform: scaleY(1); opacity: 1; }
}

.viz-insight .trace {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: viz-trace 9s var(--ease-soft) infinite;
}
.viz-insight .tip { animation: viz-tip 9s var(--ease-soft) infinite; }
@keyframes viz-trace {
  0% { stroke-dashoffset: 100; }
  45%, 80% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -100; }
}
@keyframes viz-tip {
  0%, 40% { opacity: 0; transform: scale(0.4); }
  50%, 78% { opacity: 1; transform: scale(1); }
  88%, 100% { opacity: 0; transform: scale(0.4); }
}

/* Reduced motion: keep the page, drop the choreography. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    animation-delay: 0s !important;
    transition-delay: 0s !important;
  }
  .hero-title .w, .fade-up { opacity: 1; transform: none; filter: none; }
  [data-reveal] { opacity: 1; transform: none; }
  .marquee-track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; padding: 0 var(--gutter); }
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee-track > .voice:nth-child(n + 4) { display: none; }
  .msg { opacity: 1; transform: none; }
  .feature { opacity: 1; }
  .blob { filter: blur(70px); }
}
