/* Стартовая страница OwnCommerce. Цвета — тема «fresh» магазина (public_html/assets/theme.css: --bg, --panel,
   --green, --blue), светлая — по мотивам темы «light». Шрифты только системные: ни одного запроса к чужим
   серверам (обещано в privacy.html). Атрибутов style в разметке нет — CSP запрещает встроенные стили. */

:root, [data-theme="dark"] {
  --bg: #071116;
  --bg2: #0a1519;
  --panel: #0d1a20;
  --panel2: #10232a;
  --line: #1b333a;
  --text: #f4f7f6;
  --muted: #9eb0b4;
  --accent: #5ee329;          /* текст-акцент: на тёмном фоне контраст > 10:1 */
  --green: #5ee329;
  --green2: #2fc91c;
  --blue: #168cff;
  --on-green: #04220f;        /* текст на зелёной кнопке */
  --focus: #8ff06a;
  --shadow: 0 18px 50px rgba(0, 0, 0, .35);
  --ok: #5ee329;
  --err: #ff8a7a;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f6f9f8;
  --bg2: #edf3f1;
  --panel: #ffffff;
  --panel2: #f1f6f4;
  --line: #d3e0dc;
  --text: #0b1a20;
  --muted: #45585e;
  --accent: #1f7a1f;          /* тёмно-зелёный: на светлом фоне контраст ≥ 5:1 */
  --green: #5ee329;
  --green2: #2fc91c;
  --blue: #0b6fd1;
  --on-green: #04220f;
  --focus: #0b6fd1;
  --shadow: 0 14px 40px rgba(11, 26, 32, .10);
  --ok: #1f7a1f;
  --err: #b42318;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  overflow-wrap: break-word;
}
/* Пока грузится словарь другого языка — не мигаем английским текстом (site.js снимает класс, максимум через 1,5 с) */
html.i18n-wait body { opacity: 0; }
body { transition: opacity .15s; }

img { max-width: 100%; height: auto; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 5.4vw, 3.7rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); letter-spacing: -.01em; }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(820px, 100% - 32px); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--green); color: var(--on-green); padding: 8px 14px; border-radius: 8px; font-weight: 700; }
.skip:focus { top: 12px; }
.small { font-size: .92rem; color: var(--muted); }

/* ------------------------------------------------------------------ шапка */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); flex: 0 0 auto; }
.brand img { width: 58px; height: auto; }
.brand-name { font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em; }
.brand-name b { color: var(--accent); }
.navlinks { display: flex; gap: 18px; margin-left: auto; }
.navlinks a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem; }
.navlinks a:hover { color: var(--text); }
.navright { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.navlinks + .navright { margin-left: 8px; }
.lang, .theme-toggle, .menu {
  height: 40px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel); color: var(--text); font: inherit; font-size: .9rem;
}
.lang { padding: 0 8px; max-width: 130px; }
.theme-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; cursor: pointer; }
.theme-icon { width: 14px; height: 14px; border-radius: 50%; background: linear-gradient(90deg, var(--text) 50%, transparent 50%); border: 2px solid var(--text); }
.menu { display: none; width: 44px; cursor: pointer; align-items: center; justify-content: center; }
.menu-bars, .menu-bars::before, .menu-bars::after { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; position: relative; }
.menu-bars::before, .menu-bars::after { content: ""; position: absolute; left: 0; }
.menu-bars::before { top: -6px; }
.menu-bars::after { top: 6px; }

/* ----------------------------------------------------------------- кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 20px; border-radius: 12px;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; text-align: center;
}
.btn.primary { background: linear-gradient(135deg, var(--green), var(--green2)); color: var(--on-green); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.secondary { background: var(--panel); color: var(--text); border-color: var(--line); }
.btn.secondary:hover { border-color: var(--accent); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .6; cursor: not-allowed; filter: none; }
.nav-cta { min-height: 40px; padding: 6px 14px; font-size: .92rem; }

/* ------------------------------------------------------------------- герой */
.hero { padding: 64px 0 48px; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: .9rem; font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 25%, transparent); flex: 0 0 auto; }
.hero h1 { margin-top: 18px; }
.hero h1 span { display: block; }
.gradient { background: linear-gradient(90deg, var(--green), var(--blue)); -webkit-background-clip: text; background-clip: text; color: transparent; }
[data-theme="light"] .gradient { background-image: linear-gradient(90deg, #1f8a1f, #0b6fd1); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 40em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 14px; }
.micro { color: var(--muted); font-size: .92rem; }
.hero-visual { position: relative; }
.halo { position: absolute; inset: -10%; background: radial-gradient(closest-side, color-mix(in srgb, var(--green) 22%, transparent), transparent); filter: blur(10px); }
.panel { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 26px; box-shadow: var(--shadow); }
.panel > img { display: block; width: 100%; margin-bottom: 18px; }
.logo-light { display: none !important; }
[data-theme="light"] .logo-light { display: block !important; }
[data-theme="light"] .logo-dark { display: none !important; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.facts li { background: var(--panel2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; }
.facts strong { font-size: 1.7rem; line-height: 1.1; color: var(--accent); }
.facts span { color: var(--muted); font-size: .9rem; }
.panel-note { margin: 12px 0 0; font-size: .8rem; color: var(--muted); }

.strip { border-block: 1px solid var(--line); background: var(--bg2); }
.strip-row { display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; padding: 16px 0; }
.strip-label { color: var(--muted); font-weight: 600; }
.strip-item { font-weight: 700; display: inline-flex; align-items: center; gap: 8px; }
.strip-item::before { content: "✓"; color: var(--accent); }

/* ---------------------------------------------------------------- разделы */
.section { padding: 72px 0; }
.section.soft { background: var(--bg2); border-block: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: 32px; }
.section-head p:last-child { color: var(--muted); }
.kicker { color: var(--accent); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .82rem; margin-bottom: 8px; }
.note { color: var(--muted); margin-top: 22px; font-size: .95rem; }

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card, .demo, .plan, .step, .deal { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.card p, .demo p, .plan p, .step p { color: var(--muted); margin-bottom: 0; }
.ico { width: 34px; height: 34px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 10px; }

.demos { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.demo { display: flex; flex-direction: column; gap: 8px; }
.demo p { flex: 1; }
.demo .btn { width: 100%; margin-top: 8px; }
.demo.dev { background: transparent; border-style: dashed; }
.badge { align-self: flex-start; margin-top: 8px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: .85rem; font-weight: 700; }

.steps { list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.step-num { display: block; font-weight: 800; color: var(--accent); font-size: 1.4rem; margin-bottom: 6px; }
.deal h3 { font-size: 1.3rem; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 28px; }
.checklist li { position: relative; padding-left: 28px; }
.checklist li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--accent); font-weight: 800; }

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.plan { display: flex; flex-direction: column; }
.plan.featured { border-color: var(--accent); box-shadow: var(--shadow); }
.plan-label { color: var(--accent) !important; font-weight: 700; font-size: .88rem; margin-bottom: 6px !important; }
.plan ul { margin: 14px 0 20px; padding-left: 20px; color: var(--muted); flex: 1; }
.plan li { margin-bottom: 4px; }

.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 0 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.3rem; line-height: 1; flex: 0 0 auto; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--muted); }

/* ------------------------------------------------------------------- форма */
.contact { display: grid; grid-template-columns: .85fr 1.15fr; gap: 40px; align-items: start; }
.contact-copy p:not(.kicker) { color: var(--muted); }
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 700; font-size: .93rem; }
.opt { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-height: 44px;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.field [aria-invalid="true"] { border-color: var(--err); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 400 !important; }
.consent input { width: 20px; height: 20px; min-height: 0; margin-top: 3px; flex: 0 0 auto; accent-color: var(--green2); }
.form-actions { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 14px; }
.form-status { margin: 0; font-weight: 600; }
.form-status.ok { color: var(--ok); }
.form-status.err { color: var(--err); }
/* Ловушка для роботов: человек поле не видит и не заполняет */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ------------------------------------------------------------------- подвал */
.footer { padding: 40px 0 28px; border-top: 1px solid var(--line); }
.footer-top { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-logo { width: 260px; }
.footer-blurb { color: var(--muted); max-width: 420px; margin-top: 10px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 20px; align-content: flex-start; }
.footer-links a { color: var(--muted); text-decoration: none; font-weight: 600; }
.footer-links a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: .9rem; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.disclaimer { color: var(--muted); font-size: .82rem; margin-top: 14px; }

.legal h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.legal h2 { font-size: 1.25rem; margin-top: 1.6em; }
.legal p { color: var(--muted); }
.legal .btn { margin-top: 18px; }

/* --------------------------------------------------------------- адаптив */
@media (max-width: 1080px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 920px) {
  .menu { display: inline-flex; }
  .navlinks {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0; padding: 8px 16px 16px;
    background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .navlinks.open { display: flex; }
  .navlinks a { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .nav-cta { display: none; }
  .hero-grid, .contact { grid-template-columns: 1fr; }
  .hero { padding-top: 40px; }
  .plans { grid-template-columns: 1fr; }
  .checklist { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .cards, .steps { grid-template-columns: 1fr; }
  .contact-form { grid-template-columns: 1fr; padding: 16px; }
  .section { padding: 52px 0; }
  .brand-name { display: none; }
  .theme-toggle { padding: 0 10px; }
  #themeText { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .lang { max-width: 112px; }
  .actions .btn { flex: 1 1 100%; }
  .panel { padding: 18px; }
  .facts strong { font-size: 1.4rem; }
}
