:root {
  --bg: #0e0d11;
  --surface: #17151c;
  --surface-2: #1e1b24;
  --border: #2c2833;
  --text: #ebe8f0;
  --muted: #a39dad;
  --steel-hi: #f2f4f7;
  --steel-lo: #8a909a;
  --ember: #ff7a1a;
  --ember-hi: #ffb347;
  --ember-glow: rgba(255, 122, 26, 0.35);
  --radius: 14px;
  --gutter: clamp(16px, 4vw, 40px);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "Cascadia Code", Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--ember-hi); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
code, pre, kbd { font-family: var(--mono); font-size: 0.9em; }
:focus-visible { outline: 2px solid var(--ember-hi); outline-offset: 3px; border-radius: 4px; }

/* Alpha notices ---------------------------------------------------------- */
.alpha-banner {
  padding: 9px var(--gutter); text-align: center; font-size: 0.9rem;
  color: #1a0d03; background: linear-gradient(90deg, var(--ember), var(--ember-hi));
}
.alpha-banner strong { text-transform: uppercase; letter-spacing: 0.08em; }
.alpha-callout {
  margin: 0 0 20px; padding: 18px 22px; border-radius: var(--radius);
  border: 1px solid rgba(255, 122, 26, 0.55); border-left-width: 4px;
  background: rgba(255, 122, 26, 0.08);
}
.alpha-callout h3 { margin: 0 0 6px; color: var(--ember-hi); font-size: 1.05rem; }
.alpha-callout p, .alpha-callout li { margin: 0; color: var(--text); }
.alpha-callout ul { margin: 8px 0 0; padding-left: 20px; }
.alpha-callout li + li { margin-top: 4px; }

/* Header ----------------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px var(--gutter);
  background: rgba(14, 13, 17, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; letter-spacing: 0.22em; }
.brand:hover { text-decoration: none; }
.topbar nav { display: flex; gap: clamp(12px, 3vw, 28px); flex-wrap: wrap; justify-content: flex-end; }
.topbar nav a { color: var(--muted); font-size: 0.95rem; }
.topbar nav a:hover { color: var(--text); text-decoration: none; }

/* Hero ------------------------------------------------------------------- */
.hero {
  position: relative;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: clamp(24px, 6vw, 64px) var(--gutter) clamp(48px, 8vw, 96px);
  isolation: isolate;
}
.glow {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 40% 30% at 50% 28%, var(--ember-glow), transparent 70%),
    radial-gradient(ellipse 70% 60% at 50% 40%, rgba(120, 100, 160, 0.10), transparent 75%);
}
.wordmark { width: min(720px, 100%); filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.6)); }
.pitch { max-width: 640px; margin: 8px 0 28px; font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: var(--text); }
.cta { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.meta { margin-top: 22px; color: var(--muted); font-size: 0.92rem; }
.badge {
  display: inline-block; padding: 1px 10px; border-radius: 999px;
  background: var(--ember); color: #1a0d03; font-size: 0.82rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
}

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: 10px;
  font-weight: 650; letter-spacing: 0.02em; transition: transform 0.12s, box-shadow 0.2s, background 0.2s;
}
.button:hover { text-decoration: none; transform: translateY(-1px); }
.button.primary {
  color: #1a0d03;
  background: linear-gradient(180deg, var(--ember-hi), var(--ember));
  box-shadow: 0 6px 24px var(--ember-glow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.button.primary:hover { box-shadow: 0 10px 34px rgba(255, 122, 26, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.button.ghost { color: var(--text); border: 1px solid var(--border); background: var(--surface); }
.button.ghost:hover { border-color: var(--steel-lo); }

/* Sections --------------------------------------------------------------- */
.section { max-width: 1160px; margin: 0 auto; padding: clamp(48px, 7vw, 88px) var(--gutter) 0; }
.section h2 {
  margin: 0 0 8px;
  font-size: clamp(1.7rem, 4vw, 2.4rem); letter-spacing: 0.12em; text-transform: uppercase;
  background: linear-gradient(180deg, var(--steel-hi), var(--steel-lo));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { max-width: 760px; margin: 0 0 32px; color: var(--muted); }
.lede strong { color: var(--text); }
.small { color: var(--muted); font-size: 0.9rem; }
.note { margin-top: 28px; }

.grid { display: grid; gap: 16px; }
.features { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.steps { grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); }
.grid article {
  position: relative; padding: 22px; border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  min-width: 0;
}
.grid h3 { margin: 0 0 8px; font-size: 1.06rem; }
.grid p, .grid li { color: var(--muted); margin: 0; }
.grid ul { margin: 0; padding-left: 20px; }
.grid li + li { margin-top: 6px; }
.features article::before {
  content: ""; position: absolute; left: 22px; top: 0; width: 34px; height: 2px;
  background: linear-gradient(90deg, var(--ember), var(--ember-hi));
  box-shadow: 0 0 12px var(--ember-glow);
}
.step {
  display: inline-grid; place-items: center; width: 30px; height: 30px; margin-bottom: 10px;
  border-radius: 50%; font-weight: 800; color: #1a0d03;
  background: linear-gradient(180deg, var(--ember-hi), var(--ember));
}
pre {
  margin: 12px 0 0; padding: 14px 16px; overflow-x: auto;
  background: #0a090c; border: 1px solid var(--border); border-radius: 10px; color: #d9d4e2;
  line-height: 1.5;
}
kbd {
  display: inline-block; min-width: 1.6em; padding: 0 5px; margin: 0 1px; text-align: center;
  border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px;
  background: var(--surface-2); color: var(--text); font-size: 0.82em;
}

/* Downloads -------------------------------------------------------------- */
.platforms { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); margin-bottom: 20px; }
.platform {
  padding: 22px; border-radius: var(--radius); border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
}
.platform h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 1.15rem; }
.platform h3 svg { width: 22px; height: 22px; fill: var(--steel-hi); }
.file {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 14px;
  padding: 14px; border-radius: 10px; border: 1px solid transparent; background: rgba(0, 0, 0, 0.22);
}
.file + .file { margin-top: 10px; }
.file.recommended { border-color: rgba(255, 122, 26, 0.55); box-shadow: 0 0 0 1px rgba(255, 122, 26, 0.18), 0 6px 26px rgba(255, 122, 26, 0.12); }
.file .arch { font-weight: 700; }
.file .arch .tag { margin-left: 8px; font-size: 0.75rem; font-weight: 600; color: var(--ember-hi); display: none; }
.file.recommended .arch .tag { display: inline; }
.file .detail { grid-column: 1; color: var(--muted); font-size: 0.85rem; overflow-wrap: anywhere; }
.file .button { grid-row: 1 / span 2; grid-column: 2; min-height: 40px; padding: 0 16px; font-size: 0.92rem; }
.file:not(.recommended) .button { color: var(--text); background: var(--surface-2); border: 1px solid var(--border); box-shadow: none; }
.file .sha { grid-column: 1 / -1; font-family: var(--mono); font-size: 0.72rem; color: #6f6979; overflow-wrap: anywhere; }
.empty { padding: 22px; border: 1px dashed var(--border); border-radius: var(--radius); color: var(--muted); }

/* Footer ----------------------------------------------------------------- */
.footer {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  max-width: 1160px; margin: clamp(56px, 8vw, 96px) auto 0; padding: 24px var(--gutter) 40px;
  border-top: 1px solid var(--border); color: var(--muted); font-size: 0.9rem;
}
.footer .build { margin-left: auto; font-family: var(--mono); font-size: 0.8rem; }

@media (max-width: 560px) {
  .topbar nav a:not([href="#download"]) { display: none; }
  .file { grid-template-columns: 1fr; }
  .file .button { grid-row: auto; grid-column: 1; width: 100%; }
  .footer .build { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
}
