:root {
  --paper: #e8ebee;
  --paper-2: #dde1e6;
  --card: #f6f7f8;
  --ink: #1b1e24;
  --muted: #5b616b;
  --line: #c3c9d1;
  --amber: #b97c10;
  --green: #2c8452;
  --red: #c4433a;
  --display: 'Unbounded', 'Onest', system-ui, sans-serif;
  --text: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --measure: 36rem;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 0.2em; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: 0.5rem 1rem; }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.08; margin: 0; }
h1 { font-size: clamp(2.1rem, 4.6vw, 4rem); font-weight: 800; max-width: 13ch; }
:lang(ru) h1 { font-size: clamp(1.9rem, 3.9vw, 3.4rem); font-weight: 700; max-width: 15ch; }
h2 { font-size: clamp(1.45rem, 2.6vw, 2.1rem); max-width: 22ch; }
h3 { font-size: 1rem; font-weight: 600; letter-spacing: 0; }
p { margin: 0; max-width: var(--measure); }

/* header */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem var(--gutter);
}
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; font: 700 1.15rem var(--display); }
.top nav { display: flex; align-items: center; gap: clamp(0.8rem, 2vw, 1.8rem); font-size: 0.95rem; }
.top nav a:not(.btn) { text-decoration: none; color: var(--muted); }
.top nav a:not(.btn):hover { color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: 0 1.5rem;
  background: var(--ink); color: var(--paper);
  border: 2px solid var(--ink); border-radius: 999px;
  font: 600 1rem var(--text); text-decoration: none; white-space: nowrap;
}
.btn:hover { background: #343944; border-color: #343944; }
.btn.small { min-height: 2.4rem; padding: 0 1.1rem; font-size: 0.92rem; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.quiet { color: var(--muted); font-weight: 500; }
.fine { color: var(--muted); font-size: 0.92rem; }

/* hero: the copy on the left, the epic playing on the right */
.hero {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
  padding: clamp(2.5rem, 7vw, 6rem) var(--gutter) clamp(2rem, 5vw, 4rem);
}
.hero-copy { display: grid; gap: 1.4rem; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.5; max-width: 30rem; }
.cta { display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; }

.epic { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 1.1rem 1.1rem 0.6rem; }
.epic-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font-size: 0.95rem; }
.epic-head span { color: var(--muted); font-variant-numeric: tabular-nums; }
.epic-bar { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin: 0.7rem 0 0.4rem; }
.epic-bar i { height: 5px; border-radius: 3px; background: var(--line); transition: background 0.4s; }
.epic-bar i.working { background: var(--amber); }
.epic-bar i.pr, .epic-bar i.merged { background: var(--green); }
.epic-bar i.needs { background: var(--red); }
#epic-map { width: 100%; height: auto; display: block; overflow: visible; }

.card rect { fill: #fff; stroke: var(--line); stroke-width: 1.5; transition: stroke 0.4s, fill 0.4s; }
.card.blocked rect { fill: var(--card); stroke-dasharray: 5 4; }
.card.working rect { stroke: var(--amber); }
.card.pr rect { stroke: var(--green); }
.card.merged rect { fill: #e6f1ea; stroke: var(--green); }
.card.needs rect { stroke: var(--red); }
.card .id { font: 500 12px var(--mono); fill: var(--muted); }
.card .title { font: 600 15px var(--text); fill: var(--ink); }
.card.blocked .title { fill: var(--muted); }
.card .status { font: 500 12.5px var(--text); fill: var(--muted); }
.card.working .status { fill: var(--amber); }
.card.pr .status, .card.merged .status { fill: var(--green); }
.card.needs .status { fill: var(--red); }
.card .detail { font: 400 12px var(--mono); fill: var(--muted); }
.card .dot { fill: var(--amber); opacity: 0; }
.card.working .dot { opacity: 1; animation: pulse 1.2s ease-in-out infinite; }
.edge { fill: none; stroke: var(--line); stroke-width: 1.5; stroke-dasharray: 5 5; transition: stroke 0.4s; }
.edge.open { stroke: var(--green); stroke-dasharray: none; }
@keyframes pulse { 50% { opacity: 0.25; } }

.row img {
  border-radius: 14px; background: #1d1b1a;
  box-shadow: 0 1px 0 rgba(27, 30, 36, 0.08), 0 30px 60px -30px rgba(27, 30, 36, 0.45);
}

/* features: text and a window, alternating */
.features { padding: clamp(2rem, 5vw, 4rem) var(--gutter) 0; display: grid; gap: clamp(4rem, 9vw, 7.5rem); }
.row { display: grid; grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.row.flip { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); }
.row.flip .row-copy { order: 2; }
.row-copy { display: grid; gap: 1.1rem; }
.row-copy p { color: #353a43; }

.also { display: grid; grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr); gap: clamp(2rem, 5vw, 4.5rem); border-top: 2px solid var(--ink); padding-top: 2rem; }
.also dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.8rem 2.5rem; }
.also dt { font-weight: 700; margin-bottom: 0.3rem; }
.also dd { margin: 0; color: var(--muted); }

.privacy { margin: clamp(4rem, 9vw, 8rem) var(--gutter) 0; padding: clamp(2rem, 5vw, 3.5rem); background: var(--ink); color: var(--paper); border-radius: 22px; display: grid; gap: 1.2rem; }
.privacy p { color: #c9ced6; max-width: 44rem; }
.privacy a { color: var(--paper); font-weight: 600; }

.download { padding: clamp(4rem, 9vw, 8rem) var(--gutter) 0; display: grid; gap: 1.6rem; }
.platforms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.platforms > div { display: flex; flex-wrap: wrap; gap: 0.6rem; align-content: flex-start; padding-top: 1rem; border-top: 1px solid var(--line); }
.platforms h3 { flex-basis: 100%; margin-bottom: 0.3rem; }
pre { margin: 0; overflow-x: auto; background: var(--paper-2); border-radius: 10px; padding: 0.9rem 1.1rem; max-width: 40rem; }
code { font: 400 0.9rem var(--mono); }

.faq { padding: clamp(4rem, 9vw, 8rem) var(--gutter) 0; max-width: calc(48rem + 2 * var(--gutter)); }
.faq h2 { margin-bottom: 1.2rem; }
details { border-top: 1px solid var(--line); }
details:last-child { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; padding: 1.1rem 0; font-weight: 600; font-size: 1.08rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; font: 500 1.3rem/1 var(--text); color: var(--muted); }
details[open] summary::after { content: '−'; }
details p { padding-bottom: 1.2rem; color: #353a43; }

.bottom { display: flex; flex-wrap: wrap; gap: 0.6rem 1.8rem; padding: clamp(4rem, 9vw, 7rem) var(--gutter) 2.5rem; color: var(--muted); font-size: 0.92rem; }
.bottom a { text-decoration: none; }
.bottom a:hover { color: var(--ink); }

@media (max-width: 900px) {
  .hero, .row, .also { grid-template-columns: 1fr; }
  .row.flip { grid-template-columns: 1fr; }
  .row.flip .row-copy { order: 0; }
  .platforms { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .top nav a:not(.btn):not([hreflang]) { display: none; }
  .also dl { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card.working .dot { animation: none; }
  .card rect, .edge, .epic-bar i { transition: none; }
}
