/* Общее для страниц сайта (кроме главной, у неё пока всё внутри index.html): шрифт, токены, шапка, кнопки */

/* Onest из public/fonts репозитория (вариативный, 400–700) */
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/fonts/gNMKW3F-SZuj7xmb-HY6EQ.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/fonts/gNMKW3F-SZuj7xmf-HY.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Токены из src/styles/index.css */
:root {
  --brand-primary: #0F172A;
  --brand-primary-hov: #1E293B;
  --brand-primary-soft: #F1F5F9;
  --accent-indigo: #6366F1;
  --accent-indigo-dark: #4F46E5;
  --accent-indigo-soft: #EEF2FF;
  --accent-violet: #7C5CFC;
  --accent-amber: #F59E0B;
  --canvas: #ffffff;
  --canvas-dark: #001e2b;
  --surface: #f9fbfa;
  --hairline: #e1e5e8;
  --hairline-soft: #eceff1;
  --hairline-dark: #1c2d38;
  --ink: #001e2b;
  --nl-slate: #3d4f5b;
  --nl-stone: #7c8c9a;
  --on-dark: #ffffff;
  --on-dark-muted: #a8b3bc;
  --font-display: 'Onest', 'Golos Text', ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 44px; }   /* переход по якорю: плашка над заголовком секции не прячется под шапку */
/* плавно — только якоря внутри страницы: класс ставит site.js после загрузки. Переход с другой страницы иначе
   начинается сверху и секунду едет через всю страницу, а цель за это время успевает сдвинуться */
html.smooth { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-display); color: var(--ink); background: var(--canvas); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
svg.i { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--accent-indigo); outline-offset: 2px; }

/* ═══════════ ШАПКА ═══════════ */

.hdr { position: fixed; inset: 0 0 auto 0; z-index: 50; padding: 16px 24px 0; pointer-events: none; }
.hdr-card {
  position: relative; max-width: 1280px; margin: 0 auto; height: 64px;
  display: flex; align-items: center; gap: 40px; padding: 0 12px 0 18px;
  pointer-events: auto; color: var(--ink);
}
/* стекло отдельным слоем, как у oxylabs: blur не размывает текст карточки */
.hdr-glass {
  position: absolute; inset: 0; border-radius: 14px; pointer-events: none;
  background: rgba(255,255,255,0.6);
  border: 1px solid var(--hairline);
  -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
  transition: background-color .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.logo, .nav, .actions, .m-sheet { position: relative; }

.logo { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; }
.logo svg { width: 28px; height: 28px; display: block; }
.wordmark { font-size: 18px; line-height: 1; font-weight: 600; letter-spacing: -0.2px; white-space: nowrap; }
.pr-badge {
  display: inline-flex; align-items: center; height: 20px; padding: 0 7px; margin-left: 2px;
  border-radius: 32px; font-size: 11px; font-weight: 600; letter-spacing: .6px;
  background: var(--brand-primary); color: #fff;
  transition: background-color .3s ease, color .3s ease;
}

.nav { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; }
.nav-item {
  display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 10px;
  border-radius: 8px; font-size: 14px; font-weight: 500; line-height: 20px; white-space: nowrap;
  color: var(--ink); transition: background-color .15s ease, color .15s ease;
}
/* текущий раздел — то же состояние, что у открытого пункта меню на главной */
.nav-item:hover, .nav-item[aria-current], .nav-item[aria-expanded="true"] { background: rgba(15,23,42,0.05); }
.nav-item .chev { width: 14px; height: 14px; opacity: .55; transition: transform .2s ease; }
.nav-item[aria-expanded="true"] .chev { transform: rotate(180deg); }

.actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px;
  border-radius: 8px; font-size: 14px; font-weight: 500; line-height: 20px; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid #ebebed; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.btn-ghost:hover { border-color: #c1ccd6; }
.btn-solid { background: var(--brand-primary); color: #fff; border: 1px solid var(--brand-primary); }
.btn-solid:hover { background: var(--brand-primary-hov); border-color: var(--brand-primary-hov); }
.btn-solid .i { width: 14px; height: 14px; transition: transform .15s ease; }
.btn-solid:hover .i { transform: translateX(2px); }

.burger { display: none; width: 36px; height: 36px; border-radius: 8px; align-items: center; justify-content: center; }
.burger:hover { background: rgba(15,23,42,0.05); }
.burger svg { width: 20px; height: 20px; }
.burger .x { display: none; }

/* над тёмной секцией: тёмное стекло */
.hdr[data-theme="dark"] .hdr-card { color: var(--on-dark); }
.hdr[data-theme="dark"] .hdr-glass { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.12); box-shadow: inset 0 1px 0 rgba(255,255,255,0.06); }
.hdr[data-theme="dark"] .pr-badge { background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.8); }
.hdr[data-theme="dark"] .nav-item { color: rgba(255,255,255,0.78); }
.hdr[data-theme="dark"] .nav-item:hover,
.hdr[data-theme="dark"] .nav-item[aria-current],
.hdr[data-theme="dark"] .nav-item[aria-expanded="true"] { background: rgba(255,255,255,0.08); color: #fff; }
.hdr[data-theme="dark"] .btn-ghost { background: rgba(255,255,255,0.04); color: #fff; border-color: rgba(255,255,255,0.16); box-shadow: none; }
.hdr[data-theme="dark"] .btn-ghost:hover { border-color: rgba(255,255,255,0.4); }
.hdr[data-theme="dark"] .btn-solid { background: #fff; color: var(--brand-primary); border-color: #fff; }
.hdr[data-theme="dark"] .btn-solid:hover { background: #E2E8F0; border-color: #E2E8F0; }
.hdr[data-theme="dark"] .burger:hover { background: rgba(255,255,255,0.08); }

/* раскрывающееся меню — как на главной (собирает menu-src/build.py, стили — блок главной) */
/* ═══════════ MEGA MENU ═══════════ */

.mega {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 2;
  padding: 6px; border-radius: 14px;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.45);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 18px 40px -18px rgba(0,30,43,0.28);
  opacity: 0; transform: translateY(-4px); visibility: hidden;
  transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s,
              left .24s cubic-bezier(.2,.8,.2,1), width .24s cubic-bezier(.2,.8,.2,1), height .24s cubic-bezier(.2,.8,.2,1);
}
.hdr[data-theme="light"] .mega { border-color: #f0f0f1; }
.mega.open { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
.mega-inner { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 10px; background: #fff; border: 1px solid var(--hairline); }
.mega .panel { position: absolute; top: 0; left: 0; display: flex; opacity: 0; pointer-events: none; transition: opacity .16s ease; }
.mega .panel.active { opacity: 1; pointer-events: auto; }

.mega .panel-main { padding: 22px 28px 22px 22px; display: flex; flex-direction: column; gap: 14px; }
.mega .panel-label { font-size: 13px; font-weight: 500; color: var(--nl-stone); padding-left: 8px; }
.mega .grid { display: grid; grid-template-columns: repeat(2, 300px); gap: 2px 12px; }
.mega .grid.one { grid-template-columns: 320px; }
.mi { display: flex; align-items: flex-start; gap: 14px; padding: 8px; border-radius: 8px; transition: background-color .15s ease; }
.mi:hover { background: #f6f8f9; }
/* пиктограммы пунктов — точечная матрица 7×7, как в оглавлении /features; у решений — фото «дверей» со страницы /solution */
.mi-dots { width: 26px; height: 26px; flex-shrink: 0; margin-top: 1px; overflow: visible; }
.mi-dots circle { fill: #8a97a3; transition: fill .2s ease; }
.mi:hover .mi-dots circle { fill: var(--ink); }
.mi-pic { display: block; width: 56px; height: 56px; flex-shrink: 0; border-radius: 10px; object-fit: cover; background: var(--brand-primary-soft); }
.mega .grid.sol { grid-template-columns: repeat(2, 320px); gap: 6px 12px; }
.mi-sol { align-items: center; }
.m-all { display: flex; align-items: center; gap: 6px; padding: 10px 6px 4px; font-size: 14px; font-weight: 500; color: var(--accent-indigo-dark); } .m-all .i { width: 14px; height: 14px; }
.mi-t { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; line-height: 20px; color: var(--ink); }
.mi-d { font-size: 13px; line-height: 1.35; color: var(--nl-slate); margin-top: 2px; }
.ai-badge { display: inline-flex; align-items: center; height: 18px; padding: 0 7px; border-radius: 32px; font-size: 11px; font-weight: 600; background: var(--accent-indigo-soft); color: var(--accent-indigo-dark); }

.mega .panel-side { width: 240px; padding: 22px 22px 22px 28px; border-left: 1px solid var(--hairline-soft); display: flex; flex-direction: column; gap: 26px; }
.side-group { display: flex; flex-direction: column; gap: 10px; }
.side-group .panel-label { padding-left: 0; }
.side-link { font-size: 14px; font-weight: 500; color: var(--ink); display: inline-flex; align-items: center; gap: 6px; width: fit-content; }
.side-link:hover { color: var(--accent-indigo-dark); }
.side-link .i { width: 13px; height: 13px; opacity: 0; transform: translateX(-3px); transition: opacity .15s ease, transform .15s ease; }
.side-link:hover .i { opacity: 1; transform: none; }
/* значки магазинов в колонке «Мобильное приложение» */
.side-link.store { gap: 10px; }
.side-link .st { width: 28px; height: 28px; padding: 6px; flex-shrink: 0; border-radius: 8px; background: #fff; box-shadow: inset 0 0 0 1px var(--hairline); transition: box-shadow .15s ease; }
.side-link.store:hover .st { box-shadow: inset 0 0 0 1px #c1ccd6; }

.m-sheet { display: none; }

@media (max-width: 960px) {
  .hdr { padding: 12px 16px 0; }
  .hdr-card { gap: 8px; padding: 0 8px 0 14px; height: 60px; }
  .nav, .actions .btn-ghost, .mega { display: none; }
  .actions { margin-left: auto; gap: 4px; }
  .burger { display: inline-flex; }
  .btn-solid .i { display: none; }

  .hdr.menu-open .hdr-card { height: auto; flex-wrap: wrap; align-content: flex-start; color: var(--ink); }
  .hdr.menu-open .burger .x { display: block; }
  .hdr.menu-open .burger .bars { display: none; }
  /* открытое меню всегда светлое: на тёмной секции стекло 6% не читается */
  .hdr.menu-open .hdr-glass { background: rgba(255,255,255,0.94); border-color: var(--hairline); box-shadow: 0 24px 48px -20px rgba(0,30,43,0.35); }
  .hdr.menu-open .pr-badge { background: var(--brand-primary); color: #fff; }
  .hdr.menu-open .btn-solid { background: var(--brand-primary); color: #fff; border-color: var(--brand-primary); }
  .hdr.menu-open .btn-ghost { background: #fff; color: var(--ink); border-color: #ebebed; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
  .hdr.menu-open .actions .btn-solid { display: none; }
  .hdr.menu-open .burger:hover { background: rgba(15,23,42,0.05); }
  .hdr.menu-open .top-row { height: 60px; }

  .top-row { display: flex; align-items: center; width: 100%; gap: 8px; }
  .hdr.menu-open .m-sheet { display: flex; }
  .m-sheet { width: 100%; flex-direction: column; padding: 4px 0 14px; max-height: calc(100dvh - 96px); overflow-y: auto; }
  .m-link, .m-acc > button {
    display: flex; align-items: center; justify-content: space-between; width: 100%;
    height: 44px; padding: 0 6px; font-size: 15px; font-weight: 500; color: var(--ink); text-align: left;
    border-top: 1px solid var(--hairline-soft);
  }
  .m-acc > button .chev { width: 16px; height: 16px; opacity: .55; transition: transform .2s ease; }
  .m-acc > button[aria-expanded="true"] .chev { transform: rotate(180deg); }
  .m-acc-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .22s ease; }
  .m-acc-body > div { overflow: hidden; }
  .m-acc > button[aria-expanded="true"] + .m-acc-body { grid-template-rows: 1fr; }
  .m-acc-body .mi { padding: 7px 6px; gap: 12px; align-items: center; }
  .m-acc-body .mi-d { display: none; }
  .m-acc-body .mi-dots { width: 22px; height: 22px; margin: 0; }
  .m-acc-body .mi-pic { width: 36px; height: 36px; border-radius: 8px; }
  .m-acc-body > div > :last-child { margin-bottom: 8px; }
  .m-ctas { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-top: 14px; border-top: 1px solid var(--hairline-soft); }
  .m-ctas .btn { height: 44px; font-size: 15px; }
  .m-ctas .btn-solid { background: var(--brand-primary); color: #fff; }
}
@media (min-width: 961px) {
  .top-row { display: contents; }
}
@media (max-width: 400px) {
  .hdr-card { padding-left: 12px; }
  .wordmark { font-size: 17px; }
  .actions .btn-solid { padding: 0 11px; font-size: 13px; }
}

/* ═══════════ HERO — как на главной, без сцены «Сквозь облака» ═══════════ */

/* размеры как у oxylabs: блок со скруглением 26, отступ 24 от краёв, сверху под шапку 100 */
.hero { padding: 100px 24px 24px; }
.hero-box {
  position: relative; max-width: 1536px; margin: 0 auto; overflow: clip; isolation: isolate;
  border-radius: 26px; background: var(--brand-primary-soft) center bottom / cover no-repeat;
}
.hero-inner { position: relative; padding: 80px 32px; display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center; }

.hero-title { margin: 0; max-width: 900px; font-size: clamp(36px, 4.4vw, 48px); line-height: 1.3; font-weight: 500; color: var(--ink); }
.hero-sub { margin: 0; max-width: 640px; font-size: 18px; line-height: 28px; font-weight: 400; color: var(--ink); }
.hero-ctas { display: flex; justify-content: center; gap: 16px; }
.hero-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: 200px; height: 40px; padding: 0 10px; border-radius: 8px; border: 1px solid transparent;
  font-size: 14px; font-weight: 500; line-height: 20px; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease;
}
.hero-btn-solid { background: var(--brand-primary); color: #fff; }
.hero-btn-solid:hover { background: var(--brand-primary-hov); }
.hero-btn-white { background: #fff; color: var(--ink); gap: 8px; }
.hero-btn-white:hover { border-color: var(--hairline); }
@media (max-width: 960px) {
  .hero { padding: 96px 16px 16px; }
}
@media (max-width: 767px) {
  .hero-inner { padding: 64px 16px; }
  .hero-title { font-size: 36px; }
}
@media (max-width: 480px) {
  .hero-inner { padding: 48px 12px 16px; }
  .hero-title { font-size: 30px; line-height: 1.25; }
  .hero-title br { display: none; }   /* ручной перенос — под десктоп; на узком экране строка сама решает, где ломаться */
}
@media (max-width: 380px) {
  .hero-title { font-size: 27px; }
  .hero-sub { font-size: 16px; line-height: 25px; }
}
@media (max-width: 639px) {
  .hero-ctas { flex-direction: column; width: 100%; gap: 12px; }
  .hero-btn { width: 100%; height: 44px; }
}

/* ═══════════ ДЕМО-ВИДЖЕТ: стекло как у oxylabs, внутри — настоящий A-SCAN (widget/, собран из фронтенда) ═══════════ */

.gw { position: relative; width: 100%; max-width: 1080px; margin-top: 56px; text-align: left; }
/* одно стекло на «ушко» и панель; форму задаёт маска из JS — clip-path Chrome к размытию не применяет */
.gw-glass { position: absolute; inset: 0; pointer-events: none;
  background: rgba(255,255,255,0.4); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.gw-rim { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.gw-rim path { fill: none; stroke: var(--hairline); stroke-width: 1; }

.gw-ear { position: relative; display: inline-flex; padding: 10px 10px 0; }
.gw-tabs { display: inline-flex; padding: 3px; border-radius: 10px; background: rgba(255,255,255,0.5); }
.gw-tab { width: 120px; height: 30px; border-radius: 8px; font-size: 14px; font-weight: 500; color: #52525c;
  display: inline-flex; align-items: center; justify-content: center; transition: background-color .15s ease, color .15s ease, box-shadow .15s ease; }
.gw-tab:hover { color: var(--ink); }
.gw-tab[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px -1px rgba(0,0,0,.1); }

.gw-body { position: relative; padding: 10px; }
.gw-card { overflow: hidden; border-radius: 14px; background: rgba(255,255,255,0.5); }
.gw-frame { display: block; width: 100%; height: 600px; border: 0; background: transparent; }

@media (max-width: 767px) {
  .gw { margin-top: 16px; }
  .gw-ear { display: flex; }
  .gw-tabs { flex: 1; min-width: 0; }
  .gw-tab { width: auto; flex: 1 1 auto; min-width: 0; padding: 0 4px; font-size: 12px; }
  .gw-frame { height: 560px; }
  .gw { width: calc(100% + 16px); margin-left: -8px; margin-right: -8px; }
  .gw-ear { padding: 6px 6px 0; }
  .gw-body { padding: 6px; }
}


@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
  html, html.smooth { scroll-behavior: auto; }
}

/* скелетон живых экранов (iframe с виджетом), пока экран продукта не отрисовался */
.wf-box { position: relative; }
.wf-skel { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; gap: 12px; padding: 18px; background: rgba(255,255,255,.72); opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility 0s linear .35s; pointer-events: none; }
.wf-loading > .wf-skel { opacity: 1; visibility: visible; transition-delay: 0s; }
.wf-skel i { display: block; border-radius: 8px; background: linear-gradient(90deg, #eceefb 0%, #f6f6ff 40%, #eceefb 80%) 0 0 / 220% 100%; animation: wfShimmer 1.6s ease-in-out infinite; }
.wf-row { display: flex; gap: 8px; }
.wf-row i { height: 28px; width: 92px; border-radius: 999px; }
.wf-row i:first-child { width: 120px; }
.wf-card { display: grid; grid-template-columns: 32px 1fr; gap: 6px 12px; padding: 14px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px #eef0f4; }
.wf-card i:first-child { width: 32px; height: 32px; border-radius: 50%; grid-row: span 3; }
.wf-card i { height: 10px; }
.wf-card i:nth-child(2) { width: 62%; height: 12px; }
.wf-card i:nth-child(3) { width: 92%; }
.wf-card i:nth-child(4) { width: 48%; }
@keyframes wfShimmer { from { background-position: 100% 0; }
to { background-position: -120% 0; }
}
@media (prefers-reduced-motion: reduce) { .wf-skel i { animation: none; }
}
@media (max-width: 767px) { .wf-skel { padding: 12px; gap: 10px; }
.wf-row i { width: 72px; }
.wf-row i:first-child { width: 96px; }
}
