/* Voxelheart download page.
 *
 * Uses the same token values as ui-style-guide.html, but with system font
 * fallbacks instead of the bundled Cairo/Merriweather webfonts: this page is
 * embedded in the backend binary, and 5 MB of variable fonts in a server image
 * to style one download button is not a trade worth making. The token stacks
 * already name Georgia and Verdana as the fallbacks, so the page degrades
 * along a path the design system anticipated.
 */

:root {
  --ink-950: #071116;
  --ink-900: #0b1a21;
  --ink-850: #10242a;
  --ink-800: #142d33;
  --ink-750: #1b3d42;
  --ink-700: #21474d;
  --line: rgba(119, 169, 157, .16);
  --text: #f4f7f0;
  --text-soft: #c8d7d2;
  --muted: #91aaa3;
  --quiet: #6f8b84;
  --mint: #37e08f;
  --mint-bright: #73f2b0;
  --mint-deep: #137252;
  --gold: #ffd24b;
  --danger: #ff615a;
  --info: #39c7ff;
  --state-normal: #164b52;
  --state-normal-edge: #36b28c;
  --state-success: #24c97f;
  --state-success-edge: #087347;

  --display: Georgia, 'Merriweather', serif;
  --ui: Verdana, 'Cairo', system-ui, sans-serif;

  --radius-control: 2px;
  --action-edge-size: 4px;
  --button-height: 56px;
  --button-lift: 12px;
  --button-badge: 38px;
  --motion-fast: 160ms;
  --cut-shoulder: 66%;
  --cut: polygon(7% 0, 93% 0, 93% var(--cut-shoulder), 50% 100%, 7% var(--cut-shoulder));
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ink-950);
  color: var(--text);
  font-family: var(--ui);
  font-size: 16px;
  line-height: 1.5;
}

a { color: inherit; }
code {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 7px;
  background: var(--ink-950);
  color: var(--mint-bright);
  font: 12px/1.5 Consolas, monospace;
  word-break: break-all;
}
::selection { background: var(--mint); color: var(--ink-950); }

/* ----------------------------------------------------------------- chrome */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 18px clamp(20px, 5vw, 64px);
  background: #0a181e;
}

.brand { display: grid; grid-template-columns: 42px 1fr; gap: 12px; align-items: center; }
.brand b { display: block; margin-top: 2px; font: 900 19px/1 var(--display); }

.emblem {
  display: grid;
  place-items: center;
  width: 38px;
  height: 44px;
  clip-path: var(--cut);
  background: linear-gradient(145deg, var(--mint) 0 49%, var(--ink-700) 50%);
  color: #f5ead0;
  font: 900 22px/1 var(--display);
}
.emblem.small { width: 30px; height: 35px; font-size: 15px; }

.kicker {
  color: var(--mint);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.7px;
  text-transform: uppercase;
}

.topnav { display: flex; gap: 18px; }
.topnav a {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .6px;
  text-decoration: none;
  text-transform: uppercase;
}
.topnav a:hover { color: var(--text); }

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

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
  gap: 40px;
  align-items: start;
  padding: clamp(40px, 7vw, 84px) clamp(20px, 5vw, 64px);
  overflow: hidden;
  background: linear-gradient(155deg, #15333a 0 34%, var(--ink-900) 34% 100%);
}
.hero::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  top: -230px;
  right: -160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(55, 224, 143, .22), transparent 68%);
  pointer-events: none;
}
.hero-copy { position: relative; z-index: 1; max-width: 62ch; }

h1 {
  margin: 10px 0 16px;
  font: 900 clamp(40px, 6.5vw, 72px)/.96 var(--display);
  letter-spacing: -2.5px;
}
.hero p { margin: 0 0 28px; color: var(--text-soft); font-size: 18px; line-height: 1.62; }

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

.btn {
  --button-fill: var(--state-normal);
  --action-edge: var(--state-normal-edge);
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  min-height: var(--button-height);
  padding: 0 24px;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-control);
  background: linear-gradient(90deg, color-mix(in srgb, var(--button-fill) 92%, #fff), var(--button-fill) 70%);
  box-shadow:
    inset 0 calc(-1 * var(--action-edge-size)) var(--action-edge),
    inset 0 1px rgba(255, 255, 255, .15),
    0 var(--button-lift) calc(var(--button-lift) * 1.8) calc(var(--button-lift) * -1.25) rgba(0, 0, 0, .9);
  color: #e8f3ef;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .3px;
  text-decoration: none;
  transition: filter var(--motion-fast), transform var(--motion-fast);
}
.btn.primary { --button-fill: var(--state-success); --action-edge: var(--state-success-edge); color: #052517; }
.btn[data-icon] { padding-left: calc(var(--button-badge) + 20px); }
.btn[data-icon]::before {
  content: attr(data-icon);
  position: absolute;
  left: 6px;
  top: 50%;
  display: grid;
  place-items: center;
  width: var(--button-badge);
  height: calc(var(--button-badge) + 3px);
  transform: translateY(-52%);
  clip-path: var(--cut);
  background: linear-gradient(145deg,
    color-mix(in srgb, var(--action-edge) 82%, #fff) 0 49%,
    color-mix(in srgb, var(--button-fill) 70%, var(--ink-950)) 50%);
  color: #fff5dc;
  font-size: 17px;
  font-weight: 900;
  text-shadow: -1px -1px #081016, 1px -1px #081016, -1px 1px #081016, 1px 1px #081016;
}
.btn:hover { filter: brightness(1.1) saturate(1.08); transform: translateY(-2px); }
.btn:active { transform: translateY(2px); }
.btn[aria-disabled="true"] { filter: grayscale(.6) brightness(.7); pointer-events: none; }

.download-block { display: grid; gap: 10px; justify-items: start; }
.download-meta { color: var(--quiet); font-size: 12px; letter-spacing: .4px; }
.download-meta code { margin-top: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 22px; }
.chip {
  padding: 6px 10px;
  background: rgba(5, 15, 21, .48);
  color: #bcd1ca;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .7px;
  text-transform: uppercase;
}

/* ------------------------------------------------------------ side panel */

.hero-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  padding: 22px;
  background: rgba(9, 22, 27, .82);
  box-shadow: inset 3px 0 var(--state-normal-edge);
}
.panel-head { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: center; }
.panel-head b { display: block; margin-top: 2px; font: 900 15px/1.2 var(--display); }

.matrix { width: 100%; border-collapse: collapse; font-size: 13px; }
.matrix th, .matrix td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.matrix th { color: var(--mint); font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; }
.matrix td:first-child { font-weight: 900; }
.muted { color: var(--muted); }

.callout {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  background: var(--ink-850);
  box-shadow: inset 3px 0 var(--state-normal-edge);
}
.callout > i {
  display: grid;
  place-items: center;
  width: 26px;
  height: 31px;
  clip-path: var(--cut);
  background: #25463f;
  color: var(--mint);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}
.callout b { display: block; margin-bottom: 5px; font-size: 14px; }
.callout p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }

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

section { padding: clamp(44px, 6vw, 76px) clamp(20px, 5vw, 64px); }
section:nth-of-type(even) { background: #0a171d; }

.section-head { display: grid; grid-template-columns: 36px 1fr; gap: 16px; max-width: 820px; margin-bottom: 30px; }
.section-no { padding-top: 8px; color: var(--quiet); font-size: 11px; font-weight: 900; letter-spacing: 1.7px; }
h2 { margin: 0 0 8px; font: 900 clamp(28px, 4vw, 40px)/1 var(--display); letter-spacing: -1px; }
.section-head p { margin: 0; color: var(--muted); font-size: 15px; }

.step-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.step { min-height: 180px; padding: 22px; background: var(--ink-850); }
.step b { display: block; color: var(--gold); font: 900 26px/1 var(--display); }
.step h3 { margin: 26px 0 8px; font: 900 19px/1.15 var(--display); }
.step p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }

.requirements .matrix { background: var(--ink-850); margin-bottom: 16px; }

footer {
  padding: 26px clamp(20px, 5vw, 64px);
  border-top: 1px solid var(--line);
  color: var(--quiet);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .step-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; }
}
