/* ==========================================================================
   andreichuk.dev / DIST hub — design system v2 «ops console»
   Принципи (за референс-галереями land-book / saasframe / godly):
   велика типографіка з tight-tracking, hairline-бордери замість тіней,
   один акцент, mono-бейджі, скрін у рамці, щедрі відступи, стримані анімації.
   Один файл для SITE і dist. Тільки hover/переходи, повага до reduced-motion.
   ========================================================================== */

:root {
  /* колір */
  --ink:        #08080a;   /* найглибший фон (сторінка) */
  --bg:         #0c0c0e;   /* фон */
  --bg-soft:    #121215;   /* піднятий фон (секційні панелі) */
  --panel:      #17171b;   /* картки */
  --panel-2:    #111114;   /* вторинні панелі */
  --line:       rgba(255, 255, 255, .08);
  --line-strong:rgba(255, 255, 255, .16);
  --text:       #f4f4f5;
  --muted:      #a1a1aa;
  --dim:        #71717a;
  --accent:     #2dd4bf;
  --accent-2:   #38bdf8;
  --accent-ink: #04211d;
  --violet:     #a78bfa;
  --amber:      #fbbf24;
  --sky:        #38bdf8;
  --emerald:    #34d399;
  --ok:         #4ade80;
  --danger:     #f87171;

  /* форма */
  --r-lg: 20px;
  --r:    16px;
  --r-sm: 10px;
  --r-xs: 8px;
  --wrap: 1200px;
  --head-h: 66px;

  /* шрифти */
  --font-ui:      'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

  /* тінь — майже непомітна, лише для піднятих шарів */
  --shadow: 0 24px 48px -32px rgba(0, 0, 0, .9);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--head-h) + 14px); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15.5px/1.65 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* тонка текстура-сітка у фоні сторінки (статична, без руху) */
body::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(#000 0%, #000 62%, transparent 100%);
}
main, header, footer, .totop, .modal, .toast { position: relative; z-index: 1; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); line-height: 1.12; letter-spacing: -0.02em; }
p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
code, .mono { font-family: var(--font-mono); }
sup { font-size: .6em; }
::selection { background: rgba(45, 212, 191, .28); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* доступність: фокус */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- Header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(12, 12, 14, .82);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
  transition: background-color .2s, box-shadow .2s;
}
.site-head.is-scrolled { background: rgba(10, 10, 12, .94); box-shadow: 0 12px 32px -28px rgba(0, 0, 0, 1); }
.head-in { display: flex; align-items: center; gap: 22px; height: var(--head-h); min-width: 0; }
.brand {
  display: flex; align-items: center; gap: 10px; min-width: 0;
  font-family: var(--font-display);
  font-weight: 700; font-size: 17.5px; letter-spacing: -0.01em;
  color: var(--text); white-space: nowrap;
}
.brand .b-mark { color: var(--accent); }
.brand .b-mark:first-child {
  display: inline-grid; place-items: center;
  width: 28px; height: 28px; border-radius: 9px;
  background: linear-gradient(135deg, rgba(45, 212, 191, .16), rgba(45, 212, 191, .06));
  border: 1px solid rgba(45, 212, 191, .35);
  font-size: 13px;
}
.brand em { font-style: normal; font-weight: 500; font-family: var(--font-mono); font-size: 10.5px; color: var(--dim); letter-spacing: .14em; text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav-links > a {
  color: var(--muted); font-size: 13.5px; font-weight: 600;
  padding: 8px 12px; border-radius: 9px;
  transition: color .15s, background-color .15s;
}
.nav-links > a:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.nav-links > a.active { color: var(--accent); background: rgba(45, 212, 191, .09); }
.nav-links > a.nav-cta { margin-left: 10px; }

.lang { display: inline-flex; align-items: center; gap: 2px; margin: 0 10px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.lang button, .lang a {
  border: 0; background: transparent; color: var(--dim); font-weight: 700; font-size: 11.5px;
  padding: 5px 9px; border-radius: 999px; letter-spacing: .05em; text-decoration: none;
  transition: color .15s, background-color .15s;
}
.lang button.active, .lang a.active { color: var(--text); background: rgba(255, 255, 255, .12); }
.lang button:hover, .lang a:hover { color: var(--text); }

.head-mobile { display: none; align-items: center; gap: 6px; margin-left: auto; }
.burger {
  width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  transition: border-color .15s;
}
.burger:hover { border-color: var(--line-strong); }
.burger span { width: 16px; height: 2px; background: var(--text); border-radius: 2px; }
.mobile-menu {
  display: none; border-top: 1px solid var(--line);
  background: rgba(10, 10, 12, .98); padding: 8px 24px 20px;
}
.mobile-menu.open { display: block; }
.mobile-menu a {
  display: block; padding: 13px 4px; color: var(--text); font-weight: 600;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display); letter-spacing: -0.01em;
}
.mobile-menu a:last-child { border-bottom: 0; color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 12px; border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, .05); color: var(--text);
  font-size: 14px; font-weight: 600; padding: 11px 18px; white-space: nowrap;
  transition: border-color .15s, background-color .15s, color .15s, transform .15s;
}
.btn:hover { border-color: rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .08); }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, #2dd4bf, #22d3ee);
  border-color: transparent; color: #032420;
  box-shadow: 0 12px 28px -16px rgba(45, 212, 191, .55);
}
.btn-primary:hover { filter: brightness(1.07); background: linear-gradient(135deg, #2dd4bf, #22d3ee); }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 10px; }
.btn-ghost { background: transparent; }

/* ---------- Hero ---------- */
.hero { padding: 84px 0 34px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: center; }
.badge-line {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); background: rgba(45, 212, 191, .07);
  border: 1px solid rgba(45, 212, 191, .28); border-radius: 999px; padding: 7px 14px;
}
.badge-line::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(45, 212, 191, .15); }
.hero h1 {
  margin: 26px 0 0; font-size: clamp(34px, 5vw, 58px); font-weight: 700;
  letter-spacing: -0.035em; line-height: 1.04;
}
.hero h1 .accent {
  background: linear-gradient(100deg, #2dd4bf, #5eead4 70%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { margin: 22px 0 0; max-width: 540px; color: var(--muted); font-size: 16.5px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-note { margin-top: 16px; color: var(--dim); font-size: 13px; font-family: var(--font-mono); }

/* продукт-візуал у hero: рамка «браузера» + плаваючий чіп */
.hero-visual { position: relative; }
.frame {
  border: 1px solid var(--line-strong); border-radius: var(--r);
  background: var(--panel-2); overflow: hidden; box-shadow: var(--shadow);
}
.frame-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px; border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
}
.frame-bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .2); }
.frame-bar em { margin-left: auto; font-style: normal; font-family: var(--font-mono); font-size: 10.5px; color: var(--dim); letter-spacing: .06em; }
.frame img { width: 100%; }
.hero-float {
  position: absolute; left: -26px; bottom: -26px;
  display: flex; align-items: center; gap: 11px;
  background: rgba(18, 18, 21, .96); border: 1px solid var(--line-strong);
  border-radius: 14px; padding: 12px 16px; box-shadow: var(--shadow);
}
.hero-float .hero-float-ico { font-size: 19px; }
.hero-float > div { display: flex; flex-direction: column; line-height: 1.35; }
.hero-float b { font-family: var(--font-display); font-size: 14.5px; letter-spacing: -0.01em; }
.hero-float span { color: var(--dim); font-size: 11.5px; font-family: var(--font-mono); }

/* статистика — тонка смуга з роздільниками */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin: 64px 0 0; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--panel-2); overflow: hidden;
}
.stat { padding: 20px 22px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat b { display: block; font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.stat span { display: block; margin-top: 4px; color: var(--dim); font-size: 12.5px; }

/* ---------- Sections ---------- */
.section { padding: 96px 0 0; }
.sec-head { max-width: 780px; }
.sec-eyebrow {
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--accent);
}
.sec-head h2 { margin-top: 14px; font-size: clamp(26px, 3.6vw, 40px); font-weight: 700; letter-spacing: -0.03em; }
.sec-sub { margin-top: 14px; color: var(--muted); font-size: 15.5px; max-width: 640px; }

/* ---------- Filters / toolbar ---------- */
.toolbar {
  border: 1px solid var(--line); background: rgba(18, 18, 21, .9);
  backdrop-filter: blur(10px);
  border-radius: var(--r); padding: 12px; margin: 30px 0 22px;
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  position: sticky; top: calc(var(--head-h) + 10px); z-index: 30;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  border-radius: 999px; padding: 8px 15px; font-size: 13px; font-weight: 600;
  transition: color .15s, border-color .15s, background-color .15s;
}
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip.active {
  color: #032420; background: linear-gradient(135deg, #2dd4bf, #22d3ee);
  border-color: transparent;
}
.search { margin-left: auto; position: relative; min-width: 240px; flex: 1 1 240px; max-width: 330px; }
.search input {
  width: 100%; padding: 10px 40px 10px 15px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--ink); color: var(--text); font-size: 13.5px;
  transition: border-color .15s;
}
.search input:focus { outline: none; border-color: rgba(45, 212, 191, .55); }
.search input::placeholder { color: var(--dim); }
.search .search-clear {
  position: absolute; right: 7px; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; color: var(--dim); font-size: 14px; padding: 6px 10px; border-radius: 999px;
}
.search .search-clear:hover { color: var(--text); background: rgba(255, 255, 255, .1); }
.result-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 2px 18px; }
.result-count { font-family: var(--font-mono); font-size: 12.5px; color: var(--dim); }

/* ---------- License banner ---------- */
.banner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px; justify-content: space-between;
  border: 1px solid rgba(45, 212, 191, .25); background: rgba(45, 212, 191, .04);
  border-radius: var(--r); padding: 16px 18px; margin: 0 0 24px;
}
.banner b { color: var(--text); font-family: var(--font-display); }
.banner p { color: var(--muted); font-size: 14px; max-width: 860px; }
.banner .banner-tag {
  display: inline-block; font-size: 11.5px; font-weight: 700; color: #6ee7b7;
  background: rgba(52, 211, 153, .12); border: 1px solid rgba(52, 211, 153, .3);
  border-radius: 999px; padding: 3px 10px; margin-right: 8px;
}

/* ---------- Product cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 22px; }
.card {
  display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color .18s, transform .18s, box-shadow .18s;
}
.card:hover { border-color: rgba(255, 255, 255, .24); transform: translateY(-3px); box-shadow: var(--shadow); }
.card.is-hidden { display: none; }
.card-shot {
  border: 0; padding: 0; background: var(--ink); display: block; width: 100%;
  aspect-ratio: 16 / 9; overflow: hidden; position: relative; cursor: zoom-in;
}
.card-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: opacity .3s; }
.card-shot img.contain { object-fit: contain; }
.card-shot::after {
  content: '⤢'; position: absolute; right: 10px; bottom: 10px;
  width: 28px; height: 28px; border-radius: 9px; background: rgba(18, 18, 21, .82);
  color: #e4e4e7; font-size: 13px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-strong); opacity: 0; transition: opacity .18s;
}
.card-shot:hover::after { opacity: 1; }
/* стан завантаження зображення — м'який скелетон */
.card-shot::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(110deg, rgba(255, 255, 255, .02) 30%, rgba(255, 255, 255, .07) 45%, rgba(255, 255, 255, .02) 60%);
  background-size: 220% 100%; animation: sheen 1.6s linear infinite;
}
.card-shot.loaded::before { display: none; }
.card-shot.broken::before { animation: none; background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .04) 0 12px, transparent 12px 24px); }
.card-shot.broken::after { content: '⇅'; opacity: 1; }
@keyframes sheen { to { background-position: -220% 0; } }
.card-body { padding: 18px; display: flex; flex-direction: column; gap: 11px; flex: 1; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.card-head h3 { font-size: 17.5px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ver {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; color: var(--muted);
  background: rgba(255, 255, 255, .06); border: 1px solid var(--line); border-radius: 999px; padding: 3px 8px;
  letter-spacing: .03em;
}
.cat {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 10.5px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 9px; white-space: nowrap;
}
.cat::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.card[data-cat*="windows"] .cat::before { background: var(--sky); }
.card[data-cat*="web"] .cat::before { background: var(--violet); }
.card[data-cat*="monitoring"] .cat::before { background: var(--emerald); }
.card-sub { color: var(--text); font-size: 13.5px; font-weight: 600; }
.card-desc { color: var(--muted); font-size: 13.5px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.tags span {
  font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line); border-radius: 7px; padding: 3px 8px;
}

/* Велика цінова кнопка */
.buy {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  width: 100%; border-radius: 14px; border: 1px solid transparent;
  background: linear-gradient(135deg, #2dd4bf, #22d3ee); color: #032420;
  padding: 12px 14px;
  transition: filter .15s, transform .15s;
}
.buy:hover { filter: brightness(1.08); }
.buy:active { transform: translateY(1px); }
.buy b { font-family: var(--font-display); font-size: 17.5px; font-weight: 700; letter-spacing: -0.01em; }
.buy span { font-size: 12px; font-weight: 600; opacity: .72; }
.buy--free { background: transparent; color: var(--text); border-color: var(--line-strong); }
.buy--free:hover { border-color: rgba(255, 255, 255, .32); background: rgba(255, 255, 255, .06); filter: none; }
.buy--free b { font-size: 15.5px; }
.buy--free span { color: var(--accent); opacity: 1; }
.license-note { text-align: center; color: var(--dim); font-size: 12px; font-family: var(--font-mono); }
.corp-note { text-align: center; color: var(--dim); font-size: 12px; font-family: var(--font-mono); }

.card-actions { display: flex; flex-direction: column; gap: 9px; border-top: 1px solid var(--line); padding-top: 13px; }
.cmd {
  display: flex; align-items: center; gap: 8px; justify-content: space-between;
  background: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 7px 8px 7px 12px;
}
.cmd code { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmd button, .cmd a.copybtn {
  flex-shrink: 0; border: 0; background: transparent; color: var(--accent);
  font-size: 11.5px; font-weight: 700; padding: 4px 7px; border-radius: 7px;
}
.cmd button:hover, .cmd a.copybtn:hover { background: rgba(45, 212, 191, .12); }
.links { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; }
.links a { color: var(--muted); }
.links a:hover { color: var(--accent); }
.links .mono { color: var(--dim); font-size: 11.5px; }

.empty { text-align: center; color: var(--muted); padding: 40px 0 10px; }
.empty-actions { text-align: center; padding-bottom: 24px; }
.empty-actions[hidden] { display: none; }
.empty .link-btn { border: 0; background: transparent; color: var(--accent); font-weight: 600; padding: 0 4px; }

/* ---------- About (bento) ---------- */
.about-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 30px; }
.tile {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r);
  padding: 22px; transition: border-color .18s;
}
.tile:hover { border-color: var(--line-strong); }
.about-grid .tile:nth-child(1) { grid-column: span 2; }
.about-grid .tile:nth-child(2) { grid-column: span 2; }
.about-grid .tile:nth-child(3) { grid-column: span 4; }
.tile h3 { font-size: 16.5px; font-weight: 700; }
.tile p { margin-top: 10px; color: var(--muted); font-size: 13.5px; max-width: 720px; }
.stack-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.stack-row span {
  font-family: var(--font-mono); font-size: 12px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 9px; padding: 7px 11px; background: var(--panel-2);
}

/* ---------- Cases ---------- */
.case-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; }
.case {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r);
  padding: 22px; display: flex; flex-direction: column; gap: 14px;
  transition: border-color .18s;
}
.case:hover { border-color: var(--line-strong); }
.case-head { display: flex; align-items: center; gap: 13px; }
.case-ico {
  width: 46px; height: 46px; border-radius: 14px; flex-shrink: 0;
  background: linear-gradient(135deg, rgba(45, 212, 191, .16), rgba(45, 212, 191, .06));
  border: 1px solid rgba(45, 212, 191, .3);
  display: flex; align-items: center; justify-content: center; font-size: 21px;
}
.case-head h3 { font-size: 17px; }
.case-badge { font-family: var(--font-mono); font-size: 10.5px; color: var(--dim); letter-spacing: .06em; text-transform: uppercase; }
.case p { font-size: 13.5px; color: var(--muted); }
.case ul { margin: 0; padding-left: 0; list-style: none; color: var(--muted); font-size: 13px; display: flex; flex-direction: column; gap: 7px; }
.case ul li { position: relative; padding-left: 18px; }
.case ul li::before { content: '—'; position: absolute; left: 0; color: var(--accent); }
.case-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }
.case-actions .meta { font-family: var(--font-mono); font-size: 11px; color: var(--dim); }

/* ---------- Services ---------- */
.serv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 30px; }
.serv h3 { font-size: 16px; margin-top: 12px; }
.serv .s-num { font-family: var(--font-mono); font-size: 11.5px; color: var(--accent); letter-spacing: .1em; }
.serv p { margin-top: 9px; color: var(--muted); font-size: 13.5px; }
.serv.cta { border-color: rgba(45, 212, 191, .35); background: linear-gradient(160deg, rgba(45, 212, 191, .07), rgba(18, 18, 21, .4)); }
.serv .btn { margin-top: 14px; }

/* ---------- FAQ ---------- */
.faq { max-width: 840px; }
.faq details { border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); margin-top: 10px; transition: border-color .15s; }
.faq details:hover { border-color: var(--line-strong); }
.faq details[open] { border-color: rgba(45, 212, 191, .3); }
.faq summary {
  cursor: pointer; padding: 15px 18px; font-weight: 600; font-size: 14.5px; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  font-family: var(--font-display); letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--accent); font-size: 19px; font-weight: 400; font-family: var(--font-ui); }
.faq details[open] summary::after { content: '−'; }
.faq details p { padding: 0 18px 16px; color: var(--muted); font-size: 14px; }

/* ---------- Contact ---------- */
.contact-box { border: 1px solid var(--line); background: var(--panel-2); border-radius: var(--r-lg); padding: 34px; }
.contact-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 44px; align-items: start; }
.contact-box h2 { font-size: clamp(24px, 3.2vw, 34px); font-weight: 700; letter-spacing: -0.03em; }
.contact-box .lead { margin-top: 12px; color: var(--muted); }
.contact-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.lead-form { display: flex; flex-direction: column; gap: 13px; }
.form-title { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .12em; color: var(--dim); text-transform: uppercase; }
.lf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.lead-form label { display: flex; flex-direction: column; gap: 7px; font-size: 13px; color: var(--muted); }
.lead-form input, .lead-form textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 12px; background: var(--ink);
  color: var(--text); padding: 11px 13px; font: inherit; resize: vertical;
  transition: border-color .15s;
}
.lead-form input:focus, .lead-form textarea:focus { outline: none; border-color: rgba(45, 212, 191, .55); }
.lead-form .btn { align-self: flex-start; }
.lf-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.lf-actions .btn { align-self: auto; }
.form-note { font-size: 12px; color: var(--dim); }
.share { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 20px; }
.share-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.share-grid button {
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  border-radius: 10px; padding: 8px 13px; font-size: 12.5px; font-weight: 600;
  transition: color .15s, border-color .15s;
}
.share-grid button:hover { color: var(--text); border-color: var(--line-strong); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); margin-top: 96px; padding: 30px 0 36px; }
.footer-in { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.footer p { color: var(--dim); font-size: 12.5px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 16px; }
.footer nav a { color: var(--muted); font-size: 12.5px; }
.footer nav a:hover { color: var(--accent); }

/* ---------- To-top ---------- */
.totop {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--line-strong);
  background: rgba(18, 18, 21, .94); color: var(--text); font-size: 16px;
  opacity: 0; pointer-events: none; transition: opacity .2s, border-color .15s;
  backdrop-filter: blur(8px);
}
.totop.show { opacity: 1; pointer-events: auto; }
.totop:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Modals ---------- */
.modal {
  position: fixed; z-index: 70; inset: 0; width: auto; height: auto; max-width: none; max-height: none;
  margin: auto; border: 0; color: var(--text); overflow: visible; align-items: center; justify-content: center;
  padding: 18px;
}
.modal:not([open]) { display: none; }
.modal[open] { display: flex; }
.modal::backdrop { background: rgba(6, 6, 8, .82); backdrop-filter: blur(6px); }
.modal-card {
  width: min(100%, 570px); max-height: min(90vh, 90dvh); overflow-y: auto;
  background: var(--bg-soft); border: 1px solid var(--line-strong); border-radius: var(--r-lg); padding: 26px;
  box-shadow: var(--shadow);
}
.modal-card h3 { font-size: 20px; }
.modal-sub { margin-top: 6px; color: var(--muted); font-size: 13.5px; }
.modal-close { position: sticky; top: 0; float: right; border: 0; background: transparent; color: var(--dim); font-size: 20px; padding: 2px 9px; border-radius: 9px; }
.modal-close:hover { color: var(--text); background: rgba(255, 255, 255, .08); }
.price-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0; }
.price-opt {
  display: block; border: 1px solid var(--line-strong); border-radius: 14px; padding: 14px;
  text-align: center; background: var(--panel-2); color: var(--text);
  transition: border-color .15s, background-color .15s, transform .15s;
}
.price-opt:hover { border-color: var(--accent); background: rgba(45, 212, 191, .07); transform: translateY(-2px); }
.price-opt b { display: block; font-family: var(--font-display); font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.price-opt span { color: var(--dim); font-size: 12px; }
.price-opt em { display: block; margin-top: 6px; font-style: normal; font-size: 12px; font-weight: 700; color: var(--accent); }
.price-opt.hot { border-color: rgba(45, 212, 191, .45); }
.buy-steps { display: flex; flex-direction: column; gap: 12px; margin: 8px 0 18px; }
.buy-step { border-left: 2px solid var(--line); padding-left: 14px; }
.buy-step b { font-size: 13.5px; font-family: var(--font-display); }
.buy-step p { color: var(--muted); font-size: 13px; margin-top: 4px; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.modal-note { margin-top: 16px; color: var(--dim); font-size: 12.5px; }

.modal--shot .modal-card { width: min(100%, 1120px); max-width: 1120px; background: transparent; border: 0; padding: 0; box-shadow: none; position: relative; }
.modal--shot img { border-radius: 14px; border: 1px solid var(--line-strong); }
.modal--shot .modal-close { position: fixed; top: 16px; right: 20px; background: rgba(18, 18, 21, .82); border: 1px solid var(--line-strong); }
.shot-nav {
  position: fixed; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 44px; height: 44px; border-radius: 12px; font-size: 24px; line-height: 1;
  background: rgba(18, 18, 21, .82); border: 1px solid var(--line-strong); color: var(--text);
  display: grid; place-items: center; transition: border-color .15s, color .15s;
}
.shot-nav[hidden] { display: none; }
.shot-nav:hover { border-color: var(--accent); color: var(--accent); }
.shot-nav--prev { left: 16px; }
.shot-nav--next { right: 16px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 16px); z-index: 80;
  background: var(--panel); border: 1px solid var(--line-strong); color: var(--text);
  border-radius: 12px; padding: 11px 18px; font-size: 13px; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Security (dist) ---------- */
.sec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; margin-top: 30px; }
.sec-card { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; transition: border-color .18s; }
.sec-card:hover { border-color: var(--line-strong); }
.sec-card .ico {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: rgba(45, 212, 191, .1); border: 1px solid rgba(45, 212, 191, .28); font-size: 18px;
}
.sec-card h3 { font-size: 15.5px; margin-top: 14px; }
.sec-card p { margin-top: 9px; color: var(--muted); font-size: 13px; }

/* ---------- Matrix table (dist) ---------- */
.table-wrap { border: 1px solid var(--line); border-radius: var(--r); overflow-x: auto; margin-top: 30px; background: var(--panel-2); }
table.matrix { border-collapse: collapse; width: 100%; min-width: 760px; font-size: 13px; }
.matrix th {
  text-align: left; font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--dim); padding: 14px 16px; border-bottom: 1px solid var(--line-strong); white-space: nowrap;
  background: rgba(255, 255, 255, .03);
  position: sticky; top: 0;
}
.matrix td { padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--muted); vertical-align: middle; }
.matrix tr:last-child td { border-bottom: 0; }
.matrix tbody tr { transition: background-color .12s; }
.matrix tbody tr:hover { background: rgba(255, 255, 255, .035); }
.matrix td:first-child { color: var(--text); font-weight: 600; font-family: var(--font-display); letter-spacing: -0.01em; }
.matrix .m-free { color: var(--ok); }
.matrix .m-price { font-family: var(--font-mono); white-space: nowrap; color: var(--text); }
.matrix a, .matrix button.linklike { color: var(--accent); border: 0; background: transparent; padding: 0; font-size: 13px; font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 560px) {
  .brand em { display: none; }
}
@media (min-width: 1081px) {
  .mobile-menu, .mobile-menu.open { display: none; }
}
@media (max-width: 1080px) {
  .nav-links { display: none; }
  .head-mobile { display: flex; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { max-width: 640px; }
  .hero-float { left: 12px; bottom: -18px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat { border-top: 1px solid var(--line); }
  .stat:nth-child(-n+2) { border-top: 0; }
  .stat:nth-child(odd) { border-left: 0; }
  .about-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid .tile:nth-child(3) { grid-column: span 2; }
  .serv-grid { grid-template-columns: 1fr 1fr; }
  .contact-cols { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 18px; }
  .hero { padding-top: 54px; }
  .section { padding-top: 68px; }
  .hero h1 { letter-spacing: -0.03em; }
  .stats { margin-top: 44px; }
  .stat { padding: 16px 18px; }
  .stat b { font-size: 22px; }
  .about-grid, .serv-grid { grid-template-columns: 1fr; }
  .about-grid .tile:nth-child(n) { grid-column: auto; }
  .lf-row { grid-template-columns: 1fr; }
  .search { margin-left: 0; max-width: none; }
  .result-bar { flex-wrap: wrap; }
  .price-pair { grid-template-columns: 1fr; }
  .contact-box { padding: 22px; }
  .modal-card { padding: 20px; }
  .toolbar { position: static; }
  .footer { margin-top: 68px; }
}

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

/* ---------- 404 ---------- */
.err-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; }
.err-in h1 { font-size: clamp(70px, 16vw, 140px); font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.err-in h1 span { color: var(--accent); }
.err-txt { color: var(--muted); margin: 18px auto 0; max-width: 560px; }
.err-note { margin-top: 26px; font-size: 12.5px; color: var(--dim); }
.err-in .btn { margin-top: 22px; }

/* ==========================================================================
   Product detail page (/p/<slug>/) — SITE + dist
   Той самий дизайн-систем: hairline-бордери, mono-підписи, один акцент.
   ========================================================================== */

/* хлібні крихти */
.crumbs {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  padding-top: 26px; font-family: var(--font-mono); font-size: 12px; color: var(--dim);
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs .crumbs-cur { color: var(--text); }

/* hero продукту */
.prod-hero { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: 46px; align-items: center; padding-top: 30px; }
.prod-hero h1 {
  margin-top: 18px; font-size: clamp(30px, 4.4vw, 50px); font-weight: 700; letter-spacing: -0.035em;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.prod-hero h1 .ver { font-size: 11.5px; padding: 4px 10px; }
.prod-sub { margin-top: 16px; color: var(--muted); font-size: 16.5px; max-width: 520px; }
.prod-hero .tags { margin-top: 18px; }
.prod-buy { margin-top: 24px; max-width: 330px; display: flex; flex-direction: column; gap: 8px; }
.prod-hero .card-actions { margin-top: 20px; border-top: 0; padding-top: 0; max-width: 460px; }
.prod-shot-btn {
  border: 0; padding: 0; margin: 0; background: var(--ink); display: block; width: 100%;
  cursor: zoom-in; position: relative;
}
.prod-shot-btn img { width: 100%; height: auto; }

/* секції */
.prod-sec { padding-top: 78px; }
.prod-sec-head { max-width: 780px; margin-bottom: 24px; }
.prod-sec-head h2 { margin-top: 12px; font-size: clamp(22px, 2.8vw, 32px); font-weight: 700; letter-spacing: -0.03em; }

/* галерея скрінів */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.gallery button {
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden; padding: 0;
  background: var(--ink); aspect-ratio: 16 / 10; cursor: zoom-in; display: block; width: 100%;
  transition: border-color .18s, transform .18s;
}
.gallery button:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.gallery img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.gallery figure { margin: 0; display: flex; flex-direction: column; gap: 9px; }
.gallery figcaption { color: var(--dim); font-size: 12.5px; font-family: var(--font-mono); }

/* картка → сторінка продукту */
.card-shot--open { cursor: pointer; }
.card-shot--open::after { content: '→'; }
.card-head h3 a { color: inherit; }
.card-head h3 a:hover { color: var(--accent); }
.details-link {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line-strong); border-radius: 12px;
  background: rgba(255, 255, 255, .05); color: var(--text);
  font-size: 13.5px; font-weight: 600; padding: 10px 14px;
  transition: border-color .15s, background-color .15s, color .15s;
}
.details-link::after { content: '→'; }
.details-link:hover { border-color: rgba(45, 212, 191, .5); background: rgba(45, 212, 191, .08); color: var(--accent); }

/* опис + факти */
.prod-cols { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); gap: 38px; align-items: start; }
.prod-prose p { color: var(--muted); font-size: 15px; }
.prod-prose p + p { margin-top: 14px; }
.prod-facts { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel-2); padding: 20px; }
.prod-facts h3 { font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.facts { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.facts li { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; border-bottom: 1px solid var(--line); padding-bottom: 10px; font-size: 13px; }
.facts li:last-child { border-bottom: 0; padding-bottom: 0; }
.facts b { color: var(--dim); font-weight: 500; }
.facts span { text-align: right; color: var(--text); }

/* як працює */
.how-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.how-step { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel-2); padding: 20px; }
.how-step .how-num { font-family: var(--font-mono); font-size: 11.5px; color: var(--accent); letter-spacing: .1em; }
.how-step h3 { margin-top: 10px; font-size: 15.5px; }
.how-step p { margin-top: 8px; color: var(--muted); font-size: 13.5px; }

/* можливості */
.feat-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 11px 26px; }
.feat-list li { position: relative; padding-left: 22px; color: var(--muted); font-size: 14px; }
.feat-list li::before { content: '▸'; position: absolute; left: 0; color: var(--accent); }

/* стек */
.stack-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.stack-card { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel-2); padding: 18px; }
.stack-card .stack-g { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.stack-card .tags { margin-top: 12px; }

/* встановлення / вимоги */
.prod-note { margin-top: 12px; color: var(--dim); font-size: 12.5px; font-family: var(--font-mono); }
.prod-links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 14px; font-size: 13.5px; }
.prod-links a { color: var(--muted); }
.prod-links a:hover { color: var(--accent); }
.reqs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.reqs li { position: relative; padding-left: 20px; color: var(--muted); font-size: 13.5px; }
.reqs li::before { content: '—'; position: absolute; left: 0; color: var(--accent); }

/* фінальний CTA */
.prod-cta { padding-top: 78px; }
.prod-cta-box {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px;
  border: 1px solid rgba(45, 212, 191, .3); border-radius: var(--r-lg);
  background: linear-gradient(160deg, rgba(45, 212, 191, .07), rgba(18, 18, 21, .4));
  padding: 28px 30px;
}
.prod-cta-box h2 { font-size: clamp(20px, 2.6vw, 28px); font-weight: 700; letter-spacing: -0.03em; }
.prod-cta-box p { margin-top: 10px; color: var(--muted); font-size: 14px; max-width: 640px; }
.prod-cta-btns { display: flex; flex-wrap: wrap; gap: 10px; }

@media (max-width: 1080px) {
  .prod-hero { grid-template-columns: 1fr; gap: 32px; }
  .prod-cols { grid-template-columns: 1fr; gap: 26px; }
}
@media (max-width: 720px) {
  .prod-sec, .prod-cta { padding-top: 56px; }
  .gallery { grid-template-columns: 1fr 1fr; gap: 10px; }
  .prod-cta-box { padding: 22px; }
}
