.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  /* Top-anchored: content always starts right under the nav, never floats below the fold */
  justify-content: flex-start;
  overflow: hidden;
  padding-top: 88px;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}
.hero__orb-1 {
  width: clamp(300px, 50vw, 700px);
  height: clamp(300px, 50vw, 700px);
  background: radial-gradient(circle, rgba(124,58,237,0.18) 0%, transparent 70%);
  top: -15%;
  right: -10%;
  animation: orbFloat 9s ease-in-out infinite;
}
.hero__orb-2 {
  width: clamp(250px, 40vw, 600px);
  height: clamp(250px, 40vw, 600px);
  background: radial-gradient(circle, rgba(37,99,235,0.15) 0%, transparent 70%);
  bottom: 5%;
  left: -8%;
  animation: orbFloat 12s ease-in-out infinite reverse;
}

@keyframes orbFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-40px) scale(1.06); }
}

.hero__content {
  position: relative;
  z-index: var(--z-above);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  padding-block: var(--space-4);
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.375rem 1rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-bg-border);
  background: rgba(37,99,235,0.08);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-accent);
}
.hero__badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-accent-3);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.75); }
}

.hero__heading {
  max-width: 15ch;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.04;
}

.hero__sub {
  max-width: 580px;
  font-size: 1.1rem;
  line-height: 1.7;
}

.hero__cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-2);
}

/* Stats bar — sits directly under the CTAs as part of the top-anchored block */
.hero__stats {
  position: relative;
  z-index: var(--z-above);
  margin-top: var(--space-5);
  border-top: 1px solid var(--color-bg-border);
  background: rgba(13,18,32,0.6);
  backdrop-filter: blur(10px);
  padding-block: var(--space-6);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8);
}
@media (min-width: 768px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
}

.stat {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.stat-number {
  font-family: 'Syne', system-ui, sans-serif;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

@media (prefers-reduced-motion: reduce) {
  .hero__orb { animation: none; }
  .hero__badge-dot { animation: none; }
}

/* ── Welcome eyebrow ── */
.hero__welcome {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  margin: 0;
}
.hero__welcome strong {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ── Swipe-in entrance (pure CSS: runs on every load, no observers) ──
   Stagger order comes from the inline --enter index on each element. */
/* Resting state is VISIBLE — the hidden start lives only inside the keyframes,
   so if the animation is throttled or never runs, the content is still shown. */
.hero-enter {
  animation: hero-enter 0.7s cubic-bezier(0.22, 1, 0.36, 1) both,
             hero-enter-failsafe 0.01s ease 1.5s forwards;
}
@keyframes hero-enter-failsafe {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes hero-enter {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* Heading lines slide up out of the .hero__heading-line overflow mask */
.hero-swipe {
  display: inline-block;
  animation: hero-swipe 0.75s cubic-bezier(0.22, 1, 0.36, 1) both,
             hero-swipe-failsafe 0.01s ease 1.5s forwards;
}
@keyframes hero-swipe-failsafe {
  to { transform: translateY(0); }
}
@keyframes hero-swipe {
  from { transform: translateY(108%); }
  to   { transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-enter, .hero-swipe { animation: none; }
}
