/* ПОСЕВ — визуальная система. Тёмный фон, цвет молодого ростка, мотив всходов:
   полосы разной высоты читаются и как звук, и как ряд подросших побегов. */

:root {
  --bg: #070a08;
  --bg-soft: #0b100d;
  --panel: #0f1411;
  --panel-2: #151c18;
  --line: #22302a;
  --line-soft: #182420;
  --ink: #f1f4ee;
  --muted: #8e9a93;
  --accent: #a3e635;
  --accent-ink: #07110a;
  --hot: #f0b429;
  --ok: #35d07f;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 60px -30px rgba(0, 0, 0, .9);
  --font: "Inter Tight", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .35;
  background-image: radial-gradient(circle at 20% 0%, rgba(163, 230, 53, .10), transparent 45%),
                    radial-gradient(circle at 85% 15%, rgba(240, 180, 41, .08), transparent 40%);
}

a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; line-height: 1.05; letter-spacing: -.02em; }
p { margin: 0; }
button { font: inherit; color: inherit; }

.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; position: relative; z-index: 1; }

/* ---------- шапка ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(8, 9, 11, .82);
  border-bottom: 1px solid var(--line-soft);
}
.topbar-inner { display: flex; align-items: center; gap: 22px; height: 66px; }

.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; }
.logo-mark { width: 22px; height: 22px; color: var(--accent); }
.logo-word { font-size: 20px; letter-spacing: .08em; }
.logo-tag {
  font-size: 10px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--line); border-radius: 999px;
  padding: 2px 8px; margin-left: 2px;
}
.logo-static { cursor: default; }

.mainnav { display: flex; gap: 4px; margin-left: 10px; }
.mainnav a {
  padding: 8px 12px; border-radius: 999px; font-size: 14.5px; color: var(--muted);
  transition: color .15s, background .15s;
}
.mainnav a:hover { color: var(--ink); background: var(--panel); }
.mainnav a.active { color: var(--ink); background: var(--panel-2); }

.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }

/* гамбургер: на широком экране не нужен, на телефоне заменяет горизонтальное меню */
.nav-toggle {
  display: none; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  width: 42px; height: 42px; padding: 0; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
}
.nav-toggle span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .18s, opacity .18s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* затемнение страницы под раскрытым меню: без него из-под панели торчали обрезанные строки */
body.menu-open::before {
  /* 38 < 40 (шапка): затемнение обязано быть ПОД панелью меню, иначе гасит и её */
  content: ""; position: fixed; inset: 66px 0 0 0; z-index: 38;
  background: rgba(8, 9, 11, .68);
}
.balance-chip {
  font-family: var(--mono); font-size: 11.5px; color: var(--muted);
  border: 1px dashed var(--line); border-radius: 999px; padding: 5px 10px;
}

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; cursor: pointer; white-space: nowrap;
  transition: transform .12s, background .15s, border-color .15s, color .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #b6ef5a; }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: #3a4048; background: var(--panel); }
.btn-dark { background: var(--panel-2); color: var(--ink); border-color: var(--line); }
.btn-dark:hover { border-color: #3a4048; }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- hero ---------- */
.hero { padding: 64px 0 40px; display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.eyebrow {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent); display: flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--accent); }
.hero h1 { margin-top: 18px; font-size: clamp(38px, 5.4vw, 68px); font-weight: 800; text-transform: uppercase; letter-spacing: -.035em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { margin-top: 20px; font-size: 18px; color: #c9ccd3; max-width: 34em; }
.hero-facts { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; }
.hero-facts li { font-size: 14.5px; color: var(--muted); padding-left: 18px; position: relative; }
.hero-facts li::before { content: ""; position: absolute; left: 0; top: .55em; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); }
.hero-facts b { color: var(--ink); font-weight: 600; }
.hero-cta { margin-top: 30px; }
.hero-note { margin-top: 14px; font-size: 13px; color: var(--muted); }

/* ---------- «плеер» в hero ---------- */
.stage { position: relative; }
.stage-card {
  background: linear-gradient(160deg, #15181d, #0c0e11 60%);
  border: 1px solid var(--line); border-radius: 26px; padding: 16px; box-shadow: var(--shadow);
}
.stage-screen {
  position: relative; aspect-ratio: 9 / 14; border-radius: 18px; overflow: hidden;
  background: radial-gradient(circle at 55% 35%, #2a2f38, #0b0d10 70%);
  display: grid; place-items: center;
}
.stage-screen video { width: 100%; height: 100%; object-fit: cover; }
.stage-overlay {
  position: absolute; inset: auto 0 0 0; padding: 16px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .78));
  display: flex; flex-direction: column; gap: 10px;
}
.stage-meta { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; color: #cfd3da; }
.wave { display: flex; align-items: flex-end; gap: 3px; height: 42px; }
.wave span { flex: 1; background: var(--accent); border-radius: 2px; opacity: .85; animation: pulse 1.6s ease-in-out infinite; }
.wave span:nth-child(3n) { animation-delay: .2s; background: #f0b429; }
.wave span:nth-child(4n) { animation-delay: .45s; }
.wave span:nth-child(5n) { animation-delay: .7s; }
@keyframes pulse { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
.stage-play {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(8, 9, 11, .72); border: 1px solid rgba(255, 255, 255, .14);
  color: var(--ink); border-radius: 999px; padding: 6px 12px; font-size: 12px;
  font-family: var(--mono);
}
.stage-badge {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  background: var(--accent); color: var(--accent-ink);
  font-size: 11px; font-weight: 700; letter-spacing: .06em;
  border-radius: 999px; padding: 5px 10px; text-transform: uppercase;
}

/* ---------- секции ---------- */
section { padding: 64px 0; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.sec-head h2 { font-size: clamp(28px, 3.4vw, 42px); font-weight: 800; text-transform: uppercase; letter-spacing: -.03em; }
.sec-head p { color: var(--muted); max-width: 42ch; font-size: 15px; }
.kicker { font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--hot); margin-bottom: 10px; }

.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px;
}
.card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 14.5px; }
.card-num { font-family: var(--mono); font-size: 12px; color: var(--accent); margin-bottom: 14px; }

.stat { padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-soft); }
.stat .v { font-size: 30px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat .l { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; counter-reset: step; }
.step { position: relative; padding: 22px 20px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.step::before {
  counter-increment: step; content: "0" counter(step);
  font-family: var(--mono); font-size: 12px; color: var(--accent);
}
.step h3 { font-size: 17px; margin: 8px 0 6px; }
.step p { color: var(--muted); font-size: 14px; }

/* ---------- тарифы ---------- */
.tariffs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.tariff {
  position: relative; display: flex; flex-direction: column; gap: 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 22px;
}
.tariff.hot { border-color: var(--accent); background: linear-gradient(180deg, rgba(163, 230, 53, .07), transparent 55%), var(--panel); }
.tariff .name { font-size: 17px; font-weight: 800; letter-spacing: .1em; }
.tariff .tag { font-size: 13px; color: var(--muted); min-height: 38px; }
.tariff .price { display: flex; align-items: baseline; gap: 6px; }
.tariff .price b { font-size: 34px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.tariff .price span { font-size: 13px; color: var(--muted); }
.tariff ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tariff li { font-size: 13.8px; color: #c6cad1; padding-left: 20px; position: relative; }
.tariff li::before { content: "→"; position: absolute; left: 0; color: var(--accent); font-size: 12px; }
.tariff .btn { margin-top: auto; }
.tariff .flag {
  position: absolute; top: -11px; right: 16px; background: var(--accent); color: var(--accent-ink);
  font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
}
.tariff .cost { font-family: var(--mono); font-size: 11.5px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 10px; }
.packs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.pack { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; }
.pack b { font-size: 15px; }
.pack .n { font-size: 12.5px; color: var(--muted); }
.pack .p { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* ---------- форма ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; background: var(--bg-soft); color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  font: inherit; font-size: 14.5px;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.field textarea { min-height: 76px; resize: vertical; }
.hint { font-size: 12px; color: var(--muted); }
.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.row-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

.seg { display: inline-flex; padding: 4px; gap: 4px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; }
.seg button {
  border: 0; background: transparent; color: var(--muted); padding: 8px 14px; border-radius: 999px;
  cursor: pointer; font-size: 14px;
}
.seg button.on { background: var(--accent); color: var(--accent-ink); font-weight: 600; }

.drop {
  border: 1px dashed #333944; border-radius: 14px; padding: 22px; text-align: center;
  color: var(--muted); font-size: 14px; cursor: pointer; transition: border-color .15s, background .15s;
}
.drop:hover, .drop.over { border-color: var(--accent); background: rgba(163, 230, 53, .04); }
.thumbs { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.thumbs img { width: 74px; height: 74px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }

/* ---------- сценарий / раскадровка ---------- */
.scenes { display: flex; flex-direction: column; gap: 10px; }
.scene {
  display: grid; grid-template-columns: 92px 1fr auto; gap: 14px; align-items: start;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px;
}
.scene .t { font-family: var(--mono); font-size: 11.5px; color: var(--accent); padding-top: 3px; white-space: nowrap; }
.scene .v { font-size: 14.5px; }
.scene .vo { font-size: 13.5px; color: var(--muted); margin-top: 3px; }
.scene .kind { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 3px 8px; }
.scene .kind.ai { color: var(--accent); border-color: rgba(163, 230, 53, .4); }

/* ---------- прогресс ---------- */
.progress { height: 8px; border-radius: 999px; background: var(--panel-2); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--hot)); transition: width .4s ease; }
.stagelist { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.stagelist div { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.stagelist div.done { color: var(--ink); }
.stagelist div.now { color: var(--accent); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.done .dot { background: var(--ok); }
.now .dot { background: var(--accent); box-shadow: 0 0 0 4px rgba(163, 230, 53, .16); }

/* ---------- таблицы / KPI ---------- */
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { padding: 10px 12px; text-align: right; border-bottom: 1px solid var(--line-soft); }
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl th { color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.tbl tr:hover td { background: rgba(255, 255, 255, .015); }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; background: var(--bg-soft); }
.kpi .l { font-size: 11.5px; color: var(--muted); }
.kpi .v { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.kpi .v.ok { color: var(--ok); }
.kpi .v.bad { color: #ff6b5a; }
.warn { font-size: 13px; color: #ffb020; }

/* ---------- прочее ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; }
.pill.on { color: var(--accent); border-color: rgba(163, 230, 53, .4); }
.tabs { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.tabs button { background: transparent; border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 9px 16px; cursor: pointer; font-size: 14px; }
.tabs button.on { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); font-weight: 600; }

.faq { display: flex; flex-direction: column; gap: 8px; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel); padding: 14px 18px; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 15px; }
.faq p { color: var(--muted); font-size: 14px; margin-top: 10px; }

.cta-band {
  border: 1px solid var(--line); border-radius: 24px; padding: 34px;
  background: radial-gradient(circle at 12% 20%, rgba(163, 230, 53, .12), transparent 55%), var(--panel);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.cta-band h2 { font-size: clamp(24px, 3vw, 34px); text-transform: uppercase; font-weight: 800; }

.footer { border-top: 1px solid var(--line-soft); margin-top: 40px; padding: 34px 0 50px; }
.footer-inner { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer-brand p { color: var(--muted); font-size: 13.5px; margin-top: 10px; }
.footer-cols { display: flex; gap: 48px; flex-wrap: wrap; }
.footer-cols h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 10px; }
.footer-cols a, .footer-note { display: block; font-size: 13.5px; color: #c3c7ce; margin-bottom: 6px; }
.footer-cols a:hover { color: var(--accent); }

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px);
  background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 14px;
  padding: 11px 20px; border-radius: 999px; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; z-index: 90;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.empty { color: var(--muted); font-size: 14px; padding: 26px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius-sm); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.hidden { display: none !important; }

/* результат: вертикальное видео не должно растягивать карточку на весь экран */
#result-video, #detail-video {
  max-height: 380px; width: auto; max-width: 100%;
  margin-inline: auto; background: #000; object-fit: contain;
}

/* таблица заказов: номер, товар и тариф читаются слева */
#orders-body td:nth-child(2), #orders-body th:nth-child(2),
#orders-body td:nth-child(3), #orders-body th:nth-child(3),
#orders-body td:nth-child(6), #orders-body th:nth-child(6) { text-align: left; }

/* экраны приложения живут внутри main: у них свой ритм отступов */
#view-builder, #view-cabinet, #view-economics { padding: 8px 0 40px; }

@media (max-width: 1080px) {
  .tariffs, .grid-4, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { grid-template-columns: 1fr; }
  .stage { max-width: 420px; }
}
@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .mainnav { display: none; }
  .mainnav.open {
    /* fixed, а не absolute: absolute считается от .wrap (position: relative), и панель
       ужималась до 340 px — в полях по краям просвечивал заголовок героя */
    display: flex; position: fixed; top: 66px; left: 0; right: 0; z-index: 60;
    flex-direction: column; gap: 2px; padding: 10px 16px 14px;
    background: var(--bg-soft); border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 40px -24px rgba(0, 0, 0, .9);
  }
  .mainnav.open a { padding: 12px 14px; border-radius: 12px; font-size: 15px; }
  /* в приложении та же навигация есть в гамбургере, дублировать полосу вкладок не нужно */
  #tabs { display: none; }
  /* в шапке на телефоне остаётся только главное действие */
  .topbar-actions .btn-ghost, .balance-chip { display: none; }
  .tariffs, .grid-3, .grid-2, .steps, .packs, .row, .row-3 { grid-template-columns: 1fr; }
  .sec-head { flex-direction: column; align-items: flex-start; }
  .cta-band, .footer-inner { flex-direction: column; align-items: flex-start; }
  .hero { padding-top: 36px; }
  .scene { grid-template-columns: 60px 1fr; }
  .scene .kind { display: none; }
  section { padding: 44px 0; }
}
