/* geovis.art — landing page and the "Загрузки" page (site/*.html).
   One stylesheet for both: the gated page at /download/ is served through
   the sidecar, but its assets come from this public folder. */

:root {
  color-scheme: dark;
  --bg: #161618;
  --bg-2: #1e1e21;
  --card: #26262a;
  --line: #34343a;
  --text: #f2f2f2;
  --muted: #a3a3aa;
  --accent: #d7ff5a;
  --accent-ink: #141508;
  --danger: #ff7a7a;
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
a:hover { text-decoration: none; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

/* header */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 0;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: .2px; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; line-height: 1.2; }
.nav { display: flex; gap: 18px; font-size: 15px; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--text); }

/* hero */
.hero { padding: 56px 0 40px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(30px, 4.6vw, 46px); line-height: 1.1; margin: 0 0 16px; letter-spacing: -.5px; }
.hero p.lead { font-size: 18px; color: var(--muted); margin: 0 0 26px; max-width: 520px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; }
.button {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: 12px; border: 0;
  background: var(--accent); color: var(--accent-ink);
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
}
.button:hover { filter: brightness(1.06); }
.button.secondary { background: var(--card); color: var(--text); border: 1px solid var(--line); font-weight: 600; }
.button svg { width: 18px; height: 18px; }
.version { color: var(--muted); font-size: 14px; }
.version b { color: var(--text); font-weight: 600; }
.note { color: var(--muted); font-size: 14px; margin-top: 14px; }

/* the "screenshot" panel — a schematic of the editor, not a bitmap */
.panel {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: 0 30px 60px -30px rgba(0,0,0,.8);
}
.panel .bar { display: flex; gap: 6px; margin-bottom: 12px; }
.panel .bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); display: block; }
.panel .core { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr; gap: 4px; margin-bottom: 12px; }
.panel .core i { display: block; height: 58px; border-radius: 6px; background: linear-gradient(160deg, #6f5a45, #3c3129 70%); }
.panel .core i:nth-child(2) { background: linear-gradient(160deg, #7d6650, #4a3b2e 70%); }
.panel .core i:nth-child(4) { background: linear-gradient(160deg, #5a4a3b, #2f2621 70%); }
.panel .core i:nth-child(6) { background: linear-gradient(160deg, #8a7156, #3c3129 70%); }
.panel .rows { display: grid; gap: 8px; }
.panel .row { display: grid; grid-template-columns: 64px 1fr 92px; gap: 10px; align-items: center; font-size: 12px; color: var(--muted); }
.panel .row b { color: var(--text); font-weight: 600; }
.panel .row .bar2 { height: 8px; border-radius: 4px; background: var(--line); position: relative; overflow: hidden; }
.panel .row .bar2 i { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: 4px; }

/* sections */
section { padding: 36px 0; border-top: 1px solid var(--line); }
section h2 { font-size: 24px; margin: 0 0 20px; letter-spacing: -.2px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card h3 { margin: 0 0 8px; font-size: 17px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.steps .card { position: relative; padding-top: 22px; }
.steps .card::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: -14px; left: 16px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; font-weight: 800; font-size: 14px;
}
.req { display: grid; grid-template-columns: 180px 1fr; gap: 6px 16px; font-size: 15px; }
.req dt { color: var(--muted); }
.req dd { margin: 0; }

/* release notes (rendered from releases.json) */
.notes h4 { margin: 18px 0 6px; font-size: 15px; color: var(--text); }
.notes ul { margin: 0 0 8px; padding-left: 20px; color: var(--muted); font-size: 15px; }
.notes li { margin: 3px 0; }
.notes p { margin: 8px 0; color: var(--muted); }
.notes code { background: var(--bg-2); padding: 1px 5px; border-radius: 5px; font-size: 14px; }
details.release { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 0 18px; margin-bottom: 10px; }
details.release summary { cursor: pointer; padding: 14px 0; font-weight: 600; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
details.release summary .date { color: var(--muted); font-weight: 400; font-size: 14px; }
details.release summary .tag { font-size: 12px; color: var(--accent-ink); background: var(--accent); border-radius: 999px; padding: 2px 8px; font-weight: 700; }
details.release .body { padding: 0 0 14px; }

/* downloads page */
.dl-head { padding: 40px 0 8px; }
.dl-head h1 { margin: 0 0 8px; font-size: clamp(26px, 4vw, 36px); }
.who { color: var(--muted); font-size: 15px; }
.who b { color: var(--text); font-weight: 600; }
.dl-card { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; margin: 22px 0; }
.dl-card .meta { color: var(--muted); font-size: 14px; margin-top: 6px; }
.dl-card .meta b { color: var(--text); font-weight: 600; }
.status { font-size: 14px; color: var(--muted); min-height: 1.4em; }
.status.err { color: var(--danger); }
.sha { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--muted); word-break: break-all; }

footer { padding: 28px 0 40px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
footer a { color: var(--muted); }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding-top: 28px; }
  .panel { order: -1; }
  .nav { display: none; }
  .req { grid-template-columns: 1fr; }
  .dl-card { grid-template-columns: 1fr; }
}
