/* Helio-3 The Moon — public page
   Tokens from game design.md: void #000, ink #FFF, pixel type, no accents yet. */

@font-face {
  font-family: "Silkscreen";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/Silkscreen-Regular.ttf") format("truetype");
}

:root {
  --void: #000000;
  --ink: #ffffff;
  --muted: rgba(255, 255, 255, 0.55);
  --hair: rgba(255, 255, 255, 0.18);
  --font: "Silkscreen", ui-monospace, monospace;
  --wrap: min(720px, 90vw);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--void);
  image-rendering: pixelated;
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: unset;
}

::selection {
  background: var(--ink);
  color: var(--void);
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover { opacity: 0.75; }

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

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--ink);
  opacity: 0.35;
  animation: twinkle 3.6s steps(2, end) infinite;
}
.star:nth-child(odd) { animation-duration: 4.8s; animation-delay: -1.2s; }
.star:nth-child(3n) { width: 1px; height: 1px; opacity: 0.55; }

@keyframes twinkle {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.85; }
}

.site-nav,
main {
  position: relative;
  z-index: 1;
}
.site-foot {
  position: relative;
  z-index: 5;
  background: var(--void);
}

.wrap {
  width: var(--wrap);
  margin-inline: auto;
}

.site-nav {
  padding: 1.1rem 0 0;
}

.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
  letter-spacing: 0.02em;
}
.brand:hover { opacity: 1; }
.brand-ver {
  color: var(--muted);
  font-size: 12px;
}

.nav-tools {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--hair);
}
.lang-toggle button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  padding: 0.35rem 0.55rem;
  cursor: pointer;
}
.lang-toggle button[aria-pressed="true"] {
  color: var(--void);
  background: var(--ink);
}

.luipy-out {
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
}
.luipy-out:hover { color: var(--ink); opacity: 1; }

.hero {
  min-height: calc(100vh - 4.5rem);
  display: grid;
  align-content: center;
  padding: 2.5rem 0 3.5rem;
  gap: 1.75rem;
}

.hero-stage {
  display: grid;
  justify-items: center;
  gap: 1.5rem;
  text-align: center;
}

#regolith {
  position: fixed;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  image-rendering: pixelated;
}

.moon-figure {
  width: min(232px, 52vw);
  height: auto;
  margin: 0;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
.moon-figure:focus {
  outline: none;
}
.moon-figure:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 6px;
}
.moon-figure img {
  /* Bob + shake via moon-fx.js */
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  -ms-interpolation-mode: nearest-neighbor;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

.prompt {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}
.cursor-blink {
  display: inline-block;
  width: 0.55em;
  background: var(--ink);
  color: transparent;
  animation: blink 1.05s steps(1, end) infinite;
}
@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.brand-hero {
  margin: 0;
  font-size: clamp(28px, 7vw, 40px);
  line-height: 1.15;
  letter-spacing: 0.02em;
  font-weight: 400;
}

.hero-lead {
  margin: 0;
  max-width: 34rem;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 0.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.4rem;
  padding: 0.45rem 1rem;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--void);
  font: inherit;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { opacity: 0.88; }
.btn.secondary {
  background: transparent;
  color: var(--ink);
}
.btn.secondary:hover { background: rgba(255, 255, 255, 0.08); opacity: 1; }

.section {
  padding: 2.75rem 0;
  border-top: 1px solid var(--hair);
}

.section-head h2 {
  margin: 0 0 0.55rem;
  font-size: 20px;
  font-weight: 400;
}
.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  max-width: 36rem;
}

.loop-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.1rem;
}
.loop-list li {
  display: grid;
  gap: 0.25rem;
  padding: 0;
  border: 0;
  background: transparent;
}
.loop-kicker {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.loop-list h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 400;
}
.loop-list p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.sibling {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
}
.sibling p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  max-width: 28rem;
}

.site-foot {
  border-top: 1px solid var(--hair);
  padding: 1.35rem 0 2rem;
  /* z-index + background set above so sand sits on the foot edge */
}
.site-foot-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  font-size: 12px;
  color: var(--muted);
}
.site-foot a {
  color: var(--muted);
  text-decoration: none;
}
.site-foot a:hover { color: var(--ink); }

.enter {
  opacity: 0;
  transform: translateY(8px);
  animation: enter 0.55s var(--ease) forwards;
  animation-delay: calc(var(--enter, 0) * 70ms);
}
@keyframes enter {
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .moon-figure,
  .moon-figure img,
  .star,
  .cursor-blink,
  .enter {
    animation: none !important;
  }
  .enter { opacity: 1; transform: none; }
}

@media (max-width: 520px) {
  .brand-hero { font-size: 26px; }
  .hero { padding-top: 1.75rem; }
}
