:root {
  --night: #04050a;
  --night-blue: #081324;
  --ink: #effff9;
  --muted: rgba(214, 226, 245, 0.68);
  --dim: rgba(214, 226, 245, 0.4);
  --teal: #7cf6d0;
  --teal-bright: #9ff8dc;
  --line: rgba(124, 246, 208, 0.22);
  --pointer-x: 0px;
  --pointer-y: 0px;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--night);
  scroll-behavior: smooth;
}

body {
  min-height: 100svh;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  background: var(--night);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

[data-copy] {
  display: none;
}

html[lang="en"] [data-copy="en"],
html[lang="ru"] [data-copy="ru"],
html[lang="es"] [data-copy="es"],
html[lang="fr"] [data-copy="fr"],
html[lang="de"] [data-copy="de"],
html[lang="pt"] [data-copy="pt"] {
  display: inline;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.8rem;
  color: var(--night);
  background: var(--teal);
  border-radius: 0.25rem;
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.sky,
.horizon {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.sky {
  z-index: 0;
  opacity: 0.8;
  background-image:
    radial-gradient(circle at 8% 15%, rgba(214, 243, 255, 0.8) 0 1px, transparent 1.5px),
    radial-gradient(circle at 19% 63%, rgba(124, 246, 208, 0.55) 0 1px, transparent 1.5px),
    radial-gradient(circle at 36% 22%, rgba(214, 243, 255, 0.55) 0 1px, transparent 1.5px),
    radial-gradient(circle at 57% 9%, rgba(214, 243, 255, 0.7) 0 1px, transparent 1.5px),
    radial-gradient(circle at 73% 30%, rgba(124, 246, 208, 0.45) 0 1px, transparent 1.5px),
    radial-gradient(circle at 91% 17%, rgba(214, 243, 255, 0.65) 0 1px, transparent 1.5px),
    radial-gradient(circle at 84% 68%, rgba(214, 243, 255, 0.45) 0 1px, transparent 1.5px),
    radial-gradient(circle at 48% 57%, rgba(214, 243, 255, 0.4) 0 1px, transparent 1.5px),
    radial-gradient(circle at 28% 82%, rgba(124, 246, 208, 0.35) 0 1px, transparent 1.5px);
}

.horizon {
  z-index: 0;
  background:
    radial-gradient(82% 58% at 50% 108%, rgba(27, 79, 122, 0.55) 0%, rgba(10, 23, 48, 0.62) 45%, transparent 78%),
    linear-gradient(180deg, transparent 55%, rgba(3, 8, 17, 0.2) 100%);
}

.site-header,
.site-footer {
  position: fixed;
  z-index: 20;
  right: max(1.5rem, env(safe-area-inset-right));
  left: max(1.5rem, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  text-transform: uppercase;
}

.site-header {
  top: max(1.5rem, env(safe-area-inset-top));
}

.mini-mark {
  display: inline-flex;
  gap: 0.7rem;
  align-items: center;
  color: rgba(239, 255, 249, 0.76);
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.18em;
  text-decoration: none;
}

.mini-mark__signal {
  width: 0.42rem;
  height: 0.42rem;
  border: 1px solid var(--teal);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(124, 246, 208, 0.42);
  animation: signal 3.2s ease-out infinite;
}

.language-picker {
  position: relative;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
}

.language-picker details {
  position: relative;
}

.language-picker summary {
  display: flex;
  min-width: 3.55rem;
  min-height: 2.5rem;
  gap: 0.7rem;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(124, 246, 208, 0.22);
  border-radius: 999px;
  color: var(--teal-bright);
  background: rgba(4, 12, 20, 0.64);
  list-style: none;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.language-picker summary::-webkit-details-marker {
  display: none;
}

.language-picker summary:hover {
  border-color: rgba(124, 246, 208, 0.48);
}

.language-picker summary:focus-visible,
.language-picker button:focus-visible,
.mini-mark:focus-visible {
  outline: 1px solid var(--teal);
  outline-offset: 0.35rem;
}

.language-picker__chevron {
  width: 0.38rem;
  height: 0.38rem;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: translateY(-0.1rem) rotate(45deg);
  transition: transform 180ms ease;
}

.language-picker details[open] .language-picker__chevron {
  transform: translateY(0.1rem) rotate(225deg);
}

.language-picker__menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 0.65rem);
  right: 0;
  width: 12rem;
  padding: 0.38rem;
  border: 1px solid rgba(124, 246, 208, 0.2);
  border-radius: 0.65rem;
  background: rgba(5, 13, 23, 0.96);
  box-shadow: 0 1.2rem 3rem rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(18px);
}

.language-picker__menu button {
  display: grid;
  width: 100%;
  min-height: 2.55rem;
  grid-template-columns: 2.25rem 1fr;
  gap: 0.7rem;
  align-items: center;
  padding: 0.45rem 0.7rem;
  border: 0;
  border-radius: 0.4rem;
  color: rgba(239, 255, 249, 0.68);
  background: transparent;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0;
  text-align: left;
  cursor: pointer;
}

.language-picker__menu button:hover {
  color: var(--ink);
  background: rgba(124, 246, 208, 0.07);
}

.language-picker__menu button[aria-pressed="true"] {
  color: var(--teal-bright);
  background: rgba(124, 246, 208, 0.1);
}

.language-picker__code {
  color: var(--teal);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
}

.landing {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: 100svh;
  place-items: start center;
  overflow: hidden;
}

.hero {
  position: relative;
  z-index: 10;
  width: min(43rem, calc(100% - 3rem));
  margin-top: clamp(7.5rem, 16svh, 10rem);
  text-align: center;
  animation: rise-in 1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.eyebrow,
.era,
.status,
.choice-note,
.site-footer {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 1.25rem;
  color: var(--dim);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
}

h1 {
  margin: 0;
  color: var(--ink);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: clamp(3.4rem, 8.8vw, 7.8rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: 0.21em;
  text-indent: 0.21em;
  text-shadow: 0 0 42px rgba(124, 246, 208, 0.18);
}

.era {
  display: grid;
  grid-template-columns: minmax(1.6rem, 4.5rem) auto auto auto minmax(1.6rem, 4.5rem);
  gap: 0.8rem;
  align-items: center;
  justify-content: center;
  margin-top: 1.25rem;
  color: var(--teal);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
}

.era__dash {
  color: rgba(124, 246, 208, 0.46);
}

.era__line {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124, 246, 208, 0.55));
}

.era__line--reverse {
  transform: rotate(180deg);
}

.tagline {
  margin: clamp(1.5rem, 3.4svh, 2.4rem) 0 0;
  color: rgba(239, 255, 249, 0.9);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 2.6vw, 2.05rem);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.premise {
  max-width: 32rem;
  margin: 1.25rem auto 0;
  color: var(--muted);
  font-size: clamp(0.9rem, 1.35vw, 1.02rem);
  line-height: 1.7;
}

.status {
  display: inline-flex;
  gap: 0.7rem;
  align-items: center;
  margin: 1.5rem 0 0;
  padding: 0.7rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: rgba(239, 255, 249, 0.74);
  background: rgba(4, 12, 20, 0.56);
  box-shadow: inset 0 0 20px rgba(124, 246, 208, 0.03);
  font-size: 0.62rem;
  letter-spacing: 0.13em;
  backdrop-filter: blur(8px);
}

.status__dot {
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 10px rgba(124, 246, 208, 0.78);
}

.planet-stage {
  position: absolute;
  z-index: 2;
  bottom: clamp(-34rem, -41vw, -18rem);
  left: 50%;
  width: clamp(43rem, 72vw, 68rem);
  aspect-ratio: 1;
  transform: translate3d(calc(-50% + var(--pointer-x)), var(--pointer-y), 0);
  transition: transform 800ms cubic-bezier(0.16, 1, 0.3, 1);
  animation: planet-in 1.4s 0.18s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.planet-glow {
  position: absolute;
  inset: 15%;
  border-radius: 50%;
  background: rgba(51, 142, 186, 0.18);
  box-shadow: 0 0 110px 45px rgba(61, 163, 196, 0.15);
  filter: blur(18px);
}

.planet {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 -16px 38px rgba(124, 246, 208, 0.08));
}

.continents {
  transform-origin: center;
  animation: continental-drift 42s ease-in-out infinite alternate;
}

.orbit {
  transform-origin: center;
  animation: orbit-shift 24s linear infinite;
}

.satellite {
  filter: drop-shadow(0 0 8px rgba(159, 248, 220, 0.9));
}

.choice-note {
  position: fixed;
  z-index: 12;
  top: 50%;
  right: max(1.5rem, env(safe-area-inset-right));
  display: flex;
  gap: 0.7rem;
  align-items: center;
  color: var(--dim);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  writing-mode: vertical-rl;
  transform: translateY(-50%);
}

.choice-note__rule {
  width: 1px;
  height: 2.6rem;
  background: linear-gradient(180deg, transparent, var(--line), transparent);
}

.site-footer {
  bottom: max(1.35rem, env(safe-area-inset-bottom));
  color: rgba(214, 226, 245, 0.32);
  font-size: 0.56rem;
  letter-spacing: 0.15em;
}

@keyframes signal {
  0% { box-shadow: 0 0 0 0 rgba(124, 246, 208, 0.42); }
  55%, 100% { box-shadow: 0 0 0 0.65rem rgba(124, 246, 208, 0); }
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(1.5rem); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes planet-in {
  from { opacity: 0; transform: translate3d(-50%, 5rem, 0) scale(0.92); }
  to { opacity: 1; transform: translate3d(calc(-50% + var(--pointer-x)), var(--pointer-y), 0) scale(1); }
}

@keyframes continental-drift {
  from { transform: translateX(-8px); }
  to { transform: translateX(12px); }
}

@keyframes orbit-shift {
  to { stroke-dashoffset: -770; }
}

@media (max-width: 720px) {
  .site-header,
  .site-footer {
    right: max(1.1rem, env(safe-area-inset-right));
    left: max(1.1rem, env(safe-area-inset-left));
  }

  .site-header {
    top: max(1.1rem, env(safe-area-inset-top));
  }

  .hero {
    width: min(100% - 2rem, 35rem);
    margin-top: clamp(6.4rem, 12svh, 7.7rem);
  }

  .eyebrow {
    margin-bottom: 1rem;
    font-size: 0.57rem;
  }

  h1 {
    font-size: clamp(2.75rem, 13vw, 4.25rem);
    letter-spacing: 0.16em;
    text-indent: 0.16em;
  }

  .era {
    margin-top: 1rem;
    font-size: 0.58rem;
  }

  .tagline {
    margin-top: 1.4rem;
  }

  .premise {
    max-width: 29rem;
    margin-top: 0.9rem;
    font-size: 0.86rem;
    line-height: 1.55;
  }

  .status {
    margin-top: 1.15rem;
    padding: 0.62rem 0.82rem;
    font-size: 0.54rem;
  }

  .planet-stage {
    bottom: min(-22rem, -60vw);
    width: max(39rem, 142vw);
  }

  .choice-note {
    display: none;
  }

  .site-footer__coordinate {
    display: none;
  }
}

@media (max-height: 720px) {
  .hero {
    margin-top: 5.6rem;
  }

  .tagline {
    margin-top: 1rem;
    font-size: 1.15rem;
  }

  .premise {
    margin-top: 0.7rem;
    font-size: 0.8rem;
    line-height: 1.45;
  }

  .status {
    margin-top: 0.9rem;
  }

  .planet-stage {
    opacity: 0.74;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
