/* Лендинг и кабинет Rakursa. Палитра — как у редактора (App.vue): тёмная, зелёный акцент. */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font: 16px/1.55 system-ui, sans-serif;
  color: #e6e6ea;
  background: #17171b;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: #8fd8ab; text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Шапка --- */
.top {
  display: flex; align-items: center; gap: 18px;
  padding: 12px 24px;
  background: #202027; border-bottom: 1px solid #2c2c34;
  position: sticky; top: 0; z-index: 10;
}
.logo { font-size: 18px; font-weight: 700; letter-spacing: .04em; color: #e6e6ea; }
.logo b { color: #8fd8ab; }
.top nav { display: flex; gap: 16px; margin-left: 8px; }
.top .spacer { flex: 1; }
.lang {
  background: #16161b; border: 1px solid #33333d; color: #d6d6de;
  border-radius: 5px; font-size: 13px; padding: 4px 8px; cursor: pointer;
}

/* --- Кнопки --- */
.btn {
  display: inline-block; cursor: pointer; border-radius: 6px; font-size: 14px;
  padding: 8px 16px; border: 1px solid #33333d; background: #24242c; color: #d6d6de;
}
.btn:hover { background: #2f2f39; border-color: #4a4a57; text-decoration: none; }
.btn.primary { background: #2b4d3a; border-color: #3a6b4f; color: #bfe8cf; }
.btn.primary:hover { background: #345c46; }
.btn.big { font-size: 16px; padding: 12px 24px; }

/* --- Герой --- */
.hero {
  display: flex; align-items: center; justify-content: center; gap: 48px;
  flex-wrap: wrap; padding: 72px 24px 56px; text-align: left;
}
.hero .text { max-width: 520px; }
.hero h1 { font-size: 40px; line-height: 1.15; margin: 0 0 16px; }
.hero p { font-size: 18px; color: #a8a8b3; margin: 0 0 28px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* Декоративный CSS-куб: намёк на 3D без единого ассета. */
.scene { width: 180px; height: 180px; perspective: 700px; }
.cube {
  width: 100%; height: 100%; position: relative; transform-style: preserve-3d;
  animation: spin 14s linear infinite;
}
.cube i {
  position: absolute; inset: 0; border: 1px solid #3a6b4f; border-radius: 6px;
  background: rgba(43, 77, 58, .28);
}
.cube i:nth-child(1) { transform: rotateY(0deg)   translateZ(90px); }
.cube i:nth-child(2) { transform: rotateY(90deg)  translateZ(90px); }
.cube i:nth-child(3) { transform: rotateY(180deg) translateZ(90px); }
.cube i:nth-child(4) { transform: rotateY(270deg) translateZ(90px); }
.cube i:nth-child(5) { transform: rotateX(90deg)  translateZ(90px); }
.cube i:nth-child(6) { transform: rotateX(-90deg) translateZ(90px); }
@keyframes spin { from { transform: rotateX(-18deg) rotateY(0); } to { transform: rotateX(-18deg) rotateY(360deg); } }
@media (prefers-reduced-motion: reduce) { .cube { animation: none; transform: rotateX(-18deg) rotateY(30deg); } }

/* --- Возможности --- */
.features { max-width: 960px; margin: 0 auto; padding: 24px 24px 64px; }
.features h2 { font-size: 26px; margin: 0 0 20px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.card {
  background: #1c1c22; border: 1px solid #2c2c34; border-radius: 8px; padding: 18px;
}
.card h3 { margin: 0 0 8px; font-size: 16px; color: #bfe8cf; }
.card p { margin: 0; font-size: 14px; color: #a8a8b3; }

/* --- Скриншоты (живые кадры редактора и плеера) --- */
.shots { max-width: 1100px; margin: 0 auto; padding: 8px 24px 48px; }
.shots h2 { font-size: 26px; margin: 0 0 20px; }
.shots-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.shots figure { margin: 0; }
.shots img {
  width: 100%; display: block; border-radius: 8px; border: 1px solid #2c2c34;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
.shots figcaption { font-size: 13px; color: #a8a8b3; margin-top: 8px; }

/* --- Как это работает / Тарифы / нижний CTA --- */
.how, .tariffs { max-width: 960px; margin: 0 auto; padding: 24px 24px 48px; width: 100%; }
.how h2, .tariffs h2 { font-size: 26px; margin: 0 0 20px; }
.step {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%; margin-bottom: 10px;
  background: #2b4d3a; border: 1px solid #3a6b4f; color: #bfe8cf; font-size: 13px; font-weight: 700;
}
.how-tpl { font-size: 14px; color: #a8a8b3; margin: 22px 2px 0; max-width: 76ch; }
.how-tpl b { color: #bfe8cf; }
.price-card { text-align: center; }
.price-val { font-size: 26px; font-weight: 700; color: #e6e6ea; margin: 6px 0 10px; }
.hint-line { font-size: 13px; color: #7c7c88; margin: 14px 2px 0; }
.cta2 { text-align: center; padding: 24px 24px 72px; }
.cta2 h2 { font-size: 26px; margin: 0 0 18px; }

/* --- Кабинет --- */
.cabinet { max-width: 420px; margin: 48px auto; padding: 0 24px; flex: 1; width: 100%; }
.panel { background: #1c1c22; border: 1px solid #2c2c34; border-radius: 8px; padding: 24px; }
.panel h1 { font-size: 22px; margin: 0 0 18px; }
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tabs button {
  flex: 1; padding: 8px; cursor: pointer; border-radius: 6px; font-size: 14px;
  background: #24242c; border: 1px solid #33333d; color: #d6d6de;
}
.tabs button.active { background: #2b4d3a; border-color: #3a6b4f; color: #bfe8cf; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: #a8a8b3; margin-bottom: 4px; }
.field input {
  width: 100%; padding: 9px 10px; border-radius: 6px; font-size: 14px;
  background: #16161b; border: 1px solid #33333d; color: #e6e6ea;
}
.field input:focus { outline: none; border-color: #3a6b4f; }
.err { color: #e8a1a1; font-size: 13px; min-height: 18px; margin: 6px 0 10px; }
.hint { color: #7c7c88; font-size: 12px; margin-top: 12px; }
.hint.ok { color: #8fd8ab; font-size: 13px; }
.hint.links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hint.links a { color: #7c9c8a; }
.hint.links a:hover { color: #8fd8ab; }
.notice {
  background: #22301f; border: 1px solid #3a6b4f; color: #bfe8cf;
  border-radius: 6px; font-size: 13px; padding: 10px 12px; margin-bottom: 16px;
}
#yandex { margin-top: 10px; }
.profile .email { font-size: 17px; font-weight: 600; margin-bottom: 4px; overflow-wrap: anywhere; }
.profile .status { font-size: 13px; color: #a8a8b3; }
.profile .status.ok { color: #8fd8ab; }
.full { width: 100%; text-align: center; }

/* --- Кабинет с секциями: та же панель, но шире форм входа --- */
/* Ширины хватает на ряд карточек тарифов: их всегда показываем в одну строку. */
.cabinet.wide { max-width: 1000px; }
.phead {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 8px;
  background: #16161b; border: 1px solid #2c2c34; border-radius: 8px; padding: 12px 14px;
}
.phead .who { min-width: 0; }
.cab-sec { border-top: 1px solid #2c2c34; padding-top: 14px; margin-top: 18px; }
.cab-sec h2 {
  font-size: 12px; text-transform: uppercase; letter-spacing: .05em;
  color: #8b8b96; margin: 0 0 10px; font-weight: 600;
}
.cab-sec > div { display: flex; flex-direction: column; gap: 8px; }
.cab-note {
  background: #22301f; border: 1px solid #3a6b4f; color: #bfe8cf;
  border-radius: 6px; font-size: 13px; padding: 9px 12px; margin: 14px 0 0;
}
.cab-note.bad { background: #3a2020; border-color: #7a4040; color: #e8b1b1; }
.big-line { font-size: 15px; color: #e6e6ea; }
.dim { font-size: 13px; color: #8b8b96; }
.small { font-size: 12px; }
.ok { color: #8fd8ab; }
.warn-line { font-size: 13px; color: #e8b1b1; }
.mono-line { font-family: ui-monospace, monospace; font-size: 12px; color: #a8a8b3; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.chk { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #a8a8b3; }
.chk input { accent-color: #3a6b4f; }
.inp {
  background: #16161b; border: 1px solid #33333d; color: #e6e6ea;
  border-radius: 6px; font-size: 14px; padding: 8px 10px; max-width: 260px;
}
.inp:focus { outline: none; border-color: #7a4040; }
.btn.danger { background: #3a2020; border-color: #7a4040; color: #e8b1b1; }
.btn.danger:hover { background: #4a2828; border-color: #8a5050; }
.btn:disabled { opacity: .45; cursor: default; }
/* Карточка облачного проекта: имя слева, действия справа. */
.item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: #16161b; border: 1px solid #2c2c34; border-radius: 6px; padding: 10px 12px;
}
.item-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.item-name { font-size: 14px; color: #e6e6ea; overflow-wrap: anywhere; }
.item .btn { font-size: 13px; padding: 5px 10px; }
.btn.small { font-size: 13px; padding: 5px 10px; }

/* --- Подписка: текущее состояние, использование, витрина тарифов --- */
.sub-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sub-now { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
/* Плитки «использовано / предел»; полоса — только при конечной квоте. */
.usage { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.usage-tile {
  background: #16161b; border: 1px solid #2c2c34; border-radius: 6px; padding: 9px 12px;
  display: flex; flex-direction: column; gap: 5px;
}
.usage-val { font-size: 15px; color: #e6e6ea; }
.usage-val.off { color: #7c7c88; }
.bar { height: 4px; border-radius: 2px; background: #2c2c34; overflow: hidden; }
.bar i { display: block; height: 100%; background: #3a6b4f; }
.bar.full i { background: #7a4040; }

/* Тарифы — карточками в один ряд равной ширины: пользователь сравнивает условия, а не
   читает их в подписи кнопки. На узком экране ряд разворачивается в колонку. */
.plans-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-top: 6px;
}
.plans-title {
  font-size: 12px; text-transform: uppercase; letter-spacing: .05em;
  color: #8b8b96; font-weight: 600;
}
.plans { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 12px; }
.plan {
  display: flex; flex-direction: column; gap: 10px;
  background: #16161b; border: 1px solid #2c2c34; border-radius: 8px; padding: 14px;
}
.plan.current { border-color: #3a6b4f; background: #191f1b; }
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plan-name { font-size: 15px; font-weight: 600; color: #e6e6ea; overflow-wrap: anywhere; }
.plan-badge {
  flex: none; font-size: 11px; color: #bfe8cf; white-space: nowrap;
  background: #2b4d3a; border: 1px solid #3a6b4f; border-radius: 10px; padding: 1px 8px;
}
.plan-price { font-size: 22px; font-weight: 700; color: #e6e6ea; }
.plan-per { font-size: 13px; font-weight: 400; font-style: normal; color: #8b8b96; }
.terms { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: #c6c6d0; }
/* Значение переносится на свою строку целиком: в узкой карточке «без ограничений»
   иначе вклинивалось в середину подписи. */
.term { display: flex; align-items: baseline; gap: 2px 6px; flex-wrap: wrap; }
.term .mark { flex: none; color: #8fd8ab; }
.term.no { color: #7c7c88; }
.term.no .mark { color: #55555f; }
.term-val { margin-left: auto; color: #e6e6ea; white-space: nowrap; }
.term.no .term-val { color: #7c7c88; font-weight: 400; }
.plan-acts { margin-top: auto; display: flex; flex-direction: column; gap: 6px; }
.plan-note { font-size: 12px; color: #7c7c88; }

/* Строка платежа/начисления: дата · назначение · сумма · статус. */
.pay-row {
  display: grid; grid-template-columns: auto 1fr auto auto;
  gap: 10px; align-items: baseline; font-size: 13px;
}
.pay-what { color: #c6c6d0; overflow-wrap: anywhere; }
.pay-sum { color: #e6e6ea; white-space: nowrap; }

@media (max-width: 760px) {
  .plans { grid-auto-flow: row; grid-auto-columns: auto; }
  .pay-row { grid-template-columns: auto 1fr; }
}

/* --- Подвал --- */
footer {
  margin-top: auto; padding: 20px 24px; color: #7c7c88; font-size: 13px;
  border-top: 1px solid #2c2c34; background: #1a1a20;
  display: flex; gap: 16px; flex-wrap: wrap;
}

/* Согласие при регистрации (оферта + обработка ПДн). */
.agree {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 12px; line-height: 1.45; color: #a8a8b3; margin: 4px 0 10px;
}
.agree input { margin: 2px 0 0; accent-color: #3a6b4f; flex: none; }
.agree a { color: #7c9c8a; }

/* --- Правовые страницы (/legal/offer/, /legal/privacy/) --- */
.legal { max-width: 820px; margin: 0 auto; padding: 32px 24px 48px; }
.legal h1 { font-size: 26px; line-height: 1.3; margin: 0 0 6px; }
.legal h2 { font-size: 18px; margin: 28px 0 10px; color: #cfe8d9; }
.legal p { margin: 0 0 10px; color: #cfcfd8; }
.legal .meta { color: #7c7c88; font-size: 13px; margin-bottom: 24px; }
.legal ul { margin: 0 0 12px; padding-left: 22px; color: #cfcfd8; }
.legal li { margin: 0 0 6px; }
.legal .req {
  line-height: 1.9; margin-top: 12px; padding: 14px 16px;
  border: 1px solid #2c2c34; border-radius: 8px; background: #1c1c22;
}

/* --- Диалоги (assets/dialog.js): свои вместо браузерных alert/confirm/prompt --- */
.dlg-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0, 0, 0, .55);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.dlg {
  width: 460px; max-width: 100%;
  background: #1c1c22; border: 1px solid #33333d; border-radius: 10px;
  padding: 18px; display: flex; flex-direction: column; gap: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .55);
}
.dlg-title { font-weight: 600; font-size: 16px; }
.dlg-msg { color: #c6c6d0; font-size: 14px; line-height: 1.55; white-space: pre-wrap; }
.dlg-input {
  background: #16161b; border: 1px solid #33333d; color: #e6e6ea;
  padding: 8px 10px; border-radius: 5px; font-size: 14px;
}
.dlg-input:focus { outline: none; border-color: #3a6b4f; }
.dlg-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.dlg-acts .btn:focus-visible { outline: 2px solid #8fd8ab; outline-offset: 1px; }
