/* Стартовая страница 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 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; }
.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; }

/* ---------------------------------------------------------------- разделы */
.section { padding: 72px 0; }
.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 { 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; }
/* «Что мы уже построили» (1.35): две карточки примеров — шире, в две колонки */
.cards.cases { grid-template-columns: repeat(2, 1fr); }
.card.case { padding: 26px; }
.card.case h3 { font-size: 1.2rem; }
.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; }

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.plan { display: flex; flex-direction: column; }
.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-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-logo { width: 260px; }
.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); }
.footer-bottom .site-ver { margin-left: 10px; padding: 1px 8px; border: 1px solid var(--line); border-radius: 999px; font-size: .8rem; font-variant-numeric: tabular-nums; }

.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; }

/* 1.35 (вариант C владельца): под заголовком — цветная строка поменьше и белая «Разработка под ключ» ещё меньше, обе в одну строку
   на компьютере; в конце текста — крупное «вы работаете» */
.hero h1 { margin-bottom: .25em; }
.hero h1, .hero .lead { overflow-wrap: break-word; hyphens: auto; }
/* На планшете кнопка «Связаться» в шапке не помещалась (ru, uk, el, ka — прокрутка вбок); та же кнопка есть на первом экране */
@media (max-width: 1180px) { .nav-cta { display: none; } }

/* 1.36: почта уже зарегистрирована — подсказка под полем и окошко входа */
.form-known { margin-top: 10px; padding: 12px 14px; border: 1px solid var(--accent); border-radius: 12px; background: rgba(94, 227, 41, .08); }
.form-known p { margin: 0 0 10px; font-weight: 600; color: var(--text); }
.btn.btn-sm { min-height: 38px; padding: 8px 16px; font-size: .95rem; }
.login-dlg { width: min(420px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); color: var(--text); box-shadow: var(--shadow); }
.login-dlg::backdrop { background: rgba(0, 0, 0, .6); }
.login-form { position: relative; display: grid; gap: 14px; padding: 26px 22px 22px; }
.login-form h2 { margin: 0 32px 0 0; font-size: 1.35rem; }
.login-form .field { margin: 0; }
.dlg-x { position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.dlg-x:hover, .dlg-x:focus-visible { color: var(--text); background: var(--panel2, rgba(255, 255, 255, .06)); }
.link-btn { justify-self: start; padding: 0; border: 0; background: none; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; }

/* --------------------------------------------------------------- адаптив */
@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; }
  .contact { grid-template-columns: 1fr; }
  .hero { padding-top: 40px; }
  .plans { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .cards, .cards.cases, .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; }
  /* На телефоне «Войти» — значок-человечек (текст остаётся для экранного диктора): шапка помещается в 360 px */
  .nav-login { padding: 0; width: 40px; justify-content: center; }
  .nav-login-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .panel { padding: 18px; }
  .facts strong { font-size: 1.4rem; }
}

/* ------------------------------------------------------------ кабинет клиента (kabinet.html, 1.14) */
.nav-login { min-height: 40px; padding: 6px 14px; font-size: .92rem; display: inline-flex; align-items: center; gap: 7px; }
.nav-login-ic { flex: none; }
/* Ноутбук: меню, язык, тема, «Войти» и «Связаться» в одну строку — «Войти» значком (текст для экранного диктора) */
@media (min-width: 921px) and (max-width: 1440px) {
  .theme-toggle { padding: 0 10px; }
  #themeText { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nav-login { padding: 0; width: 40px; justify-content: center; }
  .nav-login-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.kab { min-height: 50vh; }
.kab h2 { margin-top: 34px; }

/* 1.39 (владелец 02.11.2026: «первая страница растянута — собрать в блок»; полоса «Разрабатываем для» плашками; «Наши проекты» — 6 рамок;
   «Что мы сделаем для вашего бизнеса» — 12 коротких карточек). Утверждено по снимкам макета. */
.hero { padding: 40px 0 36px; }
.hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); margin: 14px 0 .2em; line-height: 1.05; }
.hero .lead { font-size: 1.05rem; max-width: 34em; margin: 0; }
.panel { padding: 20px; }
.panel > img { max-width: 340px; margin: 0 auto 14px; }
.facts { gap: 8px; }
.facts li { padding: 10px 12px; }
.facts strong { font-size: 1.35rem; }
.facts span { font-size: .84rem; line-height: 1.35; }
/* «Наши проекты» — 6 карточек */
.cards.projects { grid-template-columns: repeat(3, 1fr); }
.card.project { position: relative; padding: 22px; transition: border-color .2s, transform .2s; }
.card.project:hover { border-color: var(--accent); transform: translateY(-2px); }
.card.project h3 { font-size: 1.1rem; margin: 0 0 6px; }
.card.project p { font-size: .93rem; }
.badge { position: absolute; top: 18px; right: 18px; font-size: .74rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; }
.card.project.more { border-style: dashed; border-color: rgba(94, 227, 41, .55); background: linear-gradient(160deg, rgba(94, 227, 41, .08), transparent 70%); }
.card.project.more .btn { margin-top: 14px; }
@media (max-width: 1080px) { .cards.projects { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 920px) { .panel > img { max-width: 240px; } }
@media (max-width: 560px) {
  .hero { padding: 22px 0 26px; }
  .hero h1 { font-size: 2.05rem; }
  .panel { padding: 14px; } .facts span { font-size: .78rem; } .facts strong { font-size: 1.15rem; }
  .cards.projects { grid-template-columns: 1fr; gap: 10px; } .card.project { padding: 16px; }
}

@media (max-width: 560px) { .hero .lead { font-size: .98rem; } }
/* Длинные слова (финский, .cards.projects > * { min-width: 0; }
.card.project h3, .card.project p { overflow-wrap: break-word; hyphens: auto; }

/* ---- 1.93: плашка согласия на память браузера (assets/legal.js) и юридические страницы ----
   Узкая полоса внизу во всю ширину — не закрывает главные кнопки; справа место под кнопку чата, на узком экране плашка выше неё. */
.cc-bar { position: fixed; left: 14px; right: 96px; bottom: 14px; z-index: 70; display: flex; align-items: center; gap: 18px; padding: 12px 16px 12px 20px;
  background: var(--panel); border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .45); color: var(--text); }
.cc-bar .cc-x { flex: 1 1 auto; margin: 0; font-size: .88rem; line-height: 1.4; color: var(--muted); }
.cc-bar .cc-x a { color: var(--accent); white-space: nowrap; }
.cc-bar .cc-acts { flex: 0 0 auto; display: flex; gap: 10px; }
.cc-bar .cc-acts .btn { min-height: 42px; padding: 8px 16px; font-size: .92rem; white-space: nowrap; }
@media (max-width: 900px) {
  .cc-bar { flex-direction: column; align-items: stretch; gap: 12px; left: 10px; right: 10px; bottom: 84px; padding: 14px 16px; }
  .cc-bar .cc-acts .btn { flex: 1 1 0; }
}
@media print { .cc-bar { display: none; } }
.legal .legal-who { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.legal .legal-who:empty { display: none; }
.legal .legal-note { padding: 10px 14px; border: 1px dashed var(--line); border-radius: 10px; }
