/* ============================================================
   BrandOS24 v2 — design system
   Светлая тема по эталону brandos24.ru (папка «Файловый менеджер»).
   Акцент #0055FF, фон #ffffff / #f8fafc, текст #1e293b, шрифт Inter.
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --card: #ffffff;
  --card-hover: #ffffff;
  --line: #e2e8f0;
  --text: #1e293b;
  --text-soft: #64748b;
  --muted: #94a3b8;
  --accent: #0055FF;
  --accent-hover: #0044dd;
  --accent-2: #0044dd;
  --accent-light: #e8f0ff;
  --accent-glow: rgba(0, 85, 255, 0.16);
  --green: #16a34a;
  --danger: #ef4444;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  --maxw: 1180px;
  --header-h: 72px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 900;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h);
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 21px; font-weight: 800; letter-spacing: -0.4px;
  color: var(--text);
}
.logo .mark {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #ffffff; font-size: 15px; font-weight: 800;
  box-shadow: 0 0 18px var(--accent-glow);
}
.logo em { font-style: normal; color: var(--accent); }

.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a { font-size: 14.5px; color: var(--text-soft); font-weight: 500; transition: color .2s; }
.main-nav a:hover { color: var(--text); }
.main-nav a.is-active { color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: 12px; }

.burger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 0; cursor: pointer; padding: 10px;
}
.burger span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; }

.mobile-nav {
  display: none; position: fixed; inset: var(--header-h) 0 0 0; z-index: 899;
  background: var(--bg); padding: 22px; flex-direction: column; gap: 6px;
  border-top: 1px solid var(--line);
}
.mobile-nav.open { display: flex; }
.mobile-nav a { padding: 14px 4px; font-size: 17px; font-weight: 600; color: var(--text); border-bottom: 1px solid var(--line); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 24px; border-radius: 10px;
  font-size: 15px; font-weight: 700; letter-spacing: 0.2px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s, background .2s, color .2s, border-color .2s;
  white-space: nowrap;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 85, 255, 0.22);
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 10px 28px rgba(0, 85, 255, 0.28); }

.btn-ghost { background: var(--bg); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-lg { padding: 16px 32px; font-size: 16px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 84px 0 70px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(900px 480px at 85% -10%, var(--accent-light), transparent 60%),
    radial-gradient(700px 420px at 5% 30%, rgba(0, 85, 255, 0.06), transparent 60%);
}
.hero .container { position: relative; z-index: 1; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px;
  background: var(--accent-light); border: 1px solid rgba(0, 85, 255, 0.18);
  color: var(--accent); font-size: 13px; font-weight: 600;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(34px, 5.4vw, 62px);
  line-height: 1.08; letter-spacing: -1.6px; font-weight: 800;
  max-width: 760px; color: var(--text);
}
.hero h1 span { color: var(--accent); }

.hero-sub {
  margin: 22px 0 30px; font-size: clamp(16px, 2vw, 19px);
  color: var(--text-soft); max-width: 640px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero-note { margin-top: 16px; font-size: 14px; color: var(--muted); }
.hero-note b { color: var(--green); font-weight: 600; }

/* ---------- AI panel ---------- */
.ai-panel {
  margin-top: 56px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(0, 85, 255, 0.05), rgba(0, 85, 255, 0.02)), var(--card);
  border: 1px solid rgba(0, 85, 255, 0.2);
  padding: 26px 26px 22px;
  box-shadow: var(--shadow);
}
.ai-panel h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.3px; color: var(--text); }
.ai-panel .sub { color: var(--text-soft); font-size: 15px; margin: 6px 0 18px; }

.ai-row { display: flex; gap: 12px; flex-wrap: wrap; }
.ai-row input[type="text"] {
  flex: 1 1 260px; padding: 14px 16px; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--line);
  color: var(--text); font-size: 15px; outline: none; min-width: 0;
  font-family: inherit;
}
.ai-row input[type="text"]::placeholder { color: var(--muted); }
.ai-row input[type="text"]:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }

.ai-hint { margin-top: 12px; font-size: 13px; color: var(--muted); }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-tight { padding: 48px 0; }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head .eyebrow {
  color: var(--accent); font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.4px; margin-bottom: 10px;
}
.section-head h2 { font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -0.9px; font-weight: 800; line-height: 1.15; color: var(--text); }
.section-head p { color: var(--text-soft); margin-top: 12px; font-size: 16px; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.card:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-3px); }

.card .num {
  font-size: 13px; font-weight: 800; color: var(--accent);
  letter-spacing: 1px; margin-bottom: 12px;
}
.card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.2px; color: var(--text); }
.card p { color: var(--text-soft); font-size: 14.5px; }

.chip {
  display: inline-block; padding: 9px 14px; border-radius: 10px;
  background: var(--bg-soft); border: 1px solid var(--line);
  font-size: 14px; font-weight: 500; color: var(--text-soft);
}
.chip-list { display: flex; flex-wrap: wrap; gap: 10px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.step {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 18px; position: relative;
}
.step .num {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent);
  color: #ffffff; font-weight: 800; font-size: 14px; margin-bottom: 14px;
}
.step h3 { font-size: 15.5px; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.step p { font-size: 13.5px; color: var(--text-soft); }

/* Trust */
.trust-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.trust-item { padding: 18px; border-radius: var(--radius-sm); background: var(--bg-soft); border: 1px solid var(--line); }
.trust-item b { display: block; font-size: 15px; margin-bottom: 4px; color: var(--text); }
.trust-item span { color: var(--text-soft); font-size: 13.5px; }
.trust-item a { color: var(--accent); text-decoration: underline; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 860px; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 10px; background: var(--card); overflow: hidden; }
.faq-q {
  width: 100%; text-align: left; padding: 17px 18px; background: none; border: 0;
  color: var(--text); font-size: 15.5px; font-weight: 600; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  font-family: inherit;
}
.faq-q .chev { color: var(--accent); font-size: 12px; transition: transform .2s; }
.faq-item.open .chev { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a-inner { padding: 0 18px 18px; color: var(--text-soft); font-size: 15px; }
.faq-a-inner p + p { margin-top: 10px; }
.faq-a-inner a { color: var(--accent); text-decoration: underline; }

/* ---------- Forms ---------- */
.form-card {
  background: linear-gradient(160deg, rgba(0, 85, 255, 0.05), rgba(0, 85, 255, 0.02)), var(--card);
  border: 1px solid rgba(0, 85, 255, 0.22); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow);
}
.form-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 12px; }
.form-field label { display: block; font-size: 13px; color: var(--text-soft); margin-bottom: 6px; }
.form-field input {
  width: 100%; padding: 13px 14px; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--line);
  color: var(--text); font-size: 15px; outline: none;
  font-family: inherit;
}
.form-field input::placeholder { color: var(--muted); }
.form-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.form-note { font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.form-note a { color: var(--accent); text-decoration: underline; }

.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: #1e293b; border: 1px solid rgba(52, 211, 153, 0.4); color: #ffffff;
  padding: 13px 22px; border-radius: 12px; font-size: 14.5px; font-weight: 600;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35); opacity: 0; transition: all .3s ease; z-index: 1200; max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { border-color: rgba(248, 113, 113, 0.5); }

/* ---------- Article ---------- */
.article { max-width: 800px; margin: 0 auto; }
.article h1 { font-size: clamp(28px, 4vw, 42px); letter-spacing: -1px; line-height: 1.15; font-weight: 800; color: var(--text); }
.article-lede { font-size: 18px; color: var(--text-soft); margin: 18px 0 24px; line-height: 1.6; }
.article .meta { color: var(--muted); font-size: 14px; margin: 14px 0 8px; }
.article .lead { font-size: 18px; color: var(--text-soft); margin: 18px 0; }
.article h2 { font-size: 25px; margin: 40px 0 14px; letter-spacing: -0.4px; color: var(--text); }
.article h3 { font-size: 19px; margin: 26px 0 10px; color: var(--text); }
.article p, .article li { color: var(--text-soft); font-size: 16.5px; }
.article p { margin-bottom: 14px; }
.article ul, .article ol { list-style: disc; padding-left: 22px; margin-bottom: 16px; }
.article ol { list-style: decimal; }
.article li { margin-bottom: 6px; }
.article a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.article .toc {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 20px 24px; margin: 24px 0;
}
.article .toc b { display: block; margin-bottom: 8px; }
.article .toc a { text-decoration: none; }

.callout {
  border-left: 3px solid var(--accent); background: var(--accent-light);
  padding: 16px 18px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 20px 0;
  color: var(--text); font-size: 15.5px;
}
.callout.green { border-left-color: var(--green); background: rgba(22, 163, 74, 0.08); }

.article-cta {
  margin: 36px 0 14px; padding: 26px; border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(0, 85, 255, 0.05), rgba(0, 85, 255, 0.02)), var(--card);
  border: 1px solid rgba(0, 85, 255, 0.22); box-shadow: var(--shadow);
}
.article-cta h2 { font-size: 22px; margin: 0 0 10px; color: var(--text); }
.article-cta p { color: var(--text-soft); margin-bottom: 18px; }
.article-note { font-size: 13.5px; color: var(--muted); margin-top: 30px; border-top: 1px solid var(--line); padding-top: 16px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 54px 0 30px; background: var(--bg-soft); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; margin-bottom: 34px; }
.site-footer h4 { font-size: 14px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin-bottom: 14px; }
.footer-links li { margin-bottom: 9px; }
.footer-links a { color: var(--text-soft); font-size: 14.5px; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--line); padding-top: 22px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  color: var(--muted); font-size: 13px;
}
.footer-bottom a { color: var(--muted); text-decoration: underline; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { padding: 26px 0 6px; font-size: 13.5px; color: var(--muted); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs span { margin: 0 7px; color: var(--muted); }

/* ---------- Page hero (inner) ---------- */
.page-hero { padding: 56px 0 30px; }
.page-hero h1 { font-size: clamp(30px, 4.4vw, 48px); letter-spacing: -1.2px; line-height: 1.12; font-weight: 800; max-width: 860px; color: var(--text); }
.page-hero p { color: var(--text-soft); margin-top: 16px; font-size: 17px; max-width: 720px; }
.page-hero a { color: var(--accent); }
.page-hero .btn-primary { color: #ffffff; }
.page-hero .btn-ghost { color: var(--text); }

/* Knowledge cards */
.kb-card { display: flex; flex-direction: column; gap: 10px; }
.kb-card .cat { font-size: 12px; color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.kb-card h3 { font-size: 19px; font-weight: 700; line-height: 1.3; }
.kb-card h3 a:hover { color: var(--accent); }
.kb-card p { font-size: 14.5px; color: var(--text-soft); flex: 1; }
.kb-card .readmore { color: var(--accent); font-weight: 600; font-size: 14px; }

/* Service cards */
.service-card { display: flex; flex-direction: column; gap: 10px; }
.service-card .cat { font-size: 12px; color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.service-card h3 { font-size: 19px; font-weight: 700; line-height: 1.3; }
.service-card h3 a:hover { color: var(--accent); }
.service-card p { font-size: 14.5px; flex: 1; }
.service-card .readmore { color: var(--accent); font-weight: 600; font-size: 14px; }

/* ---------- 404 ---------- */
.page-404 main { min-height: 70vh; display: grid; place-items: center; }
.e404 { text-align: center; padding: 60px 0; }
.e404-code {
  font-size: clamp(64px, 12vw, 120px); font-weight: 800; letter-spacing: -4px; line-height: 1;
  color: var(--accent);
}
.e404 h1 { font-size: clamp(24px, 3.6vw, 36px); margin: 18px 0 10px; font-weight: 800; color: var(--text); }
.e404 p { color: var(--text-soft); margin-bottom: 26px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .trust-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .main-nav { display: none; }
  .burger { display: flex; }
  .header-actions .btn { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .section { padding: 52px 0; }
  .hero { padding: 56px 0 48px; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .trust-list { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-cta-stack { width: 100%; }
}
