/* Perfekt Asteroids 3D — site styles.
   Self-contained: no frameworks, no webfonts, no external requests. */

:root {
  --bg:        #05070c;
  --bg-alt:    #080b13;
  --panel:     #0d1220;
  --line:      #1b2436;
  --ink:       #e8eef7;
  --ink-dim:   #93a3bb;
  --ink-faint: #64748b;
  --accent:    #6ee7c0;   /* the game's laser green */
  --accent-2:  #ffd166;   /* the HUD amber */
  --measure:   68ch;
  --radius:    14px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.65 ui-sans-serif, -apple-system, BlinkMacSystemFont,
        "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #a7f3d8; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #04150f; padding: 10px 16px; z-index: 100;
}
.skip:focus { left: 8px; top: 8px; }

.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.wrap.narrow { width: min(760px, 100% - 2.5rem); }

/* ---------- type ---------- */

h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.12rem; font-weight: 650; letter-spacing: -0.01em; }
p  { margin: 0 0 1rem; max-width: var(--measure); }

.muted  { color: var(--ink-faint); }
.lede   { font-size: clamp(1.05rem, 2vw, 1.28rem); color: var(--ink-dim); max-width: 60ch; }
.section-lede { color: var(--ink-dim); max-width: 60ch; margin-bottom: 2.5rem; }

.eyebrow {
  font: 600 .78rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1.4rem;
}

.tag {
  font: 600 .72rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: .6rem;
}

/* ---------- top bar ---------- */

.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(5, 7, 12, .82);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 60px; }

.wordmark {
  font: 500 .82rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .22em; color: var(--ink-dim); white-space: nowrap;
}
.wordmark strong { color: var(--ink); font-weight: 700; }

.topbar nav { display: flex; gap: 1.4rem; }
.topbar nav a {
  color: var(--ink-dim); text-decoration: none; font-size: .93rem;
}
.topbar nav a:hover { color: var(--ink); }
@media (max-width: 620px) { .topbar nav a:first-child { display: none; } }

/* ---------- hero ---------- */

.hero {
  padding: clamp(4rem, 12vw, 8.5rem) 0 clamp(3.5rem, 8vw, 6rem);
  border-bottom: 1px solid var(--line);
  position: relative; overflow: hidden;
}
/* A faint starfield, drawn rather than downloaded. */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 22%, #cfe3ff 50%, transparent 51%),
    radial-gradient(1.1px 1.1px at 68% 14%, #9fd8ff 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 84% 62%, #ffe6b8 50%, transparent 51%),
    radial-gradient(1.1px 1.1px at 32% 74%, #d7ecff 50%, transparent 51%),
    radial-gradient(1.3px 1.3px at 52% 42%, #bcd8ff 50%, transparent 51%),
    radial-gradient(1px 1px   at 92% 30%, #ffffff 50%, transparent 51%),
    radial-gradient(1px 1px   at 22% 52%, #ffffff 50%, transparent 51%),
    radial-gradient(900px 520px at 74% -10%, rgba(110,231,192,.09), transparent 70%);
  opacity: .8;
}
.hero .wrap { position: relative; }

.cta { display: flex; flex-wrap: wrap; gap: .8rem; margin: 2rem 0 1.2rem; }

.btn {
  display: inline-block; padding: .85rem 1.5rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel);
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: .98rem;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.btn:hover { border-color: #2a3550; background: #121a2c; transform: translateY(-1px); }
.btn.primary {
  background: var(--accent); color: #04150f; border-color: transparent;
}
.btn.primary:hover { background: #8df0d1; color: #04150f; }
.btn.big { padding: 1.05rem 2rem; font-size: 1.05rem; }
@media (prefers-reduced-motion: reduce) { .btn:hover { transform: none; } }

.fineprint { color: var(--ink-faint); font-size: .9rem; }

/* ---------- strip of three ---------- */

.strip { padding: clamp(3rem, 7vw, 4.5rem) 0; border-bottom: 1px solid var(--line); }
/* Auto-fit rather than a fixed three: the strip gained a fourth item when
   leaderboards arrived, and a hard `repeat(3, 1fr)` left one orphan alone on a
   second row. This fills the row and reflows on its own the next time the
   count changes. */
.grid-3 {
  display: grid; gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}
.grid-3 h3 { color: var(--ink); }
.grid-3 p  { color: var(--ink-dim); margin: 0; font-size: .97rem; }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr; gap: 1.6rem; } }

/* ---------- sections ---------- */

section { padding: clamp(3.5rem, 9vw, 6.5rem) 0; }
section.alt { background: var(--bg-alt); border-block: 1px solid var(--line); }

/* ---------- modes ---------- */

.mode {
  display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center; margin-bottom: clamp(3rem, 7vw, 5rem);
}
.mode:last-child { margin-bottom: 0; }
.mode.reverse figure { order: 2; }
.mode figure {
  margin: 0; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: #000;
  box-shadow: 0 24px 60px -30px rgba(0,0,0,.9);
}
/* The headline mode has no screenshot yet: immersive content cannot be captured
   from the simulator, so a picture of Rush has to come off a headset. Rather
   than leave half a two-column grid empty, it runs full width and is set a
   little larger — which suits the mode the game is now mostly about. */
.mode-wide {
  grid-template-columns: 1fr;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.035), transparent);
}
.mode-wide .mode-copy { max-width: 68ch; }
.mode-wide .mode-copy p + p { margin-top: .9rem; }

.mode-copy p { color: var(--ink-dim); }
.mode-copy h3 { font-size: clamp(1.5rem, 3vw, 2rem); color: var(--ink); }
@media (max-width: 880px) {
  .mode { grid-template-columns: 1fr; }
  .mode.reverse figure { order: 0; }
}

/* ---------- cards ---------- */

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 1.5rem; }
@media (max-width: 820px) { .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.6rem 1.7rem;
}
.card h3 { color: var(--accent); margin-bottom: 1rem; }
.card dl { margin: 0; }
.card dt { font-weight: 650; color: var(--ink); margin-top: 1rem; }
.card dt:first-of-type { margin-top: 0; }
.card dd { margin: .25rem 0 0; color: var(--ink-dim); font-size: .97rem; }

/* ---------- install steps ---------- */

.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; }
.steps li {
  counter-increment: step; position: relative;
  padding: 0 0 2rem 3.6rem; border-left: 1px solid var(--line); margin-left: 1.1rem;
}
.steps li:last-child { border-left-color: transparent; padding-bottom: .5rem; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: -1.15rem; top: -.15rem;
  width: 2.3rem; height: 2.3rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--panel); border: 1px solid var(--line);
  font: 600 .78rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--accent);
}
.steps h3 { margin-bottom: .35rem; }
.steps p { color: var(--ink-dim); }

.linkbox {
  background: #04101a; border: 1px solid #14324a; border-radius: 10px;
  padding: .85rem 1rem; overflow-wrap: anywhere;
  font: 500 .95rem/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.note {
  margin-top: 2rem; padding: 1.5rem 1.7rem;
  background: rgba(255, 209, 102, .06);
  border: 1px solid rgba(255, 209, 102, .22);
  border-radius: var(--radius);
}
.note h3 { color: var(--accent-2); }
.note p { color: var(--ink-dim); margin-bottom: .75rem; }
.note p:last-child { margin-bottom: 0; }

/* ---------- faq ---------- */

.faq h3 { margin-top: 2.2rem; color: var(--ink); }
.faq h3:first-of-type { margin-top: 1rem; }
.faq p { color: var(--ink-dim); }

/* ---------- closer + footer ---------- */

.closer { text-align: center; border-top: 1px solid var(--line); }
.closer p { margin-inline: auto; color: var(--ink-dim); margin-bottom: 2rem; }

footer { border-top: 1px solid var(--line); padding: 2.5rem 0 3.5rem; background: var(--bg-alt); }
.foot p { font-size: .88rem; color: var(--ink-faint); max-width: 70ch; }
.foot p:first-child { color: var(--ink-dim); }
/* Wraps to one link per line on a phone rather than overflowing. */
.footlinks { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; }
