/* BakinConverter landing — макет + фоновый hero */
:root {
  --bg: #f5f8fc;
  --surface: #ffffff;
  --text: #152033;
  --muted: #5f6b7c;
  --line: #e3e9f1;
  --blue: #1f6bff;
  --blue-deep: #1554d6;
  --navy: #152a45;
  --navy-2: #1b3554;
  --ok: #16a34a;
  --ok-bg: #eaf8ef;
  --err: #dc2626;
  --radius: 14px;
  --shadow: 0 12px 32px rgba(21, 32, 51, 0.08);
  --max: 1200px;
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --focus: 0 0 0 3px rgba(31, 107, 255, 0.35);
}

*, *::before, *::after { box-sizing: border-box; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: 2px; }
a:hover { color: var(--blue-deep); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 1000;
  background: #fff; color: var(--text); padding: 8px 12px; border-radius: 8px;
}
.skip-link:focus { top: 12px; }

.container {
  width: min(100% - 32px, var(--max));
  margin-inline: auto;
}

.ico { width: 1em; height: 1em; flex: 0 0 auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

/* Главная: фиксированная шапка с плавным появлением */
.site-header.is-smart {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  transform: translateY(0);
  transition:
    transform .55s cubic-bezier(.22, 1, .36, 1),
    box-shadow .35s ease,
    background .35s ease,
    border-color .35s ease;
  will-change: transform;
}
.site-header.is-smart.is-hidden {
  transform: translateY(-110%);
  pointer-events: none;
}
.site-header.is-smart.is-pinned {
  background: rgba(255,255,255,.96);
  box-shadow: 0 10px 28px rgba(21, 32, 51, .08);
  border-bottom-color: rgba(227, 233, 241, .95);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 70px; position: relative;
}

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text); font-weight: 700; font-size: 1.08rem;
}
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.brand-name {
  background: linear-gradient(90deg, #0891b2, #1f6bff 50%, #4338ca);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.site-nav {
  display: flex; align-items: center; gap: 22px;
}
.nav-links {
  display: flex; align-items: center; gap: 20px;
}
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: .95rem; font-weight: 600;
}
.nav-links a:hover { color: var(--text); }

.nav-toggle {
  display: none; width: 42px; height: 42px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  display: block; width: 18px; height: 2px; background: var(--text);
  border-radius: 2px; position: relative;
}
.nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bar::before { top: -6px; }
.nav-toggle-bar::after { top: 6px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border-radius: 12px;
  border: 1px solid transparent; font: inherit; font-weight: 650;
  font-size: .96rem; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--blue); color: #fff;
  box-shadow: 0 10px 22px rgba(31, 107, 255, .28);
}
.btn-primary:hover { background: var(--blue-deep); color: #fff; }
.btn-ghost {
  background: #fff; color: var(--text); border-color: #d7deea;
}
.btn-ghost:hover { color: var(--text); border-color: #b8c4d8; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: .9rem; }
.btn-download-nav { box-shadow: none; }

/* Hero with background image */
.hero {
  position: relative;
  /* Выше: фон доходит ниже полосы форматов */
  min-height: clamp(640px, 92vh, 900px);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #eef4fb;
  padding-bottom: 110px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    url("../images/bg_hero.jpg") right center / cover no-repeat;
  z-index: 0;
}

.hero-fade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg,
      rgba(245, 248, 252, 0.98) 0%,
      rgba(245, 248, 252, 0.92) 34%,
      rgba(245, 248, 252, 0.55) 52%,
      rgba(245, 248, 252, 0.12) 68%,
      transparent 82%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(100% - 32px, var(--max));
  padding: 56px 0 36px;
}

.hero-copy {
  max-width: 520px;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 16px; padding: 7px 12px; border-radius: 999px;
  background: rgba(255,255,255,.85); border: 1px solid #dbe7f8;
  color: var(--blue); font-size: .84rem; font-weight: 700;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(1.9rem, 4.2vw, 2.85rem);
  line-height: 1.12; letter-spacing: -.025em;
}

.lead {
  margin: 0 0 24px; color: var(--muted); font-size: 1.06rem;
}

.hero-actions {
  display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px;
}

.hero-note {
  margin: 0; color: var(--muted); font-size: .9rem;
}

/* Format bar */
.format-bar {
  margin-top: -96px;
  position: relative;
  z-index: 3;
  padding-bottom: 28px;
}

.format-bar-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  box-shadow: var(--shadow);
}

.format-chip {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px; border-radius: 12px; border: 1px solid transparent;
}
.format-chip:hover { border-color: #d7e4ff; background: #f8fbff; }
.format-ico {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: #eaf1ff; color: var(--blue); font-weight: 700; flex: 0 0 auto;
}
.format-chip h3 { margin: 0 0 4px; font-size: .98rem; }
.format-chip p { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.4; }

/* Sections */
.section { padding: 72px 0; }
.section-soft {
  background: #eef3f9;
  border-block: 1px solid var(--line);
}

.section-head { max-width: 640px; margin-bottom: 28px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2,
.local-copy h2,
.download-side h2 {
  margin: 0 0 10px;
  font-size: clamp(1.55rem, 3vw, 2rem);
  letter-spacing: -.02em;
}
.section-head p { margin: 0; color: var(--muted); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.feature-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 20px;
  box-shadow: 0 6px 18px rgba(21, 32, 51, .04);
  transition: transform .15s ease, box-shadow .15s ease;
}
.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.feature-icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center;
  background: #eaf1ff; color: var(--blue); margin-bottom: 14px;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature-card h3 { margin: 0 0 8px; font-size: 1.02rem; }
.feature-card p { margin: 0; color: var(--muted); font-size: .94rem; }

/* UI table mock */
.ui-table {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.ui-table-head,
.ui-row,
.ui-table-foot {
  display: grid;
  grid-template-columns: 1.6fr 1.1fr .4fr .9fr 1.1fr .9fr;
  gap: 10px;
  align-items: center;
  padding: 12px 16px;
}

.ui-table-head {
  background: var(--navy);
  color: #d7e3f5;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.ui-row {
  border-top: 1px solid #eef2f7;
  font-size: .92rem;
  background: #fff;
}
.ui-row:nth-child(odd) { background: #fbfcfe; }

.ui-file { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; }
.ui-thumb {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, #93c5fd, #1f6bff);
}
.ui-meta { color: var(--muted); font-size: .84rem; }
.ui-arrow { color: #94a3b8; text-align: center; }
.ui-select {
  border: 1px solid #dbe3ef; border-radius: 8px;
  padding: 7px 10px; background: #fff; color: var(--text); font-size: .84rem;
}
.ui-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 28px; padding: 0 10px; border-radius: 999px;
  font-size: .78rem; font-weight: 700;
}
.ui-badge.ok { background: var(--ok-bg); color: var(--ok); }
.ui-badge.progress {
  gap: 6px; background: #eaf1ff; color: var(--blue); min-width: 72px;
}
.ui-badge.progress i {
  width: 36px; height: 4px; border-radius: 999px; background: #c9daff; position: relative; overflow: hidden;
}
.ui-badge.progress i::after {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 38%;
  background: var(--blue); border-radius: inherit;
}

.ui-table-foot {
  border-top: 1px solid var(--line);
  background: #f8fafc;
}
.ui-foot-left { display: flex; gap: 10px; grid-column: 1 / 5; }
.ui-ghost {
  display: inline-flex; align-items: center; min-height: 34px;
  padding: 0 12px; border-radius: 8px; border: 1px solid #d7deea;
  background: #fff; font-size: .84rem; font-weight: 600;
}
.ui-ghost.muted { color: #94a3b8; border-color: transparent; background: transparent; }
.ui-cta {
  grid-column: 6;
  justify-self: end;
  display: inline-flex; align-items: center; min-height: 38px;
  padding: 0 16px; border-radius: 10px; background: var(--blue); color: #fff;
  font-size: .88rem; font-weight: 700;
}

/* Local / privacy dark block */
.section-local {
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  color: #fff;
  padding: 72px 0;
}

.local-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 36px;
  align-items: center;
}

.local-art {
  display: flex;
  align-items: center;
  justify-content: center;
}
.local-art img {
  width: min(100%, 420px);
  height: auto;
  display: block;
}

.local-copy h2 { color: #fff; }
.local-copy p { color: #c5d3e6; margin: 0 0 16px; font-size: 1.05rem; }
.local-points {
  margin: 0; padding: 0; list-style: none;
  display: grid; gap: 8px;
}
.local-points li {
  position: relative; padding-left: 22px; color: #e7eef8; font-weight: 600;
}
.local-points li::before {
  content: ""; position: absolute; left: 0; top: .45em;
  width: 10px; height: 10px; border-radius: 50%; background: #3b82f6;
}

/* Steps */
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  position: relative;
}
.steps::before {
  content: "";
  position: absolute; top: 28px; left: 12%; right: 12%;
  border-top: 2px dashed #c9d6ea;
  z-index: 0;
}
.steps li {
  position: relative; z-index: 1;
  text-align: center; background: transparent; padding: 0 8px;
}
.step-num {
  width: 56px; height: 56px; margin: 0 auto 14px;
  display: grid; place-items: center; border-radius: 50%;
  background: #fff; border: 3px solid var(--blue); color: var(--blue);
  font-size: 1.2rem; font-weight: 800;
  box-shadow: 0 8px 18px rgba(31,107,255,.15);
}
.steps h3 { margin: 0 0 8px; font-size: 1.05rem; }
.steps p { margin: 0; color: var(--muted); font-size: .94rem; }

/* FAQ */
.narrow-faq { max-width: 760px; }
.faq-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 10px;
  padding: 0 16px;
  box-shadow: 0 4px 12px rgba(21,32,51,.03);
  overflow: hidden;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.faq-item.is-open {
  border-color: #c9daf8;
  box-shadow: 0 8px 22px rgba(31,107,255,.08);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  font-weight: 650;
  padding: 16px 36px 16px 0;
  position: relative;
  outline: none;
  transition: color .2s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::marker { content: ""; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--blue);
  border-bottom: 2px solid var(--blue);
  transform: translateY(-65%) rotate(45deg);
  transition: transform .35s ease;
}
.faq-item.is-open summary::after {
  transform: translateY(-20%) rotate(225deg);
}
.faq summary:hover { color: var(--blue); }

/* Плавное раскрытие ответа */
.faq-panel {
  height: 0;
  overflow: hidden;
  transition: height .4s cubic-bezier(.22, 1, .36, 1);
}
.faq-panel-inner {
  opacity: 0;
  transform: translateY(-8px);
  transition:
    opacity .28s ease,
    transform .4s cubic-bezier(.22, 1, .36, 1);
}
.faq-item.is-open .faq-panel-inner {
  opacity: 1;
  transform: none;
}
.faq-panel-inner p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.65;
}
.faq-panel-inner p:last-child {
  margin-bottom: 18px;
}

@media (prefers-reduced-motion: reduce) {
  .faq-panel,
  .faq-panel-inner,
  .faq summary::after,
  .faq-item {
    transition: none !important;
  }
}

/* Download panel */
.download-section { padding-bottom: 80px; }
.download-panel {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 28px;
  align-items: center;
  background: linear-gradient(135deg, #eaf2ff, #f5f9ff 55%, #edf4ff);
  border: 1px solid #d5e4ff;
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.mail-badge {
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: #fff; color: var(--blue);
  box-shadow: 0 8px 18px rgba(31,107,255,.15);
  margin-bottom: 14px;
}
.mail-badge svg { width: 26px; height: 26px; }
.download-side p { margin: 0; color: var(--muted); }

/* Контейнер для официальной формы AutoWebOffice — без своих стилей формы */
.download-form-host {
  width: 100%;
  min-width: 0;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 28px 0 24px;
}

.footer-panel {
  display: grid;
  gap: 18px;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  align-items: flex-start;
  justify-content: space-between;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 700;
}

.footer-brand img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  max-width: 760px;
  justify-content: flex-end;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: .88rem;
  font-weight: 600;
}

.footer-links a:hover {
  color: var(--blue);
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid #eef2f7;
  color: var(--muted);
  font-size: .86rem;
}

.footer-bottom p {
  margin: 0;
}

@media (max-width: 768px) {
  .footer-links {
    justify-content: flex-start;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Legal */
.legal-page { padding: 48px 0 72px; }
.legal-page h1 { margin: 0 0 12px; font-size: clamp(1.7rem, 3vw, 2.2rem); }
.legal-page h2 { margin: 28px 0 8px; font-size: 1.15rem; }
.legal-page p { color: var(--muted); }
.legal-note {
  margin-top: 28px; padding: 14px 16px; background: #fff7ed;
  border: 1px solid #fed7aa; border-radius: 12px; color: #9a3412 !important;
}
.narrow { width: min(100% - 32px, 760px); margin-inline: auto; }
.site-nav-static { display: flex; gap: 16px; }
.site-nav-static a { text-decoration: none; font-weight: 650; color: var(--muted); }

/* Reveal */
.reveal {
  opacity: 0; transform: translateY(14px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Responsive */
@media (max-width: 1100px) {
  .format-bar-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ui-table-head { display: none; }
  .ui-row, .ui-table-foot {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .ui-arrow { display: none; }
  .ui-foot-left, .ui-cta { grid-column: auto; justify-self: start; }
}

@media (max-width: 900px) {
  .hero {
    min-height: auto;
    padding-bottom: 72px;
  }
  .format-bar {
    margin-top: -56px;
  }
  .hero-bg {
    background-position: 70% center;
    opacity: .55;
  }
  .hero-fade {
    background: linear-gradient(180deg, rgba(245,248,252,.96) 0%, rgba(245,248,252,.88) 55%, rgba(245,248,252,.75) 100%);
  }
  .hero-inner { padding: 40px 0 36px; }
  .hero-copy { max-width: none; }
  .local-grid, .download-panel { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 24px; }
  .steps::before { display: none; }
}

@media (max-width: 768px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none; position: absolute; left: 16px; right: 16px; top: 70px;
    flex-direction: column; align-items: stretch; gap: 8px;
    padding: 12px; background: #fff; border: 1px solid var(--line);
    border-radius: 14px; box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: flex; }
  .nav-links { flex-direction: column; align-items: stretch; gap: 4px; }
  .nav-links a, .btn-download-nav { width: 100%; justify-content: center; }
  .nav-links a { padding: 10px 12px; border-radius: 10px; }
  .nav-links a:hover { background: #f5f8fc; }
  .format-bar-grid { grid-template-columns: 1fr 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .download-form-host { width: 100%; }
  .hero-actions .btn { width: 100%; }
}

@media (max-width: 480px) {
  .container { width: min(100% - 24px, var(--max)); }
  .format-bar-grid { grid-template-columns: 1fr; }
  .format-bar { margin-top: -40px; }
  .download-panel { padding: 20px 16px; }
}
