/* Poisen Cloud — концепт v3. Чистый чёрный, белый, частицы. */

:root {
  --bg: #000000;
  --bg-2: #0B0B0B;
  --bg-3: #141414;
  --panel: rgba(255, 255, 255, 0.035);
  --panel-2: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.18);
  --ink: #FFFFFF;
  --muted: #9B9B9B;
  --dim: #5E5E5E;
  --berry: #FFFFFF;
  --berry-hover: #E4E4E4;
  --berry-ink: #000000;
  --violet: #7A7A7A;
  --money: #7CE8AE;
  --money-soft: rgba(124, 232, 174, 0.1);
  --amber: #FFB547;
  --amber-soft: rgba(255, 181, 71, 0.1);
  --glass: rgba(255, 255, 255, 0.05);
  --glass-line: rgba(255, 255, 255, 0.4);
  --liquid: #FFFFFF;
  --liquid-2: #FFFFFF;
  --log-bg: #050505;

  --display: "Manrope", system-ui, sans-serif;
  --wordmark: "Unbounded", "Manrope", sans-serif;
  --ui: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

  --wrap: 1240px;
  --gutter: 32px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 500 16px/1.6 var(--ui);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 8px; }
::selection { background: #fff; color: #000; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
@media (max-width: 640px) { :root { --gutter: 16px; } }

/* ---------- Типографика ---------- */
h1, h2 { font-family: var(--display); margin: 0; letter-spacing: -0.035em; }
h1 { font-size: clamp(44px, 6.6vw, 96px); line-height: .98; font-weight: 300; }
h1 b, h2 b { font-weight: 800; }
h2 { font-size: clamp(32px, 4.2vw, 56px); line-height: 1.02; font-weight: 300; }
h3 { font: 700 19px/1.3 var(--ui); margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
.lead { font-size: 18px; line-height: 1.6; color: var(--muted); max-width: 32em; }
.muted { color: var(--muted); }
.small { font-size: 14px; line-height: 1.45; }
.kicker { font: 400 12px/1.4 var(--mono); color: var(--muted); letter-spacing: .14em; text-transform: uppercase; }
.num { font-family: var(--display); font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 28px;
  border: 1px solid transparent; border-radius: 999px;
  font: 700 15px/1 var(--ui); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s, transform .15s;
}
.btn-primary { background: #fff; color: #000; }
.btn-primary:hover { background: #E4E4E4; }
.btn-ghost {
  background: linear-gradient(135deg, rgba(255,255,255,.14), rgba(255,255,255,.04));
  -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
  border-color: rgba(255,255,255,.16); color: #fff;
  box-shadow: inset 0 1px 1px rgba(255,255,255,.3), 0 10px 30px -12px rgba(0,0,0,.8);
}
.btn-ghost:hover { background: linear-gradient(135deg, rgba(255,255,255,.2), rgba(255,255,255,.07)); border-color: rgba(255,255,255,.3); }
.btn-primary { box-shadow: inset 0 -2px 6px rgba(0,0,0,.12), 0 10px 30px -10px rgba(255,255,255,.35); }
.btn-quiet { background: transparent; color: var(--muted); padding: 0 14px; }
.btn-quiet:hover { color: #fff; }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 14px; }
.btn-danger { background: transparent; border-color: var(--line-2); color: #fff; }
.btn-danger:hover { border-color: #FF6B6B; color: #FF6B6B; }
.btn-round { width: 44px; min-height: 44px; padding: 0; border: 1px solid var(--line-2); background: transparent; color: #fff; }
.btn-round:hover { border-color: #fff; }

/* ---------- Стекло (как Liquid Glass в iOS) ---------- */
.glass {
  position: relative;
  background: linear-gradient(135deg, rgba(255,255,255,.11), rgba(255,255,255,.035) 45%, rgba(255,255,255,.06));
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,.28),
    inset 0 -1px 1px rgba(255,255,255,.05),
    0 30px 60px -30px rgba(0,0,0,.9);
  isolation: isolate;
}
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 1;
  background: linear-gradient(150deg, rgba(255,255,255,.6), rgba(255,255,255,.1) 30%, rgba(255,255,255,0) 55%, rgba(255,255,255,.08) 75%, rgba(255,255,255,.4));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.glass::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 0;
  background: radial-gradient(260px circle at var(--mx, 20%) var(--my, -10%), rgba(255,255,255,.15), transparent 62%);
}
.glass > * { position: relative; z-index: 2; }

/* ---------- Нажатия: пружина, волна, выбор ---------- */
.btn, .seg, .seg button, .plan, .kb button, .scen button, .tabs button, .inst, .faq summary {
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
}
.seg button:focus, .seg button:focus-visible { outline: none; }
.seg button:focus-visible:not([aria-checked="true"]):not([aria-selected="true"]) { box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
.plan:focus { outline: none; }
.plan:focus-visible:not(.selected) { box-shadow: inset 0 1px 1px rgba(255,255,255,.3), 0 0 0 1px rgba(255,255,255,.5); }
.fx { transition: scale .5s cubic-bezier(.34, 1.56, .64, 1), box-shadow .3s, background-color .2s, color .2s; }
.fx.is-down { scale: .965; transition: scale .12s ease-out, box-shadow .3s, background-color .2s; }
.btn.fx.is-down, .seg button.fx.is-down, .kb button.fx.is-down { scale: .93; }
.btn { position: relative; overflow: hidden; isolation: isolate; }
.ripple, .glass > .ripple {
  position: absolute; z-index: 3; border-radius: 50%; pointer-events: none;
  transform: translate(-50%, -50%) scale(0); opacity: 1;
  background: radial-gradient(circle, rgba(255,255,255,.38), rgba(255,255,255,.12) 40%, rgba(255,255,255,0) 70%);
  animation: ripple .75s cubic-bezier(.2, .7, .3, 1) forwards;
}
.ripple.dark, .glass > .ripple.dark { background: radial-gradient(circle, rgba(0,0,0,.22), rgba(0,0,0,.06) 40%, rgba(0,0,0,0) 70%); }
@keyframes ripple { to { transform: translate(-50%, -50%) scale(1); opacity: 0; } }

.tilt { transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0px)); transition: transform .5s cubic-bezier(.2, .8, .2, 1), scale .5s cubic-bezier(.34, 1.56, .64, 1), box-shadow .3s; }
.tilt.is-moving { transition: transform .08s linear, scale .5s cubic-bezier(.34, 1.56, .64, 1), box-shadow .3s; }

.plan.selected, .plan.hot.selected { box-shadow: inset 0 1px 1px rgba(255,255,255,.45), 0 0 0 2px #fff, 0 0 40px -6px rgba(255,255,255,.45), 0 40px 100px -40px rgba(255,255,255,.4); }
.plan.selected .btn { animation: nudge .6s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes nudge { 40% { scale: 1.05; } }
.plan .chosen { position: absolute; top: 22px; right: 22px; z-index: 4; display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px; background: #fff; color: #000; font: 800 11px/1 var(--ui); animation: pop-in .45s cubic-bezier(.34, 1.56, .64, 1) both; }
@keyframes pop-in { from { scale: .6; opacity: 0; } }

/* Подсветка за стеклом, иначе на чистом чёрном его не видно */
.ambient { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
/* Мягкие пятна света: градиент вместо filter: blur(80px) — выглядит так же, а видеокарте в разы легче */
.ambient i { position: absolute; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.9) 0, rgba(255,255,255,.35) 35%, rgba(255,255,255,0) 70%); opacity: .07; animation: drift 28s ease-in-out infinite alternate; will-change: transform; }
.ambient i:nth-child(1) { width: 520px; height: 520px; left: -140px; top: 30%; }
.ambient i:nth-child(2) { width: 420px; height: 420px; right: -120px; top: 65%; opacity: .06; animation-duration: 34s; }
.ambient i:nth-child(3) { width: 300px; height: 300px; left: 40%; top: 110%; opacity: .05; animation-duration: 40s; }
@keyframes drift { to { transform: translate(80px, -120px); } }

/* ---------- Шапка: плавающая стеклянная капсула ---------- */
.site-head { position: sticky; top: 0; z-index: 20; padding: 14px var(--gutter) 0; }
.site-head > .wrap { display: flex; align-items: center; gap: 36px; max-width: calc(var(--wrap) - 2 * var(--gutter)); padding: 8px 8px 8px 22px; border-radius: 999px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-name { font: 600 15px/1 var(--wordmark); letter-spacing: .06em; text-transform: uppercase; }
.brand svg { width: 30px; height: 30px; flex: none; filter: drop-shadow(0 4px 16px rgba(255,255,255,.18)); }
.brand .led { animation: led 2.4s ease-in-out infinite; }
.brand .led:nth-of-type(2) { animation-delay: .4s; }
.brand .led:nth-of-type(3) { animation-delay: .8s; }
@keyframes led { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.brand-name { display: inline-flex; align-items: baseline; font: 800 20px/1 var(--ui) !important; letter-spacing: -0.045em !important; text-transform: none !important; color: #fff; }
.brand-name i { display: inline-block; width: .22em; height: .22em; margin: 0 .07em 0 .06em; border-radius: 50%; background: #fff; box-shadow: 0 0 10px 2px rgba(255,255,255,.55); animation: dot 2.4s ease-in-out infinite; }
.brand-name span { font-weight: 300; color: var(--muted); }
@keyframes dot { 50% { box-shadow: 0 0 4px 1px rgba(255,255,255,.25); } }
.nav { display: flex; gap: 30px; }
.nav a { text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 600; }
.nav a:hover, .nav a[aria-current] { color: #fff; }
.head-actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }
@media (max-width: 960px) { .nav { display: none; } }

/* ---------- Панель ---------- */
.panel { background: var(--bg-2); border: 1px solid var(--line); border-radius: 24px; }

/* ---------- Иконка статуса (сфера) ---------- */
.vial-mini { width: 22px; height: 22px; flex: none; }
.vial-mini .glass { fill: none; stroke: rgba(255,255,255,.45); stroke-width: 1.2; }
.vial-mini .liq { fill: #fff; }
.vial-mini .cork { display: none; }
.is-warn .vial-mini .liq { fill: var(--amber); }
.is-off .vial-mini .liq { fill: var(--dim); }

/* ---------- Плашки ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-2);
  font: 600 12px/1.3 var(--ui); white-space: nowrap; color: #fff;
}
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag-ok::before { background: var(--money); box-shadow: 0 0 8px var(--money); }
.tag-warn { color: var(--amber); border-color: rgba(255,181,71,.35); }
.tag-off { color: var(--muted); }
.tag-off::before { background: var(--dim); }
.tag-berry { background: #fff; color: #000; border-color: #fff; }
.tag-plain::before { display: none; }

/* ---------- Тост ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px);
  background: #fff; color: #000;
  padding: 13px 22px; border-radius: 999px; font-size: 14px; font-weight: 700;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50;
  max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Подвал: документы и поддержка на всех страницах ---------- */
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px 40px; }
.foot-grid nav { display: grid; gap: 10px; align-content: start; }
.foot-grid nav b { color: #fff; font-size: 14px; margin-bottom: 4px; }
.foot-grid a { color: var(--muted); text-decoration: none; font-size: 14px; transition: color .2s; }
.foot-grid a:hover { color: #fff; }
.foot-note { margin-top: 12px; color: var(--dim); font-size: 13px; max-width: 26em; }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--dim); font-size: 12px; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > div:first-child { grid-column: 1 / -1; } }
/* ---------- Производительность ---------- */
/* Телефоны: размытие стекла слабее — та же картинка на чёрном фоне, вдвое меньше работы видеокарте */
@media (max-width: 700px) {
  .glass { -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%); }
}
/* Облегчённый режим (perf.js включает его на слабых устройствах): без размытий и бесконечных эффектов */
.lite .glass, .lite .btn, .lite [class*="glass"] { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.lite .glass { background: linear-gradient(135deg, rgba(38,38,38,.96), rgba(20,20,20,.96)); }
.lite .glass::after { display: none; }
.lite .ambient { display: none; }
.lite [data-reveal], .lite [data-reveal].in, .lite .w, .lite .w2 { filter: none !important; }
.lite *, .lite *::before, .lite *::after { transition-duration: .2s !important; }
.lite .sweep, .lite .ring, .lite .shimmer::after, .lite .spot { display: none !important; }