/* Личное пространство.
 *
 * Вся страница — одно пространство. Сцена (space.js, WebGL2) закреплена
 * позади и видна сквозь всё: на первом экране целиком, дальше — через
 * затемнение и стекло разделов. Пока сцена не готова и там, где её нет,
 * на её месте лежит её же кадр (img/poster-*.jpg).
 *
 * Стекло здесь — материал мира, а не украшение: панели в сцене, чипы
 * фраз, шаги и заметные блоки разделов сделаны из одного и того же
 * дымчатого стекла с освещённым краем.
 */

@font-face {
  font-family: "Sofia Sans";
  src: url("fonts/SofiaSans-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --void: #07060d;
  --haze: #2a2350;
  --ink: #eceaf6;
  --ink-soft: #b0abc8;
  --ink-faint: #8e89aa;
  /* Свет Рины: её ядро в сцене и единственная залитая кнопка. */
  --lavender: #b9a8ff;
  --lavender-high: #d2c7ff;
  --glass: rgb(236 234 246 / 0.055);
  --glass-high: rgb(236 234 246 / 0.1);
  --glass-edge: rgb(217 210 255 / 0.2);
  --glass-edge-high: rgb(217 210 255 / 0.42);
  --hairline: rgb(217 210 255 / 0.14);

  --font: "Sofia Sans", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --gutter: clamp(20px, 5vw, 88px);
  --band: clamp(96px, 15vh, 168px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: dark;
}

html {
  background: var(--void);
  color: var(--ink);
  scrollbar-color: #2b2742 var(--void);
  caret-color: var(--lavender);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--void);
  font: 400 17px/1.6 var(--font);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgb(185 168 255 / 0.32);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--lavender);
  outline-offset: 4px;
  border-radius: 12px;
}

a {
  color: inherit;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -80px;
  z-index: 20;
  padding: 10px 16px;
  background: var(--lavender);
  color: var(--void);
  text-decoration: none;
  border-radius: 12px;
}

.skip:focus {
  top: 14px;
}

/* --- пространство позади страницы ------------------------------------- */

/* Кадр сцены, пока WebGL не готов и там, где его нет. Он кроет первый
   экран, как холст, а не всю страницу: ширина не меньше экрана и не
   меньше пропорции кадра (1440 × 900) от его высоты. */
.backdrop {
  position: fixed;
  inset: 0 0 auto;
  height: 100svh;
  background:
    url("img/poster-wide.jpg") 50% 0 / max(100%, 160svh) auto no-repeat,
    var(--void);
  pointer-events: none;
}

.scene {
  position: fixed;
  inset: 0 0 auto;
  width: 100%;
  height: 100svh;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1200ms var(--ease-out);
}

html[lang="en"] .backdrop {
  background-image: url("img/poster-wide-en.jpg");
}

.gl-ready .scene {
  opacity: 1;
}

/* Чем дальше от первого экрана, тем темнее пространство под текстом.
   Прозрачность задаёт space.js по прокрутке; без скриптов разделы
   получают свою подложку ниже. */
.dim {
  position: fixed;
  inset: 0;
  background: rgb(7 6 13 / 0.8);
  opacity: var(--dim, 0);
  pointer-events: none;
}

/* --- первый миг ------------------------------------------------------
 *
 * Пока сцена и шрифт готовятся, экран — пустота с дымкой у горизонта,
 * и в ней просыпается сфера Рины: проступает, ядро дышит, струи идут
 * вокруг вертикали. Когда сцена нарисовала первый кадр, эта сфера уходит
 * туда, где сцена держит свою, и растворяется в ней; пустота расходится,
 * и первый экран поднимается по одному. Классы на <html> ставит wake.js:
 * `asleep`, пока покров лежит, и `waking`, пока он уходит. Без скриптов
 * покрова нет.
 */
.wake {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 15;
  pointer-events: none;
}

.asleep .wake,
.waking .wake {
  display: block;
}

.wake::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 85% 40% at 50% 100%, rgb(42 35 80 / 0.6), rgb(42 35 80 / 0) 72%),
    var(--void);
  transition: opacity 1000ms cubic-bezier(0.4, 0, 0.2, 1) 100ms;
}

/* Сфера нарисована в полный размер и уменьшена: к сцене она растёт,
   и растягивать маленькую картинку не придётся. */
.wake-orb {
  --orb: clamp(220px, 40vmin, 360px);
  position: absolute;
  left: 50%;
  top: 46%;
  width: var(--orb);
  height: var(--orb);
  margin: calc(var(--orb) / -2) 0 0 calc(var(--orb) / -2);
  transform: scale(0.46);
  transition:
    transform 1100ms var(--ease-out),
    opacity 600ms ease 650ms;
}

/* Свечение в воздухе: свет живёт у сферы. */
.wake-orb::before {
  content: "";
  position: absolute;
  inset: -55%;
  border-radius: 50%;
  background: radial-gradient(closest-side,
    rgb(140 112 255 / 0.34) 30%, rgb(110 76 255 / 0.14) 58%, rgb(110 76 255 / 0) 100%);
  animation:
    wake-in 1200ms var(--ease-out) both,
    wake-breathe 3200ms ease-in-out 1200ms infinite alternate;
}

/* Поверх стекла: блик сверху слева, светлый край, френель, который ярче
   справа сверху, и лёгкий лимб, в котором гаснут струи. */
.wake-orb::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(ellipse 13% 9% at 33% 25%, rgb(255 255 255 / 0.72), rgb(255 255 255 / 0) 100%),
    radial-gradient(closest-side,
      rgb(217 210 255 / 0) 80%, rgb(217 210 255 / 0.14) 93%,
      rgb(236 232 255 / 0.62) 98.6%, rgb(236 232 255 / 0) 100%),
    radial-gradient(closest-side at 44% 57%,
      rgb(236 232 255 / 0) 84%, rgb(236 232 255 / 0.3) 97%, rgb(236 232 255 / 0) 100%),
    radial-gradient(closest-side,
      rgb(40 28 110 / 0) 58%, rgb(40 28 110 / 0.32) 100%);
  animation: wake-in 900ms var(--ease-out) both;
}

.wake-glass {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(closest-side at 50% 52%,
    rgb(196 182 255 / 0.62), rgb(128 104 240 / 0.5) 48%,
    rgb(78 56 200 / 0.55) 82%, rgb(54 40 140 / 0.72) 100%);
  animation: wake-in 900ms var(--ease-out) both;
}

/* Струи: полосы, уходящие вбок, — так выглядит вращение вокруг
   вертикали. Слой втрое шире шара, полоса повторяется через его ширину,
   поэтому сдвиг на треть замыкает круг без шва. */
.wake-glass::before {
  content: "";
  position: absolute;
  inset: 0 -100%;
  background: repeating-linear-gradient(90deg,
    rgb(127 214 255 / 0) 0%, rgb(127 214 255 / 0) 4%,
    rgb(127 214 255 / 0.2) 7.3%, rgb(127 214 255 / 0) 10.5%,
    rgb(236 230 255 / 0) 15.5%, rgb(236 230 255 / 0.24) 20.7%,
    rgb(236 230 255 / 0) 27%, rgb(236 230 255 / 0) 33.333%);
  transform: skewX(-14deg);
  animation: wake-drift 8s linear infinite;
}

/* Сердце ядра дышит в такт свечению. */
.wake-glass::after {
  content: "";
  position: absolute;
  inset: 16%;
  border-radius: 50%;
  background: radial-gradient(closest-side,
    #fff 0 6%, rgb(240 236 255 / 0.95) 14%, rgb(210 199 255 / 0.7) 32%,
    rgb(185 168 255 / 0.35) 58%, rgb(185 168 255 / 0) 100%);
  animation: wake-breathe 3200ms ease-in-out 1200ms infinite alternate;
}

/* Сцена готова: сфера уходит к своей (`--to` считает wake.js), пустота
   расходится. Где сцены нет, сфера растворяется на месте, над кадром. */
.waking .wake::before {
  opacity: 0;
}

.waking .wake-orb {
  transform: var(--to, scale(0.52));
  opacity: 0;
}

/* Первый экран ждёт под покровом и поднимается, когда сфера уже в пути:
   слова по одному, шапка следом. Только под `.moving` — без motion.js
   и при просьбе о меньшем движении он просто виден. */
.moving.asleep .hero [data-reveal-group].shown > * {
  opacity: 0;
  transform: translate3d(0, 26px, 0);
}

.moving.waking .hero [data-reveal-group].shown > * {
  transition-delay:
    calc(380ms + var(--i, 0) * 90ms), calc(380ms + var(--i, 0) * 90ms),
    calc(380ms + var(--i, 0) * 90ms), 0s, 0s, 0s, 0s;
}

.moving .top {
  transition: opacity 900ms var(--ease-out);
}

.moving.asleep .top {
  opacity: 0;
}

.moving.waking .top {
  transition-delay: 520ms;
}

@keyframes wake-in {
  from {
    opacity: 0;
    transform: scale(0.82);
  }
}

@keyframes wake-breathe {
  to {
    opacity: 0.74;
    transform: scale(0.9);
  }
}

@keyframes wake-drift {
  from {
    transform: translateX(0) skewX(-14deg);
  }

  to {
    transform: translateX(33.333%) skewX(-14deg);
  }
}

/* Без движения покров тот же, но сфера не дышит и не летит: только
   гаснет вместе с ним. */
@media (prefers-reduced-motion: reduce) {
  .wake-orb::before,
  .wake-orb::after,
  .wake-glass,
  .wake-glass::before,
  .wake-glass::after {
    animation: none;
  }

  .wake-orb {
    transition: opacity 400ms ease;
  }

  .wake::before {
    transition-duration: 400ms;
    transition-delay: 0s;
  }
}

/* --- шапка ------------------------------------------------------------- */

.top {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px var(--gutter);
}

.mark {
  margin: 0;
  font: 500 18px/1 var(--font);
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

/* В шапке знак — логотип: сфера с кольцом и надпись. Картинка втрое
   плотнее показанного размера, её свечение ложится прямо на пустоту. */
.top .mark img {
  display: block;
  width: auto;
  height: 44px;
}

.top nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 2px 6px;
}

.top nav a {
  padding: 10px 12px;
  font-size: 15px;
  line-height: 1;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 180ms var(--ease-out);
}

.top nav a:hover {
  color: var(--ink);
}

/* The other language: set apart from the sections by a hairline. */
.top nav .tongue {
  margin-left: 6px;
  padding-left: 16px;
  border-left: 1px solid var(--hairline);
  border-radius: 0;
  letter-spacing: 0.04em;
}

main,
.foot {
  position: relative;
  z-index: 1;
}

/* --- первый экран ------------------------------------------------------ */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100svh;
  padding: 104px var(--gutter) 72px;
  box-sizing: border-box;
}

/* Вуаль гасит сцену под текстом и к низу экрана, а справа сцену не
   трогает. */
.veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg,
      rgb(7 6 13 / 0.9) 0%,
      rgb(7 6 13 / 0.72) 28%,
      rgb(7 6 13 / 0.2) 50%,
      rgb(7 6 13 / 0) 62%),
    linear-gradient(0deg, rgb(7 6 13 / 0.7), rgb(7 6 13 / 0) 22%);
}

.say {
  position: relative;
  width: min(560px, 100%);
}

h1 {
  margin: 0 0 24px;
  font: 250 clamp(46px, 5.6vw, 84px) / 1.02 var(--font);
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.lead {
  margin: 0 0 14px;
  max-width: 46ch;
  font-size: 19px;
  line-height: 1.55;
}

.kept {
  margin: 0 0 32px;
  max-width: 46ch;
  font-size: 16px;
  color: var(--ink-soft);
}

.try {
  margin-bottom: 32px;
}

.hint {
  margin: 0 0 10px;
  font-size: 13.5px;
  color: var(--ink-faint);
}

.phrases {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Одно стекло на всё: чипы, стеклянные кнопки, шаги и блоки разделов. */
.chip,
.ghost,
.step,
.stays,
.knows,
.code {
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
}

.chip {
  min-height: 44px;
  padding: 10px 16px;
  font: 400 15px/1.2 var(--font);
  color: var(--ink);
  border-radius: 12px;
  cursor: pointer;
  touch-action: manipulation;
  transition:
    background-color 200ms var(--ease-out),
    border-color 200ms var(--ease-out),
    box-shadow 200ms var(--ease-out);
}

.chip:hover {
  background: var(--glass-high);
  border-color: var(--glass-edge-high);
}

.chip[data-speaking] {
  border-color: var(--lavender);
  box-shadow: 0 0 0 1px rgb(185 168 255 / 0.35), 0 8px 28px -10px rgb(185 168 255 / 0.55);
}

/* Ответ приходит в сцену стеклянной панелью. Здесь он для чтения с
   экрана — и для тех, у кого сцены нет: тогда он виден. */
.reply {
  min-height: 1.6em;
  margin: 14px 0 0;
  font: 300 22px/1.4 var(--font);
  color: var(--lavender-high);
}

.gl-ready .reply {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  margin: 0;
}

/* Без скриптов фраза не ответит — поэтому ответ написан сразу. */
html:not(.js) .chip {
  cursor: default;
}

html:not(.js) .chip::after {
  content: " — " attr(data-reply);
  color: var(--ink-soft);
}

.act {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.cta {
  display: inline-flex;
  align-items: center;
  min-height: 50px;
  padding: 0 28px;
  font: 600 16px/1 var(--font);
  letter-spacing: 0.01em;
  color: #120f22;
  background: var(--lavender);
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 0 14px 34px -14px rgb(185 168 255 / 0.7);
  transition:
    background-color 160ms var(--ease-out),
    box-shadow 160ms var(--ease-out);
}

.cta:hover {
  background: var(--lavender-high);
  box-shadow: 0 16px 40px -12px rgb(185 168 255 / 0.85);
}

.ghost {
  display: inline-flex;
  align-items: center;
  min-height: 50px;
  padding: 0 22px;
  font: 500 16px/1 var(--font);
  text-decoration: none;
  color: var(--ink);
  border-radius: 12px;
  transition:
    background-color 200ms var(--ease-out),
    border-color 200ms var(--ease-out);
}

.ghost:hover {
  background: var(--glass-high);
  border-color: var(--glass-edge-high);
}

.facts {
  margin: 0;
  font-size: 13.5px;
  letter-spacing: 0.02em;
  color: var(--ink-faint);
}

/* --- разделы ------------------------------------------------------------ */

.band {
  padding: var(--band) var(--gutter) 0;
}

/* Без скриптов затемнения нет, и разделы кладут свою подложку. */
html:not(.js) .band,
html:not(.js) .foot {
  background: rgb(7 6 13 / 0.86);
}

.inner {
  max-width: 1240px;
  margin: 0 auto;
}

h2 {
  margin: 0 0 18px;
  max-width: 20ch;
  font: 250 clamp(34px, 3.8vw, 58px) / 1.06 var(--font);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h3 {
  margin: 0 0 8px;
  font: 500 19px/1.3 var(--font);
  letter-spacing: 0.005em;
}

/* Сильнее правила `.band p`, которое обнуляет отступы абзацев. */
.band .intro {
  margin: 0 0 56px;
  max-width: 52ch;
  font-size: 18px;
  color: var(--ink-soft);
}

.band p {
  margin: 0;
}

.band p + p {
  margin-top: 12px;
}

.band a:not(.ghost) {
  text-decoration-color: rgb(185 168 255 / 0.5);
  text-underline-offset: 4px;
}

/* Путь фразы: пять шагов вдоль одной линии света. */
.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 36px 0 0;
  list-style: none;
}

.steps::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12px;
  right: 12px;
  height: 1px;
  background: linear-gradient(90deg,
    rgb(185 168 255 / 0), rgb(185 168 255 / 0.55) 12%,
    rgb(185 168 255 / 0.55) 88%, rgb(185 168 255 / 0));
}

.step {
  position: relative;
  padding: 24px 22px 26px;
  border-radius: 16px;
  font-size: 15px;
  color: var(--ink-soft);
  transition:
    border-color 400ms var(--ease-out),
    box-shadow 400ms var(--ease-out),
    background-color 400ms var(--ease-out);
}

.step h3 {
  color: var(--ink);
}

/* Точка шага на линии. */
.step::before {
  content: "";
  position: absolute;
  top: -41px;
  left: 22px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--void);
  border: 1px solid var(--lavender);
  transition: background-color 400ms var(--ease-out), box-shadow 400ms var(--ease-out);
}

.step[data-lit] {
  border-color: rgb(185 168 255 / 0.6);
  background: rgb(185 168 255 / 0.08);
  box-shadow: 0 18px 50px -24px rgb(185 168 255 / 0.6);
}

.step[data-lit]::before {
  background: var(--lavender);
  box-shadow: 0 0 14px 2px rgb(185 168 255 / 0.7);
}

/* Что она умеет: заголовок стоит, список идёт. */
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.aside {
  position: sticky;
  top: 96px;
}

.band .aside .intro {
  margin-bottom: 0;
}

.list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(24px, 3vw, 48px);
}

.item {
  padding: 26px 0 30px;
  border-top: 1px solid var(--hairline);
  font-size: 16px;
  color: var(--ink-soft);
}

.item h3 {
  color: var(--ink);
}

/* Приватность: что остаётся внутри и что выходит наружу. */
.ways {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
}

/* То, что остаётся, лежит на стекле со светом Рины внутри. */
.stays {
  padding: 30px 30px 34px;
  border-radius: 20px;
  background:
    radial-gradient(120% 90% at 20% 0%, rgb(185 168 255 / 0.14), transparent 70%),
    var(--glass);
}

.stays ul {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.stays li {
  position: relative;
  padding: 10px 0 10px 22px;
  font-size: 16px;
  color: var(--ink-soft);
}

.stays li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 19px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lavender);
  box-shadow: 0 0 10px rgb(185 168 255 / 0.7);
}

.leaves {
  padding-top: 30px;
}

.leaves dl {
  margin: 14px 0 0;
}

.leaves dl > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--hairline);
}

.leaves dt {
  font-size: 16px;
  color: var(--ink);
}

.leaves dd {
  margin: 0;
  font-size: 15px;
  color: var(--ink-faint);
}

.note-line {
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
  font-size: 15px;
  color: var(--ink-soft);
}

.knows {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 40px;
  margin-top: 48px;
  padding: 28px 30px;
  border-radius: 20px;
}

.knows > div {
  flex: 1 1 420px;
  max-width: 72ch;
  font-size: 16px;
  color: var(--ink-soft);
}

.knows h3 {
  color: var(--ink);
}

/* Скачать. */
.pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 64px);
}

.half {
  font-size: 16px;
  color: var(--ink-soft);
}

.half h3 {
  color: var(--ink);
}

.code {
  margin: 16px 0;
  padding: 18px 20px;
  border-radius: 14px;
  overflow-x: auto;
  font: 400 14px/1.7 var(--mono);
  color: var(--ink);
}

/* Системные требования: под способами скачать, во всю ширину. На
   телефоне три колонки слишком узки для слов: название строки встаёт
   над ней, а «минимальные» и «рекомендуемые» остаются рядом. */
.reqs {
  margin-top: clamp(40px, 6vw, 72px);
  font-size: 16px;
  color: var(--ink-soft);
}

.reqs h3 {
  color: var(--ink);
}

.reqs table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.reqs th,
.reqs td {
  padding: 14px 16px 14px 0;
  border-top: 1px solid var(--hairline);
  text-align: left;
  vertical-align: top;
  overflow-wrap: break-word;
}

.reqs thead th {
  border-top: 0;
  font-weight: 500;
  color: var(--ink);
}

.reqs tbody th {
  width: 22%;
  font-weight: 400;
  color: var(--ink-faint);
}

/* The installer's SHA-256: 64 characters with no break opportunity. Left
   alone it stretches the phone's layout viewport to ~590px and the whole
   page renders zoomed out. It is copied, not read, so it may break anywhere. */
.hash {
  font: 400 13.5px/1.5 var(--mono);
  color: var(--ink);
  overflow-wrap: anywhere;
  word-break: break-all;
}

/* Acceptance of the licence agreement sits right under the button that
   performs it (EULA, clause 1.3), small but legible. Not `.terms`: that
   name belongs to the money section's grid further down. */
.accept {
  max-width: 46ch;
  font-size: 14px;
  color: var(--ink-faint);
}

.accept a {
  color: var(--ink-soft);
}

.reqs-note {
  margin-top: 16px;
  font-size: 15px;
  color: var(--ink-faint);
}

@media (max-width: 760px) {
  .reqs table,
  .reqs thead,
  .reqs tbody {
    display: block;
    font-size: 15px;
  }

  .reqs tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
    padding: 14px 0;
    border-top: 1px solid var(--hairline);
  }

  .reqs thead tr {
    padding-top: 0;
    border-top: 0;
  }

  .reqs th,
  .reqs td {
    padding: 0;
    border-top: 0;
  }

  .reqs thead th:first-child {
    display: none;
  }

  .reqs tbody th,
  .reqs td[colspan] {
    grid-column: 1 / -1;
  }

  .reqs tbody th {
    width: auto;
    margin-bottom: 4px;
  }
}

/* Деньги: четыре обещания. */
.terms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(24px, 4vw, 64px);
}

.term {
  padding: 24px 0 28px;
  border-top: 1px solid var(--hairline);
  font-size: 16px;
  color: var(--ink-soft);
}

.term h3 {
  color: var(--ink);
}

/* Что дальше: рубежи вдоль одной линии, нынешний светится. */
.road {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
  margin: 0 0 40px;
  padding: 34px 0 0;
  list-style: none;
}

.road::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--hairline);
}

.road li {
  position: relative;
  font-size: 15px;
  color: var(--ink-soft);
}

.road li::before {
  content: "";
  position: absolute;
  top: -34px;
  left: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--void);
  border: 1px solid var(--ink-faint);
}

.road h3 {
  color: var(--ink);
}

.when {
  display: block;
  margin-bottom: 8px;
  font-size: 13.5px;
  letter-spacing: 0.02em;
  color: var(--ink-faint);
}

.road .done {
  opacity: 0.7;
}

.road .done::before {
  background: var(--ink-faint);
}

.road .now::before {
  background: var(--lavender);
  border-color: var(--lavender);
  box-shadow: 0 0 14px 2px rgb(185 168 255 / 0.7);
}

.road .now .when {
  color: var(--lavender-high);
}

/* --- низ ---------------------------------------------------------------- */

.foot {
  padding: var(--band) var(--gutter) 40px;
}

.foot .inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 3fr);
  gap: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--hairline);
}

/* The landing pages carry four columns: about, documents, project, legal. */
@media (min-width: 1041px) {
  .foot .inner.foot-four {
    grid-template-columns: minmax(0, 4fr) minmax(0, 3fr) minmax(0, 3fr) minmax(0, 3fr);
  }
}

.foot p {
  margin: 0 0 10px;
  font-size: 15px;
  color: var(--ink-soft);
}

.foot .mark {
  margin-bottom: 14px;
}

.foot .quiet-line {
  max-width: 44ch;
  font-size: 13.5px;
  color: var(--ink-faint);
}

.foot .foot-head {
  font-size: 13.5px;
  letter-spacing: 0.02em;
  color: var(--ink-faint);
}

.foot ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot li a {
  display: inline-block;
  padding: 5px 0;
  font-size: 15px;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 180ms var(--ease-out);
}

.foot li a:hover {
  color: var(--ink);
}

.lang {
  margin-left: 4px;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}

/* --- узкие окна --------------------------------------------------------- */

@media (max-width: 1040px) {
  .steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 0 0 0 28px;
  }

  .steps::before {
    top: 8px;
    bottom: 8px;
    left: 4px;
    right: auto;
    width: 1px;
    height: auto;
    background: linear-gradient(180deg,
      rgb(185 168 255 / 0), rgb(185 168 255 / 0.55) 10%,
      rgb(185 168 255 / 0.55) 90%, rgb(185 168 255 / 0));
  }

  .step::before {
    top: 28px;
    left: -29px;
  }

  .split,
  .ways,
  .pair {
    grid-template-columns: minmax(0, 1fr);
  }

  .aside {
    position: static;
  }

  .band .aside .intro {
    margin-bottom: 32px;
  }

  .road {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding: 0 0 0 28px;
  }

  .road::before {
    top: 6px;
    bottom: 6px;
    left: 4px;
    right: auto;
    width: 1px;
    height: auto;
  }

  .road li::before {
    top: 4px;
    left: -28px;
  }

  .foot .inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .foot-about {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .backdrop {
    background:
      url("img/poster-tall.jpg") 50% 0 / max(100%, 46.18svh) auto no-repeat,
      var(--void);
  }

  html[lang="en"] .backdrop {
    background-image: url("img/poster-tall-en.jpg");
  }

  .top .mark img {
    height: 36px;
  }

  .hero {
    align-items: flex-end;
    padding-top: 50svh;
    padding-bottom: 40px;
  }

  .veil {
    background:
      linear-gradient(180deg,
        rgb(7 6 13 / 0) 30%,
        rgb(7 6 13 / 0.78) 52%,
        rgb(7 6 13 / 0.94) 66%,
        var(--void) 100%);
  }

  .top nav a {
    padding: 10px 8px;
  }

  h1 {
    font-size: clamp(40px, 11.5vw, 58px);
  }

  .lead {
    font-size: 17px;
  }

  .hero .cta,
  .hero .ghost {
    flex: 1 1 auto;
    justify-content: center;
  }

  .list,
  .terms {
    grid-template-columns: minmax(0, 1fr);
  }

  .leaves dl > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .stays,
  .knows {
    padding: 24px 22px;
  }

  .foot .inner {
    grid-template-columns: minmax(0, 1fr);
  }
}


/* The header keeps to one line beside the logo: what leaves it first is
   what the page reaches another way. "Features" and "Install" are
   sections further down, and "Install" also has the first screen's
   button; GitHub has the finale and the footer; "Privacy" has the first
   screen's second button. Matched by the address's end, since the reading
   pages link to the same sections as ../#features. */
@media (max-width: 900px) {
  .top nav a[href$="#features"],
  .top nav a[href$="#install"] {
    display: none;
  }
}

@media (max-width: 560px) {
  .top nav a[href*="github.com"] {
    display: none;
  }
}

@media (max-width: 520px) {
  .top nav a[href$="#privacy"] {
    display: none;
  }
}

@media (max-width: 420px) {
  .top .mark img {
    height: 32px;
  }
}

@media (max-width: 340px) {
  .top .mark img {
    height: 28px;
  }
}

/* --- появление ---------------------------------------------------------
 *
 * Элементы поднимаются на место, когда входят в экран (motion.js ставит
 * им `.shown`). Заголовки и вводные проступают из размытия; стекло только
 * поднимается: размытие на нём сломало бы на время перехода его
 * собственное. Группа приходит по одному. Прячется всё это только под
 * `.moving`, которую ставит скрипт, — без него страница видна сразу.
 */

.moving [data-reveal],
.moving [data-reveal-group] > * {
  opacity: 0;
  transform: translate3d(0, 26px, 0);
  transition-property: opacity, transform, filter;
  transition-duration: 900ms, 1100ms, 1000ms;
  transition-timing-function: var(--ease-out);
}

.moving [data-reveal="text"] {
  filter: blur(8px);
}

/* Пришедшему возвращаются его собственные переходы: наведение и горящий
   шаг пути. Задержка лесенки — только у самого прихода. */
.moving [data-reveal].shown,
.moving [data-reveal-group].shown > * {
  opacity: 1;
  transform: none;
  filter: none;
  transition-property: opacity, transform, filter, background-color, border-color, box-shadow, color;
  transition-duration: 900ms, 1100ms, 1000ms, 200ms, 200ms, 400ms, 180ms;
  transition-delay:
    calc(var(--i, 0) * 90ms), calc(var(--i, 0) * 90ms), calc(var(--i, 0) * 90ms),
    0s, 0s, 0s, 0s;
}

/* --- место сферы и её реплика ------------------------------------------
 *
 * В каждом разделе пустой квадрат, куда встанет сфера: её рисует сцена,
 * а место и размер решает эта таблица, для телефона и компьютера своё.
 * Реплику Рины со сценой говорит пузырь рядом со сферой; здесь она для
 * экранного диктора. Без сцены она написана на месте сферы.
 */

.band .inner {
  position: relative;
}

.orb-slot {
  position: absolute;
  top: -28px;
  right: 0;
  width: clamp(150px, 14vw, 200px);
  aspect-ratio: 1;
  pointer-events: none;
}

.orb-seat {
  position: absolute;
  inset: 0;
}

/* В «Что она умеет» место стоит в липкой колонке под вводным: сфера
   остаётся рядом, пока идёт список. */
.aside .orb-slot {
  position: relative;
  top: auto;
  right: auto;
  width: clamp(170px, 15vw, 210px);
  margin-top: 56px;
}

/* Зимняя шапка выше сферы: здесь место стоит вплотную под вводным, и без
   запаса помпон касается строки. На телефоне место в потоке, там не нужно. */
@media (min-width: 761px) {
  .winter .aside .orb-slot {
    margin-top: 96px;
  }
}

.rina-says {
  margin: 0;
  font: 300 18px/1.45 var(--font);
  color: var(--lavender-high);
}

.gl-ready .rina-says {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

html:not(.gl-ready) .orb-slot {
  width: min(320px, 40%);
  aspect-ratio: auto;
}

html:not(.gl-ready) .orb-seat {
  display: none;
}

/* Пузырь с репликой рядом со сферой; ставит его space.js. Хвостик —
   угол, обращённый к сфере. */
.bubble {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 3;
  max-width: 280px;
  padding: 12px 16px 13px;
  border-radius: 16px 16px 16px 4px;
  background: rgb(18 15 34 / 0.62);
  border: 1px solid var(--glass-edge);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 18px 40px -20px rgb(185 168 255 / 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 500ms var(--ease-out);
  will-change: transform, opacity;
}

.bubble[data-side="left"] {
  border-radius: 16px 16px 4px 16px;
}

.bubble.on {
  opacity: 1;
}

.bubble-who {
  display: block;
  margin-bottom: 3px;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--lavender-high);
}

.bubble-text {
  display: block;
  font: 400 15px/1.45 var(--font);
  color: var(--ink);
}

html:not(.gl-ready) .bubble {
  display: none;
}

/* Сцена сама приглушает комнату и оставляет сферу светлой; затемнение
   поверх нужно только там, где сцены нет. */
.gl-ready .dim {
  display: none;
}

/* --- финал -------------------------------------------------------------
 *
 * Сфера встаёт в центр и лопается: фронт света проходит по экрану,
 * и фоном становится то, что внутри неё. Слова финала приходят вместе
 * со взрывом; без сцены — как обычно.
 *
 * Со сценой в движении (`.staged`, ставит space.js) финал — пространство
 * внутри сферы. Раздел выше экрана, и его сцена стоит, пока камера идёт
 * вперёд сквозь туманность; слова висят в ней на разной глубине. Их
 * глубину и перспективу задаёт скрипт: камера у слов и у туманности
 * одна. Кнопки — в плоскости, которая стоит на месте, в своём размере.
 */

.finale {
  position: relative;
  /* The dark pool under the words is wider than they are; clipped here,
     or on a phone it widens the page and the phone zooms out to fit.
     `clip`, not `hidden`: the stage inside must stay able to stick. */
  overflow-x: clip;
}

.finale-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  min-height: 100svh;
  padding: var(--band) var(--gutter);
  box-sizing: border-box;
  text-align: center;
}

.finale .orb-slot {
  position: relative;
  top: auto;
  right: auto;
  width: clamp(170px, 18vw, 240px);
}

.finale-inner {
  position: relative;
  max-width: 760px;
}

/* Тёмная заводь под словами: они читаются поверх живой туманности. */
.finale-inner::before {
  content: "";
  position: absolute;
  inset: -64px -140px;
  z-index: -1;
  background: radial-gradient(closest-side, rgb(7 6 13 / 0.72), rgb(7 6 13 / 0));
  pointer-events: none;
}

.finale-says {
  margin: 0 0 16px;
  font: 300 22px/1.4 var(--font);
  color: var(--lavender-high);
}

.finale-says .who {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  letter-spacing: 0.04em;
}

/* Дуэт: реплики Луны подписаны всегда, Рины — только внутри обмена
   репликами; в остальном тексте страницы и так говорит она. Подпись —
   тот же приём, что у реплики в финале. */
.line .who {
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}

.line[data-who="rina"] {
  color: var(--lavender-high);
}

.line[data-who="rina"] .who {
  color: var(--lavender);
}

/* Зимние реплики видны с декабря до середины января: класс .winter
   ставит space.js по календарю посетителя. Без скриптов их нет. */
[data-season="winter"] {
  display: none;
}

.winter [data-season="winter"] {
  display: revert;
}

/* Зимой на залитых кнопках лежит снег, а стекло остальных — в инее.
   Цвета те же: снег — это --ink, иней — край стекла. */
.winter .cta {
  position: relative;
}

.winter .cta::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 6px;
  right: 6px;
  height: 14px;
  background:
    radial-gradient(ellipse 20px 7px at 24% 8px, var(--ink) 96%, transparent),
    radial-gradient(ellipse 26px 8px at 54% 8px, var(--ink) 96%, transparent),
    radial-gradient(ellipse 16px 6px at 81% 9px, var(--ink) 96%, transparent),
    linear-gradient(var(--ink), var(--ink)) 0 100% / 100% 7px no-repeat;
  border-radius: 6px 6px 4px 4px;
  filter: drop-shadow(0 1px 1px rgb(18 15 34 / 0.35));
  pointer-events: none;
}

.winter .chip,
.winter .ghost {
  background-image:
    radial-gradient(110% 90% at 0 0, var(--hairline), transparent 42%),
    radial-gradient(110% 90% at 100% 100%, var(--glass-high), transparent 40%);
}

.duet {
  display: grid;
  gap: 12px;
  max-width: 60ch;
}

.band .duet .line + .line {
  margin-top: 0;
}

.band .terms + .duet,
.band .road + .duet {
  margin-top: 40px;
}

.band .half .duet {
  margin-top: 16px;
}

.band .road + .duet {
  margin-bottom: 32px;
}

.finale .duet {
  margin: 0 auto 28px;
  max-width: 46ch;
}

.finale h2 {
  margin: 0 auto 18px;
  max-width: 16ch;
  font-size: clamp(46px, 5.6vw, 84px);
  line-height: 1.02;
}

.finale-lead {
  margin: 0 auto 32px;
  max-width: 46ch;
  font-size: 18px;
  color: var(--ink-soft);
}

.finale .act {
  justify-content: center;
  margin-bottom: 0;
}

html:not(.gl-ready) .finale {
  background:
    radial-gradient(55% 45% at 50% 40%, rgb(110 76 255 / 0.28), transparent 70%),
    radial-gradient(35% 30% at 62% 55%, rgb(127 214 255 / 0.1), transparent 70%);
}

/* Слова финала приходят медленнее и из-под размытия: это развязка. */
.moving .finale-inner > * {
  transform: translate3d(0, 44px, 0) scale(0.98);
  filter: blur(10px);
}

.moving .finale-inner.shown > * {
  transition-duration: 1100ms, 1300ms, 1100ms, 200ms, 200ms, 400ms, 180ms;
  transition-delay:
    calc(150ms + var(--i, 0) * 170ms), calc(150ms + var(--i, 0) * 170ms),
    calc(150ms + var(--i, 0) * 170ms), 0s, 0s, 0s, 0s;
}

/* Внутри сферы. Сцена стоит, пока раздел проходит ещё 60 % экрана;
   место сферы — ровно в её центре, и слова приходят туда же. */
.finale.staged {
  height: 160svh;
}

.finale.staged .finale-stage {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 0;
}

.finale.staged .orb-slot {
  position: absolute;
  left: 50%;
  top: 50%;
  margin: 0;
  transform: translate(-50%, -50%);
}

/* Движение слов — глубина, прозрачность, размытие в полёте — пишет
   скрипт каждый кадр; переходы таблицы ему бы только мешали. */
.finale.staged .finale-inner > * {
  opacity: 1;
  transform: none;
  filter: none;
  transition: none;
  will-change: transform, opacity;
}

/* Её реплика здесь — такой же пузырь, как в разделах, только висит
   в глубине, над заголовком и в стороне от него. Хвостик — к середине,
   где была сфера. */
.finale.staged .finale-says {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 12px);
  width: max-content;
  max-width: min(360px, 80vw);
  margin: 0 auto;
  padding: 12px 16px 13px;
  text-align: left;
  border-radius: 16px 16px 4px 16px;
  background: rgb(18 15 34 / 0.62);
  border: 1px solid var(--glass-edge);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 18px 40px -20px rgb(185 168 255 / 0.45);
}

/* Подвал после финала уходит из туманности в пустоту. */
.foot {
  background: linear-gradient(180deg, rgb(7 6 13 / 0), var(--void) 160px);
}

@media (max-width: 760px) {
  /* На телефоне место сферы — в потоке раздела, наверху, а реплика
     написана рядом с ним: пузырь поверх текста был бы некуда деть. */
  .orb-slot,
  .aside .orb-slot {
    position: relative;
    top: auto;
    right: auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    width: auto;
    aspect-ratio: auto;
    min-height: 104px;
    margin: 0 0 20px;
  }

  .orb-seat {
    position: relative;
    inset: auto;
    flex: 0 0 104px;
    height: 104px;
  }

  .gl-ready .rina-says {
    position: static;
    flex: 1;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
    white-space: normal;
    text-align: right;
    font-size: 15px;
  }

  html:not(.gl-ready) .orb-slot {
    width: auto;
    min-height: 0;
  }

  .finale .orb-slot {
    width: 150px;
    min-height: 150px;
    justify-content: center;
  }

  .finale .orb-seat {
    flex-basis: 150px;
    height: 150px;
  }

  .finale-inner::before {
    inset: -48px -24px;
  }

  .bubble {
    display: none;
  }
}

/* Кадр-заглушка снимается с этой же страницы без текста поверх
   (адрес с ?poster). */
.poster .top,
.poster main,
.poster .foot,
.poster .dim {
  visibility: hidden;
}

.poster .backdrop {
  background: var(--void);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .bubble {
    transition: none;
  }

  .scene,
  .chip,
  .cta,
  .ghost,
  .step,
  .step::before,
  .top nav a,
  .foot li a {
    transition: none;
  }
}
