/* ── HERO · particle globe ──
   Home page only, loaded after veridex.css so it wins the cascade over the
   earlier hero blocks. The globe (hero-globe.js) is centred in the open band
   between the nav and the copy; the copy sits at the foot of the screen,
   headline left and the supporting column right. Brand fonts are unchanged:
   everything here inherits the existing hero type. */

/* the stage fills the hero behind the copy and carries the #0a121f field that
   .hero-inner::before used to paint, so the globe is no longer covered by it */
.hero > .hero-stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #0a121f;
  pointer-events: none;
}
.hero > .hero-inner::before {
  display: none;
}
.hero-globe-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.hero[data-gl="on"] .hero-globe-canvas {
  opacity: 1;
}

/* fallback without WebGL2: the globe video, bleeding in from the right as before */
.hero-stage .hero-video {
  display: none;
  position: absolute;
  top: 50%;
  right: clamp(-620px, -27vw, -300px);
  width: min(86vw, 1280px);
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  opacity: 0.72;
  transform: translateY(-50%);
  -webkit-mask-image: linear-gradient(90deg, transparent 6%, #000 40%);
  mask-image: linear-gradient(90deg, transparent 6%, #000 40%);
  mix-blend-mode: screen;
}
.hero[data-gl="off"] .hero-video {
  display: block;
}

/* the copy drops to the foot of the screen, leaving the band above for the globe */
.hero > .hero-inner {
  margin-top: auto;
}

/* the copy is two blocks: the lead (eyebrow + headline) and the aside (body,
   scope, actions, trust). The spacing veridex.css gave the direct children of
   .hero-copy is restated here for the new parents. */
.hero-lead,
.hero-aside {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}
.hero-lead > .hero-badge {
  margin-bottom: 22px;
}
.hero-lead > h1 {
  margin-bottom: 24px;
}
.hero-aside > p {
  margin-bottom: 18px;
}
.hero-aside > .hero-scope {
  margin: 0 0 32px;
}
.hero-aside > .hero-ctas {
  gap: 12px;
  margin: 0;
}

@media (min-width: 901px) {
  /* the headline sits top left; the supporting copy is a column on the right,
     resting low; the globe hangs from the nav between them, behind the
     headline and clear of the right column */
  .hero {
    padding-top: clamp(120px, 17vh, 170px);
    padding-bottom: 150px;
  }

  /* full width: its auto side margins would otherwise shrink it to its content */
  .hero > .hero-inner {
    display: flex;
    flex: 1 1 auto;
    width: 100%;
    margin-top: 0;
  }
  .hero-copy {
    flex: 1 1 auto;
    width: 100%;
    display: grid;
    grid-template-rows: auto 1fr;
    grid-template-columns: minmax(0, 1fr) minmax(0, 425px);
    column-gap: 48px;
    max-width: none;
  }
  .hero-lead {
    grid-row: 1;
    grid-column: 1 / -1;
  }
  .hero-lead > h1 {
    margin-bottom: 0;
    font-size: clamp(34px, 4vw, 72px);
  }
  .hero-aside {
    grid-row: 2;
    grid-column: 2;
    align-self: end;
    padding-top: 40px;
  }
}

/* wide screens: the hero opens out from the site's 1100 column to 1320, and
   the nav follows so the logo still lines up with the headline */
@media (min-width: 1440px) {
  nav,
  body:not(.theme-dark) nav {
    padding-left: max(24px, calc((100% - 1320px) / 2));
    padding-right: max(24px, calc((100% - 1320px) / 2));
  }
  .hero > .hero-inner {
    max-width: 1320px;
  }
  .hero-copy {
    grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
  }
}

/* narrow aside (and phones): the scope line wraps on spacing alone, since a
   wrapped line would open on a stray dot */
@media (max-width: 1180px) {
  .hero-aside > .hero-scope {
    flex-wrap: wrap;
    gap: 6px 18px;
  }
  .hero-copy .hero-aside .hero-scope > span + span::before {
    display: none;
  }
}

/* stacked: headline over the top of the globe (as on desktop), then the
   supporting copy under it. CSS owns the globe's size (--hg-d) and holds the
   lower part of it (--hg-rest) open above the aside; hero-globe.js reads the same value
   and rests the globe on the aside, so the two always agree. */
@media (max-width: 900px) {
  .hero {
    --hg-d: min(86vw, 420px);
  }
  .hero > .hero-inner {
    margin-top: 0;
  }
  .hero-aside {
    margin-top: calc(var(--hg-d) * var(--hg-rest, 0.7) + 24px);
  }
  .hero-copy h1 {
    font-size: clamp(30px, 6vw, 46px);
  }
}

@media (max-width: 600px) {
  /* phones: a smaller globe that the headline just overlaps, so the body
     copy rises; the headline runs larger (7.6vw keeps each sentence on one
     line; the measured limit is 7.77vw) */
  .hero {
    --hg-rest: 0.84;
    --hg-d: min(74vw, 320px);

    /* the headline sits a little lower under the nav */
    padding-top: 156px;
  }
  .hero-copy h1 {
    font-size: clamp(22px, 7.6vw, 34px);
  }
  .hero-aside > .hero-scope {
    margin-bottom: 24px;
  }
}

/* ── foot row: GLEIF credit left, networks band right, on one line ── */
.hero-networks {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 40px);
  padding: 0 max(24px, calc((100% - 1100px) / 2));
}
.hero-networks > .hero-gleif {
  flex: 0 0 auto;
  margin: 0;
}
.hero-networks > .hn-card {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 20px 0 26px;
}

/* the tag rides the band's bottom edge (hero-beam.js times its wave to the
   beam's pass along that edge) */
.hn-card .hero-networks-label {
  top: auto;
  bottom: 0;
  transform: translate(-50%, 50%);
}
@media (max-width: 600px) {
  /* phones: the credit sits above the band */
  .hero-networks {
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
    padding: 0;
  }
  .hero-networks > .hn-card {
    width: 100%;
    padding: 16px 0 20px;
  }
}

/* wide screens: the foot row follows the hero out to 1320 */
@media (min-width: 1440px) {
  .hero-networks {
    padding: 0 max(24px, calc((100% - 1320px) / 2));
  }
}

/* ── headline intro (hero-title.js) ──
   Each word rises out of a mask with a soft blur clearing. The word reveal
   replaces the h1's own fade-up, so the line is never faded twice. */
.hero-lead > h1.ht-ready {
  opacity: 1;
  transform: none;
  transition: none;
}
.ht-w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;

  /* room for descenders inside the mask, given back to the line */
  padding-bottom: 0.1em;
  margin-bottom: -0.1em;
}
.ht-i {
  display: inline-block;
  opacity: 0;
  filter: blur(6px);
  transform: translateY(105%);
  animation: ht-rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  animation-delay: calc(250ms + var(--i) * 75ms);
}
@keyframes ht-rise {
  to {
    opacity: 1;
    filter: blur(0);
    transform: none;
  }
}
