/* Astorbit — site styles. Colours mirror the game palette. */
:root {
  --bg: #120c26;
  --bg-2: #1b1238;
  --panel: #1f1640;
  --text: #f0ecff;
  --muted: #b9b0d9;
  --cyan: #4de8ff;
  --blue: #3d8bff;
  --magenta: #ff40c0;
  --gold: #ffb840;
  --rust: #d9733a;
  --line: 2px;
  --wrap: 1100px;
  --pixel: "Pixelify Sans", ui-monospace, monospace;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 20% 10%, rgba(120, 40, 160, .14), transparent 70%),
    radial-gradient(ellipse 70% 40% at 90% 60%, rgba(40, 60, 160, .12), transparent 70%);
  color: var(--text);
  font: 16px/1.6 var(--sans);
  overflow-x: hidden;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
.pixel { image-rendering: pixelated; image-rendering: crisp-edges; }
a { color: var(--cyan); }
h1, h2, h3 { font-family: var(--pixel); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; }
h2 { font-size: clamp(1.8rem, 5vw, 2.6rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
section { padding: 72px 0; position: relative; }
.lead { color: var(--muted); font-size: 1.1rem; max-width: 640px; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--cyan); color: #000; padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* Starfield behind everything */
#stars { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; }

/* Buttons and boxes — square, neon outline */
.btn {
  display: inline-block; font: 600 1rem var(--pixel); letter-spacing: .04em;
  color: var(--bg); background: var(--cyan); border: var(--line) solid var(--cyan);
  padding: 12px 20px; cursor: pointer; text-decoration: none; border-radius: 0;
  transition: box-shadow .2s, background .2s;
}
.btn:hover { box-shadow: 0 0 16px var(--cyan); }
.box { background: var(--panel); border: var(--line) solid rgba(77, 232, 255, .35); padding: 20px; transition: box-shadow .2s, border-color .2s; }
.box:hover { border-color: var(--cyan); box-shadow: 0 0 14px rgba(77, 232, 255, .3); }

/* Hero */
.hero { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 48px 0; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: center; }
.hero .wrap > * { min-width: 0; }
.logo {
  font-size: clamp(3rem, 14vw, 6.5rem); color: var(--cyan); letter-spacing: .06em; margin: 0;
  text-shadow: 0 0 12px rgba(77, 232, 255, .6), 0 0 32px rgba(77, 232, 255, .3);
}
.tagline { font: 500 clamp(1.25rem, 4.5vw, 1.8rem) var(--pixel); margin: .2em 0 .6em; }
.tagline em { color: var(--magenta); font-style: normal; }
#hero-canvas { width: 100%; max-width: 420px; aspect-ratio: 1; margin: 0 auto; display: block; image-rendering: pixelated; }
.soon { font: 600 .95rem var(--pixel); color: var(--gold); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 12px; }
.badges { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.badge {
  display: flex; align-items: center; gap: 10px; padding: 8px 14px; min-width: 170px;
  border: var(--line) solid rgba(240, 236, 255, .3); color: var(--muted); background: rgba(0, 0, 0, .3);
}
.badge svg { width: 24px; height: 24px; fill: currentColor; flex: none; }
.badge small { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--gold); }
.badge b { font-weight: 600; color: var(--text); }

/* Signup form */
.signup { display: flex; flex-wrap: wrap; gap: 8px; max-width: 460px; }
.signup label { flex-basis: 100%; font-weight: 600; }
.signup input {
  flex: 1 1 200px; min-width: 0; padding: 12px; font: inherit; color: var(--text);
  background: rgba(0, 0, 0, .4); border: var(--line) solid rgba(77, 232, 255, .5); border-radius: 0;
}
.signup input:focus { border-color: var(--cyan); }
.form-msg { flex-basis: 100%; min-height: 1.5em; margin: 0; font-size: .95rem; }
.form-msg.ok { color: var(--cyan); }
.form-msg.err { color: var(--magenta); }
.center .signup { margin: 0 auto; }

/* Steps */
.steps { display: grid; gap: 16px; margin-top: 32px; counter-reset: s; }
.step { text-align: center; }
.step img { width: 96px; height: 96px; margin: 0 auto 12px; }
.step h3::before { counter-increment: s; content: counter(s) ". "; color: var(--gold); }
.step:nth-child(1) h3 { color: var(--magenta); }
.step:nth-child(2) h3 { color: var(--rust); }
.step:nth-child(3) h3 { color: var(--cyan); }
.step p { color: var(--muted); margin: 0; }

/* Features */
.grid { display: grid; gap: 16px; margin-top: 32px; }
.feature { display: flex; gap: 16px; align-items: flex-start; }
.feature img { width: 64px; height: 64px; flex: none; }
.feature h3 { margin-bottom: .25em; }
.feature p { margin: 0; color: var(--muted); }

/* Rarity */
.rarity { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 32px; }
.rarity .box { padding: 12px 8px; }
.tier { text-align: center; }
.tier canvas { width: 100%; max-width: 200px; aspect-ratio: 2 / 3; margin: 0 auto 8px; display: block; image-rendering: pixelated; }
.tier h3 { margin: 0; }
.tier.common h3 { color: #bdf6ff; }
.tier.rare h3 { color: var(--blue); }
.tier.epic h3 { color: var(--gold); }
.tier.epic { border-color: rgba(255, 184, 64, .5); }

/* Captain's Log */
.log { display: grid; gap: 16px; margin-top: 32px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.entry { border-color: rgba(255, 64, 192, .4); display: flex; flex-direction: column; }
.entry:hover { border-color: var(--magenta); box-shadow: 0 0 14px rgba(255, 64, 192, .3); }
.entry .art { height: 150px; display: grid; place-items: center; margin-bottom: 12px; background: rgba(0, 0, 0, .3); }
.entry .art img { max-height: 130px; width: auto; }
.entry .tag { font: .75rem var(--pixel); color: var(--gold); text-transform: uppercase; letter-spacing: .08em; }
.entry p { color: var(--muted); font-size: .95rem; margin: .3em 0 0; }
.entry.locked .art img { filter: brightness(0) invert(.22) drop-shadow(0 0 4px rgba(255, 64, 192, .35)); }
.entry.locked h3 { color: var(--muted); }

/* Screenshots */
.shots { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 24px 4px 16px; margin-top: 16px; }
.phone {
  flex: 0 0 min(62vw, 230px); scroll-snap-align: center; aspect-ratio: 9 / 16;
  border: 6px solid #2c2450; outline: var(--line) solid rgba(77, 232, 255, .4); background: #000; overflow: hidden;
}
.phone img { width: 100%; height: 100%; object-fit: cover; }
.trailer { margin-top: 24px; aspect-ratio: 16 / 9; border: var(--line) dashed rgba(240, 236, 255, .3); display: grid; place-items: center; color: var(--muted); font-family: var(--pixel); }

/* CTA + footer */
.cta { border-top: var(--line) solid rgba(77, 232, 255, .2); }
.social { display: flex; justify-content: center; gap: 12px; margin-top: 24px; list-style: none; padding: 0; flex-wrap: wrap; }
.social a { display: block; padding: 8px 14px; border: var(--line) solid rgba(240, 236, 255, .3); color: var(--text); text-decoration: none; font-family: var(--pixel); }
.social a:hover { border-color: var(--cyan); box-shadow: 0 0 12px rgba(77, 232, 255, .3); }
footer { padding: 32px 0 48px; color: var(--muted); font-size: .9rem; border-top: var(--line) solid rgba(240, 236, 255, .1); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
footer nav a { margin-right: 16px; }

/* Legal / support pages */
.doc { max-width: 760px; padding-top: 48px; padding-bottom: 64px; }
.doc h1 { color: var(--cyan); font-size: clamp(2rem, 6vw, 3rem); }
.doc h2 { font-size: 1.4rem; margin-top: 1.6em; }
.doc .back { font-family: var(--pixel); text-decoration: none; display: inline-block; margin-bottom: 24px; }
.ph { background: rgba(255, 184, 64, .15); color: var(--gold); padding: 0 4px; }
details { margin-bottom: 12px; }
summary { cursor: pointer; font-weight: 600; }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s, transform .6s; }
.reveal.in { opacity: 1; transform: none; }

@media (min-width: 640px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .rarity { gap: 16px; }
}
@media (min-width: 900px) {
  .hero .wrap { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .shots { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}
