/* Сайт-визитка — те же токены, что у панели (app.css) */
:root {
  --bg: #f6f7f9; --surface: #fff; --border: #e5e7eb; --text: #0f172a; --muted: #64748b;
  --primary: #1d4ed8; --primary-hover: #1e40af; --primary-soft: #e8efff;
  --radius: 12px; --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
  --text-2: #334155; --tint: #f3f6ff; --header: rgba(255, 255, 255, .9); --chrome: #fafbfc; --dot: #e2e8f0;
  --border-hover: #cbd5e1; --ok: #16a34a; --danger: #b42318; --danger-soft: #fdecec; --ring: rgba(29, 78, 216, .18);
  --link: #1d4ed8; --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1116; --surface: #12161c; --border: #252b35; --text: #e8eaef; --muted: #8f98a8;
  --primary: #3b6cf2; --primary-hover: #5280f6; --primary-soft: rgba(80, 125, 255, .16);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  --text-2: #c4c9d3; --tint: #131a2a; --header: rgba(18, 22, 28, .85); --chrome: #1a1f27; --dot: #333a46;
  --border-hover: #3a4250; --ok: #5fd38a; --danger: #f59191; --danger-soft: rgba(239, 68, 68, .15); --ring: rgba(110, 150, 255, .28);
  --link: #86a6ff;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0; background: var(--surface); color: var(--text);
  font: 16px/1.6 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.02em; margin: 0; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.center-text { text-align: center; }

/* кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font: 600 15px/1 inherit; font-family: inherit; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.btn-lg { height: 48px; padding: 0 24px; font-size: 16px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--border-hover); background: var(--bg); }

/* шапка */
.top { position: sticky; top: 0; z-index: 10; background: var(--header);
  backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--border); }
.top-row { display: flex; align-items: center; gap: 32px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px;
  color: var(--text); text-decoration: none; }
.logo-mark { width: 32px; height: 32px; border-radius: 9px; background: var(--primary); color: #fff;
  display: grid; place-items: center; font-size: 15px; }
.top-nav { display: flex; gap: 24px; }
.top-nav a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; }
.top-nav a:hover { color: var(--text); }
.top-cta { margin-left: auto; display: flex; gap: 10px; }

/* первый экран */
.hero { background: linear-gradient(180deg, var(--tint) 0%, var(--surface) 100%); padding: 72px 0 80px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 56px; align-items: center; }
.eyebrow { display: inline-block; background: var(--primary-soft); color: var(--link); font-weight: 600;
  font-size: 13px; padding: 5px 12px; border-radius: 999px; margin-bottom: 20px; }
.hero h1 { font-size: 52px; font-weight: 800; letter-spacing: -.03em; }
.lead { font-size: 19px; color: var(--text-2); margin: 20px 0 28px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 8px; color: var(--text-2); font-size: 15px; }
.hero-points li::before { content: "✓"; color: var(--ok); font-weight: 700; margin-right: 10px; }
.hero-shot { position: relative; }
.hero-shot .browser { transform: perspective(1600px) rotateY(-6deg) rotateX(2deg); transform-origin: left center; }

.browser { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 30px 60px -20px rgba(15, 23, 42, .25), var(--shadow); overflow: hidden; }
.browser-bar { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px;
  border-bottom: 1px solid var(--border); background: var(--chrome); }
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--dot); }
.browser-bar span { margin-left: 12px; font-size: 12px; color: var(--muted); background: var(--bg);
  border-radius: 6px; padding: 2px 12px; }
.browser img { width: 100%; height: auto; }

/* секции */
section { padding: 88px 0; }
.section-title { font-size: 38px; font-weight: 800; text-align: center; }
.section-sub { text-align: center; color: var(--muted); font-size: 18px; margin: 12px auto 0; max-width: 640px; }
.section-title.left, .section-sub.left { text-align: left; margin-left: 0; }

.pain { background: var(--bg); }
.pain-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 40px; }
.pain-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.pain-card b { font-size: 17px; }
.pain-card p { margin: 8px 0 0; color: var(--muted); font-size: 15px; }

.steps { list-style: none; padding: 0; margin: 48px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: s; }
.steps li { position: relative; padding: 28px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.step-num { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--primary);
  color: #fff; font-weight: 700; margin-bottom: 16px; }
.steps b { font-size: 19px; }
.steps p { color: var(--muted); margin: 8px 0 0; font-size: 15px; }

.features { background: var(--bg); }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 48px; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.f-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--primary-soft);
  font-size: 22px; margin-bottom: 14px; }
.feature b { font-size: 17px; }
.feature p { color: var(--muted); font-size: 15px; margin: 8px 0 0; }

.shots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; margin: 48px 0 24px; }
.shots figure { margin: 0; }
.shots .browser { box-shadow: var(--shadow); }
.shots figcaption { margin-top: 12px; color: var(--muted); font-size: 15px; text-align: center; }

.modules { background: var(--bg); padding: 72px 0; }
.modules-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.module { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; }
.module h3 { font-size: 24px; margin: 12px 0 10px; }
.module p { color: var(--text-2); margin: 0; }
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
  background: var(--primary-soft); color: var(--link); }

.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 48px 0 20px; align-items: stretch; }
.price-card { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; background: var(--surface); }
.price-main { border: 2px solid var(--primary); box-shadow: var(--shadow); }
.price-card h3 { font-size: 22px; }
.price-card > .muted { margin: 6px 0 0; font-size: 15px; }
.price { font-size: 30px; font-weight: 800; margin: 20px 0; letter-spacing: -.02em; }
.price-card ul { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; font-size: 15px; flex: 1; }
.price-card li { padding-left: 26px; position: relative; }
.price-card li::before { content: "✓"; position: absolute; left: 0; color: var(--link); font-weight: 700; }

.faq-wrap { max-width: 800px; }
.faq details { border-bottom: 1px solid var(--border); padding: 18px 0; }
.faq details:first-of-type { margin-top: 32px; border-top: 1px solid var(--border); }
.faq summary { cursor: pointer; font-weight: 600; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--text-2); margin: 12px 0 0; }

.lead-section { background: linear-gradient(180deg, var(--surface) 0%, var(--tint) 100%); }
.lead-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.contacts { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 8px; font-size: 16px; }
.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px;
  box-shadow: var(--shadow); display: grid; gap: 16px; }
.form-card label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.form-card input:not([type=checkbox]), .form-card textarea {
  font: inherit; font-size: 15px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); width: 100%; }
.form-card input:focus, .form-card textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring); }
.form-card label.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; color: var(--muted); }
.form-card label.check input { margin-top: 4px; width: 16px; height: 16px; flex: none; }
.form-card .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-card.done h3 { font-size: 22px; }
.form-card.done p { margin: 0; color: var(--muted); }
.form-error { background: var(--danger-soft); color: var(--danger); border-radius: var(--radius-sm); padding: 10px 14px; margin: 0; font-size: 15px; }

.foot { border-top: 1px solid var(--border); padding: 28px 0; font-size: 14px; color: var(--muted); }
.foot-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot nav { display: flex; gap: 24px; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--text); }

.doc { max-width: 760px; padding-top: 48px; padding-bottom: 72px; }
.doc h1 { font-size: 34px; margin-bottom: 8px; }
.doc h2 { font-size: 20px; margin: 32px 0 8px; }
.doc p { color: var(--text-2); }

@media (max-width: 1000px) {
  .hero-grid, .lead-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-shot .browser { transform: none; }
  .pain-grid, .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .price-grid { grid-template-columns: 1fr; max-width: 520px; margin-left: auto; margin-right: auto; }
  .top-nav { display: none; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 18px; }
  section { padding: 60px 0; }
  .hero { padding: 40px 0 56px; }
  .hero h1 { font-size: 36px; }
  .lead { font-size: 17px; }
  .section-title { font-size: 28px; }
  .pain-grid, .feature-grid, .steps, .shots, .modules-grid { grid-template-columns: 1fr; }
  .top-cta .btn-ghost { display: none; }
  .top-cta .btn { height: 36px; padding: 0 14px; font-size: 14px; }
  .hero-cta .btn { flex: 1; }
}

/* переключатель темы */
.theme-toggle { width: 40px; height: 40px; padding: 0; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  color: var(--muted); display: inline-grid; place-items: center; cursor: pointer; }
.theme-toggle:hover { color: var(--text); border-color: var(--border-hover); }
.theme-toggle .i-sun, :root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .browser img { filter: brightness(.92); }

/* движение */
.btn, .theme-toggle, .feature, .pain-card, .module, .price-card, .steps li, .top-nav a, .foot a, .form-card input, .form-card textarea {
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease),
              box-shadow .25s var(--ease), transform .25s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active, .theme-toggle:active { transform: scale(.97); }
.btn-primary:hover { box-shadow: 0 8px 20px -6px rgba(29, 78, 216, .55); }
.feature:hover, .pain-card:hover, .module:hover, .price-card:hover, .steps li:hover {
  transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--border-hover); }
.price-main:hover { border-color: var(--primary); }
.feature .f-ico { transition: transform .3s var(--ease); }
.feature:hover .f-ico { transform: scale(1.1) rotate(-4deg); }
.shots .browser { transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.shots figure:hover .browser { transform: translateY(-4px); box-shadow: 0 24px 48px -16px rgba(15, 23, 42, .3); }
.hero-shot .browser { transition: transform .6s var(--ease); }
.hero-shot:hover .browser { transform: perspective(1600px) rotateY(-2deg) rotateX(1deg); }
.top { transition: box-shadow .25s var(--ease); }
.top.scrolled { box-shadow: 0 6px 20px -12px rgba(15, 23, 42, .35); }

.hero-text > * { animation: rise .7s var(--ease) both; }
.hero-text > :nth-child(2) { animation-delay: .06s; } .hero-text > :nth-child(3) { animation-delay: .12s; }
.hero-text > :nth-child(4) { animation-delay: .18s; } .hero-text > :nth-child(5) { animation-delay: .24s; }
.hero-shot { animation: rise-shot .9s var(--ease) .15s both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes rise-shot { from { opacity: 0; transform: translateY(28px) scale(.98); } }

/* появление при прокрутке (класс ставит скрипт — без JS всё видно сразу) */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: calc(var(--d, 0) * 70ms); }
.js .reveal.in { opacity: 1; transform: none; }
.form-card.done { animation: rise .5s var(--ease) both; }

details::details-content { height: 0; overflow: clip; transition: height .3s var(--ease), content-visibility .3s allow-discrete; }
details[open]::details-content { height: auto; }
:root { interpolate-size: allow-keywords; }
.faq summary::after { transition: transform .25s var(--ease); }
.faq details[open] summary::after { content: "+"; transform: rotate(45deg); }

:root.theme-fade, :root.theme-fade * { transition: background-color .3s ease, color .3s ease, border-color .3s ease !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
