/* Webloom hero: rings loader + full-viewport stage with the glass rings rising from the bottom edge. */

/* ---------------------------------------------------------------- loader (only when JS runs) */

.loader { display: none; }

.js .loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity 0.7s var(--ease), visibility 0s linear 0.7s;
}

.js .loader.is-done { opacity: 0; visibility: hidden; }
.loader__rings { width: 88px; transition: transform 0.8s var(--ease); }
.loader.is-done .loader__rings { transform: scale(1.8); }

/* ---------------------------------------------------------------- stage */

.stage {
  --rings-visible: clamp(190px, 33svh, 380px);
  position: relative;
  isolation: isolate;
  overflow: clip;
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding: 150px var(--gutter) calc(var(--rings-visible) + 28px);
}

.stage__copy { position: relative; z-index: 3; width: 100%; max-width: 940px; margin: 0 auto; text-align: center; }
.stage .display { font-size: var(--text-display); letter-spacing: -0.05em; line-height: 0.96; margin: 26px 0 24px; }
.stage .lead { margin: 0 auto; }
.stage__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }

.stage__tag { display: inline-flex; align-items: center; gap: 9px; padding: 8px 15px; font-size: 0.84rem; font-weight: 500; }
.stage__tag i { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 25%, transparent); }

/* hero copy plays after the loader, not on intersection */
.js .stage .reveal { transition-delay: calc(var(--i, 0) * 90ms + 60ms); }
.js .is-in .stage .reveal { opacity: 1; transform: none; }

/* the rings: rise from the bottom edge like a horizon; rings.js drives pose + parallax */
.stage__rings {
  /* headroom above and below the pair: when it rotates on scroll it grows taller than its box,
     and the fade mask only paints inside the box (on phones the box is shorter than the visible band) */
  --headroom: min(20vw, 250px);
  position: absolute;
  z-index: 2;
  left: 50%;
  top: calc(100% - var(--rings-visible) - var(--headroom));
  width: min(98vw, 1240px);
  padding-block: var(--headroom);
  translate: -50% 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
  /* fade into the page instead of a hard cut at the hero's bottom edge */
  --fade: linear-gradient(to bottom,
    #000 calc(var(--headroom) + var(--rings-visible) * 0.34),
    rgb(0 0 0 / 0.6) calc(var(--headroom) + var(--rings-visible) * 0.64),
    rgb(0 0 0 / 0.2) calc(var(--headroom) + var(--rings-visible) * 0.86),
    transparent calc(var(--headroom) + var(--rings-visible) - 6px));
  -webkit-mask-image: var(--fade);
  mask-image: var(--fade);
}
.is-in .stage__rings { opacity: 1; }
.stage__rings svg { width: 100%; height: auto; }

.scroll-cue { position: absolute; z-index: 4; left: var(--gutter); bottom: 30px; display: flex; align-items: center; gap: 12px; color: var(--muted); text-decoration: none; }
.scroll-cue svg { width: 34px; height: 20px; animation: cue-spin 6s linear infinite; }
.scroll-cue circle { fill: none; stroke: currentColor; stroke-width: 1.8; }
.scroll-cue circle:last-child { stroke: var(--blue); }

@keyframes cue-spin { to { transform: rotate(360deg); } }

@media (max-width: 640px) {
  .stage { padding-top: 130px; }
  .scroll-cue { display: none; }
  .stage__actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .stage__rings { transition: none; opacity: 1; }
  .scroll-cue svg { animation: none; }
}
