/*
 * Сайт «Мастер медицины». Цвета и шрифты — из канона системы
 * (src/design/tokens.css): золото — цвет действия, чернила — тёмно-синие,
 * углы прямые. Переменные зовутся --amber по истории: это цвет действия. Один выразительный элемент — линия пульса в первом экране,
 * которая проходит через путь пациента; всё остальное спокойное.
 */
:root {
  --ink: #102f5c;
  --ink-2: #44536e;
  --ink-3: #75819a;
  --ink-deep: #1c2645;
  --amber: #c4a46b;
  --amber-hover: #b08f55;
  --amber-deep: #8c7442;
  --amber-bg: #f6f0e4;
  --surface: #ffffff;
  --panel: #f6f6f6;
  --line: #e6e2d8;
  --hair: #efece5;
  --green: #17795a;
  --red: #a83a2d;
  --red-bg: #fceae7;
  --on-dark: #eef0f6;
  --on-dark-2: #a9b2c9;
  --on-dark-line: #34406a;

  --display: 'Montserrat', system-ui, sans-serif;
  --text: 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wrap: 1200px;
  --pad: clamp(20px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; font: 400 17px/1.6 var(--text); color: var(--ink); background: var(--surface); }
img, svg { display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.08; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--amber); color: var(--ink); padding: 8px 14px; z-index: 100; font-weight: 600; }
.skip:focus { left: 8px; }

.ico { flex: none; }

/* ─── кнопки и ссылки ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 24px; font: 600 16px/1 var(--text); text-decoration: none;
  border: 1px solid transparent; cursor: pointer; transition: background .2s, border-color .2s, color .2s;
}
.btn-primary { background: var(--amber); color: var(--ink); }
.btn-primary:hover { background: var(--amber-hover); }
.btn-ghost { color: var(--on-dark); border-color: var(--on-dark-line); }
.btn-ghost:hover { border-color: var(--on-dark-2); }
.btn-login { height: 40px; padding: 0 20px; background: var(--amber); color: var(--ink); font-size: 15px; }
.btn-login:hover { background: var(--amber-hover); }
.link { color: var(--amber-deep); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.link:hover { color: var(--ink); }

/* ─── шапка ─────────────────────────────────────────────────────────────── */
.top { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .94); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--hair); }
.top-in { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); height: 68px; display: flex; align-items: center; gap: 32px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font: 600 19px/1 var(--display); letter-spacing: .01em; }
.mark { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.top-nav { display: flex; gap: 28px; margin-left: auto; }
.top-nav a { text-decoration: none; color: var(--ink-2); font-size: 15px; padding: 6px 0; border-bottom: 2px solid transparent; }
.top-nav a:hover { color: var(--ink); }
.top-nav a[aria-current='page'] { color: var(--ink); border-bottom-color: var(--amber); }

.is-home .top { background: rgba(16, 47, 92, .92); border-bottom-color: transparent; }
.is-home .top .brand { color: var(--on-dark); }
.is-home .top-nav a { color: var(--on-dark-2); }
.is-home .top-nav a:hover { color: var(--on-dark); }
.is-home.scrolled .top { background: rgba(255, 255, 255, .94); border-bottom-color: var(--hair); }
.is-home.scrolled .top .brand { color: var(--ink); }
.is-home.scrolled .top-nav a { color: var(--ink-2); }

/* ─── первый экран ──────────────────────────────────────────────────────── */
.hero { background: var(--ink); color: var(--on-dark); padding: clamp(44px, 6vw, 80px) 0 clamp(48px, 6vw, 72px); overflow: hidden; position: relative; }
.hero::before {
  /* Сетка монитора: тонкая, чтобы читалась как бумага ЭКГ, а не как узор. */
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(to right, rgba(169, 178, 201, .07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(169, 178, 201, .07) 1px, transparent 1px);
  background-size: 40px 40px;
}
.hero-in { position: relative; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.hero-title { margin-top: 22px; font-size: clamp(40px, 4.6vw, 66px); font-weight: 600; max-width: 13ch; line-height: .98; letter-spacing: -0.025em; color: #fff; }
.hero-lead { margin-top: 24px; max-width: 40ch; font-size: clamp(17px, 1.5vw, 19px); color: var(--on-dark-2); }
.hero-actions { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }

.path { position: relative; max-width: var(--wrap); margin: clamp(40px, 5vw, 64px) auto 0; padding: 0 var(--pad); }
.path-wave { width: 100%; height: 96px; overflow: visible; }
.path-base { stroke: var(--on-dark-line); stroke-width: 1; fill: none; }
.path-pulse { stroke: var(--amber); stroke-width: 2.4; fill: none; stroke-linejoin: miter; stroke-dasharray: 1000; stroke-dashoffset: 1000; vector-effect: non-scaling-stroke; }
.path.in .path-pulse, html:not(.js) .path-pulse { animation: draw 2.6s .2s cubic-bezier(.55, 0, .25, 1) forwards; }
.path-spark { fill: #fff; opacity: 0; filter: drop-shadow(0 0 6px var(--amber)); }
@keyframes draw { to { stroke-dashoffset: 0; } }

.stations { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; }
.st { position: relative; display: flex; flex-direction: column; }
.js .path .st { opacity: 0; transform: translateY(8px); }
.path.in .st { animation: rise .5s calc(.4s + var(--i) * .28s) ease-out forwards; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.st-dot { display: block; width: 9px; height: 9px; background: var(--amber); margin: 0 0 12px 2px; }
.st-card { flex: 1; border: 1px solid var(--on-dark-line); background: rgba(22, 30, 58, .55); padding: 12px 12px 14px; min-height: 152px; display: flex; flex-direction: column; }
.st-head { display: flex; align-items: center; gap: 7px; font: 600 15px/1.2 var(--display); color: #fff; }
.st-head .ico { color: var(--amber); }
.st-line { margin-top: 8px; font-size: 13px; line-height: 1.4; color: var(--on-dark-2); }
.st-value { margin-top: auto; padding-top: 10px; font: 600 22px/1.1 var(--display); color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; }
.st-note { font-size: 12.5px; color: var(--on-dark-2); }
.st-last .st-card { background: var(--amber); border-color: var(--amber); }
.st-last .st-head, .st-last .st-value { color: var(--ink); }
.st-last .st-head .ico { color: var(--ink); }
.st-last .st-line, .st-last .st-note { color: #3a2c10; }
.path figcaption { margin-top: 22px; font-size: 14px; color: var(--on-dark-2); max-width: 70ch; }

/* ─── секции ────────────────────────────────────────────────────────────── */
.sec { padding: clamp(64px, 9vw, 120px) 0; }
.sec-in { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.sec h2 { font-size: clamp(32px, 4.2vw, 52px); }
.sec p { color: var(--ink-2); }

.modules { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.modules-intro { position: sticky; top: 108px; }
.modules-intro p { margin: 20px 0 24px; max-width: 42ch; }
.modules-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 36px; }
.modules-list li { display: grid; grid-template-columns: 26px 1fr; gap: 14px; align-items: start; }
.modules-list .ico { color: var(--amber-deep); margin-top: 2px; }
.modules-list h3 { font-size: 22px; margin-bottom: 6px; }
.modules-list p { font-size: 15.5px; line-height: 1.55; }

.money { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.money-text p { margin-top: 20px; max-width: 46ch; }
.money-table { background: var(--surface); border: 1px solid var(--line); font-size: 15px; }
.mt-row { display: grid; grid-template-columns: 1.6fr 1.1fr .9fr 1.2fr .8fr; gap: 8px; padding: 14px 20px; border-bottom: 1px solid var(--hair); font-variant-numeric: tabular-nums; }
.mt-row span:not(:first-child) { text-align: right; white-space: nowrap; }
.mt-head { font: 600 13px/1.2 var(--display); color: var(--ink-3); letter-spacing: .02em; background: var(--panel); border-bottom-color: var(--line); }
.mt-bad { background: var(--red-bg); }
.up { color: var(--green); font-weight: 600; }
.down { color: var(--red); font-weight: 600; }
.mt-note { padding: 14px 20px; font-size: 13px; color: var(--ink-3) !important; }

.net h2 { max-width: 20ch; }
.net-grid { margin-top: 48px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--ink); }
.net-grid > div { padding: 28px 32px 0 0; }
.net-grid > div + div { padding-left: 32px; border-left: 1px solid var(--line); }
.net-grid h3 { font-size: 23px; margin-bottom: 12px; }
.net-grid p { font-size: 15.5px; }

.sec-news { background: var(--ink); color: var(--on-dark); }
.sec-news p { color: var(--on-dark-2); }
.news { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); }
.news-head p { margin: 20px 0 24px; max-width: 40ch; }
.sec-news .link { color: var(--amber); }
.sec-news .link:hover { color: #fff; }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--on-dark-line); }
.tl-item { position: relative; padding: 0 0 36px 32px; display: grid; grid-template-columns: 150px 1fr; gap: 20px; }
.tl-item::before { content: ''; position: absolute; left: -6px; top: 6px; width: 10px; height: 10px; background: var(--amber); }
.tl-when { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--on-dark-2); }
.tl-ver { font: 600 22px/1 var(--display); color: #fff; font-variant-numeric: tabular-nums; }
.tl-body h3 { font-size: 24px; margin-bottom: 8px; }
.tl-body h3 a { text-decoration: none; color: #fff; }
.tl-body h3 a:hover { color: var(--amber); }
.tl-body p { font-size: 15.5px; }

.sec-cta { padding: clamp(56px, 7vw, 96px) 0; }
.cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

/* ─── экраны ───────────────────────────────────────────────────────────── */
.sec-gallery { padding-top: clamp(56px, 7vw, 96px); }
.gallery-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.gallery-head p { max-width: 46ch; }
.gallery { margin-top: 32px; }
.gallery-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.gallery-tabs button {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; margin-bottom: -1px; flex: none;
  background: none; border: 0; border-bottom: 2px solid transparent; cursor: pointer;
  font: 500 15px/1 var(--text); color: var(--ink-2);
}
.gallery-tabs button .ico { color: var(--ink-3); }
.gallery-tabs button:hover { color: var(--ink); }
.gallery-tabs button[aria-selected='true'] { color: var(--ink); border-bottom-color: var(--amber); }
.gallery-tabs button[aria-selected='true'] .ico { color: var(--amber-deep); }
.gallery-stage { margin-top: 28px; }
.gallery-panel { margin: 0; }
.gallery-panel:not([hidden]) { animation: show .35s ease-out; }
@keyframes show { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.frame { border: 1px solid var(--line); background: var(--panel); padding: 10px; box-shadow: 0 30px 60px -30px rgba(16, 47, 92, .35); }
.frame img { width: 100%; height: auto; border: 1px solid var(--hair); background: #fff; }
.gallery-panel figcaption { margin-top: 16px; color: var(--ink-2); font-size: 15.5px; max-width: 70ch; }

.shot { margin: 24px 0; }
.shot-open { display: block; width: 100%; padding: 0; border: 1px solid var(--line); background: var(--panel); cursor: zoom-in; }
.shot-open img { width: 100%; height: auto; }
.shot-open:hover { border-color: var(--ink-3); }
.shot figcaption { margin-top: 8px; font-size: 14px; color: var(--ink-3); }
.zoom { position: fixed; inset: 0; z-index: 50; background: rgba(22, 30, 58, .88); display: flex; align-items: center; justify-content: center; padding: 3vw; cursor: zoom-out; animation: show .2s ease-out; }
.zoom img { max-width: 100%; max-height: 100%; width: auto; height: auto; background: #fff; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }

/* ─── подвал ────────────────────────────────────────────────────────────── */
.foot { border-top: 1px solid var(--line); background: var(--surface); }
.foot-in { max-width: var(--wrap); margin: 0 auto; padding: 36px var(--pad); display: flex; align-items: center; gap: 40px; flex-wrap: wrap; font-size: 14px; color: var(--ink-2); }
.foot-brand { display: flex; align-items: center; gap: 12px; }
.foot-brand strong { color: var(--ink); font: 600 16px/1.3 var(--display); }
.foot-nav { display: flex; gap: 24px; margin-left: auto; }
.foot-nav a { text-decoration: none; }
.foot-nav a:hover { color: var(--ink); text-decoration: underline; }
.foot-ver { color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ─── внутренние страницы ───────────────────────────────────────────────── */
.page-head { background: var(--ink); color: var(--on-dark); padding: clamp(56px, 7vw, 96px) 0 clamp(40px, 5vw, 64px); }
.page-head h1 { font-size: clamp(44px, 6vw, 76px); color: #fff; }
.page-head p { margin-top: 20px; max-width: 62ch; color: var(--on-dark-2); }
.page-head .link { color: var(--amber); }

.releases .rel { max-width: 1040px; }
.rel { display: grid; grid-template-columns: 170px 1fr; gap: 40px; padding: 0 0 56px; }
.rel + .rel { padding-top: 56px; border-top: 1px solid var(--line); }
.rel-when { display: flex; flex-direction: column; gap: 6px; color: var(--ink-3); font-size: 14px; }
.rel-when .tl-ver { color: var(--ink); font-size: 32px; }
.rel h2 { font-size: clamp(28px, 3vw, 38px); }
.rel-summary { margin-top: 14px; font-size: 18px; color: var(--ink-2); max-width: 62ch; }

.prose { margin-top: 20px; max-width: 70ch; }
.prose h2 { font-size: 26px; margin: 36px 0 12px; }
.prose h3 { font-size: 21px; margin: 28px 0 10px; }
.prose p, .prose li { color: var(--ink-2); }
.prose p + p { margin-top: 14px; }
.prose ul, .prose ol { padding-left: 22px; margin: 12px 0; }
.prose li { margin: 8px 0; }
.prose li::marker { color: var(--amber-deep); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose code { font-size: .9em; background: var(--panel); border: 1px solid var(--hair); padding: 1px 5px; }
.prose a { color: var(--amber-deep); text-underline-offset: 3px; }

.docs { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.toc { position: sticky; top: 100px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: flex; align-items: center; gap: 10px; padding: 8px 0 8px 16px; margin-left: -1px; border-left: 2px solid transparent; text-decoration: none; color: var(--ink-2); font-size: 15px; }
.toc a .ico { color: var(--ink-3); }
.toc a:hover { color: var(--ink); }
.toc a.on { color: var(--ink); border-left-color: var(--amber); font-weight: 600; }
.toc a.on .ico { color: var(--amber-deep); }
.guide { padding-bottom: 56px; }
.guide + .guide { padding-top: 56px; border-top: 1px solid var(--line); }
.guide > h2 { display: flex; align-items: center; gap: 14px; font-size: clamp(30px, 3.2vw, 40px); }
.guide > h2 .ico { color: var(--amber-deep); }
.guide .prose { margin-top: 18px; }
.guide .prose h2 { font-size: 22px; margin-top: 32px; }


/* ─── лендинг: первый экран ─────────────────────────────────────────────── */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.22fr); gap: clamp(32px, 4vw, 56px); align-items: center; }
.badge { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--on-dark-2); border: 1px solid var(--on-dark-line); padding: 6px 12px; }
.beat { width: 8px; height: 8px; background: var(--amber); flex: none; animation: beat 2.2s ease-out infinite; }
@keyframes beat { 0% { box-shadow: 0 0 0 0 rgba(196, 164, 107, .55); } 75% { box-shadow: 0 0 0 12px rgba(196, 164, 107, 0); } 100% { box-shadow: 0 0 0 0 rgba(196, 164, 107, 0); } }
.hl { color: var(--amber); background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 4px; padding-bottom: 4px; animation: sweep .9s 1s cubic-bezier(.6, 0, .2, 1) forwards; }
@keyframes sweep { to { background-size: 100% 4px; } }
.rise-in { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
.d1 { animation-delay: .12s; } .d2 { animation-delay: .26s; } .d3 { animation-delay: .4s; }
.hero-shot { position: relative; padding-bottom: 56px; animation: rise 1.1s .3s cubic-bezier(.2, .7, .2, 1) both; }
.hero-main { border: 1px solid var(--on-dark-line); background: var(--ink-deep); padding: 8px; box-shadow: 0 50px 100px -40px rgba(0, 0, 0, .7); }
.hero-main img, .hero-side img { width: 100%; height: auto; }
.win-bar { display: flex; gap: 6px; padding: 4px 4px 10px; }
.win-bar span { width: 9px; height: 9px; background: #3d4970; }
.hero-side { position: absolute; left: -48px; bottom: 0; width: 46%; border: 1px solid var(--line); background: #fff; padding: 6px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .55); }
.float { animation: float 7s 1.6s ease-in-out infinite; }
.float2 { animation: rise 1s .8s cubic-bezier(.2, .7, .2, 1) both, float2 6s 2s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes float2 { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(10px); } }
.pills { list-style: none; margin: clamp(40px, 5vw, 64px) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pills li { border: 1px solid var(--on-dark-line); padding: 7px 14px; font-size: 14px; color: #d6dbe8; animation: pop .5s calc(.9s + var(--i) * 50ms) cubic-bezier(.2, .7, .2, 1) both; transition: border-color .2s, color .2s, background .2s; }
.pills li:hover { border-color: var(--amber); color: #fff; background: rgba(196, 164, 107, .08); }
@keyframes pop { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
.why { margin-top: 56px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.why > div { padding: 24px 28px 0 0; border-top: 2px solid var(--on-dark-line); }
.why > div + div { padding-left: 28px; }
.why > div:first-child { border-top-color: var(--amber); }
.why h2 { font-size: 24px; line-height: 1.15; color: #fff; }
.why p { margin-top: 10px; font-size: 15px; color: var(--on-dark-2); }

/* ─── лендинг: разделы ─────────────────────────────────────────────────── */
.kicker { font-size: 15px; color: var(--ink-3); margin-bottom: 10px; }
.sec-dark { background: var(--ink); color: var(--on-dark); }
.sec-dark h2 { color: #fff; }
.sec-dark p, .sec-dark .kicker { color: var(--on-dark-2); }
.sec-panel { background: var(--panel); }
.sec-head h2 { max-width: 20ch; }
.sec-head p { margin-top: 20px; max-width: 58ch; font-size: 18px; }
.btn-ghost:hover { border-color: var(--on-dark-2); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; }
.btn { transition: background .2s, border-color .2s, color .2s, transform .2s, box-shadow .2s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -10px rgba(0, 0, 0, .45); }
.lift { transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s; }
.lift:hover { transform: translateY(-6px); box-shadow: 0 40px 70px -40px rgba(16, 47, 92, .55); }

.money-text h2 { font-size: clamp(32px, 3.6vw, 48px); max-width: 16ch; }
.mt-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 16px 20px; border-bottom: 1px solid var(--line); background: var(--panel); }
.mt-title strong { font: 600 18px/1.2 var(--display); }
.mt-title span { font-size: 13px; color: var(--ink-3); }
.money-table { box-shadow: 0 40px 80px -40px rgba(16, 47, 92, .35); }
.js .money-table .mt-row:not(.mt-head) { opacity: 0; transform: translateX(-12px); transition: opacity .5s, transform .5s; transition-delay: calc(.25s + var(--i) * .12s); }
.money-table.in .mt-row:not(.mt-head) { opacity: 1; transform: none; }

.sec-equation h2 { max-width: 22ch; }
.equation { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 18px; margin-top: 56px; font-variant-numeric: tabular-nums; }
.eq-term { display: flex; flex-direction: column; gap: 6px; }
.eq-label { font-size: 14px; color: var(--on-dark-2); }
.eq-num { font: 600 clamp(30px, 3.3vw, 46px)/1 var(--display); color: #fff; white-space: nowrap; }
.eq-op { font-size: 38px; line-height: 1; color: var(--amber); }
.eq-result { background: var(--amber); padding: 14px 18px 12px; animation: glow 2.8s ease-in-out infinite; }
.eq-result .eq-label { color: #3a2c10; }
.eq-result .eq-num { color: var(--ink); }
@keyframes glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(196, 164, 107, 0); } 50% { box-shadow: 0 0 40px 4px rgba(196, 164, 107, .45); } }
.js .equation > * { opacity: 0; transform: translateY(18px); transition: opacity .6s, transform .6s; }
.equation.in > * { opacity: 1; transform: none; }
.equation.in > *:nth-child(2) { transition-delay: .1s; } .equation.in > *:nth-child(3) { transition-delay: .2s; }
.equation.in > *:nth-child(4) { transition-delay: .3s; } .equation.in > *:nth-child(5) { transition-delay: .4s; }
.equation.in > *:nth-child(6) { transition-delay: .5s; } .equation.in > *:nth-child(7) { transition-delay: .6s; }
.equation.in > *:nth-child(8) { transition-delay: .7s; } .equation.in > *:nth-child(9) { transition-delay: .8s; }
.sec-equation .path { margin-top: clamp(56px, 7vw, 88px); }

.roles { margin-top: 44px; }
.tabs { display: flex; gap: 0; border-bottom: 1px solid #d8d1c2; overflow-x: auto; scrollbar-width: none; }
.tabs button { display: inline-flex; align-items: center; gap: 8px; padding: 14px 20px; margin-bottom: -1px; flex: none; background: none; border: 0; border-bottom: 3px solid transparent; cursor: pointer; font: 600 17px/1 var(--display); color: var(--ink-2); transition: color .2s, border-color .2s; }
.tabs button .ico { color: var(--ink-3); }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected='true'] { color: var(--ink); border-bottom-color: var(--amber); }
.tabs button[aria-selected='true'] .ico { color: var(--amber-deep); }
.role-panel { margin-top: 40px; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 40px; align-items: start; }
.role-panel:not([hidden]) { animation: show .4s ease-out; }
.role-panel[hidden] { display: none; }
.role-text h3 { font-size: 32px; line-height: 1.1; }
.role-cap { margin: 26px 0 10px; font-size: 14px; color: var(--ink-3) !important; }
.role-does, .role-auto, .ticks { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.role-auto li::marker, .ticks li::marker { color: var(--amber-deep); }
.role-panel .frame { background: #fff; }
.relay-title { margin-top: 88px; font-size: clamp(26px, 2.6vw, 34px); max-width: 30ch; }
.relay { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-top: 2px solid var(--ink); position: relative; }
.relay::before { content: ''; position: absolute; left: 0; right: 0; top: -2px; height: 2px; background: var(--amber); transform: scaleX(0); transform-origin: 0 50%; transition: transform 1.4s cubic-bezier(.6, 0, .2, 1); }
.relay.in::before, .relay:has(.in)::before { transform: scaleX(1); }
.relay li { padding: 20px 20px 0; border-left: 1px solid var(--line); }
.relay li:first-child { padding-left: 0; border-left: 0; }
.relay-n { display: inline-flex; width: 26px; height: 26px; align-items: center; justify-content: center; background: var(--amber); color: var(--ink); font: 600 14px/1 var(--display); margin-bottom: 10px; }
.relay strong { display: block; font: 600 17px/1.2 var(--display); color: var(--amber-deep); }
.relay p { margin-top: 8px; font-size: 15px; }

.day-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: end; }
.day-clock { font: 600 clamp(96px, 13vw, 180px)/.85 var(--display); letter-spacing: -0.04em; color: var(--amber); font-variant-numeric: tabular-nums; }
.day-head p { margin-top: 18px; max-width: 48ch; font-size: 18px; }
.day { list-style: none; margin: 56px 0 0; padding: 0; border-left: 2px solid var(--amber); display: flex; flex-direction: column; gap: 72px; }
.moment { position: relative; padding-left: 40px; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 32px; align-items: start; }
.moment-dot { position: absolute; left: -7px; top: 18px; width: 12px; height: 12px; background: var(--amber); animation: beat 2.2s ease-out infinite; }
.moment-time { display: block; font: 600 52px/1 var(--display); font-variant-numeric: tabular-nums; }
.moment-who { margin-top: 6px; font-size: 14px; color: var(--ink-3); }
.moment h3 { margin-top: 18px; font-size: 28px; line-height: 1.15; }
.moment p { margin-top: 12px; font-size: 16px; }
.moment-shots { display: flex; flex-direction: column; gap: 24px; }
.moment-shots figure, .proto figure, .proto-pair figure { margin: 0; }
figcaption { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.sec-dark figcaption { color: var(--on-dark-2); }

.proto { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; align-items: center; }
.proto-text h2 { font-size: clamp(32px, 3.6vw, 48px); }
.proto-text > p { margin-top: 20px; font-size: 18px; }
.ticks { margin-top: 24px; gap: 10px; }
.soon { display: inline-flex; align-items: center; gap: 10px; margin-top: 28px; padding: 10px 14px; border: 1px solid var(--line); background: #fff; font-size: 14px; color: var(--ink-2); }
.proto-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; margin-top: 48px; }
.sec-panel .frame { background: #fff; }

.month { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; align-items: center; }
.month h2 { font-size: clamp(32px, 3.4vw, 44px); }
.month p { margin-top: 18px; }
.sec-dark .frame { background: var(--ink-deep); border-color: var(--on-dark-line); }

.sec-cta { background: var(--amber); padding: clamp(48px, 6vw, 72px) 0; }
.sec-cta h2 { font-size: clamp(28px, 3.4vw, 40px); color: var(--ink); }

/* Появление при прокрутке. Без скрипта всё видно сразу. */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0ms); }
.js [data-reveal='left'] { transform: translateX(-48px); }
.js [data-reveal].in { opacity: 1; transform: none; }
.js .lift[data-reveal].in:hover, .js [data-reveal].in .lift:hover { transform: translateY(-6px); }

/* ─── адаптив ───────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .stations { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 18px; }
  .path-wave { display: none; }
}
@media (max-width: 900px) {
  .top-nav { display: none; }
  .btn-login { margin-left: auto; }
  .modules, .money, .news, .docs, .hero-grid, .role-panel, .day-head, .moment, .proto, .proto-pair, .month { grid-template-columns: 1fr; }
  .why { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; }
  .why > div:nth-child(3) { padding-left: 0; }
  .relay { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 24px; }
  .relay li:nth-child(4) { padding-left: 0; border-left: 0; }
  .hero-side { left: -12px; }
  .modules-intro, .toc { position: static; }
  .net-grid { grid-template-columns: 1fr; }
  .net-grid > div, .net-grid > div + div { padding: 24px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .rel { grid-template-columns: 1fr; gap: 12px; }
  .toc ol { display: flex; flex-wrap: wrap; gap: 4px 16px; border-left: 0; }
  .toc a { padding: 6px 0; border-left: 0; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .stations { grid-template-columns: 1fr; gap: 0; border-left: 2px solid var(--amber); margin-left: 4px; }
  .st { padding: 0 0 14px 18px; }
  .st-dot { position: absolute; left: -6px; top: 14px; margin: 0; }
  .st-card { min-height: 0; }
  .modules-list { grid-template-columns: 1fr; gap: 28px; }
  .tl-item { grid-template-columns: 1fr; gap: 8px; }
  .mt-row { grid-template-columns: 1.4fr 1fr .9fr; font-size: 14px; padding: 12px 14px; }
  .mt-row span:nth-child(3), .mt-row span:nth-child(4) { display: none; }
  .foot-nav { margin-left: 0; }
  .why { grid-template-columns: 1fr; }
  .why > div, .why > div + div { padding-left: 0; }
  .relay { grid-template-columns: 1fr; }
  .relay li, .relay li:first-child { padding-left: 0; border-left: 0; }
  .moment { padding-left: 24px; }
  .eq-op { font-size: 30px; }
  .hero-side { left: 8px; width: 42%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal], .js .equation > *, .js .money-table .mt-row, .js .path .st { opacity: 1; transform: none; }
  .hl { background-size: 100% 4px; }
  .relay::before { transform: none; }
  .gallery-panel:not([hidden]), .zoom { animation: none; }
  html { scroll-behavior: auto; }
  .path-pulse { animation: none; stroke-dashoffset: 0; }
  .st { animation: none; opacity: 1; transform: none; }
  .path-spark { display: none; }
}
