/* =========================================================================
   Akulka Projects 5 — дизайн-система
   ========================================================================= */

:root {
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Unbounded', 'Manrope', system-ui, sans-serif;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);

  --container: 1200px;
  --topbar-h: 68px;

  --brand-1: #3b82f6;
  --brand-2: #06b6d4;
  --brand-3: #38bdf8;
  --grad: linear-gradient(120deg, #2563eb, #0ea5e9 50%, #22d3ee);
  --grad-cool: linear-gradient(120deg, var(--brand-1), var(--brand-3));
}

[data-theme="dark"] {
  --bg: #060a14;
  --bg-2: #0a1222;
  --surface: rgba(16, 26, 46, .62);
  --surface-2: rgba(30, 46, 76, .6);
  --surface-solid: #0c1424;
  --border: rgba(150, 180, 230, .10);
  --border-strong: rgba(150, 180, 230, .18);
  --text: #eef3fb;
  --text-2: #b3c0d6;
  --muted: #7f8ca5;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, .7);
  --shadow-sm: 0 6px 20px -8px rgba(0, 0, 0, .6);
  --blob-op: .28;
  --grid-op: 1;
  --glass: rgba(8, 14, 26, .72);
  --grid-img: url("../img/grid-dark.svg");
}

[data-theme="light"] {
  --bg: #f3f6fb;
  --bg-2: #ffffff;
  --surface: rgba(255, 255, 255, .82);
  --surface-2: rgba(255, 255, 255, .96);
  --surface-solid: #ffffff;
  --border: rgba(15, 40, 90, .09);
  --border-strong: rgba(15, 40, 90, .16);
  --text: #0e1726;
  --text-2: #43506a;
  --muted: #6c7891;
  --shadow: 0 20px 50px -24px rgba(20, 50, 120, .3);
  --shadow-sm: 0 6px 18px -10px rgba(20, 50, 120, .3);
  --blob-op: .22;
  --grid-op: 1;
  --grid-img: url("../img/grid-light.svg");
  --glass: rgba(255, 255, 255, .72);
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: hidden; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100vh;
  overflow-x: hidden;
  padding-top: calc(var(--topbar-h) + env(safe-area-inset-top)); /* место под фиксированную шапку */
}
img { max-width: 100%; display: block; -webkit-user-drag: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; font-family: var(--font-display); font-weight: 700; letter-spacing: -.01em; }
p { margin: 0; }
::selection { background: color-mix(in srgb, var(--brand-1) 45%, transparent); }
:focus-visible { outline: 2px solid var(--brand-1); outline-offset: 3px; border-radius: 8px; }
kbd {
  font-family: var(--font); font-size: 11px; font-weight: 700;
  padding: 2px 6px; border-radius: 6px;
  border: 1px solid var(--border-strong); color: var(--muted); background: var(--surface);
}
.i { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: middle; }
.i--sm { width: 16px; height: 16px; }
.i--lg { width: 24px; height: 24px; }

.skip { position: fixed; left: 12px; top: -60px; z-index: 2000; padding: 10px 14px; background: var(--brand-1); color: #fff; border-radius: 10px; }
.skip:focus { top: 12px; }

/* ---------------------------------------------------------------- Фон */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg__blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: var(--blob-op); will-change: transform; }
.bg__blob--1 { width: 620px; height: 620px; left: -160px; top: -200px; background: #1d4ed8; animation: drift1 22s ease-in-out infinite alternate; }
.bg__blob--2 { width: 520px; height: 520px; right: -160px; top: 10%; background: #0e7490; animation: drift2 26s ease-in-out infinite alternate; }
.bg__blob--3 { width: 560px; height: 560px; left: 30%; bottom: -320px; background: #1e3a8a; animation: drift3 30s ease-in-out infinite alternate; opacity: calc(var(--blob-op) * .7); }
.bg__grid {
  position: absolute; inset: 0; opacity: var(--grid-op);
  background-image: var(--grid-img);
  background-size: 336px 336px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}
.bg__noise {
  position: absolute; inset: 0; opacity: .06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes drift1 { to { transform: translate(140px, 120px) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-120px, 160px) scale(.9); } }
@keyframes drift3 { to { transform: translate(-160px, -80px) scale(1.1); } }

/* ---------------------------------------------------------------- Шапка */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding-top: env(safe-area-inset-top);
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.topbar.is-scrolled {
  background: var(--glass);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom-color: var(--border);
}
.topbar__inner {
  max-width: var(--container); margin: 0 auto; height: var(--topbar-h);
  padding: 0 20px; display: flex; align-items: center; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand__logo { width: 40px; height: 40px; border-radius: 12px; object-fit: contain; filter: drop-shadow(0 4px 14px rgba(37, 99, 235, .35)); transition: transform .4s var(--ease-spring); }
.brand:hover .brand__logo { transform: rotate(-8deg) scale(1.08); }
.brand__name { font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: -.02em; }
.brand__name span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin-left: 2px; }

.nav { display: flex; gap: 4px; margin-left: 12px; }
.nav a {
  position: relative; padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 14.5px;
  color: var(--text-2); transition: color .2s, background .2s;
}
.nav a:hover { color: var(--text); background: var(--surface); }
.nav a.is-active { color: var(--text); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); }
.nav .dot, .tabbar .dot {
  position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand-2); box-shadow: 0 0 0 3px var(--bg);
}

.topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.search-trigger {
  display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 10px 0 14px; min-width: 200px;
  border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  font-size: 14px; transition: border-color .2s, background .2s;
}
.search-trigger:hover { border-color: var(--border-strong); background: var(--surface-2); }
.search-trigger kbd { margin-left: auto; }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); font-weight: 800; font-size: 12px;
  transition: background .2s, border-color .2s, transform .2s;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--border-strong); }
.icon-btn:active { transform: scale(.94); }
[data-theme="dark"] .i--sun { display: none; }
[data-theme="light"] .i--moon { display: none; }

/* ---------------------------------------------------------------- Кнопки */
.btn {
  --c: var(--brand-1);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 22px; border-radius: 14px; font-weight: 700; font-size: 15px;
  border: 1px solid var(--border); background: var(--surface); white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .3s, background .2s, border-color .2s, opacity .2s;
}
.btn:hover { transform: translateY(-2px); border-color: var(--border-strong); background: var(--surface-2); }
.btn:active { transform: translateY(0) scale(.98); }
.btn--primary {
  color: #fff; border-color: transparent;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 100%, #fff 0%), color-mix(in srgb, var(--c) 70%, var(--brand-2)));
  box-shadow: 0 10px 30px -10px color-mix(in srgb, var(--c) 80%, transparent), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn--primary:hover { background: linear-gradient(135deg, color-mix(in srgb, var(--c) 90%, #fff), color-mix(in srgb, var(--c) 60%, var(--brand-2))); box-shadow: 0 14px 40px -10px color-mix(in srgb, var(--c) 90%, transparent), inset 0 1px 0 rgba(255, 255, 255, .3); }
.btn--sm { height: 40px; padding: 0 14px; font-size: 14px; border-radius: 12px; }
.btn--ghost { background: transparent; }
.btn[disabled], .btn.is-disabled { opacity: .45; pointer-events: none; }

/* ---------------------------------------------------------------- Раскладка */
.main { min-height: 70vh; outline: none; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.section { padding: 56px 0; }
.section__head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.section__eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 10px;
}
.section__eyebrow::before { content: ''; width: 18px; height: 2px; border-radius: 2px; background: var(--grad); }
.section__title { font-size: clamp(26px, 3.4vw, 40px); }
.section__sub { color: var(--text-2); margin-top: 10px; max-width: 620px; }
.link-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--text-2); transition: color .2s, gap .2s; }
.link-more:hover { color: var(--text); gap: 10px; }

.page-head { padding: 48px 0 8px; }
.page-head h1 { font-size: clamp(32px, 5vw, 56px); }
.page-head p { color: var(--text-2); margin-top: 12px; font-size: 17px; max-width: 640px; }

.gradient-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------------------------------------------------------------- Hero */
.hero { position: relative; padding: 56px 0 40px; overflow-x: hidden; overflow-x: clip; }
.hero__grid { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,.9fr); gap: 40px; align-items: center; }
.hero__badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); font-size: 13.5px; font-weight: 600; color: var(--text-2);
  transition: border-color .2s, background .2s;
}
.hero__badge:hover { border-color: var(--border-strong); background: var(--surface-2); }
.hero__badge b { padding: 3px 10px; border-radius: 999px; background: var(--grad); color: #fff; font-size: 12px; }
.hero__title { font-size: clamp(40px, 7vw, 84px); line-height: 1.02; letter-spacing: -.035em; margin: 22px 0 20px; font-weight: 800; }
.hero__title .gradient-text { display: inline-block; padding-bottom: .06em; }
.hero__text { font-size: clamp(16px, 1.6vw, 19px); color: var(--text-2); max-width: 540px; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.hero__stats { display: flex; gap: 28px; margin-top: 40px; flex-wrap: wrap; }
.hero__stat b { display: block; font-family: var(--font-display); font-size: 28px; font-weight: 700; }
.hero__stat span { color: var(--muted); font-size: 13.5px; font-weight: 600; }

.orbit { position: relative; aspect-ratio: 1; width: 100%; max-width: 480px; margin-left: auto; }
.orbit__ring { position: absolute; inset: 0; border-radius: 50%; border: 1px dashed var(--border-strong); }
.orbit__ring--2 { inset: 17%; border-style: solid; border-color: var(--border); }
.orbit__core {
  position: absolute; inset: 26%; display: grid; place-items: center; border-radius: 50%;
}
.orbit__core img { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; max-width: none; -webkit-mask-image: linear-gradient(#000 72%, transparent 98%); mask-image: linear-gradient(#000 72%, transparent 98%); filter: drop-shadow(0 20px 30px rgba(0, 0, 0, .35)); animation: float 6s ease-in-out infinite; }
.orbit__spin { position: absolute; inset: 0; animation: spin 60s linear infinite; }
.orbit__item {
  position: absolute; width: 17%; aspect-ratio: 1; left: 50%; top: 50%;
  transform: rotate(var(--a)) translate(var(--r)) rotate(calc(-1 * var(--a)));
  margin: -8.5% 0 0 -8.5%;
}
.orbit__item a { display: block; width: 100%; height: 100%; animation: spin 60s linear infinite reverse; }
.orbit__item img {
  width: 100%; height: 100%; border-radius: 26%;
  box-shadow: 0 10px 30px -8px var(--glow, rgba(0, 0, 0, .5));
  transition: transform .35s var(--ease-spring);
}
.orbit__item a:hover img { transform: scale(1.18); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 50% { transform: translateY(-14px) rotate(-2deg); } }

/* ---------------------------------------------------------------- Карточки продуктов */
.grid { display: grid; gap: 18px; }
.grid--products { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid--posts { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

.card {
  --c: var(--brand-1);
  position: relative; border-radius: var(--radius-lg); background: var(--surface);
  border: 1px solid var(--border); overflow: hidden; isolation: isolate;
  transition: transform .35s var(--ease), border-color .3s, box-shadow .35s, background .3s;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.card::before {
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--c) 22%, transparent), transparent 60%);
}
.card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--c) 45%, var(--border)); box-shadow: 0 24px 50px -24px color-mix(in srgb, var(--c) 60%, transparent); }
.card:hover::before { opacity: 1; }

.pcard { display: flex; flex-direction: column; padding: 22px; gap: 16px; min-height: 100%; }
.pcard__top { display: flex; align-items: flex-start; gap: 16px; }
.pcard__icon {
  width: 72px; height: 72px; border-radius: 22px; flex: none;
  box-shadow: 0 12px 28px -10px color-mix(in srgb, var(--c) 80%, transparent);
  transition: transform .4s var(--ease-spring);
}
.card:hover .pcard__icon { transform: scale(1.06) rotate(-3deg); }
.pcard__title { font-size: 20px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pcard__tagline { color: var(--text-2); font-size: 14.5px; font-weight: 600; margin-top: 4px; }
.pcard__desc { color: var(--text-2); font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pcard__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 4px; }
.pcard__platforms { display: flex; gap: 6px; color: var(--muted); }
.pcard__platforms .i { width: 18px; height: 18px; }
.pcard__link::after { content: ''; position: absolute; inset: 0; z-index: 1; }

.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px;
  font-family: var(--font); font-size: 12px; font-weight: 700; letter-spacing: .01em;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); white-space: nowrap;
}
.pill--version { font-variant-numeric: tabular-nums; }
.pill--released { color: #34d399; background: rgba(52, 211, 153, .1); border-color: rgba(52, 211, 153, .25); }
.pill--beta { color: #60a5fa; background: rgba(96, 165, 250, .1); border-color: rgba(96, 165, 250, .25); }
.pill--dev { color: #fbbf24; background: rgba(251, 191, 36, .1); border-color: rgba(251, 191, 36, .25); }
.pill--soon { color: #f472b6; background: rgba(244, 114, 182, .1); border-color: rgba(244, 114, 182, .25); }
.pill--new { color: #fff; background: var(--grad); border-color: transparent; }
.pill--live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 0 currentColor; animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 60%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ---------------------------------------------------------------- Фильтры */
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 28px 0 24px; }
.field {
  display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; border-radius: 14px;
  border: 1px solid var(--border); background: var(--surface); flex: 1 1 260px; max-width: 380px; color: var(--muted);
}
.field:focus-within { border-color: color-mix(in srgb, var(--brand-1) 60%, var(--border)); }
.field input { border: 0; outline: 0; background: none; width: 100%; color: var(--text); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); font-size: 14px; font-weight: 600; color: var(--text-2);
  transition: all .2s;
}
.chip .i { width: 16px; height: 16px; }
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); }

/* ---------------------------------------------------------------- Страница продукта */
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; margin: 28px 0 0; transition: color .2s, gap .2s; }
.back:hover { color: var(--text); gap: 10px; }

.phero {
  --c: var(--brand-1);
  position: relative; margin-top: 18px; padding: 36px; border-radius: var(--radius-xl); overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--c) 30%, var(--border));
  background:
    radial-gradient(600px 300px at 0% 0%, color-mix(in srgb, var(--c) 16%, transparent), transparent 70%),
    radial-gradient(500px 300px at 100% 100%, color-mix(in srgb, var(--c) 8%, transparent), transparent 70%),
    var(--surface);
  display: grid; grid-template-columns: auto 1fr; gap: 32px; align-items: center;
}
.phero__icon { width: 160px; height: 160px; border-radius: 40px; box-shadow: 0 30px 60px -20px color-mix(in srgb, var(--c) 90%, transparent); animation: float 7s ease-in-out infinite; }
.phero__meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.phero h1 { font-size: clamp(34px, 5vw, 56px); letter-spacing: -.03em; }
.phero__tagline { font-size: 19px; font-weight: 700; color: var(--text-2); margin-top: 6px; }
.phero__desc { color: var(--text-2); margin-top: 14px; max-width: 680px; }
.phero__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.phero .btn--primary { --c: var(--pc, var(--brand-1)); }

.layout-2 { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; margin-top: 28px; }
.side { position: sticky; top: calc(var(--topbar-h) + 16px); display: grid; gap: 18px; }
.panel { padding: 24px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); }
.panel + .panel { margin-top: 18px; }
.panel__title { font-size: 18px; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.panel__title .i { color: var(--muted); }

.dl-list { display: grid; gap: 10px; }
.dl {
  --c: var(--brand-1);
  display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 16px;
  border: 1px solid var(--border); background: var(--surface); transition: all .25s var(--ease);
}
.dl:hover { border-color: color-mix(in srgb, var(--c) 55%, var(--border)); background: var(--surface-2); transform: translateX(3px); }
.dl__icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); flex: none; }
.dl__icon .i { width: 22px; height: 22px; }
.dl__body { flex: 1; min-width: 0; }
.dl__name { font-weight: 800; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dl__sub { font-size: 13px; color: var(--muted); }
.dl__go { color: var(--muted); }
/* «Для твоего устройства» — всегда цветом сайта: красный цвет продукта (Budgetit) читался как предупреждение */
.dl.is-recommended { --rc: var(--brand-1); border-color: color-mix(in srgb, var(--rc) 55%, var(--border)); background: color-mix(in srgb, var(--rc) 10%, var(--surface)); }
.dl.is-recommended .dl__icon { background: var(--rc); color: #fff; border-color: transparent; }
.dl.is-soon { opacity: .55; pointer-events: none; }
.dl-variants { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.dl-variants a { font-size: 12.5px; font-weight: 700; padding: 4px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); position: relative; z-index: 2; }
.dl-variants a:hover { border-color: var(--c); }
.dl-variants a.is-soon { opacity: .5; pointer-events: none; }

.shots { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 16px; scrollbar-width: thin; }
.shots button { flex: none; width: 210px; aspect-ratio: 9 / 19; border-radius: 20px; overflow: hidden; border: 1px solid var(--border); scroll-snap-align: start; background: var(--surface); transition: transform .3s var(--ease), box-shadow .3s; }
.shots button:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.shots img { width: 100%; height: 100%; object-fit: cover; }

.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.feature { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); font-weight: 600; font-size: 14.5px; }
.feature .i { color: var(--c, var(--brand-1)); width: 18px; height: 18px; margin-top: 2px; }

.faq details { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); transition: background .2s; }
.faq details + details { margin-top: 10px; }
.faq summary { list-style: none; cursor: pointer; padding: 16px 18px; font-weight: 700; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .i { transition: transform .3s; color: var(--muted); }
.faq details[open] summary .i { transform: rotate(180deg); }
.faq details p { padding: 0 18px 18px; color: var(--text-2); }

.block { margin-top: 44px; }
.block__title { font-size: 24px; margin-bottom: 18px; display: flex; align-items: center; gap: 12px; }

/* ---------------------------------------------------------------- Changelog */
.timeline { position: relative; display: grid; gap: 16px; }
.timeline::before { content: ''; position: absolute; left: 21px; top: 10px; bottom: 10px; width: 2px; background: linear-gradient(var(--border-strong), transparent); }
.rel { position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 16px; }
.rel__dot { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-solid); border: 1px solid var(--border); z-index: 1; overflow: hidden; }
.rel__dot img { width: 100%; height: 100%; object-fit: cover; }
.rel__dot .i { color: var(--muted); }
.rel.is-latest .rel__dot { border-color: var(--c, var(--brand-1)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c, var(--brand-1)) 20%, transparent); }
.rel__card { padding: 18px 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); }
.rel__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rel__ver { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.rel__date { color: var(--muted); font-size: 13.5px; font-weight: 600; }
.rel__notes { margin: 10px 0 0; padding-left: 20px; color: var(--text-2); }
.rel__notes li + li { margin-top: 4px; }
.rel__dls { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.rel__dls a { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); transition: border-color .2s; }
.rel__dls a:hover { border-color: var(--border-strong); }
.rel__dls .i { width: 16px; height: 16px; }
.rel__prod { font-weight: 800; }
.rel__prod:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- Блог */
.post-card { display: flex; flex-direction: column; }
.post-card__cover { position: relative; aspect-ratio: 16 / 8; overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--c) 35%, transparent), transparent 60%), radial-gradient(circle at 80% 80%, color-mix(in srgb, var(--c) 30%, var(--brand-1)), transparent 60%), var(--bg-2); }
.post-card__cover img { width: 96px; height: 96px; border-radius: 26px; box-shadow: 0 20px 40px -14px rgba(0, 0, 0, .6); transition: transform .5s var(--ease-spring); }
.post-card__cover img.is-photo { width: 100%; height: 100%; border-radius: 0; object-fit: cover; }
.post-card:hover .post-card__cover img { transform: scale(1.08) rotate(-3deg); }
.post-card:hover .post-card__cover img.is-photo { transform: scale(1.04); }
.post-card__body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-card__meta { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 13px; font-weight: 600; flex-wrap: wrap; }
.post-card__title { font-size: 19px; line-height: 1.3; }
.post-card__excerpt { color: var(--text-2); font-size: 14.5px; }

.article { max-width: 760px; margin: 0 auto; }
.article__head { padding: 28px 0 8px; }
.article__head h1 { font-size: clamp(30px, 4.6vw, 48px); letter-spacing: -.025em; margin: 16px 0; }
.article__meta { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; color: var(--muted); font-weight: 600; font-size: 14px; }
.article__meta .i { width: 16px; height: 16px; margin-right: 4px; }
.prose { font-size: 17.5px; line-height: 1.75; color: var(--text-2); margin-top: 28px; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 26px; color: var(--text); margin-top: 1.8em; }
.prose h3 { font-size: 20px; color: var(--text); margin-top: 1.5em; }
.prose strong { color: var(--text); }
.prose a { color: var(--brand-1); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
[data-theme="dark"] .prose a { color: #7dd3fc; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--brand-1); }
.prose blockquote { margin-left: 0; padding: 16px 20px; border-left: 3px solid var(--brand-1); background: var(--surface); border-radius: 0 14px 14px 0; color: var(--text); }
.prose code { font-family: ui-monospace, 'JetBrains Mono', Consolas, monospace; font-size: .88em; padding: 2px 7px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }
.prose pre { padding: 18px 20px; border-radius: 16px; background: var(--surface-solid); border: 1px solid var(--border); overflow-x: auto; }
.prose pre code { padding: 0; border: 0; background: none; }
.prose img { border-radius: 18px; border: 1px solid var(--border); margin: 1.6em auto; max-height: 640px; width: auto; cursor: zoom-in; }
.prose hr { border: 0; height: 1px; background: var(--border-strong); margin: 2em 0; }
.article__foot { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--border); }
.article-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 28px; }
.article-nav a { padding: 18px 20px; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); transition: border-color .2s, transform .2s; }
.article-nav a:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.article-nav small { color: var(--muted); font-weight: 700; display: block; margin-bottom: 4px; }
.article-nav b { font-family: var(--font-display); font-weight: 600; font-size: 15px; line-height: 1.35; display: block; }
.article-nav a:last-child { text-align: right; }

/* ---------------------------------------------------------------- Мини-продукт (в статье) */
.mini { --c: var(--brand-1); display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 18px; border: 1px solid color-mix(in srgb, var(--c) 35%, var(--border)); background: color-mix(in srgb, var(--c) 8%, var(--surface)); margin-top: 28px; transition: transform .25s; }
.mini:hover { transform: translateY(-2px); }
.mini img { width: 56px; height: 56px; border-radius: 16px; }
.mini b { font-family: var(--font-display); font-size: 17px; }
.mini span { display: block; color: var(--text-2); font-size: 14px; }
.mini .i { margin-left: auto; color: var(--muted); }

/* ---------------------------------------------------------------- Об авторе / PWA */
.about { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; padding: 28px; }
.about__avatar { width: 96px; height: 96px; border-radius: 28px; object-fit: cover; border: 1px solid var(--border-strong); }
.about h3 { font-size: 22px; }
.about p { color: var(--text-2); margin-top: 6px; max-width: 620px; }
.about__links { display: flex; gap: 10px; }

.cta-install {
  position: relative; overflow: hidden; padding: 36px; border-radius: var(--radius-xl);
  display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center;
  background: radial-gradient(500px 260px at 100% 0%, rgba(14, 165, 233, .18), transparent 70%), radial-gradient(500px 260px at 0% 100%, rgba(37, 92, 246, .3), transparent 70%), var(--surface);
  border: 1px solid var(--border);
}
.cta-install h3 { font-size: clamp(22px, 3vw, 30px); }
.cta-install p { color: var(--text-2); margin-top: 10px; max-width: 560px; }
.cta-install__logo { width: 120px; height: 120px; animation: float 6s ease-in-out infinite; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .45)); }
.cta-install__steps { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

/* ---------------------------------------------------------------- Подвал */
.footer { border-top: 1px solid var(--border); margin-top: 72px; padding: 40px 0 calc(40px + env(safe-area-inset-bottom)); }
.footer__inner { display: flex; gap: 24px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.footer__links { display: flex; gap: 18px; flex-wrap: wrap; color: var(--text-2); font-weight: 600; font-size: 14.5px; }
.footer__links a:hover { color: var(--text); }
.footer small { color: var(--muted); font-size: 13px; }

/* ---------------------------------------------------------------- Нижнее меню (моб.) */
.tabbar { display: none; }

/* ---------------------------------------------------------------- Палитра поиска */
.palette { position: fixed; inset: 0; z-index: 1000; display: grid; justify-items: center; align-items: start; padding: 12vh 16px 16px; }
.palette[hidden] { display: none; }
.palette__backdrop { position: absolute; inset: 0; background: rgba(5, 3, 10, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .2s; }
.palette__box { position: relative; width: 100%; max-width: 620px; border-radius: 22px; background: var(--surface-solid); border: 1px solid var(--border-strong); box-shadow: 0 40px 120px -20px rgba(0, 0, 0, .7); overflow: hidden; animation: pop .25s var(--ease); }
.palette__input { display: flex; align-items: center; gap: 12px; padding: 0 18px; height: 60px; border-bottom: 1px solid var(--border); color: var(--muted); }
.palette__input input { flex: 1; border: 0; outline: 0; background: none; font-size: 17px; color: var(--text); }
.palette__input input::-webkit-search-cancel-button { display: none; }
.palette__list { max-height: 56vh; overflow-y: auto; padding: 8px; }
.palette__group { padding: 10px 12px 6px; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.palette__item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; cursor: pointer; }
.palette__item img { width: 36px; height: 36px; border-radius: 10px; }
.palette__item .pi { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); flex: none; }
.palette__item b { display: block; font-weight: 700; }
.palette__item span { display: block; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette__item > div { min-width: 0; }
.palette__item.is-active { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); }
.palette__empty { padding: 28px; text-align: center; color: var(--muted); }

/* ---------------------------------------------------------------- Лайтбокс */
.lightbox { position: fixed; inset: 0; z-index: 1100; background: rgba(5, 3, 10, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: grid; place-items: center; padding: 60px 70px; animation: fade .2s; touch-action: pan-y; }
.lightbox[hidden] { display: none; }
.lightbox__img { max-width: 100%; max-height: calc(100vh - 120px); border-radius: 20px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); animation: pop .25s var(--ease); }
.lightbox .icon-btn { position: absolute; background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .15); color: #fff; width: 48px; height: 48px; border-radius: 50%; }
.lightbox__close { top: calc(16px + env(safe-area-inset-top)); right: 16px; }
.lightbox__nav--prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 16px; top: 50%; transform: translateY(-50%); }
.lightbox__count { position: absolute; bottom: calc(18px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); color: #fff; font-weight: 700; font-size: 14px; padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, .1); }

/* ---------------------------------------------------------------- Тосты */
.toasts { position: fixed; z-index: 1200; left: 50%; transform: translateX(-50%); bottom: calc(24px + env(safe-area-inset-bottom)); display: grid; gap: 10px; width: min(440px, calc(100vw - 32px)); }
.toast { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--surface-solid); border: 1px solid var(--border-strong); box-shadow: var(--shadow); animation: pop .3s var(--ease); font-weight: 600; font-size: 14.5px; }
.toast .btn { margin-left: auto; height: 36px; padding: 0 14px; font-size: 13.5px; }
.toast.is-out { animation: fadeout .3s forwards; }

@keyframes fade { from { opacity: 0; } }
@keyframes fadeout { to { opacity: 0; transform: translateY(10px); } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.97); } }

/* Появление при скролле */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .45s var(--ease), transform .45s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.page-enter { animation: pageIn .45s var(--ease); }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } }

.offline-bar { position: fixed; top: calc(var(--topbar-h) + env(safe-area-inset-top) + 8px); left: 50%; transform: translateX(-50%); z-index: 90; display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--surface-solid); border: 1px solid var(--border-strong); font-size: 13.5px; font-weight: 700; box-shadow: var(--shadow-sm); }
.offline-bar .i { width: 16px; height: 16px; color: #fbbf24; }

/* ---------------------------------------------------------------- Адаптив */
@media (max-width: 1080px) {
  .search-trigger { min-width: 0; }
  .search-trigger__text, .search-trigger kbd { display: none; }
  .search-trigger { width: 40px; padding: 0; justify-content: center; }
  .layout-2 { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; order: -1; }
}

@media (max-width: 860px) {
  :root { --topbar-h: 60px; }
  .nav { display: none; }
  .hero__grid { grid-template-columns: 1fr; }
  .orbit { max-width: 320px; margin: 8px auto 0; }
  .hero { padding-top: 16px; }
  .phero { grid-template-columns: 1fr; padding: 26px; gap: 20px; text-align: left; }
  .phero__icon { width: 112px; height: 112px; border-radius: 30px; }
  .about { grid-template-columns: auto 1fr; }
  .about__links { grid-column: 1 / -1; }
  .cta-install { grid-template-columns: 1fr; }
  .cta-install__logo { display: none; }

  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 100; left: 12px; right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom)); height: 62px; padding: 6px; border-radius: 22px;
    background: var(--glass); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid var(--border-strong); box-shadow: var(--shadow);
  }
  .tabbar a { position: relative; display: grid; place-items: center; align-content: center; gap: 2px; border-radius: 16px; font-size: 10.5px; font-weight: 700; color: var(--muted); transition: color .2s, background .2s; }
  .tabbar a .i { width: 22px; height: 22px; }
  .tabbar a.is-active { color: var(--text); background: var(--surface-2); }
  .tabbar .dot { top: 6px; right: calc(50% - 16px); }
  .toasts { bottom: calc(86px + env(safe-area-inset-bottom)); }
  .footer { margin-top: 40px; }
}

@media (max-width: 560px) {
  .topbar__inner { padding: 0 14px; gap: 10px; }
  .brand__name { font-size: 15px; }
  .install-btn span { display: none; }
  .install-btn { width: 40px; padding: 0; }
  .icon-btn, .search-trigger { width: 38px; height: 38px; }
}
@media (max-width: 480px) {
  .brand__name { font-size: 14px; }
  .brand__logo { width: 34px; height: 34px; }
  #langBtn { display: none; }
  .topbar__actions { gap: 6px; }
  .topbar__inner { gap: 8px; }
  .container { padding: 0 16px; }
  .section { padding: 40px 0; }
  .hero__stats { gap: 20px; }
  .hero__stat b { font-size: 22px; }
  .hero__cta .btn { flex: 1; }
  .grid--products, .grid--posts { grid-template-columns: 1fr; }
  .shots button { width: 160px; }
  .article-nav { grid-template-columns: 1fr; }
  .article-nav a:last-child { text-align: left; }
  .lightbox { padding: 60px 8px; }
  .lightbox__nav { display: none !important; }
  .prose { font-size: 16.5px; }
  .field { max-width: none; }
  .toolbar .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
  .toolbar .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .about { padding: 22px; gap: 16px; }
  .about__avatar { width: 72px; height: 72px; border-radius: 22px; }
}

@media (display-mode: standalone) {
  .install-btn { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------------- Шторка (поделиться / установка) */
.sheet { position: fixed; inset: 0; z-index: 1050; display: grid; place-items: center; padding: 16px; overflow: hidden; }
.sheet[hidden] { display: none; }
.sheet__backdrop { position: absolute; inset: 0; background: rgba(5, 3, 10, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .2s; }
.sheet__box { position: relative; width: 100%; max-width: 480px; max-height: calc(100vh - 32px); overflow-y: auto; border-radius: 26px; background: var(--surface-solid); border: 1px solid var(--border-strong); box-shadow: 0 40px 120px -20px rgba(0, 0, 0, .7); padding: 24px; animation: pop .25s var(--ease); }
.sheet__close { position: absolute; top: 14px; right: 14px; }
.sheet__head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding-right: 44px; }
.sheet__head img { width: 52px; height: 52px; border-radius: 15px; flex: none; }
.sheet__head h3 { font-size: 19px; }
.sheet__head p { color: var(--muted); font-size: 14px; }
.share-preview { white-space: pre-wrap; word-break: break-word; font-size: 14px; line-height: 1.55; color: var(--text-2); padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); max-height: 220px; overflow-y: auto; }
.share-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; }
.share-btn { display: grid; justify-items: center; gap: 8px; padding: 12px 4px; border-radius: 16px; font-size: 12.5px; font-weight: 700; color: var(--text-2); transition: background .2s; }
.share-btn:hover { background: var(--surface-2); color: var(--text); }
.share-btn span { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; color: #fff; }
.share-btn .i { width: 22px; height: 22px; }
.steps { display: grid; gap: 12px; counter-reset: st; margin: 0; padding: 0; list-style: none; }
.steps li { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); font-weight: 600; font-size: 15px; }
.steps li::before { counter-increment: st; content: counter(st); flex: none; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 800; font-size: 14px; }
.steps .i { width: 18px; height: 18px; vertical-align: -3px; margin: 0 2px; color: var(--brand-3); }
.sheet__note { margin-top: 14px; font-size: 13.5px; color: var(--muted); }
@media (max-width: 560px) {
  .sheet { place-items: end stretch; grid-template-columns: minmax(0, 1fr); padding: 0; }
  .sheet__box { max-width: none; border-radius: 26px 26px 0 0; padding-bottom: calc(24px + env(safe-area-inset-bottom)); animation: up .3s var(--ease); }
}
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.footer__lang { display: inline-flex; gap: 4px; }
.footer__lang button { padding: 4px 10px; border-radius: 8px; font-weight: 700; font-size: 13px; color: var(--muted); border: 1px solid var(--border); }
.footer__lang button.is-active { color: var(--text); background: var(--surface-2); }
.sheet__box, .sheet__head > div, .steps li > div { min-width: 0; }
.sheet__head h3 { overflow-wrap: anywhere; }

/* Подложка под статью */
.article__panel {
  margin-top: 20px; padding: 40px 48px 44px; border-radius: 28px;
  background: var(--surface-solid); border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
[data-theme="dark"] .article__panel { background: rgba(10, 17, 31, .92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.article__panel .article__head { padding-top: 0; }
.article__panel .prose blockquote { background: var(--surface-2); }
@media (max-width: 560px) { .article__panel { padding: 24px 18px 28px; border-radius: 22px; margin-left: -4px; margin-right: -4px; } }
