/* Smart Forms Pro — сайт продукта.
   База дизайн-системы наследована с ru.visiology.su (шрифт Onest, тёмный текст,
   светлые фоны, кнопки-пилюли), но акцент — ЗЕЛЁНЫЙ вместо жёлтого #FEE121.
   Зелёный #29C44A — это зелёная грань логотип-куба Visiology. */

:root {
  /* нейтральная база (как у Visiology) */
  --ink: #171717;
  --ink-2: #3A3A3A;
  --muted: #6B6B6B;
  --muted-2: #9CA0A6;
  --bg: #F7F9F8;
  --surface: #FFFFFF;
  --surface-2: #F1F5F3;
  --border: #E4E8E6;
  --border-strong: #D3DAD6;

  /* АКЦЕНТ — зелёный (замена жёлтого) */
  --green: #0B8043;          /* основной интерактив: кнопки, ссылки — белый текст AA */
  --green-hover: #0A6E3A;
  --green-bright: #29C44A;   /* бренд-куб: подчёркивания, иконки, бейджи, декор */
  --green-soft: #E7F6EC;     /* мягкая заливка блоков/бейджей */
  --green-softer: #F1FAF4;

  /* семантика типов ячеек продукта (для инфографики) */
  --cell-calc: #DDF3E4;
  --cell-input: #E7F0FC;
  --cell-ref: #F3E9FB;
  --cell-total: #ECECEC;

  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 100px;
  --shadow-sm: 0 1px 2px rgba(16,32,24,.06), 0 1px 3px rgba(16,32,24,.05);
  --shadow-md: 0 8px 24px rgba(16,40,28,.08);
  --shadow-lg: 0 24px 60px rgba(16,40,28,.14);

  --maxw: 1180px;
  --nav-h: 68px;
  --font: 'Onest', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video { max-width: 100%; display: block; }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-hover); }

h1, h2, h3, h4 { margin: 0; line-height: 1.14; letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: clamp(34px, 5vw, 56px); }
h2 { font-size: clamp(28px, 3.4vw, 42px); }
h3 { font-size: clamp(20px, 2vw, 26px); }
p  { margin: 0; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section--tight { padding: clamp(40px, 5vw, 64px) 0; }
.section--soft { background: var(--surface); }
.section--dark { background: #0E1A14; color: #EAF3EE; }
.section--green { background: linear-gradient(160deg, #0B8043 0%, #0E6E3C 100%); color: #fff; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--green); background: var(--green-soft);
  padding: 6px 14px; border-radius: var(--radius-pill);
}
.section--dark .eyebrow, .section--green .eyebrow { color: #CFF5DC; background: rgba(255,255,255,.12); }
.lead { font-size: clamp(18px, 2vw, 21px); color: var(--muted); max-width: 62ch; }
.section--dark .lead, .section--green .lead { color: rgba(255,255,255,.82); }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }
.muted { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font); font-weight: 600; font-size: 16px; line-height: 1;
  padding: 14px 24px; border-radius: var(--radius-pill);
  border: 1.5px solid transparent; cursor: pointer; transition: all .18s ease;
  white-space: nowrap;
}
.btn--primary { background: var(--green); color: #fff; }
.btn--primary:hover { background: var(--green-hover); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--border-strong); }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn--light { background: #fff; color: var(--green); }
.btn--light:hover { background: #F0FBF4; color: var(--green-hover); }
.btn--ondark { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.28); }
.btn--ondark:hover { background: rgba(255,255,255,.2); color: #fff; }
.btn--lg { padding: 17px 30px; font-size: 17px; }

/* ---------- Header (sticky, always visible) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand__mark { width: 30px; height: auto; }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__name { font-weight: 700; font-size: 17px; letter-spacing: -.02em; color: var(--ink); }
.brand__name b { color: var(--green); font-weight: 700; }
.brand__by { font-size: 11px; color: var(--muted-2); letter-spacing: .02em; }

.nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.nav a {
  color: var(--ink-2); font-weight: 500; font-size: 15.5px;
  padding: 8px 14px; border-radius: 10px; position: relative; transition: background .15s, color .15s;
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a.is-active { color: var(--green); }
.nav a.is-active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px;
  background: var(--green-bright); border-radius: 2px;
}
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav.mobile { display: none; } /* мобильный дропдаун скрыт на десктопе, включается в медиазапросе */

.menu-toggle {
  display: none; margin-left: auto; width: 42px; height: 42px; border-radius: 10px;
  border: 1px solid var(--border-strong); background: #fff; cursor: pointer;
  align-items: center; justify-content: center;
}
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
  content: ""; display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: .2s;
}
.menu-toggle span::before { transform: translateY(-6px); }
.menu-toggle span::after  { transform: translateY(4px); }
body.menu-open .menu-toggle span { background: transparent; }
body.menu-open .menu-toggle span::before { transform: rotate(45deg); }
body.menu-open .menu-toggle span::after  { transform: rotate(-45deg) translateY(-1.5px) translateX(1px); }

/* ---------- Hero ---------- */
.hero { padding: clamp(48px, 7vw, 88px) 0 clamp(40px, 5vw, 64px); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 60% at 85% -10%, rgba(41,196,74,.10), transparent 60%),
    radial-gradient(50% 50% at 5% 10%, rgba(41,196,74,.06), transparent 60%);
  pointer-events: none;
}
.hero__grid { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 52px; align-items: center; }
.hero h1 { margin-top: 18px; }
.hero h1 .accent { color: var(--green); }
.hero__sub { margin-top: 20px; font-size: clamp(18px, 2vw, 21px); color: var(--muted); max-width: 54ch; }
.hero__cta { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero__note { margin-top: 16px; font-size: 14px; color: var(--muted-2); }
.hero__media { position: relative; }
.hero__media .shot { border-radius: var(--radius-lg); }

/* screenshot frame */
.shot {
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); overflow: hidden; background: #fff;
}
.shot img, .shot video { display: block; width: 100%; }
.shot--sm { box-shadow: var(--shadow-md); }
figure.shot { margin: 0; }
figcaption { font-size: 13.5px; color: var(--muted-2); padding: 10px 14px; border-top: 1px solid var(--border); background: var(--surface); }

/* ---------- Logo / trust strip ---------- */
.trust { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 15px; }
.trust b { color: var(--ink); }

/* ---------- Section headers ---------- */
.section-head { max-width: 720px; }
.section-head.center { margin: 0 auto; }
.section-head h2 { margin-top: 14px; }
.section-head .lead { margin-top: 16px; }

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

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm); transition: transform .18s, box-shadow .18s, border-color .18s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.card__icon {
  width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  background: var(--green-soft); color: var(--green); margin-bottom: 16px;
}
.card__icon svg { width: 24px; height: 24px; }
.card h3 { font-size: 20px; }
.card p { margin-top: 8px; color: var(--muted); font-size: 15.5px; }

/* pain vs solution */
.card--pain { background: var(--surface-2); border-style: dashed; }
.card--pain .card__icon { background: #FBEAEA; color: #C2453C; }

/* ---------- Feature rows (alternating media) ---------- */
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; align-items: center; }
.frow + .frow { margin-top: clamp(48px, 6vw, 88px); }
.frow--rev .frow__text { order: 2; }
.frow__badge { color: var(--green); font-weight: 600; font-size: 14px; }
.frow__text h3 { margin-top: 10px; font-size: clamp(24px, 2.6vw, 32px); }
.frow__text p { margin-top: 14px; color: var(--muted); font-size: 17px; }
.flist { margin: 20px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.flist li { position: relative; padding-left: 30px; color: var(--ink-2); }
.flist li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 6px;
  background: var(--green-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%230B8043' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/14px no-repeat;
}

/* ---------- Cell-type legend (инфографика «как в Excel») ---------- */
.cells { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.cell-chip { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; color: var(--ink-2); background: var(--surface); border: 1px solid var(--border); padding: 7px 14px 7px 10px; border-radius: var(--radius-pill); }
.cell-chip i { width: 16px; height: 16px; border-radius: 4px; display: inline-block; border: 1px solid rgba(0,0,0,.08); }

/* ---------- Comparison table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
table.compare { width: 100%; border-collapse: collapse; min-width: 680px; }
table.compare th, table.compare td { padding: 16px 20px; text-align: left; border-bottom: 1px solid var(--border); font-size: 15.5px; }
table.compare thead th { font-size: 14px; color: var(--muted); font-weight: 600; background: var(--surface-2); }
table.compare thead th.col-pro { color: var(--green); background: var(--green-soft); }
table.compare td.col-pro { background: var(--green-softer); font-weight: 600; }
table.compare tbody tr:last-child td { border-bottom: none; }
table.compare td.feat { font-weight: 500; color: var(--ink); }
.yes { color: var(--green); font-weight: 600; }
.no { color: var(--muted-2); }
.partial { color: #B9770E; }

/* ---------- Use case cards ---------- */
.usecase { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.usecase__tag { display: inline-block; align-self: flex-start; margin: 22px 22px 0; font-size: 13px; font-weight: 600; color: var(--green); background: var(--green-soft); padding: 5px 12px; border-radius: var(--radius-pill); }
.usecase__body { padding: 14px 22px 24px; }
.usecase h3 { font-size: 21px; }
.usecase .row { margin-top: 14px; }
.usecase .row b { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted-2); margin-bottom: 3px; }
.usecase .row p { color: var(--ink-2); font-size: 15.5px; }
.usecase .row.effect p { color: var(--green-hover); font-weight: 600; }

/* ---------- Roadmap ---------- */
.timeline { display: grid; gap: 20px; }
.rel {
  display: grid; grid-template-columns: 220px 1fr; gap: 30px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm);
}
.rel__when { }
.rel__badge { display: inline-block; font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: var(--radius-pill); }
.rel__badge--now { color: var(--green); background: var(--green-soft); }
.rel__badge--next { color: #0B5CAD; background: #E7F0FC; }
.rel__badge--later { color: var(--muted); background: var(--surface-2); }
.rel__title { margin-top: 12px; font-size: 20px; font-weight: 700; }
.rel__sub { color: var(--muted); font-size: 14.5px; margin-top: 4px; }
.rel ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.rel ul li { padding-left: 28px; position: relative; color: var(--ink-2); }
.rel ul li::before { content: ""; position: absolute; left: 0; top: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--green-bright); }
.rel--later ul li::before { background: var(--muted-2); }

/* ---------- CTA band ---------- */
.cta-band { border-radius: var(--radius-lg); padding: clamp(40px, 5vw, 64px); text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band .lead { color: rgba(255,255,255,.85); margin: 16px auto 0; }
.cta-band .btns { margin-top: 28px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta-two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 30px; text-align: left; }
.cta-two .box { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: var(--radius); padding: 24px; }
.cta-two .box h3 { color: #fff; font-size: 20px; }
.cta-two .box p { color: rgba(255,255,255,.82); margin-top: 8px; font-size: 15.5px; }

/* ---------- Footer ---------- */
.site-footer { background: #0E1A14; color: #C9D6CE; padding: 56px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.site-footer .brand__name { color: #fff; }
.site-footer .brand__by { color: #7E9488; }
.footer-col h4 { font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: #7E9488; font-weight: 600; margin-bottom: 14px; }
.footer-col a, .footer-col p { color: #C9D6CE; font-size: 15px; display: block; margin-bottom: 9px; }
.footer-col a:hover { color: #fff; }
.footer-about { color: #9DB0A5; font-size: 14.5px; margin-top: 16px; max-width: 42ch; }
.footer-bottom { margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.08); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: #7E9488; font-size: 13.5px; }

/* ---------- Lightbox (клик по скриншоту/видео — крупно) ---------- */
.shot img, .shot video { cursor: zoom-in; }
.lightbox {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: rgba(10, 20, 15, .88); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  align-items: center; justify-content: center; padding: 4vmin; cursor: zoom-out;
}
.lightbox.is-open { display: flex; }
.lightbox__stage { max-width: 96vw; max-height: 92vh; cursor: default; }
.lightbox__stage img, .lightbox__stage video {
  display: block; max-width: 96vw; max-height: 92vh; width: auto; height: auto;
  border-radius: 12px; box-shadow: 0 24px 80px rgba(0,0,0,.55);
}
.lightbox__close {
  position: fixed; top: 18px; right: 22px; width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,255,255,.14); border: none; color: #fff; font-size: 26px; line-height: 1;
  cursor: pointer; transition: background .15s;
}
.lightbox__close:hover { background: rgba(255,255,255,.28); }
.lightbox__cap { position: fixed; left: 0; right: 0; bottom: 20px; text-align: center; color: rgba(255,255,255,.85); font-size: 14.5px; padding: 0 24px; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* ---------- Lead form (заявка на демо, секция #demo) ---------- */
.lead-form {
  max-width: 720px; margin: 30px auto 0; text-align: left;
  background: #fff; color: var(--ink); border-radius: var(--radius-lg);
  padding: clamp(24px, 3.2vw, 36px); box-shadow: 0 18px 50px rgba(0,0,0,.22);
  display: flex; flex-direction: column; gap: 16px;
}
.lead-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span { font-size: 14px; font-weight: 500; color: var(--ink-2); }
.field > span i { color: var(--green); font-style: normal; margin-left: 2px; }
.field input, .field textarea {
  font-family: var(--font); font-size: 15.5px; color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--radius);
  padding: 12px 14px; width: 100%; transition: border-color .15s, box-shadow .15s;
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted-2); }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--green); background: #fff;
  box-shadow: 0 0 0 3px rgba(11,128,67,.14);
}
.field textarea { resize: vertical; min-height: 76px; }
.lead-form__connection > span { margin-bottom: 2px; }
.lead-form__radios { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.lead-form__radios label { display: inline-flex; align-items: center; gap: 7px; font-size: 15px; color: var(--ink-2); cursor: pointer; }
.lead-form__radios input { accent-color: var(--green); width: 17px; height: 17px; }
.lead-form__check { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; color: var(--muted); cursor: pointer; }
.lead-form__check input { accent-color: var(--green); width: 18px; height: 18px; margin-top: 1px; flex: none; }
.lead-form__check i { color: var(--green); font-style: normal; margin-left: 2px; }
.lead-form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.lead-form__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.lead-form__actions .btn--light { background: var(--green); color: #fff; }
.lead-form__actions .btn--light:hover { background: var(--green-hover); color: #fff; }
.lead-form__actions .btn--ondark { background: transparent; color: var(--green); border-color: var(--border-strong); }
.lead-form__actions .btn--ondark:hover { background: var(--surface-2); color: var(--green-hover); }
.lead-form__status { margin: 0; color: #B42318; font-size: 14.5px; font-weight: 500; }
.lead-form__done {
  max-width: 720px; margin: 30px auto 0; background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22); border-radius: var(--radius-lg);
  padding: clamp(28px, 3.5vw, 40px); text-align: center;
}
.lead-form__done h3 { color: #fff; font-size: 22px; }
.lead-form__done p { color: rgba(255,255,255,.85); margin-top: 10px; }
@media (max-width: 560px) { .lead-form__row { grid-template-columns: 1fr; } }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero__grid, .frow, .frow--rev .frow__text { grid-template-columns: 1fr; }
  .frow--rev .frow__text { order: 0; }
  .hero__media { order: -1; }
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .cta-two { grid-template-columns: 1fr; }
  .rel { grid-template-columns: 1fr; gap: 16px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav, .header-actions { display: none; } /* CTA доступен в бургер-меню */
  .menu-toggle { display: inline-flex; }
  /* mobile dropdown */
  .nav.mobile {
    display: flex; flex-direction: column; align-items: stretch; gap: 2px;
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--border); padding: 12px 16px 20px;
    box-shadow: var(--shadow-md); transform: translateY(-120%); transition: transform .25s ease; z-index: 99;
  }
  body.menu-open .nav.mobile { transform: translateY(0); }
  .nav.mobile a { font-size: 17px; padding: 12px 12px; border-radius: 10px; }
  .nav.mobile a.is-active::after { display: none; }
  .nav.mobile a.is-active { background: var(--green-soft); }
  .nav.mobile .btn { margin-top: 10px; }
}
@media (max-width: 560px) {
  .grid--3, .grid--4, .grid--2 { grid-template-columns: 1fr; }
  body { font-size: 16px; }
  .brand__by { display: none; }
}
