:root {
  --universe-void: #010308;
  --universe-ink: #edf3fb;
  --universe-muted: #8d9caf;
  --universe-line: rgba(131, 157, 191, .18);
  --universe-blue: #7ca8e4;
}

.universe-section {
  position: relative;
  height: 210svh;
  min-height: 1420px;
  overflow: clip;
  border: 0;
  background: transparent;
  isolation: isolate;
}

.universe-stage {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100svh;
  min-height: 650px;
  overflow: hidden;
  background: var(--universe-void);
}

.universe-stage::before,
.universe-atmosphere {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.universe-stage::before {
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(1, 3, 8, .74) 0%, rgba(1, 3, 8, .2) 43%, rgba(1, 3, 8, .05) 70%),
    linear-gradient(180deg, rgba(1, 3, 8, .1), rgba(1, 3, 8, .06) 58%, rgba(1, 3, 8, .78)),
    url("../assets/space/chapter-two-galaxy-fallback.webp") 66% 56% / cover no-repeat;
  opacity: .78;
  transform: scale(1.035);
  transition: opacity .8s ease;
}

html.has-webgl-space .universe-stage {
  background: transparent;
}

html.has-webgl-space .universe-stage::before {
  opacity: 0;
}

.universe-atmosphere {
  z-index: 1;
  background:
    radial-gradient(ellipse at 74% 58%, rgba(102, 151, 217, .08), transparent 34%),
    radial-gradient(ellipse at 68% 76%, rgba(45, 72, 112, .12), transparent 42%),
    linear-gradient(90deg, rgba(1, 3, 8, .78), transparent 53%);
}

.universe-intro {
  z-index: 2;
  height: 100%;
  max-width: 1380px;
  padding-top: clamp(108px, 14vh, 148px);
  padding-bottom: 154px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.universe-heading {
  width: min(720px, 58vw);
  align-items: end;
  margin: 0;
}

.universe-heading > div {
  min-width: 0;
}

.universe-heading .section-index {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: rgba(176, 199, 229, .72);
  letter-spacing: .28em;
}

.universe-heading .section-index::before {
  content: "";
  width: 28px;
  height: 1px;
  background: rgba(137, 177, 228, .5);
}

.universe-heading h2 {
  margin: 25px 0 0;
  max-width: 650px;
  color: var(--universe-ink);
  font-family: Inter, system-ui, sans-serif;
  font-size: clamp(48px, 6vw, 82px);
  font-weight: 400;
  line-height: .99;
  letter-spacing: -.055em;
  text-wrap: balance;
  text-shadow: 0 2px 32px rgba(0, 0, 0, .7);
}

.universe-heading h2 em {
  color: #b9c8dd;
  font-style: normal;
  background: none;
  -webkit-text-fill-color: currentColor;
}

.universe-heading > p {
  width: 230px;
  margin: 0 0 6px 34px;
  color: var(--universe-muted);
  font-size: 12px;
  line-height: 1.8;
  text-shadow: 0 2px 22px #010308;
}

.universe-category-cloud {
  width: min(740px, 61vw);
  max-width: none;
  min-height: 0;
  margin: clamp(38px, 6vh, 64px) 0 0;
  padding: 21px 0;
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  border: 0;
  border-block: 1px solid var(--universe-line);
  border-radius: 0;
  background: linear-gradient(90deg, rgba(4, 8, 15, .64), rgba(4, 8, 15, .18) 74%, transparent);
  box-shadow: none;
}

.universe-category-cloud span {
  padding: 7px 10px;
  border-color: rgba(138, 166, 201, .2);
  border-radius: 999px;
  background: rgba(4, 8, 15, .56);
  color: rgba(184, 202, 224, .78);
  font-size: 8.5px;
  letter-spacing: .09em;
  opacity: .78;
  transform: none;
  transition: color 220ms ease, border-color 220ms ease, background 220ms ease;
}

.universe-category-cloud span:nth-child(3n+2),
.universe-category-cloud span:nth-child(4n) {
  color: rgba(159, 190, 227, .78);
  border-color: rgba(115, 152, 199, .22);
}

.universe-category-cloud span:hover {
  color: #f1f6fc;
  border-color: rgba(151, 190, 239, .48);
  background: rgba(16, 28, 44, .78);
}

.universe-cta {
  width: min(740px, 61vw);
  display: flex;
  justify-content: flex-end;
  margin-top: 3px;
}

.universe-cta .secondary-btn {
  margin: 0;
  border-color: rgba(127, 159, 199, .3);
  background: rgba(3, 7, 13, .7);
  color: #c7d4e4;
  box-shadow: 0 18px 52px rgba(0, 0, 0, .24);
}

.universe-cta .secondary-btn span {
  color: var(--universe-blue);
}

.universe-section .signal-strip {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 126px;
  border-color: rgba(123, 148, 181, .16);
  background: rgba(2, 5, 10, .78);
  backdrop-filter: none;
}

.universe-section .signal-strip > div {
  border-color: rgba(123, 148, 181, .14);
}

.universe-section .signal-strip small {
  color: rgba(139, 157, 180, .6);
}

.universe-section .signal-strip strong {
  color: #dbe5f1;
  font-family: Inter, system-ui, sans-serif;
  font-weight: 400;
}

.universe-section .signal-strip > div > span {
  color: rgba(126, 167, 219, .78);
}

@media (max-width: 1000px) {
  .universe-section { min-height: 1340px; }
  .universe-heading,
  .universe-category-cloud,
  .universe-cta { width: min(780px, 78vw); }
  .universe-heading { align-items: flex-start; }
  .universe-heading > p { margin-left: auto; }
  .universe-category-cloud { margin-top: 34px; }
  .universe-section .signal-strip > div { padding-inline: 22px; }
}

@media (max-width: 680px) {
  .universe-section {
    height: auto;
    min-height: 1120px;
    background: var(--universe-void);
  }
  .universe-stage {
    position: relative;
    height: auto;
    min-height: 1120px;
  }
  .universe-stage::before {
    background:
      linear-gradient(180deg, rgba(1, 3, 8, .16), rgba(1, 3, 8, .58) 47%, #010308 79%),
      url("../assets/space/chapter-two-galaxy-fallback.webp") 61% 7% / auto 64% no-repeat;
    opacity: .9;
    transform: none;
  }
  .universe-atmosphere {
    background: linear-gradient(180deg, transparent 20%, rgba(1, 3, 8, .78) 61%, #010308 86%);
  }
  .universe-intro {
    height: auto;
    min-height: 994px;
    padding: 112px 22px 174px;
    justify-content: flex-end;
  }
  .universe-heading,
  .universe-category-cloud,
  .universe-cta { width: 100%; }
  .universe-heading {
    display: block;
  }
  .universe-heading h2 {
    max-width: 520px;
    margin-top: 20px;
    font-size: clamp(42px, 12.5vw, 59px);
  }
  .universe-heading > p {
    width: min(310px, 90%);
    margin: 22px 0 0;
  }
  .universe-category-cloud {
    gap: 6px;
    margin-top: 28px;
    padding: 16px 0;
    background: rgba(1, 3, 8, .48);
  }
  .universe-category-cloud span {
    padding: 6px 8px;
    font-size: 7px;
  }
  .universe-category-cloud span:nth-child(n + 17) { display: none; }
  .universe-cta { justify-content: flex-start; }
  .universe-cta .secondary-btn { margin-top: 0; }
  .universe-section .signal-strip {
    min-height: 126px;
    grid-template-columns: repeat(2, 1fr);
  }
  .universe-section .signal-strip > div {
    min-height: 63px;
    padding: 10px 15px;
  }
  .universe-section .signal-strip strong { font-size: 22px; }
  .universe-section .signal-strip > div:nth-child(3) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .universe-section {
    height: auto;
    min-height: 100svh;
  }
  .universe-stage {
    position: relative;
    min-height: 100svh;
  }
  .universe-stage::before { transition: none; }
  .universe-heading,
  .universe-category-cloud,
  .universe-cta,
  .universe-section .signal-strip {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    clip-path: none !important;
  }
}
