/* Scroll reveal */
[data-reveal] {
  opacity: 0;
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
  will-change: opacity, transform;
}

[data-reveal="up"] {
  transform: translateY(28px);
}
[data-reveal="left"] {
  transform: translateX(-28px);
}
[data-reveal="right"] {
  transform: translateX(28px);
}
[data-reveal="scale"] {
  transform: scale(0.94);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* Staggered groups: children get incremental delay via nth-child */
[data-reveal-group] > [data-reveal] {
  transition-delay: calc(var(--stagger-index, 0) * 80ms);
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Hero visual: floating tech nodes */
.hero-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 520px;
  margin-inline: auto;
}

.hero-prism {
  position: absolute;
  inset: 4%;
  overflow: visible;
}

.hero-prism-shape {
  fill: none;
  stroke-width: 1.25;
  transform-origin: 50px 60px;
}

.hero-prism-shape--a {
  stroke: rgba(21, 94, 239, 0.28);
  animation: prism-spin 34s linear infinite;
}

.hero-prism-shape--b {
  stroke: rgba(34, 211, 238, 0.32);
  animation: prism-spin 26s linear infinite reverse;
}

@keyframes prism-spin {
  to {
    transform: rotate(360deg);
  }
}

.hero-orb {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(34, 211, 238, 0.35), rgba(21, 94, 239, 0.08) 60%, transparent 75%);
  filter: blur(2px);
  animation: orb-pulse 7s var(--ease-in-out) infinite;
}

@keyframes orb-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.05);
    opacity: 1;
  }
}

.hero-grid {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background-image: linear-gradient(rgba(11, 27, 59, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 27, 59, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle, black 55%, transparent 78%);
}

.hero-node {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  backdrop-filter: blur(6px);
  color: var(--color-primary);
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  font-weight: 600;
  box-shadow: var(--shadow-md);
  animation: float 6s var(--ease-in-out) infinite;
}

.hero-node svg {
  width: 16px;
  height: 16px;
  color: var(--color-accent-2);
}

.hero-node--1 {
  top: 6%;
  left: 2%;
  animation-delay: 0s;
}
.hero-node--2 {
  top: 32%;
  right: -2%;
  animation-delay: 1.4s;
}
.hero-node--3 {
  bottom: 22%;
  left: -4%;
  animation-delay: 2.8s;
}
.hero-node--4 {
  bottom: 2%;
  right: 10%;
  animation-delay: 4.2s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-orb,
  .hero-node,
  .hero-prism-shape {
    animation: none;
  }
}

@media (max-width: 768px) {
  .hero-visual {
    max-width: 340px;
  }
}

/* Process timeline */
.timeline {
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 27px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-border);
}

.timeline-progress {
  position: absolute;
  left: 27px;
  top: 0;
  width: 2px;
  background: var(--gradient-accent);
  height: 0%;
  transition: height var(--dur-base) linear;
}

.timeline-item {
  position: relative;
  padding-left: 4.25rem;
  padding-bottom: var(--space-xl);
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: 0;
  top: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-accent);
  transition: border-color var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out),
    color var(--dur-base) var(--ease-out);
}

.timeline-item.is-visible .timeline-marker {
  background: var(--gradient-accent);
  border-color: transparent;
  color: #fff;
}

/* Marquee-style tech strip (CSS only, pauses on hover, respects reduced motion) */
.tech-marquee {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}

.tech-marquee-track {
  display: flex;
  width: max-content;
  gap: var(--space-lg);
  animation: marquee 28s linear infinite;
}

.tech-marquee:hover .tech-marquee-track {
  animation-play-state: paused;
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tech-marquee-track {
    animation: none;
  }
}
