/* b1c.kz — тёмная тема. ВСЕ цвета — только через токены :root.
   Значения ниже — дефолт «Изумруд на графите»; боевые значения приходят
   инлайн-<style> из site_content key='theme' и перекрывают эти. */
:root {
  --bg: #101614;
  --card: #161F1B;
  --card2: #131D18;
  --border: rgba(255,255,255,0.07);
  --heading: #EDF3EF;
  --text: #C9D4CE;
  --muted: #8FA39A;
  --accent: #23C584;
  --on-accent: #06281A;
  --accent-soft: rgba(35,197,132,0.13);
  --on-soft: #5FE3AC;
  --success: #3FD79A;
  --featured: #23C584;
  --footer-bg: #0C1210;
  --error: #E36A6A;
  --radius: 14px;
  /* тень всегда чёрная, темой не управляется (решение владельца) */
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 28px rgba(0,0,0,.35);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 780px; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }

h1, h2, h3 { color: var(--heading); }
h1 { font-size: clamp(1.9rem, 5.5vw, 3.2rem); line-height: 1.15; letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); letter-spacing: -.01em; margin-bottom: .5em; text-align: center; }
h3 { font-size: 1.1rem; margin-bottom: .35em; }
.section-sub { text-align: center; color: var(--muted); max-width: 620px; margin: -0.25em auto 0; }

/* ---------- появление при скролле (класс вешает JS; без JS всё видно) ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 18px; height: 60px; }
.logo { font-weight: 800; font-size: 1.25rem; text-decoration: none; color: var(--heading); letter-spacing: -.02em; }
.top-nav { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.top-nav::-webkit-scrollbar { display: none; }
.top-nav a {
  color: var(--muted); text-decoration: none; font-size: .92rem;
  padding: 6px 10px; border-radius: 8px; white-space: nowrap;
}
.top-nav a:hover { color: var(--heading); background: var(--accent-soft); }
.btn-login { position: relative; flex-shrink: 0; }
.btn-login[disabled] { opacity: .55; cursor: not-allowed; }
.btn-login[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--card); color: var(--heading); font-size: .78rem;
  border: 1px solid var(--border);
  padding: 4px 10px; border-radius: 6px; white-space: nowrap;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: .95rem;
  padding: 10px 20px; border-radius: 10px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; transition: filter .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 14px 26px; font-size: 1.05rem; border-radius: 12px; }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 22px -10px var(--accent); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary { background: var(--accent-soft); color: var(--on-soft); }
.btn-secondary:hover { filter: brightness(1.15); }
.btn-ghost { background: transparent; color: var(--muted); border-color: var(--border); }
.btn-block { width: 100%; margin-top: auto; }

/* ---------- hero ---------- */
.hero { padding: 64px 0 72px; position: relative; overflow: hidden; }
.hero-blobs { position: absolute; inset: 0; pointer-events: none; }
.hero-blobs i {
  position: absolute; width: 420px; height: 420px; border-radius: 50%;
  background: var(--accent); opacity: .09; filter: blur(85px);
  animation: blob-drift 26s ease-in-out infinite alternate;
}
.hero-blobs i:nth-child(1) { top: -170px; left: -130px; }
.hero-blobs i:nth-child(2) { bottom: -190px; right: -150px; animation-duration: 33s; animation-delay: -9s; }
.hero-blobs i:nth-child(3) { top: 32%; left: 56%; width: 300px; height: 300px; opacity: .06; animation-duration: 40s; animation-delay: -17s; }
@keyframes blob-drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(64px, 44px) scale(1.16); }
}
html.page-hidden .hero-blobs i { animation-play-state: paused; }

.hero-inner { max-width: 760px; text-align: center; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 22px; position: relative; }
.badge {
  display: inline-block; background: var(--accent-soft); color: var(--on-soft);
  font-size: .85rem; font-weight: 600; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--border);
}
.hero-sub { font-size: 1.15rem; color: var(--muted); max-width: 640px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ---------- hero: документ собирается сам ---------- */
.doc-demo { width: 100%; max-width: 470px; margin-top: 8px; text-align: left; }
.doc-cmd {
  display: flex; gap: 10px; align-items: center;
  background: var(--card); border: 1px solid var(--border); border-radius: 999px;
  padding: 9px 16px; font-size: .92rem; color: var(--text); box-shadow: var(--shadow);
}
.doc-cmd .mic {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent-soft); color: var(--on-soft);
  display: inline-flex; align-items: center; justify-content: center;
}
.doc-card {
  margin-top: 14px; background: var(--card2); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.doc-head { padding: 13px 18px 9px; border-bottom: 1px solid var(--border); }
.doc-head strong { display: block; color: var(--heading); font-size: .96rem; }
.doc-head .doc-sub { font-size: .76rem; color: var(--muted); }
.doc-row { display: flex; align-items: baseline; gap: 10px; padding: 8px 18px; border-bottom: 1px dashed var(--border); font-size: .88rem; }
.doc-label { color: var(--muted); flex: 0 0 96px; font-size: .8rem; }
.doc-val { color: var(--text); flex: 1; }
.doc-check { color: var(--success); font-weight: 700; }
.doc-foot { padding: 4px 18px 14px; text-align: right; border-top: 1px solid var(--border); }
.doc-stamp {
  display: inline-block; margin-top: 8px;
  border: 2px solid var(--success); color: var(--success); border-radius: 8px;
  padding: 2px 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  font-size: .82rem; transform: rotate(-8deg);
  box-shadow: 0 0 18px -4px var(--accent);
}

/* анимация цикла (включается классом js-anim; без JS — статичный финал) */
.js-anim [data-step] { opacity: 0; transform: translateY(6px); transition: opacity .35s ease, transform .35s ease; }
.js-anim [data-step].on { opacity: 1; transform: none; }
.js-anim .doc-cmd.on .mic { animation: mic-pulse 1.05s ease-out 2; }
@keyframes mic-pulse {
  0%   { box-shadow: 0 0 0 0 var(--accent-soft); }
  70%  { box-shadow: 0 0 0 12px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.js-anim .doc-stamp { transition: none; transform: scale(2.4) rotate(4deg); }
.js-anim .doc-stamp.on { animation: stamp-in .38s cubic-bezier(.2, 1.35, .45, 1) forwards; }
@keyframes stamp-in {
  from { opacity: 0; transform: scale(2.4) rotate(4deg); }
  to   { opacity: 1; transform: scale(1) rotate(-8deg); }
}

/* ---------- hero: чипы-факты ---------- */
.hero-stats { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.chip {
  background: var(--accent-soft); color: var(--on-soft); border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 14px; font-size: .85rem; font-weight: 600;
}

/* ---------- sections / cards ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--card2); }
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow);
  transition: opacity .55s ease, transform .4s ease, box-shadow .2s ease;
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .steps-grid .card:hover, .features-grid .card:hover, .tariff:hover, .review:hover { transform: translateY(-4px); }
}

.steps-grid, .features-grid { display: grid; gap: 18px; margin-top: 36px; }
.steps-grid { grid-template-columns: repeat(3, 1fr); }
.features-grid { grid-template-columns: repeat(3, 1fr); }
.step { position: relative; }
.step-num {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 1.05rem;
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.step p, .feature p { color: var(--muted); font-size: .95rem; }
.feature-icon { font-size: 1.9rem; margin-bottom: 10px; }

/* ---------- gallery / video ---------- */
.gallery-strip {
  display: flex; gap: 16px; margin-top: 32px;
  overflow-x: auto; padding-bottom: 10px; -webkit-overflow-scrolling: touch;
}
.shot { flex: 0 0 auto; }
.shot img {
  height: 420px; max-height: 60vh; width: auto; max-width: 82vw;
  border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.video-wrap { max-width: 820px; margin: 32px auto 0; }
.video-wrap video { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); background: var(--footer-bg); }

/* ---------- tariffs ---------- */
.tariffs-grid { display: grid; gap: 20px; margin-top: 36px; justify-content: center; }
.tariffs-1 { grid-template-columns: minmax(0, 400px); }
.tariffs-2 { grid-template-columns: repeat(2, minmax(0, 360px)); }
.tariffs-3 { grid-template-columns: repeat(3, 1fr); }
.tariff { display: flex; flex-direction: column; position: relative; }
.tariff.featured {
  border-color: var(--featured);
  box-shadow: 0 0 0 1px var(--featured), 0 10px 34px -12px var(--accent);
}
.tariff-flag {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: var(--on-accent); font-size: .78rem; font-weight: 600;
  padding: 3px 12px; border-radius: 999px;
}
.price { font-size: 2.1rem; font-weight: 800; letter-spacing: -.02em; margin: 6px 0 14px; color: var(--heading); }
.price-per { font-size: .95rem; font-weight: 500; color: var(--muted); }
.tariff-list { list-style: none; margin-bottom: 22px; }
.tariff-list li { padding: 7px 0 7px 28px; position: relative; color: var(--muted); border-bottom: 1px dashed var(--border); }
.tariff-list li:last-child { border-bottom: none; }
.tariff-list li::before { content: "✓"; position: absolute; left: 4px; color: var(--accent); font-weight: 700; }

/* ---------- reviews ---------- */
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; margin-top: 36px; }
.review-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 4px; }
.review-head strong { color: var(--heading); }
.review-company { color: var(--muted); font-size: .88rem; }
.review p { color: var(--muted); font-size: .95rem; margin-top: 6px; }
.stars { color: var(--accent); letter-spacing: 2px; }
.stars-off { color: var(--border); }
.reviews-empty { text-align: center; color: var(--muted); font-size: 1.1rem; margin: 28px 0 8px; }

.review-form { max-width: 560px; margin: 36px auto 0; display: flex; flex-direction: column; gap: 14px; }
.review-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .92rem; color: var(--heading); }
.review-form input, .review-form textarea {
  font: inherit; font-weight: 400; padding: 10px 12px; color: var(--text);
  border: 1px solid var(--border); border-radius: 10px; background: var(--bg);
}
.review-form input::placeholder, .review-form textarea::placeholder { color: var(--muted); }
.review-form input:focus, .review-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.star-input { display: flex; gap: 4px; }
.star-input button {
  font-size: 1.7rem; line-height: 1; background: none; border: none;
  color: var(--border); cursor: pointer; padding: 2px;
}
.star-input button.on { color: var(--accent); }
.hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-msg { min-height: 1.2em; font-size: .92rem; }
.form-msg.ok { color: var(--success); }
.form-msg.err { color: var(--error); }

/* ---------- faq ---------- */
.faq-item { padding: 0; margin-top: 12px; overflow: hidden; }
.faq-item summary {
  padding: 16px 20px; font-weight: 600; cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  color: var(--heading);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.4rem; color: var(--accent); font-weight: 400; flex-shrink: 0; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { padding: 0 20px 16px; color: var(--muted); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--footer-bg); padding: 44px 0 24px; margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.site-footer a { color: var(--accent); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer h3 { margin-bottom: 8px; }
.copyright { margin-top: 28px; font-size: .85rem; }

/* ---------- reduced motion: сразу финальное состояние, без движения ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-blobs i { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .js-anim [data-step] { opacity: 1; transform: none; transition: none; }
  .js-anim .doc-stamp { opacity: 1; transform: scale(1) rotate(-8deg); animation: none; }
  .js-anim .doc-cmd .mic { animation: none; }
}

/* ---------- mobile ---------- */
@media (max-width: 860px) {
  .steps-grid, .features-grid { grid-template-columns: 1fr 1fr; }
  .tariffs-3 { grid-template-columns: 1fr; }
  .tariffs-2 { grid-template-columns: minmax(0, 400px); }
}
@media (max-width: 600px) {
  .section { padding: 52px 0; }
  .hero { padding: 44px 0 56px; }
  .steps-grid, .features-grid, .form-row { grid-template-columns: 1fr; }
  .top-nav { display: none; }
  .header-inner { justify-content: space-between; }
  .hero-cta .btn { width: 100%; }
  .shot img { height: 340px; }
  .doc-label { flex-basis: 84px; }
}
