/* Rocket Foundry — rocketfoundry.net
   Palette + type match the in-game UI: deep space navy, cyan accent,
   flame orange, monospace display type. No external fonts/requests. */

:root {
  --discord: #5865f2;
  --bg: #04070d;
  --bg-raised: #0a101c;
  --panel: #0d1522;
  --line: #1c2940;
  --cyan: #38c6ea;
  --cyan-dim: #2494b3;
  --flame: #f5a445;
  --text: #e8eef5;
  --muted: #93a1b4;
  --faint: #5c6b80;
  --mono: "JetBrains Mono", "SF Mono", "Cascadia Code", Menlo, Consolas,
    "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  --maxw: 1120px;
  --radius: 14px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
  }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(56, 198, 234, 0.35); }

/* ---------- starfield canvas ---------- */
#stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

main, footer, .nav { position: relative; z-index: 1; }

/* ---------- nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px 24px;
  background: rgba(4, 7, 13, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.nav.scrolled { border-bottom-color: var(--line); }

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.12em;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
}
.nav-logo img { width: 28px; height: 28px; border-radius: 6px; }
.nav-logo span { color: var(--cyan); }

.nav a.nav-link {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.nav a.nav-link:hover { color: var(--cyan); }

.nav .cta {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: #04121a;
  background: var(--cyan);
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.2s;
}
.nav .cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 24px rgba(56, 198, 234, 0.35);
}

@media (max-width: 720px) {
  .nav { gap: 16px; }
  .nav a.nav-link { display: none; }
}

/* ---------- hero ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 0;
  position: relative;
  isolation: isolate;
  overflow: hidden; /* clip the limb glow so it never washes later sections */
}

/* Earth-limb glow like the in-game main menu */
.hero::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -42vw;
  width: 160vw;
  height: 60vw;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(
    ellipse at 50% 0%,
    rgba(56, 198, 234, 0.28) 0%,
    rgba(24, 92, 130, 0.18) 22%,
    rgba(6, 16, 30, 0.9) 48%,
    var(--bg) 62%
  );
  z-index: -1;
  pointer-events: none;
}

.hero-kicker {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.34em;
  color: var(--faint);
  text-transform: uppercase;
  margin-bottom: 22px;
}

.hero h1 {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(44px, 9vw, 96px);
  line-height: 1.04;
  letter-spacing: 0.06em;
}
.hero h1 span { color: var(--cyan); }

.hero-tagline {
  max-width: 640px;
  margin: 26px auto 0;
  font-size: clamp(17px, 2.2vw, 21px);
  color: var(--muted);
}
.hero-tagline strong { color: var(--text); font-weight: 600; }

.hero-ctas {
  display: flex;
  gap: 16px;
  margin-top: 40px;
  flex-wrap: wrap;
  justify-content: center;
}

.social-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
  flex-wrap: wrap;
}
.social-label {
  margin-right: 2px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--faint);
}
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(13, 21, 34, 0.58);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.15s;
}
.social-link:hover {
  transform: translateY(-1px);
  background: rgba(13, 21, 34, 0.9);
}
.social-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.social-icon-fill { fill: currentColor; stroke: none; }
.social-reddit:hover { color: #ff6a33 !important; border-color: rgba(255, 69, 0, 0.62); }
.social-tiktok .social-icon { filter: drop-shadow(-1px 0 #25f4ee) drop-shadow(1px 0 #fe2c55); }
.social-tiktok:hover { color: #fff !important; border-color: rgba(37, 244, 238, 0.62); }

.btn {
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.06em;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 10px;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}
.btn-primary {
  background: var(--cyan);
  color: #04121a;
  font-weight: 700;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 32px rgba(56, 198, 234, 0.4);
}
.btn-ghost {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(13, 21, 34, 0.6);
}
.btn-ghost:hover { border-color: var(--cyan-dim); color: var(--cyan); }

/* ---------- Discord ---------- */
.discord-ico { width: 20px; height: 15px; fill: currentColor; flex-shrink: 0; }

.btn-discord {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--discord);
  color: #fff;
  font-weight: 700;
}
.btn-discord:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 36px rgba(88, 101, 242, 0.55);
}
.btn-big { font-size: 17px; padding: 16px 34px; }

.cta-discord {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--discord) !important;
  color: #fff !important;
}
.cta-discord:hover { box-shadow: 0 4px 24px rgba(88, 101, 242, 0.5) !important; }
.cta-discord .discord-ico { width: 17px; height: 13px; }

.beta-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
  padding: 9px 20px;
  border: 1px solid rgba(88, 101, 242, 0.55);
  border-radius: 999px;
  background: rgba(88, 101, 242, 0.14);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  color: #aab4ff;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.beta-pill:hover {
  background: rgba(88, 101, 242, 0.26);
  border-color: var(--discord);
  transform: translateY(-1px);
}
.beta-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #43e97b;
  box-shadow: 0 0 10px rgba(67, 233, 123, 0.9);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  50% { opacity: 0.45; }
}

.dl-discord {
  border-color: rgba(88, 101, 242, 0.45);
  background:
    radial-gradient(1200px 420px at 50% -220px, rgba(88, 101, 242, 0.22), transparent),
    var(--panel);
}
.discord-hero {
  width: 74px;
  height: 56px;
  fill: var(--discord);
  margin-bottom: 20px;
  filter: drop-shadow(0 0 26px rgba(88, 101, 242, 0.55));
}
.dl-invite {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--faint);
  margin-top: 16px;
}
.tag-live {
  font-size: 11px;
  font-weight: 700;
  color: #43e97b;
  letter-spacing: 0.14em;
}
.platform.live {
  border-style: solid;
  border-color: rgba(67, 233, 123, 0.35);
  color: var(--text);
}
.foot-discord { color: #aab4ff !important; }
.faq details p a { color: var(--cyan); }

.hero-shot {
  margin: 72px auto 0;
  width: min(980px, 92vw);
  border-radius: var(--radius) var(--radius) 0 0;
  border: 1px solid var(--line);
  border-bottom: none;
  box-shadow: 0 -20px 80px rgba(56, 198, 234, 0.12);
  overflow: hidden;
  transform: perspective(1400px) rotateX(6deg);
  transform-origin: bottom center;
}
.hero-shot img { display: block; width: 100%; height: auto; }
/* (width/height attrs reserve layout space; height:auto lets CSS win) */

/* ---------- sections ---------- */
section { padding: 110px 24px; }
.wrap { max-width: var(--maxw); margin: 0 auto; }

.kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 14px;
}

h2 {
  font-family: var(--mono);
  font-size: clamp(28px, 4.4vw, 44px);
  line-height: 1.15;
  letter-spacing: 0.02em;
  font-weight: 700;
  max-width: 720px;
}

.lead {
  color: var(--muted);
  max-width: 640px;
  margin-top: 18px;
  font-size: 18px;
}
.lead strong { color: var(--text); }

/* feature stat band */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 64px;
}
.stat {
  background: var(--panel);
  padding: 28px 26px;
}
.stat b {
  display: block;
  font-family: var(--mono);
  font-size: 30px;
  color: var(--cyan);
  margin-bottom: 6px;
}
.stat span { color: var(--muted); font-size: 15px; }

/* split rows */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  margin-top: 84px;
}
.split.flip .split-media { order: 2; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 32px; }
  .split.flip .split-media { order: 0; }
}

.split-media {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.5);
  background: #000;
}
.split-media img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }

.split-copy h3 {
  font-family: var(--mono);
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: 0.02em;
  margin-bottom: 16px;
}
.split-copy p { color: var(--muted); margin-bottom: 14px; }
.split-copy p strong { color: var(--text); }

.ticks { list-style: none; margin-top: 18px; }
.ticks li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 10px;
  color: var(--muted);
}
.ticks li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--flame);
}
.ticks li strong { color: var(--text); font-weight: 600; }

/* body ticker */
.ticker-band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-raised);
  padding: 18px 0;
  overflow: hidden;
  white-space: nowrap;
}
.ticker {
  display: inline-block;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.22em;
  color: var(--faint);
  animation: ticker 70s linear infinite;
  padding-left: 100vw;
}
.ticker b { color: var(--cyan); font-weight: 400; }
@keyframes ticker {
  to { transform: translateX(-100%); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker { animation: none; padding-left: 24px; }
}

/* ---------- gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
  margin-top: 56px;
}
.gallery-grid a {
  display: block;
  border-radius: 12px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: #000;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.25s;
}
.gallery-grid a:hover {
  transform: translateY(-4px);
  border-color: var(--cyan-dim);
  box-shadow: 0 12px 40px rgba(56, 198, 234, 0.15);
}
.gallery-grid img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(2, 4, 8, 0.92);
  padding: 4vmin;
  cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
}
.lightbox figcaption {
  position: absolute;
  bottom: 3vmin;
  left: 0; right: 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* ---------- download ---------- */
.dl-card {
  margin-top: 56px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(1200px 400px at 50% -200px, rgba(56, 198, 234, 0.12), transparent),
    var(--panel);
  padding: clamp(32px, 6vw, 64px);
  text-align: center;
}
.dl-card h3 {
  font-family: var(--mono);
  font-size: clamp(22px, 3.4vw, 32px);
  margin-bottom: 12px;
}
.dl-card p { color: var(--muted); max-width: 560px; margin: 0 auto 30px; }

.platforms {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.platform {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 12px 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.platform svg { width: 18px; height: 18px; fill: currentColor; }
.platform .soon {
  font-size: 11px;
  color: var(--flame);
  letter-spacing: 0.14em;
}

/* ---------- FAQ ---------- */
.faq { max-width: 780px; margin: 56px auto 0; }
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 4px 0;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 4px;
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: 0.02em;
  color: var(--text);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--mono);
  color: var(--cyan);
  font-size: 20px;
  transition: transform 0.2s;
  flex-shrink: 0;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p {
  color: var(--muted);
  padding: 0 4px 20px;
  max-width: 680px;
}

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 48px 24px 60px;
  background: var(--bg-raised);
}
.foot {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  align-items: center;
}
.foot-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.foot-brand img { width: 24px; height: 24px; border-radius: 5px; }
.foot nav { display: flex; gap: 22px; flex-wrap: wrap; }
.foot nav a {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--faint);
  text-decoration: none;
}
.foot nav a:hover { color: var(--cyan); }
.foot nav a.foot-social {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.foot-social .social-icon { width: 15px; height: 15px; }
.foot-copy {
  width: 100%;
  margin-top: 18px;
  font-size: 13px;
  color: var(--faint);
}

/* ---------- legal pages ---------- */
.legal-body {
  background:
    radial-gradient(circle at 85% 0, rgba(36, 148, 179, 0.16), transparent 32rem),
    var(--bg);
}
.legal-page {
  width: min(900px, calc(100% - 40px));
  margin: 0 auto;
  padding: 130px 0 80px;
}
.legal-kicker {
  color: var(--cyan);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.legal-page h1 {
  margin: 10px 0 12px;
  font-family: var(--mono);
  font-size: clamp(42px, 8vw, 78px);
  line-height: 1;
  letter-spacing: -0.055em;
}
.legal-date,
.legal-lead,
.legal-page p,
.legal-page li { color: var(--muted); }
.legal-lead {
  max-width: 760px;
  margin-top: 22px;
  font-size: 20px;
}
.legal-page section {
  padding: 34px 0;
  border-top: 1px solid var(--line);
}
.legal-page section:first-of-type { margin-top: 44px; }
.legal-page h2 {
  margin-bottom: 14px;
  font-family: var(--mono);
  font-size: clamp(21px, 4vw, 28px);
  line-height: 1.25;
}
.legal-page h3 {
  margin: 24px 0 8px;
  font-family: var(--mono);
  font-size: 17px;
}
.legal-page p + p { margin-top: 14px; }
.legal-page ul {
  margin: 12px 0 0 22px;
  display: grid;
  gap: 9px;
}
.legal-page strong { color: var(--text); }
.legal-page a { color: var(--cyan); }
.legal-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 24px;
}
.legal-summary article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(13, 21, 34, 0.8);
}
.legal-summary h2 {
  margin-bottom: 7px;
  color: var(--cyan);
  font-size: 14px;
  letter-spacing: 0.04em;
}
.legal-summary p { font-size: 14px; }
.legal-contact {
  padding: 22px;
  border-left: 3px solid var(--cyan);
  background: rgba(56, 198, 234, 0.06);
}
@media (max-width: 700px) {
  .legal-page { width: min(100% - 32px, 900px); padding-top: 105px; }
  .legal-summary { grid-template-columns: 1fr; }
  .legal-lead { font-size: 18px; }
}

/* ---------- reveal on scroll ----------
   Hidden state only applies once JS has tagged <html class="js">, so
   content stays visible without JS (and for crawlers). */
html.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
html.js .reveal.in { opacity: 1; transform: none; }
/* screenshot-harness mode: fixed-height hero so full-page captures work */
html.noanim .hero { min-height: 780px; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ---------- 404 ---------- */
.err-page {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}
.err-page h1 {
  font-family: var(--mono);
  font-size: clamp(60px, 14vw, 140px);
  color: var(--cyan);
}
.err-page p { color: var(--muted); margin: 12px 0 32px; }
