/* ============================================================
   astroanalytic.ru — единая дизайн-система (wave22, 2026-07)
   Палитра ink+lime сохранена. Один текстовый шрифт: Inter
   (кириллица). Моно — только для числовых данных расчётов.
   ============================================================ */

/* латиница — вариативный файл; кириллица — сабсеты по весам (unicode-range) */
@font-face { font-family: 'Inter'; src: url('/static/fonts/Inter-Variable.woff2') format('woff2');
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; src: url('/static/fonts/Inter-Regular-cyrillic.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; src: url('/static/fonts/Inter-SemiBold-cyrillic.woff2') format('woff2');
  font-weight: 500 600; font-style: normal; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; src: url('/static/fonts/Inter-Bold-cyrillic.woff2') format('woff2');
  font-weight: 700 900; font-style: normal; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'JetBrains Mono'; src: url('/static/fonts/JetBrainsMono-Regular-cyrillic.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('/static/fonts/JetBrainsMono-Medium-cyrillic.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap; }

:root {
  --ink: #0b0d12;
  --surf: #11131b;
  --surf2: #171a24;
  --card: #1a1d28;
  --card2: #20232f;
  --fog: #eceef3;
  --dim: #9aa0b4;
  --faint: #6a7088;
  --line: rgba(255,255,255,0.08);
  --line2: rgba(255,255,255,0.14);
  --lime: #d9f85f;
  --lime-soft: rgba(217,248,95,0.12);
  --cyan: #7dd3fc;
  --rose: #f4b8a8;
  --violet: #c4b5fd;
  --font: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --r-card: 16px;
  --r-btn: 12px;
  --shadow-card: 0 20px 40px -24px rgba(0,0,0,.6);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--ink); color: var(--fog);
  font-family: var(--font); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 860px; margin: 0 auto; padding: 0 20px; }

/* ── header ─────────────────────────────────────────────── */
.site-head { border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50;
  background: rgba(11,13,18,0.88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.site-head .row { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand .mk { width: 26px; height: 26px; background: var(--lime); border-radius: 8px; display: grid; place-items: center; }
.brand .mk i { width: 9px; height: 9px; border-radius: 50%; background: var(--ink); display: block; }
.brand .nm { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; color: var(--fog); }
.brand .nm span { color: var(--dim); font-weight: 400; }
.site-nav { display: none; align-items: center; gap: 26px; }
.site-nav a { font-size: 14px; color: var(--dim); text-decoration: none; transition: color .15s; }
.site-nav a:hover { color: var(--fog); }
.head-cta { display: none; }
@media (min-width: 880px) {
  .site-nav { display: flex; }
  .head-cta { display: inline-flex; }
}
.burger { display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 10px; background: none; border: 1px solid var(--line2);
  border-radius: 10px; cursor: pointer; }
.burger span { display: block; height: 2px; background: var(--fog); border-radius: 2px; transition: transform .2s, opacity .2s; }
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (min-width: 880px) { .burger { display: none; } }

.m-menu { display: none; position: fixed; inset: 60px 0 0 0; z-index: 49; background: var(--ink);
  overflow-y: auto; padding: 10px 20px 40px; }
.m-menu.open { display: block; }
.m-menu a.item { display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 15px 2px; border-bottom: 1px solid var(--line); text-decoration: none; }
.m-menu a.item .t { font-size: 16px; font-weight: 600; }
.m-menu a.item .d { font-size: 13px; color: var(--dim); margin-top: 1px; }
.m-menu a.item .go { color: var(--lime); flex: none; }
.m-menu .cap { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint);
  margin: 22px 0 4px; font-weight: 600; }

/* ── buttons ────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font); font-size: 15px; font-weight: 700; text-decoration: none;
  border-radius: var(--r-btn); padding: 13px 22px; cursor: pointer; border: none;
  transition: transform .15s, background .15s, border-color .15s; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-lime { background: var(--lime); color: var(--ink); }
.btn-lime:hover { background: #e4ff7a; }
.btn-ghost { background: transparent; color: var(--fog); border: 1px solid var(--line2); font-weight: 600; }
.btn-ghost:hover { border-color: var(--lime); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; transform: none; }

/* ── cards (паттерн со скрина владельца — сохранён) ─────── */
.tool-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 700px) { .tool-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; } }
@media (min-width: 980px) { .tool-grid { grid-template-columns: repeat(3, 1fr); } }
.tool-card { position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px;
  padding: 15px 16px; text-decoration: none; border: 1px solid var(--line2); border-radius: var(--r-card);
  background: var(--surf2); transition: border-color .2s, transform .15s, box-shadow .2s;
  -webkit-tap-highlight-color: transparent; }
.tool-card:active { transform: scale(.985); }
.tool-card__wm { display: none; }
.tool-card__ic { flex: none; width: 50px; height: 50px; border-radius: 14px; background: var(--lime);
  color: var(--ink); display: grid; place-items: center; font-size: 24px; box-shadow: 0 6px 16px -6px rgba(217,248,95,.5); }
.tool-card__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tool-card__t { font-size: 16px; font-weight: 700; color: var(--fog); }
.tool-card__d { font-size: 13.5px; color: var(--dim); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tool-card__foot { display: none; }
.tool-card__chev { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line2);
  display: grid; place-items: center; color: var(--lime); transition: background .2s, border-color .2s, color .2s; }
.tool-card:hover .tool-card__chev, .tool-card:active .tool-card__chev {
  background: var(--lime); border-color: var(--lime); color: var(--ink); }
@media (min-width: 700px) {
  .tool-card { flex-direction: column; align-items: flex-start; gap: 0; min-height: 196px; padding: 22px;
    background: radial-gradient(135% 130% at 100% 0%, rgba(217,248,95,.07), transparent 55%), var(--surf2); }
  .tool-card:hover { border-color: var(--lime); transform: translateY(-3px); box-shadow: 0 20px 40px -22px rgba(217,248,95,.6); }
  .tool-card__chev { display: none; }
  .tool-card__wm { display: block; position: absolute; right: -12px; top: -30px; font-size: 128px; line-height: 1;
    color: var(--lime); opacity: .07; pointer-events: none; transition: opacity .25s, transform .4s; }
  .tool-card:hover .tool-card__wm { opacity: .15; transform: rotate(-7deg) scale(1.06); }
  .tool-card__ic { position: relative; width: 52px; height: 52px; border-radius: 15px; font-size: 25px; margin-bottom: 15px; }
  .tool-card__body { flex: 1; width: 100%; }
  .tool-card__t { position: relative; font-size: 18px; }
  .tool-card__d { position: relative; white-space: normal; overflow: visible; }
  .tool-card__foot { position: relative; display: flex; width: 100%; margin-top: auto; padding-top: 14px;
    align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); }
  .tool-card__spec { font-size: 12px; letter-spacing: .02em; color: var(--dim); white-space: nowrap; }
  .tool-card__go { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 700; color: var(--lime); white-space: nowrap; }
  .tool-card__go svg { transition: transform .2s; }
  .tool-card:hover .tool-card__go svg { transform: translateX(4px); }
}

/* ── generic blocks ─────────────────────────────────────── */
.section { padding: 52px 0 8px; }
.section > h2, h2.sec-title { font-size: clamp(22px, 4.4vw, 30px); font-weight: 700; letter-spacing: -0.02em; margin: 0 0 8px; }
.sec-sub { color: var(--dim); font-size: 15.5px; max-width: 640px; margin: 0 0 22px; }

.panel { background: var(--surf); border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px 22px; }
.panel h3 { margin: 0 0 8px; font-size: 16.5px; }
.panel p { margin: 0; font-size: 14.5px; color: var(--dim); }

details.faq { border: 1px solid var(--line); border-radius: 12px; padding: 0 18px; margin-bottom: 10px; background: var(--surf); }
details.faq summary { cursor: pointer; padding: 16px 0; font-size: 15.5px; font-weight: 600; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; color: var(--lime); font-size: 20px; flex: none; }
details.faq[open] summary::after { content: "–"; }
details.faq p { margin: 0 0 17px; color: var(--dim); font-size: 14.5px; }

/* ── forms ──────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; position: relative; }
.field label { font-size: 13px; color: var(--dim); font-weight: 500; }
.field input {
  background: var(--ink); border: 1px solid var(--line2); border-radius: 11px;
  color: var(--fog); font-size: 16px; padding: 13px 14px; width: 100%; outline: none;
  font-family: var(--font); transition: border-color .16s, box-shadow .16s;
}
.field input::placeholder { color: #5a6076; }
.field input:focus { border-color: var(--lime); box-shadow: 0 0 0 3px rgba(217,248,95,.14); }
.field input[aria-invalid="true"] { border-color: var(--rose); }
.err { font-size: 12.5px; color: var(--rose); min-height: 0; }

/* числовые данные расчётов */
.num-data { font-family: var(--mono); font-size: 0.92em; }

/* ── footer ─────────────────────────────────────────────── */
.site-foot { border-top: 1px solid var(--line); margin-top: 56px; padding: 34px 0 46px;
  color: var(--dim); font-size: 13.5px; }
.site-foot .cols { display: grid; grid-template-columns: 1fr; gap: 22px; margin-bottom: 26px; }
@media (min-width: 760px) { .site-foot .cols { grid-template-columns: 1.2fr 1fr 1fr; } }
.site-foot .cap { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint);
  font-weight: 600; margin-bottom: 10px; }
.site-foot a { color: var(--dim); text-decoration: none; }
.site-foot a:hover { color: var(--fog); }
.site-foot .links a { display: block; padding: 3.5px 0; }
.site-foot .fine { border-top: 1px solid var(--line); padding-top: 18px; font-size: 12.5px; color: var(--faint); line-height: 1.7; }
.site-foot .fine a { color: var(--faint); text-decoration: underline; text-underline-offset: 2px; }
