/* Pre-rendered 3D art; only lightweight CSS transforms animate at runtime. */
.hero-visual { animation: none; }
.hero-layout { gap: 38px; min-height: 650px; padding-block: 64px 72px; }
.market-display {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  width: 100%;
  max-width: 660px;
  margin: 0;
  padding: 0;
  min-width: 0;
  isolation: isolate;
}
.market-tilt {
  transform: perspective(1400px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transition: transform 650ms cubic-bezier(.2,.65,.3,1);
}
.market-render { display: block; }
.market-image { display: block; width: 100%; height: auto; }
html[data-motion="full"] .market-render { animation: market-drift 10s ease-in-out infinite; }

@media (hover: hover) and (pointer: fine) and (min-width: 900px) {
  html[data-motion="full"] .market-display.tilt-active .market-tilt { transition-duration: 160ms; will-change: transform; }
  html[data-motion="full"] .service-card { position: relative; }
  html[data-motion="full"] .service-card.visible {
    transform: perspective(1100px) rotateX(var(--tilt-x,0deg)) rotateY(var(--tilt-y,0deg)) translateY(var(--card-lift,0px));
    transform-style: preserve-3d;
    transition: opacity .6s ease, transform .4s ease, border-color .3s ease;
  }
  html[data-motion="full"] .service-card.visible:hover { --card-lift: -4px; }
  html[data-motion="full"] .service-card.tilt-active { transition-duration: 180ms; will-change: transform; }
  html[data-motion="full"] .service-card .service-icon { transform: translateZ(22px) rotate(-5deg); box-shadow: 5px 6px 0 #cadee1; }
  html[data-motion="full"] .service-card h3 { transform: translateZ(12px); }
}

/* Stop animation clocks for off-screen sections and background tabs. */
html.motion-managed [data-motion-zone] *,
html.motion-managed [data-motion-zone] *::before,
html.motion-managed [data-motion-zone] *::after { animation-play-state: paused; }
html.motion-managed:not([data-page-hidden="true"]) [data-motion-zone].motion-in-view *,
html.motion-managed:not([data-page-hidden="true"]) [data-motion-zone].motion-in-view *::before,
html.motion-managed:not([data-page-hidden="true"]) [data-motion-zone].motion-in-view *::after { animation-play-state: running; }
html[data-page-hidden="true"] *,
html[data-page-hidden="true"] *::before,
html[data-page-hidden="true"] *::after { animation-play-state: paused !important; }
html[data-motion="lite"] .market-render { animation: none; }
html[data-motion="off"] *,
html[data-motion="off"] *::before,
html[data-motion="off"] *::after { animation: none !important; transition: none !important; }
html[data-motion="off"] { scroll-behavior: auto; }
html.js-ready[data-motion="off"] .reveal { opacity: 1; transform: none; }

@keyframes market-drift {
  0%,100% { transform: translateY(3px); }
  50% { transform: translateY(-5px); }
}
@media (max-width: 1100px) {
  .hero-layout { gap: 24px; min-height: 600px; }
}
@media (max-width: 899px) {
  .market-tilt { transform: none; }
}
@media (max-width: 680px) {
  .hero-layout { min-height: auto; padding-block: 44px 42px; gap: 28px; }
  .market-display { max-width: 480px; width: 100%; margin-inline: auto; padding: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .market-tilt { transform: none !important; }
  .market-render { animation: none !important; }
}
