/* =========================================================
   Эдуард Дмитренко — портфолио. Перенос из Framer.
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  --bg: #010101;
  --fg: #ffffff;
  --muted: #858585;
  --muted-2: #858585;
  --card: #171717;          /* карточки 16px */
  --media: #171717;         /* подложки под макеты */
  --media-alt: #e7e7e7;
  --case-card: #171717;     /* карточки кейсов на главной */
  --btn-2: #2b2b2b;
  --btn-2-fg: #ffffff;
  --chip: rgba(255, 255, 255, .12);
  --chip-fg: #ffffff;
  --divider: #303030;
  --topbar: rgba(26, 26, 26, .4);
  --about-card: rgba(8, 8, 8, .8);   /* плотнее: в браузерах, где размытие отключено (Яндекс в режиме энергосбережения), фото не просвечивает */
  --accent: #ff1ca0;
  --fg-on-alt: #121212;
  --ease: cubic-bezier(.4, 0, .2, 1);
  color-scheme: dark;
}
:root[data-site-theme="light"] {
  --bg: #f5f5f5;
  --fg: #121212;
  --card: #ffffff;
  --media: #e7e7e7;
  --case-card: #ffffff;
  --btn-2: #e7e7e7;
  --btn-2-fg: #121212;
  --chip: #f5f5f5;
  --chip-fg: #858585;
  --divider: rgba(0, 0, 0, .1);
  --topbar: rgba(245, 245, 245, .6);
  --about-card: #ffffff;
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
html.is-ready { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-variation-settings: "opsz" 32;   /* Inter Display, как во Framer */
  font-size: 16px; line-height: 24px;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.muted-2 { color: var(--muted-2); }
.accent { color: var(--accent); }
.strong { font-weight: 700; }
.center { text-align: center; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons & chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 16px; border-radius: 24px;
  font-size: 16px; line-height: 24px; font-weight: 600; white-space: nowrap;
  border: 0; cursor: pointer;
  transition: filter .15s var(--ease), transform .15s var(--ease), background-color .3s var(--ease), color .3s var(--ease);
}
.btn:hover { filter: brightness(1.12); }
:root[data-site-theme="light"] .btn--secondary:hover { filter: brightness(.95); }
.btn:active { transform: scale(.98); }
.btn--lg { height: 64px; padding: 0 24px; border-radius: 40px; font-size: 18px; }
.btn--primary { background: var(--accent); color: #fff; }
.btn--secondary { background: var(--btn-2); color: var(--btn-2-fg); }
.btn svg { width: 24px; height: 24px; flex: none; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 8px;
  background: var(--chip); color: var(--chip-fg);
  font-size: 12px; line-height: 16px; font-weight: 500;
}
.chip--on { background: rgba(255, 255, 255, .2); color: #fff; }

.icon-btn {
  display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: transparent; border: 0; cursor: pointer; color: var(--fg);
  transition: background-color .2s var(--ease);
}
.icon-btn:hover { background: var(--chip); }

/* theme toggle icon (moon in dark, sun in light) */
.theme-toggle {
  width: 48px; height: 48px; border: 0; border-radius: 50%; background: transparent; cursor: pointer; color: var(--fg);
  display: inline-grid; place-items: center; transition: background-color .2s var(--ease);
}
.theme-toggle:hover { background: var(--chip); }

.theme-toggle::before {
  content: ""; width: 20px; height: 20px; background: currentColor;
  -webkit-mask: var(--moon) center / contain no-repeat; mask: var(--moon) center / contain no-repeat;
}
:root[data-site-theme="light"] .theme-toggle::before { -webkit-mask-image: var(--sun); mask-image: var(--sun); }
:root {
  --moon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.5 14A9 9 0 0 1 10 3.5 9 9 0 1 0 20.5 14Z'/%3E%3C/svg%3E");
  --sun: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4'/%3E%3C/svg%3E");
}

/* =========================================================
   HOME
   ========================================================= */
.topbar {
  position: fixed; inset: 0 0 auto; z-index: 50; height: 80px; padding: 0 23px 0 26px;
  display: flex; align-items: center; justify-content: space-between;
  transition: background-color .3s var(--ease), backdrop-filter .3s var(--ease);
}

.topbar__loc { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.topbar__loc svg { width: 11px; height: 14px; }
.topbar__links { display: flex; align-items: center; gap: 12px; }
.topbar__links svg { width: 20px; height: 20px; }

.hero {
  position: relative; isolation: isolate; overflow-x: clip;
  display: flex; flex-direction: column; align-items: center;
  padding-top: 123px;
}
.hero__glow {
  position: absolute; z-index: -1; pointer-events: none;
  left: -23.68%; width: 147.43%; top: -120px; height: 960px;
}
.hero__glow canvas { position: absolute; inset: 0; width: 100%; height: 100%; transform: scale(1.24); }
:root[data-site-theme="light"] .hero__glow { opacity: 0; transition: opacity .3s; }
.hero__name {
  font-size: 124px; line-height: 124px; font-weight: 700; letter-spacing: -0.02em;
  text-align: center; white-space: nowrap;
}
.hero__portrait { width: 427px; aspect-ratio: 427 / 515; margin-top: -34px; object-fit: cover; position: relative; }
.about-card {
  position: relative; width: 565px; margin-top: -72px; padding: 24px;
  border-radius: 40px; background: var(--about-card);
  -webkit-backdrop-filter: blur(55px); backdrop-filter: blur(55px);
  display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center;
  transition: background-color .3s var(--ease);
}
.about-card__role { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; color: var(--muted); }
.about-card__role .chip { height: 24px; font-size: 14px; line-height: 20px; font-weight: 400; }
.about-card .chips { justify-content: center; }
.hero__actions { display: flex; gap: 19px; margin-top: 24px; }
.hero__actions .btn { width: 273px; }

/* =========================================================
   CASE PAGES
   ========================================================= */
.case-nav {
  position: fixed; inset: 0 0 auto; z-index: 50; height: 80px; padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  pointer-events: none;
}
.case-nav > * { pointer-events: auto; }
.case-nav__back { gap: 8px; padding: 0 16px; }
.case-nav__back svg { width: 16px; height: 14px; }
.case-nav__links {
  position: absolute; left: 50%; transform: translateX(-50%);
  display: flex; gap: 12px; padding: 4px; border-radius: 24px;
}
.case-nav__links a { height: 40px; padding: 0 16px; display: inline-flex; align-items: center; border-radius: 24px; font-weight: 500; transition: background-color .2s var(--ease); }
.case-nav__links a:hover, .case-nav__links a.is-active { background: var(--chip); }
.case-nav__right { display: flex; align-items: center; gap: 26px; }
.case-nav__tg svg { width: 24px; height: 24px; }
.case-nav__burger { display: none; }


.case { width: min(1040px, 100% - 64px); margin: 0 auto; padding: 120px 0 84px; }
.case > * { margin-top: var(--mt, 0); }
.anchor { display: block; height: 0; }
.case h2 { font-size: 24px; line-height: 32px; font-weight: 700; }
.case p { font-size: 16px; line-height: 24px; }

.case-hero {
  position: relative; overflow: hidden; border-radius: 40px; color: #fff; min-height: 215px;
}
.case-hero__deco { position: absolute; pointer-events: none; }
.case-hero__deco svg { width: 100%; height: 100%; display: block; }
.case-hero__icon { position: absolute; left: var(--l); top: var(--t); width: var(--w); height: var(--h); object-fit: cover; pointer-events: none; }
.case-hero__body { position: relative; padding: 40px; max-width: 669px; }
.case-hero h1 { margin-top: 24px; font-size: 48px; line-height: 56px; font-weight: 700; }
.case-hero__sub { margin-top: 8px; }
.case-hero__note { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 14px !important; line-height: 20px !important; color: rgba(255, 255, 255, .7); }

.media { position: relative; overflow: hidden; border-radius: var(--r, 40px); transition: background-color .3s var(--ease); }
.media-row { display: flex; align-items: flex-start; gap: var(--gap); padding: var(--pad); }
.media-row img { flex: var(--w) 1 0; min-width: 0; width: 100%; height: auto; }
.media-comp { container-type: inline-size; }
.media-comp > * { position: absolute; margin: 0; }
.media-comp img { width: 100%; height: 100%; }
.comp-svg svg { width: 100%; height: 100%; display: block; }
.media-img { width: 100%; height: auto; }

.info-row { display: grid; grid-template-columns: 1fr 1fr; padding: 24px 0; border-bottom: 1px solid var(--divider); }
.info-row--stack { grid-template-columns: 1fr; gap: 0; }
.info-row__label { color: var(--muted); }
.info-row__value { display: flex; flex-direction: column; gap: 8px; }
.info-row:last-of-type { border-bottom: 0; }

.dash { display: flex; flex-direction: column; gap: var(--li-gap, 8px); }
.dash li::before { content: "— "; }

.card {
  background: var(--card); border-radius: 16px; padding: var(--pad, 16px);
  display: flex; flex-direction: column;
  transition: background-color .3s var(--ease);
}
.card > * { margin-top: var(--mt, 0); }
.card-num { font-size: 14px; line-height: 20px; color: var(--muted); }
.card-title { font-size: 16px; line-height: 24px; font-weight: 500; }
.card-desc { font-size: 14px !important; line-height: 20px !important; color: var(--muted-2); }
.card-desc--muted { color: var(--muted); }
.card-item { font-size: 14px !important; line-height: 20px !important; }
.card-note { display: flex; align-items: center; gap: 8px; font-size: 14px !important; line-height: 20px !important; color: var(--muted); }
.card .ico { width: 14px; height: 14px; flex: none; }
.cards { display: grid; grid-template-columns: var(--cols); column-gap: var(--gx); row-gap: var(--gy); }

.cta { margin-top: 160px !important; text-align: center; }
.case .cta h2 { font-size: 24px; line-height: 28px; }
.cta p { margin-top: 8px; }
.cta__actions { display: flex; justify-content: center; gap: 17px; margin-top: 24px; }

.next-case {
  margin-top: 80px; position: relative; display: flex; align-items: center; gap: 27px;
  height: 168px; padding: 24px; border-radius: 40px; background: var(--case-card); overflow: hidden;
  transition: background-color .3s var(--ease);
}
.next-case__thumb { position: relative; width: 137px; align-self: stretch; flex: none; }
.next-case__thumb img { position: absolute; left: 0; top: 0; width: 137px; height: auto; }
.next-case__body { flex: 1; min-width: 0; align-self: flex-start; }
.next-case h3 { font-size: 24px; line-height: 28px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.next-case p { margin-top: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.next-case .chips { margin-top: 12px; }
.next-case .btn { flex: none; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1280px) {
  .hero__name { font-size: clamp(56px, 9.2vw, 124px); line-height: 1; }
}

@media (max-width: 1100px) {
  .case-nav__links { display: none; }
}

@media (max-width: 900px) {
  .hero__portrait { width: min(427px, 70vw); }
}

@media (max-width: 760px) {
  html { scroll-padding-top: 80px; }

  .topbar { height: 64px; padding: 0 16px 0 19px; }
  .topbar__links { gap: 12px; }
  .hero { padding-top: 88px; }
  .hero__glow { left: -50.26%; width: 200.26%; top: -99px; height: 854px; }
  .hero__name { font-size: 36px; line-height: 44px; }
  .hero__portrait { width: calc(100% - 63px); max-width: 327px; margin-top: -14px; }
  .about-card { width: calc(100% - 32px); margin-top: -108px; padding: 24px 16px; border-radius: 40px; }
  .hero__actions { flex-direction: column-reverse; width: calc(100% - 32px); gap: 16px; }
  .hero__actions .btn { width: 100%; height: 52px; border-radius: 24px; }

  /* case pages */
  .case-nav { height: 72px; padding: 12px 13px; }
  .case-nav__back span, .case-nav__tg span { display: none; }
  .case-nav__back { width: 48px; padding: 0; }
  .case-nav__tg { width: 48px; padding: 0; }
  .case-nav__right { gap: 8px; }
  .case-nav__burger {
    display: inline-flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px;
    width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--btn-2); cursor: pointer;
  }
  .case-nav__burger span { width: 16px; height: 2px; border-radius: 1px; background: var(--fg); transition: transform .2s; }
  .case-nav.is-open .case-nav__links {
    display: flex; flex-direction: column; position: fixed; top: 72px; left: 13px; right: 13px; transform: none;
    padding: 8px; border-radius: 24px; background: var(--card); box-shadow: 0 12px 40px rgba(0,0,0,.35);
  }
  .case { width: calc(100% - 26px); padding-top: 84px; }
  .case > * { margin-top: min(var(--mt, 0px), 64px); }
  .case-hero { border-radius: 24px; min-height: 0; }
  .case-hero__body { padding: 24px 13px; }
  .case-hero h1 { font-size: 28px; line-height: 32px; margin-top: 16px; }
  .case-hero__deco { display: none; }
  .case-hero__icon { left: auto; right: -20%; top: 10%; width: 60%; height: auto; opacity: .35; }
  .media { border-radius: 24px; }
  .media-row { padding: 16px; gap: 8px; }
  .media-row--many { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .media-row--many::-webkit-scrollbar { display: none; }
  .media-row--many img { flex: 0 0 62%; scroll-snap-align: center; }
  .info-row { grid-template-columns: 1fr; gap: 16px; }
  .cards { grid-template-columns: 1fr; }
  .cards--scroll {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 82%;
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: -13px; padding-inline: 13px;
  }
  .cards--scroll::-webkit-scrollbar { display: none; }
  .cards--scroll .card { scroll-snap-align: start; }
  .card[style*="max-width"] { max-width: none !important; }
  .cta { margin-top: 96px !important; }
  .cta__actions { flex-direction: column; }
  .cta__actions .btn { height: 52px; border-radius: 24px; }
  .next-case { flex-direction: column; align-items: stretch; height: auto; padding: 16px; border-radius: 24px; margin-top: 48px; }
  .next-case__thumb { display: none; }
  .next-case h3 { white-space: normal; font-size: 20px; line-height: 24px; }
  .next-case .btn { height: 52px; border-radius: 24px; }
}

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

/* =========================================================
   Кейс «Ням» — по макету Figma 150:26464
   ========================================================= */
.case-nav--simple { padding: 16px; }
.case-nav--simple .case-nav__back, .case-nav--simple .case-nav__tg { gap: 10px; padding: 0 20px 0 16px; border-radius: 999px; }
.case-nav--simple .case-nav__back svg, .case-nav--simple .case-nav__tg svg { width: 20px; height: 20px; }
.case-nav--simple .case-nav__right { gap: 16px; }

.nyam-case { width: min(1040px, 100% - 64px); margin: 0 auto; padding: 120px 0 120px; }
.nyam-head { display: flex; align-items: center; gap: 12px; padding: 80px 0; }
.nyam-head__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.nyam-head h1 { font-size: 24px; line-height: 30px; font-weight: 700; letter-spacing: -0.02em; }
.nyam-head p { color: var(--muted); line-height: 22px; letter-spacing: -0.02em; }
.nyam-head p b { color: var(--fg); font-weight: 400; }
.nyam-head .btn { flex: none; }

.facts { padding: 80px 0; }
.fact { display: grid; grid-template-columns: 1fr 1fr; padding: 24px 0; border-top: 1px solid var(--divider); }
.fact:first-child { padding-top: 0; border-top: 0; }
.fact__label { color: var(--muted); }

.nblock { padding: 40px 0; display: flex; flex-direction: column; gap: 16px; }
.nblock h2 { font-size: 24px; line-height: 32px; font-weight: 700; }
.nblock h2.semi { font-weight: 600; }
.nblock--media { gap: 40px; }
.nblock--media > div { display: flex; flex-direction: column; gap: 16px; }
.drafts { display: flex; gap: 40px; padding: 40px; border-radius: 40px; background: var(--media); transition: background-color .3s var(--ease); }
.drafts img { flex: 1 0 0; min-width: 0; aspect-ratio: 1179 / 2556; object-fit: cover; border: 8px solid #575757; border-radius: 24px; }

.nsec { padding: 40px 0; }
.nsec__title { font-size: 40px; line-height: 48px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 40px; }
.screens { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px 24px; }
.screens img { width: 100%; aspect-ratio: 1317 / 2694; object-fit: cover; }

.result { display: flex; flex-direction: column; gap: 24px; padding: 24px; border-radius: 40px; background: #fff; color: #000; }
:root[data-site-theme="light"] .result { background: #121212; color: #fff; }
.result__kicker { color: #858585; margin-bottom: -16px; }
.result__num { font-size: 48px; line-height: 56px; font-weight: 700; }
.result__list { list-style: disc; padding-left: 24px; display: flex; flex-direction: column; gap: 12px; }

.ncta { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding-top: 40px; }
.ncta h2 { font-size: 24px; line-height: 32px; font-weight: 700; }
.ncta__actions { display: flex; gap: 20px; padding-top: 24px; }

@media (max-width: 760px) {
  .case-nav--simple { padding: 12px; }
  .nyam-case { width: calc(100% - 32px); padding: 72px 0 64px; }
  .nyam-head { flex-direction: column; align-items: stretch; gap: 16px; padding: 32px 0; }
  .nyam-head h1 { font-size: 22px; line-height: 28px; }
  .facts { padding: 48px 0; }
  .fact { grid-template-columns: 1fr; gap: 8px; }
  .nblock { padding: 24px 0; }
  .nblock h2 { font-size: 20px; line-height: 26px; }
  .drafts { gap: 12px; padding: 16px; border-radius: 24px; }
  .drafts img { border-width: 4px; border-radius: 14px; }
  .nsec { padding: 32px 0; }
  .nsec__title { font-size: 28px; line-height: 32px; margin-bottom: 24px; }
  .screens { grid-template-columns: repeat(2, 1fr); gap: 16px 12px; }
  .result { border-radius: 24px; }
  .result__num { font-size: 36px; line-height: 44px; }
  .ncta__actions { flex-direction: column; width: 100%; gap: 12px; }
  .ncta__actions .btn { width: 100% !important; height: 52px; }
}

/* ---------- Кейсы: правки по макетам Figma ---------- */
.chip--on { background: rgba(255, 255, 255, .18); }
.case-hero__note { color: rgba(255, 255, 255, .8); }
.card-item { line-height: 21px !important; }
.case .cta .btn { height: 62px; min-width: 200px; border-radius: 999px; }
.next-case { height: auto; min-height: 168px; align-items: flex-start; }
.next-case h3 { white-space: normal; line-height: 32px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.next-case .btn { height: 62px; border-radius: 999px; align-self: center; }
.next-case .chip { background: var(--btn-2); color: var(--btn-2-fg); }

/* ---------- «Живые» иконки Telegram / LinkedIn при наведении ---------- */
.icon-btn svg { transition: transform .15s var(--ease); }
.icon-btn--tg:hover .ico-tg, .icon-btn--tg:focus-visible .ico-tg { animation: tg-fly .45s var(--ease); }

.icon-btn--tg:hover, .icon-btn--in:hover { background: var(--chip); color: var(--fg); }
@keyframes tg-fly {
  0% { transform: none; }
  35% { transform: translate(14px, -14px) rotate(-12deg); opacity: 0; }
  36% { transform: translate(-14px, 14px) rotate(-12deg); opacity: 0; }
  70% { transform: translate(2px, -2px); opacity: 1; }
  100% { transform: none; }
}
@keyframes in-pop {
  0% { transform: none; }
  30% { transform: scale(.82) rotate(-8deg); }
  65% { transform: scale(1.18) rotate(6deg); }
  100% { transform: none; }
}
@media (prefers-reduced-motion: reduce) { .icon-btn svg { animation: none !important; } }

/* ---------- Лайтбокс для концептов ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  padding: max(24px, env(safe-area-inset-top, 0px)) 24px max(24px, env(safe-area-inset-bottom, 0px));
  background: rgba(1, 1, 1, .92); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  opacity: 0; visibility: hidden; transition: opacity .2s var(--ease), visibility .2s;
  cursor: zoom-out;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__media { max-width: min(100%, 1600px); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); width: auto; height: auto; border-radius: 24px; object-fit: contain; cursor: default; transform: scale(.96); transition: transform .25s var(--ease); }
.lightbox.is-open .lightbox__media { transform: none; }
.lightbox__close {
  position: absolute; top: max(16px, env(safe-area-inset-top, 0px)); right: 16px; width: 48px; height: 48px; border-radius: 50%;
  border: 0; background: #2b2b2b; color: #fff; cursor: pointer; display: grid; place-items: center; font-size: 0;
}
.lightbox__close::before, .lightbox__close::after { content: ""; position: absolute; width: 18px; height: 2px; border-radius: 1px; background: currentColor; transform: rotate(45deg); }
.lightbox__close::after { transform: rotate(-45deg); }
[data-lightbox] { cursor: zoom-in; }
html.lb-open { overflow: hidden; }

/* ---------- Шапка: прогрессивный блюр (сверху сильнее, к низу сходит на нет) ---------- */
.topbar, .case-nav { isolation: isolate; }
.topbar > *:not(.pblur), .case-nav > *:not(.pblur) { position: relative; z-index: 1; }
.case-nav__links { z-index: 1; }
.pblur { position: absolute; left: 0; right: 0; top: 0; height: 120%; z-index: 0; pointer-events: none; }
.pblur i { position: absolute; inset: 0; }
.pblur i:nth-child(1) { -webkit-backdrop-filter: blur(1px); backdrop-filter: blur(1px); -webkit-mask: linear-gradient(#000 0 60%, transparent 100%); mask: linear-gradient(#000 0 60%, transparent 100%); }
.pblur i:nth-child(2) { -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); -webkit-mask: linear-gradient(#000 0 50%, transparent 85%); mask: linear-gradient(#000 0 50%, transparent 85%); }
.pblur i:nth-child(3) { -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); -webkit-mask: linear-gradient(#000 0 40%, transparent 70%); mask: linear-gradient(#000 0 40%, transparent 70%); }
.pblur i:nth-child(4) { -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); -webkit-mask: linear-gradient(#000 0 25%, transparent 55%); mask: linear-gradient(#000 0 25%, transparent 55%); }
.pblur i:nth-child(5) { background: linear-gradient(rgba(1, 1, 1, .35), rgba(1, 1, 1, 0)); }
:root[data-site-theme="light"] .pblur i:nth-child(5) { background: linear-gradient(rgba(245, 245, 245, .5), rgba(245, 245, 245, 0)); }

/* ---------- Lottie-иконки (useanimations) ---------- */
.lottie { display: inline-grid; place-items: center; width: 24px; height: 24px; }
.lottie.is-lottie svg { width: 100% !important; height: 100% !important; }
.lottie.is-lottie path { stroke: currentColor; }
.lottie--moon.is-lottie path { fill: currentColor; }
.theme-toggle { position: relative; }
.theme-toggle .lottie--moon { position: absolute; inset: 0; margin: auto; }
.theme-toggle.has-lottie::before { display: none; }
:root[data-site-theme="light"] .theme-toggle.has-lottie::before { display: block; }
:root[data-site-theme="light"] .theme-toggle .lottie--moon { display: none; }

/* светлая тема: фон у иконок-кнопок только при наведении */
:root[data-site-theme="light"] .icon-btn:hover, :root[data-site-theme="light"] .theme-toggle:hover,
:root[data-site-theme="light"] .icon-btn--tg:hover, :root[data-site-theme="light"] .icon-btn--in:hover { background: #e3e3e3; }
/* LinkedIn: залитый вид — штрихи анимации толще, без заливки контуров */

/* ---------- Курсор-подсказка ---------- */
.cursor-label {
  position: fixed; left: 0; top: 0; z-index: 200; pointer-events: none;
  margin: 14px 0 0 14px; padding: 10px 16px; border-radius: 999px;
  background: #fff; color: #000; font-size: 14px; line-height: 20px; font-weight: 600; white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  opacity: 0; scale: .6; transition: opacity .15s var(--ease), scale .18s var(--ease);
}
.cursor-label.is-on { opacity: 1; scale: 1; }
:root[data-site-theme="light"] .cursor-label { background: #121212; color: #fff; }
@media (hover: hover) and (pointer: fine) { [data-cursor] { cursor: none; } [data-cursor] * { cursor: none !important; } }

/* =========================================================
   v6 — шапка кейса по центру (215:30845 / 202:29795),
   «Ещё кейсы» (219:32897), финальный CTA, LinkedIn fill
   ========================================================= */
.chead { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 24px; padding: 80px 0 40px; }
.chead__text { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.chead h1 { font-size: 48px; line-height: 56px; font-weight: 500; letter-spacing: -0.96px; }
.chead__desc { color: var(--muted); max-width: 1040px; }
.chead__note { display: inline-flex; align-items: center; gap: 6px; color: #ff8a00; font-size: 14px !important; line-height: 20px !important; }
.chead__note svg { width: 14px; height: 14px; flex: none; }
.chead .tags2 { justify-content: center; }
.chead .btn--white { margin-top: 16px; }
:root[data-site-theme="light"] .chead .tag2 { background: #fff; color: var(--fg); box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }

.chero-wrap { container-type: inline-size; width: min(720px, 100%); margin: 40px auto; }
.chero { position: relative; height: calc(100cqw * 586 / 720); }
.chero__bg { position: absolute; inset: 0; overflow: hidden; border-radius: calc(100cqw * 100 / 720); background: #fff; }
.chero__bg > video, .chero__bg > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.chero__tex { position: absolute; inset: 0; background: center / cover no-repeat; mix-blend-mode: luminosity; }
.chero .hp { position: absolute; left: calc(100cqw / 720 * var(--x)); top: calc(100cqw / 720 * var(--y)); width: calc(100cqw / 720 * var(--w)); height: calc(100cqw / 720 * var(--h)); }
.chero .hp > img { width: 100%; height: 100%; max-width: none; object-fit: cover; }
.chero .hp--shadow { background: rgba(0, 0, 0, .49); border-radius: calc(100cqw / 720 * 40); filter: blur(20px); }

.case--v6 { padding-top: 80px; }
.case--v6 .chero-wrap { margin-top: 40px; margin-bottom: 40px; }
.case-shot { padding: 24px; border-radius: 40px; background: var(--media); }
.case-shot img { width: 100%; height: auto; border-radius: 16px; }
.info-row__value p.li { position: relative; padding-left: 22px; }
.info-row__value p.li::before { content: ""; position: absolute; left: 8px; top: 10px; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.case--v6 h2#results { font-size: 40px !important; line-height: 48px !important; font-weight: 600; letter-spacing: -0.8px; }
.result-card { margin-top: 40px !important; padding: 24px; border-radius: 40px; background: #fff; color: #000; }
:root[data-site-theme="light"] .result-card { background: #121212; color: #fff; }

/* ---------- Ещё кейсы ---------- */
.more { --g: max(32px, (100% - 1040px) / 2); padding: 40px 0; }
.more__head { width: min(1040px, 100% - 64px); margin: 0 auto 40px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.more__head h2 { font-size: 40px; line-height: 48px; font-weight: 600; letter-spacing: -0.8px; }
.more__nav { display: flex; gap: 16px; align-self: flex-start; }
.more__btn {
  width: 40px; height: 40px; padding: 8px; border: 0; border-radius: 100px; cursor: pointer;
  display: grid; place-items: center; background: #2b2b2b; color: #fff;
  transition: background-color .15s var(--ease), opacity .2s var(--ease), transform .15s var(--ease);
}
.more__btn:hover:not(:disabled) { background: #3a3a3a; }
.more__btn:active:not(:disabled) { transform: scale(.94); }
.more__btn:disabled { opacity: .4; cursor: default; }
.more__btn .lottie, .more__btn .lottie svg { display: block; width: 24px; height: 24px; }
.more__btn--prev .lottie { transform: rotate(180deg); }
.more__btn .lottie.is-lottie path { stroke: currentColor; }
:root[data-site-theme="light"] .more__btn { background: #e7e7e7; color: #121212; }
:root[data-site-theme="light"] .more__btn:hover:not(:disabled) { background: #e3e3e3; filter: brightness(.96); }

.more__track {
  display: flex; gap: 24px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: var(--g); padding: 0 var(--g);
  scrollbar-width: none; -ms-overflow-style: none;
}
.more__track::-webkit-scrollbar { display: none; }
.more__track::after { content: ""; flex: 0 0 1px; margin-left: calc(var(--g) - 25px); }
.mcard {
  position: relative; flex: 0 0 897px; height: 365px; border-radius: 40px; scroll-snap-align: start;
  background: var(--card); color: var(--fg); transition: background-color .3s var(--ease);
}
:root[data-site-theme="light"] .mcard { background: #fff; }
.mcard__text { position: absolute; left: 24px; top: 24px; width: 494px; height: 317px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.mcard__title { font-size: 20px; line-height: 24px; font-weight: 500; letter-spacing: -0.4px; }
.mcard__desc { color: var(--muted); letter-spacing: -0.32px; }
.mcard__desc b { color: var(--fg); font-weight: 400; }
.mcard__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.mtag { padding: 8px 10px; border-radius: 16px; background: rgba(0, 0, 0, .46); color: #fff; font-size: 14px; line-height: 16px; }
:root[data-site-theme="light"] .mtag { background: #f5f5f5; color: var(--fg); }
.mcard__btn {
  margin-top: auto; height: 56px; padding: 0 16px; border-radius: 999px; display: inline-flex; align-items: center;
  background: var(--btn-2); color: var(--btn-2-fg); font-size: 18px; line-height: 24px; font-weight: 600;
  transition: background-color .15s var(--ease);
}
.mcard:hover .mcard__btn { background: #3a3a3a; }
:root[data-site-theme="light"] .mcard:hover .mcard__btn { background: #e3e3e3; }
.mcard__media { position: absolute; left: 540px; top: 8px; width: 349px; height: 349px; border-radius: 36px; container-type: inline-size; isolation: isolate; }
.mtex { position: absolute; inset: 0; border-radius: inherit; background: center / cover no-repeat; mix-blend-mode: luminosity; }
.mp { position: absolute; left: calc(100cqw / 349 * var(--x)); top: calc(100cqw / 349 * var(--y)); width: calc(100cqw / 349 * var(--w)); height: calc(100cqw / 349 * var(--h)); }
.mp > img { width: 100%; height: 100%; max-width: none; object-fit: cover; }
.mvis { transition: transform .5s var(--ease); }

/* ---------- Финальный CTA ---------- */
.endcta { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 40px 16px 80px; }
.endcta h2 { font-size: 24px; line-height: 32px; font-weight: 700; }
.endcta p { margin-top: 4px; }
.endcta__actions { display: flex; justify-content: center; gap: 16px; margin-top: 24px; }

/* ---------- LinkedIn: свой залитый компонент + анимация как useanimations/linkedin ---------- */
.ico-li { width: 24px; height: 24px; display: block; overflow: visible; }
.ico-li .li-dot, .ico-li .li-stem { transform-box: fill-box; }
.ico-li .li-stem { transform-origin: 50% 100%; }
.icon-btn--in:hover .li-dot, .icon-btn--in:focus-visible .li-dot { animation: li-dot .43s linear; }
.icon-btn--in:hover .li-stem, .icon-btn--in:focus-visible .li-stem { animation: li-stem .43s cubic-bezier(.3, 0, .3, 1); }
@keyframes li-dot {
  0% { transform: translateY(0); animation-timing-function: cubic-bezier(.17, .17, .3, 1); }
  38% { transform: translateY(3.5px); animation-timing-function: cubic-bezier(.3, 0, .3, 1); }
  77% { transform: translateY(-3px); animation-timing-function: cubic-bezier(.3, 0, .83, .83); }
  100% { transform: translateY(0); }
}
@keyframes li-stem { 0% { transform: scaleY(1); } 23% { transform: scaleY(.58); } 54%, 100% { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .ico-li * { animation: none !important; } }

@media (max-width: 1100px) {
  .mcard { flex-basis: min(897px, calc(100vw - 64px)); }
  .mcard__text { width: calc(100% - 349px - 70px); }
  .mcard__media { left: auto; right: 8px; }
}
@media (max-width: 760px) {
  .chead { padding: 40px 0 16px; gap: 16px; }
  .chead h1 { font-size: 30px; line-height: 36px; letter-spacing: -0.6px; }
  .chead__text { gap: 12px; }
  .chero-wrap { width: min(560px, 100% - 48px); }
  .case--v6 { padding-top: 64px; }
  .case--v6 h2#results { font-size: 28px !important; line-height: 32px !important; }
  .case-shot { padding: 10px; border-radius: 20px; }
  .case-shot img { border-radius: 10px; }
  .result-card { border-radius: 24px; margin-top: 24px !important; }
  .more { --g: 16px; padding: 24px 0; }
  .more__head { width: calc(100% - 32px); margin-bottom: 24px; }
  .more__head h2 { font-size: 28px; line-height: 32px; }
  .mcard { flex-basis: calc(100vw - 48px); height: auto; display: flex; flex-direction: column; padding: 8px; border-radius: 28px; }
  .mcard__media { position: relative; left: auto; right: auto; top: auto; width: 100%; height: auto; aspect-ratio: 1; border-radius: 22px; }
  .mcard__text { position: static; width: auto; height: auto; padding: 16px 8px 8px; }
  .mcard__btn { margin-top: 16px; height: 48px; font-size: 16px; }
  .more__track::after { margin-left: -9px; }
  .endcta { padding: 24px 16px 56px; }
}
.nyam-case { padding-top: 80px; padding-bottom: 40px; }
.nyam-case .facts { padding: 40px 0; }
.nyam-case .drafts img { border-radius: 36px; }
.nyam-case .nsec__title { font-weight: 600; letter-spacing: -0.8px; }
@media (max-width: 760px) {
  .nyam-case { padding-top: 64px; padding-bottom: 16px; }
  .nyam-case .drafts img { border-radius: 16px; }
}
.lightbox__nav {
  position: absolute; top: 50%; z-index: 2; width: 48px; height: 48px; margin-top: -24px; border: 0; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; color: #fff; background: rgba(43, 43, 43, .8);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: background-color .15s var(--ease), transform .15s var(--ease);
}
.lightbox__nav svg { width: 24px; height: 24px; }
.lightbox__nav:hover { background: #3a3a3a; }
.lightbox__nav--prev { left: 24px; } .lightbox__nav--prev svg { transform: rotate(180deg); }
.lightbox__nav--next { right: 24px; }
.lightbox.is-single .lightbox__nav { display: none; }
@media (max-width: 760px) { .lightbox__nav { top: auto; bottom: 20px; margin-top: 0; } .lightbox__nav--prev { left: calc(50% - 56px); } .lightbox__nav--next { right: calc(50% - 56px); } }
.chero-bleed { width: 100vw; margin-left: calc(50% - 50vw); overflow-x: clip; }
@media (min-width: 1101px) { .case-nav > .case-nav__links { position: absolute; } }
.mcard__media { order: -1; } @media (min-width: 761px) { .mcard__media { order: 0; } }

/* =========================================================
   v7 — кнопки шапки кейсов (221:33650 / 221:33657), теги карточек,
   единая анимация самолётика, reveal, переходы между страницами
   ========================================================= */
/* Написать в Telegram: розовая + блик, как Icon button на главной */
.case-nav__tg {
  position: relative; overflow: hidden; isolation: isolate;
  height: 48px; gap: 8px !important; padding: 0 16px !important; border-radius: 999px;
  background: #ff1ca0; color: #fff; font-size: 16px; line-height: 24px; font-weight: 600;
}
.case-nav__tg::after { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(255, 28, 160, .2); border-radius: inherit; }
.case-nav__tg::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: 50%; width: 18px; height: 120px; margin: -60px 0 0 -9px;
  border-radius: 50%; background: rgba(255, 255, 255, .85); filter: blur(6px); opacity: 0;
  transform: translateX(-170px) rotate(30deg);
  animation: tg-shine-wide 4.2s cubic-bezier(.45, 0, .25, 1) infinite;
}
.case-nav__tg:hover::before { animation-duration: 2.2s; }
@keyframes tg-shine-wide {
  0%, 62% { transform: translateX(-170px) rotate(30deg); opacity: 0; }
  66%, 92% { opacity: 1; }
  100% { transform: translateX(170px) rotate(30deg); opacity: 0; }
}
.case-nav--simple .case-nav__tg svg { width: 20px; height: 20px; margin: 2px; }
.case-nav__tg:hover svg, .case-nav__tg:focus-visible svg { animation: tg-fly .45s var(--ease); }
.case-nav__tg:hover { filter: none; }
@media (prefers-reduced-motion: reduce) { .case-nav__tg::before { animation: none; } }
@media (max-width: 760px) { .case-nav__tg { width: 48px; padding: 0 !important; justify-content: center; } }

/* Тема: круглая 48×48, иконка 20 в 24, фон только при наведении — как Icon button на главной */
.case-nav .theme-toggle { width: 48px; height: 48px; padding: 12px; border-radius: 999px; background: transparent; transition: background-color .15s var(--ease); }
.case-nav .theme-toggle:hover { background: var(--chip); }
:root[data-site-theme="light"] .case-nav .theme-toggle:hover { background: #e3e3e3; }

/* Карточки «Ещё кейсы»: теги-стекло, NDA оранжевый, кнопка 16px, без «артефактов» */
.mtag.tag2 { color: #fff; }
.mtag--nda.tag2 { background: rgba(255, 140, 0, .18); color: #ff8c00; }
:root[data-site-theme="light"] .mtag.tag2 { background: #f5f5f5; color: var(--fg); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); -webkit-backdrop-filter: none; backdrop-filter: none; }
:root[data-site-theme="light"] .mtag--nda.tag2 { background: rgba(255, 140, 0, .14); color: #d97400; }
.mcard { overflow: hidden; isolation: isolate; }
.mcard__media { overflow: hidden; }
.mcard__btn { font-size: 16px; }
.more__track { overflow-y: hidden; }

/* Появление блоков при прокрутке (как во Framer) */
.rv { opacity: 0; transform: translateY(48px); transition: opacity .8s cubic-bezier(.22, 1, .36, 1), transform .9s cubic-bezier(.22, 1, .36, 1); transition-delay: var(--rv-d, 0s); }
.rv.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } }

/* Переходы между страницами (без белой вспышки: фон у html тоже тёмный) */
html { background: var(--bg); }
body { animation: page-in .45s var(--ease) both; }
body > :not(.case-nav):not(.topbar):not(.cursor-label):not(.lightbox):not(script) { animation: page-up .7s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes page-up { from { transform: translateY(24px); } to { transform: none; } }
html.is-leaving body { opacity: 0; transition: opacity .25s var(--ease); }
html.is-leaving body > :not(.case-nav):not(.topbar):not(.cursor-label):not(.lightbox) { transform: translateY(-16px); transition: transform .3s var(--ease); }
@media (prefers-reduced-motion: reduce) { body, body > * { animation: none !important; } html.is-leaving body { transition: none; } }

/* Курсор-подсказка: без «прыжков», только появление/исчезновение */
.cursor-label { scale: 1; transition: opacity .18s var(--ease); }

/* Крестик лайтбокса — useanimations «error» */
.lightbox__close.has-lottie::before, .lightbox__close.has-lottie::after { display: none; }
.lightbox__close .lightbox__x { width: 28px; height: 28px; }
.lightbox__close .lightbox__x.is-lottie path { stroke: currentColor; }
.lightbox__close { transition: background-color .15s var(--ease); }
.lightbox__close:hover { background: #3a3a3a; }
img[data-lightbox] { cursor: zoom-in; }
img[data-lightbox]:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

/* Call-центр: подложки скринов как в Figma 215:30845 — #171717, паддинг 24, радиус 40, скругление скрина 16 */
.case--v6 .media { border-radius: 40px; background: var(--media) !important; }
.case--v6 .media-row { padding: 24px; gap: 24px; align-items: flex-start; }
.case--v6 .media-row img { border-radius: 16px !important; }
@media (max-width: 760px) {
  .case--v6 .media { border-radius: 20px; }
  .case--v6 .media-row { padding: 10px; gap: 8px; }
  .case--v6 .media-row img { border-radius: 10px !important; }
}

/* Call-центр: скрины из Figma 215:30845 */
.ccshot { position: relative; padding: 24px; border-radius: 40px; background: var(--media); overflow: hidden; container-type: inline-size; }
.ccshot img { display: block; width: 100%; height: auto; border-radius: 16px; object-fit: cover; }
.ccshot--h2 { display: flex; align-items: flex-start; gap: 2.38%; width: 1008px; max-width: 100%; }
.ccshot--h2 img { flex: 0 0 auto; width: calc(var(--w) / 960 * 100%); }
.ccshot--h4 .ccshot__in { display: flex; justify-content: flex-end; align-items: center; gap: 2.42%; }
.ccshot--h4 .ccshot__in img { flex: 0 0 auto; width: calc(var(--w) / 992 * 100%); }
.ccshot--soft { display: flex; flex-direction: column; gap: 24px; }
.ccshot--soft .ccshot__dialer { position: absolute; left: 73.89%; top: 30.19%; width: 22.35%; border-radius: 0; }
.ccshot__states { display: flex; overflow: hidden; }
.ccshot__states img { flex: 0 0 auto; width: calc(var(--w) / 990 * 100%); aspect-ratio: auto; height: auto; border-radius: 0; }
@media (max-width: 760px) {
  .ccshot { padding: 10px; border-radius: 20px; }
  .ccshot img { border-radius: 10px; }
  .ccshot--h2, .ccshot--soft { gap: 8px; }
}

/* ZamZam — Figma 227:34359 */
.case--zz > * { margin-top: 0; }
.case--zz .zfacts { padding: 40px 0; }
.case--zz .zfacts .info-row:first-child { padding-top: 0; }
.zsec { padding: 40px 0; display: flex; flex-direction: column; gap: 16px; }
.zsec--gap24 { gap: 16px; }
.zsec--gap24 > .zhyps, .zsec--gap24 > .zcards { margin-top: 8px; }
.zsec--media { gap: 16px; }
.case--zz h2 { font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: -0.48px; }
.case--zz p { letter-spacing: -0.32px; }
.case--zz p.muted { color: var(--muted); }
.case--zz p.muted-2 { color: #858585; }
.zstack { display: flex; flex-direction: column; gap: 16px; }
.zstack--8 { gap: 8px; }
.zcards { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.zcards--gap24 { gap: 24px; }
.zcard { background: var(--card); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 12px; max-width: 508px; }
.zcard h3 { font-size: 16px; line-height: 24px; font-weight: 500; letter-spacing: -0.32px; }
.zcard ul { list-style: disc; padding-left: 21px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 21px; letter-spacing: -0.28px; }
.zhyps { display: flex; flex-direction: column; gap: 24px; }
.zhyps__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.zhyp { background: var(--card); border-radius: 16px; padding: 16px; min-height: 192px; display: flex; flex-direction: column; gap: 4px; }
.zhyp span { font-size: 14px; line-height: 20px; color: #858585; }
.zhyp h3 { font-size: 16px; line-height: 24px; font-weight: 500; letter-spacing: -0.32px; }
.zhyp p { font-size: 14px !important; line-height: 20px !important; color: #858585; letter-spacing: -0.28px; }
.zlist { list-style: disc; padding-left: 24px; }
.zbold { font-weight: 700; letter-spacing: -0.32px; }
.zbold ul { list-style: disc; padding-left: 24px; }
.zshot { display: flex; justify-content: center; gap: var(--g, 24px); padding: 24px; border-radius: 40px; background: var(--media); }
.zshot img { flex: 1 1 0; min-width: 0; width: 100%; height: auto; aspect-ratio: 900 / 1841; object-fit: contain; }
.zshot--fixed img { flex: 0 1 244px; }
.zcaps { display: flex; flex-direction: column; gap: 24px; }
.zcap { display: flex; flex-direction: column; gap: 8px; }
.zcap p.muted { color: #858585; }
.zsec--res { gap: 40px; }
.zres__title { font-size: 40px !important; line-height: 48px !important; letter-spacing: -0.8px !important; }
.zres { display: flex; flex-direction: column; gap: 24px; margin-top: 0 !important; }
:root[data-site-theme="light"] .zcard, :root[data-site-theme="light"] .zhyp { background: #fff; }
@media (max-width: 760px) {
  .zsec { padding: 24px 0; }
  .zhyps__row { grid-template-columns: 1fr; gap: 12px; }
  .zhyps { gap: 12px; }
  .zhyp { min-height: 0; }
  .zcard { max-width: none; width: 100%; }
  .zshot { padding: 10px; gap: 6px; border-radius: 20px; }
  .zshot--fixed img { flex: 1 1 0; max-width: 48%; }
  .zres__title { font-size: 28px !important; line-height: 32px !important; }
}

/* Чайник — Figma 227:35573 */
.zcard--wide { max-width: none; width: 100%; }
.zpairs { display: flex; flex-direction: column; gap: 16px; font-size: 14px; line-height: 20px; letter-spacing: -0.28px; }
.zpairs > div { display: flex; flex-direction: column; gap: 4px; }
.zpairs p { font-size: 14px !important; line-height: 20px !important; }
.zpairs p.muted { color: #858585 !important; }
.zinsight { gap: 16px; }
.zinsight > span { font-size: 14px; line-height: 20px; color: #858585; }
.zinsight > div { display: flex; flex-direction: column; gap: 8px; }
.zinsight p { font-size: 14px !important; line-height: 20px !important; letter-spacing: -0.28px; }
.zhyps--tea .zhyp { min-height: 148px; }
.zhyps--tea .zhyp p { color: #858585; }
.case--zz p.muted-9 { color: #858585; }
.zwide { width: 100%; height: auto; border-radius: 40px; }
.zres--tea { gap: 16px; }
.zres--tea > div { display: flex; flex-direction: column; gap: 4px; }
.zres--tea p.b { font-weight: 700; }
.zres--tea b.green { color: #009e57; font-weight: 600; }
@media (max-width: 760px) { .zwide { border-radius: 20px; } }
.mcard__media { overflow: hidden; }
.mcard__media .mvid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }

/* Неактивная стрелка — заметно приглушена */
.more__btn:disabled { opacity: 1; background: #171717; color: #4a4a4a; cursor: default; pointer-events: none; }
:root[data-site-theme="light"] .more__btn:disabled { background: #efefef; color: #bdbdbd; }

/* v11: кнопка «Наверх» */
.totop {
  position: fixed; z-index: 60; right: 24px; bottom: 24px;
  width: 56px; height: 56px; padding: 0; border: 0; border-radius: 999px; cursor: pointer;
  display: grid; place-items: center; color: #fff;
  background: rgba(43, 43, 43, .8); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  opacity: 0; visibility: hidden; transform: translateY(16px) scale(.9);
  transition: opacity .25s var(--ease), transform .35s cubic-bezier(.22, 1, .36, 1), visibility 0s linear .35s, background-color .15s var(--ease);
}
.totop svg { width: 24px; height: 24px; transition: transform .25s cubic-bezier(.22, 1, .36, 1); }
.totop.is-on { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.totop:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
@media (hover: hover) {
  .totop:hover { background: rgba(60, 60, 60, .9); }
  .totop:hover svg { transform: translateY(-3px); }
}
.totop:active { transform: scale(.94); }
:root[data-site-theme="light"] .totop { background: rgba(231, 231, 231, .85); color: #121212; box-shadow: 0 8px 24px rgba(0, 0, 0, .1); }
:root[data-site-theme="light"] .totop:hover { background: rgba(220, 220, 220, .95); }
:root[data-site-theme="light"] .totop:focus-visible { outline-color: #121212; }
html.lb-open .totop { opacity: 0; visibility: hidden; }
@media (max-width: 760px) { .totop { right: 16px; bottom: 16px; width: 48px; height: 48px; } }

/* v12 QA (iOS) */
/* Safari не обрезает содержимое по скруглению при blend/backdrop — принудительная маска */
.ccard, .mcard__media { -webkit-mask-image: -webkit-radial-gradient(white, black); -webkit-mask-image: linear-gradient(#000, #000); mask-image: linear-gradient(#000, #000); }
/* Плашка NDA: иконка и текст ровно */
@media (max-width: 760px) {
  .chead__note { display: flex; align-items: flex-start; justify-content: center; text-align: left; max-width: 320px; margin-inline: auto; }
  .chead__note svg { margin-top: 3px; }
  /* «Ещё кейсы»: кнопка прижата к низу карточки */
  .mcard__text { flex: 1; }
  .mcard__tags { margin-bottom: 8px; }
  .mcard__btn { margin-top: auto; }
}
/* Полноэкранный просмотр: скругление 8px */
.lightbox__media { border-radius: 8px; }
/* Карточки гипотез: без лишнего отступа сверху (переменная отступа наследовалась от сетки) */
.cards > .card { --mt: 0px; }
/* Тач: кнопки не «залипают» в ховере после нажатия */
@media (hover: none) {
  html .icon-btn:hover, html .theme-toggle:hover, html .case-nav .theme-toggle:hover,
  html:root[data-site-theme] .icon-btn:hover, html:root[data-site-theme] .theme-toggle:hover,
  html:root[data-site-theme] .case-nav .theme-toggle:hover,
  html:root[data-site-theme] .icon-btn--tg:hover, html:root[data-site-theme] .icon-btn--in:hover { background: transparent; }
  html:root[data-site-theme] .case-nav .theme-toggle:hover { background: transparent; }
}
/* Шапка на телефоне: контент под ней не просвечивает (iOS слабее размывает) */
@media (max-width: 760px) {
  .pblur i:nth-child(4) { -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
  .pblur i:nth-child(5) { background: linear-gradient(rgba(1, 1, 1, .9) 0 45%, rgba(1, 1, 1, 0)); }
  :root[data-site-theme="light"] .pblur i:nth-child(5) { background: linear-gradient(rgba(245, 245, 245, .92) 0 45%, rgba(245, 245, 245, 0)); }
}
/* производительность: пока страница в самом верху, под шапкой нечего размывать — тяжёлые слои размытия выключены */
html.is-top .pblur { visibility: hidden; }
/* Лёгкий режим (Яндекс, слабые устройства или если тормозит): без «живого» размытия — плотные подложки */
html.is-lite .hero .tag2 { -webkit-backdrop-filter: none; backdrop-filter: none; }
html.is-lite .pblur i { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
html.is-lite .pblur i:nth-child(5) { background: linear-gradient(rgba(1, 1, 1, .92) 0 40%, rgba(1, 1, 1, 0)); }
html.is-lite[data-site-theme="light"] .pblur i:nth-child(5) { background: linear-gradient(rgba(245, 245, 245, .94) 0 40%, rgba(245, 245, 245, 0)); }
/* Курсор не «мигает»: анимированные части кнопок и карточек не перехватывают мышь —
   курсор всегда определяется неподвижным родителем (кнопкой/карточкой) */
.btn-tg svg, .case-nav__tg svg, .icon-btn svg, .theme-toggle > *, .totop svg, .more__btn > *,
.ccard *, .mcard *, .fi__float, .fi img, .btn > * { pointer-events: none; }
a, button, .btn, .btn-tg, .ccard, .mcard { cursor: pointer; }
.fi { cursor: grab; }
/* диагностика ?static — все анимации и видео остановлены */
html.is-static *, html.is-static *::before, html.is-static *::after { animation: none !important; transition: none !important; }
html.is-static .fi { opacity: 1 !important; }
/* Подложка под именем — как плашки на карточках кейсов: rgba(1,1,1,.8) + blur 20px (во всех браузерах) */
.hero .about-card { background: rgba(1, 1, 1, .8); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
:root[data-site-theme="light"] .hero .about-card { background: rgba(255, 255, 255, .8); }
