.hero-copy > * {
  animation: rise 0.9s ease both;
}

.hero-copy > *:nth-child(1) { animation-delay: 0.05s; }
.hero-copy > *:nth-child(2) { animation-delay: 0.14s; }
.hero-copy > *:nth-child(3) { animation-delay: 0.24s; }
.hero-copy > *:nth-child(4) { animation-delay: 0.34s; }
.hero-copy > *:nth-child(5) { animation-delay: 0.46s; }

.logo-mark {
  animation: mark-pulse 3.6s ease-in-out infinite;
}

.marquee-track {
  animation: marquee 32s linear infinite;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.mouse span {
  animation: wheel 1.6s ease-in-out infinite;
}

.hero-scene {
  --mx: 0;
  --my: 0;
}

.float {
  position: absolute;
  transform-style: preserve-3d;
  transform: translate3d(calc(var(--mx) * var(--d) * 1px), calc(var(--my) * var(--d) * 1px), 0);
  pointer-events: none;
}

.poly-spin,
.cube,
.gem {
  transform-style: preserve-3d;
}

.p1 { top: 18%; right: 9%; --d: 26; }
.p2 { top: 58%; right: 16%; --d: 38; }
.p3 { top: 24%; right: 30%; --d: 16; }
.p4 { bottom: 16%; right: 5%; --d: 30; }
.p5 { top: 20%; left: 4%; --d: 12; opacity: 0.55; }

.spin-a { animation: spin-a 28s linear infinite; }
.spin-b { animation: spin-b 22s linear infinite; }
.spin-c { animation: spin-c 36s linear infinite; }
.spin-d { animation: spin-d 18s linear infinite; }

.cube {
  width: var(--s);
  height: var(--s);
  position: relative;
}

.cube .face {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(158, 198, 255, 0.62);
  background: linear-gradient(160deg, rgba(76, 141, 255, 0.18), rgba(255, 255, 255, 0.03) 42%, rgba(62, 224, 207, 0.1));
  box-shadow: inset 0 0 28px rgba(76, 141, 255, 0.16);
}

.face-front { transform: translateZ(calc(var(--s) / 2)); }
.face-back { transform: rotateY(180deg) translateZ(calc(var(--s) / 2)); }
.face-right { transform: rotateY(90deg) translateZ(calc(var(--s) / 2)); }
.face-left { transform: rotateY(-90deg) translateZ(calc(var(--s) / 2)); }
.face-top { transform: rotateX(90deg) translateZ(calc(var(--s) / 2)); }
.face-bottom { transform: rotateX(-90deg) translateZ(calc(var(--s) / 2)); }

.cube-wire .face {
  background: transparent;
  border-color: rgba(62, 224, 207, 0.55);
  box-shadow: 0 0 18px rgba(62, 224, 207, 0.12);
}

.gem {
  width: var(--s);
  height: var(--s);
  position: relative;
}

.gem span {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(62, 224, 207, 0.22), rgba(141, 123, 255, 0.05));
  border: 1px solid rgba(190, 255, 246, 0.55);
  box-shadow: 0 0 22px rgba(62, 224, 207, 0.16);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

.gem span:nth-child(1) { transform: rotateY(0deg); }
.gem span:nth-child(2) { transform: rotateY(90deg); }
.gem span:nth-child(3) { transform: rotateX(90deg); }

.gem-dim span {
  opacity: 0.55;
}

.torus {
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  border: 1.5px solid rgba(141, 123, 255, 0.7);
  box-shadow:
    0 0 0 14px rgba(76, 141, 255, 0.04),
    inset 0 0 0 12px rgba(62, 224, 207, 0.05),
    0 0 28px rgba(76, 141, 255, 0.25);
}

.process-pulse {
  position: absolute;
  top: -1px;
  left: 0;
  width: 18%;
  height: 3px;
  border-radius: 99px;
  background: linear-gradient(90deg, transparent, var(--cyan), #fff, var(--violet), transparent);
  filter: drop-shadow(0 0 8px rgba(62, 224, 207, 0.85));
  animation: pulse-x 4.8s linear infinite;
}

.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

.card-grid .reveal:nth-child(2),
.tech-grid .reveal:nth-child(2),
.project-grid .reveal:nth-child(2),
.principles .reveal:nth-child(2) { transition-delay: 0.08s; }

.card-grid .reveal:nth-child(3),
.tech-grid .reveal:nth-child(3),
.project-grid .reveal:nth-child(3),
.principles .reveal:nth-child(3) { transition-delay: 0.16s; }

.card-grid .reveal:nth-child(4),
.tech-grid .reveal:nth-child(4) { transition-delay: 0.22s; }

.card-grid .reveal:nth-child(5),
.tech-grid .reveal:nth-child(5) { transition-delay: 0.28s; }

.card-grid .reveal:nth-child(6),
.tech-grid .reveal:nth-child(6) { transition-delay: 0.34s; }

.tech-grid .reveal:nth-child(7) { transition-delay: 0.12s; }
.tech-grid .reveal:nth-child(8) { transition-delay: 0.18s; }
.tech-grid .reveal:nth-child(9) { transition-delay: 0.24s; }
.tech-grid .reveal:nth-child(10) { transition-delay: 0.3s; }

.js .process.reveal .process-step {
  opacity: 0;
  transform: translateY(16px);
}

.js .process.reveal.is-in .process-step {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js .process.reveal.is-in .process-step:nth-child(2) { transition-delay: 0.08s; }
.js .process.reveal.is-in .process-step:nth-child(3) { transition-delay: 0.16s; }
.js .process.reveal.is-in .process-step:nth-child(4) { transition-delay: 0.24s; }
.js .process.reveal.is-in .process-step:nth-child(5) { transition-delay: 0.32s; }

.tilt-card {
  transition: transform 0.45s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.tilt-card.is-tilting {
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
}

html.is-paused .poly-spin,
html.is-paused .marquee-track,
html.is-paused .process-pulse,
html.is-paused .logo-mark,
html.is-paused .mouse span {
  animation-play-state: paused;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes wheel {
  0% { opacity: 0; transform: translateY(0); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translateY(10px); }
}

@keyframes mark-pulse {
  0%, 100% { box-shadow: 0 0 10px rgba(62, 224, 207, 0.35); }
  50% { box-shadow: 0 0 18px rgba(76, 141, 255, 0.75); }
}

@keyframes spin-a {
  0% { transform: translateY(-10px) rotateX(18deg) rotateY(0deg) rotateZ(6deg); }
  50% { transform: translateY(16px) rotateX(198deg) rotateY(180deg) rotateZ(20deg); }
  100% { transform: translateY(-10px) rotateX(378deg) rotateY(360deg) rotateZ(366deg); }
}

@keyframes spin-b {
  0% { transform: translateY(8px) rotateX(70deg) rotateY(0deg); }
  50% { transform: translateY(-14px) rotateX(250deg) rotateY(180deg); }
  100% { transform: translateY(8px) rotateX(430deg) rotateY(360deg); }
}

@keyframes spin-c {
  0% { transform: rotateX(68deg) rotateZ(0deg); }
  100% { transform: rotateX(68deg) rotateZ(360deg); }
}

@keyframes spin-d {
  0% { transform: translate3d(0, 0, 40px) rotateX(24deg) rotateY(0deg); }
  100% { transform: translate3d(0, 0, 40px) rotateX(384deg) rotateY(-360deg); }
}

@keyframes pulse-x {
  from { transform: translateX(-120%); }
  to { transform: translateX(560%); }
}

@keyframes pulse-y {
  from { transform: translateY(-120%); }
  to { transform: translateY(640%); }
}

@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;
  }

  .js .reveal,
  .js .process.reveal .process-step,
  .hero-copy > * {
    opacity: 1 !important;
    transform: none !important;
  }
}
