/* =====================================================================
   RAGIMOFF · test/styles.css — КОНЦЕПТ «NƏBZ» (пульс)
   Сквозной мотив: ЭКГ-линия, которая рисуется по скроллу; правый
   пульс-рельс с названием раздела; живое меню с фотографиями.
   Правило: ни одного хардкода шрифтов/кеглей/цветов — всё из tokens.css.
   ===================================================================== */

/* ───────────────────────────── БАЗА ───────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  overflow-x: clip;
  scroll-behavior: smooth;
  background: var(--bg);
}
html.no-mo { scroll-behavior: auto; }
html.menu-lock { overflow: hidden; }

body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: var(--fw-reg);
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--dur-out) var(--e2), color var(--dur-out) var(--e2);
}

/* Свечение полотна + зерно (§0.16) */
body::before {
  content: '';
  position: fixed;
  inset: -18vh auto auto -14vw;
  width: var(--glow-size);
  height: var(--glow-size);
  background:
    radial-gradient(closest-side, var(--glow-a-color), transparent 72%),
    radial-gradient(closest-side at 62% 58%, var(--glow-b-color), transparent 76%);
  filter: blur(28px);
  opacity: .9;
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 40;
  opacity: var(--grain);
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
::selection { background: var(--acc); color: var(--inv-fg); }
:focus-visible { outline: 1px solid var(--acc); outline-offset: 3px; }

.meta {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  font-weight: var(--fw-med);
  letter-spacing: var(--ls-meta);
  text-transform: uppercase;
  color: var(--mute);
}
.wrap {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--pad-x);
  position: relative;
  z-index: 1;
}
.sec { padding-block: var(--gap-sec) 0; position: relative; z-index: 1; scroll-margin-top: 90px; }

/* Волосяная линейка, прочерчиваемая при появлении */
.rule {
  height: var(--bd-w);
  background: var(--line);
  border: 0;
  margin: 0;
  transform-origin: left center;
}
html.mo.js-ready .rule[data-rv] { transform: scaleX(0); }
html.mo.js-ready .rule[data-rv].in { transform: none; transition: transform .9s var(--e); }

/* ───────────────────────── КУРСОР-КОЛЬЦО ───────────────────────── */
.cur { position: fixed; top: 0; left: 0; z-index: 60; pointer-events: none; display: none; }
@media (hover: hover) and (pointer: fine) { html.mo .cur { display: block; } }
.cur__ring {
  position: absolute;
  width: 34px; height: 34px;
  margin: -17px 0 0 -17px;
  border: var(--bd-w) solid var(--acc);
  border-radius: 50%;
  opacity: .55;
  transition: width .3s var(--e), height .3s var(--e), margin .3s var(--e), opacity .3s linear;
}
.cur.is-hot .cur__ring { width: 58px; height: 58px; margin: -29px 0 0 -29px; opacity: 1; }
.cur__lbl {
  position: absolute;
  margin: 24px 0 0 24px;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--ls-meta);
  text-transform: uppercase;
  color: var(--acc-2);
  white-space: nowrap;
  opacity: 0;
  transition: opacity .25s linear;
}
.cur.is-hot .cur__lbl { opacity: 1; }

/* ───────────────────────── ВСТУПЛЕНИЕ ───────────────────────── */
.intro {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  pointer-events: none;
}
html.mo.js-ready .intro { display: flex; animation: intro-hide .85s var(--e-spring) 1.05s forwards; }
.intro__t {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 4.4rem);
  font-weight: var(--fw-light);
  letter-spacing: var(--ls-mega);
  overflow: hidden;
}
.intro__t span { display: inline-block; transform: translateY(112%); animation: intro-up 1s var(--e) forwards; }
.intro__t em { color: var(--acc); font-style: normal; }
@keyframes intro-up { to { transform: none; } }
@keyframes intro-hide { to { transform: translateY(-101%); visibility: hidden; } }

/* ───────────────────────── ШАПКА ───────────────────────── */
.hdr {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 30;
  border-bottom: var(--bd-w) solid transparent;
  transition: background-color var(--dur-ui) linear, border-color var(--dur-ui) linear;
}
.hdr.is-stuck {
  background: var(--veil);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.hdr__in {
  max-width: var(--max-w);
  margin-inline: auto;
  padding: 14px var(--pad-x);
  display: flex;
  align-items: center;
  gap: var(--gap-items);
}
.logo { display: flex; flex-direction: column; line-height: 1.05; }
.logo__t {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: var(--fw-med);
  letter-spacing: var(--ls-tight);
}
.logo__t em { color: var(--acc); font-style: normal; }
.logo__s {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--ls-meta);
  color: var(--mute);
  text-transform: uppercase;
}
.nav { display: flex; gap: clamp(14px, 1.8vw, 30px); margin-inline: auto; }
.nav a {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mid);
  padding: 6px 2px;
  position: relative;
}
.nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: var(--bd-w);
  background: var(--acc);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur-ui) var(--e2);
}
.nav a:hover::after { transform: none; transform-origin: left; }
.hdr__tools { display: flex; align-items: center; gap: 8px; }

.tgl {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  min-height: 34px;
  border: var(--bd-w) solid var(--line-2);
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mid);
  transition: border-color var(--dur-ui), color var(--dur-ui);
}
.tgl:hover { border-color: var(--acc); color: var(--fg); }
.tgl__ic { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.tgl--menu .tgl__ic { stroke-width: 2; }

/* ───────────────────── МЕНЮ НА ВЕСЬ ЭКРАН ───────────────────── */
.menu {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--veil);
  backdrop-filter: blur(22px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12vh var(--pad-x) 6vh;
  opacity: 0;
  visibility: hidden;
  transition: opacity .5s var(--e2), visibility 0s linear .5s;
}
.menu.is-open { opacity: 1; visibility: visible; transition-delay: 0s; }
.menu__stage {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: .1;
  filter: saturate(.75);
  transition: background-image .25s linear;
  pointer-events: none;
}
.menu__stage.is-pop { animation: stage-pop .9s var(--e); }
@keyframes stage-pop { from { opacity: .02; transform: scale(1.05); } to { opacity: .1; transform: none; } }
.menu__in { position: relative; z-index: 1; }
.menu__list { list-style: none; margin: 0; padding: 0; }
.menu__list li { overflow: hidden; }
.menu__list a {
  display: inline-flex;
  align-items: baseline;
  gap: 18px;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 7.4vw, 4.2rem);
  font-weight: var(--fw-light);
  letter-spacing: var(--ls-tight);
  line-height: 1.12;
  color: var(--fg);
  transition: color var(--dur-ui) linear;
}
.menu__list a sup {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--ls-meta);
  color: var(--acc);
}
.menu__list a:hover { color: var(--acc-2); }
.menu__list li:nth-child(1) a { --i: 0; }
.menu__list li:nth-child(2) a { --i: 1; }
.menu__list li:nth-child(3) a { --i: 2; }
.menu__list li:nth-child(4) a { --i: 3; }
.menu__list li:nth-child(5) a { --i: 4; }
html.mo .menu__list a {
  transform: translateY(112%);
  transition: transform .75s var(--e) calc(var(--i) * 60ms), color var(--dur-ui) linear;
}
html.mo .menu.is-open .menu__list a { transform: none; }
.menu__pulse {
  position: relative;
  z-index: 1;
  width: min(420px, 60vw);
  height: 34px;
  margin-top: clamp(20px, 5vh, 48px);
  opacity: .8;
}
.menu__pulse path {
  fill: none;
  stroke: var(--acc);
  stroke-width: var(--pulse-w);
  stroke-dasharray: 26 14;
}
html.mo .menu.is-open .menu__pulse path { animation: menu-ecg 2.4s linear infinite; }
@keyframes menu-ecg { to { stroke-dashoffset: -400; } }
.menu__foot {
  position: relative;
  z-index: 1;
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px var(--gap-items);
  border-top: var(--bd-w) solid var(--line);
  padding-top: 18px;
}
.menu__x {
  position: absolute;
  top: 22px; right: var(--pad-x);
  z-index: 2;
  width: 44px; height: 44px;
  border: var(--bd-w) solid var(--line-2);
  border-radius: var(--r-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--mid);
  transition: border-color var(--dur-ui), color var(--dur-ui), transform .35s var(--e);
}
.menu__x:hover { border-color: var(--acc); color: var(--fg); transform: rotate(90deg); }

/* ───────────────────── ПУЛЬС-РЕЛЬС (правый) ───────────────────── */
.rail {
  position: fixed;
  right: var(--rail-x);
  top: 50%;
  transform: translateY(-50%);
  z-index: 25;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
@media (min-width: 1180px) { html.js-ready .rail { display: flex; } }
.rail__pct { color: var(--acc-2); }
.rail__line {
  position: relative;
  width: var(--bd-w);
  height: var(--rail-h);
  background: var(--line-2);
}
.rail__line i {
  position: absolute;
  inset: 0;
  background: var(--acc);
  transform-origin: top center;
  transform: scaleY(0);
}
.rail__dot {
  position: absolute;
  left: 50%; top: 0;
  width: 7px; height: 7px;
  margin-left: -3.5px;
  border-radius: 50%;
  background: var(--acc);
  box-shadow: var(--pulse-glow);
}
.rail__lbl {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: var(--mute);
  transition: color var(--dur-ui) linear;
}

/* ─────────────────────────── ГЕРОЙ ─────────────────────────── */
.hero {
  position: relative;
  padding-top: clamp(104px, 15vh, 190px);
  padding-bottom: clamp(40px, 7vh, 96px);
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(28px, 4vw, 72px);
  align-items: end;
}
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border: var(--bd-w) solid var(--line-2);
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--ls-meta);
  text-transform: uppercase;
  color: var(--acc-2);
  margin-bottom: clamp(22px, 4vh, 44px);
}
.beat {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--acc);
  box-shadow: var(--pulse-glow);
}
html.mo .beat { animation: beat var(--pulse-dur) var(--e2) infinite; }
@keyframes beat {
  0%, 100% { transform: scale(1); }
  12% { transform: scale(1.55); }
  24% { transform: scale(1); }
  36% { transform: scale(1.35); }
  48% { transform: scale(1); }
}
.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-hero);
  font-weight: var(--fw-light);
  line-height: var(--lh-hero);
  letter-spacing: var(--ls-mega);
}
.hero h1 em { color: var(--acc-2); font-style: italic; }
.h1-line { display: block; overflow: hidden; }
.h1-line:nth-child(1) > span { --ld: 60; }
.h1-line:nth-child(2) > span { --ld: 180; }
html.mo .h1-line > span {
  display: inline-block;
  transform: translateY(112%);
  transition: transform 1.05s var(--e) calc(var(--ld, 0) * 1ms);
}
html.mo .hero.is-in .h1-line > span { transform: none; }
.hero__lede {
  margin: clamp(22px, 4vh, 48px) 0 0;
  max-width: var(--w-lede);
  font-family: var(--font-display);
  font-size: var(--fs-lede);
  font-style: italic;
  font-weight: var(--fw-reg);
  line-height: var(--lh-lede);
  color: var(--mid);
}
html.mo .hero__lede { opacity: 0; transform: translateY(14px); transition: opacity .8s linear .35s, transform .8s var(--e) .35s; }
html.mo .hero.is-in .hero__lede { opacity: 1; transform: none; }
.hero__cta { margin-top: clamp(24px, 4vh, 44px); display: flex; flex-wrap: wrap; gap: 14px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 13px 24px;
  min-height: 46px;
  border: var(--bd-w) solid var(--line-2);
  border-radius: var(--r-pill);
  overflow: hidden;
  position: relative;
  isolation: isolate;
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  letter-spacing: var(--ls-meta);
  text-transform: uppercase;
  color: var(--fg);
  transition: color var(--dur-ui) linear, border-color var(--dur-ui) linear, transform .3s var(--e);
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--acc);
  transform-origin: bottom;
}
html.mo .btn::before { transform: scaleY(0); transition: transform .45s var(--e); }
.btn:hover { color: var(--inv-fg); border-color: var(--acc); }
.btn:hover::before { transform: none; }
.btn--ghost::before { display: none; }
.btn--ghost:hover { color: var(--acc); }

.hero__fig {
  position: relative;
  align-self: end;
  justify-self: end;
  max-width: min(340px, 34vw);
  margin: 0;
}
.hero__halo {
  position: absolute;
  inset: -14% -18% -10% -18%;
  z-index: -1;
  background: radial-gradient(closest-side, var(--glow-a-color), transparent 74%);
  filter: blur(22px);
}
html.mo .hero__halo { animation: halo var(--pulse-dur) var(--e2) infinite; }
@keyframes halo { 0%, 100% { opacity: .75; } 14% { opacity: 1; } 40% { opacity: .8; } }
.hero__fig img { width: 100%; transform: translate3d(0, var(--plx, 0), 0); }
.cal { position: relative; }
.cal::before, .cal::after {
  content: '';
  position: absolute;
  width: 22px; height: 22px;
  border: var(--bd-w) solid var(--acc);
  opacity: .8;
}
.cal::before { top: -14px; left: -14px; border-width: 1px 0 0 1px; }
.cal::after { bottom: -14px; right: -14px; border-width: 0 1px 1px 0; }
.hero__sign {
  position: absolute;
  right: -4%;
  bottom: -10px;
  font-family: var(--font-script);
  font-size: clamp(1.5rem, 2.4vw, 2.3rem);
  color: var(--acc);
  transform: rotate(-6deg);
}
.hero__read {
  margin-top: clamp(30px, 6vh, 64px);
  display: flex;
  flex-wrap: wrap;
  border-top: var(--bd-w) solid var(--line);
  border-bottom: var(--bd-w) solid var(--line);
}
.hero__read div {
  flex: 1 1 140px;
  padding: 16px 22px 16px 0;
  border-right: var(--bd-w) solid var(--line);
}
.hero__read div:last-child { border-right: 0; }
.hero__read b {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: var(--fw-med);
}
.hero__read span { display: block; margin-top: 2px; }

/* ───────────────────────── МАРКИЗА ───────────────────────── */
.mq {
  overflow: clip;
  border-top: var(--bd-w) solid var(--line);
  border-bottom: var(--bd-w) solid var(--line);
  padding: 14px 0;
  position: relative;
  z-index: 1;
}
.mq__track {
  display: flex;
  gap: 56px;
  width: max-content;
  white-space: nowrap;
  will-change: transform;
  animation: mq-run 46s linear infinite;
}
.mq__track span {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--mute);
}
.mq__track span em { color: var(--acc); font-style: normal; }
@keyframes mq-run {
  from { transform: translateX(0) skewY(var(--mq-skew, 0deg)); }
  to { transform: translateX(calc(-50% - 28px)) skewY(var(--mq-skew, 0deg)); }
}

/* ─────────────────────── СЕКЦИИ · ЗАГОЛОВКИ ─────────────────────── */
.sec__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--gap-items);
  margin-bottom: clamp(28px, 5vh, 56px);
}
.sec h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: var(--fw-light);
  letter-spacing: var(--ls-tight);
  line-height: var(--lh-h);
}
.sec h2 em { color: var(--acc-2); }
/* Пословный выезд заголовков */
html.mo .sec h2 .w { display: inline-block; overflow: hidden; vertical-align: bottom; }
html.mo .sec h2 .w > i {
  display: inline-block;
  font-style: inherit;
  transform: translateY(112%);
  transition: transform .85s var(--e) calc(var(--wd, 0) * 55ms);
}
html.mo .sec h2.in .w > i { transform: none; }

/* ───────────────────※ ХРОНИКА (кадр на шаг прокрутки) ─────────────── */
.chron__grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 8fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
}
.chron__years { position: sticky; top: 22vh; margin: 0; padding: 0; list-style: none; }
.chron__years li {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  letter-spacing: var(--ls-meta);
  color: var(--mute);
  padding: 7px 0 7px 14px;
  border-left: var(--bd-w) solid var(--line);
  transition: color var(--dur-ui) linear, border-color var(--dur-ui) linear, padding-left var(--dur-ui) var(--e2);
}
.chron__years li.is-live { color: var(--acc-2); border-left-color: var(--acc); padding-left: 22px; }

.seq { position: relative; height: calc(var(--seq-n, 6) * var(--seq-step, 46vh)); }
.seq__scene {
  position: sticky;
  top: 14vh;
  height: 72vh;
  border: var(--bd-w) solid var(--line);
  border-radius: var(--r);
  overflow: clip;
  background: var(--bg-2);
}
.seq__item {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: 1fr auto;
}
html.no-mo .seq__item { position: relative; }
html.mo .seq__item {
  opacity: var(--o, 0);
  transform: translate3d(0, calc((1 - var(--o, 0)) * 34px), 0) scale(calc(.962 + .038 * var(--o, 0)));
}
.seq__img { background-size: cover; background-position: center 18%; background-repeat: no-repeat; }
.seq__cap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 22px;
  background: var(--veil);
  border-top: var(--bd-w) solid var(--line);
}
.seq__cap-n { color: var(--acc-2); }
[data-seq-cap] { transition: opacity .18s linear; }
[data-seq-cap].is-out { opacity: 0; }
.seq__hud { display: flex; align-items: center; gap: 16px; margin-top: 16px; }
.seq__num { font-family: var(--font-mono); font-size: var(--fs-meta); letter-spacing: var(--ls-meta); color: var(--acc-2); }
.seq__bar { flex: 1; height: var(--bd-w); background: var(--line); position: relative; overflow: hidden; }
.seq__bar i { position: absolute; inset: 0; background: var(--acc); transform-origin: left center; }
.seq__stamp { font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: var(--ls-meta); color: var(--mute); }
@media (max-width: 720px) {
  .seq.is-static { height: auto; }
  .seq.is-static .seq__scene { position: static; height: auto; display: grid; gap: var(--gap-items); }
  .seq.is-static .seq__item { position: relative; inset: auto; }
}

/* ───────────────────────※ NƏBZ — ЭКГ-сцена ─────────────────────── */
.nbz { padding-top: clamp(64px, 12vh, 140px); }
.nbz__stage {
  position: relative;
  border-top: var(--bd-w) solid var(--line);
  border-bottom: var(--bd-w) solid var(--line);
  padding: clamp(40px, 9vh, 110px) 0;
}
.nbz__ecg {
  display: block;
  width: 100%;
  height: clamp(90px, 16vh, 170px);
  overflow: visible;
}
.nbz__ecg path { fill: none; stroke: var(--acc); stroke-width: var(--pulse-w); }
html.mo .nbz__ecg path { stroke-dasharray: var(--ecg-len, 3000); stroke-dashoffset: var(--ecg-off, 3000); }
.nbz__dot {
  position: absolute;
  left: 0; top: 50%;
  width: 9px; height: 9px;
  margin: -4.5px 0 0 -4.5px;
  border-radius: 50%;
  background: var(--acc);
  box-shadow: var(--pulse-glow);
}
html.no-mo .nbz__dot { display: none; }
.nbz__q {
  margin: clamp(24px, 5vh, 56px) 0 0;
  max-width: 30ch;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.2vw, 2.6rem);
  font-weight: var(--fw-light);
  line-height: 1.25;
  letter-spacing: var(--ls-tight);
}
.nbz__q em { color: var(--acc-2); font-style: italic; }
.nbz__s { margin: 18px 0 0; max-width: 52ch; color: var(--mute); }

/* ────────────────※ УСЛУГИ: ИНДЕКС-СТРОКИ (§0.17) ──────────── */
.svc { margin-top: clamp(30px, 5vh, 60px); }
.svc__row {
  display: grid;
  grid-template-columns: 64px minmax(0, 2.4fr) minmax(0, 3.4fr) 64px;
  gap: clamp(14px, 2vw, 34px);
  align-items: center;
  padding: clamp(20px, 3vh, 30px) 0;
  border-top: var(--bd-w) solid var(--line);
  position: relative;
  isolation: isolate;
  color: var(--fg);
}
.svc__row:last-child { border-bottom: var(--bd-w) solid var(--line); }
.svc__row::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--bg-2); }
html.mo .svc__row::before { background: var(--acc); transform: scaleY(0); transform-origin: bottom; transition: transform .5s var(--e); }
html.mo .svc__row:hover::before { transform: none; }
html.mo .svc__row { transition: color .25s linear; }
html.mo .svc__row:hover { color: var(--inv-fg); }
.svc__n { font-family: var(--font-mono); font-size: var(--fs-meta); letter-spacing: var(--ls-meta); color: var(--acc-2); }
.svc__t {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: var(--fw-med);
  letter-spacing: var(--ls-tight);
  line-height: var(--lh-h);
}
.svc__k {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--ls-meta);
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 6px;
  font-weight: var(--fw-med);
}
.svc__d { color: var(--mid); font-size: var(--fs-sm); line-height: 1.6; }
.svc__arrow {
  justify-self: end;
  width: 44px; height: 44px;
  border-radius: var(--r-pill);
  border: var(--bd-w) solid var(--line-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .35s var(--e), background-color .35s var(--e), border-color .35s var(--e);
}
.svc__row:hover .svc__arrow { transform: rotate(-45deg); border-color: var(--inv-fg); background: var(--acc); }
html.no-mo .svc__row:hover .svc__arrow { transform: none; }

/* Курсор-превью (§0.17) */
.peek {
  position: absolute;
  top: 0; left: 0;
  z-index: 8;
  width: 224px;
  aspect-ratio: 16 / 10;
  border: var(--bd-w) solid var(--line-2);
  border-radius: var(--r);
  overflow: clip;
  background: var(--bg-3);
  pointer-events: none;
  opacity: 0;
  translate: -50% -55%;
  transition: opacity .25s linear;
}
.peek.is-on { opacity: 1; }
.peek__img { position: absolute; inset: 0; background-size: cover; background-position: center; }
html.no-mo .peek { display: none; }

/* ─────────────────────────※ СЧЁТЧИКИ ─────────────────────── */
.figs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: var(--bd-w) solid var(--line);
  margin-top: clamp(30px, 5vh, 60px);
}
.figs__cell {
  padding: clamp(20px, 3.4vh, 36px) clamp(14px, 2vw, 28px);
  border-right: var(--bd-w) solid var(--line);
  position: relative;
}
.figs__cell:last-child { border-right: 0; }
.figs__cell::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--acc);
  transform-origin: left;
}
html.no-mo .figs__cell::before { display: none; }
html.mo .figs__cell::before { transform: scaleX(0); transition: transform .8s var(--e) var(--delay, 0s); }
html.mo .figs__cell.in::before { transform: none; }
html.mo .figs__cell[data-rv] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s linear var(--delay, 0s), transform .6s var(--e) var(--delay, 0s);
}
html.mo .figs__cell[data-rv].in { opacity: 1; transform: none; }
.figs__v {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: var(--fw-med);
  line-height: 1;
}
.figs__v sup { font-size: .45em; color: var(--acc); font-family: var(--font-mono); }

/* ─────────────────────────※ КНИГА ───────────────────────── */
.book__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(28px, 5vw, 84px);
  align-items: center;
}
.book__plate {
  position: relative;
  margin: 14px;
  border: var(--bd-w) solid var(--line-2);
  border-radius: var(--r);
  padding: clamp(26px, 5vh, 54px) clamp(22px, 4vw, 44px);
  background: var(--bg-2);
}
.book__plate::before {
  content: '';
  position: absolute;
  inset: 0;
  transform: translate(-14px, -14px);
  border: var(--bd-w) solid var(--acc);
  border-radius: var(--r);
  opacity: .6;
}
.book__plate dl { margin: 22px 0 0; }
.book__plate dt { color: var(--acc-2); }
.book__plate dd { margin: 4px 0 14px; font-family: var(--font-display); font-size: var(--fs-h3); line-height: 1.25; }
.book p { max-width: 52ch; color: var(--mid); }

/* ─────────────────────────※ БЛОГ ───────────────────────── */
.posts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 36px);
  margin-top: clamp(30px, 5vh, 60px);
}
.post {
  border: var(--bd-w) solid var(--line);
  border-radius: var(--r);
  overflow: clip;
  background: var(--bg-2);
  display: flex;
  flex-direction: column;
  transition: transform .45s var(--e), border-color var(--dur-ui) linear;
}
.post:hover { transform: translateY(-7px); border-color: var(--line-2); }
html.no-mo .post:hover { transform: none; }
.post__img { aspect-ratio: 16 / 9; overflow: clip; }
.post__img img { width: 100%; height: 100%; object-fit: cover; }
html.mo .post__img { clip-path: inset(0 0 100% 0); transition: clip-path .9s var(--e) var(--delay, 0s); }
html.mo .post.in .post__img { clip-path: inset(0); }
.post__body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post__t {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: var(--fw-med);
  line-height: var(--lh-h);
  letter-spacing: var(--ls-tight);
}
.post__x { color: var(--mute); font-size: var(--fs-sm); line-height: 1.6; }
.post__more { margin-top: auto; color: var(--acc-2); }

/* ──────────────────────※ CTA + КОНТАКТЫ ──────────────────── */
.cta {
  margin-top: var(--gap-sec);
  position: relative;
  z-index: 1;
  background: var(--inv-bg);
  color: var(--inv-fg);
}
.cta__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(28px, 5vw, 84px);
  padding-block: clamp(56px, 10vh, 120px);
}
.cta h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: var(--fw-light);
  line-height: var(--lh-h);
  letter-spacing: var(--ls-tight);
}
.cta__lede {
  max-width: 44ch;
  margin-top: 22px;
  color: color-mix(in srgb, var(--inv-fg) 72%, transparent);
}
.cta__lede::first-letter {
  font-family: var(--font-display);
  font-size: 3.3em;
  float: left;
  line-height: .8;
  padding-right: 6px;
  color: var(--acc-on-inv);
}
.cta__btn { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 14px; }
.cta .btn { border-color: color-mix(in srgb, var(--inv-fg) 32%, transparent); }
.cta .btn::before { background: var(--acc-on-inv); }
.cta .btn:hover { color: var(--inv-bg); }

.cts { margin: 0; padding: 0; list-style: none; border-top: var(--bd-w) solid color-mix(in srgb, var(--inv-fg) 18%, transparent); }
.cts li { border-bottom: var(--bd-w) solid color-mix(in srgb, var(--inv-fg) 18%, transparent); }
.cts a, .cts span { display: flex; align-items: baseline; justify-content: space-between; gap: 22px; padding: 16px 0; }
.cts dt {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--ls-meta);
  text-transform: uppercase;
  color: color-mix(in srgb, var(--inv-fg) 55%, transparent);
}
.cts b { font-family: var(--font-display); font-weight: var(--fw-med); font-size: 1.15rem; letter-spacing: var(--ls-tight); }
.cts a:hover b { color: var(--acc-on-inv); }

/* ─────────────────────────※ ФУТЕР ───────────────────────── */
.ft {
  position: relative;
  z-index: 1;
  border-top: var(--bd-w) solid var(--line);
  padding: clamp(28px, 5vh, 56px) 0 clamp(24px, 4vh, 44px);
}
.ft__grid { display: flex; flex-wrap: wrap; gap: 16px var(--gap-block); justify-content: space-between; align-items: flex-start; }
.ft__nav { display: flex; flex-wrap: wrap; gap: 14px 26px; }
.ft__nav a { font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: var(--ls-meta); text-transform: uppercase; color: var(--mute); }
.ft__nav a:hover { color: var(--acc-2); }

/* ───────────────────────── СОСТОЯНИЯ ───────────────────────── */
html.mo.js-ready [data-rv]:not(.in):not(.figs__cell):not(.post) { opacity: 0; transform: translateY(18px); }
html.mo.js-ready [data-rv]:not(.figs__cell) { transition: opacity .7s linear var(--delay, 0s), transform .7s var(--e) var(--delay, 0s); }
html.mo.js-ready [data-rv].in { opacity: 1; transform: none; }

html.no-mo [data-rv] { opacity: 1 !important; transform: none !important; }
html.no-mo .mq__track { animation: none; }
html.no-mo .h1-line > span { transform: none !important; }
html.no-mo .hero__lede { opacity: 1 !important; transform: none !important; }
html.no-mo .intro { display: none !important; }
html.no-mo .sec h2 .w > i { transform: none !important; }

/* ───────────────────────── АДАПТИВ ───────────────────────── */
@media (max-width: 1180px) {
  .hero__grid { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
  .svc__row { grid-template-columns: 52px minmax(0, 2fr) minmax(0, 3fr) 56px; }
}

@media (max-width: 980px) {
  .nav { display: none; }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__fig { max-width: min(320px, 64vw); justify-self: start; margin-top: 40px; }
  .chron__grid { grid-template-columns: 1fr; }
  .chron__years { position: static; display: flex; flex-wrap: wrap; gap: 8px 10px; margin-bottom: 18px; }
  .chron__years li { border-left: 0; padding: 4px 10px; border: var(--bd-w) solid var(--line-2); border-radius: var(--r-pill); }
  .chron__years li.is-live { border-color: var(--acc); padding-left: 10px; }
  .seq__scene { height: 58vh; top: 10vh; }
  .book__grid, .cta__grid { grid-template-columns: 1fr; }
  .posts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figs__cell:nth-child(2n) { border-right: 0; }
  .figs__cell:nth-child(-n+2) { border-bottom: var(--bd-w) solid var(--line); }
  .menu__list a { font-size: clamp(1.9rem, 8.4vw, 3rem); }
}

@media (max-width: 720px) {
  .tgl__lb { display: none; }
  .svc__row { grid-template-columns: 44px minmax(0, 1fr) 48px; }
  .svc__d { display: none; }
  .posts { grid-template-columns: 1fr; }
  .hero__read div { flex-basis: 50%; border-bottom: var(--bd-w) solid var(--line); }
  .hero__read div:nth-child(2n) { border-right: 0; }
  .ft__grid { flex-direction: column; }
  .nbz__q { max-width: none; }
}

@media (max-width: 520px) {
  .hero h1 { letter-spacing: -.02em; }
  .btn { width: 100%; justify-content: center; }
  .hero__read div { flex-basis: 100%; border-right: 0; }
  .hero__read div:last-child { border-bottom: 0; }
  .figs { grid-template-columns: 1fr; }
  .figs__cell { border-right: 0; border-bottom: var(--bd-w) solid var(--line); }
  .figs__cell:last-child { border-bottom: 0; }
}