:root {
  --night-top: #141f45;
  --night-mid: #3d295f;
  --twilight: #87405e;
  --sunset: #e38b63;
  --ground: #0a0d17;
  --text-main: #f7f8ff;
  --text-soft: #c7cce3;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Oxanium", "Segoe UI", sans-serif;
  color: var(--text-main);
  background: linear-gradient(180deg, var(--night-top) 0%, var(--night-mid) 44%, var(--twilight) 72%, var(--sunset) 100%);
  overflow: hidden;
}

.background-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.stars {
  background-image:
    radial-gradient(2px 2px at 12% 18%, rgba(255, 255, 255, 0.9), transparent 70%),
    radial-gradient(2px 2px at 24% 32%, rgba(255, 255, 255, 0.75), transparent 70%),
    radial-gradient(1px 1px at 36% 8%, rgba(255, 255, 255, 0.8), transparent 70%),
    radial-gradient(2px 2px at 58% 24%, rgba(255, 255, 255, 0.75), transparent 70%),
    radial-gradient(1px 1px at 69% 12%, rgba(255, 255, 255, 0.9), transparent 70%),
    radial-gradient(2px 2px at 82% 31%, rgba(255, 255, 255, 0.75), transparent 70%),
    radial-gradient(1px 1px at 93% 17%, rgba(255, 255, 255, 0.7), transparent 70%);
  opacity: 0.6;
  animation: sky-drift 48s linear infinite;
}

.stars::before,
.stars::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow:
    0 0 10px rgba(255, 255, 255, 0.95),
    0 0 22px rgba(176, 204, 255, 0.72);
  animation: twinkle 2.6s ease-in-out infinite;
}

.stars::before {
  top: 14%;
  left: 22%;
}

.stars::after {
  top: 11%;
  right: 20%;
  animation-delay: 1.2s;
}

.sky-glow {
  background:
    radial-gradient(circle at 50% 74%, rgba(255, 184, 132, 0.34), transparent 34%),
    radial-gradient(circle at 15% 92%, rgba(132, 50, 84, 0.42), transparent 42%),
    radial-gradient(circle at 86% 87%, rgba(99, 63, 131, 0.32), transparent 40%);
}

.upper-fade {
  background: linear-gradient(165deg, rgba(3, 8, 23, 0.38) 0%, rgba(9, 16, 37, 0.66) 46%, transparent 48%);
}

.horizon {
  inset: auto 0 0 0;
  height: 42vh;
  background:
    radial-gradient(120% 120% at 50% 100%, rgba(0, 0, 0, 0.15) 8%, rgba(0, 0, 0, 0.75) 60%, rgba(0, 0, 0, 0.95) 100%),
    linear-gradient(180deg, transparent 0%, rgba(6, 10, 21, 0.65) 36%, var(--ground) 100%);
  clip-path: polygon(0 58%, 8% 56%, 14% 52%, 23% 58%, 30% 50%, 37% 58%, 46% 54%, 52% 60%, 60% 52%, 68% 59%, 76% 50%, 82% 56%, 91% 52%, 100% 57%, 100% 100%, 0 100%);
}

.launch-page {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px 58px;
}

.launch-console {
  width: min(1220px, 100%);
  text-align: center;
}

.mission-mark {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 22px;
  border-radius: 50%;
  border: 2px solid rgba(247, 248, 255, 0.8);
  display: grid;
  place-items: center;
  color: #f7f8ff;
  background: radial-gradient(circle at 35% 26%, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.06));
}

.orbital-ring {
  position: absolute;
  width: 156px;
  height: 34px;
  border: 2px solid rgba(247, 248, 255, 0.72);
  border-radius: 999px;
  transform: rotate(-28deg);
}

.mark-text {
  font-family: "Cinzel", Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: #d6dbef;
  font-size: 0.72rem;
}

h1 {
  margin: 14px 0 20px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: clamp(1.4rem, 2.9vw, 2.5rem);
  color: #ffffff;
}

.mega-countdown {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end;
  justify-items: center;
  gap: clamp(4px, 1.4vw, 14px);
}

.mega-slot {
  min-width: 0;
}

.mega-value {
  display: block;
  font-family: "Oxanium", "Segoe UI", sans-serif;
  font-size: clamp(2.7rem, 13vw, 10rem);
  line-height: 0.92;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #ffffff;
  text-shadow:
    0 0 16px rgba(255, 197, 141, 0.38),
    0 10px 28px rgba(12, 10, 20, 0.52);
}

.sep {
  font-size: clamp(2rem, 9vw, 7rem);
  line-height: 1;
  font-weight: 300;
  color: rgba(255, 236, 219, 0.92);
  margin-bottom: clamp(10px, 2vw, 24px);
}

.mega-label {
  display: block;
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-soft);
  font-size: clamp(0.68rem, 1.35vw, 1.2rem);
}

.status {
  margin: 20px 0 0;
  color: #ffe8d7;
  font-size: clamp(0.85rem, 1.7vw, 1.05rem);
}

@keyframes sky-drift {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-14px);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.75);
  }
  50% {
    opacity: 1;
    transform: scale(1.25);
  }
}

@media (max-width: 860px) {
  .mission-mark {
    width: 100px;
    height: 100px;
  }

  .orbital-ring {
    width: 130px;
  }

  .mega-countdown {
    grid-template-columns: 1fr auto 1fr;
    grid-template-areas:
      "days s1 hours"
      "minutes s2 seconds";
    row-gap: 14px;
  }

  .mega-slot:nth-of-type(1) {
    grid-area: days;
  }

  .mega-slot:nth-of-type(2) {
    grid-area: hours;
  }

  .mega-slot:nth-of-type(3) {
    grid-area: minutes;
  }

  .mega-slot:nth-of-type(4) {
    grid-area: seconds;
  }

  .sep:nth-of-type(1) {
    grid-area: s1;
  }

  .sep:nth-of-type(2) {
    grid-area: s2;
  }

  .sep:nth-of-type(3) {
    display: none;
  }

  .mega-value {
    font-size: clamp(2.6rem, 18vw, 6rem);
  }
}

@media (max-width: 520px) {
  body {
    overflow-y: auto;
  }

  .launch-page {
    padding-top: 18px;
  }

  .mission-mark {
    margin-bottom: 16px;
  }

  .kicker {
    letter-spacing: 0.18em;
  }

  .sep {
    margin-bottom: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stars {
    animation: none;
  }

  .stars::before,
  .stars::after {
    animation: none;
  }
}
