/* VELLTRA: лендинг по макету. Тёмные первый экран и блок заявки, светлые разделы между ними.
   Скругления: кнопки и поля 10px, карточки 14px, крупные панели 24px. Один акцент: синий. */

:root {
  --ink: #0b1020;            /* почти чёрный синий: тёмные карточки, круг VELLTRA, текст */
  --hero: #060a15;           /* фон первого экрана и блока заявки */
  --navy: #16265f;           /* иконки в квадратах, кнопка «Как это работает» */
  --blue: #2346b0;           /* акцент в заголовках на светлом фоне */
  --blue-bright: #4d84f5;    /* акцент на тёмном фоне, иконки первого экрана */
  --bg-soft: #f4f6fa;        /* светлые разделы */
  --card: #ffffff;
  --text: #0d1326;
  --muted: #5b6377;
  --line: #e3e7ef;
  --on-dark: #ffffff;
  --on-dark-muted: rgb(255 255 255 / .72);
  --error: #c62f2f;
  --error-on-dark: #ff9b93;
  --r-btn: 10px;
  --r-card: 14px;
  --r-panel: 24px;
  --font: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --nav-h: 72px;
  --pad: clamp(64px, 8vw, 104px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg-soft); color: var(--text); font: 400 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.15; }
h3 { font-size: clamp(1.25rem, 1.8vw, 1.6rem); line-height: 1.2; }
p, ul, ol { margin: 0; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.accent { color: var(--blue); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
section { padding: var(--pad) 0; }
/* Переход по меню: заголовок раздела встаёт под шапкой (72px + 24px), без верхнего отступа секции */
section[id], .anchor { scroll-margin-top: calc(var(--nav-h) + 24px - var(--pad)); }
.anchor { position: absolute; top: 0; }

.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.eyebrow--dark { color: var(--on-dark-muted); }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 26px; border-radius: var(--r-btn);
  font: 600 15px/1 var(--font); text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s, transform .15s cubic-bezier(.16, 1, .3, 1);
}
.btn i { font-size: 18px; transition: transform .2s cubic-bezier(.16, 1, .3, 1); }
.btn:hover i { transform: translateX(3px); }
.btn:active { transform: scale(.98); }
.btn:focus-visible, .tabs__list button:focus-visible, .nav a:focus-visible, .nav__burger:focus-visible {
  outline: 3px solid rgb(77 132 245 / .55); outline-offset: 2px;
}
.btn:disabled { opacity: .7; cursor: progress; }
.btn--sm { height: 44px; padding: 0 20px; font-size: 14px; }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: #e9edf6; }
.btn--outline-light { color: #fff; border-color: rgb(255 255 255 / .55); background: transparent; }
.btn--outline-light:hover { border-color: #fff; background: rgb(255 255 255 / .06); }
.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: #0f1c4a; }
.btn--outline { color: var(--navy); border-color: #b9c3dd; background: transparent; height: 48px; }
.btn--outline:hover { border-color: var(--navy); }

/* Шапка */
.nav { position: fixed; inset: 0 0 auto; z-index: 20; transition: background-color .25s, box-shadow .25s; }
.nav.is-scrolled { background: rgb(6 10 21 / .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 1px 0 rgb(255 255 255 / .06); }
.nav__row { height: var(--nav-h); display: flex; align-items: center; gap: 32px; }
.nav__logo img { height: 28px; width: auto; }
.nav__links { display: flex; gap: 32px; margin: 0 auto; }
.nav__links a { color: rgb(255 255 255 / .82); text-decoration: none; font-size: 14px; font-weight: 500; transition: color .2s; }
.nav__links a:hover { color: #fff; }
.nav__links .nav__login { display: none; }
.nav__actions { display: flex; align-items: center; gap: 20px; }
.nav__signin { color: rgb(255 255 255 / .82); text-decoration: none; font-size: 14px; font-weight: 500; }
.nav__signin:hover { color: #fff; }
.nav__burger { display: none; width: 44px; height: 44px; border-radius: var(--r-btn); border: 1px solid rgb(255 255 255 / .3); background: transparent; color: #fff; font-size: 22px; cursor: pointer; align-items: center; justify-content: center; }

/* 1. Первый экран */
.hero {
  position: relative; overflow: hidden; color: #fff;
  padding: calc(var(--nav-h) + clamp(40px, 6vw, 72px)) 0 clamp(56px, 7vw, 88px);
  background:
    radial-gradient(55% 60% at 78% 42%, rgb(44 86 200 / .30), transparent 70%),
    radial-gradient(40% 45% at 92% 105%, rgb(120 140 190 / .16), transparent 70%),
    radial-gradient(30% 40% at 10% 0%, rgb(44 86 200 / .12), transparent 70%),
    var(--hero);
}
/* тёмная «поверхность», на которой стоит ноутбук */
.hero::after {
  content: ""; position: absolute; right: -10%; bottom: -30%; width: 70%; height: 60%;
  background: radial-gradient(closest-side, rgb(255 255 255 / .07), transparent);
  pointer-events: none;
}
.hero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 4.1vw, 3.45rem); line-height: 1.1; letter-spacing: -0.025em; max-width: 15.5ch; }
.hero h1 .accent { color: var(--blue-bright); }
.hero__lead { margin-top: 24px; font-size: clamp(1.02rem, 1.4vw, 1.15rem); color: var(--on-dark-muted); max-width: 40ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 36px; }
.hero__points { list-style: none; padding: 0; margin-top: 48px; display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 24px; }
.hero__points li { display: flex; gap: 10px; align-items: center; white-space: nowrap; font-size: 13px; line-height: 1.35; color: var(--on-dark-muted); }
.hero__points i { font-size: 24px; color: var(--blue-bright); flex: none; }
.hero__device { perspective: 2200px; }

/* Ноутбук и телефон (рамки на CSS, внутри настоящие экраны системы на демо-данных) */
.laptop__lid {
  position: relative; background: #0c0e13; border-radius: 18px 18px 8px 8px;
  padding: 2.4% 2.4% 3.2%;
  box-shadow: inset 0 0 0 1px #2c313c, 0 40px 80px -30px rgb(0 0 0 / .55);
}
.laptop__lid::before { content: ""; position: absolute; top: 1%; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: #2a2f3a; }
.laptop__lid img { border-radius: 4px; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }
.laptop__base {
  position: relative; height: 16px; width: 114%; margin-left: -7%;
  background: linear-gradient(#4b515d, #22262e 70%, #14171c);
  border-radius: 2px 2px 18px 18px / 2px 2px 10px 10px;
  box-shadow: 0 30px 50px -10px rgb(0 0 0 / .7);
}
.laptop__base::before { content: ""; position: absolute; left: 50%; top: 0; width: 16%; height: 6px; margin-left: -8%; background: #1a1d23; border-radius: 0 0 8px 8px; }
.laptop--hero { width: 112%; transform: rotateY(-16deg) rotateX(5deg) rotateZ(.5deg); transform-origin: left center; }

.phone {
  position: absolute; z-index: 2; background: #0c0e13; border-radius: 30px; padding: 8px;
  box-shadow: inset 0 0 0 1px #2c313c, 0 30px 60px -20px rgb(13 19 38 / .45);
}
.phone::before { content: ""; position: absolute; top: 15px; left: 50%; width: 26%; height: 9px; margin-left: -13%; border-radius: 9px; background: #0c0e13; z-index: 1; }
.phone img { border-radius: 23px; width: 100%; }

/* Шапка светлых разделов: заголовок слева, пояснение справа */
.split-head { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 24px 64px; align-items: end; margin-bottom: clamp(32px, 4vw, 48px); }
.split-head h2 { max-width: 24ch; }
.split-head__text { color: var(--muted); font-size: 16px; max-width: 46ch; justify-self: end; padding-bottom: 6px; }

/* 2. Проблемы */
.problems { background: var(--bg-soft); }
.pains { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.pain {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  min-height: 188px; padding: 20px; border-radius: var(--r-card);
  background: var(--card); border: 1px solid var(--line);
  box-shadow: 0 10px 30px -22px rgb(13 19 38 / .35);
}
.pain__icon { width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 20px; }
.pain__num { position: absolute; top: 20px; right: 20px; font-size: 22px; font-weight: 600; color: #d9dee8; letter-spacing: -0.02em; }
.pain p { font-size: 15px; font-weight: 500; line-height: 1.4; }
.pain--dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.pain--dark .pain__icon { background: #fff; color: var(--ink); }
.pain--dark .pain__num { color: rgb(255 255 255 / .5); }

/* 3. Решение: схема с VELLTRA в центре */
.solution { background: #fff; }
.solution__grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.solution h2 { max-width: 21ch; font-size: clamp(1.75rem, 2.6vw, 2.3rem); }
.solution__lead { margin: 20px 0 32px; color: var(--muted); max-width: 42ch; }
.hub { position: relative; aspect-ratio: 680 / 320; }
.hub__lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hub__lines path, .hub__ring { fill: none; stroke: #b8c0d2; stroke-width: 1.4; stroke-dasharray: 3 5; vector-effect: non-scaling-stroke; }
.hub__ring { stroke: #cbd2e0; }
.hub__dots circle { fill: var(--ink); }
.hub__core {
  position: absolute; left: 50%; top: 50%; width: 21%; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; background: var(--ink); display: grid; place-items: center;
  box-shadow: 0 0 0 10px rgb(11 16 32 / .05), 0 24px 50px -16px rgb(11 16 32 / .55);
}
.hub__core img { width: 66%; }
.hub__nodes { list-style: none; padding: 0; }
.node {
  position: absolute; width: 33.5%; transform: translateY(-50%);
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  background: var(--bg-soft); border: 1px solid #edf0f5; border-radius: var(--r-card);
  font-size: 13px; font-weight: 500; line-height: 1.3;
  box-shadow: 0 10px 24px -20px rgb(13 19 38 / .4);
}
.node__icon { flex: none; width: 40px; height: 40px; border-radius: 10px; background: var(--navy); color: #fff; display: grid; place-items: center; font-size: 20px; }
.node--l1, .node--l2, .node--l3 { left: 0; }
.node--r1, .node--r2, .node--r3 { right: 0; }
.node--l1, .node--r1 { top: 15.6%; }
.node--l2, .node--r2 { top: 50%; }
.node--l3, .node--r3 { top: 84.4%; }

/* 4. Возможности: вкладки */
.features { background: var(--bg-soft); position: relative; }
.tabs { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); overflow: hidden; box-shadow: 0 20px 50px -36px rgb(13 19 38 / .4); }
.tabs__list { display: flex; gap: 8px; padding: 0 24px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs__list::-webkit-scrollbar { display: none; }
.tabs__list button {
  position: relative; flex: none; height: 60px; padding: 0 16px; border: 0; background: none; cursor: pointer;
  font: 500 15px/1 var(--font); color: var(--muted); transition: color .2s;
}
.tabs__list button:hover { color: var(--text); }
.tabs__list button[aria-selected="true"] { color: var(--blue); font-weight: 600; }
.tabs__list button[aria-selected="true"]::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--blue); }
.panel { display: grid; grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr); gap: clamp(24px, 4vw, 56px); padding: clamp(28px, 4vw, 48px) clamp(24px, 4vw, 48px) 0; }
.panel[hidden] { display: none; }
.panel__text { padding-bottom: clamp(28px, 4vw, 48px); }
.panel__text p { margin: 14px 0 22px; color: var(--muted); max-width: 44ch; }
.checks { list-style: none; padding: 0; display: grid; gap: 10px; margin-bottom: 30px; }
.checks li { display: flex; gap: 12px; align-items: center; font-weight: 500; }
.checks li::before {
  content: ""; flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--blue);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3.2L15 7' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3.2L15 7' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}
/* устройства «выходят» из нижнего края карточки, как на макете */
.panel__devices { position: relative; align-self: end; padding-right: 13%; }
.panel__devices .laptop__lid { border-radius: 16px 16px 0 0; padding-bottom: 0; }
.panel__devices .laptop__lid img { border-radius: 4px 4px 0 0; aspect-ratio: 16 / 9.2; }
.panel__devices .phone { right: 0; bottom: -40px; width: 24%; }
.panel__devices--solo { padding-right: 0; }

/* 5. Заявка на демонстрацию */
.demo { padding: 0 16px 16px; background: var(--bg-soft); }
.demo__box {
  max-width: 1400px; margin: 0 auto; border-radius: var(--r-panel); color: #fff;
  padding: clamp(32px, 5vw, 64px) clamp(24px, 5vw, 64px);
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.2fr); gap: 32px clamp(32px, 4vw, 64px); align-items: center;
  background:
    radial-gradient(50% 80% at 85% 20%, rgb(44 86 200 / .25), transparent 70%),
    radial-gradient(40% 60% at 0% 100%, rgb(44 86 200 / .14), transparent 70%),
    var(--hero);
}
.demo__text h2 { color: #fff; max-width: 26ch; font-size: clamp(1.5rem, 2.2vw, 1.9rem); }
.demo__lead { margin-top: 18px; color: var(--on-dark-muted); max-width: 46ch; }
.form { display: grid; gap: 14px; }
.form__fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.field { display: grid; gap: 6px; align-content: start; }
.field input {
  height: 52px; width: 100%; padding: 0 16px; border-radius: var(--r-btn);
  border: 1px solid rgb(255 255 255 / .22); background: rgb(255 255 255 / .03); color: #fff; font: 400 15px var(--font);
  transition: border-color .2s, background-color .2s;
}
.field input::placeholder { color: rgb(255 255 255 / .6); }
.field input:hover { border-color: rgb(255 255 255 / .4); }
.field input:focus { outline: none; border-color: var(--blue-bright); background: rgb(255 255 255 / .06); }
.field input[aria-invalid="true"] { border-color: var(--error-on-dark); }
.field__error { color: var(--error-on-dark); font-size: 13px; }
.field__error:empty { display: none; }
.form__bottom { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; }
.consent { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--on-dark-muted); cursor: pointer; padding-top: 14px; }
.consent input { width: 18px; height: 18px; margin: 0; accent-color: var(--blue-bright); color-scheme: dark; cursor: pointer; }
.form__note { font-size: 14px; color: var(--on-dark-muted); }
.form__note:empty { display: none; }
.form__note.is-error { color: var(--error-on-dark); }
.form__note.is-ok { color: #9ee6b4; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Подвал */
.footer { background: var(--bg-soft); color: var(--muted); padding: 32px 0 40px; font-size: 14px; }
.footer__row { display: grid; grid-template-columns: auto 1fr auto; gap: 16px 48px; align-items: center; }
.footer__logo img { height: 24px; width: auto; }
.footer a { color: var(--text); }

/* Экран системы крупно */
.zoom { border: 0; padding: 0; background: transparent; max-width: 94vw; max-height: 92vh; overflow: visible; }
.zoom::backdrop { background: rgb(6 10 21 / .82); backdrop-filter: blur(4px); }
.zoom img { width: auto; max-width: min(1400px, 94vw); max-height: 88vh; border-radius: 12px; box-shadow: 0 30px 80px rgb(0 0 0 / .5); }
.zoom__close { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; font-size: 20px; cursor: pointer; display: grid; place-items: center; box-shadow: 0 6px 20px rgb(0 0 0 / .35); }

/* Адаптив */
@media (max-width: 1180px) {
  .pains { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nav__links { gap: 22px; }
}
@media (max-width: 1080px) {
  .nav__links { display: none; }
  .nav__burger { display: inline-flex; }
  .nav__actions { margin-left: auto; }
  .nav.is-open { background: var(--hero); }
  .nav.is-open .nav__links {
    display: flex; flex-direction: column; gap: 0; position: absolute; top: var(--nav-h); left: 0; right: 0;
    padding: 8px 24px 20px; background: var(--hero); border-top: 1px solid rgb(255 255 255 / .08);
    box-shadow: 0 24px 40px rgb(0 0 0 / .45);
  }
  .nav.is-open .nav__links a { padding: 14px 0; font-size: 16px; border-bottom: 1px solid rgb(255 255 255 / .06); }
  .nav.is-open .nav__links .nav__login { display: block; border-bottom: 0; color: var(--blue-bright); }
  .hero__grid, .solution__grid { grid-template-columns: 1fr; }
  .hero h1 { max-width: 16ch; }
  .laptop--hero { width: 100%; transform: rotateY(-8deg) rotateX(3deg); }
  .hub { max-width: 680px; }
  .panel { grid-template-columns: 1fr; }
  .panel__text { padding-bottom: 0; }
  .demo__box { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .split-head { grid-template-columns: 1fr; }
  .split-head__text { justify-self: start; }
  .hero__points { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pains { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pain { min-height: 168px; padding: 16px; gap: 28px; }
  .pain__num { top: 16px; right: 16px; font-size: 18px; }
  /* схема превращается в список: круг сверху, процессы плиткой */
  .hub { aspect-ratio: auto; display: grid; gap: 16px; }
  .hub__lines { display: none; }
  .hub__core { position: static; transform: none; width: 120px; margin: 0 auto 8px; }
  .hub__nodes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .node { position: static; width: auto; transform: none; }
  .form__fields { grid-template-columns: 1fr; }
  .footer__row { grid-template-columns: 1fr; }
  .nav__signin { display: none; }
}
@media (max-width: 520px) {
  .wrap { padding: 0 16px; }
  .nav__actions .btn--sm { display: none; }
  .hero__cta .btn { flex: 1 1 100%; }
  .hub__nodes { grid-template-columns: 1fr; }
  .tabs__list { padding: 0 8px; }
  .panel { padding: 24px 16px 0; }
  .panel__devices .phone { width: 30%; bottom: -24px; }
  .form__bottom .btn { width: 100%; }
  .demo { padding: 0 8px 8px; }
}

/* Появление при прокрутке: только transform/opacity, отключается при reduced motion */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.16, 1, .3, 1), transform .7s cubic-bezier(.16, 1, .3, 1); }
  .js .reveal.is-in { opacity: 1; transform: none; }
  .js .panel:not([hidden]) { animation: panel-in .45s cubic-bezier(.16, 1, .3, 1); }
  @keyframes panel-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
