/* The about-page entry plays once in a complete, centered screen. */
.weave-story {
  position: relative;
  isolation: isolate;
  background: #030509;
}

.weave-stage {
  position: relative;
  height: 100svh;
  height: 100dvh;
  min-height: 0;
  overflow: clip;
  background: radial-gradient(ellipse at 50% 50%, rgba(35, 51, 70, .16), transparent 70%), #030509;
}

.weave-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg, #030509, transparent 10%, transparent 94%, #030509);
}

.weave-words {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: grid;
  place-items: center;
  color: #e9edf2;
  font-family: "HarmonyOS Sans SC", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(44px, 14vw, 220px);
  font-weight: 600;
  letter-spacing: .025em;
  line-height: 1;
  user-select: none;
  pointer-events: none;
}

.weave-word {
  position: relative;
  grid-area: 1 / 1;
  color: #9eacbb;
  text-shadow: 0 2px 22px #030509;
}

.weave-word::after {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  color: #eef3f8;
  clip-path: inset(0 var(--word-cover, 0%) 0 0);
  will-change: clip-path;
}

.weave-canvas {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.weave-fallback {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 74%;
  width: 64px;
  height: 64px;
  opacity: .26;
  object-fit: contain;
  transform: translate(-50%, -50%);
}

.is-ready .weave-fallback {
  display: none;
}

.weave-footer {
  position: absolute;
  z-index: 4;
  right: clamp(24px, 5vw, 72px);
  bottom: clamp(24px, 4vh, 46px);
  left: clamp(24px, 5vw, 72px);
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.weave-scroll-hint {
  color: #89949e;
  font-size: 18px;
  opacity: .7;
}

.weave-motion-toggle {
  position: absolute;
  right: 0;
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(190, 205, 220, .12);
  border-radius: 50%;
  background: transparent;
  color: #a3adb6;
  font: inherit;
  font-size: 16px;
  cursor: pointer;
}

.is-ready .weave-motion-toggle {
  display: inline-flex;
}

.is-ready .weave-motion-toggle[hidden] {
  display: none;
}

.weave-motion-toggle:hover {
  color: #e6e9ec;
  border-color: rgba(190, 205, 220, .32);
}

.weave-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* The original About hero now enters after the animation. */
.page-origin {
  --about-heading-size: clamp(44px, 5.4vw, 76px);
  --about-copy-size: 18px;
  --about-bottom-space: 48px;
}

.page-origin .origin-hero-stage h1,
.page-origin .origin-mission h2 {
  font-size: var(--about-heading-size);
  line-height: 1.08;
  letter-spacing: 0;
}

.page-origin .origin-hero-stage > p:not(.eyebrow),
.page-origin .origin-mission-copy > p:not(.eyebrow) {
  font-size: var(--about-copy-size);
  line-height: 1.9;
}

.page-origin .origin-hero-stage > .eyebrow,
.page-origin .origin-mission-copy > .eyebrow {
  --eyebrow-size: 13px;
}

.page-origin .origin-hero {
  --sub-visual-bottom: -8px;
}

.page-origin .origin-hero-stage {
  min-height: calc(100vh - 92px + var(--about-bottom-space));
  padding-bottom: calc(clamp(62px, 7vw, 92px) + var(--about-bottom-space));
}

.page-origin .weave-story + .origin-hero .origin-hero-stage::before,
.page-origin .weave-story + .origin-hero .origin-hero-stage::after,
.page-origin .weave-story + .origin-hero .origin-light-overlay {
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 var(--section-fade), #000 calc(100% - var(--section-fade) + var(--sub-visual-bottom)), transparent calc(100% + var(--sub-visual-bottom)));
  mask-image: linear-gradient(180deg, transparent, #000 var(--section-fade), #000 calc(100% - var(--section-fade) + var(--sub-visual-bottom)), transparent calc(100% + var(--sub-visual-bottom)));
}

@media (max-width: 720px) {
  .page-origin {
    --about-heading-size: clamp(36px, 9.4vw, 40px);
    --about-copy-size: 16px;
    --about-bottom-space: 32px;
  }

  .page-origin .origin-hero {
    --sub-visual-bottom: -2px;
  }

  .page-origin .origin-hero-stage {
    min-height: auto;
    padding-bottom: calc(56px + var(--about-bottom-space));
  }

}

@media (prefers-reduced-motion: reduce) {
  .is-ready .weave-motion-toggle,
  .weave-scroll-hint {
    display: none;
  }
}
