:root {
  --bg: #000;
  --card: rgba(255, 255, 255, 0.07);
  --text: #fff;
  --muted: rgba(255, 255, 255, 0.62);
  --line: rgba(255, 255, 255, 0.12);
  --accent: #fff;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

a { color: var(--text); }

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

/* Шапка */
header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
}
.logo {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 18px;
  font-size: 15px;
}
.nav a:hover { color: var(--text); }

/* Главная */
.hero {
  text-align: center;
  padding: 72px 0 56px;
}
.hero h1 {
  font-size: clamp(36px, 7vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
}
.hero p {
  color: var(--muted);
  font-size: clamp(17px, 2.4vw, 20px);
  max-width: 560px;
  margin: 0 auto 32px;
}
.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #000;
  font-weight: 600;
  font-size: 17px;
  padding: 16px 28px;
  border-radius: 999px;
  text-decoration: none;
}
.button.soon {
  background: var(--card);
  color: var(--muted);
  cursor: default;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  padding-bottom: 72px;
}
.card {
  background: var(--card);
  border-radius: 20px;
  padding: 22px;
}
.card h3 {
  margin: 0 0 6px;
  font-size: 18px;
}
.card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

/* Юридические страницы */
.doc {
  padding: 32px 0 72px;
}
.doc h1 {
  font-size: clamp(30px, 5vw, 40px);
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}
.doc .updated {
  color: var(--muted);
  margin: 0 0 32px;
}
.doc h2 {
  font-size: 20px;
  margin: 36px 0 10px;
}
.doc p, .doc li {
  color: rgba(255, 255, 255, 0.82);
  font-size: 16px;
}
.doc ul { padding-left: 20px; }
.doc li { margin-bottom: 6px; }

footer.site {
  border-top: 1px solid var(--line);
  padding: 24px 0 40px;
  color: var(--muted);
  font-size: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: space-between;
}
footer.site a { color: var(--muted); text-decoration: none; }
footer.site a:hover { color: var(--text); }

/* ===== Главная: формы, анимации, опрос ===== */

.badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  background: var(--card);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.join {
  display: flex;
  gap: 8px;
  max-width: 440px;
  margin: 0 auto;
  background: var(--card);
  padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.join input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  padding: 0 14px;
}
.join input::placeholder { color: rgba(255, 255, 255, 0.4); }
.join button, .btn {
  border: 0;
  cursor: pointer;
  background: #fff;
  color: #000;
  font: inherit;
  font-weight: 600;
  font-size: 16px;
  padding: 13px 20px;
  border-radius: 999px;
  white-space: nowrap;
}
.join button:disabled { opacity: 0.6; cursor: default; }
.join-note {
  color: rgba(255, 255, 255, 0.45);
  font-size: 13px;
  margin: 12px 0 0;
}
.join-note.error { color: #ff6b6b; }
.join-note.ok { color: #4ade80; }

@media (max-width: 460px) {
  .join { flex-direction: column; border-radius: 22px; padding: 8px; }
  .join input { padding: 12px 10px; text-align: center; }
}

/* Карточка-витрина под анимацию */
.stage {
  background: var(--card);
  border-radius: 28px;
  padding: 36px 20px 26px;
  margin: 44px auto 0;
  max-width: 560px;
}

/* Волна: паузы и retakes гаснут и схлопываются */
.wave {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wave i {
  display: block;
  width: 6px;
  margin: 0 2.5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.85);
  transition: width 0.6s cubic-bezier(.4, 0, .2, 1), margin 0.6s cubic-bezier(.4, 0, .2, 1), opacity 0.45s ease;
}
.wave i.pause { background: rgba(255, 255, 255, 0.25); }
.wave i.retake { background: rgba(255, 59, 48, 0.85); }
.wave.cut i.pause, .wave.cut i.retake { width: 0; margin: 0; opacity: 0; }

.legend {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 22px;
  font-size: 14px;
  color: var(--muted);
}
.legend span { display: inline-flex; align-items: center; gap: 6px; transition: opacity 0.45s ease; }
.legend b { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.wave.cut + .legend .fade { opacity: 0.4; }

/* Секции с функциями */
.feature {
  padding: 88px 0 0;
  text-align: center;
}
.feature h2 {
  font-size: clamp(28px, 5vw, 40px);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 12px;
}
.feature > p {
  color: var(--muted);
  font-size: 18px;
  max-width: 520px;
  margin: 0 auto;
}

/* Hours vs Minutes */
.chart {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.cols {
  display: flex;
  align-items: flex-end;
  gap: 36px;
  height: 260px;
}
.col { width: 96px; text-align: center; }
.col .amount { font-weight: 700; font-size: 20px; margin-bottom: 10px; }
.col .bar {
  height: 210px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.14);
  display: flex;
  justify-content: center;
  padding-top: 12px;
  font-size: 18px;
}
.col.dim .amount { color: var(--muted); }
.col.ai .bar {
  background: linear-gradient(#fff, rgba(255, 255, 255, 0.75));
  box-shadow: 0 0 36px rgba(255, 255, 255, 0.3);
  color: #000;
}
.chart.play .col.ai .bar { height: 44px; transition: height 1s cubic-bezier(.42, 0, .58, 1) 0.35s; }
.baseline { width: 260px; height: 2px; border-radius: 1px; background: rgba(255, 255, 255, 0.15); }
.labels { display: flex; gap: 36px; margin-top: 10px; font-weight: 600; font-size: 15px; }
.labels span { width: 96px; text-align: center; }
.labels span:first-child { color: var(--muted); }

/* Сырая речь → чистые субтитры */
.cleanup {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
}
.take {
  flex: 1;
  min-height: 190px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 16px;
}
.take .label { font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, 0.55); margin-bottom: 10px; }
.take .text { font-size: 21px; font-weight: 600; line-height: 1.45; transition: opacity 0.25s ease; }
.take .text s { color: #ff3b30; text-decoration-color: #ff3b30; }
.arrow { font-size: 22px; font-weight: 700; color: rgba(255, 255, 255, 0.3); transition: color 0.3s; }
.arrow.on { color: rgba(255, 255, 255, 0.9); }
.phone {
  position: relative;
  flex: none;
  width: 108px;
  height: 208px;
  border-radius: 22px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  background: linear-gradient(#383838, #1a1a1a);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.phone svg { position: absolute; bottom: -8px; width: 92px; opacity: 0.12; }
.caption {
  position: relative;
  font-size: 21px;
  font-weight: 800;
  color: #fff;
  -webkit-text-stroke: 5px #000;
  paint-order: stroke fill;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.caption.pop { transform: scale(0.85); opacity: 0; transition: none; }

@media (max-width: 460px) {
  .take .text { font-size: 18px; }
  .phone { width: 92px; height: 180px; }
  .cleanup { gap: 10px; }
}

/* Как это работает */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 36px;
  text-align: left;
}
.steps .card .n {
  display: inline-flex;
  width: 30px; height: 30px;
  align-items: center; justify-content: center;
  border-radius: 50%;
  background: #fff;
  color: #000;
  font-weight: 700;
  margin-bottom: 12px;
}

.final {
  text-align: center;
  padding: 96px 0 88px;
}
.final h2 { font-size: clamp(28px, 5vw, 40px); letter-spacing: -0.02em; margin: 0 0 10px; }
.final p { color: var(--muted); font-size: 18px; margin: 0 0 28px; }

/* Появление при прокрутке */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Опрос после записи */
.survey-bg {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 10;
}
.survey-bg.open { display: flex; }
.survey {
  background: #141414;
  border: 1px solid var(--line);
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  border-radius: 28px 28px 0 0;
  padding: 28px 20px 24px;
}
@media (min-width: 600px) {
  .survey-bg { align-items: center; }
  .survey { border-radius: 28px; padding: 32px; }
}
.survey h3 { margin: 0 0 6px; font-size: 24px; letter-spacing: -0.01em; }
.survey .sub { color: var(--muted); margin: 0 0 8px; }
.q { margin-top: 22px; }
.q .t { font-weight: 600; margin-bottom: 10px; }
.q .t small { color: rgba(255, 255, 255, 0.45); font-weight: 400; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid transparent;
  font: inherit;
  font-size: 15px;
  padding: 9px 14px;
  border-radius: 999px;
  cursor: pointer;
}
.chips button.on { background: #fff; color: #000; }
.survey textarea {
  width: 100%;
  min-height: 90px;
  resize: vertical;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px;
  outline: 0;
}
.survey .actions { display: flex; gap: 10px; margin-top: 26px; align-items: center; }
.survey .actions .btn { flex: 1; }
.survey .skip { background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; padding: 12px; }
.survey .done { text-align: center; padding: 24px 0 8px; }
.survey .done .big { font-size: 44px; }

@media (prefers-reduced-motion: reduce) {
  .wave i, .reveal, .chart.play .col.ai .bar, .caption { transition: none !important; }
}

.hero p.join-note, .final p.join-note { font-size: 13px; margin: 12px auto 0; color: rgba(255, 255, 255, 0.45); }
.hero p.join-note.error, .final p.join-note.error { color: #ff6b6b; }
.hero p.join-note.ok, .final p.join-note.ok { color: #4ade80; }
