/* Farsided Guide — lunar night theme.
   Palette follows the game's own screens: deep navy caves, pale lunar gray-purple rock,
   warm amber rover accents, and the teal glow of hidden terminals. */

:root {
  --bg: #0b0d1a;
  --bg-soft: #0f1224;
  --bg-card: #151a30;
  --line: #e7e9f4;
  --text: #d6d9e8;
  --muted: #9aa1bd;
  --accent: #ffb35c;        /* warm rover amber */
  --accent-deep: #8a5a1f;
  --teal: #5fd7c6;          /* terminal glow */
  --teal-deep: #2b7a6f;
  --mono: ui-monospace, "Cascadia Mono", "Consolas", "SF Mono", Menlo, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 12px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
}

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

a { color: var(--teal); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }

h1, h2, h3, .brand-name, .eyebrow { font-family: var(--mono); }

h2 { font-size: 1.55rem; line-height: 1.3; margin: 0 0 .6rem; color: var(--line); }
h3 { font-size: 1.05rem; margin: 0 0 .4rem; color: var(--line); }

kbd {
  font-family: var(--mono);
  font-size: .85em;
  background: var(--bg-card);
  border: 1px solid #2b3355;
  border-bottom-width: 3px;
  border-radius: 6px;
  padding: .08em .5em;
  color: var(--line);
}

code {
  font-family: var(--mono);
  font-size: .9em;
  background: var(--bg-card);
  border: 1px solid #2b3355;
  border-radius: 6px;
  padding: .1em .4em;
}

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 820px; }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(11, 13, 26, .92);
  border-bottom: 1px solid #232a4a;
  backdrop-filter: blur(6px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--line);
  font-family: var(--mono);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 1px;
}
.brand em { color: var(--teal); font-style: normal; font-size: .72em; align-self: flex-end; }

.main-nav { margin-left: auto; display: flex; gap: 18px; flex-wrap: wrap; }
.main-nav a { color: var(--muted); text-decoration: none; font-family: var(--mono); font-size: .85rem; }
.main-nav a:hover { color: var(--line); }

/* ---------- buttons ---------- */

.button {
  display: inline-block;
  font-family: var(--mono);
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .5px;
  text-decoration: none;
  padding: .7em 1.4em;
  border: 1px solid var(--teal);
  border-radius: 999px;
  color: var(--line);
  background: transparent;
  box-shadow: 0 0 18px rgba(95, 215, 198, .12);
  transition: box-shadow .15s ease, transform .08s ease, background-color .15s ease;
}
.button:hover { box-shadow: 0 0 26px rgba(95, 215, 198, .3); color: var(--line); }

.button-primary {
  background: linear-gradient(135deg, var(--accent), #ff9430);
  border-color: var(--accent);
  color: #1c1204;
}
.button-primary:hover { color: #1c1204; box-shadow: 0 0 30px rgba(255, 179, 92, .4); }

.button-ghost { border-color: var(--muted); color: var(--text); box-shadow: none; }
.button-small { padding: .45em 1em; font-size: .8rem; }

/* ---------- hero (starfield) ---------- */

.hero {
  border-bottom: 1px solid #232a4a;
  background:
    radial-gradient(1.5px 1.5px at 12% 18%, #cfd6f5 50%, transparent 51%),
    radial-gradient(1px 1px at 28% 64%, #9fb3e8 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 44% 12%, #cfd6f5 50%, transparent 51%),
    radial-gradient(1px 1px at 62% 78%, #8fa7e0 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 76% 26%, #cfd6f5 50%, transparent 51%),
    radial-gradient(1px 1px at 90% 58%, #9fb3e8 50%, transparent 51%),
    radial-gradient(2px 2px at 84% 10%, #ffd9a0 50%, transparent 51%),
    radial-gradient(ellipse 90% 70% at 70% -10%, #131735 0%, var(--bg) 60%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 40px;
  align-items: center;
  padding-top: 56px;
  padding-bottom: 56px;
}

.eyebrow {
  color: var(--teal);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin: 0 0 10px;
}

.hero h1 {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  line-height: 1.22;
  margin: 0 0 16px;
  color: var(--line);
  text-wrap: balance;
}

.hero-summary { margin: 0 0 22px; }

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 24px; }

.hero-facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 22px;
  font-size: .88rem;
  color: var(--muted);
}
.hero-facts strong { color: var(--text); font-weight: 600; }

.hero-media { margin: 0; }
.hero-media img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid #2b3355;
  box-shadow: 0 0 40px rgba(95, 215, 198, .1), 0 18px 40px rgba(0, 0, 0, .5);
}
.hero-media figcaption { font-size: .8rem; color: var(--muted); margin-top: 10px; text-align: center; }

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

.section { padding: 58px 0; }
.section-soft { background: var(--bg-soft); border-block: 1px solid #232a4a; }

.section-heading { margin-bottom: 30px; }
.section-heading p { margin: 0 0 10px; }
.section-heading h2 + p { color: var(--muted); max-width: 62ch; }

/* what-is */

.what-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 36px; align-items: start; }
.what-figure img {
  border-radius: var(--radius);
  border: 1px solid #2b3355;
  box-shadow: 0 0 30px rgba(255, 179, 92, .08);
  width: 100%;
}
.what-figure figcaption { font-size: .8rem; color: var(--muted); margin-top: 8px; text-align: center; }

/* cards */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}

.card {
  background: var(--bg-card);
  border: 1px solid #232a4a;
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.card:hover { border-color: var(--teal-deep); box-shadow: 0 0 22px rgba(95, 215, 198, .08); }
.card p { margin: 0; color: var(--muted); font-size: .93rem; }

/* steps */

.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 14px; }
.steps li {
  counter-increment: step;
  background: var(--bg-card);
  border: 1px solid #232a4a;
  border-radius: var(--radius);
  padding: 18px 20px 18px 66px;
  position: relative;
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 18px;
  top: 18px;
  font-family: var(--mono);
  font-weight: 700;
  color: var(--accent);
  font-size: 1.05rem;
}
.steps p { margin: 0; color: var(--muted); font-size: .93rem; }

.note {
  margin-top: 22px;
  border: 1px dashed #3a4470;
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: .9rem;
  color: var(--muted);
}
.note strong { color: var(--accent); }

/* embed */

.embed-wrap { margin-top: 34px; }
.embed-bar { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.embed-frame {
  position: relative;
  aspect-ratio: 16 / 10;           /* the game's native 960x600 canvas */
  max-width: 920px;
  border-radius: var(--radius);
  border: 1px solid #2b3355;
  box-shadow: 0 0 40px rgba(95, 215, 198, .08), 0 18px 40px rgba(0, 0, 0, .5);
  background: #000;
  overflow: hidden;
}
.embed-frame:fullscreen { border: 0; box-shadow: none; border-radius: 0; aspect-ratio: auto; width: 100vw; height: 100vh; }
.embed-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed-credit { font-size: .82rem; color: var(--muted); margin: 12px 0 0; }

/* play notes */

.play-notes { margin-top: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.play-notes .card p { margin: 0; }

/* carousel */

.carousel { max-width: 920px; }
.carousel-viewport {
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid #2b3355;
  box-shadow: 0 0 40px rgba(95, 215, 198, .08), 0 18px 40px rgba(0, 0, 0, .5);
  background: #000;
}
.carousel-track { display: flex; transition: transform .28s ease; }
.slide { flex: 0 0 100%; margin: 0; }
.slide img { width: 100%; display: block; }
.slide figcaption { font-size: .85rem; color: var(--muted); padding: 12px 16px; background: var(--bg-card); }

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 16px;
}
.carousel-button {
  font-family: var(--mono);
  font-size: 1.1rem;
  line-height: 1;
  color: var(--line);
  background: var(--bg-card);
  border: 1px solid #2b3355;
  border-radius: 999px;
  padding: .5em 1em;
  cursor: pointer;
}
.carousel-button:hover { background: var(--teal); border-color: var(--teal); color: #07211d; }
.carousel-status { font-family: var(--mono); color: var(--muted); margin: 0; font-size: .9rem; }

/* table */

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: 10px 14px; border: 1px solid #232a4a; }
th { font-family: var(--mono); color: var(--line); background: var(--bg-card); }
td { color: var(--muted); }
td:first-child { color: var(--text); font-weight: 600; }

/* facts */

.facts-layout { display: grid; grid-template-columns: .9fr 1.1fr; gap: 36px; align-items: start; }
.facts-layout > div > p { color: var(--muted); }
.facts-list { margin: 0; display: grid; gap: 0; }
.facts-list > div {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid #232a4a;
}
.facts-list dt { font-family: var(--mono); font-size: .82rem; color: var(--accent); }
.facts-list dd { margin: 0; color: var(--text); }

/* faq */

.faq-list { display: grid; gap: 12px; }
details {
  background: var(--bg-card);
  border: 1px solid #232a4a;
  border-radius: var(--radius);
  padding: 14px 18px;
}
details[open] { border-color: var(--teal-deep); }
summary {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--line);
  cursor: pointer;
}
summary:hover { color: var(--teal); }
details p { margin: 10px 0 0; color: var(--muted); }

/* related */

.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.related-card {
  background: var(--bg-card);
  border: 1px solid #232a4a;
  border-radius: var(--radius);
  padding: 20px;
}
.related-card h3 { margin: 0 0 .4rem; font-size: 1rem; }
.related-card h3 a { color: var(--line); text-decoration: none; }
.related-card h3 a:hover { color: var(--teal); text-decoration: underline; }
.related-card p { margin: 0; color: var(--muted); font-size: .93rem; }

/* final cta */

.final-cta { padding: 70px 0; text-align: center; background: var(--bg-soft); border-top: 1px solid #232a4a; }
.final-cta h2 { font-size: 1.7rem; }
.final-cta p { color: var(--muted); margin: 0 0 24px; }

/* legal pages */

.legal-article { font-size: .97rem; }
.legal-updated { font-family: var(--mono); font-size: .82rem; color: var(--teal); margin: 0 0 26px; }
.legal-article h1 { color: var(--line); }
.legal-article h2 { font-size: 1.05rem; margin-top: 36px; }
.legal-article p { color: var(--muted); }
.legal-article ul { color: var(--muted); padding-left: 22px; margin: 10px 0; }
.legal-article ul li { margin: 6px 0; }
.legal-nav { margin-top: 44px; display: flex; gap: 20px; }

/* footer */

.site-footer { border-top: 1px solid #232a4a; padding: 26px 0; font-size: .85rem; color: var(--muted); }
.footer-inner { display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.footer-inner p { margin: 0; }
.footer-inner nav { display: flex; gap: 16px; }
.footer-inner nav a { color: var(--muted); }
.footer-inner nav a:hover { color: var(--line); }

/* skip link */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #1c1204;
  padding: .6em 1em;
  font-family: var(--mono);
  font-weight: 700;
  border-radius: 0 0 var(--radius) 0;
  z-index: 30;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- responsive ---------- */

@media (max-width: 880px) {
  .hero-grid, .what-grid, .facts-layout { grid-template-columns: 1fr; }
  .play-notes { grid-template-columns: 1fr; }
  .hero { padding-top: 8px; }
  .main-nav { display: none; }
  .header-inner .button { margin-left: auto; }
  .hero-facts { grid-template-columns: 1fr; }
  .facts-list > div { grid-template-columns: 130px 1fr; }
  body { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .carousel-track { transition: none; }
  .button, .card { transition: none; }
}
