/* NEXORA download page.
   No framework, no build step, no dependency — the same rule the engine holds
   itself to. One stylesheet, served as written. */

:root {
  color-scheme: dark;

  --ink: #e6edf3;
  --ink-dim: #9aa7b4;
  --ink-faint: #6b7885;
  --ground: #0b0f14;
  --raised: #121822;
  --raised-2: #18202c;
  --line: #243040;
  --accent: #4fd6c8;
  --accent-ink: #062521;
  --warn-line: #7a5f2a;
  --warn-bg: #1d1809;

  --measure: 62ch;
  --radius: 10px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 0;
  background: var(--ground);
  color: var(--ink);
  font: 16px/1.65 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  /* A very quiet vertical gradient, so the page has depth without a texture. */
  background-image: radial-gradient(90rem 40rem at 50% -10rem, #10202a 0%, transparent 70%);
  background-repeat: no-repeat;
}

code, pre, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

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

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 0.6em; }
h1 { font-size: clamp(2rem, 6vw, 3.4rem); font-weight: 650; }
h2 { font-size: clamp(1.35rem, 3.4vw, 1.9rem); font-weight: 620; }
h3 { font-size: 1.05rem; font-weight: 620; }
p { margin: 0 0 1em; }

/* ---------- shell ---------------------------------------------------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.1rem clamp(1rem, 5vw, 3rem);
  padding-top: calc(1.1rem + env(safe-area-inset-top, 0px));
  border-bottom: 1px solid var(--line);
}

.wordmark {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
  letter-spacing: 0.22em;
  font-size: 0.95rem;
}

.top nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.top nav a { color: var(--ink-dim); text-decoration: none; font-size: 0.92rem; }
.top nav a:hover { color: var(--ink); }

main { display: block; }

section {
  padding: clamp(2.5rem, 7vw, 4.5rem) clamp(1rem, 5vw, 3rem);
  max-width: 68rem;
  margin: 0 auto;
}

/* A full-bleed band whose contents still line up with the plain sections.
   `margin-inline: auto` on each child was the obvious way to write this and the
   wrong one: it centres every child according to *its own* width, so a heading,
   a narrow paragraph and a full-width block landed on three different left
   edges. One shared content column, and children aligned in it, is the fix. */
.band {
  background: var(--raised);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  max-width: none;
  padding-inline: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 68rem) minmax(0, 1fr);
}

/* The gutter is a margin, not padding: a child with its own padding and border
   (the terminal block) must keep them. */
.band > * {
  grid-column: 2;
  margin-inline: clamp(1rem, 5vw, 3rem);
}

footer {
  padding: 2.5rem clamp(1rem, 5vw, 3rem);
  padding-bottom: calc(2.5rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line);
  color: var(--ink-dim);
  font-size: 0.9rem;
  max-width: 68rem;
  margin: 0 auto;
}

.muted { color: var(--ink-faint); }
.sub { color: var(--ink-dim); max-width: var(--measure); }

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

.eyebrow {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.lead { font-size: 1.12rem; max-width: var(--measure); color: var(--ink); }

.notice {
  border: 1px solid var(--warn-line);
  background: var(--warn-bg);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin-block: 1.75rem;
  max-width: var(--measure);
  font-size: 0.97rem;
}

.cta { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.5rem; }

.button {
  display: inline-block;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--raised-2);
  color: var(--ink);
  text-decoration: none;
  font-weight: 560;
  font-size: 0.97rem;
}

.button:hover { border-color: var(--accent); }

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.button.primary:hover { filter: brightness(1.08); }

/* ---------- terminal -------------------------------------------------- */

.terminal {
  background: #070a0e;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  overflow-x: auto;
  font-size: 0.86rem;
  line-height: 1.6;
  color: #cfe3e0;
  /* Block only: the inline margin belongs to whatever lays this out. */
  margin-block: 1.25rem;
}

.terminal code { white-space: pre; }

/* ---------- downloads ------------------------------------------------- */

.status {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  color: var(--ink-dim);
  background: var(--raised);
  max-width: var(--measure);
}

.status.problem { border-color: var(--warn-line); background: var(--warn-bg); color: var(--ink); }
.status a { color: var(--accent); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.asset {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--raised);
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.asset.here { border-color: var(--accent); }

.asset .platform { font-weight: 620; font-size: 1.02rem; }

.asset .for-you {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.asset .meta { color: var(--ink-faint); font-size: 0.84rem; }

.asset .filename {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  color: var(--ink-faint);
  overflow-wrap: anywhere;
}

.asset .button { margin-top: 0.6rem; text-align: center; }

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--raised-2);
  padding: 1.1rem;
  text-decoration: none;
  color: var(--ink);
  display: block;
}

.card:hover { border-color: var(--accent); }
.card h3 { margin-bottom: 0.35rem; }
.card p { color: var(--ink-dim); font-size: 0.9rem; margin: 0; }

.links { margin-top: 1.5rem; }

.verify {
  margin-top: 1.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  background: var(--raised);
  max-width: var(--measure);
}

.verify summary { cursor: pointer; font-weight: 560; }
.verify > *:not(summary) { margin-top: 0.9rem; }
.verify .terminal { margin-bottom: 0; }

/* ---------- programs -------------------------------------------------- */

.programs { margin-block: 1.5rem 0; display: grid; gap: 1.25rem; }
/* Otherwise the closing note reads as part of the last program's entry. */
.programs + .sub { margin-top: 1.5rem; }
.programs > div { border-left: 2px solid var(--line); padding-left: 1rem; }
.programs dt { font-size: 0.95rem; margin-bottom: 0.3rem; }
.programs dt code { color: var(--accent); }
.programs dd { margin: 0; color: var(--ink-dim); max-width: var(--measure); }

/* ---------- motion ---------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .button, .card, .asset { transition: border-color 120ms ease, filter 120ms ease; }
}
