:root {
  color-scheme: dark;
  --canvas: #101010;
  --line: #373737;
  --ink: #f4f4f4;
  --muted: #a6a6a6;
  --curve: cubic-bezier(.2, .7, .25, 1);
  font-family: "Geist", "Inter", system-ui, sans-serif;
  background: var(--canvas);
  color: var(--ink);
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
.motion-enabled:not(.motion-paused) { scroll-behavior: smooth; }
body { margin: 0; }
a { color: inherit; }
button, summary { cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

.symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.page {
  width: min(100% - 80px, 1000px);
  margin-inline: auto;
}

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 76px;
  border-bottom: 1px solid var(--line);
}

.mascot { display: block; margin-inline-start: -4px; }
.masthead a {
  display: grid;
  place-items: center;
  min-height: 44px;
  padding-inline: 4px;
  color: var(--muted);
  font-size: .875rem;
  text-decoration: none;
  transition: color .16s var(--curve);
}

.masthead a:hover { color: var(--ink); }

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 432px;
  padding-block: 48px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-copy { position: relative; z-index: 1; }
.hero h1 {
  margin: 0 0 18px -.064em;
  font-size: clamp(4rem, 11.7vw, 8.1rem);
  line-height: .85;
  font-weight: 680;
  letter-spacing: -.042em;
}

.hero p { margin: 0; color: var(--muted); font-size: clamp(1rem, 2vw, 1.25rem); }

.sky {
  position: absolute;
  z-index: 0;
  inset: 0 0 0 40%;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.orbits {
  display: block;
  width: min(100%, 548px);
  color: #8a8a8a;
}

.snow {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.snow-dust {
  position: absolute;
  inset: -264px 0 0;
  background: url("./snow.svg") repeat;
  opacity: .48;
}

.crystal {
  position: absolute;
  fill: none;
  stroke: #e8e8e8;
  stroke-width: .9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.crystal-high { top: 10%; right: 27%; width: 34px; opacity: .44; }
.crystal-near { top: 17%; right: 1%; width: 72px; opacity: .5; }
.crystal-low { bottom: 10%; left: 45%; width: 52px; opacity: .38; }

.sky-lights { opacity: .75; }
.orbit-motion {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(100%, 548px);
  aspect-ratio: 548 / 328;
  transform: translate(-50%, -50%);
}

.orbit-motion-plane {
  position: absolute;
  left: 48.905%;
  top: 50.305%;
  width: 85.766%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%) rotate(-24deg) scaleY(.355);
}

.orbit-runner { width: 100%; height: 100%; transform: rotate(27deg); }
.orbit-runner svg { display: block; width: 100%; height: 100%; }
.motion-enabled .sky-lights { animation: starlight 7s ease-in-out infinite alternate; }
.motion-enabled .orbit-runner { animation: revolve 14s -3s linear infinite; }
.motion-enabled .snow-dust { animation: snowfall 21s linear infinite; }
.motion-enabled .crystal { animation: drift 8s -2s ease-in-out infinite alternate; }
.motion-enabled .crystal-near { animation-duration: 10s; animation-delay: -6s; }
.motion-enabled .crystal-low { animation-duration: 12s; animation-delay: -4s; }

:is(.motion-paused, .motion-idle) :is(.sky-lights, .orbit-runner, .snow-dust, .crystal) {
  animation-play-state: paused;
}

@keyframes starlight {
  from { opacity: .48; }
  to { opacity: 1; }
}

@keyframes revolve {
  from { transform: rotate(0turn); }
  to { transform: rotate(1turn); }
}

@keyframes snowfall {
  to { transform: translateY(264px); }
}

@keyframes drift {
  from { transform: translate(-6px, -12px) rotate(-12deg); }
  to { transform: translate(10px, 22px) rotate(16deg); }
}

@supports (animation-timeline: view()) {
  .motion-enabled:not(.motion-paused) :is(.section-heading, .download-row, footer):not(:focus-within) {
    animation: unveil linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 90%;
  }

  @keyframes unveil {
    from { opacity: .45; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

.motion-toggle {
  position: absolute;
  z-index: 1;
  inset: auto 0 12px auto;
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  transition: color .16s var(--curve), background-color .16s var(--curve);
}

.motion-toggle:focus-visible { outline-offset: -2px; }
.motion-toggle:hover { background: #252525; color: var(--ink); }
.motion-toggle .motion-play, .motion-paused .motion-pause { display: none; }
.motion-paused .motion-play { display: block; }

.download-section {
  display: grid;
  grid-template-columns: minmax(154px, 1fr) minmax(0, 2.65fr);
  column-gap: 24px;
  padding-block: 36px 32px;
  scroll-margin-top: 20px;
}

.section-heading h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 580;
  letter-spacing: -.025em;
}

.release { margin: 8px 0 0; color: var(--muted); font-size: .875rem; }
.downloads { margin: 0; padding: 0; list-style: none; }
.download-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 16px;
  min-height: 76px;
  border-top: 1px solid var(--line);
  padding-block: 12px;
}

.download-row:last-child { border-bottom: 1px solid var(--line); }
.platform-icon { color: #d5d5d5; width: 24px; height: 24px; }
.platform h3, .platform p { margin: 0; }
.platform h3 { font-size: 1rem; font-weight: 600; }
.platform p, .availability {
  color: var(--muted);
  font-size: .8125rem;
  line-height: 1.4;
}

.platform p { margin-top: 4px; overflow-wrap: anywhere; }
.availability { text-align: end; }

.download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px 0 14px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: var(--ink);
  color: var(--canvas);
  font-size: .875rem;
  font-weight: 630;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .16s var(--curve), border-color .16s var(--curve);
}

.download-link:hover { background: #d8d8d8; border-color: #d8d8d8; }
.download-link .icon { width: 16px; height: 16px; }

footer {
  border-top: 1px solid var(--line);
  padding-block: 12px 24px;
}

summary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  list-style: none;
  font-size: .875rem;
  color: var(--muted);
}

summary::-webkit-details-marker { display: none; }
summary:hover, details[open] summary { color: var(--ink); }
summary .icon { width: 14px; height: 14px; transition: transform .16s var(--curve); }
details[open] summary .icon { transform: rotate(45deg); }
details p {
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.55;
}

@media (max-width: 760px) {
  .page { width: calc(100% - 48px); }
  .hero { min-height: 336px; }
  .sky { left: 46%; }
  .crystal-near { width: 54px; }
  .crystal-low { width: 40px; }
  .download-section { grid-template-columns: 1fr; gap: 16px; padding-block: 28px; }
  .section-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; }
  .release { margin: 0; }
}

@media (max-width: 480px) {
  .page { width: calc(100% - 32px); }
  .masthead { min-height: 60px; }
  .hero { align-items: flex-start; min-height: 312px; padding-block: 44px 104px; }
  .hero h1 { margin-bottom: 14px; }
  .sky { inset: 80px -17% -24px 17%; }
  .orbits { opacity: .83; }
  .crystal-high { top: 9%; right: 8%; width: 22px; }
  .crystal-near { top: auto; bottom: 22%; right: 5%; width: 38px; }
  .crystal-low { bottom: 10%; left: 9%; width: 34px; }
  .download-row { column-gap: 10px; }
  .availability { max-width: 12ch; }
  .download-link { gap: 5px; padding-inline: 9px; }
}

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