:root {
  --navy: #081b2a;
  --navy-deep: #040e17;
  --bronze: #a66a3f;
  --bronze-light: #d49a63;
  --bronze-glow: #e7b684;
  --ivory: #f4f0e8;
  --ivory-dim: rgba(244, 240, 232, 0.7);
  --ivory-faint: rgba(244, 240, 232, 0.45);
  --rule: rgba(212, 154, 99, 0.24);
  --sans: 'Avenir Next', 'Segoe UI Variable Display', 'Segoe UI', system-ui, -apple-system,
    Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Code', Menlo, Consolas, monospace;
  /* Pointer parallax, set from main.js. */
  --px: 0;
  --py: 0;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--navy-deep);
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse 70% 55% at 50% 38%, rgba(18, 59, 90, 0.55), transparent 70%),
    radial-gradient(ellipse 50% 40% at 85% 100%, rgba(166, 106, 63, 0.12), transparent 70%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  background-attachment: fixed;
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--bronze);
  color: var(--ivory);
}

/* ---------- Backdrop ---------- */

.stars,
.orbits {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.stars {
  transform: translate(calc(var(--px) * -8px), calc(var(--py) * -8px));
}

.orbits {
  transform: translate(calc(var(--px) * -18px), calc(var(--py) * -18px));
  opacity: 0;
  animation: fade 2.4s 0.3s ease-out forwards;
}

.orbit {
  fill: none;
  stroke: var(--bronze-light);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.orbit--inner {
  opacity: 0.16;
  stroke-dasharray: 2 10;
}

.orbit--mid {
  opacity: 0.22;
}

.orbit--outer {
  opacity: 0.08;
}

/* ---------- Layout ---------- */

.wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.75rem;
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ivory);
  text-decoration: none;
}

.mark img {
  width: 44px;
  height: auto;
}

.mark span {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.34em;
}

.mark b {
  color: var(--bronze-light);
  font-weight: 600;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: rgba(8, 27, 42, 0.5);
  backdrop-filter: blur(6px);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ivory-dim);
}

.pulse {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bronze-glow);
}

.pulse::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--bronze-glow);
  animation: ping 2.4s ease-out infinite;
}

/* ---------- Hero ---------- */

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 2.5rem;
  padding-bottom: 3.5rem;
}

.planet {
  width: min(460px, 82vw);
  margin-bottom: 1.25rem;
  transform: translate(calc(var(--px) * 10px), calc(var(--py) * 10px));
}

.planet svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 30px 60px rgba(0, 8, 20, 0.6))
    drop-shadow(0 0 70px rgba(166, 106, 63, 0.18));
  animation:
    rise 1.4s cubic-bezier(0.2, 0.7, 0.2, 1) both,
    drift 9s 1.4s ease-in-out infinite;
}

.glint {
  stroke-dasharray: 60 420;
  stroke-dashoffset: 480;
  animation: glint 6s 1.6s ease-in-out infinite;
}

.moon {
  transform-box: fill-box;
  transform-origin: center;
  animation: moon 5s ease-in-out infinite;
}

.eyebrow {
  margin: 0 0 1rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--bronze-light);
  animation: rise 1s 0.35s both;
}

h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2.6rem, 8vw, 5.4rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.035em;
  animation: rise 1s 0.45s both;
}

h1 em {
  font-style: normal;
  background: linear-gradient(120deg, #f4d2a8 0%, var(--bronze-light) 40%, var(--bronze) 75%, #7a4526 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  margin: 0 auto;
  max-width: 34rem;
  color: var(--ivory-dim);
  font-size: clamp(1.02rem, 2.4vw, 1.18rem);
  animation: rise 1s 0.55s both;
}

.craft {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin: 2.25rem 0 0;
  padding: 0;
  list-style: none;
  animation: rise 1s 0.65s both;
}

.craft li {
  padding: 0.45rem 1rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: rgba(8, 27, 42, 0.45);
  font-size: 0.85rem;
  color: var(--ivory-dim);
  transition:
    border-color 0.3s,
    color 0.3s;
}

.craft li:hover {
  border-color: var(--bronze-light);
  color: var(--ivory);
}

.telemetry {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 2rem;
  margin: 2.75rem 0 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  animation: rise 1s 0.75s both;
}

.telemetry div {
  display: flex;
  gap: 0.6rem;
}

.telemetry dt {
  color: var(--ivory-faint);
}

.telemetry dd {
  margin: 0;
  color: var(--ivory-dim);
  font-variant-numeric: tabular-nums;
}

/* ---------- Footer ---------- */

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-top: 1.5rem;
  padding-bottom: 2rem;
  font-size: 0.85rem;
  color: var(--ivory-dim);
}

.foot::before {
  content: '';
  position: absolute;
  top: 0;
  left: 1.25rem;
  right: 1.25rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--rule) 15%, var(--rule) 85%, transparent);
}

.foot p {
  margin: 0;
}

.legal strong {
  color: var(--ivory);
  font-weight: 600;
}

.copy {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ivory-faint);
}

/* ---------- Motion ---------- */

@keyframes fade {
  to {
    opacity: 1;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

@keyframes drift {
  50% {
    transform: translateY(-10px) rotate(-1deg);
  }
}

@keyframes moon {
  50% {
    transform: scale(1.07);
  }
}

@keyframes glint {
  0% {
    stroke-dashoffset: 480;
  }
  60%,
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes ping {
  0% {
    transform: scale(0.6);
    opacity: 0.9;
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

@media (max-width: 560px) {
  .mark span {
    font-size: 0.82rem;
    letter-spacing: 0.26em;
  }

  .mark img {
    width: 36px;
  }

  .telemetry {
    gap: 0.4rem 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .orbits {
    opacity: 1;
  }

  .comet {
    display: none;
  }

  .glint {
    stroke-dasharray: none;
  }
}

.nowrap {
  white-space: nowrap;
}
