/* Minima Space Rex — site styles
   Pixel fonts render crisply only at whole multiples of their design size:
   Ark Pixel 12px → 24 / 36 / 48 / 72px, Fusion Pixel 10px → 20 / 30px. */

@font-face {
  font-family: "Ark Pixel";
  src: url("../fonts/ark-pixel-12.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Fusion Pixel";
  src: url("../fonts/fusion-pixel-10.woff2") format("woff2");
  font-display: swap;
}

:root {
  /* Resurrect 64 */
  --night: #2e222f;
  --dusk: #3e3546;
  --plum: #45293f;
  --navy: #323353;
  --slate: #484a77;
  --mist: #9babb2;
  --grey: #7f708a;
  --text: #c7dcd0;
  --white: #ffffff;
  --gold: #f9c22b;
  --gold-light: #fbff86;
  --gold-dark: #f79617;
  --brass: #cd683d;
  --brass-dark: #9e4539;
  --teal: #30e1b9;
  --parchment: #fdcbb0;
  --parchment-dark: #fca790;
  --ink: #2e222f;
  --red: #b33831;

  --display: "Ark Pixel", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --body: "Fusion Pixel", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --px: 4px;
  --notch: polygon(0 4px, 4px 4px, 4px 0, calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px,
    100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%,
    4px calc(100% - 4px), 0 calc(100% - 4px));
}

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

html {
  background: var(--night);
  color: var(--text);
  font: 20px/30px var(--body);
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: grayscale;
  font-smooth: never;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background-image: url("../img/starfield.png");
  background-size: 320px 320px;
  image-rendering: pixelated;
}

h1, h2, h3 { font-family: var(--display); font-weight: normal; margin: 0; color: var(--white); }
h2 { font-size: 36px; line-height: 48px; }
h3 { font-size: 24px; line-height: 32px; }
p { margin: 0 0 30px; max-width: 34em; }
p:last-child { margin-bottom: 0; }

a { color: var(--teal); text-decoration-thickness: 2px; text-underline-offset: 4px; }
a:hover { color: var(--gold-light); }
:focus-visible { outline: 4px solid var(--gold); outline-offset: 2px; }

img { image-rendering: pixelated; }

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 10;
  background: var(--gold); color: var(--ink); padding: 8px 16px; font-family: var(--display); font-size: 24px;
}
.skip:focus { top: 16px; }

.wrap { width: min(1160px, 100% - 48px); margin-inline: auto; }

/* ---------- Pixel panels and buttons ---------- */
.frame {
  background: var(--dusk);
  box-shadow: inset 0 0 0 4px var(--brass-dark), inset 0 0 0 8px var(--brass), inset 0 0 0 12px var(--night);
  clip-path: var(--notch);
  padding: 28px;
}

.btn {
  display: inline-block;
  font: 24px/32px var(--display);
  color: var(--ink);
  background: var(--gold);
  padding: 12px 20px 16px;
  border: 0;
  text-decoration: none;
  cursor: pointer;
  clip-path: var(--notch);
  box-shadow: inset 0 -4px 0 var(--gold-dark), inset 0 4px 0 var(--gold-light);
}
.btn:hover { background: var(--gold-light); color: var(--ink); }
.btn:active { transform: translateY(4px); box-shadow: none; }
.btn:focus-visible { outline: none; box-shadow: inset 0 0 0 4px var(--ink), inset 0 0 0 8px var(--white); }
.btn[disabled] { opacity: 0.7; cursor: progress; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  box-shadow: inset 0 0 0 4px var(--slate);
}
.btn-ghost:hover { background: var(--navy); color: var(--white); }
.btn-small { font-size: 24px; padding: 6px 14px 10px; }
.btn-quiet {
  background: var(--navy); color: var(--text);
  box-shadow: inset 0 -4px 0 var(--night), inset 0 4px 0 var(--slate);
}
.btn-quiet:hover { background: var(--slate); color: var(--white); }
.soon {
  display: inline-block; font: 20px/30px var(--body); color: var(--mist);
  padding: 13px 4px;
}

/* ---------- Header ---------- */
.site-header { padding: 20px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand {
  display: flex; align-items: center; gap: 12px;
  font: 24px/32px var(--display); color: var(--white); text-decoration: none;
}
.brand img { width: 32px; height: 32px; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a:not(.btn) { color: var(--text); text-decoration: none; }
.nav a:not(.btn):hover { color: var(--gold-light); text-decoration: underline; }

/* ---------- Hero ---------- */
.hero { padding: 48px 0 96px; }
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 560px);
  gap: 56px;
  align-items: center;
}
.title {
  font-size: 72px; line-height: 84px;
  color: var(--gold);
  text-shadow: 0 6px 0 var(--brass-dark);
  margin-bottom: 36px;
}
.title span { display: block; }
.lead { font-size: 30px; line-height: 45px; color: var(--white); max-width: 20em; }
.meta { color: var(--mist); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }

/* Seed window */
.seed-window { margin: 0; }
.seed-window h2 { font-size: 24px; line-height: 32px; margin-bottom: 16px; }
.screen {
  background: var(--night);
  box-shadow: inset 0 0 0 4px var(--night);
  margin: 0 -4px 20px;
  display: flex; justify-content: center;
}
#system { display: block; image-rendering: pixelated; image-rendering: crisp-edges; }
.system-name { color: var(--white); margin-bottom: 8px; }
.planet-list { list-style: none; margin: 0 0 24px; padding: 0; columns: 2; column-gap: 24px; }
.planet-list li { break-inside: avoid; display: grid; grid-template-columns: 44px minmax(0, 1fr); }
.orbit-num { color: var(--gold); font-family: var(--display); font-size: 24px; line-height: 30px; }

.seed-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; margin-bottom: 8px; }
.seed-form label { grid-column: 1 / -1; font-family: var(--display); font-size: 24px; color: var(--white); }
input[type=text], input[type=email] {
  font: 20px/30px var(--body);
  color: var(--white);
  background: var(--night);
  border: 4px solid var(--slate);
  border-radius: 0;
  padding: 9px 12px;
  width: 100%;
  min-width: 0;
}
input[type=text] { text-transform: uppercase; letter-spacing: 1px; }
input:focus-visible { outline: 4px solid var(--gold); outline-offset: 0; border-color: var(--night); }
.seed-tools { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; margin-top: 16px; }
.field-error { color: var(--parchment-dark); margin: 0; }
.field-error:empty { display: none; }
.status { color: var(--mist); margin: 8px 0 0; overflow-wrap: anywhere; }
.status:empty { display: none; }
.nowrap { white-space: nowrap; }
.hint { color: var(--mist); margin-top: 20px; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-head { margin-bottom: 48px; }
.section-head p { color: var(--mist); margin-top: 12px; }
.band { background: rgba(62, 53, 70, 0.72); }

/* Features */
.features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 64px; }
.feature { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 20px; align-items: start; }
.feature img { width: 48px; height: 48px; margin-top: 4px; }
.feature h3 { margin-bottom: 8px; }
.feature p { color: var(--text); }
.tag {
  display: inline-block; font: 20px/26px var(--body); color: var(--ink); background: var(--teal);
  padding: 0 8px 2px; margin-left: 8px; vertical-align: 3px;
}

.facts { margin: 72px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0; }
.facts div { padding: 20px 24px 20px 0; border-top: 4px solid var(--slate); }
.facts dt { font: 24px/32px var(--display); color: var(--gold); margin-bottom: 4px; }
.facts dd { margin: 0; }

/* Roadmap */
.roadmap { list-style: none; margin: 0; padding: 0; max-width: 820px; }
.roadmap li {
  position: relative;
  display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 20px;
  padding-bottom: 32px;
}
.roadmap li::before { /* the starway between stops */
  content: ""; position: absolute; left: 22px; top: 44px; bottom: 4px; width: 4px;
  background: repeating-linear-gradient(to bottom, var(--slate) 0 8px, transparent 8px 16px);
}
.roadmap li:last-child::before { display: none; }
.roadmap li.done::before { background: repeating-linear-gradient(to bottom, var(--gold-dark) 0 8px, transparent 8px 16px); }
.roadmap img { width: 48px; height: 48px; }
.roadmap h3 { font-size: 24px; line-height: 32px; }
.roadmap p { color: var(--mist); margin: 4px 0 0; }
.roadmap .state { font: 20px/30px var(--body); padding: 2px 10px 4px; align-self: start; white-space: nowrap; }
.roadmap .done .state { color: var(--gold); box-shadow: inset 0 0 0 2px var(--gold-dark); }
.roadmap .next .state { color: var(--ink); background: var(--teal); }
.roadmap .later .state { color: var(--mist); box-shadow: inset 0 0 0 2px var(--slate); }
.roadmap .later h3 { color: var(--text); }
.updated { color: var(--mist); margin-top: 16px; }

/* Sign-up card */
.card {
  background: var(--parchment);
  color: var(--ink);
  box-shadow: inset 0 0 0 4px var(--brass-dark), inset 0 0 0 8px var(--brass), inset 0 -16px 0 8px var(--parchment-dark);
  clip-path: var(--notch);
  padding: 40px 44px 48px;
  max-width: 760px;
}
.card h2 { color: var(--ink); margin-bottom: 16px; }
.card p { color: var(--ink); }
.card a { color: var(--brass-dark); }
.card a:hover { color: var(--ink); }
.signup { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; margin-top: 8px; }
.signup label { grid-column: 1 / -1; font: 24px/32px var(--display); }
.card input[type=email] { background: #fff8f2; color: var(--ink); border-color: var(--ink); }
.card input[type=email]:focus-visible { outline-color: var(--brass-dark); }
.card .status { color: var(--ink); }
.card .status[data-kind="error"] { color: var(--red); }
.fine { font-size: 20px; line-height: 30px; margin-top: 16px; }
.honey { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.also { margin-top: 24px; }

/* FAQ */
.faq { max-width: 820px; }
.faq > h2 { margin-bottom: 16px; }
.faq details { border-top: 4px solid var(--slate); }
.faq details:last-child { border-bottom: 4px solid var(--slate); }
.faq summary {
  list-style: none; cursor: pointer;
  font: 24px/32px var(--display); color: var(--white);
  padding: 20px 48px 20px 0; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 8px; top: 20px; color: var(--gold);
}
.faq details[open] summary::after { content: "−"; }
.faq summary:hover { color: var(--gold-light); }
.faq .answer { padding: 0 0 24px; }

/* Footer */
.site-footer { padding: 48px 0 64px; color: var(--mist); border-top: 4px solid var(--dusk); }
.site-footer .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; }
.site-footer p { margin: 0 0 8px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 28px; }
.site-footer li:has(> a[hidden]) { display: none; }
.credits { grid-column: 1 / -1; font-size: 20px; }

/* ---------- Small screens ---------- */
@media (max-width: 960px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .seed-window { max-width: 640px; }
}
@media (max-width: 720px) {
  .wrap { width: min(1160px, 100% - 32px); }
  .nav a:not(.btn) { display: none; }
  .brand span { display: none; }
  .hero { padding: 24px 0 64px; }
  .title { font-size: 48px; line-height: 60px; text-shadow: 0 4px 0 var(--brass-dark); margin-bottom: 24px; }
  .lead { font-size: 20px; line-height: 30px; }
  h2 { font-size: 24px; line-height: 32px; }
  .section { padding: 64px 0; }
  .features { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .frame { padding: 24px 20px; }
  .planet-list { columns: 1; }
  .card { padding: 32px 24px 40px; }
  .signup, .seed-form { grid-template-columns: minmax(0, 1fr); }
  .roadmap li { grid-template-columns: 36px minmax(0, 1fr); }
  .roadmap img { width: 36px; height: 36px; }
  .roadmap li::before { left: 16px; top: 36px; }
  .roadmap .state { grid-column: 2; justify-self: start; }
  .site-footer .wrap { grid-template-columns: minmax(0, 1fr); }
}
