/* ---------------------------------------------------------------------------
   Оформление страницы Fabula.

   Атмосфера «Голос в комнате» (владелец выбрал 20.08.2026): почти чёрная
   земля, ровное свечение в центре и круги, расходящиеся от него, — как от
   сказанного слова. Объяснений и рассказов на странице нет: её работа —
   назвать себя и дать поставить приложение.

   Гарнитура одна, Manrope: иерархию держит вес. Шрифты лежат рядом — страница
   не ходит за ними на чужие серверы.
--------------------------------------------------------------------------- */

@font-face{font-family:"Manrope";font-style:normal;font-weight:400;font-display:swap;src:url(fonts/manrope-400-cyrillic.woff2) format("woff2");unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;}
@font-face{font-family:"Manrope";font-style:normal;font-weight:400;font-display:swap;src:url(fonts/manrope-400-latin.woff2) format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:"Manrope";font-style:normal;font-weight:500;font-display:swap;src:url(fonts/manrope-500-cyrillic.woff2) format("woff2");unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;}
@font-face{font-family:"Manrope";font-style:normal;font-weight:500;font-display:swap;src:url(fonts/manrope-500-latin.woff2) format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:"Manrope";font-style:normal;font-weight:600;font-display:swap;src:url(fonts/manrope-600-cyrillic.woff2) format("woff2");unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;}
@font-face{font-family:"Manrope";font-style:normal;font-weight:600;font-display:swap;src:url(fonts/manrope-600-latin.woff2) format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}
@font-face{font-family:"Manrope";font-style:normal;font-weight:700;font-display:swap;src:url(fonts/manrope-700-cyrillic.woff2) format("woff2");unicode-range:U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;}
@font-face{font-family:"Manrope";font-style:normal;font-weight:700;font-display:swap;src:url(fonts/manrope-700-greek.woff2) format("woff2");unicode-range:U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;}
@font-face{font-family:"Manrope";font-style:normal;font-weight:700;font-display:swap;src:url(fonts/manrope-700-latin.woff2) format("woff2");unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}

:root {
  --bg: #07060C;
  --ink: #FFFFFF;
  --muted: #918DA6;
  --line: rgba(255, 255, 255, 0.09);
  --accent: #6C63FF;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Manrope', -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Воздух лежит за страницей и не уезжает при прокрутке. */
#air {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

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

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 26px 56px;
}

.mark {
  margin: 0 0 30px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  color: rgba(255, 255, 255, 0.72);
}

h1 {
  margin: 0 0 18px;
  font-weight: 700;
  font-size: clamp(33px, 8.8vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  max-width: 13ch;
  text-wrap: balance;
}

.sub {
  margin: 0 0 46px;
  font-size: 15.5px;
  font-weight: 500;
  color: var(--muted);
}

.get { display: flex; flex-direction: column; align-items: center; gap: 16px; }

.btn {
  display: inline-block;
  padding: 16px 40px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  box-shadow: 0 12px 34px -12px rgba(108, 99, 255, 0.9);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 16px 40px -12px rgba(108, 99, 255, 1); }
.btn[hidden] { display: none; }

.note {
  margin: 0;
  max-width: 32ch;
  font-size: 14.5px;
  color: var(--muted);
}

/* Появление первого экрана — построчно и неспешно. */
.hero > *, .hero .get { opacity: 0; transform: translateY(10px); }
.js body.ready .hero > * {
  opacity: 1;
  transform: none;
  transition: opacity 1.4s ease, transform 1.4s cubic-bezier(0.16, 0.8, 0.2, 1);
}
.js body.ready .mark { transition-delay: 0.15s; }
.js body.ready h1 { transition-delay: 0.45s; }
.js body.ready .sub { transition-delay: 0.85s; }
.js body.ready .get { transition-delay: 1.25s; }

/* ─── галерея знаков ───────────────────────────────────────────────────── */

.gallery {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 22px 104px;
  text-align: center;
}

h2 {
  margin: 0 0 34px;
  font-weight: 700;
  font-size: clamp(21px, 5.4vw, 27px);
  letter-spacing: -0.02em;
}

/* Ровно пять в ряд на любой ширине: шестой знак уезжал бы на вторую строку
   и ломал строй. */
.signs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(8px, 2.6vw, 18px);
  margin: 0 0 34px;
}
.signs canvas {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.9);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}
.signs canvas.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.75, 0.2, 1);
}

.more {
  padding: 13px 30px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.more:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.35); }
.more:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Вторая кнопка под галереей — та же, но с отступом от кнопки «Показать
   другие». */
.btn.second { margin-top: 40px; }

/* ─── подвал ───────────────────────────────────────────────────────────── */

footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 0 24px 46px;
  font-size: 14px;
}
footer nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 24px;
}
footer a { color: var(--muted); text-decoration: none; transition: color 0.2s ease; }
footer a:hover { color: var(--ink); }

.legal {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  text-align: center;
  color: rgba(145, 141, 166, 0.7);
}

/* ─── проявление при прокрутке ─────────────────────────────────────────── */

.js .reveal { opacity: 0; transform: translateY(12px); }
.js .reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal, .hero > * { opacity: 1 !important; transform: none !important; }
  .signs canvas { opacity: 1 !important; transform: none !important; }
}

@media (min-width: 760px) {
  body { font-size: 17px; }
  .gallery { padding-bottom: 128px; }
}

/* ─── «Эфир Fabula» ─────────────────────────────────────────────────────
   Полоса перенесена с экрана «Зацепило»: те же цвета, эквалайзер, бегущая
   строка, тонкая линия времени до смены трека. Музыка не играет — меняется
   только название. */

.radio {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px 10px;
  background: #141414;
  border-top: 1px solid #1F1F1F;
  text-decoration: none;
  color: inherit;
}
.radio[hidden] { display: none; }

/* Место под полосу, чтобы она не легла на подвал. */
body.has-radio footer { padding-bottom: 108px; }

/* Эквалайзер: пляшет, пока полоса видна. Он и есть единственный знак, что
   что-то «играет». */
.eq { display: flex; align-items: flex-end; gap: 3px; height: 18px; flex: none; }
.eq i {
  width: 3px;
  height: 100%;
  border-radius: 2px;
  background: var(--accent);
  transform-origin: bottom;
  animation: eq 1.1s ease-in-out infinite;
}
.eq i:nth-child(2) { animation-delay: 0.22s; }
.eq i:nth-child(3) { animation-delay: 0.44s; }
.eq i:nth-child(4) { animation-delay: 0.12s; }
@keyframes eq {
  0%, 100% { transform: scaleY(0.28); }
  50%      { transform: scaleY(1); }
}

.radio-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }

.radio-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.8px;
  color: var(--accent);
}

/* Бегущая строка — только здесь. В списках длинные названия переносятся:
   десяток ползущих строк разом это рябь. */
.radio-line { overflow: hidden; white-space: nowrap; }
.radio-track {
  display: inline-block;
  font-size: 14px;
  color: #fff;
  will-change: transform;
}
.radio-track .artist { color: #7A7A7A; font-weight: 300; font-size: 13px; }
.radio-track.run { animation: marquee var(--run, 12s) linear infinite; }
@keyframes marquee {
  0%   { transform: translateX(0); }
  8%   { transform: translateX(0); }
  92%  { transform: translateX(var(--shift, 0)); }
  100% { transform: translateX(var(--shift, 0)); }
}

/* Приглашение нажать. Стрелка смотрит на название — «жми сюда», а не
   «уходишь отсюда». После первого нажатия перестаёт зазывать. */
.radio-go {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px 1px rgba(108, 99, 255, 0.55);
  position: relative;
  animation: nudge 1.4s ease-in-out infinite alternate;
}
.radio-go::before {
  content: '';
  position: absolute;
  left: 13px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: translateY(-50%) rotate(45deg);
}
.radio-go.used {
  width: 34px;
  height: 34px;
  background: rgba(108, 99, 255, 0.16);
  box-shadow: none;
  animation: none;
}
.radio-go.used::before { border-color: var(--accent); left: 11px; width: 8px; height: 8px; }
@keyframes nudge {
  from { transform: translateX(0) scale(1); }
  to   { transform: translateX(-5px) scale(1.12); }
}

/* Линия времени до следующего трека. */
.radio-time {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: #1F1F1F;
}
.radio-time i {
  display: block;
  height: 100%;
  width: 0;
  background: rgba(108, 99, 255, 0.55);
}

@media (prefers-reduced-motion: reduce) {
  .eq i, .radio-go, .radio-track.run { animation: none; }
}
