/* ============================================================
   HiveMind Landing Page — §2 Hero (HM-434 / LP-02)
   Owns the #top hero section only. Colors/type from css/tokens.css.
   Motion draft: assets/reference/hero-d20-draft.html
   ============================================================ */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  /* `safe center` centers when there's room but top-aligns when content is
     taller than the viewport, so nothing is pushed off-screen at 320×568. */
  align-items: safe center;
  /* Radial teal wash over the page --ink ground (from the approved motion draft). */
  background: radial-gradient(58% 58% at 62% 48%,
                rgba(31, 122, 130, 0.2),
                rgba(7, 38, 43, 0) 70%);
  /* Clip ONLY the x-axis so the intro whoosh / a hard throw can never spawn a
     horizontal scrollbar. `overflow-x: clip` leaves overflow-y visible, so tall
     content is never vertically clipped — the page scrolls instead. */
  overflow-x: clip;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr;          /* mobile: copy stacked above the ship */
  gap: var(--space-2xl);
  align-items: center;
  width: 100%;
}

@media (min-width: 768px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);  /* copy left / ship right */
    gap: var(--space-3xl);
  }
}

/* ---- Copy zone ---- */
.hero__title {
  margin-top: var(--space-md);
}

.hero__subhead {
  max-width: 48ch;
  margin-top: var(--space-lg);
  color: var(--muted-dark);
}

.hero__actions {
  margin-top: var(--space-xl);
}

.hero__microcopy {
  margin-top: var(--space-md);
  font-size: var(--fs-sm);
  color: var(--muted-dark);
}

/* ---- Ship zone ---- */
.hero__ship {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin-inline: auto;
  /* Perspective HERE (not on .hero) so the inner float's rotateX/Y reads as 3D
     and tracks the die as it is dragged around. */
  perspective: 1200px;
  will-change: transform;
  cursor: grab;
  /* Start hidden; GSAP reveals via the whoosh. .no-js + reduced-motion force visible. */
  opacity: 0;
  /* No static touch-action here: Draggable sets it when (and only when) drag is
     enabled, so the die never becomes a scroll dead-zone under no-JS/reduced-motion. */
}

.hero__ship.is-dragging {
  cursor: grabbing;
}

.hero__float {
  position: relative;
  z-index: 1;
  transform-style: preserve-3d;
  will-change: transform;
}

.hero__float picture {
  display: block;
}

.hero__art {
  width: 100%;
  height: auto;
  /* Soft steady teal glow hugging the transparent ship; GSAP breathes it gently. */
  filter: drop-shadow(0 0 14px rgba(31, 122, 130, 0.3));
  will-change: filter;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
}

/* ---- Motion "tail": a teal comet streak the throw reveals (JS-driven) ----
   Anchored so its right edge sits at the die centre; JS sets rotation (velocity
   direction), scaleX (speed) and opacity, so it trails out behind a fling. */
.hero__tail {
  position: absolute;
  top: 50%;
  right: 50%;
  z-index: 0;
  width: 70%;
  height: 22px;
  margin-top: -11px;
  border-radius: 50%;
  background: linear-gradient(90deg,
                rgba(31, 122, 130, 0) 0%,
                rgba(31, 122, 130, 0.55) 100%);
  filter: blur(10px);
  opacity: 0;
  pointer-events: none;
}

/* ---- No-JS: the ship must be fully visible (GSAP never runs) ---- */
.no-js .hero__ship {
  opacity: 1;
}

/* ---- Reduced motion: static, visible, fixed glow; no whoosh/float/drag/tail ---- */
@media (prefers-reduced-motion: reduce) {
  .hero__ship {
    opacity: 1 !important;
    transform: none !important;
    cursor: auto;
  }
  .hero__float {
    transform: none !important;
  }
  .hero__art {
    filter: drop-shadow(0 0 14px rgba(31, 122, 130, 0.3));
  }
  .hero__tail {
    display: none;
  }
}
