/* NiVa · niva.company — одна тема, тёмная: это фирменная основа, как на
   карточках и страницах. Цвета моделей — те же, что в таблицах замеров. */
:root {
  --ground: #07080d;
  --ground-2: #0b0e16;
  --surface: #10141e;
  --surface-2: #151a26;
  --line: #222838;
  --line-2: #2c3446;
  --ink: #f3f2ed;
  --muted: #9aa0b3;
  --dim: #6b7286;
  --accent: #6fd8e8;
  --accent-ink: #062a31;
  --anima: #6098ff;
  --levia: #34c794;
  --lux: #f5ab42;
  --warn: #f08c62;
  --ok: #59d08f;
  --radius: 14px;
  --display: "Ubuntu", "Segoe UI", system-ui, sans-serif;
  --body: "Golos Text", "Segoe UI", system-ui, sans-serif;
  --mono: "Ubuntu Mono", ui-monospace, "Cascadia Mono", monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
/* Точечная сетка — как на карточках и вставках страниц. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: 0;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }

/* ── Шапка ─────────────────────────────────────────────────────────────── */
.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(7, 8, 13, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: 0.01em; }
.brand:hover { text-decoration: none; }
.brand svg { width: 44px; height: auto; display: block; }
.nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav a { color: var(--muted); font-size: 15px; }
.nav a:hover { color: var(--ink); text-decoration: none; }
@media (max-width: 820px) { .nav a.opt { display: none; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 20px;
  border-radius: 10px; border: 1px solid transparent;
  font: 600 16px/1 var(--body);
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, border-color .2s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #8fe3ef; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-sm { height: 38px; padding: 0 14px; font-size: 14px; }
.btn[disabled] { opacity: .55; cursor: default; }

/* ── Метки и заголовки ─────────────────────────────────────────────────── */
.eyebrow {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 14px;
}
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; }
h2 { font-size: clamp(30px, 4vw, 42px); line-height: 1.1; font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 22px; font-weight: 700; }
.lead { font-size: 19px; color: var(--muted); max-width: 60ch; margin: 16px 0 0; }
section { padding: 88px 0; border-top: 1px solid var(--line); }
section.hero { border-top: 0; }
@media (max-width: 640px) { section { padding: 64px 0; } }

/* ── Первый экран ──────────────────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; padding: 72px 0 96px; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; } }
.hero h1 { font-size: clamp(48px, 8vw, 96px); line-height: 0.98; font-weight: 700; letter-spacing: -0.02em; }
.hero h1 .soft { color: var(--accent); }
.hero .lead { font-size: 20px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.note { font-family: var(--mono); font-size: 13px; color: var(--dim); margin-top: 14px; letter-spacing: 0.04em; }
.hero-art { position: relative; aspect-ratio: 1 / 0.8; }
.hero-art .glow {
  position: absolute; inset: 8% 0 0 0;
  background: radial-gradient(closest-side, rgba(111,216,232,0.28), rgba(96,152,255,0.10) 55%, transparent 75%);
  filter: blur(8px);
  animation: breathe 7s ease-in-out infinite;
}
.hero-art svg { position: absolute; left: 0; right: 0; bottom: 12%; width: 100%; height: auto; }
@keyframes breathe { 0%, 100% { opacity: .75; transform: scale(1); } 50% { opacity: 1; transform: scale(1.04); } }
@media (prefers-reduced-motion: reduce) { .hero-art .glow { animation: none; } }
@media (max-width: 900px) { .hero-art { max-width: 420px; aspect-ratio: 1 / 0.6; } }

/* ── Три черты ─────────────────────────────────────────────────────────── */
.traits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 40px; }
.traits > div { background: var(--ground-2); padding: 28px; }
.traits h3 { font-size: 20px; margin-bottom: 8px; }
.traits p { margin: 0; color: var(--muted); font-size: 16px; }
@media (max-width: 820px) { .traits { grid-template-columns: 1fr; } }

/* ── Модели ────────────────────────────────────────────────────────────── */
.models { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 40px; }
@media (max-width: 900px) { .models { grid-template-columns: 1fr; } }
.model {
  position: relative;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px 22px; display: flex; flex-direction: column; gap: 14px;
  overflow: hidden;
}
.model::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--c); }
.model .name { font-family: var(--display); font-weight: 700; font-size: 34px; line-height: 1; color: var(--c); }
.model .name span { color: var(--ink); font-weight: 300; }
.model .tag { font-family: var(--mono); font-size: 13px; color: var(--dim); letter-spacing: 0.08em; text-transform: uppercase; }
.model p { margin: 0; color: var(--muted); font-size: 16px; }
.model ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 15px; }
.model li { display: flex; gap: 10px; }
.model li::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--c); margin-top: 9px; }
.model li.no { color: var(--dim); }
.model li.no::before { background: transparent; border: 1px solid var(--dim); }
.model .facts { display: flex; gap: 22px; padding-top: 14px; border-top: 1px solid var(--line); margin-top: auto; }
.model .facts b { display: block; font-family: var(--display); font-size: 22px; font-variant-numeric: tabular-nums; }
.model .facts small { color: var(--dim); font-size: 13px; }
.model .more { font-size: 15px; }

/* ── Тарифы ────────────────────────────────────────────────────────────── */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 40px; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px; display: flex; flex-direction: column; gap: 14px; }
.plan.main { border-color: rgba(111,216,232,0.45); box-shadow: inset 0 0 0 1px rgba(111,216,232,0.12); }
.plan .title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.plan .title h3 { font-size: 30px; }
.plan .who { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.plan .price { font-family: var(--display); font-size: 40px; font-weight: 300; font-variant-numeric: tabular-nums; }
.plan .price small { font-family: var(--mono); font-size: 14px; color: var(--muted); font-weight: 400; margin-left: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 14px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--c, var(--ink)); }
.plan .big { font-family: var(--display); font-weight: 700; font-size: 34px; font-variant-numeric: tabular-nums; color: var(--c); line-height: 1; }
.plan .sub { color: var(--muted); font-size: 15px; }
.plan .lines { display: grid; gap: 8px; }
.plan .line { display: flex; align-items: baseline; gap: 10px; }
.plan .line .big { font-size: 28px; min-width: 2.6ch; }
.plan p.sub { margin: 0; }
.plan .btn { margin-top: auto; }
.extras { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 18px; }
@media (max-width: 980px) { .extras { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .extras { grid-template-columns: 1fr; } }
.extra { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: var(--ground-2); }
.extra h4 { margin: 0 0 6px; font-family: var(--display); font-size: 17px; }
.extra p { margin: 0; color: var(--muted); font-size: 15px; }
.asof { font-family: var(--mono); font-size: 13px; color: var(--dim); margin-top: 18px; }
.skeleton { background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; border-radius: 8px; color: transparent !important; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }

/* ── Вопросы ───────────────────────────────────────────────────────────── */
.faq { margin-top: 32px; border-top: 1px solid var(--line); max-width: 860px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative; font-weight: 600; font-size: 18px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 16px; font-family: var(--mono); font-size: 24px; color: var(--accent); transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 20px; color: var(--muted); max-width: 70ch; }

/* ── Формы ─────────────────────────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; margin-top: 32px; max-width: 860px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 14px; color: var(--muted); }
.field input, .field select, .field textarea {
  font: 16px/1.4 var(--body); color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 12px 14px; width: 100%;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(111,216,232,0.15); }
.field .help { font-size: 13px; color: var(--dim); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.status { margin-top: 14px; font-size: 15px; min-height: 22px; }
.status.ok { color: var(--ok); }
.status.err { color: var(--warn); }

/* ── Подвал ────────────────────────────────────────────────────────────── */
footer { border-top: 1px solid var(--line); padding: 44px 0 56px; color: var(--dim); font-size: 14px; }
footer .wrap { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 28px; }
@media (max-width: 720px) { footer .wrap { grid-template-columns: 1fr; } }
footer h5 { margin: 0 0 10px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 400; }
footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
footer a { color: var(--muted); }
footer a:hover { color: var(--ink); }

/* ── Профиль ───────────────────────────────────────────────────────────── */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 32px; max-width: 560px; }
@media (max-width: 640px) { .panel { padding: 22px; } }
.panel h2 { font-size: 30px; }
.panel .row { display: flex; gap: 10px; margin-top: 18px; }
.panel .row input { flex: 1; }
.code-input { letter-spacing: 0.4em; font-family: var(--mono) !important; font-size: 24px !important; text-align: center; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; }
.linkish:hover { text-decoration: underline; text-underline-offset: 3px; }
.profile-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; margin-top: 28px; }
@media (max-width: 860px) { .profile-grid { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card h4 { margin: 0 0 14px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); font-weight: 400; }
.card .value { font-family: var(--display); font-size: 30px; font-weight: 700; }
.card .muted { color: var(--muted); font-size: 15px; }
.bar { height: 10px; border-radius: 6px; background: var(--surface-2); overflow: hidden; margin: 8px 0 4px; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
.bar.hot i { background: var(--warn); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 15px; }
.kv dt { color: var(--dim); }
.kv dd { margin: 0; }
.who-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.avatar { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line-2); font-family: var(--display); font-weight: 700; font-size: 22px; color: var(--accent); }
.pill { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); }
.pill.on { color: var(--ok); border-color: rgba(89,208,143,0.4); }
.pill.off { color: var(--warn); border-color: rgba(240,140,98,0.4); }
.profile-hero { padding-top: 56px; min-height: 62vh; }
.muted-p { color: var(--muted); margin: 12px 0 0; max-width: 60ch; }
.switch-row { margin: 18px 0 0; color: var(--dim); font-size: 15px; }
.card .value.dimmed { color: var(--dim); }
.card .btn { margin-top: 14px; }
.card p.muted { margin: 6px 0 0; }
.meters { display: grid; gap: 16px; margin-top: 18px; }
.meter-head { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.meter-head b { font-weight: 500; font-variant-numeric: tabular-nums; }
.muted.small, .small { font-size: 13px; color: var(--dim); }
.chip-off { color: var(--dim) !important; border-style: dashed; }
.who-head h2 { font-size: clamp(26px, 4vw, 34px); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
