/* Dmitriy Ni · портфолио. Стиль: графит и серебро, оранжевый только точечно. */

:root {
  --bg: #12151b;
  --bg-2: #171b22;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-hi: rgba(255, 255, 255, 0.075);
  --line: rgba(255, 255, 255, 0.1);
  --line-2: rgba(255, 255, 255, 0.2);
  --text: #eceff3;
  --muted: #9aa3ae;
  --muted-2: #7c8591;
  --accent: #d97757;
  --accent-soft: rgba(217, 119, 87, 0.14);
  --live: #7fd08a;
  --silver: linear-gradient(180deg, #f7f9fb 0%, #c3c9d2 52%, #8c95a2 100%);
  --radius: 14px;
  --wrap: 1180px;
  --display: "Oswald", "Arial Narrow", Impact, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font: 400 16px/1.6 var(--body);
  color: var(--text);
  background:
    radial-gradient(900px 520px at 78% -8%, #2a313d 0%, rgba(42, 49, 61, 0) 62%),
    radial-gradient(700px 420px at 4% 38%, rgba(44, 52, 66, 0.55) 0%, rgba(44, 52, 66, 0) 60%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(var(--wrap), calc(100% - 40px)); margin-inline: auto; }
.skip { position: absolute; left: 12px; top: -60px; background: #fff; color: #111; padding: 8px 14px; border-radius: 8px; z-index: 100; transition: top .15s; }
.skip:focus { top: 12px; }

.silver { background: var(--silver); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- шапка ---------- */
.topbar { position: sticky; top: 0; z-index: 40; backdrop-filter: blur(14px); background: rgba(18, 21, 27, 0.72); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 28px; min-height: 68px; flex-wrap: wrap; }
.logo { font: 600 26px/1 var(--display); letter-spacing: 0.04em; text-decoration: none; display: inline-flex; align-items: baseline; gap: 2px; }
.logo span { color: var(--muted); }
.nav { margin-left: auto; display: flex; gap: 26px; }
.nav a { white-space: nowrap; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none; color: var(--muted); padding: 6px 0; border-bottom: 1px solid transparent; transition: color .15s, border-color .15s; }
.nav a:hover, .nav a[aria-current="true"] { color: var(--text); border-color: var(--accent); }
.nav { scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.lang { border: 1px solid var(--line-2); background: transparent; border-radius: 999px; padding: 6px 14px; font-size: 12px; letter-spacing: 0.1em; cursor: pointer; transition: background .15s; }
.lang:hover { background: var(--panel-hi); }

/* ---------- кнопки ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 22px; border-radius: 10px; font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; border: 1px solid var(--line-2); cursor: pointer; transition: transform .15s, background .15s, border-color .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(180deg, #f3f5f8, #bcc3cd); color: #14181f; border-color: transparent; }
.btn-primary:hover { background: linear-gradient(180deg, #ffffff, #cdd3db); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--panel-hi); border-color: var(--text); }
.btn-sm { padding: 9px 16px; font-size: 12px; }
.btn svg { width: 15px; height: 15px; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 56px 0 40px; overflow: hidden; }
.hero .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr); gap: 20px; align-items: end; min-height: 600px; }
.hero-copy { position: relative; z-index: 2; padding-bottom: 24px; }
.overline { font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-bottom: 20px; }
.hero h1 { font: 700 clamp(72px, 12.5vw, 176px)/0.88 var(--display); letter-spacing: -0.01em; text-transform: uppercase; margin-bottom: 30px; }
.hero h1 span { display: block; }
.headline { font: 600 clamp(20px, 2.1vw, 28px)/1.3 var(--body); max-width: 31em; margin-bottom: 18px; }
.lead { color: var(--muted); max-width: 34em; margin-bottom: 30px; }
.hero .resume-link { border-color: transparent; padding-inline: 8px; }
.hero .resume-link:hover { border-color: var(--line-2); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.resume-link[hidden] { display: none; }

.hero-art { position: relative; z-index: 1; align-self: stretch; min-height: 420px; }
.hero-art::before { content: ""; position: absolute; right: -6%; top: 6%; width: min(520px, 90%); aspect-ratio: 1; border-radius: 50%; border: 1px solid var(--line-2); opacity: .55; }
.hero-photo { position: absolute; right: 0; bottom: -40px; height: 112%; width: auto; aspect-ratio: 1024 / 1536; max-width: none; object-fit: contain; object-position: bottom right;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 16%, #000 72%, transparent 100%), linear-gradient(to right, transparent 0, #000 20%, #000 80%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 16%, #000 72%, transparent 100%), linear-gradient(to right, transparent 0, #000 20%, #000 80%, transparent 100%);
  -webkit-mask-composite: source-in; mask-composite: intersect; }
.monogram { display: none; position: absolute; right: 4%; bottom: 8%; font: 700 clamp(160px, 22vw, 320px)/0.8 var(--display); color: transparent; -webkit-text-stroke: 1px var(--line-2); letter-spacing: -0.02em; user-select: none; }
.hero.no-photo .hero-photo { display: none; }
.hero.no-photo .monogram { display: block; }

@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise .7s both cubic-bezier(.2,.7,.2,1); }
  .hero-copy > *:nth-child(2) { animation-delay: .06s; } .hero-copy > *:nth-child(3) { animation-delay: .12s; }
  .hero-copy > *:nth-child(4) { animation-delay: .18s; } .hero-copy > *:nth-child(5) { animation-delay: .24s; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}

/* ---------- цифры ---------- */
.stats { display: grid; grid-template-columns: 1.6fr 1fr 0.8fr; border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius); margin-top: 8px; }
.stat { padding: 28px 30px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat .v { font: 300 clamp(34px, 4.4vw, 54px)/1.05 var(--body); letter-spacing: -0.02em; }
.stat.wide .v { font-size: clamp(30px, 3.6vw, 46px); }
.stat .l { margin-top: 12px; font-size: 13px; color: var(--muted); max-width: 30em; }
.stat .k { margin-top: 12px; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }

/* ---------- секции ---------- */
section { padding: 72px 0 0; }
.sec-head { display: flex; align-items: baseline; gap: 18px; margin-bottom: 28px; }
.sec-head h2 { font: 600 13px/1 var(--body); letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.sec-head::after { content: ""; flex: 1; height: 1px; background: var(--line); order: 2; }
.sec-head .note { order: 3; font-size: 13px; color: var(--muted-2); }

/* что делаю */
.do-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.do-card { display: grid; grid-template-columns: 52px 1fr; gap: 18px; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.do-card svg { width: 40px; height: 40px; stroke: #c9cfd8; fill: none; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.do-card h3 { font: 600 15px/1.3 var(--body); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 8px; }
.do-card p { color: var(--muted); font-size: 14.5px; }

/* карточки кейсов */
.group-title { display: flex; align-items: baseline; gap: 14px; margin: 8px 0 18px; }
.group-title h3 { font: 600 22px/1.2 var(--display); text-transform: uppercase; letter-spacing: 0.06em; }
.group-title p { color: var(--muted-2); font-size: 13px; }
.cases-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 40px; }
.card { position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; text-decoration: none; transition: transform .2s, border-color .2s, background .2s; }
.card:hover { transform: translateY(-3px); border-color: var(--line-2); background: var(--panel-hi); }
.card-cover { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #0e1116; }
.card-cover img { width: 100%; height: 100%; object-fit: cover; }
.card-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18,21,27,0) 45%, rgba(18,21,27,.82) 100%); }
.card-num { position: absolute; left: 14px; top: 14px; z-index: 2; min-width: 46px; padding: 8px 12px; text-align: center; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(18, 21, 27, 0.86); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); font: 600 20px/1 var(--display); letter-spacing: 0.06em; color: #e4e8ee; }
.card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card h3 { font: 600 19px/1.3 var(--body); }
.card p { color: var(--muted); font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 6px; }
.circle { width: 40px; height: 40px; border: 1px solid var(--line-2); border-radius: 50%; display: grid; place-items: center; flex: none; transition: background .2s, border-color .2s; }
.circle svg { width: 16px; height: 16px; }
.card:hover .circle { background: var(--accent); border-color: var(--accent); }

.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; padding: 5px 12px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--text); background: rgba(255,255,255,.03); }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #8d96a3; }
.badge.live::before { background: var(--live); box-shadow: 0 0 0 3px rgba(127, 208, 138, .18); }
.badge.dev::before { background: var(--accent); }
.badge.nda::before { background: #9db7e8; }
.badge.demo::before { background: #c3c9d2; }
.badge.built::before { background: #8fb3d9; }
.block a:not(.btn) { color: var(--text); border-bottom: 1px solid var(--line-2); text-decoration: none; }
.block a:not(.btn):hover { border-color: var(--accent); }

/* процесс */
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 18px; }
.principle { padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(160deg, rgba(217,119,87,.13), rgba(217,119,87,.03) 60%); font-size: 15px; }
.principle b { display: block; font: 600 28px/1 var(--display); color: var(--accent); margin-bottom: 12px; }
.steps { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.step { padding: 24px 22px 26px; border-right: 1px solid var(--line); }
.step:last-child { border-right: 0; }
.step .n { font-size: 12px; letter-spacing: .16em; color: var(--muted-2); }
.step h3 { font: 600 15px/1.3 var(--body); letter-spacing: .08em; text-transform: uppercase; margin: 8px 0 10px; }
.step p { font-size: 13.5px; color: var(--muted); }

/* стек и обо мне */
.two-col { display: grid; grid-template-columns: 1.15fr 1fr; gap: 20px; align-items: start; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 26px; }
.panel h3 { font: 600 12px/1 var(--body); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.panel h3:not(:first-child) { margin-top: 26px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 13px; padding: 7px 13px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.035); }
.chips.dim .chip { color: var(--muted); }
.about p { color: var(--muted); margin-bottom: 4px; }
.edu li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.edu li span:last-child { color: var(--muted-2); }
.edu-place { font-size: 13px; color: var(--muted-2); margin-top: 10px; }

/* контакты */
.contact { margin-top: 72px; padding: 40px; border-radius: 18px; border: 1px solid var(--line-2); background: linear-gradient(115deg, rgba(255,255,255,.14) 0%, rgba(255,255,255,.04) 38%, rgba(255,255,255,.05) 100%), #1b2028; display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center; }
.contact h2 { font: 700 clamp(36px, 5vw, 60px)/1 var(--display); text-transform: uppercase; }
.contact p { color: var(--muted); margin-top: 14px; max-width: 30em; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-start; }
.contact-links { display: grid; gap: 10px; margin-top: 18px; font-size: 14px; color: var(--muted); }
.contact-links a { text-decoration: none; border-bottom: 1px solid var(--line-2); width: fit-content; }
.contact-links a:hover { color: var(--text); border-color: var(--accent); }

footer { padding: 36px 0 44px; color: var(--muted-2); font-size: 13px; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer a { text-decoration: none; }
footer a:hover { color: var(--text); }

/* ---------- страница кейса ---------- */
.case { padding: 36px 0 0; }
.back { display: inline-flex; gap: 10px; align-items: center; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); text-decoration: none; margin-bottom: 26px; }
.back:hover { color: var(--text); }
.case-head { display: grid; gap: 18px; margin-bottom: 30px; }
.case-num { font: 600 22px/1 var(--display); color: var(--muted); letter-spacing: .1em; }
.case h1 { font: 600 clamp(32px, 4.8vw, 60px)/1.08 var(--display); max-width: 22em; }
.nw { white-space: nowrap; }
.case-context { font-size: 14px; color: var(--muted-2); font-style: italic; }
.case-summary { font-size: clamp(17px, 1.7vw, 20px); color: #d6dbe2; max-width: 42em; }
.role { display: flex; gap: 14px; align-items: baseline; padding: 14px 18px; border-left: 2px solid var(--accent); background: var(--panel); border-radius: 0 10px 10px 0; max-width: 46em; font-size: 15px; }
.role b { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); white-space: nowrap; }
.note-box { padding: 14px 18px; border: 1px dashed var(--line-2); border-radius: 10px; color: var(--muted); font-size: 14px; max-width: 46em; }

.metrics { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); margin: 6px 0 14px; }
.metric { padding: 24px 26px; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric .v { font: 600 clamp(28px, 3.3vw, 42px)/1.05 var(--display); color: var(--accent); }
.metric .l { margin-top: 10px; font-size: 13px; color: var(--muted); }

.block { margin-top: 44px; }
.block h2 { font: 600 13px/1 var(--body); letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; display: flex; align-items: center; gap: 16px; }
.block h2::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.block > p { color: #d1d6dd; max-width: 48em; }
.block > p + ul, .block > p + ol { margin-top: 14px; }
.bullets { display: grid; gap: 12px; max-width: 52em; }
.bullets li { position: relative; padding-left: 22px; color: #d1d6dd; }
.bullets li::before { content: ""; position: absolute; left: 2px; top: .7em; width: 7px; height: 7px; border-radius: 50%; background: #8d96a3; }
.numbered { display: grid; gap: 14px; counter-reset: n; max-width: 54em; }
.numbered li { counter-increment: n; position: relative; padding: 16px 18px 16px 62px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: #d1d6dd; }
.numbered li::before { content: counter(n, decimal-leading-zero); position: absolute; left: 18px; top: 13px; font: 600 24px/1 var(--display); color: var(--accent); }
strong { color: var(--text); font-weight: 600; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
table.ba { width: 100%; border-collapse: collapse; min-width: 640px; }
.ba th, .ba td { padding: 16px 20px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); font-size: 15px; }
.ba tr:last-child td { border-bottom: 0; }
.ba th { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); background: rgba(255,255,255,.04); }
.ba th:last-child { color: var(--accent); }
.ba tbody th { width: 20%; font-size: 15px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--muted); background: none; }
.ba td:nth-child(2) { color: #b3bac4; }
.ba td:last-child { color: var(--text); }
.ba-note { margin-top: 12px; font-size: 13.5px; color: var(--muted); max-width: 52em; }

.cols3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.col { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 20px 20px 22px; }
.col h3 { font: 600 13px/1 var(--body); letter-spacing: .16em; text-transform: uppercase; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.col h3::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #8d96a3; }
.col.now h3::before { background: var(--live); }
.col.wip h3::before { background: var(--accent); }
.col .bullets { gap: 10px; font-size: 14.5px; }

.flow { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
.fstep { position: relative; padding: 12px 16px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel); font-size: 14px; display: flex; align-items: center; }
.fstep.future { border-style: dashed; color: var(--muted); background: transparent; }
.farrow { align-self: center; color: var(--muted-2); }
.flow-note { margin-top: 10px; font-size: 12.5px; color: var(--muted-2); }

.gallery { display: grid; gap: 22px; }
figure.shot { display: grid; gap: 10px; }
figure.shot button { padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #0e1116; cursor: zoom-in; display: block; width: 100%; }
figure.shot img { width: 100%; height: auto; }
figcaption { font-size: 13.5px; color: var(--muted); }
.phones { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.phones figure.shot button { border-radius: 14px; }
.shot.narrow { max-width: 880px; }

.case-links { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 44px; }
.demo-note { font-size: 13px; color: var(--muted-2); max-width: 36em; }
.next { margin-top: 64px; display: block; text-decoration: none; padding: 26px 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); transition: background .2s, border-color .2s; }
.next:hover { background: var(--panel-hi); border-color: var(--line-2); }
.next small { display: block; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 8px; }
.next span { font: 600 clamp(20px, 2.4vw, 28px)/1.2 var(--display); text-transform: uppercase; }

/* lightbox */
dialog#lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh; color: var(--text); }
dialog#lightbox::backdrop { background: rgba(6, 8, 11, 0.88); }
.lb-inner { display: grid; gap: 10px; justify-items: center; }
.lb-inner img { max-width: 94vw; max-height: 84vh; width: auto; height: auto; border-radius: 10px; }
.lb-inner p { font-size: 14px; color: var(--muted); max-width: 70ch; text-align: center; }
.lb-close { position: fixed; right: 18px; top: 14px; border: 1px solid var(--line-2); background: rgba(18,21,27,.9); border-radius: 999px; padding: 8px 16px; cursor: pointer; font-size: 13px; }

/* ---------- адаптив ---------- */
@media (max-width: 1020px) {
  .hero .wrap { grid-template-columns: 1fr; min-height: 0; }
  .hero-art { min-height: 320px; margin-top: -20px; }
  .hero-photo { position: relative; right: auto; bottom: auto; margin-inline: auto; height: 360px; }
  .principles, .steps { grid-template-columns: 1fr; }
  .step { border-right: 0; border-bottom: 1px solid var(--line); }
  .step:last-child { border-bottom: 0; }
  .cols3 { grid-template-columns: 1fr; }
  .two-col, .contact { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .nav { order: 3; width: 100%; margin: 0; overflow-x: auto; gap: 22px; padding-bottom: 10px; }
  .top-actions { margin-left: auto; }
  .topbar .wrap { gap: 10px; min-height: 60px; padding-top: 8px; }
  .stats, .metrics { grid-template-columns: 1fr; }
  .stat, .metric { border-right: 0; border-bottom: 1px solid var(--line); }
  .stat:last-child, .metric:last-child { border-bottom: 0; }
  .do-grid, .cases-grid { grid-template-columns: 1fr; }
  .phones { grid-template-columns: repeat(2, 1fr); }
  .contact { padding: 28px 22px; }
}
@media (max-width: 480px) {
  .wrap { width: calc(100% - 32px); }
  .do-card { grid-template-columns: 1fr; }
  .btn { padding: 12px 18px; }
}

/* ---------- карусель кейсов (веб): ~3,5 карточки в ряд, карточки компактнее ---------- */
.stack-note { color: var(--muted-2); font-size: 13px; margin-bottom: 18px; }
.carousel { position: relative; margin-bottom: 36px; }
.carousel .car-track { padding-inline: 0; }
.car-track { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px 2px 8px; }
.car-track::-webkit-scrollbar { display: none; }
.car-track .card { flex: 0 0 calc((100% - 3 * 16px) / 3.5); scroll-snap-align: start; }
.car-track .card-cover { aspect-ratio: 16 / 10; }
.car-track .card-body { padding: 14px 16px 16px; gap: 8px; }
.car-track .card h3 { font-size: 15px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.car-track .card p { font-size: 12.5px; -webkit-line-clamp: 3; }
.car-track .card .badge { font-size: 11px; padding: 3px 9px; }
.car-track .card-num { left: 10px; top: 10px; min-width: 38px; padding: 5px 9px; font-size: 16px; border-radius: 8px; }
.car-track .circle { width: 32px; height: 32px; }
@media (max-width: 1020px) { .car-track .card { flex-basis: calc((100% - 16px) / 2.3); } }
@media (max-width: 820px) {
  .carousel { margin-bottom: 28px; }
  .car-btn { display: none; }
  .car-track { display: grid; grid-template-columns: 1fr; overflow: visible; scroll-snap-type: none; }
  .car-track .card { flex-basis: auto; }
  .car-track .card-body { padding: 20px 22px 24px; }
  .car-track .card h3 { font-size: 19px; -webkit-line-clamp: unset; display: block; }
  .car-track .card p { font-size: 14.5px; -webkit-line-clamp: 4; }
  .car-track .card-cover { aspect-ratio: 16 / 9; }
}

/* стрелки карусели: по бокам, строго симметрично (одинаковый отступ и общий вертикальный центр) */
.car-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 42px; height: 42px; padding: 0; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(18, 21, 27, .9); color: var(--text); cursor: pointer; display: grid; place-items: center; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: 0 4px 14px rgba(0, 0, 0, .35); transition: background .15s, border-color .15s; }
.car-btn:hover { background: var(--accent); border-color: var(--accent); }
.car-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.car-btn.car-prev { left: -56px; } .car-btn.car-next { right: -56px; }
@media (max-width: 1320px) { .car-btn.car-prev { left: 8px; } .car-btn.car-next { right: 8px; } }
@media (max-width: 820px) { .car-btn { display: none; } }
.block.case-demo { margin-top: 0; margin-bottom: 8px; }
