/* PRISM — тихая графитовая база, спектр только в призме и в подвале */
:root {
  --bg: #0b0b0e;
  --surface: #141418;
  --raised: #1c1c21;
  --line: rgba(237, 237, 240, .1);
  --line-strong: rgba(237, 237, 240, .16);
  --text: #ededf0;
  --text-2: #b8b8c2;
  --text-3: #868691;
  --accent: #5b9bff;
  --ok: #46b97c;
  --ray-1: #6c4dff;
  --ray-2: #2e7cff;
  --ray-3: #00d4ff;

  --sans: "Geologica", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  --pad: 32px;
  --max: 1280px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --fast: 160ms;
  --slow: 640ms;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--sans);
  font-feature-settings: "tnum" 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
::selection { background: rgba(91, 155, 255, .32); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: calc(var(--max) + var(--pad) * 2); margin: 0 auto; padding: 0 var(--pad); }
.mono { font-family: var(--mono); font-size: 13px; line-height: 1.5; color: var(--text-3); font-variant-numeric: tabular-nums; }
.icon { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 24px; border-radius: 10px;
  font: 500 15px/1 var(--sans); white-space: nowrap;
  border: 1px solid transparent;
  transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease), color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--text); color: var(--bg); }
.btn--primary:hover { background: #ffffff; }
.btn--quiet { border-color: var(--line-strong); color: var(--text); }
.btn--quiet:hover { background: var(--raised); }
.btn--sm { height: 36px; padding: 0 16px; border-radius: 8px; font-size: 14px; }

/* ---------- Шапка ---------- */
.top {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.top__in { display: flex; align-items: center; height: 64px; gap: 32px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; letter-spacing: .02em; }
.logo svg { width: 28px; height: 28px; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { padding: 8px 12px; border-radius: 8px; font-size: 14px; color: var(--text-2); transition: color var(--fast) var(--ease), background-color var(--fast) var(--ease); }
.nav a:hover { color: var(--text); background: var(--raised); }
.burger { display: none; margin-left: auto; height: 36px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-strong); background: none; color: var(--text); font: 500 14px/1 var(--sans); align-items: center; gap: 8px; cursor: pointer; }
.mmenu { display: none; }

/* ---------- Первый экран ---------- */
.hero { padding: 104px 0 0; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 32px 64px; align-items: end; }
.hero h1 {
  font-weight: 500; font-size: clamp(40px, 5.2vw, 76px); line-height: 1.04; letter-spacing: -.028em;
  max-width: 20ch; text-wrap: balance;
}
.hero__lede { margin-top: 28px; max-width: 34em; font-size: 19px; line-height: 1.6; color: var(--text-2); text-wrap: pretty; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.facts { display: grid; gap: 0; border-top: 1px solid var(--line); }
.facts > div { display: grid; grid-template-columns: 88px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-family: var(--mono); font-size: 13px; line-height: 24px; color: var(--text-3); }
.facts dd { font-size: 15px; line-height: 24px; color: var(--text); display: flex; align-items: center; gap: 10px; }

/* Луч через призму — подпись сайта */
.beam { display: flex; align-items: center; margin-top: 72px; height: 56px; }
.beam__in { flex: 1; height: 1px; background: rgba(237, 237, 240, .5); transform-origin: left; }
.beam svg { width: 200px; height: 56px; flex: none; overflow: visible; }
.beam__prism { fill: var(--bg); stroke: rgba(237, 237, 240, .72); stroke-width: 1.5; stroke-linejoin: round; }
.beam__ray { fill: none; stroke-width: 1.5; stroke-linecap: round; }

/* ---------- Секции ---------- */
.sec { padding: 128px 0 0; }
.sec__head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px 64px; align-items: end; margin-bottom: 56px; }
.sec h2 { font-weight: 500; font-size: clamp(32px, 3.4vw, 48px); line-height: 1.1; letter-spacing: -.022em; text-wrap: balance; }
.sec__sub { max-width: 36em; color: var(--text-2); font-size: 17px; }

/* Работы */
#works.sec { padding-top: 48px; }
.works { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.work {
  display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  transition: border-color var(--fast) var(--ease);
}
.work:hover { border-color: var(--line-strong); }
.work__shot { position: relative; border-bottom: 1px solid var(--line); background: var(--raised); }
.work__shot img { width: 100%; height: auto; }
.work__live {
  position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 8px;
  height: 28px; padding: 0 12px; border-radius: 8px;
  background: rgba(11, 11, 14, .86); border: 1px solid var(--line-strong);
  font: 400 12px/1 var(--mono); color: var(--text);
}
.work__live .dot { width: 6px; height: 6px; }
.work__meta { padding: 24px; display: grid; gap: 12px; }
.work__row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.work h3 { font-weight: 500; font-size: 22px; line-height: 1.3; letter-spacing: -.01em; }
.work__note { color: var(--text-2); font-size: 15px; line-height: 1.6; max-width: 62ch; }
.work__go { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 14px; color: var(--text); }
.work__go .icon { color: var(--text-3); transition: color var(--fast) var(--ease), transform var(--fast) var(--ease); }
.work:hover .work__go .icon { color: var(--accent); transform: translate(2px, -2px); }

/* Услуги — прайс */
.price-list { border-top: 1px solid var(--line); }
.price-row {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr) minmax(0, 2fr); gap: 16px 48px;
  padding: 28px 0; border-bottom: 1px solid var(--line); align-items: baseline;
}
.price-row h3 { font-weight: 500; font-size: 20px; line-height: 1.35; }
.price-row p { color: var(--text-2); font-size: 16px; }
.price-row .price { justify-self: end; font: 500 18px/1.35 var(--sans); color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.price-row .price small { font-size: 14px; font-weight: 400; color: var(--text-3); }

/* Процесс — шаги на одной линии */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.step { position: relative; padding: 32px 32px 0 0; border-top: 1px solid var(--line-strong); }
.step::before { content: ""; position: absolute; top: -4px; left: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--bg); border: 1px solid var(--text-2); }
.step .mono { display: block; margin-bottom: 12px; }
.step h3 { font-weight: 500; font-size: 20px; line-height: 1.35; margin-bottom: 8px; }
.step p { color: var(--text-2); font-size: 16px; }

/* Принципы */
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.principle { padding: 40px 32px 40px 0; }
.principle + .principle { padding-left: 32px; border-left: 1px solid var(--line); }
.principle h3 { font-weight: 500; font-size: 24px; line-height: 1.25; letter-spacing: -.015em; margin-bottom: 16px; text-wrap: balance; }
.principle p { color: var(--text-2); font-size: 16px; }

/* Вопросы */
.faq { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 64px; align-items: start; }
.faq__list { border-top: 1px solid var(--line); }
.qa { border-bottom: 1px solid var(--line); }
.qa summary {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 24px 0; cursor: pointer; list-style: none;
  font-weight: 500; font-size: 18px; line-height: 1.4;
  transition: color var(--fast) var(--ease);
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary:hover { color: #fff; }
.qa summary .icon { width: 20px; height: 20px; color: var(--text-3); transition: transform var(--fast) var(--ease), color var(--fast) var(--ease); }
.qa[open] summary .icon { transform: rotate(45deg); color: var(--accent); }
.qa__body { padding: 0 48px 28px 0; color: var(--text-2); font-size: 16px; max-width: 64ch; }
.ask { position: sticky; top: 96px; padding: 28px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.ask h3 { font-weight: 500; font-size: 22px; line-height: 1.3; margin-bottom: 12px; }
.ask p { color: var(--text-2); font-size: 15px; }
.ask .btn { width: 100%; margin-top: 24px; }
.ask .mono { margin-top: 16px; text-align: center; }

/* Обо мне */
.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px 64px; }
.about__bio p { font-size: 19px; line-height: 1.6; color: var(--text); max-width: 36em; }
.about__bio p + p { margin-top: 20px; color: var(--text-2); }
.stack { margin-top: 48px; border-top: 1px solid var(--line); }
.stack > div { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.stack dt { font-family: var(--mono); font-size: 13px; line-height: 24px; color: var(--text-3); }
.stack dd { font-size: 15px; line-height: 24px; color: var(--text-2); }

/* Контакт */
.contact { padding: 160px 0 128px; }
.contact h2 { font-weight: 500; font-size: clamp(40px, 5.2vw, 76px); line-height: 1.04; letter-spacing: -.028em; }
.contact__row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; margin-top: 40px; }
.contact__links { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 15px; color: var(--text-2); }
.contact__links a { transition: color var(--fast) var(--ease); }
.contact__links a:hover { color: var(--text); }
.contact__links b { font-weight: 400; color: var(--text-3); font-family: var(--mono); font-size: 13px; margin-right: 6px; }

/* Подвал */
.foot { border-top: 1px solid var(--line); }
.foot__cols { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 3fr) minmax(0, 3fr); gap: 32px 64px; padding: 64px 0 48px; }
.foot__brand { font-weight: 600; font-size: 16px; letter-spacing: .02em; margin-bottom: 12px; }
.foot__about { color: var(--text-2); font-size: 15px; max-width: 34em; }
.foot__status { display: inline-flex; align-items: center; gap: 10px; margin-top: 20px; font-size: 14px; color: var(--text-2); }
.foot__col h3 { font: 400 13px/1.5 var(--mono); color: var(--text-3); margin-bottom: 16px; }
.foot__col a, .foot__col p { display: block; font-size: 15px; line-height: 1.6; padding: 4px 0; color: var(--text-2); transition: color var(--fast) var(--ease); }
.foot__col a:hover { color: var(--text); }
.foot__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 0; border-top: 1px solid var(--line); }
.foot__row a { color: var(--text-2); transition: color var(--fast) var(--ease); }
.foot__row a:hover { color: var(--text); }
.foot__up { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.foot__wrap { position: relative; height: clamp(132px, 22.2vw, 460px); overflow: hidden; background: var(--bg); touch-action: pan-y; }
.foot__wrap canvas { display: block; width: 100%; height: 100%; }
.foot__fallback { height: 100%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 22vw; line-height: .8; letter-spacing: -.02em; color: var(--raised); }

/* ---------- Появление: одно, только первый экран ---------- */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise var(--slow) var(--ease) both; }
  .rise--2 { animation-delay: 80ms; }
  .rise--3 { animation-delay: 160ms; }
  .rise--4 { animation-delay: 240ms; }
  @keyframes rise { from { transform: translateY(12px); } to { transform: none; } }
  .beam__in { animation: beam 900ms var(--ease) 200ms both; }
  @keyframes beam { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  .beam__ray { stroke-dasharray: 120; animation: ray 700ms var(--ease) 1000ms both; }
  @keyframes ray { from { stroke-dashoffset: 120; } to { stroke-dashoffset: 0; } }
}

/* ---------- Планшет ---------- */
@media (max-width: 1024px) {
  .hero__grid, .sec__head, .faq, .about { grid-template-columns: 1fr; }
  .hero__grid { gap: 56px; }
  .facts { max-width: 520px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 48px; }
  .step { padding-right: 24px; }
  .ask { position: static; }
  .foot__cols { grid-template-columns: 1fr 1fr; }
  .foot__cols > :first-child { grid-column: 1 / -1; }
}

/* ---------- Телефон ---------- */
@media (max-width: 760px) {
  :root { --pad: 20px; }
  body { font-size: 16px; }
  .nav, .top .btn { display: none; }
  .burger { display: inline-flex; }
  .mmenu { display: block; position: fixed; inset: 64px 0 auto; z-index: 49; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px var(--pad) 24px; opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity var(--fast) var(--ease), transform var(--fast) var(--ease); }
  .mmenu.open { opacity: 1; transform: none; pointer-events: auto; }
  .mmenu a:not(.btn) { display: block; padding: 12px 0; font-size: 18px; border-bottom: 1px solid var(--line); }
  .mmenu .btn { width: 100%; margin-top: 20px; }
  .hero { padding-top: 64px; }
  .hero h1 { font-size: 40px; }
  .hero__lede { font-size: 17px; margin-top: 20px; }
  .hero__cta { margin-top: 32px; }
  .hero__cta .btn { flex: 1 1 100%; }
  .beam { margin-top: 64px; }
  .beam svg { width: 136px; }
  .sec { padding-top: 96px; }
  .sec__head { margin-bottom: 40px; }
  .works { grid-template-columns: 1fr; }
  .work__meta { padding: 20px; }
  .price-row { grid-template-columns: 1fr auto; gap: 8px 16px; padding: 24px 0; }
  .price-row p { grid-column: 1 / -1; grid-row: 2; }
  .price-row .price { grid-column: 2; grid-row: 1; }
  .steps { grid-template-columns: 1fr; gap: 40px; }
  .step { padding-right: 0; }
  .principles { grid-template-columns: 1fr; }
  .principle { padding: 32px 0; }
  .principle + .principle { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .qa summary { font-size: 17px; padding: 20px 0; }
  .qa__body { padding-right: 0; }
  .about__bio p { font-size: 17px; }
  .stack > div, .facts > div { grid-template-columns: 1fr; gap: 4px; }
  .contact { padding: 112px 0 96px; }
  .contact h2 { font-size: 40px; }
  .contact__row .btn { width: 100%; }
  .foot__cols { grid-template-columns: 1fr; padding-top: 48px; }
  .foot__row { flex-direction: column; align-items: flex-start; }
}

/* ================= Живой слой: призма, слово, появление ================= */
.nowrap { white-space: nowrap; }
.hero { padding-top: 80px; }
.hero__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; gap: 32px 48px; }
.hero h1 { max-width: none; }

.spectrum { position: relative; margin-right: calc(var(--pad) * -1); }
.spectrum svg { width: 100%; height: auto; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14%, #000 88%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 14%, #000 88%, transparent 100%); }
.pulse { stroke-dasharray: 36 900; animation: pulse 2.6s linear infinite; }
#pulses line { stroke-dasharray: 28 900; animation: pulse 2.6s linear infinite; animation-delay: 1.1s; }
@keyframes pulse { from { stroke-dashoffset: 36; } to { stroke-dashoffset: -900; } }

.facts { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 56px; border-bottom: 1px solid var(--line); }
.facts > div { grid-template-columns: 1fr; gap: 4px; padding: 20px 24px 20px 0; border-bottom: 0; }
.facts > div + div { padding-left: 24px; border-left: 1px solid var(--line); }
#works.sec { padding-top: 96px; }

/* Появление при прокрутке */
@media (prefers-reduced-motion: no-preference) {
  html.js [data-r] { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
  html.js [data-r].in { opacity: 1; transform: none; }
}

/* Процесс: линия загорается спектром */
.steps { position: relative; list-style: none; margin: 0; padding: 0; }
.steps::before {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px; z-index: 1;
  background: linear-gradient(90deg, #f4f4f6, #8b3cff 22%, #2e8cff 50%, #00cbf5 78%, #19e6c8);
  transform: scaleX(0); transform-origin: left; transition: transform 1600ms var(--ease);
}
.steps.lit::before { transform: scaleX(1); }
.step::before { z-index: 2; transition: background-color 400ms var(--ease), border-color 400ms var(--ease), box-shadow 400ms var(--ease); transition-delay: calc(300ms + var(--n) * 320ms); }
.steps.lit .step::before { background: var(--c); border-color: var(--c); box-shadow: 0 0 12px var(--c); }
.step .mono { transition: color 400ms var(--ease); transition-delay: calc(300ms + var(--n) * 320ms); }
.steps.lit .step .mono { color: var(--c); }
.step:nth-child(1) { --n: 0; --c: #8f7bff; }
.step:nth-child(2) { --n: 1; --c: #5b9bff; }
.step:nth-child(3) { --n: 2; --c: #33d6ff; }
.step:nth-child(4) { --n: 3; --c: #2ee6c8; }

/* Работы: отклик на наведение */
.work { position: relative; }
.work::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; z-index: 2; background: linear-gradient(90deg, #8b3cff, #2e8cff, #00cbf5); opacity: 0; transition: opacity var(--fast) var(--ease); }
.work:hover::before { opacity: 1; }
.work__shot { overflow: hidden; }
.work__shot img { transition: transform 700ms var(--ease); }
.work:hover .work__shot img { transform: scale(1.03); }
.price-row { transition: background-color var(--fast) var(--ease); }
.price-row:hover h3 { color: #fff; }

@media (max-width: 1024px) {
  .hero__grid { grid-template-columns: 1fr; }
  .spectrum { max-width: 560px; margin: 0 auto; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: none; }
  .facts > div:nth-child(3) { padding-left: 0; border-left: 0; }
}
@media (max-width: 760px) {
  .hero { padding-top: 48px; }
  .hero h1 { font-size: 40px; }
  .spectrum { margin: -24px -8px 0; }
  .facts { grid-template-columns: 1fr; margin-top: 40px; }
  .facts > div, .facts > div + div { padding: 16px 0; border-left: 0; border-top: 1px solid var(--line); }
  #works.sec { padding-top: 80px; }
  .steps::before { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pulse, #pulses line { animation: none; opacity: 0; }
  .steps::before { transform: none; transition: none; }
}

/* ================= Финал: жирнее, переливы, испарение ================= */
body { font-weight: 450; }
.hero h1, .contact h2 { font-weight: 700; letter-spacing: -.036em; }
.sec h2 { font-weight: 700; letter-spacing: -.03em; }
.work h3, .price-row h3, .step h3, .principle h3, .ask h3, .qa summary { font-weight: 600; }
.btn { font-weight: 600; }
.nav a { font-weight: 500; }
.logo, .foot__brand { font-weight: 700; }
.price-row .price { font-weight: 650; }
.facts dd { font-weight: 500; }
.about__bio p:first-child { font-weight: 500; }
.hero__lede, .sec__sub { font-weight: 450; }

/* Перелив спектра */
@property --shift { syntax: "<length>"; inherits: true; initial-value: 0px; }
:root { --spectrum: linear-gradient(90deg, #9a85ff 0, #5b9bff 180px, #33d6ff 360px, #2ee6c8 540px, #9a85ff 720px); }
.rot, .flow { animation: flow 6s linear infinite; }
@keyframes flow { to { --shift: 720px; } }
.rot { position: relative; display: inline-block; white-space: nowrap; }
.rot .ch, .flow {
  display: inline-block;
  background-image: var(--spectrum); background-size: 720px 100%; background-repeat: repeat-x;
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
}
.rot .ch { background-position-x: calc(var(--shift) - var(--x, 0px)); padding-bottom: .08em; margin-bottom: -.08em; }
.flow { background-position-x: var(--shift); padding: 0 .02em .08em 0; }
.rot__ghost { position: absolute; left: 0; top: 0; white-space: nowrap; pointer-events: none; }
.rot .ch.in { animation: chIn 760ms cubic-bezier(.2, .8, .2, 1) both; }
.rot .ch.out { animation: chOut 900ms cubic-bezier(.3, .1, .3, 1) both; }
@keyframes chIn {
  from { opacity: 0; transform: translateY(.38em) scale(.94); filter: blur(14px); }
  60% { filter: blur(2px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes chOut {
  from { opacity: 1; transform: none; filter: blur(0); }
  to { opacity: 0; transform: translate(var(--dx, 0), var(--dy, -.6em)) rotate(var(--rz, 0)) scale(1.12); filter: blur(16px); }
}

/* Слова выезжают из-под маски */
.w { display: inline-block; overflow: clip; overflow-clip-margin: .2em; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
.w > span { display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  .hero__title .w > span { animation: wordUp 900ms cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(80ms + var(--wi) * 90ms); }
  .hero__title .rot { animation: flow 6s linear infinite, rotIn 900ms cubic-bezier(.2, .8, .2, 1) 440ms both; }
  @keyframes rotIn { from { opacity: 0; filter: blur(12px); transform: translateY(.2em); } to { opacity: 1; filter: none; transform: none; } }
  @keyframes wordUp { from { transform: translateY(105%); } to { transform: none; } }
  html.js h2.split .w > span { transform: translateY(105%); transition: transform 900ms cubic-bezier(.2, .8, .2, 1); transition-delay: calc(var(--wi) * 70ms); }
  html.js .in h2.split .w > span, html.js h2.split.in .w > span { transform: none; }
  .hero__lede.rise { animation-delay: 420ms; } .hero__cta.rise { animation-delay: 540ms; } .facts.rise { animation-delay: 660ms; }

  /* Блик бежит по граням призмы */
  .glint { opacity: 0; stroke-dasharray: 70 880; animation: glint 5.5s linear infinite; filter: drop-shadow(0 0 6px rgba(255,255,255,.9)); transition: opacity 600ms var(--ease); }
  .spectrum.ready .glint { opacity: 1; }
  @keyframes glint { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -950; } }
  .pulse, #pulses line { opacity: 0; transition: opacity 600ms var(--ease); }
  .spectrum.ready .pulse, .spectrum.ready #pulses line { opacity: 1; }

  /* Живая точка статуса */
  .dot--live { position: relative; }
  .dot--live::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--ok); animation: ping 2.4s cubic-bezier(0, 0, .2, 1) infinite; }
  @keyframes ping { 0% { transform: scale(1); opacity: .6; } 80%, 100% { transform: scale(2.8); opacity: 0; } }
}
@media (prefers-reduced-motion: reduce) { .glint { display: none; } }

/* Полоса прокрутки спектром под шапкой */
.top::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, #9a85ff, #5b9bff, #33d6ff, #2ee6c8);
  transform: scaleX(var(--p, 0)); transform-origin: left;
}

/* Кнопки: блик при наведении */
.btn { position: relative; overflow: hidden; isolation: isolate; transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease), color var(--fast) var(--ease), transform 300ms cubic-bezier(.2, .8, .2, 1), box-shadow 300ms var(--ease); }
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.55) 45%, rgba(154,133,255,.35) 52%, rgba(51,214,255,.35) 58%, transparent 72%);
  transform: translateX(-120%);
}
.btn--quiet::after { background: linear-gradient(105deg, transparent 30%, rgba(154,133,255,.18) 45%, rgba(51,214,255,.18) 58%, transparent 72%); }
.btn:hover::after { transform: translateX(120%); transition: transform 800ms cubic-bezier(.2, .7, .2, 1); }
.btn--primary:hover { box-shadow: 0 8px 28px -10px rgba(91, 155, 255, .55); }
.btn--quiet:hover { border-color: rgba(154, 133, 255, .5); }

/* Карточки: мягкий свет за курсором */
.work::after, .ask::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; opacity: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .07), transparent 60%);
  transition: opacity 300ms var(--ease);
}
.ask { overflow: hidden; }
.work:hover::after, .ask:hover::after { opacity: 1; }
.work { transition: opacity 700ms var(--ease), border-color var(--fast) var(--ease), transform 500ms cubic-bezier(.2, .8, .2, 1); }
html.js .work.in:hover, html:not(.js) .work:hover { transform: translateY(-4px); }

/* Принципы: верхняя грань зажигается по очереди */
.principle { position: relative; }
.principle::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--c); transform: scaleX(0); transform-origin: left; transition: transform 900ms cubic-bezier(.2, .8, .2, 1); transition-delay: calc(var(--n) * 220ms); }
.principles.lit .principle::before { transform: scaleX(1); }
.principle:nth-child(1) { --n: 0; --c: linear-gradient(90deg, #9a85ff, #5b9bff); }
.principle:nth-child(2) { --n: 1; --c: linear-gradient(90deg, #5b9bff, #33d6ff); }
.principle:nth-child(3) { --n: 2; --c: linear-gradient(90deg, #33d6ff, #2ee6c8); }

/* Прайс: строка подсвечивается */
.price-row { position: relative; }
.price-row::before { content: ""; position: absolute; left: 0; bottom: -1px; height: 1px; width: 100%; background: linear-gradient(90deg, #9a85ff, #5b9bff, #33d6ff); transform: scaleX(0); transform-origin: left; transition: transform 500ms cubic-bezier(.2, .8, .2, 1); }
.price-row:hover::before { transform: scaleX(1); }
.price-row h3 { transition: color var(--fast) var(--ease), transform 400ms cubic-bezier(.2, .8, .2, 1); }
.price-row:hover h3 { transform: translateX(6px); }
.num { font-variant-numeric: tabular-nums; }

/* Вопросы раскрываются плавно */
:root { interpolate-size: allow-keywords; }
.qa::details-content { height: 0; overflow: clip; transition: height 420ms cubic-bezier(.2, .8, .2, 1), content-visibility 420ms allow-discrete; }
.qa[open]::details-content { height: auto; }
.qa summary .icon { transition: transform 420ms cubic-bezier(.2, .8, .2, 1), color var(--fast) var(--ease); }

/* Логотип: лучи вздрагивают при наведении */
.logo svg line:not(:first-of-type) { transform-box: fill-box; transform-origin: left center; transition: transform 400ms cubic-bezier(.2, .8, .2, 1); }
.logo:hover svg line:nth-of-type(2) { transform: rotate(-8deg) scaleX(1.15); }
.logo:hover svg line:nth-of-type(3) { transform: scaleX(1.2); }
.logo:hover svg line:nth-of-type(4) { transform: rotate(8deg) scaleX(1.15); }

/* Ссылки: подчёркивание спектром выезжает */
.foot__col a, .contact__links a, .nav a { background-image: linear-gradient(90deg, #9a85ff, #33d6ff); background-size: 0 1px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size 400ms cubic-bezier(.2, .8, .2, 1), color var(--fast) var(--ease), background-color var(--fast) var(--ease); }
.foot__col a:hover, .contact__links a:hover { background-size: 100% 1px; }
.nav a { background-position: 12px calc(100% - 4px); }
.nav a:hover { background-size: calc(100% - 24px) 1px; }

@media (prefers-reduced-motion: reduce) {
  .rot, .flow { animation: none; }
  html.js .work.in:hover, .work:hover, .price-row:hover h3 { transform: none; }
}
@media (max-width: 760px) {
  .hero h1, .contact h2 { letter-spacing: -.03em; }
}

/* Меняющееся слово всегда на своей строке: заголовок не прыгает */
.hero__title .rot { display: block; width: max-content; }

/* Работы: широкая карточка приложения (OrbSniper) — кадр слева, текст справа,
   колонки совпадают с карточками сайтов над ней */
.work--wide { grid-column: 1 / -1; display: grid; grid-template-columns: calc((100% - 22px) * .61832 - 2px) minmax(0, 1fr); }
.work--wide .work__shot { border-bottom: 0; border-right: 1px solid var(--line); }
.work--wide .work__shot img { height: 100%; object-fit: cover; object-position: 50% 0; }
.work--wide .work__meta { align-content: center; padding: 32px 32px 32px 50px; }
.work__live .gh { width: 13px; height: 13px; fill: currentColor; flex: none; }
.work__tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 0; padding: 0; list-style: none; }
.work__tags li {
  height: 26px; padding: 0 10px; display: inline-flex; align-items: center;
  border: 1px solid var(--line); border-radius: 7px; background: var(--raised);
  font: 400 12px/1 var(--mono); color: var(--text-2);
}
@media (max-width: 900px) {
  .work--wide { display: flex; }
  .work--wide .work__shot { border-right: 0; border-bottom: 1px solid var(--line); }
  .work--wide .work__shot img { height: auto; }
  .work--wide .work__meta { padding: 24px; }
}
@media (max-width: 760px) {
  .work--wide .work__meta { padding: 20px; }
}
