/* BrainWave Studio — оформление сайта (стиль A, Velaris night) */

/* Шрифт Manrope лежит рядом с сайтом (assets/fonts), лицензия SIL OFL 1.1 — в файле OFL.txt там же. */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../assets/fonts/manrope-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../assets/fonts/manrope-latin.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;
}

:root {
  --bg: #0c0e14;
  --bg2: #10131b;
  --card: #141823;
  --line: #232838;
  --text: #eceef5;
  --dim: #a3a9ba;
  --faint: #6f7689;
  --violet: #8b7cff;
  --violet-hi: #a59bff;
  --gold: #ffcf5c;
  --radius: 22px;
  --font: "Manrope", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
  --display: "Manrope", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Основа ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.6 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--violet); color: #0c0e14; }
section[id], .hero { scroll-margin-top: 84px; }

.wrap { width: min(1240px, 100% - 48px); margin-inline: auto; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--gold); color: #14151a; padding: 10px 16px; border-radius: 10px; font-weight: 600; transition: top .2s; }
.skip:focus { top: 16px; }

/* ---------- Кнопки, метки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 15px 26px; border-radius: 999px; font-weight: 600; font-size: 16px; white-space: nowrap; transition: transform .3s var(--ease), background .25s, border-color .25s, color .25s; }
.btn span { transition: transform .3s var(--ease); }
.btn:hover span { transform: translateX(4px); }
.btn-primary { background: var(--violet); color: #0c0e14; }
.btn-primary:hover { background: var(--violet-hi); transform: translateY(-2px); }
.btn-ghost { border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--violet); }

.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--dim); letter-spacing: .1em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 0 rgba(255, 207, 92, .5); animation: pulse 2.6s ease-out infinite; }
@keyframes pulse { to { box-shadow: 0 0 0 12px rgba(255, 207, 92, 0); } }
.kicker { font: 500 13px var(--mono); color: var(--gold); letter-spacing: .04em; margin-bottom: 16px; }
.num { font: 500 13px var(--mono); color: var(--gold); }
.tag { display: inline-block; font-size: 13px; color: var(--dim); border: 1px solid var(--line); padding: 5px 12px; border-radius: 999px; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { font-size: 13px; color: var(--dim); background: rgba(255, 255, 255, .04); border: 1px solid var(--line); padding: 4px 11px; border-radius: 999px; }
.link-arrow { display: inline-flex; gap: 8px; font-weight: 600; color: var(--violet-hi); border-bottom: 1px solid transparent; transition: border-color .2s; }
.link-arrow:hover { border-color: currentColor; }

/* ---------- Шапка ---------- */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 40; padding: 14px 0; }
/* Фон шапки — плотный, без размытия: размытие заметно тормозит слабые устройства */
.site-header::before { content: ""; position: absolute; inset: 0; z-index: -1; border-bottom: 1px solid transparent; transition: background .3s, border-color .3s; }
.site-header.scrolled::before { background: var(--bg); border-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.brand img { width: 44px; height: 44px; border-radius: 50%; }
.menu { margin-left: auto; display: flex; gap: 30px; font-size: 15px; color: var(--dim); }
.menu a { position: relative; padding: 6px 0; transition: color .2s; }
.menu a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: 0 50%; transition: transform .35s var(--ease); }
.menu a:hover, .menu a.active { color: var(--text); }
.menu a.active::after { transform: scaleX(1); }
.menu-cta { display: none; }
.header-cta { padding: 11px 20px; font-size: 14px; }
.burger { display: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); position: relative; }
.burger span { position: absolute; left: 13px; right: 13px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .3s var(--ease), top .3s var(--ease); }
.burger span:first-child { top: 17px; }
.burger span:last-child { top: 25px; }
.menu-open .burger span:first-child { top: 21px; transform: rotate(45deg); }
.menu-open .burger span:last-child { top: 21px; transform: rotate(-45deg); }

/* ---------- Первый экран ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; padding: 140px 0 280px;
  background: radial-gradient(70% 60% at 82% 4%, rgba(139, 124, 255, .2), transparent 70%); }
.hero-wave { position: absolute; left: 0; bottom: 0; width: 100%; height: 46%; pointer-events: none; display: block; }
.hero .wrap { position: relative; z-index: 1; }
.hero-title { font: 600 clamp(40px, 6.9vw, 100px)/1.02 var(--display); letter-spacing: -.035em; margin: 22px 0 28px; text-wrap: balance; }
.hero-title em { font-style: normal; color: var(--gold); }
.hero-title .w { display: inline-block; overflow: hidden; vertical-align: top; padding: .06em .04em .14em 0; margin-bottom: -.14em; }
.hero-title .w > span { display: inline-block; }
.js .hero-title .w > span { transform: translateY(115%); transition: transform 1.1s var(--ease); transition-delay: calc(var(--i) * 80ms + 120ms); }
.js.loaded .hero-title .w > span { transform: none; }
.lead { font-size: clamp(17px, 1.5vw, 21px); color: var(--dim); max-width: 52ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.scroll-hint { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.scroll-hint span { width: 1px; height: 34px; background: linear-gradient(var(--gold), transparent); transform-origin: 50% 0; animation: drip 2.2s var(--ease) infinite; }
@keyframes drip { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- Бегущая строка ---------- */
.ticker { overflow: hidden; border-block: 1px solid var(--line); padding: 20px 0; background: var(--bg2); }
.ticker-track { display: flex; align-items: center; gap: 36px; width: max-content; animation: ticker 48s linear infinite; font: 600 clamp(18px, 2vw, 26px) var(--display); letter-spacing: -.01em; white-space: nowrap; }
.ticker-track i { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); flex: none; }
/* Строка движется, только пока целиком видна на экране (см. site.js) — иначе зря нагружает устройство */
.js .ticker-track { animation-play-state: paused; }
.js .ticker.run .ticker-track { animation-play-state: running; }
.js .ticker.run:hover .ticker-track { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Разделы ---------- */
.section { padding: clamp(80px, 11vw, 160px) 0 0; }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-bottom: 52px; flex-wrap: wrap; }
h2 { font: 600 clamp(32px, 4.8vw, 68px)/1.05 var(--display); letter-spacing: -.03em; }
h2 em { font-style: normal; color: var(--gold); }
.sec-text { max-width: 42ch; color: var(--dim); }

/* Подсветка, которая идёт за курсором */
.spot { position: relative; overflow: hidden; }
.spot::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .4s; background: radial-gradient(460px circle at var(--mx, 50%) var(--my, 0%), rgba(139, 124, 255, .17), transparent 62%); }
.spot:hover::before { opacity: 1; }
.spot > * { position: relative; }

/* ---------- Услуги ---------- */
.grid-services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; min-height: 290px; display: flex; flex-direction: column; transition: transform .45s var(--ease), border-color .35s; }
.card:hover { transform: translateY(-6px); border-color: rgba(139, 124, 255, .7); }
.card h3 { font: 600 26px/1.15 var(--display); letter-spacing: -.02em; margin: 44px 0 10px; }
.card p { color: var(--dim); font-size: 15.5px; margin-bottom: 22px; }
.card .chips { margin-top: auto; }

/* ---------- Работы ---------- */
.case { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: 28px; transition: border-color .35s; }
.case:hover { border-color: rgba(139, 124, 255, .7); }
.case-info { padding: clamp(28px, 4vw, 52px); display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.case-info h3 { display: flex; align-items: center; gap: 16px; font: 600 clamp(34px, 4vw, 56px)/1 var(--display); letter-spacing: -.03em; }
.case-info h3 img { width: 56px; height: 56px; border-radius: 14px; }
.case-info p { color: var(--dim); max-width: 46ch; }
.case-info .link-arrow { margin-top: auto; padding-top: 8px; }
.case-visual { padding: clamp(20px, 3vw, 40px); display: grid; place-items: center; background: radial-gradient(70% 80% at 60% 40%, rgba(139, 124, 255, .22), transparent 70%); border-left: 1px solid var(--line); border-radius: 0 28px 28px 0; }

.mock { width: 100%; max-width: 520px; border-radius: 16px; border: 1px solid #2c3246; background: #0e1018; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); overflow: hidden; transition: transform .8s var(--ease); }
.case:hover .mock { transform: translateY(-6px) scale(1.015); }
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 11px 14px; border-bottom: 1px solid #222739; font-size: 12px; color: var(--faint); }
.mock-bar i { width: 9px; height: 9px; border-radius: 50%; background: #2c3246; }
.mock-bar span { margin-left: 8px; }
.mock-body { display: grid; grid-template-columns: 96px 1fr; min-height: 250px; }
.mock-side { border-right: 1px solid #222739; padding: 14px 12px; display: grid; gap: 9px; align-content: start; }
.mock-side b { height: 9px; border-radius: 5px; background: #1e2333; }
.mock-side b:first-child { background: var(--violet); opacity: .7; width: 70%; }
.mock-side b:nth-child(3) { width: 80%; }
.mock-side b:nth-child(5) { width: 55%; }
.mock-chat { padding: 16px; display: flex; flex-direction: column; gap: 10px; position: relative; }
.mock-chat .q { align-self: flex-end; background: var(--violet); color: #0c0e14; font-size: 13px; font-weight: 600; padding: 8px 12px; border-radius: 12px 12px 3px 12px; }
.mock-chat .a { align-self: flex-start; width: 72%; background: #171b28; padding: 12px; border-radius: 12px 12px 12px 3px; display: grid; gap: 7px; }
.mock-chat .a span { height: 7px; border-radius: 4px; background: #2a3044; }
.mock-chat .a .short { width: 55%; }
.orb { align-self: center; margin-top: auto; width: 42px; height: 42px; border-radius: 50%; border: 3px solid var(--violet); position: relative; }
.orb::before, .orb::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 1px solid var(--violet); animation: ring 3.6s ease-out infinite; }
.orb::after { animation-delay: 1.8s; }
@keyframes ring { from { transform: scale(1); opacity: .7; } to { transform: scale(2.4); opacity: 0; } }

.works-row { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; margin-top: 16px; }
.work { background: var(--card); border: 1px solid var(--line); border-radius: 28px; padding: clamp(24px, 3vw, 36px); min-height: 360px; display: flex; flex-direction: column; justify-content: space-between; gap: 28px; transition: transform .45s var(--ease), border-color .35s; }
.work:hover { transform: translateY(-6px); border-color: rgba(139, 124, 255, .7); }
.work-info { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.work-info h3 { font: 600 clamp(28px, 3vw, 40px)/1.05 var(--display); letter-spacing: -.025em; }
.work-info p { color: var(--dim); max-width: 40ch; }
.bubbles { display: grid; gap: 10px; }
.bubbles p { justify-self: start; max-width: 80%; padding: 11px 16px; border-radius: 16px 16px 16px 4px; background: #1c2130; font-size: 15px; }
.bubbles .me { justify-self: end; border-radius: 16px 16px 4px 16px; background: var(--gold); color: #1b1608; font-weight: 600; }
.work-next { border-style: dashed; background: transparent; }
.work-next:hover { border-style: solid; border-color: var(--gold); }
.plus { width: 64px; height: 64px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font-size: 30px; font-weight: 300; color: var(--gold); transition: transform .6s var(--ease), background .3s, color .3s; }
.work-next:hover .plus { transform: rotate(90deg); background: var(--gold); color: #14151a; }

/* ---------- Процесс ---------- */
.process { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.process-head { position: sticky; top: 120px; display: flex; flex-direction: column; align-items: flex-start; }
.process-head .sec-text { margin: 22px 0 28px; }
.steps li { display: grid; grid-template-columns: 56px 1fr; gap: 20px; padding: 30px 0; border-top: 1px solid var(--line); transition: padding .4s var(--ease), border-color .3s; }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li:hover { padding-left: 14px; border-top-color: var(--violet); }
.steps .num { padding-top: 9px; }
.steps h3 { font: 600 clamp(22px, 2.4vw, 32px)/1.15 var(--display); letter-spacing: -.02em; margin-bottom: 8px; }
.steps p { color: var(--dim); max-width: 50ch; }

/* ---------- Подход ---------- */
.principles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.principle { border-top: 1px solid var(--line); padding-top: 22px; position: relative; }
.principle::before { content: ""; position: absolute; top: -4px; left: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.principle h3 { font: 600 21px/1.2 var(--display); letter-spacing: -.01em; margin-bottom: 8px; }
.principle p { color: var(--dim); font-size: 15.5px; }

/* ---------- Контакты ---------- */
.cta { border-radius: 36px; padding: clamp(36px, 7vw, 100px); border: 1px solid var(--line); background: radial-gradient(80% 130% at 100% 0%, rgba(139, 124, 255, .38), transparent 60%), radial-gradient(60% 90% at 0% 100%, rgba(255, 207, 92, .08), transparent 70%), var(--card); }
.cta h2 { font-size: clamp(38px, 6.4vw, 96px); margin-bottom: 20px; }

/* ---------- Подвал ---------- */
.site-footer { padding: 64px 0 40px; margin-top: clamp(80px, 11vw, 160px); border-top: 1px solid var(--line); }
.site-footer .wrap { display: flex; align-items: center; gap: 24px 40px; flex-wrap: wrap; }
.site-footer .brand img { width: 56px; height: 56px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 26px; margin-left: auto; color: var(--dim); font-size: 15px; }
.site-footer nav a:hover { color: var(--text); }
.copy { width: 100%; color: var(--faint); font-size: 14px; }

/* ---------- Появление блоков ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.js [data-reveal].in { opacity: 1; transform: none; }
/* у карточек после появления — быстрый отклик на наведение */
.js .card.in, .js .work.in { transition: opacity .9s var(--ease), transform .45s var(--ease), border-color .35s; transition-delay: 0s; }

/* ---------- Планшет и телефон ---------- */
@media (max-width: 1020px) {
  .grid-services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case { grid-template-columns: 1fr; }
  .case-visual { border-left: 0; border-top: 1px solid var(--line); border-radius: 0 0 28px 28px; }
}
@media (max-width: 860px) {
  .header-cta { display: none; }
  .burger { display: block; margin-left: auto; }
  .menu { position: fixed; inset: 0; z-index: -2; margin: 0; padding: 110px 24px 40px; background: var(--bg); flex-direction: column; gap: 4px; font: 600 clamp(30px, 9vw, 44px)/1.2 var(--display); letter-spacing: -.02em; color: var(--text); opacity: 0; visibility: hidden; transition: opacity .35s, visibility .35s; overflow-y: auto; }
  .menu a { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .menu a::after { display: none; }
  .menu .menu-cta { display: inline-flex; margin-top: 24px; border: 0; align-self: flex-start; background: var(--violet); color: #0c0e14; font: 600 17px var(--font); letter-spacing: 0; padding: 15px 26px; border-radius: 999px; }
  .menu-open .menu { opacity: 1; visibility: visible; }
  .menu-open { overflow: hidden; }
  .hero { padding: 120px 0 250px; }
  .hero-wave { height: 36%; }
  .works-row { grid-template-columns: 1fr; }
  .process { grid-template-columns: 1fr; }
  .process-head { position: static; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { width: min(1240px, 100% - 36px); }
  .grid-services, .principles { grid-template-columns: 1fr; }
  .card { min-height: 0; }
  .card h3 { margin-top: 28px; }
  .mock-body { grid-template-columns: 64px 1fr; }
  .steps li { grid-template-columns: 40px 1fr; gap: 12px; }
  .brand { font-size: 15px; }
  .brand img { width: 40px; height: 40px; }
  .site-footer nav { margin-left: 0; }
  .actions .btn { flex: 1 1 auto; }
}

/* ---------- Спокойный режим: без движения ---------- */
/* Спокойный режим: в системе посетителя выключены анимации (класс calm ставит скрипт в начале страницы). */
html.calm { scroll-behavior: auto; }
.calm *, .calm *::before, .calm *::after { animation: none !important; }
.calm.js [data-reveal], .calm.js .hero-title .w > span { opacity: 1; transform: none; transition: none; }
/* То же самое, если скрипты не работают. */
@media (prefers-reduced-motion: reduce) {
  html:not(.js) { scroll-behavior: auto; }
  html:not(.js) *, html:not(.js) *::before, html:not(.js) *::after { animation: none !important; }
}
