:root {
  --space: #02081a;
  --space-accent: #0b173d;
  --text-main: #f7f9ff;
  --text-soft: #a9b4d9;
  --sunshine: #ffd166;
  --highlight: #7dd3fc;
  --panel-border: rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 20%, rgba(58, 105, 180, 0.15), transparent 45%),
    radial-gradient(circle at 80% 0%, rgba(33, 74, 165, 0.18), transparent 55%),
    #01030f;
  color: var(--text-main);
  overflow-y: scroll;
  overscroll-behavior-y: contain;
  font-family: "Montserrat", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont,
    "Helvetica Neue", sans-serif;
}

h1,
h2 {
  font-family: "Alfa Slab One", "Montserrat", sans-serif;
  letter-spacing: 0.02em;
}

main {
  display: flex;
  flex-direction: column;
  scroll-snap-type: y mandatory;
}

.panel {
  position: relative;
  min-height: 100svh;
  padding: clamp(4rem, 10vw, 7rem) 1.75rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  gap: 3rem;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  border-bottom: 1px solid var(--panel-border);
  text-align: center;
  overflow: hidden;
}

.hero h1 {
  font-size: clamp(4rem, 14vw, 7rem);
  margin: 0;
}

.hero .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.85rem;
  color: var(--text-soft);
  margin: 0 0 1rem;
}

.text-block h2 {
  margin: 0 0 1rem;
  font-size: clamp(2.6rem, 8vw, 4.6rem);
}

.text-block p {
  margin: 0;
  font-size: clamp(1.35rem, 4.5vw, 1.85rem);
  color: var(--text-soft);
  line-height: 1.65;
}

.text-block {
  max-width: 640px;
  margin: 0 auto;
  min-height: auto;
  width: min(90vw, 680px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.5rem;
  position: relative;
  z-index: 2;
  order: 1;
}

.text-block[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.9s ease;
}

.text-block[data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal] .word {
  display: inline-block;
  white-space: nowrap;
}

[data-reveal] .char {
  display: inline-block;
  color: inherit;
  font: inherit;
  opacity: 0;
  transform: translateY(45%);
  transition:
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.55s ease;
  transition-delay: calc(var(--char-index) * 30ms);
}

[data-reveal].is-revealed .char {
  opacity: 1;
  transform: translateY(0);
}

.sunshine {
  color: var(--sunshine);
}

.highlight {
  color: var(--sunshine);
  font-weight: 700;
}

.media-panel {
  text-align: center;
}

figure {
  margin: 0;
  position: relative;
  margin-top: clamp(0rem, 1vw, 0.5rem);
  margin-bottom: clamp(3rem, 8vw, 5.5rem);
  display: flex;
  justify-content: center;
  z-index: 1;
  order: 2;
}

.orb {
  width: min(110vw, 520px);
  height: min(110vw, 520px);
  max-height: 50vh;
  display: grid;
  place-items: center;
  position: relative;
  margin: 0 auto;
}

.orb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: relative;
  z-index: 0;
  filter: none;
  -webkit-mask-image: radial-gradient(circle, rgba(0, 0, 0, 1) 60%, rgba(0, 0, 0, 0) 95%);
  mask-image: radial-gradient(circle, rgba(0, 0, 0, 1) 60%, rgba(0, 0, 0, 0) 95%);
}

.orb-wide {
  width: min(85vw, 420px);
  max-height: 45vh;
  margin: 2rem auto 0;
}

.orb-wide img {
  border-radius: 50%;
}

.metric {
  font-size: clamp(1.2rem, 4.5vw, 1.65rem);
  color: var(--sunshine);
  font-weight: 600;
}

.orbit-carousel {
  width: min(95vw, 960px);
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding: 0 1.5rem 1.25rem 1.5rem;
  margin: 0 auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  justify-content: flex-start;
  scroll-padding-left: 1.5rem;
}

.orbit-carousel::-webkit-scrollbar {
  display: none;
}

.orbit-card {
  min-width: clamp(240px, 70vw, 320px);
  min-height: clamp(260px, 55vw, 360px);
  padding: 2.25rem;
  border-radius: 32px;
  background: rgba(3, 7, 26, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  scroll-snap-align: center;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}

#section-orbits {
  justify-content: center;
  align-items: center;
  gap: clamp(2rem, 6vw, 3.75rem);
  overflow: visible;
}

.panel-aiy {
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: clamp(2rem, 6vw, 3.5rem);
}

.aiy-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1rem, 4vw, 2rem);
}

.aiy-line {
  margin: 0;
  font-family: "Shadows Into Light", "Comic Sans MS", cursive;
  font-size: clamp(3rem, 12vw, 8rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.aiy-red {
  color: #ff6b81;
  text-shadow: 0 10px 30px rgba(255, 107, 129, 0.35);
}

.aiy-blue {
  color: #5ecbff;
  text-shadow: 0 10px 30px rgba(94, 203, 255, 0.4);
}

.aiy-play {
  border: none;
  border-radius: 999px;
  padding: 0.85rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(120deg, #ff6b81, #5ecbff);
  color: #01030f;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35);
}

.aiy-play:focus-visible {
  outline: 2px solid #ffd166;
  outline-offset: 4px;
}

.aiy-play:hover {
  transform: translateY(-4px) scale(1.02);
}

#aiy-audio {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.orbit-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 24px;
  border: 1px dashed rgba(125, 211, 252, 0.45);
  opacity: 0.5;
}

.orbit-card__date {
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.75rem;
  color: var(--text-soft);
  margin-bottom: 0.75rem;
}

.orbit-card__title {
  font-size: 1.4rem;
  margin: 0 0 0.65rem;
  color: var(--sunshine);
}

.orbit-card__note {
  margin: 0;
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 1.4;
}

.hero .orb,
#section-night .orb,
#section-moon .orb {
  margin-right: auto;
  margin-left: auto;
  width: min(90vw, 430px);
  height: min(90vw, 430px);
}

.particle-field {
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.55) 1px, transparent 1px),
    radial-gradient(rgba(125, 211, 252, 0.4) 1px, transparent 1px);
  background-size: 120px 120px, 70px 70px;
  background-position: 0 0, 35px 45px;
  opacity: 0.6;
  animation: drift 75s linear infinite;
  pointer-events: none;
  z-index: 0;
}

.particle-field::before,
.particle-field::after {
  content: "";
  position: absolute;
  inset: -20%;
  background-repeat: repeat;
  opacity: 0.35;
  animation: twinkle 9s ease-in-out infinite;
}

.particle-field::before {
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.4) 1.2px, transparent 1.2px),
    radial-gradient(rgba(125, 211, 252, 0.35) 0.8px, transparent 0.8px);
  background-size: 180px 180px, 140px 140px;
  animation-duration: 12s;
}

.particle-field::after {
  background-image: radial-gradient(rgba(255, 255, 255, 0.6) 2px, transparent 2px);
  background-size: 90px 90px;
  animation-direction: reverse;
}

.particle-field::before,
.particle-field::after {
  mix-blend-mode: screen;
}

.particle-field::after {
  box-shadow:
    20vw 10vh rgba(255, 255, 255, 0.8),
    60vw 30vh rgba(125, 211, 252, 0.7),
    80vw 70vh rgba(255, 255, 255, 0.65),
    10vw 60vh rgba(125, 211, 252, 0.6),
    40vw 50vh rgba(255, 255, 255, 0.6);
}

main {
  position: relative;
  z-index: 1;
}

[data-roll] {
  transform: translateY(80px) scale(0.9) rotate(8deg);
  opacity: 0;
  transition:
    transform 1.1s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 1.1s ease,
    filter 1.1s ease;
  filter: blur(6px);
}

[data-roll].is-visible {
  transform: translateY(0) scale(1) rotate(0);
  opacity: 1;
  filter: blur(0);
}

.finale .text-block {
  max-width: 560px;
}

.binary-system {
  position: relative;
  width: min(80vw, 360px);
  aspect-ratio: 1 / 1;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.star {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  --orbit-radius: clamp(60px, 14vw, 110px);
  transform-origin: center;
  animation: orbit-duo 6s linear infinite;
  filter: drop-shadow(0 0 18px rgba(255, 255, 255, 0.4));
}

.star-red {
  background: radial-gradient(circle, #ff8fa3, #ff3355 60%, #990022 100%);
}

.star-blue {
  background: radial-gradient(circle, #7dd3fc, #0077ff 70%, #012c78 100%);
}

.star-red {
  animation-delay: 0s;
}

.star-blue {
  animation-delay: -3s;
}

@keyframes drift {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-120px);
  }
}

@keyframes twinkle {
  0% {
    opacity: 0.2;
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    opacity: 0.6;
    transform: translate3d(15px, -10px, 0) scale(1.05);
  }
  100% {
    opacity: 0.2;
    transform: translate3d(-5px, 10px, 0) scale(1);
  }
}

@keyframes orbit-duo {
  from {
    transform: rotate(0deg) translateX(var(--orbit-radius));
  }
  to {
    transform: rotate(360deg) translateX(var(--orbit-radius));
  }
}

@media (min-width: 768px) {
  .panel {
    padding: 6rem clamp(4rem, 9vw, 8rem) 4rem;
    text-align: center;
  }

  .text-block {
    max-width: 640px;
  }

  .orb {
    width: min(40vw, 460px);
    height: min(40vw, 460px);
  }

  .binary-system {
    width: 440px;
  }
}
