/* ==========================================================================
   METRIX LAB - hero.css
   Section: #hero (page order 2). Full-viewport hero on pure black with the
   cursor-reactive particle canvas behind content + radial vignette depth.
   Every rule scoped under #hero so it never collides with other sections.
   Reuses contract tokens only - no hardcoded colors that already have a token.
   ========================================================================== */

/* ----- LAYOUT SHELL ------------------------------------------------------ */
#hero.section--hero {
  position: relative;
  min-height: 100vh;
  /* fallback then modern small-viewport unit for mobile address bars */
  min-height: 100svh;
  display: flex;
  align-items: center;
  /* clear the sticky header; keep generous breathing room */
  padding-top: calc(var(--header-height) + var(--space-3xl));
  padding-bottom: var(--space-4xl);
  overflow: hidden;
  background: var(--color-bg);
  isolation: isolate;
}

/* ----- PARTICLE CANVAS (transparent; black section shows through) -------- */
#hero .hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: var(--z-base);
  pointer-events: none;
}

/* ----- DECORATIVE LAYER (parallax orbs + faint grid + vignette) ---------- */
#hero .hero__decor {
  position: absolute;
  inset: 0;
  z-index: var(--z-decor);
  pointer-events: none;
  overflow: hidden;
}

/* radial vignette: focuses the eye, darkens edges into the page */
#hero .hero__decor::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 80% at 50% 42%, transparent 38%, rgba(0, 0, 0, 0.55) 100%),
    var(--gradient-fade-bottom);
  z-index: 1;
}

#hero .hero__orb {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  will-change: transform;
}

#hero .hero__orb--primary {
  top: -8%;
  left: -6%;
  width: clamp(280px, 38vw, 560px);
  height: clamp(280px, 38vw, 560px);
  background: radial-gradient(circle at 50% 50%,
    var(--color-accent-tint-2) 0%, var(--color-accent-tint) 45%, transparent 70%);
}

#hero .hero__orb--amber {
  right: -10%;
  bottom: -14%;
  width: clamp(240px, 32vw, 480px);
  height: clamp(240px, 32vw, 480px);
  background: radial-gradient(circle at 50% 50%,
    rgba(252, 211, 77, 0.16) 0%, rgba(234, 88, 12, 0.10) 45%, transparent 70%);
  opacity: 0.42;
}

/* subtle blueprint grid for that engineered, technical feel */
#hero .hero__grid {
  position: absolute;
  inset: -1px;
  background-image:
    linear-gradient(to right, var(--border-color-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border-color-soft) 1px, transparent 1px);
  background-size: 64px 64px;
  /* fade the grid out toward the center and edges */
  -webkit-mask-image: radial-gradient(120% 90% at 50% 38%, #000 0%, transparent 72%);
          mask-image: radial-gradient(120% 90% at 50% 38%, #000 0%, transparent 72%);
  opacity: 0.6;
}

/* ----- CONTENT ----------------------------------------------------------- */
#hero .hero__inner {
  position: relative;
  z-index: var(--z-content);
}

#hero .hero__content {
  max-width: 56rem;
}

#hero .hero__eyebrow {
  margin-bottom: var(--space-lg);
}

#hero .hero__title {
  font-family: var(--font-heading);
  font-size: var(--fs-display);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tighter);
  color: var(--color-text);
  margin: 0 0 var(--space-lg);
  max-width: 18ch;
  text-wrap: balance;
}

/* .accent-text already clips the orange->amber gradient (base.css);
   here we just lift it with a soft glow so the key phrase pops. */
#hero .hero__title .accent-text {
  filter: drop-shadow(0 0 26px rgba(234, 88, 12, 0.28));
}

#hero .hero__subtitle {
  /* .section-lead supplies size/color; constrain measure for the hero */
  max-width: 46ch;
  margin: 0 0 var(--space-2xl);
  color: var(--color-text-muted);
}

/* ----- CTAS -------------------------------------------------------------- */
#hero .hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
}

/* ----- META / TRUST ROW -------------------------------------------------- */
#hero .hero__meta {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-xl);
}

#hero .hero__meta-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

#hero .hero__meta-item svg {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  color: var(--color-accent);
}

/* ----- SCROLL CUE -------------------------------------------------------- */
#hero .hero__scroll {
  position: absolute;
  left: 50%;
  bottom: var(--space-lg);
  transform: translateX(-50%);
  z-index: var(--z-content);
  display: none;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2xs);
  text-decoration: none;
  color: var(--color-text-muted); /* WCAG AA on pure-black hero; accent on hover */
  transition: color var(--transition-base);
}

#hero .hero__scroll:hover {
  color: var(--color-accent);
}

#hero .hero__scroll-label {
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
}

#hero .hero__scroll svg {
  width: 1.25rem;
  height: 1.25rem;
  animation: float 2.4s var(--ease-in-out) infinite;
}

/* ----- RESPONSIVE -------------------------------------------------------- */
@media (min-width: 768px) {
  #hero .hero__meta {
    gap: var(--space-sm) var(--space-2xl);
  }
  #hero .hero__scroll {
    display: inline-flex;
  }
}

@media (min-width: 1024px) {
  #hero.section--hero {
    padding-top: calc(var(--header-height) + var(--space-4xl));
  }
  #hero .hero__content {
    max-width: 62rem;
  }
}

/* ----- REDUCED MOTION ----------------------------------------------------
   parallax.js already leaves orbs static; here we kill the float loop and
   the accent glow so nothing draws attention via auto-motion. ------------- */
@media (prefers-reduced-motion: reduce) {
  #hero .hero__scroll svg {
    animation: none;
  }
}
