/* ============ MULTICHAIN.KZ ============
   Палитра: степная ночь + золото рога
   --night   #0F1E30  глубокий петроль-нави
   --night-2 #16293E  панели на тёмном
   --sky     #E9EFF4  светлые секции (небо КЗ)
   --gold    #E9A13B  акцент
   --gold-2  #C9821D  ховер/глубина
   --ink     #14243A  текст на светлом
========================================= */
:root {
  --night: #0f1e30;
  --night-2: #16293e;
  --night-3: #1e3450;
  --sky: #e9eff4;
  --paper: #ffffff;
  --gold: #e9a13b;
  --gold-2: #c9821d;
  --ink: #14243a;
  --ink-soft: #4a5a70;
  --white-soft: #c9d6e2;
  --ok: #3da35d;
  --err: #d84c3e;
  --radius: 14px;
  --display: 'Unbounded', system-ui, sans-serif;
  --body: 'Onest', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--night);
  line-height: 1.6;
  font-size: 17px;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3, .logo, .pc-name, .line-name {
  font-family: var(--display);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 5.2vw, 3.6rem); font-weight: 900; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.3rem); font-weight: 700; margin-bottom: 1rem; }
h3 { font-size: 1.15rem; font-weight: 700; }

.eyebrow {
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.9rem;
}
.lead { font-size: 1.08rem; max-width: 62ch; }
.muted { opacity: 0.65; font-size: 0.92rem; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 820px; }
.section { padding: 88px 0; }
.section.light { background: var(--sky); color: var(--ink); }
.section.dark { background: var(--night); color: var(--sky); }
.section.dark h2 { color: #fff; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.85rem;
  padding: 13px 26px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, background 0.2s, color 0.2s, border-color 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn.gold { background: var(--gold); color: var(--night); }
.btn.gold:hover { background: var(--gold-2); }
.btn.ghost { border-color: currentColor; background: transparent; color: inherit; }
.btn.ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn.big { padding: 17px 34px; font-size: 0.95rem; }
.btn.small { padding: 9px 18px; font-size: 0.72rem; }
.btn:disabled { opacity: 0.6; cursor: wait; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- Шапка ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 24px;
  background: rgba(15, 30, 48, 0.92);
  backdrop-filter: blur(10px);
  color: var(--sky);
  border-bottom: 1px solid rgba(233, 161, 59, 0.18);
}
.logo { font-weight: 900; font-size: 1.05rem; text-decoration: none; letter-spacing: 0.02em; }
.logo span { color: var(--gold); }
.nav { display: flex; gap: 22px; }
.nav a { text-decoration: none; font-size: 0.92rem; opacity: 0.85; }
.nav a:hover { color: var(--gold); opacity: 1; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.lang-switch { display: flex; border: 1px solid rgba(233, 161, 59, 0.4); border-radius: 999px; overflow: hidden; }
.lang-switch button {
  background: none; border: 0; color: var(--sky);
  font-family: var(--display); font-size: 0.68rem; font-weight: 500;
  padding: 7px 13px; cursor: pointer;
}
.lang-switch button.active { background: var(--gold); color: var(--night); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr);
  align-items: center;
  gap: 32px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 110px 24px 120px;
  color: var(--sky);
}
.hero h1 { color: #fff; margin: 0.4rem 0 1.1rem; }
.hero-sub { font-size: 1.12rem; max-width: 54ch; color: var(--white-soft); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 2rem; }

.hero-mark { display: grid; place-items: center; }
.pulse-12 {
  width: clamp(180px, 22vw, 260px);
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid; place-items: center; text-align: center;
  border: 2px solid rgba(233, 161, 59, 0.5);
  position: relative;
  animation: breathe 4s ease-in-out infinite;
}
.pulse-12::before, .pulse-12::after {
  content: ''; position: absolute; inset: -18px;
  border-radius: 50%; border: 1px solid rgba(233, 161, 59, 0.22);
}
.pulse-12::after { inset: -38px; border-color: rgba(233, 161, 59, 0.1); }
.pulse-12 span { font-family: var(--display); font-weight: 900; font-size: clamp(3.2rem, 6vw, 5rem); color: var(--gold); display: block; line-height: 1; }
.pulse-12 small { font-family: var(--display); letter-spacing: 0.4em; font-size: 0.8rem; color: var(--white-soft); }
@keyframes breathe { 50% { transform: scale(1.035); } }

/* ---------- RSP ---------- */
.rsp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 2.4rem 0; }
.stat {
  background: var(--night-2);
  border: 1px solid rgba(233, 161, 59, 0.18);
  border-radius: var(--radius);
  padding: 22px 20px;
}
.stat b { font-family: var(--display); font-size: 2rem; color: var(--gold); display: block; }
.stat span { font-size: 0.88rem; color: var(--white-soft); }

.strike-rail { margin: 2.6rem 0 2.2rem; }
.rail-track {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px;
  padding: 18px; border-radius: var(--radius);
  background: var(--night-2);
  border: 1px solid rgba(233, 161, 59, 0.18);
}
.rail-block {
  display: flex; flex-wrap: wrap; gap: 5px; align-content: flex-start;
  padding: 12px 10px 34px; position: relative;
  border-radius: 10px; background: var(--night-3);
  animation: strike 0.6s calc(var(--i) * 0.12s) both;
}
.rail-block i {
  width: 16px; height: 26px; border-radius: 3px;
  background: linear-gradient(180deg, var(--gold), var(--gold-2));
}
.rail-block em {
  position: absolute; left: 10px; right: 6px; bottom: 8px;
  font-style: normal; font-size: 0.66rem; color: var(--white-soft); line-height: 1.25;
}
@keyframes strike { from { opacity: 0; transform: translateX(-14px); } }
.rail-total {
  margin-top: 10px; text-align: right;
  font-family: var(--display); font-size: 0.72rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--gold);
}
.rsp-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.rsp-card {
  background: var(--night-2); border-radius: var(--radius);
  border: 1px solid rgba(233, 161, 59, 0.18); padding: 26px;
}
.rsp-card h3 { color: var(--gold); margin-bottom: 0.6rem; }
.rsp-card p { color: var(--white-soft); font-size: 0.98rem; }
.section.dark b { color: #fff; }

/* ---------- Тарифы ---------- */
.line-head { margin: 3rem 0 1.2rem; max-width: 64ch; }
.line-head:first-of-type { margin-top: 2rem; }
.line-name { font-size: 1.5rem; display: flex; align-items: center; gap: 12px; }
.line-name .sla {
  font-size: 0.62rem; letter-spacing: 0.16em; padding: 5px 12px;
  border-radius: 999px; background: var(--night); color: var(--gold);
}
.line-name.alt .sla { background: var(--gold); color: var(--night); }
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.price-card {
  background: var(--paper); border-radius: var(--radius);
  padding: 26px 24px; border: 1px solid #d5dee6;
  display: flex; flex-direction: column; gap: 6px;
  transition: transform 0.18s, box-shadow 0.18s;
}
.price-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(15, 30, 48, 0.12); }
.pc-name { font-weight: 700; font-size: 1rem; }
.pc-vol { color: var(--ink-soft); font-size: 0.9rem; }
.pc-price { font-family: var(--display); font-weight: 700; font-size: 1.6rem; margin-top: 8px; }
.pc-promo { font-size: 0.9rem; color: var(--gold-2); font-weight: 600; min-height: 42px; }
.pc-promo span { display: block; font-weight: 400; font-size: 0.78rem; color: var(--ink-soft); }
.pc-promo.none { color: var(--ink-soft); font-weight: 400; }
.pc-actions { display: flex; gap: 10px; margin-top: auto; padding-top: 14px; }
.price-card.alt { border-top: 4px solid var(--gold); }

/* ---------- Портфолио ---------- */
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-top: 1.6rem; }
.pf {
  display: flex; flex-direction: column; gap: 4px;
  padding: 22px 20px; border-radius: var(--radius);
  background: var(--night-2); border: 1px solid rgba(233, 161, 59, 0.18);
  text-decoration: none; transition: border-color 0.2s, transform 0.15s;
}
.pf:hover { border-color: var(--gold); transform: translateY(-3px); }
.pf b { font-family: var(--display); font-size: 0.88rem; font-weight: 500; color: #fff; word-break: break-all; }
.pf span { font-size: 0.78rem; color: var(--gold); letter-spacing: 0.08em; text-transform: uppercase; }

/* ---------- Квиз ---------- */
.quiz-card {
  background: var(--paper); border-radius: 20px;
  padding: 30px clamp(20px, 4vw, 40px) 34px;
  border: 1px solid #d5dee6; margin-top: 1.4rem;
  box-shadow: 0 18px 44px rgba(15, 30, 48, 0.1);
}
.quiz-progress { display: flex; align-items: center; gap: 16px; font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 1.6rem; }
.quiz-progress .bar { flex: 1; height: 6px; border-radius: 99px; background: #dfe7ee; overflow: hidden; }
.quiz-progress .bar i { display: block; height: 100%; width: 20%; background: var(--gold); transition: width 0.3s; }

.q-step { border: 0; }
.q-step legend { font-family: var(--display); font-weight: 700; font-size: 1.2rem; margin-bottom: 0.9rem; }
.q-q { font-weight: 600; margin: 0.8rem 0 0.6rem; }

.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice-grid.three { grid-template-columns: repeat(3, 1fr); }
.choice {
  position: relative; display: flex; flex-direction: column; gap: 4px;
  border: 2px solid #d5dee6; border-radius: var(--radius);
  padding: 18px; cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.choice input { position: absolute; opacity: 0; }
.choice b { font-family: var(--display); font-size: 1rem; }
.choice span { font-size: 0.85rem; color: var(--ink-soft); }
.choice:has(input:checked) { border-color: var(--gold); background: #fdf6ea; }
.choice.compact { align-items: center; padding: 14px; }
.choice.compact b { font-size: 1.4rem; }

.field { display: block; margin: 1rem 0; }
.field > span { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; font: inherit; padding: 12px 14px;
  border: 2px solid #d5dee6; border-radius: 10px; background: #fff;
  transition: border-color 0.15s;
}
.field input:focus, .field textarea:focus { border-color: var(--gold); outline: none; }
.field textarea { resize: vertical; }
.field small { display: block; margin-top: 5px; font-size: 0.8rem; color: var(--ink-soft); }
.counter.ok b { color: var(--ok); }
#promo-field.disabled { opacity: 0.45; pointer-events: none; }
.promo-msg.ok { color: var(--ok); }
.promo-msg.bad { color: var(--err); }

.q-total {
  display: flex; align-items: baseline; gap: 12px;
  margin-top: 1.2rem; padding: 16px 20px;
  background: var(--sky); border-radius: var(--radius); font-size: 1rem;
}
.q-total b { font-family: var(--display); font-size: 1.5rem; }
.q-total s { color: var(--ink-soft); }

.focus-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  border: 2px solid #d5dee6; border-radius: 999px;
  padding: 9px 18px; cursor: pointer; font-size: 0.9rem; user-select: none;
}
.chip input { accent-color: var(--gold-2); }
.chip:has(input:checked) { border-color: var(--gold); background: #fdf6ea; }
.chip.standalone { margin-top: 10px; }

/* Кассеты */
.cassette {
  border: 2px solid #d5dee6; border-radius: var(--radius);
  padding: 16px; margin-bottom: 16px; background: #fbfcfd;
}
.cassette-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; margin-bottom: 12px; }
.cassette-head b { display: block; font-family: var(--display); font-size: 0.85rem; font-weight: 700; }
.cassette-head small { color: var(--ink-soft); font-size: 0.8rem; }
.reel {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid var(--night); position: relative;
}
.reel::after {
  content: ''; position: absolute; inset: 6px;
  border-radius: 50%;
  background: repeating-conic-gradient(var(--gold) 0 30deg, transparent 30deg 60deg);
  animation: spin 6s linear infinite paused;
}
.cassette:hover .reel::after { animation-play-state: running; }
@keyframes spin { to { transform: rotate(360deg); } }
.dropzone {
  display: block; text-align: center; padding: 20px;
  border: 2px dashed #c3cfda; border-radius: 10px;
  color: var(--ink-soft); font-size: 0.9rem; cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover, .dropzone.over { border-color: var(--gold); background: #fdf6ea; }

.filelist { list-style: none; margin-top: 12px; }
.filelist li {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; border-radius: 8px; background: #eef3f7;
  margin-bottom: 6px; font-size: 0.86rem;
}
.filelist .fname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filelist .fsize { color: var(--ink-soft); }
.filelist .rm { border: 0; background: none; cursor: pointer; color: var(--err); font-size: 0.9rem; }

.q-summary {
  background: var(--sky); border-radius: 10px;
  padding: 14px 18px; margin-bottom: 0.6rem; font-size: 0.95rem;
}
.q-error {
  color: #fff; background: var(--err);
  border-radius: 10px; padding: 12px 16px; margin-top: 1rem; font-size: 0.92rem;
}
.q-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 1.6rem; }
.q-nav .btn:only-child, #q-next:first-child { margin-left: auto; }

/* ---------- Демо-модал ---------- */
.demo-modal {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10, 20, 33, 0.92);
  display: grid; place-items: center; padding: 20px;
}
.demo-inner {
  width: min(560px, 100%); background: var(--night-2);
  border: 1px solid rgba(233, 161, 59, 0.3);
  border-radius: 20px; padding: 30px; color: var(--sky);
  text-align: center; position: relative;
  animation: pop 0.25s ease-out;
}
@keyframes pop { from { transform: scale(0.94); opacity: 0; } }
.demo-inner h3 { color: #fff; margin-bottom: 1rem; }
.demo-close {
  position: absolute; top: 14px; right: 16px;
  border: 0; background: none; color: var(--sky);
  font-size: 1.2rem; cursor: pointer;
}
.demo-video-wrap {
  border-radius: 12px; overflow: hidden; background: #000;
  aspect-ratio: 9 / 16; max-height: 46vh; margin: 0 auto 1rem;
  display: grid; place-items: center;
}
.demo-video-wrap video { width: 100%; height: 100%; object-fit: cover; }
.demo-inner .btn { margin-top: 1rem; }

/* ---------- Футер ---------- */
.footer { background: var(--night); color: var(--white-soft); padding: 56px 0; border-top: 1px solid rgba(233, 161, 59, 0.18); }
.footer .logo { color: #fff; }
.footer p { max-width: 56ch; margin-top: 0.8rem; font-size: 0.92rem; }

/* ---------- Сервисные страницы (оплата, депозитарий) ---------- */
.service-page {
  min-height: 100vh; display: grid; place-items: center;
  background: var(--night); padding: 24px; color: var(--ink);
}
.service-card {
  width: min(520px, 100%); background: var(--paper);
  border-radius: 20px; padding: 40px; text-align: center;
}
.service-card.wide { width: min(680px, 100%); text-align: left; }
.service-card h1 { font-size: 1.5rem; margin: 0.8rem 0; }
.service-card .btn { margin-top: 1.4rem; background: var(--gold); color: var(--night); }
.badge {
  width: 58px; height: 58px; margin: 0 auto; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 1.6rem; font-weight: 700; color: #fff;
}
.badge.ok { background: var(--ok); }
.badge.err { background: var(--err); }
.countdown { display: flex; gap: 14px; margin: 1.4rem 0; }
.countdown div {
  flex: 1; text-align: center; background: var(--sky);
  border-radius: 12px; padding: 14px 6px;
}
.countdown b { font-family: var(--display); font-size: 1.5rem; display: block; }
.countdown span { font-size: 0.75rem; color: var(--ink-soft); }
.service-card .filelist li { background: var(--sky); }

/* ---------- Адаптив ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 70px; padding-bottom: 80px; }
  .hero-mark { order: -1; }
  .rsp-cols, .price-grid { grid-template-columns: 1fr; }
  .rsp-stats { grid-template-columns: 1fr; gap: 12px; }
  .rail-track { grid-template-columns: 1fr; }
  .rail-block { padding-bottom: 12px; }
  .rail-block em { position: static; margin-left: auto; }
  .nav { display: none; }
}
@media (max-width: 560px) {
  .choice-grid { grid-template-columns: 1fr; }
  .choice-grid.three { grid-template-columns: repeat(3, 1fr); }
  .q-nav { flex-direction: column-reverse; }
  .q-nav .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
