/* ============================================================
   aetherascent.com — Mission Control design system (SITE.md §4)
   Tokens lifted from the game loader's shipped identity. The
   site is deliberately single-theme: the game's world is dark,
   and the site is the game's home.
   ============================================================ */

:root {
  --bg: #05080a;
  --panel: #0b1017;
  --panel-2: #16202c;
  --line: #141d28;
  --line-2: #26313f;
  --accent: #5b8ddb;
  --accent-soft: #8fb3e8;
  --text: #dbe2ea;
  --text-strong: #eaf0f7;
  --sub: #97a3b2;
  --dim: #6d7683;
  --faint: #5f6b7a;
  --danger: #c26060;
  --ok: #6fbf8f;
  --sans: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --mono: Consolas, "Cascadia Mono", ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg); color: var(--text);
  font-family: var(--sans);
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
::selection { background: #5b8ddb44; }

.shell { max-width: 1120px; margin: 0 auto; padding: 0 28px; }

/* ---------------- nav ---------------- */
.site-nav {
  border-bottom: 1px solid var(--line);
}
.site-nav .shell {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 16px; padding-bottom: 16px;
}
.wordmark { text-decoration: none; display: block; }
.wordmark .mark {
  font-size: 15px; font-weight: 700; letter-spacing: 0.22em; color: var(--accent);
}
/* Two-tone wordmark matching the in-game menu (colors, not the chrome):
   AETHER in warm parchment, ASCENT in steel blue. */
.wordmark .m-aether {
  background: linear-gradient(180deg, #f2ecda 20%, #c9c2ab 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.wordmark .m-ascent {
  background: linear-gradient(180deg, #93bdf0 15%, #4a76b8 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.wordmark .studio {
  font-size: 8.5px; font-weight: 400; letter-spacing: 0.34em; color: var(--dim);
  margin-top: 2px;
}
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a {
  color: #93a0b0; text-decoration: none; font-size: 12px; letter-spacing: 0.14em;
  padding: 4px 0;
}
.nav-links a:hover { color: var(--text-strong); }
.nav-links a.active { color: var(--accent); }
.nav-links a.play-chip {
  color: var(--bg); background: var(--accent); padding: 8px 18px;
  border-radius: 3px; font-weight: 700;
}
.nav-links a.play-chip:hover { background: var(--accent-soft); color: var(--bg); }

/* ---------------- landing ---------------- */
.hero {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px;
  align-items: center;
  /* vertical only — .shell owns the horizontal padding (shorthand here
     would silently zero it: same-specificity cascade collision) */
  padding-top: 64px; padding-bottom: 56px;
}
.eyebrow {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.2em;
  color: var(--accent); margin: 0 0 16px; text-transform: uppercase;
}
.hero h1 {
  font-size: clamp(32px, 4.6vw, 44px); font-weight: 700; line-height: 1.12;
  margin: 0 0 16px; color: var(--text-strong); letter-spacing: 0.01em;
  text-wrap: balance;
}
.hero .sub { color: var(--sub); font-size: 16px; max-width: 46ch; margin: 0 0 26px; }
.cta-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.btn-primary {
  background: var(--accent); color: var(--bg); font-weight: 700; font-size: 14px;
  letter-spacing: 0.08em; padding: 13px 26px; border-radius: 3px;
  text-decoration: none; border: 0; cursor: pointer; font-family: var(--sans);
}
.btn-primary:hover { background: var(--accent-soft); }
.btn-ghost {
  color: #93a0b0; border: 1px solid var(--line-2); padding: 12px 22px;
  border-radius: 3px; font-size: 12.5px; letter-spacing: 0.12em; text-decoration: none;
}
.btn-ghost:hover { color: var(--text-strong); border-color: var(--dim); }
.hero-note { font-size: 11.5px; color: var(--faint); letter-spacing: 0.06em; font-family: var(--mono); }

.capture {
  position: relative;
  border: 1px solid var(--line-2); border-radius: 4px;
  overflow: hidden; background: #0a1018;
}
/* Full frame, never cropped (Mike 2026-07-20): the HUD is part of the shot. */
.capture img {
  width: 100%; height: auto; display: block; cursor: zoom-in;
  opacity: 1; transition: opacity 0.32s ease;
}
.capture img.fading { opacity: 0; }
.capture.placeholder { aspect-ratio: 16 / 10; }
.capture.placeholder {
  background:
    radial-gradient(1px 1px at 12% 18%, #7f96b3 50%, transparent 51%),
    radial-gradient(1px 1px at 34% 8%, #66788f 50%, transparent 51%),
    radial-gradient(1px 1px at 58% 22%, #7f96b3 50%, transparent 51%),
    radial-gradient(1px 1px at 81% 12%, #5f7189 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 70% 15%, #8fa8c6 50%, transparent 51%),
    linear-gradient(180deg, #060a10 0%, #0a1018 52%, #131c28 74%, #1d2a3a 100%);
}
.capture.placeholder::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(#5b8ddb0f 1px, transparent 1px),
    linear-gradient(90deg, #5b8ddb0f 1px, transparent 1px);
  background-size: 44px 44px;
}
.capture.placeholder::after {
  content: ""; position: absolute; left: -20%; right: -20%; bottom: -62%;
  height: 90%; border-radius: 50%;
  background: #0d141d; box-shadow: 0 -1px 0 1px #5b8ddb55, 0 -14px 44px #5b8ddb2e;
}
.capture .tag {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.16em; color: #6d7a8a;
  border: 1px solid var(--line-2); padding: 3px 8px; border-radius: 2px;
  background: rgba(5, 8, 10, 0.6);
}

.strip-outer {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.strip { display: grid; grid-template-columns: repeat(4, 1fr); }
.strip div {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  color: #7d8a9a; text-align: center; padding: 13px 8px;
}
.strip div + div { border-left: 1px solid var(--line); }
.strip b { color: var(--accent); font-weight: 400; }

.features {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-top: 0;
}
.feature { background: var(--bg); padding: 26px 22px; }
.feature h3 {
  font-size: 12px; letter-spacing: 0.16em; color: var(--accent-soft);
  margin: 0 0 10px; font-weight: 600; text-transform: uppercase;
}
.feature p { font-size: 13px; color: #8b97a6; margin: 0; line-height: 1.5; }

/* ---------------- playtest enlistment band ---------------- */
.enlist {
  border-top: 1px solid var(--line);
  background:
    radial-gradient(60% 120% at 50% 0%, rgba(91, 141, 219, 0.07), transparent 70%);
  padding: 44px 0 46px;
}
.enlist h2 {
  font-size: clamp(24px, 3.4vw, 32px); font-weight: 700;
  color: var(--text-strong); margin: 0 0 14px; letter-spacing: 0.01em;
}
.enlist-copy {
  color: var(--sub); font-size: 15.5px; max-width: 66ch;
  margin: 0 0 24px; line-height: 1.65;
}

/* ---------------- screenshot gallery + lightbox ---------------- */
.gallery-section { padding: 34px 0 8px; }
.gallery {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  margin-top: 4px;
}
.shot {
  border: 1px solid var(--line-2); border-radius: 4px; overflow: hidden;
  background: #0a1018; cursor: zoom-in; padding: 0; text-align: left;
}
.shot img { width: 100%; height: 150px; object-fit: cover; display: block; }
.shot figcaption {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  color: #7d8a9a; padding: 8px 10px; text-transform: uppercase;
}
.shot:hover { border-color: var(--dim); }
.shot:hover figcaption { color: var(--accent-soft); }

.lightbox {
  position: fixed; inset: 0; z-index: 50; display: none;
  background: rgba(3, 5, 7, 0.92);
  align-items: center; justify-content: center; flex-direction: column;
  padding: 4vh 4vw;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 100%; max-height: 84vh; width: auto; height: auto;
  border: 1px solid var(--line-2); border-radius: 3px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.6);
}
.lightbox .lb-caption {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.16em;
  color: var(--sub); margin-top: 14px; text-transform: uppercase;
}
.lightbox .lb-close {
  position: absolute; top: 16px; right: 20px;
  background: none; border: 1px solid var(--line-2); border-radius: 3px;
  color: #93a0b0; font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.1em; padding: 8px 14px; cursor: pointer;
}
.lightbox .lb-close:hover { color: var(--text-strong); border-color: var(--dim); }
.lightbox .lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(11, 16, 23, 0.8); border: 1px solid var(--line-2);
  border-radius: 3px; color: #93a0b0; font-size: 20px; line-height: 1;
  padding: 14px 12px; cursor: pointer;
}
.lightbox .lb-nav:hover { color: var(--accent-soft); border-color: var(--dim); }
.lightbox .lb-prev { left: 18px; }
.lightbox .lb-next { right: 18px; }

@media (max-width: 900px) {
  .gallery { grid-template-columns: 1fr 1fr; }
  .lightbox .lb-nav { padding: 10px 8px; }
}

.home-log { padding: 34px 0 40px; border-top: 1px solid var(--line); }
.label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em;
  color: var(--faint); margin: 0 0 14px; font-weight: 600; text-transform: uppercase;
}
.log-row {
  display: flex; gap: 18px; padding: 7px 0; font-size: 13.5px;
  border-bottom: 1px solid #0e141c;
}
.log-row .d { font-family: var(--mono); font-size: 12px; color: var(--accent); white-space: nowrap; padding-top: 1px; }
.log-row .t { color: #a7b2c0; }
.more-link {
  display: inline-block; margin-top: 14px; color: var(--accent); font-size: 12px;
  letter-spacing: 0.1em; text-decoration: none; font-family: var(--mono);
}
.more-link:hover { color: var(--accent-soft); }

/* ---------------- reading pages (wiki / changelog / about) ---------------- */
.page { padding-top: 44px; padding-bottom: 64px; }
.page-narrow { max-width: 780px; }
.page h1 {
  font-size: 30px; font-weight: 700; color: var(--text-strong);
  margin: 0 0 10px; letter-spacing: 0.01em; text-wrap: balance;
}
.page .lede { color: var(--sub); font-size: 15.5px; max-width: 64ch; margin: 0 0 28px; }
.page h2 {
  font-size: 19px; font-weight: 650; color: var(--text-strong);
  margin: 40px 0 12px; padding-top: 18px; border-top: 1px solid var(--line);
}
.page h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 24px; }
.page h3 { font-size: 15px; font-weight: 650; color: var(--accent-soft); margin: 26px 0 8px; }
.page p { max-width: 72ch; }
.page ul, .page ol { max-width: 70ch; padding-left: 22px; }
.page li { margin: 4px 0; }
.page code {
  font-family: var(--mono); font-size: 0.92em; background: var(--panel-2);
  padding: 1px 5px; border-radius: 2px;
}
.stamp {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em;
  color: var(--faint); margin-top: 6px;
}

/* wiki chip nav */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 6px; }
.chip {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.1em;
  color: #93a0b0; text-decoration: none; border: 1px solid var(--line-2);
  padding: 6px 12px; border-radius: 3px;
}
.chip:hover { color: var(--text-strong); border-color: var(--dim); }
.chip.active { color: var(--accent); border-color: var(--accent); }

/* data tables */
.table-wrap { overflow-x: auto; margin: 14px 0 6px; border: 1px solid var(--line); border-radius: 3px; }
table.data {
  border-collapse: collapse; width: 100%; font-size: 13px;
  font-variant-numeric: tabular-nums;
}
table.data th {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--faint); text-align: left;
  padding: 9px 12px; border-bottom: 1px solid var(--line-2);
  background: var(--panel); white-space: nowrap; position: sticky; top: 0;
}
table.data td {
  padding: 8px 12px; border-bottom: 1px solid #0e141c; color: #aeb9c6;
  vertical-align: top;
}
table.data tr:last-child td { border-bottom: 0; }
table.data td.name { color: var(--text-strong); font-weight: 600; white-space: nowrap; }
table.data td.num { white-space: nowrap; }
table.data .note { color: var(--dim); font-size: 12px; }
.vs {
  font-family: var(--mono); font-size: 11.5px; color: #8b97a6; white-space: nowrap;
}
.vs b { color: #aeb9c6; font-weight: 600; }

/* wiki def icons: hand-drawn SVG blueprints emitted by the generator */
.def-icon { width: 34px; height: 34px; display: block; }
.def-icon path, .def-icon circle, .def-icon rect, .def-icon ellipse {
  stroke: var(--accent-soft); stroke-width: 2.2; fill: none;
  stroke-linecap: round; stroke-linejoin: round;
}
td.icon { width: 46px; padding: 7px 2px 7px 12px; }
td.icon .def-icon {
  background: var(--panel); border: 1px solid var(--line-2);
  border-radius: 3px; padding: 3px;
}
.page h2 .def-icon {
  display: inline-block; vertical-align: -9px; margin-right: 10px;
  background: var(--panel); border: 1px solid var(--line-2);
  border-radius: 3px; padding: 3px;
}
.res-chip {
  display: inline-block; width: 10px; height: 10px; border-radius: 2px;
  margin-right: 8px; background: var(--rc, var(--accent));
}
/* real in-game portraits (IconAtlas export) — same chip framing as glyphs.
   max-width:none: the global img{max-width:100%} collapses imgs inside
   auto-layout table cells (cell width derives from content = circular). */
.def-img {
  width: 34px; height: 34px; max-width: none; display: block;
  border: 1px solid var(--line-2); border-radius: 3px;
  background: var(--panel);
}
.def-img.res {
  display: inline-block; width: 24px; height: 24px;
  vertical-align: -7px; margin-right: 8px;
}
.page h2 .def-img {
  display: inline-block; vertical-align: -10px; margin-right: 10px;
}

.badge {
  display: inline-block; font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.1em; padding: 2px 7px; border-radius: 2px;
  border: 1px solid var(--line-2); color: #8b97a6; margin-right: 4px;
  white-space: nowrap;
}
.badge.earth { color: #7fb3d2; border-color: #2a4656; }
.badge.moon { color: #b9c1cb; border-color: #3a414b; }
.badge.mars { color: #dd8a58; border-color: #543525; }
.badge.gate { color: #d9a441; border-color: #4d3d1e; }

/* changelog */
.cl-entry { border-top: 1px solid var(--line); padding: 22px 0 8px; }
.cl-entry:first-of-type { border-top: 0; }
.cl-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.cl-date { font-family: var(--mono); font-size: 12.5px; color: var(--accent); white-space: nowrap; }
.cl-title { font-size: 16.5px; font-weight: 650; color: var(--text-strong); margin: 0; }
.cl-ver {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em;
  color: var(--faint); border: 1px solid var(--line-2); padding: 2px 7px; border-radius: 2px;
}
.cl-entry ul { margin: 10px 0 14px; }
.cl-entry li { color: #a7b2c0; font-size: 13.5px; }

/* forms */
.form-grid { display: grid; gap: 14px; max-width: 560px; margin-top: 18px; }
.form-grid label {
  display: block; font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.14em; color: var(--dim); margin-bottom: 6px; text-transform: uppercase;
}
.form-grid input, .form-grid textarea {
  width: 100%; background: var(--panel); color: var(--text);
  border: 1px solid var(--line-2); border-radius: 3px; padding: 10px 12px;
  font-family: var(--sans); font-size: 14px;
}
.form-grid textarea { min-height: 140px; resize: vertical; }
.form-grid input:focus, .form-grid textarea:focus { border-color: var(--accent); outline: none; }
.form-status { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; min-height: 18px; }
.form-status.ok { color: var(--ok); }
.form-status.err { color: var(--danger); }
.hp-field { position: absolute; left: -9999px; top: -9999px; height: 1px; width: 1px; overflow: hidden; }

/* ---------------- footer ---------------- */
.site-foot { border-top: 1px solid var(--line); margin-top: 24px; }
.site-foot .shell {
  display: flex; justify-content: space-between; align-items: center; gap: 18px;
  padding-top: 20px; padding-bottom: 26px; flex-wrap: wrap;
}
.site-foot .left { font-size: 11px; letter-spacing: 0.1em; color: var(--faint); }
.site-foot .left b { color: var(--dim); font-weight: 600; letter-spacing: 0.22em; }
.site-foot .links { display: flex; gap: 18px; }
.site-foot .links a {
  color: var(--faint); text-decoration: none; font-size: 11px; letter-spacing: 0.12em;
}
.site-foot .links a:hover { color: var(--sub); }
.site-foot .stamp { margin: 0; }

/* 404 */
.notfound { padding-top: 110px; padding-bottom: 130px; text-align: left; }
.notfound .code {
  font-family: var(--mono); font-size: 64px; color: var(--accent); margin: 0 0 6px;
  letter-spacing: 0.1em;
}

/* ---------------- responsive ---------------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding: 44px 0 40px; }
  .features { grid-template-columns: 1fr 1fr; }
  .strip { grid-template-columns: 1fr 1fr; }
  .strip div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .strip div:nth-child(3) { border-left: 0; }
  .nav-links { gap: 16px; }
}
@media (max-width: 560px) {
  .shell { padding: 0 18px; }
  .features { grid-template-columns: 1fr; }
  .nav-links a:not(.play-chip) { display: none; } /* small screens: wordmark + PLAY; pages reachable via footer */
  .site-nav .menu-links-fallback { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
