/* Nautilus v2 — движение. Значения — из DESIGN.md → MOTION; компоненты берут только --motion-*. */
:root {
  /* tier 1 — примитивы, напрямую не используются */
  --dur-1: 120ms;
  --dur-2: 200ms;
  --dur-3: 420ms;
  --dur-4: 900ms;
  --ease-nautilus-sweep: cubic-bezier(0.7, 0, 0.2, 1);    /* сигнатура: стрелка прибора — рывок и точная остановка */
  --ease-nautilus-ping: cubic-bezier(0.12, 0.7, 0.3, 1);  /* кольцо сонара: вылетает и долго гаснет */
  --ease-nautilus-glow: cubic-bezier(0.33, 1, 0.68, 1);   /* накал золота в камерах */
  --ease-nautilus-tap: cubic-bezier(0.25, 1, 0.5, 1);     /* нажатие */
  --ease-depart: cubic-bezier(0.4, 0, 1, 1);

  /* tier 2 — по смыслу */
  --motion-enter: var(--dur-2) var(--ease-nautilus-glow);
  --motion-exit: calc(var(--dur-2) * 0.65) var(--ease-nautilus-glow);
  --motion-depart: calc(var(--dur-2) * 0.65) var(--ease-depart);
  --motion-hover: var(--dur-1) ease;
  --motion-press: var(--dur-1) var(--ease-nautilus-tap);
  --motion-tint: var(--dur-3) var(--ease-nautilus-glow);
  --motion-draw: var(--dur-4) var(--ease-nautilus-sweep);
  --motion-trace: var(--dur-3) var(--ease-nautilus-sweep);
  --motion-ping: calc(var(--dur-4) * 1.4) var(--ease-nautilus-ping);
  --motion-step: 40ms;
  /* загрузка: когда что начинается (от добавления .is-drawn) */
  --motion-at-rings: 0ms;
  --motion-at-whorls: 120ms;
  --motion-at-septa: 520ms;
  --motion-at-chambers: 760ms;
  --motion-at-leader: 1280ms; /* at-chambers + 10 камер × step + 120 */
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-1: 80ms;
    --dur-2: 120ms;
    --dur-3: 120ms;
    --dur-4: 0ms;
    --motion-step: 0ms;
    --motion-at-rings: 0ms;
    --motion-at-whorls: 0ms;
    --motion-at-septa: 0ms;
    --motion-at-chambers: 0ms;
    --motion-at-leader: 0ms;
  }
  /* мягче, а не выключено: накал камер остаётся — он показывает, что выбрано; кольца и прорисовка уходят */
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* Nautilus v2 — стиль ролика владельца (Nautilius.mp4). Токены и решения — DESIGN.md. Движение — motion.css. */
:root {
  --c-deep: #05070b;
  --c-hull: #0f141c;
  --c-hull-2: #151b25;
  --c-gold: #F9BB3A;
  --c-nacre: #eef2f7;
  --c-silt: #8b97a8;
  --c-sound: #3ddc84;
  --c-line: rgba(255, 255, 255, 0.08);
  --glow-gold: rgba(249, 187, 58, 0.17);
  --light-current: rgba(40, 110, 210, 0.26);
  --f: "Manrope", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;
  --gutter: clamp(20px, 5vw, 72px);
  --r-card: 32px;
  --r-ctl: 18px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--c-deep);
  color: var(--c-nacre);
  font: 500 17px/1.55 var(--f);
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
  position: relative;
}
/* свет как в кадре ролика: золото сверху, холодное течение снизу, точечная сетка */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 40% at 62% 8%, var(--glow-gold), transparent 70%),
    radial-gradient(45% 35% at 12% 100%, var(--light-current), transparent 70%),
    radial-gradient(rgba(255, 255, 255, 0.05) 1.4px, transparent 1.5px) 0 0 / 46px 46px;
}
h1, h2, h3, p, ol, ul, figure { margin: 0; }
a { color: inherit; }
::selection { background: var(--c-gold); color: var(--c-deep); }
:focus-visible { outline: 2px solid var(--c-gold); outline-offset: 2px; border-radius: 4px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--gutter); top: -60px; padding: 10px 14px; background: var(--c-gold); color: var(--c-deep); border-radius: 10px; font-weight: 700; }
.skip:focus { top: 10px; }
h2 { font: 800 clamp(30px, 3.4vw, 44px)/1.08 var(--f); letter-spacing: -0.02em; }

/* --- шапка */
.top { display: flex; align-items: center; justify-content: space-between; padding: 22px var(--gutter) 0; }
.brand { display: inline-flex; align-items: center; gap: 12px; font: 800 1.5rem/1 var(--f); letter-spacing: -0.01em; text-decoration: none; }
.brand img { width: 48px; height: auto; }
.langs { display: flex; gap: 2px; font-size: 0.95rem; font-weight: 700; }
.langs a { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; color: var(--c-silt); text-decoration: none; }
.langs a[aria-current="page"] { color: var(--c-gold); }

/* --- первый экран: текст слева, прибор-раковина справа */
.hero {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center;
  gap: clamp(24px, 4vw, 64px);
  padding: clamp(20px, 5vh, 56px) var(--gutter) clamp(48px, 8vh, 96px);
  min-height: min(88vh, 920px);
}
h1 { font: 800 clamp(44px, 6.2vw, 92px)/1.0 var(--f); letter-spacing: -0.035em; max-width: 11ch; text-shadow: 0 4px 30px rgba(0, 0, 0, 0.6); }
.sub { margin-top: 22px; max-width: 34em; font-size: 1.15rem; color: #c6cedb; }
.services { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.svc {
  display: inline-grid; place-items: center; min-height: 46px; padding: 0 18px;
  border-radius: 14px; background: var(--c-hull-2); border: 1px solid var(--c-line);
  font-weight: 700; text-decoration: none; cursor: pointer;
  transition: background-color var(--motion-hover), color var(--motion-hover), border-color var(--motion-hover);
}
.svc[aria-pressed="true"] { background: var(--c-gold); color: var(--c-deep); border-color: var(--c-gold); }
.svc:active { transform: scale(0.97); transition: transform var(--motion-press); }
.ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 30px; }
.cta {
  display: inline-grid; place-items: center; min-height: 60px; padding: 0 30px;
  border-radius: var(--r-ctl); background: var(--c-gold); color: var(--c-deep);
  font: 800 1.1rem/1.2 var(--f); text-decoration: none; text-align: center;
  box-shadow: 0 10px 40px rgba(249, 187, 58, 0.28);
}
.cta:active { transform: scale(0.97); transition: transform var(--motion-press); }
.text-link { color: var(--c-nacre); font-weight: 700; text-underline-offset: 5px; text-decoration-thickness: 1px; min-height: 44px; display: inline-grid; place-items: center; }

/* --- раковина-прайс */
.plate { position: relative; }
.shell { display: block; width: 100%; height: auto; overflow: visible; }
.ring { fill: none; stroke: var(--c-gold); stroke-width: 2.4; vector-effect: non-scaling-stroke; opacity: 0.85;
  transform-box: fill-box; transform-origin: center; }
.ring:nth-child(2) { opacity: 0.4; }
.shell-body { fill: var(--c-gold); fill-opacity: 0.06; }
.chamber { fill: var(--c-gold); fill-opacity: 0;
  transition: fill-opacity var(--motion-tint); transition-delay: calc(var(--load, 0ms) + var(--i) * var(--motion-step)); }
/* на витрине доставка всегда 60–100% (порог бота) — шкала растянута на этот диапазон, иначе 60% и 87% неотличимы */
.chamber { --glow: clamp(0, (var(--rate) - 0.55) / 0.45, 1); }
.chamber.is-filled { fill-opacity: calc(0.08 + 0.62 * var(--glow)); }
.chamber.is-best { fill-opacity: calc(0.3 + 0.62 * var(--glow)); }
.septum { fill: none; stroke: var(--c-gold); stroke-opacity: 0.62; stroke-width: 7; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.whorls { filter: drop-shadow(0 0 6px rgba(249, 187, 58, 0.45)); }
.whorl { fill: none; stroke: var(--c-gold); stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.shell-dot { fill: #fff; filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.7)); }
.leader { fill: none; stroke: var(--c-nacre); stroke-opacity: 0.75; stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 0; }
.leader-dot { fill: var(--c-deep); stroke: var(--c-nacre); stroke-width: 3; }

/* загрузка — единственный оркестрованный момент: кольца → витки → перегородки → камеры от устья → выноска.
   Без JS (.js нет) раковина просто нарисована. */
.js .shell:not(.is-drawn) .ring { opacity: 0; transform: scale(0.6); }
.js .shell:not(.is-drawn) .whorl, .js .shell:not(.is-drawn) .septum, .js .shell:not(.is-drawn) .leader { stroke-dashoffset: 1; }
.js .shell:not(.is-drawn) .chamber { fill-opacity: 0; }
.js .shell:not(.is-drawn) .shell-body, .js .shell:not(.is-drawn) .shell-dot, .js .shell:not(.is-drawn) .leader-dot { opacity: 0; }
.js .plate:not(.is-drawn) .callout { opacity: 0; }
.ring { transition: opacity var(--motion-ping), transform var(--motion-ping); transition-delay: calc(var(--motion-at-rings) + var(--i) * 3 * var(--motion-step)); }
.whorl { transition: stroke-dashoffset var(--motion-draw); transition-delay: var(--motion-at-whorls); }
.septum { transition: stroke-dashoffset var(--motion-trace); transition-delay: calc(var(--motion-at-septa) + var(--i) * var(--motion-step)); }
.shell-body, .shell-dot { transition: opacity var(--motion-tint); transition-delay: var(--motion-at-septa); }
.leader { transition: stroke-dashoffset var(--motion-trace); transition-delay: var(--leader-at, 0ms); }
.leader-dot { transition: opacity var(--motion-enter); transition-delay: var(--leader-at, 0ms); }
.callout { transition: opacity var(--motion-enter); transition-delay: var(--leader-at, 0ms); }

/* сигнатура — смена сервиса: кольцо сонара проходит по раковине, камеры перегорают от устья, выноска гаснет и прорисовывается */
.shell.is-sweeping .ring:first-child { animation: sweep var(--motion-ping); }
@keyframes sweep { from { transform: scale(0.45); opacity: 1; stroke-width: 6; } }
.shell.is-swapping .leader { stroke-dashoffset: 1; transition: stroke-dashoffset var(--motion-exit); transition-delay: 0ms; }
.shell.is-swapping .leader-dot { opacity: 0; transition: opacity var(--motion-exit); transition-delay: 0ms; }
.callout.is-swapping { opacity: 0; transition: opacity var(--motion-exit); transition-delay: 0ms; }

/* подпись сидит на горизонтали выноски (15% высоты), прижата вправо */
.plate figcaption { position: absolute; right: 0; bottom: 85.6%; max-width: 70%; text-align: right; }
/* текст ближе к линии, пометка над ним — линия не режет буквы */
.callout { display: flex; flex-direction: column-reverse; gap: 2px; padding-bottom: 8px; }
.callout-text { font: 800 1.45rem/1.2 var(--f); color: var(--c-gold); overflow-wrap: anywhere; }
/* кольцо радара проходит под подписью — подложка цвета глубины, чтобы буквы не резались линией */
.callout-text, .callout-note { text-shadow: 0 0 10px var(--c-deep), 0 0 4px var(--c-deep), 0 0 2px var(--c-deep); }
.callout-note { color: var(--c-silt); font-size: 0.92rem; font-weight: 600; }
.caption { margin-top: 6px; color: var(--c-silt); font-size: 0.95rem; max-width: 46ch; margin-inline: auto; text-align: center; }

/* --- шаги + телефон с чатом бота */
.steps {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 80px); align-items: center;
  padding: clamp(56px, 9vh, 110px) var(--gutter);
}
.steps ol { list-style: none; padding: 0; margin-top: 34px; display: grid; gap: 30px; }
.steps li { display: grid; grid-template-columns: 64px 1fr; column-gap: 18px; }
.step-n { grid-row: span 2; font: 800 1.6rem/1.2 var(--f); color: var(--c-gold); }
.steps h3 { font: 800 1.35rem/1.25 var(--f); }
.steps li p { color: var(--c-silt); margin-top: 6px; max-width: 44ch; }
.phone { perspective: 1800px; justify-self: center; width: min(100%, 360px); }
.screen {
  aspect-ratio: 9 / 18.5; border-radius: 52px; padding: 12px; background: #1a1f27;
  box-shadow: inset 0 0 0 2px #3a4250, 0 50px 100px rgba(0, 0, 0, 0.7);
  transform: rotateX(8deg) rotateY(-14deg) rotateZ(1.5deg);
  display: flex; flex-direction: column; overflow: hidden;
  font-family: var(--f);
}
.tg-bar { display: flex; align-items: center; gap: 12px; padding: 34px 16px 12px; background: #17212b; border-radius: 42px 42px 0 0; }
.tg-ava svg { width: 42px; height: 42px; display: block; }
.tg-bar b { display: block; font-weight: 700; font-size: 0.98rem; }
.tg-bar small { color: #6d7f92; font-size: 0.8rem; }
.tg-chat { flex: 1; background: #0e1621; border-radius: 0 0 42px 42px; padding: 14px 12px 22px; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; }
.tg-msg { background: #182533; border-radius: 16px 16px 16px 6px; padding: 10px 12px; font-size: 0.8rem; line-height: 1.4; }
.tg-msg code { font: 700 0.8rem var(--f-mono); color: #7cc4ff; }
.tg-msg.is-code { border: 1.5px solid var(--c-gold); box-shadow: 0 0 24px rgba(249, 187, 58, 0.2); }
.tg-msg.is-code code { color: var(--c-gold); font-size: 1.05rem; }
.tg-kb { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tg-btn { display: grid; place-items: center; min-height: 34px; border-radius: 10px; background: rgba(90, 130, 170, 0.22); font-size: 0.76rem; font-weight: 700; }
.tg-btn.is-on { background: var(--c-gold); color: var(--c-deep); }

/* --- цены: карточка крупного плана с золотой рамкой */
.prices { padding: clamp(40px, 7vh, 90px) var(--gutter); }
.prices-table {
  max-width: 860px; margin-inline: auto; padding: clamp(22px, 3vw, 40px);
  border-radius: var(--r-card); background: linear-gradient(180deg, #121823, #0b0f16);
  border: 2px solid var(--c-gold); box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6), 0 0 60px rgba(249, 187, 58, 0.1);
}
.js .prices-table:not(.is-current) { display: none; }
.prices-table + .prices-table { margin-top: 48px; }
.js .prices-table + .prices-table { margin-top: 0; }
.prices-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 20px; }
.prices-head h3 { font: 800 1.6rem/1.2 var(--f); }
.snapshot { color: var(--c-silt); font-size: 0.9rem; }
table { width: 100%; border-collapse: collapse; margin-top: 16px; }
th, td { text-align: left; padding: 0 8px; height: 54px; border-top: 1px solid var(--c-line); font-weight: 600; }
thead th { color: var(--c-silt); font-size: 0.85rem; font-weight: 700; height: 40px; border-top: 0; }
tbody th { font-weight: 700; }
td:nth-child(2) { text-align: right; white-space: nowrap; }
th:nth-child(3), td:nth-child(3) { width: 42%; }
.rate { display: grid; grid-template-columns: 1fr 3.2em; align-items: center; gap: 12px; color: var(--c-sound); font-weight: 700; text-align: right; }
.rate .bar { height: 10px; border-radius: 5px; background: linear-gradient(var(--c-sound), var(--c-sound)) 0 0 / calc(var(--rate) * 100%) 100% no-repeat, rgba(255, 255, 255, 0.08); }
.rate.is-none { display: inline; color: var(--c-silt); }
.more summary { cursor: pointer; list-style: none; padding: 14px 8px; color: var(--c-gold); font-weight: 700; min-height: 44px; }
.more summary::-webkit-details-marker { display: none; }
.more[open] summary { display: none; }
.more[open] table { animation: answer-in var(--motion-enter); margin-top: 0; }
.more table tr:first-child th, .more table tr:first-child td { border-top: 1px solid var(--c-line); }
.empty { margin-top: 18px; color: var(--c-silt); }
.prices-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 26px; }

/* --- оплата и вопросы */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); padding: clamp(40px, 7vh, 90px) var(--gutter); }
.pay h2, .faq h2 { margin-bottom: 22px; }
.pay p { color: #c6cedb; max-width: 48ch; margin-top: 12px; }
.pay-card { padding: 24px; border-radius: 24px; background: var(--c-hull); border: 1px solid var(--c-line); margin-bottom: 8px; }
.chips { display: flex; gap: 8px; }
.chip { padding: 6px 14px; border-radius: 10px; background: rgba(249, 187, 58, 0.12); color: var(--c-gold); font-weight: 800; font-size: 0.9rem; }
.amt-label { color: var(--c-silt) !important; font-size: 0.9rem; margin-top: 18px !important; }
/* суммы — справка, не кнопки: пополняют в боте, на сайте нажимать нечего */
.amts { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 6px; }
.amt { font: 800 1.6rem var(--f); color: var(--c-nacre); }
.faq details { border-top: 1px solid var(--c-line); }
.faq details:last-of-type { border-bottom: 1px solid var(--c-line); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center; min-height: 60px; padding: 12px 0; font-weight: 700; font-size: 1.05rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--c-gold); font-size: 1.5rem; font-weight: 600; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 0 20px; color: var(--c-silt); max-width: 52ch; }
.faq details[open] p { animation: answer-in var(--motion-enter); }
@keyframes answer-in { from { opacity: 0; } }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 32px; padding: 40px var(--gutter) 56px; color: var(--c-silt); font-size: 0.92rem; border-top: 1px solid var(--c-line); }
.foot a { color: var(--c-nacre); font-weight: 700; }
.sticky-cta { display: none; }

@media (hover: hover) and (pointer: fine) {
  .svc:hover:not([aria-pressed="true"]) { border-color: rgba(249, 187, 58, 0.6); }
  .cta:hover { background: #ffc955; }
  .text-link:hover, .foot a:hover { color: var(--c-gold); }
  tbody tr:hover { background: var(--c-hull-2); }
  .faq summary:hover { color: var(--c-gold); }
}

@media (max-width: 960px) {
  /* порядок брифа: заголовок → раковина → подзаголовок → сервисы → CTA; minmax(0) — лента сервисов не распирает колонку */
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .hero-text { display: contents; }
  .hero h1 { order: 1; }
  .plate { order: 2; max-width: 560px; width: 100%; margin-inline: auto; }
  .sub { order: 3; margin-top: 0; }
  .services { order: 4; margin-top: 4px; }
  .ctas { order: 5; margin-top: 4px; }
  .caption { order: 6; text-align: left; margin-inline: 0; }
  .sticky-cta {
    display: grid; place-items: center; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 10;
    min-height: 56px; border-radius: var(--r-ctl); background: var(--c-gold); color: var(--c-deep);
    font: 800 1.05rem var(--f); text-decoration: none; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    transform: translateY(calc(100% + 24px)); transition: transform var(--motion-depart);
  }
  .sticky-cta.is-shown { transform: translateY(0); transition: transform var(--motion-enter); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .hero { padding-top: 8px; gap: 12px; }
  .plate figcaption { max-width: 100%; }
  .callout-text { font-size: 1.12rem; }
  .caption { font-size: 0.85rem; }
  .callout-note { font-size: 0.8rem; }
  .services { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(-1 * var(--gutter)); padding: 0 var(--gutter) 4px; scrollbar-width: none; }
  .services::-webkit-scrollbar { display: none; }
  .svc { flex: none; }
  .cta { width: 100%; }
  th:nth-child(3), td:nth-child(3) { width: 38%; }
  .rate { grid-template-columns: 1fr; gap: 4px; font-size: 0.85rem; }
}
@media (max-width: 960px) and (prefers-reduced-motion: reduce) {
  .sticky-cta, .sticky-cta.is-shown { transform: none; transition: opacity var(--motion-enter), visibility var(--motion-enter); }
  .sticky-cta { opacity: 0; visibility: hidden; }
  .sticky-cta.is-shown { opacity: 1; visibility: visible; }
}
