/* ------------------------------------------------------------------ star field stage */
.astra {
  position: relative;
  isolation: isolate;
}
.astra-backdrop {
  position: sticky;
  top: 0;
  z-index: 0;
  height: 100vh;
  height: 100lvh;
  width: 100%;
  overflow: hidden;
  background: #000;
  pointer-events: none;
}
.astra-backdrop canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.astra-ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: plus-lighter;
  background: radial-gradient(
    ellipse farthest-corner at center,
    transparent 0%,
    color-mix(in srgb, var(--ambient) 6.25%, transparent) 25%,
    color-mix(in srgb, var(--ambient) 25%, transparent) 50%,
    color-mix(in srgb, var(--ambient) 56.25%, transparent) 75%,
    var(--ambient) 100%
  );
}
/* When WebGL is live the ambient wash and vignette are drawn inside the composite shader. */
.astra-backdrop.is-live .astra-ambient,
.astra-backdrop.is-live .astra-vignette {
  display: none;
}
.astra-backdrop.is-static .astra-ambient {
  opacity: 0.55;
}
.astra-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    circle,
    transparent 47%,
    rgba(0, 0, 0, 0.18) 72%,
    rgba(0, 0, 0, 0.78) 100%
  );
}
/* static poster shown when WebGL is unavailable */
.astra-poster {
  position: absolute;
  inset: 0;
  opacity: 0;
}
.astra-backdrop.is-static .astra-poster {
  opacity: 1;
  background:
    radial-gradient(ellipse 9% 6% at 50% 50%, rgba(245, 246, 251, 0.55), transparent 70%),
    radial-gradient(ellipse 30% 14% at 50% 50%, rgba(125, 211, 252, 0.22), transparent 70%),
    radial-gradient(ellipse 52% 26% at 49% 51%, rgba(94, 234, 212, 0.1), transparent 70%),
    radial-gradient(ellipse 80% 44% at 51% 51%, rgba(165, 180, 252, 0.07), transparent 70%);
}
.astra-backdrop.is-static canvas {
  display: none;
}

.astra-chrome {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  height: 100vh;
  height: 100svh;
}
.astra-label {
  position: absolute;
  top: 52%;
  transform: translateY(-50%);
  margin: 0;
  z-index: 2;
  color: var(--fg);
  text-shadow: 0 0 1.5rem rgba(250, 250, 250, 0.08);
  font-family: 'Geist', var(--font);
  font-size: clamp(2.5rem, 1rem + 2.8vw, 3.5rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.08;
  white-space: nowrap;
  user-select: none;
  opacity: var(--copy-opacity, 1);
}
.astra-label--left {
  left: var(--gutter);
}
.astra-label--right {
  right: var(--gutter);
}
.astra-label--lead {
  top: clamp(7.5rem, 18svh, 11rem);
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(1.5rem, 1rem + 1vw, 1.75rem);
  letter-spacing: -0.025em;
  color: rgba(250, 250, 250, 0.8);
}
.astra-title-group {
  display: contents;
}
@media (min-width: 768px) {
  /* Anchor the introduction to the left headline without shifting its baseline. */
  .astra-title-group {
    display: block;
    position: absolute;
    top: 52%;
    left: var(--gutter);
    transform: translateY(-50%);
  }
  .astra-label--left {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
  }
  .astra-label--lead {
    top: auto;
    bottom: calc(100% + 18px);
    left: 0;
    transform: none;
  }
}
.astra-letter {
  display: inline-block;
  opacity: 0;
  transform: translateX(var(--shift, 44px));
  animation: label-reveal 1s cubic-bezier(0.22, 1, 0.36, 1) var(--delay, 0s) forwards;
}
@keyframes label-reveal {
  to {
    opacity: 1;
    transform: translate(0);
  }
}
@media (max-width: 767px) {
  /* Keep all three lines centered above the galaxy on portrait screens. */
  .astra-label {
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%);
    font-size: clamp(1.875rem, 7.7vw, 2.125rem);
  }
  .astra-label--left {
    top: calc(var(--header-h) + 6rem);
  }
  .astra-label--right {
    top: calc(var(--header-h) + 8.75rem);
  }
  .astra-label--lead {
    top: calc(var(--header-h) + 3rem);
    font-size: 1.5rem;
  }
}
@media (max-width: 767px) and (max-height: 540px) and (orientation: landscape) {
  .astra-label {
    top: 54%;
    transform: translateY(-50%);
    font-size: clamp(1.5rem, 4vw, 2rem);
  }
  .astra-label--left {
    left: var(--gutter);
    right: auto;
  }
  .astra-label--right {
    left: auto;
    right: var(--gutter);
  }
  .astra-label--lead {
    top: calc(var(--header-h) + 2rem);
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%);
    font-size: 1.375rem;
  }
}

.astra-content {
  position: relative;
  z-index: 10;
  margin-top: -100vh;
  margin-top: -100lvh;
  min-width: 0;
}

.astra-drag {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: grab;
  touch-action: pan-y pinch-zoom;
}
.astra-drag[data-dragging='true'] {
  cursor: grabbing;
}
.astra-drag:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: -4px;
}
.astra-replay {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 3;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  border: 0;
  padding: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.15);
  transition:
    color 0.15s,
    background-color 0.15s;
}
.astra-replay:hover {
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.25);
}
.no-starfield .astra-replay,
.no-starfield .astra-drag {
  display: none;
}

/* ------------------------------------------------------------------ hero */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  width: 100%;
}
@media (max-width: 767px) {
  .hero {
    min-height: 100svh;
  }
}

/* ------------------------------------------------------------------ shape cues */
.shape-cue {
  position: relative;
  width: 100%;
  max-width: 36rem;
  height: clamp(280px, 45svh, 440px);
  margin-inline: auto;
  touch-action: pan-y pinch-zoom;
}
.shape-cue--mark {
  --mark-height: clamp(260px, calc(100svh - 420px), 400px);
  width: calc(100% * 2 / 3);
  max-width: 40rem;
  height: var(--mark-height);
  scroll-margin-top: calc(var(--header-h) + 2rem);
}
@media (max-width: 767px) {
  .shape-cue {
    height: 240px;
    max-width: 18rem;
  }
  .shape-cue--mark {
    --mark-height: min(110vw, 60svh);
    width: calc((100% - 2rem) * 2 / 3);
    max-width: calc(32rem * 2 / 3);
    height: calc(var(--mark-height) * 2 / 3);
    scroll-margin-top: calc(24svh + var(--mark-height) / 6);
  }
}
.shape-cue svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
}
.shape-cue .astra-drag {
  cursor: grab;
}
.no-starfield .shape-cue {
  height: auto;
  padding-block: 2rem;
}
.no-starfield .shape-cue svg {
  position: static;
  display: block;
  opacity: 0.9;
  height: min(40vh, 320px);
  color: rgba(250, 250, 250, 0.5);
}
@media (prefers-reduced-motion: reduce) {
  .astra-letter {
    opacity: 1;
    transform: none;
    animation: none;
  }
  html {
    scroll-behavior: auto;
  }
}
