/* Vernier Games — shared styles
   Palette and type follow Starlight's title screen: Share Tech Mono, signal blue, thrust orange. */
:root {
  --void: #03070f;        /* page */
  --hull: #0b1729;        /* panels */
  --hull-line: #1a3150;   /* hairlines on panels */
  --signal: #2c8fd8;      /* Starlight accent */
  --ice: #7ed1ff;         /* Starlight light accent */
  --thrust: #ff8a3a;      /* Starlight fire button */
  --text: #dfeaf6;
  --dim: #8ea6bf;
  --glow: rgba(44, 143, 216, 0.75);
  --stars: 1;
  color-scheme: dark;

  --mono: 'Share Tech Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --sans: 'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --measure: 64ch;
  --gutter: clamp(20px, 5vw, 64px);
}
@media (prefers-color-scheme: light) {
  :root {
    --void: #eef3f8;
    --hull: #ffffff;
    --hull-line: #c9d7e6;
    --signal: #1d6fb2;
    --ice: #1d6fb2;
    --thrust: #c4560f;
    --text: #0b1729;
    --dim: #4a627c;
    --glow: rgba(29, 111, 178, 0.18);
    --stars: 0;
    color-scheme: light;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--void);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  min-height: 100vh;
  display: flex; flex-direction: column;
}
main { flex: 1; }
img, svg { max-width: 100%; display: block; }
a { color: var(--ice); text-underline-offset: 3px; }
a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--thrust); outline-offset: 3px; border-radius: 2px; }

#stars { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: var(--stars); pointer-events: none; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }

/* ── Header ── */
.site-header { padding: 22px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { display: block; text-decoration: none; }
.brand img { height: 40px; width: auto; }
.site-nav { display: flex; gap: clamp(14px, 3vw, 32px); font-family: var(--mono); font-size: 0.95rem; }
.site-nav a { color: var(--dim); text-decoration: none; padding: 6px 0; border-bottom: 1px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--thrust); }

/* ── Hero with vernier scale ── */
.hero { padding: clamp(56px, 12vh, 140px) 0 clamp(48px, 9vh, 110px); }
/* Logo lockup (raster, see assets/logo/). Same max width as the scale so they line up. */
.wordmark { max-width: 760px; margin: 0; line-height: 0; }
.wordmark img { width: 100%; height: auto; }
.scale { margin: clamp(32px, 6vh, 56px) 0 28px; width: 100%; max-width: 760px; height: auto; overflow: visible; }
.scale .tick { stroke: var(--dim); stroke-width: 1.2; }
.scale .tick.major { stroke: var(--text); }
.scale .vtick { stroke: var(--ice); stroke-width: 1.2; }
.scale .vtick.hit { stroke: var(--thrust); stroke-width: 2; }
.scale .rail { stroke: var(--hull-line); stroke-width: 1; }
.scale #vernier { transition: transform 1.6s cubic-bezier(.16, 1, .3, 1); }
.lede { max-width: 46ch; font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--text); }
.lede + .lede { margin-top: 0.6em; color: var(--dim); font-size: 1.0625rem; }

/* ── Sections ── */
section { padding: clamp(48px, 9vh, 96px) 0; }
h1, h2, h3 { font-family: var(--mono); font-weight: normal; line-height: 1.15; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: 0.06em; margin-bottom: 0.5em; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); letter-spacing: 0.04em; margin-bottom: 0.6em; }
h3 { font-size: 1.15rem; letter-spacing: 0.03em; margin-bottom: 0.35em; color: var(--ice); }
p { max-width: var(--measure); }
p + p { margin-top: 1em; }
.muted { color: var(--dim); }
.rule { border: 0; border-top: 1px solid var(--hull-line); }

/* ── Game feature (home + Starlight page) ── */
.feature { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.game-title {
  font-family: var(--mono); font-size: clamp(2.4rem, 6vw, 4.4rem); letter-spacing: 0.22em; line-height: 1;
  text-shadow: 0 0 20px var(--glow), 0 0 40px var(--glow); margin-bottom: 0.35em;
}
.status { display: inline-block; font-family: var(--mono); font-size: 0.9rem; color: var(--thrust); border: 1px solid currentColor; padding: 3px 10px; border-radius: 2px; margin-bottom: 1.2em; }
.keyart { background: var(--hull); border: 1px solid var(--hull-line); aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; }
.keyart svg { width: 78%; }
.keyart .r { stroke: var(--signal); fill: none; stroke-width: 2; }
.keyart .r2 { stroke: var(--ice); fill: none; stroke-width: 1; opacity: .6; }
.keyart .lock { stroke: var(--thrust); fill: none; stroke-width: 2.5; }
.keyart text { fill: var(--dim); font-family: var(--mono); font-size: 13px; }

.btn {
  display: inline-block; font-family: var(--mono); font-size: 1rem; text-decoration: none; cursor: pointer;
  color: var(--void); background: var(--ice); border: 1px solid var(--ice); padding: 11px 20px; border-radius: 3px;
}
.btn:hover { color: var(--void); background: var(--text); border-color: var(--text); }
.btn.ghost { background: transparent; color: var(--ice); }
.btn.ghost:hover { color: var(--text); border-color: var(--text); background: transparent; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 1.6em; }

/* ── Route: Starlight's campaign runs as a sequence of systems ── */
.route { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 28px; position: relative; }
.route::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; border-top: 1px dashed var(--hull-line); }
.route li { position: relative; padding-top: 30px; padding-right: 16px; }
.route li::before { content: ""; position: absolute; top: 0; left: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--void); border: 2px solid var(--signal); }
.route li.unknown::before { border-style: dashed; border-color: var(--dim); }
.route b { display: block; font-family: var(--mono); font-weight: normal; color: var(--text); }
.route span { color: var(--dim); font-size: 0.95rem; }

/* ── Detail rows (features, fact sheet) ── */
.rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(24px, 4vw, 56px); margin-top: 12px; }
.rows > div { border-top: 1px solid var(--hull-line); padding: 22px 0 26px; }
.rows p { color: var(--dim); }

.facts { border-collapse: collapse; width: 100%; max-width: 720px; }
.facts th, .facts td { text-align: left; vertical-align: top; padding: 12px 0; border-top: 1px solid var(--hull-line); }
.facts th { font-family: var(--mono); font-weight: normal; color: var(--dim); width: 38%; padding-right: 20px; }

.assets { list-style: none; max-width: 720px; }
.assets li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--hull-line); }
.assets .pending { color: var(--dim); font-family: var(--mono); font-size: 0.9rem; white-space: nowrap; }

/* ── Signup (Netlify Forms) ── */
.signup { background: var(--hull); border: 1px solid var(--hull-line); padding: clamp(24px, 4vw, 44px); }
.signup form { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; max-width: 520px; }
.signup label { flex-basis: 100%; font-family: var(--mono); font-size: 0.95rem; color: var(--dim); }
.signup input[type="email"] {
  flex: 1 1 240px; min-width: 0; font: inherit; color: var(--text); background: var(--void);
  border: 1px solid var(--hull-line); border-radius: 3px; padding: 10px 12px;
}
.signup input[type="email"]:focus { border-color: var(--ice); outline: none; }
.hidden { position: absolute; left: -9999px; }

/* ── Footer ── */
.site-footer { padding: 36px 0 44px; border-top: 1px solid var(--hull-line); margin-top: 32px; color: var(--dim); font-size: 0.95rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--dim); }
.site-footer a:hover { color: var(--text); }

@media (max-width: 760px) {
  .feature, .rows { grid-template-columns: 1fr; }
  .route { grid-template-columns: 1fr 1fr; row-gap: 26px; }
  .route::before { display: none; }
  .brand img { height: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .scale #vernier { transition: none; }
}
