/* ============================================================
   Storyboard Cut — landing
   Светлая тема по дизайн-системе иконки приложения:
   светлый фон, белые «карточки»-окна с мягкой тенью,
   тёмный лоток таймлайна и цвета клипов — синий, фиолетовый,
   зелёный, жёлтый.
   ============================================================ */

:root {
  --bg: #f5f5f7;
  --bg-raised: #ffffff;
  --bg-card: #ffffff;
  --bg-inset: #efeff1;
  --text: #1c1c21;
  --text-2: #55575f;
  --text-3: #8b8e98;
  --stroke: rgba(28, 28, 35, 0.08);

  /* Тёмный лоток таймлайна — как в иконке */
  --tray: #26262c;
  --tray-2: #3a3a42;

  /* Язык типов сцен — цвета клипов из иконки */
  --blue: #3e7bfa;
  --purple: #8b5cf6;
  --green: #34a853;
  --yellow: #f0b429;

  /* Тёмные варианты для текста на светлом фоне */
  --blue-text: #2b6de8;
  --purple-text: #7443e6;
  --green-text: #1e8e3e;
  --yellow-text: #b7791f;

  --accent: var(--blue);

  --shadow-card: 0 1px 2px rgba(24, 24, 32, 0.05), 0 12px 32px rgba(24, 24, 32, 0.08);
  --shadow-soft: 0 1px 2px rgba(24, 24, 32, 0.04), 0 6px 18px rgba(24, 24, 32, 0.05);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --container: 1080px;
  --radius: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: auto; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

em {
  font-style: normal;
  color: var(--accent);
}

/* ---------- Типографика ---------- */

h1, h2, h3 {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
  text-wrap: balance;
}

h2 { font-size: clamp(28px, 4.2vw, 44px); max-width: 18em; }
h3 { font-size: 19px; letter-spacing: -0.01em; }

.body-l { font-size: 17px; color: var(--text-2); max-width: 34em; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-3);
}

/* ---------- Кнопки ---------- */

.btn {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid var(--stroke);
  background: var(--bg-raised);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-1px); }
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
}
.btn-primary:hover { background: var(--blue-text); }

.btn-ghost { background: transparent; }
.btn-ghost:hover { border-color: rgba(28, 28, 35, 0.25); }

.btn-small { padding: 7px 14px; font-size: 13px; }
.btn-large { padding: 14px 28px; font-size: 16px; }

/* ---------- Навигация ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(245, 245, 247, 0.78);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.nav.is-scrolled { border-bottom-color: var(--stroke); }

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
}

.nav-logo-icon {
  width: 26px;
  height: 26px;
  user-select: none;
  pointer-events: none;
}

/* Переключатель языка */
.donate-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--stroke);
  background: var(--bg-raised);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.donate-heart {
  color: #e5484d;
  font-size: 13px;
  line-height: 1;
  transition: transform 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .donate-btn:hover {
    color: var(--text);
    border-color: rgba(28, 28, 35, 0.22);
    box-shadow: var(--shadow-soft);
  }
  .donate-btn:hover .donate-heart { transform: scale(1.18); }
}
.donate-btn:active { transform: scale(0.97); }

.lang-switch {
  display: inline-flex;
  padding: 3px;
  border-radius: 8px;
  background: var(--bg-inset);
  border: 1px solid var(--stroke);
  gap: 2px;
}

.lang-btn {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 5px 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.lang-btn.is-active {
  background: var(--bg-raised);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(24, 24, 32, 0.06);
}

@media (hover: hover) and (pointer: fine) {
  .lang-btn:not(.is-active):hover { color: var(--text-2); }
}
.lang-btn:active { transform: scale(0.97); }

.nav-links { display: flex; gap: 22px; }
.nav-links a {
  font-size: 14px;
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--text); }

/* ---------- Hero ---------- */

.hero { padding: 168px 0 96px; }

.hero-title {
  font-size: clamp(42px, 7.2vw, 84px);
  margin: 20px 0 24px;
}

.line-mask { display: block; overflow: hidden; }
.line { display: block; will-change: transform; }

.hero-sub { font-size: 19px; color: var(--text-2); max-width: 33em; }

.hero-cta { display: flex; gap: 12px; margin-top: 32px; }

/* ---------- Мок приложения ---------- */

.app-mock {
  margin-top: 72px;
  background: var(--bg-raised);
  border: 1px solid var(--stroke);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  user-select: none;
}

.mock-chrome {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--stroke);
}
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot-r { background: #ff5f57; } .dot-y { background: #febc2e; } .dot-g { background: #28c840; }
.mock-title {
  margin-left: 12px;
  font-size: 12px;
  color: var(--text-3);
  font-family: var(--mono);
}

.mock-body { padding: 28px 32px 0; }

.mock-doc { max-width: 640px; margin: 0 auto; }

.mock-scene {
  display: flex;
  gap: 18px;
  padding: 14px 0;
  border-radius: 10px;
  transition: opacity 0.25s ease, background-color 0.25s ease;
}

/* Наведение на клип в таймлайне подсвечивает его сцену в документе:
   остальной документ отходит на второй план */
.mock-doc.has-link .mock-scene { opacity: 0.35; }
.mock-doc.has-link .mock-scene.is-linked {
  opacity: 1;
  background: rgba(28, 28, 35, 0.04);
}

.mock-gutter {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 120px;
  flex-shrink: 0;
  justify-content: flex-end;
}

.mock-coord {
  font-family: var(--mono);
  font-size: 11px;
  padding-top: 1px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.c-purple { color: var(--purple-text); }
.c-green { color: var(--green-text); }
.c-yellow { color: var(--yellow-text); }
.c-blue { color: var(--blue-text); }

.mock-thread {
  width: 3px;
  border-radius: 2px;
  align-self: stretch;
  transform-origin: top;
}
.t-purple { background: var(--purple); }
.t-green { background: var(--green); }
.t-yellow { background: var(--yellow); }
.t-blue { background: var(--blue); }

.mock-lines { flex: 1; display: flex; flex-direction: column; gap: 9px; }

.mock-heading { font-size: 14px; font-weight: 600; }

/* Markdown-маркеры документа: # сцены, > слайда, // заметки —
   приглушены, как синтаксис в самом приложении */
.mock-hash {
  font-family: var(--mono);
  font-style: normal;
  font-weight: 700;
  color: var(--text-3);
}

.ln-row { display: flex; align-items: center; gap: 8px; }
.ln-row .ln { flex: 0 0 auto; }

.ln-mark {
  font-family: var(--mono);
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  color: var(--text-3);
}

.ln {
  display: block;
  height: 8px;
  border-radius: 4px;
  background: rgba(28, 28, 35, 0.10);
}
.ln-slide { background: rgba(62, 123, 250, 0.30); }
.ln-note { background: rgba(28, 28, 35, 0.06); }

/* Тёмный лоток таймлайна — прямая цитата иконки */
.mock-timeline {
  margin: 22px 16px 16px;
  background: var(--tray);
  border-radius: 12px;
  padding: 12px 12px 32px;
}

.mock-tlwrap { position: relative; }

/* Playhead поверх киноленты: белая игла с ручкой, как в иконке */
.mock-playhead {
  position: absolute;
  top: -2px;
  bottom: -6px;
  left: 0;
  width: 2px;
  border-radius: 1px;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  will-change: left;
}
.mock-playhead::before {
  content: "";
  position: absolute;
  top: -3px;
  left: -3px;
  width: 8px;
  height: 9px;
  border-radius: 2px 2px 3px 3px;
  background: #fff;
}

.mock-timecode {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  background: var(--tray-2);
  border-radius: 4px;
  padding: 2px 6px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.mock-ruler {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 8px;
}

.mock-track {
  display: flex;
  gap: 4px;
  height: 56px;
  overflow: hidden;
  align-items: flex-end;
}

.mock-track .mock-clip {
  opacity: 0.4;
  transition: opacity 0.4s ease, transform 0.25s ease;
  will-change: transform, opacity;
}

/* Проиграно — головка уже прошла начало клипа, яркость остаётся */
.mock-track .mock-clip.is-played { opacity: 1; }

/* Сейчас под головкой — чуть приподнят */
.mock-track .mock-clip.is-active {
  opacity: 1;
  transform: translateY(-3px);
}

.mock-clip {
  display: flex;
  align-items: flex-end;
  padding: 6px 8px;
  border-radius: 7px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  min-width: 0;
}

/* Клип в hero-моке — «живой»: курсор и лёгкий подъём при наведении */
@media (hover: hover) and (pointer: fine) {
  .mock-track .mock-clip { cursor: pointer; }
  .mock-track .mock-clip.is-hover {
    opacity: 1;
    transform: translateY(-3px);
  }
}
.clip-purple { background: var(--purple); }
.clip-green { background: var(--green); }
.clip-blue { background: var(--blue); }
.clip-yellow { background: var(--yellow); color: rgba(28, 28, 35, 0.8); }

/* Панель разметки внизу окна — как MarkupToolbar в приложении */
.mock-markupbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 7px 14px;
  border-top: 1px solid var(--stroke);
  background: var(--bg-raised);
}

.mb-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--text-2);
  padding: 3px 8px;
  border-radius: 5px;
  transition: background 0.15s ease;
}
.mb-btn i {
  font-family: var(--mono);
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3);
}
@media (hover: hover) and (pointer: fine) {
  .mb-btn:hover { background: var(--bg-inset); }
  .mb-btn:hover i { color: var(--blue-text); }
}

.mb-time {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-3);
}
.mb-time strong {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* ---------- Model / главная идея + morph ---------- */

.model { padding: 140px 0; }

.model-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 64px;
  align-items: center;
}

.model-copy h2 { margin: 16px 0 20px; }
.model-copy .body-l + .body-l { margin-top: 14px; }

.morph-stage {
  background: var(--bg-raised);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 32px 28px 20px;
  box-shadow: var(--shadow-soft);
}

.morph-track { min-height: 250px; position: relative; }

.morph-para {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--bg-inset);
  border-radius: 10px;
  padding: 16px;
  overflow: hidden;
  will-change: width, height, background-color;
}

.morph-text {
  display: block;
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.55;
}

.morph-label {
  position: absolute;
  left: 10px; bottom: 8px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  opacity: 0;
}

.morph-timeline-hint {
  display: flex;
  gap: 4px;
  height: 44px;
  margin-top: 170px;
  align-items: stretch;
}

.morph-ghost {
  border-radius: 7px;
  border: 1.5px dashed rgba(28, 28, 35, 0.18);
}
.g1 { flex: 22; }
.g2 { flex: 40; }
.morph-slot { flex: 36; border-radius: 7px; }

.morph-caption {
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
  text-align: center;
}

/* ---------- How / steps ---------- */

.how { padding: 40px 0 60px; }
.how h2 { margin-top: 16px; }

.steps { margin-top: 64px; display: flex; flex-direction: column; gap: 20px; }

.step {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 32px;
  align-items: center;
  padding: 36px 32px;
  background: var(--bg-raised);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.step-num {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--text-3);
}

.step-copy p { color: var(--text-2); margin-top: 8px; font-size: 15px; }

.step-visual {
  background: var(--bg-inset);
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 22px;
  min-height: 140px;
  position: relative;
  overflow: hidden;
}

/* шаг 1 — письмо */
.sv-write { display: flex; flex-direction: column; gap: 11px; justify-content: center; }

.write-head {
  font-size: 13px;
  font-weight: 600;
}
.write-head i {
  font-family: var(--mono);
  font-style: normal;
  font-weight: 700;
  color: var(--text-3);
}

.caret {
  width: 2px; height: 16px;
  background: var(--accent);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* шаг 2 — overlay с чипами */
.sv-assign { display: flex; flex-direction: column; justify-content: center; gap: 11px; }
.assign-text { display: flex; flex-direction: column; gap: 11px; }

.assign-overlay {
  position: absolute;
  inset: auto 16px 16px 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(6px);
}

.chip {
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  color: #fff;
}
.chip-purple { background: var(--purple); }
.chip-green { background: var(--green); }
.chip-blue { background: var(--blue); }

/* шаг 3 — cut-сборка таймлайна в тёмном лотке */
.sv-cut {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  background: var(--tray);
  border-color: transparent;
}
.cut-track {
  display: flex;
  gap: 4px;
  height: 52px;
  overflow: hidden;
  align-items: flex-end;
}
.cut-track .mock-clip { opacity: 1; }
.cut-total {
  font-family: var(--mono);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  text-align: right;
}
.cut-total strong { color: #fff; }

/* ---------- Writing / опыт письма: автогалерея ----------
   Слева кликабельные пункты с таймером-полоской (3 с).
   Активный раскрывается, справа — залипающее окно с панелями. */

.writing { padding: 120px 0 40px; }
.writing h2 { margin-top: 16px; }
.writing-sub { margin-top: 18px; }

.wr-scrolly {
  margin-top: 72px;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 72px;
  align-items: start;
}

.wr-list { display: flex; flex-direction: column; }

.wr-item {
  display: block;
  width: 100%;
  padding: 26px 0 26px 26px;
  border: none;
  border-left: 2px solid var(--stroke);
  background: none;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 0.35s ease;
  position: relative;
}

.wr-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.wr-num {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
}

.wr-progress {
  display: block;
  height: 2px;
  margin-top: 10px;
  background: var(--stroke);
  border-radius: 1px;
  overflow: hidden;
}

.wr-progress-bar {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--text);
  border-radius: 1px;
  transform: scaleX(0);
  transform-origin: 0 50%;
}

.wr-item-body { display: block; }

.wr-item-title {
  display: block;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-top: 8px;
  color: var(--text-3);
  transition: color 0.35s ease;
}

.wr-item-desc {
  display: block;
  color: var(--text-2);
  font-size: 15px;
  margin-top: 10px;
  max-width: 30em;
  line-height: 1.6;
}

/* Живой режим: всё, кроме активного, — только заголовок */
.wr-scrolly.is-live .wr-item { min-height: 0; }
.wr-scrolly.is-live .wr-item .wr-progress { opacity: 0.35; }
.wr-scrolly.is-live .wr-item.is-active .wr-progress { opacity: 1; }
.wr-scrolly.is-live .wr-item .wr-item-desc {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-top: 0;
  transition: max-height 0.45s ease, opacity 0.35s ease, margin-top 0.45s ease;
}
.wr-scrolly.is-live .wr-item.is-active { border-left-color: var(--text); }
.wr-scrolly.is-live .wr-item.is-active .wr-item-title { color: var(--text); }
.wr-scrolly.is-live .wr-item.is-active .wr-item-desc {
  max-height: 180px;
  opacity: 1;
  margin-top: 10px;
}

@media (hover: hover) and (pointer: fine) {
  .wr-item:not(.is-active):hover .wr-item-title { color: var(--text-2); }
}

/* Правое окно с панелями */
.wr-visual { position: sticky; top: 110px; }

.wrv-window {
  background: var(--bg-raised);
  border: 1px solid var(--stroke);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  user-select: none;
}

.wrv-chrome {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--stroke);
}

.wrv-stage { position: relative; height: 400px; }

.wrv-pane {
  position: absolute;
  inset: 0;
  padding: 36px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 13px;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.wrv-pane.is-active { opacity: 1; pointer-events: auto; }
.wrv-pane.is-replay { animation: wrPaneIn 0.42s ease; }

@keyframes wrPaneIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* 01 · фокус: всё гаснет, кроме строки с кареткой */
.dimln { opacity: 0.28; }
.onln { background: rgba(28, 28, 35, 0.42); }
.focus-row { display: flex; align-items: center; gap: 6px; }

/* 02 · поиск: подсветка в тексте + поповер со структурой */
.wrv-doc { display: flex; flex-direction: column; gap: 13px; }

.hl {
  height: 8px;
  width: 52px;
  flex: 0 0 auto;
  border-radius: 4px;
  background: rgba(240, 180, 41, 0.6);
}

.wrv-popover {
  position: absolute;
  top: 26px;
  right: 26px;
  width: 200px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-raised);
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 12px;
  box-shadow: var(--shadow-card);
}

.wrv-field {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3);
  background: var(--bg-inset);
  border-radius: 6px;
  padding: 6px 8px;
}
.wrv-field .caret { height: 12px; }

.wrv-result {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px;
  border-radius: 6px;
}
.wrv-result i {
  font-family: var(--mono);
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-3);
}
.wrv-result .ln { height: 7px; }
.wrv-result.is-sel { background: rgba(62, 123, 250, 0.12); }
.wrv-result.is-sel i { color: var(--blue-text); }

/* 03 · тема: светлая и тёмная «бумага» + ползунок размера */
.theme-split { display: flex; gap: 14px; }

.paper {
  flex: 1;
  border-radius: 10px;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.paper-light { background: #fcfcfb; border: 1px solid var(--stroke); }
.paper-dark { background: #1a1a1a; }
.paper-dark .ln { background: rgba(255, 255, 255, 0.3); }

.wrv-slider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 0 6px;
}
.wrv-slider b { font-size: 11px; color: var(--text-3); font-weight: 600; }
.wrv-slider b.big { font-size: 17px; }

.wrv-slider .track {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--bg-inset);
  position: relative;
}
.wrv-slider .thumb {
  position: absolute;
  top: 50%;
  left: 40%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--stroke);
  box-shadow: 0 1px 3px rgba(24, 24, 32, 0.25);
  transform: translate(-50%, -50%);
  animation: thumbSlide 4s ease-in-out infinite alternate;
}
@keyframes thumbSlide {
  from { left: 28%; }
  to { left: 68%; }
}

/* 04 · хром прячется: тайтл-бар и таймлайн уезжают, текст остаётся */
.wrv-chromehide { padding: 30px 56px; }

.mini-window {
  flex: 1;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  overflow: hidden;
  background: #fcfcfb;
}

.mini-bar {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--stroke);
  animation: barHide 5s ease-in-out infinite;
}
.mini-bar .dot { width: 9px; height: 9px; }

.mini-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 20px 26px;
}

.mini-timeline {
  display: flex;
  gap: 3px;
  padding: 8px 12px;
  background: var(--tray);
  animation: tlHide 5s ease-in-out infinite;
}
.mini-timeline .seg { height: 14px; border-radius: 4px; }

@keyframes barHide {
  0%, 20% { opacity: 1; transform: translateY(0); }
  35%, 70% { opacity: 0; transform: translateY(-8px); }
  85%, 100% { opacity: 1; transform: translateY(0); }
}
@keyframes tlHide {
  0%, 20% { opacity: 1; transform: translateY(0); }
  35%, 70% { opacity: 0; transform: translateY(8px); }
  85%, 100% { opacity: 1; transform: translateY(0); }
}

/* 05 · панель разметки: кнопки подсвечиваются по очереди */
.wrv-markup { justify-content: flex-end; gap: 0; padding: 0; }
.wrv-markup .wrv-doc { flex: 1; justify-content: center; padding: 36px 44px; }

.wrv-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-top: 1px solid var(--stroke);
  background: var(--bg-raised);
}

.wb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  padding: 4px 8px;
  border-radius: 6px;
  animation: wbPulse 4.8s ease-in-out infinite;
}
.wb i {
  font-family: var(--mono);
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
}
.wb:nth-child(1) { animation-delay: 0s; }
.wb:nth-child(2) { animation-delay: 1.2s; }
.wb:nth-child(3) { animation-delay: 2.4s; }
.wb:nth-child(4) { animation-delay: 3.6s; }

@keyframes wbPulse {
  0%, 100% { background: transparent; }
  8%, 17% { background: rgba(62, 123, 250, 0.16); }
  25% { background: transparent; }
}

.wb-time {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

/* 06 · папки: сайдбар с проектами */
.wrv-folders { flex-direction: row; gap: 0; padding: 0; }

.wrv-side {
  width: 42%;
  border-right: 1px solid var(--stroke);
  background: var(--bg);
  padding: 26px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fold, .proj { display: flex; align-items: center; gap: 8px; }
.fold i {
  font-style: normal;
  font-size: 9px;
  color: var(--text-3);
  width: 10px;
}
.fold b {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-3);
}
.fold .ln, .proj .ln { height: 7px; }

.proj { padding: 6px 8px 6px 18px; border-radius: 6px; }
.proj.is-sel { background: rgba(62, 123, 250, 0.14); }
.proj.is-sel .ln { background: rgba(62, 123, 250, 0.5); }

.wrv-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 13px;
  padding: 26px 32px;
}

/* ---------- Values: стопка карточек ----------
   Карточки-ценности наезжают друг на друга при скролле и собираются
   в стопку с лёгким поворотом (образец — opennote.com). */

.values { padding: 120px 0 80px; }
.values h2 { margin-top: 16px; }

/* Расстояние между карточками — flex-гэп, а не margin: маргины входят
   в sticky-ограничение и заставляли бы нижние карточки отклеиваться
   раньше верхней */
.stack {
  margin: 72px auto 0;
  max-width: 620px;
  display: flex;
  flex-direction: column;
  gap: 26vh;
}

/* Запас скролла после последней карточки: даёт ей доехать до точки
   прилипания и накрыть собой всю стопку */
.stack::after {
  content: "";
  display: block;
  height: 40vh;
}

/* У всех карточек одна высота: sticky-элемент отклеивается, когда его
   низ упирается в конец контейнера, — при равной высоте это происходит
   у всех одновременно, и стопка уезжает вверх целиком, не рассыпаясь */
.stack-card {
  position: sticky;
  top: 120px;
  height: 400px;
  border-radius: 20px;
  padding: 34px 36px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: #fff;
  transform: rotate(var(--r));
  box-shadow: 0 24px 60px rgba(24, 24, 32, 0.28);
}

.stack-card h3 { font-size: 23px; }
.stack-card p { font-size: 15.5px; opacity: 0.92; max-width: 30em; }

.sc-1 { --r: -1.8deg; background: var(--purple); }
.sc-2 { --r: 1.6deg; background: var(--green); }
.sc-3 { --r: -1.3deg; background: var(--yellow); color: #2c2410; }
.sc-3 p { opacity: 0.8; }
.sc-4 { --r: 1.9deg; background: var(--blue); }

/* Схемы в карточках */
.sc-art {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 150px;
  margin-bottom: 10px;
}

.stack-card .ln { background: rgba(255, 255, 255, 0.45); }
.sc-3 .ln { background: rgba(44, 36, 16, 0.35); }

/* 1 · хронометраж */
.sc-time {
  font-family: var(--mono);
  font-size: 52px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.sc-delta {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.22);
}

/* 2 · материалы */
.materials-demo {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12.5px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 14px 16px;
  width: 100%;
  max-width: 360px;
}
.materials-demo span { display: flex; align-items: center; gap: 8px; }
.sw { width: 9px; height: 9px; border-radius: 3px; display: inline-block; flex-shrink: 0; }
.sw-purple { background: #c4b5fd; }
.sw-green { background: #86efac; }
.sw-blue { background: #93c5fd; }

/* 3 · текст ↔ клип */
.sc-link { gap: 16px; }
.sc-para {
  flex: 1;
  max-width: 170px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sc-arrow { font-size: 22px; opacity: 0.7; }
.sc-clip {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  background: var(--tray);
  border-radius: 8px;
  padding: 16px 14px;
  white-space: nowrap;
}

/* 4 · один документ */
.sc-sheet {
  width: 100%;
  max-width: 300px;
  background: #fff;
  border-radius: 12px;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  box-shadow: 0 10px 26px rgba(24, 24, 32, 0.22);
}
.sc-sheet .ln { background: rgba(28, 28, 35, 0.14); }
.sh-row { display: flex; align-items: center; gap: 8px; }
.sh-row i {
  font-family: var(--mono);
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3);
}

/* ---------- Export: bento с артефактами ---------- */

.export { padding: 140px 0; background: var(--bg-raised); }
.export h2 { margin: 16px 0 20px; }
.export-head { max-width: 760px; }

.export-bento {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.ex-card {
  background: var(--bg);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
}
.ex-card h3 {
  font-family: var(--mono);
  font-size: 13.5px;
  letter-spacing: 0;
  margin-top: 16px;
}
.ex-card p { color: var(--text-2); font-size: 14px; margin-top: 4px; }

.ex-fcp { grid-column: span 2; }

/* Мок Final Cut: тёмный таймлайн, маркеры, клипы-карточки, аудио */
.fcp-window {
  flex: 1;
  background: var(--tray);
  border-radius: 12px;
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 210px;
}

.fcp-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: auto;
}
.fcp-chrome .dot { width: 9px; height: 9px; }
.fcp-title {
  margin-left: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.45);
}

.fcp-ruler {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 9.5px;
  color: rgba(255, 255, 255, 0.4);
  margin: 14px 0 8px;
}

/* Маркеры — синие метки FCP над началом каждого клипа */
.fcp-markers { display: flex; gap: 4px; height: 11px; margin-bottom: 3px; }
.fcp-markers i { position: relative; }
.fcp-markers i::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: #5ac8fa;
}

.fcp-track { display: flex; gap: 4px; height: 64px; }

.fcp-clip {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 1px;
  padding: 7px 9px;
  border-radius: 8px;
  font-family: var(--mono);
  min-width: 0;
  overflow: hidden;
}
.fcp-clip b { font-size: 11px; font-weight: 700; color: rgba(255, 255, 255, 0.95); }
.fcp-clip em { font-style: normal; font-size: 9.5px; color: rgba(255, 255, 255, 0.6); }
.fc-purple { background: var(--purple); }
.fc-green { background: var(--green); }
.fc-blue { background: var(--blue); }
.fc-yellow { background: var(--yellow); }
.fc-yellow b { color: rgba(28, 28, 35, 0.85); }
.fc-yellow em { color: rgba(28, 28, 35, 0.55); }

.fcp-audio { display: flex; gap: 4px; margin-top: 4px; }
.fcp-audio span {
  height: 10px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
}

/* PNG-карточки: стопка кадров-заглушек */
.png-stack {
  position: relative;
  flex: 1;
  min-height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.png-card {
  position: absolute;
  width: 78%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
}
.pc-back {
  transform: rotate(-7deg) translate(-16px, -10px);
  background: var(--purple);
  opacity: 0.3;
}
.pc-mid {
  transform: rotate(4deg) translate(14px, 6px);
  background: var(--yellow);
  opacity: 0.45;
}
.pc-front {
  background: linear-gradient(135deg, #3dbb63, #1e8e3e);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 16px;
  text-align: center;
  box-shadow: 0 10px 26px rgba(24, 24, 32, 0.25);
}
.pc-front b {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  opacity: 0.85;
}
.pc-title { font-size: 14px; font-weight: 600; line-height: 1.3; }

/* Мини-документы: шот-лист, csv, json */
.doc-mini {
  flex: 1;
  min-height: 150px;
  background: var(--bg-raised);
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
}
.doc-line { display: flex; align-items: center; gap: 9px; }
.doc-line i {
  font-family: var(--mono);
  font-style: normal;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-3);
  min-width: 20px;
}
.doc-line .ln { height: 7px; }

.csv-mini {
  flex: 1;
  min-height: 150px;
  background: var(--bg-raised);
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  align-content: center;
}
.csv-cell { height: 15px; border-radius: 4px; background: var(--bg-inset); }
.csv-head { background: rgba(62, 123, 250, 0.2); }

.json-mini {
  flex: 1;
  min-height: 150px;
  background: var(--tray);
  border-radius: 10px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
  font-family: var(--mono);
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.65);
  white-space: pre;
}
.json-mini i { font-style: normal; color: #9bc0ff; }
.json-mini em { font-style: normal; color: #ffd479; }

/* ---------- CTA ---------- */

.cta {
  padding: 150px 0;
  border-top: 1px solid var(--stroke);
}

.cta-inner { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.cta-icon { width: 96px; height: 96px; border-radius: 22px; box-shadow: var(--shadow-card); }
.cta h2 { font-size: clamp(36px, 5.6vw, 64px); }
.cta .body-l { max-width: 30em; }
.cta-note { font-family: var(--mono); font-size: 12px; color: var(--text-3); }
.cta-note .cta-alt { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.cta-note .cta-alt:hover { color: var(--text-2); }

/* ---------- Footer ---------- */

.footer { padding: 28px 0; border-top: 1px solid var(--stroke); }
.footer-inner {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-3);
}

/* ---------- Reveal-заготовки ----------
   Прячем только hero (интро один раз за сессию). Контент ниже
   виден сразу — без fade-up на скролле. */

.hero .reveal { opacity: 0; }

/* Без JS или с reduced motion всё видно сразу */
.no-anim .reveal { opacity: 1 !important; }
.no-anim .mock-track .mock-clip { opacity: 1; transform: none; }

/* Якорные переходы: отступ под фиксированную шапку */
section[id] { scroll-margin-top: 80px; }

/* Reduced motion: глушим и CSS-переходы, не только GSAP */
@media (prefers-reduced-motion: reduce) {
  .mock-clip,
  .mock-scene,
  .btn,
  .nav { transition: none; }
  .caret { animation: none; }
  .mock-track .mock-clip { opacity: 1; }
  .thumb, .mini-bar, .mini-timeline, .wb { animation: none; }
  .stack-card { transform: none; }
  .wrv-pane.is-replay { animation: none; }
  .wr-scrolly.is-live .wr-item .wr-item-desc {
    max-height: none;
    opacity: 1;
    margin-top: 10px;
  }
  .wr-progress { display: none; }
}

/* ---------- Адаптив ---------- */

@media (max-width: 900px) {
  .model-grid { grid-template-columns: 1fr; gap: 40px; }
  .export-bento { grid-template-columns: 1fr; }
  .ex-fcp { grid-column: auto; }
  .step { grid-template-columns: 1fr; gap: 20px; }
  .step-num { order: -1; }
  .nav-links { display: none; }
  .mock-gutter { width: 92px; }
  .mock-markupbar { overflow-x: auto; }
  .mb-btn { flex-shrink: 0; }

  /* Scrolly: без правого окна, пункты раскрываются по клику/таймеру */
  .wr-scrolly { grid-template-columns: 1fr; gap: 0; }
  .wr-visual { display: none; }
  .wr-scrolly.is-live .wr-item { min-height: 0; }

  /* Стопка: карточки компактнее */
  .stack { gap: 18vh; }
  .stack-card {
    height: 400px;
    padding: 26px 24px;
    top: 90px;
  }
  .sc-time { font-size: 40px; }
}

@media (max-width: 560px) {
  /* В узкой шапке от кнопки доната остаётся только сердечко */
  .donate-label { display: none; }
  .donate-btn { padding: 7px 10px; }
  .donate-btn .donate-heart { font-size: 15px; }
}
