/* Портфолио: Inter Tight, чёрный / чёрный 38% / #F5F5F5, тонкие линии, воздух. Квадрат — фирменный знак из логотипа. */
:root {
  --ink: #000;
  --grey: rgba(0, 0, 0, .38);
  --soft: rgba(0, 0, 0, .55);
  --plate: #F5F5F5;
  --hair: rgba(0, 0, 0, .08);
  --radius: 14px;          /* скругление только у плашек; 0 — строго */
  --max: 1180px;
  --meta: 236px;
  --gap: 40px;
  --bar: 64px;
  --sans: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar) + 16px); }
body { background: #fff; color: var(--ink); font: 500 15px/1.45 var(--sans); letter-spacing: -0.005em; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; transition: color .2s; }
a:hover { color: var(--grey); }
img, video { display: block; width: 100%; height: auto; }
ul, ol { list-style: none; }
code { font: inherit; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 32px; }
.cols { display: grid; grid-template-columns: var(--meta) minmax(0, 1fr); gap: var(--gap); }

/* ── закреплённая панель: логотип + контакты всегда на виду ── */
.bar { position: fixed; inset: 0 0 auto; z-index: 20; height: var(--bar); background: rgba(255, 255, 255, .82); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4); transition: box-shadow .3s; }
.bar.scrolled { box-shadow: 0 1px 0 var(--hair); }
.bar .wrap { height: 100%; white-space: nowrap; display: flex; align-items: center; justify-content: space-between; gap: 24px; font-size: 14px; }
.bar-l { display: flex; align-items: center; gap: 28px; }
.logo { width: 58px; height: 20px; display: block; }
.back { color: var(--grey); }
.back:hover { color: var(--ink); }
.bar-r { display: flex; align-items: center; gap: 22px; }
.bar-r a { color: var(--grey); }
.bar-r a:hover { color: var(--ink); }
.bar-r .status { color: var(--soft); display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 6px; height: 6px; background: #34C759; flex: none; }
.bar-r .cta { color: var(--ink); background: var(--plate); padding: 7px 14px; border-radius: 999px; transition: background .2s; }
.bar-r .cta:hover { background: #ECECEC; color: var(--ink); }
.bar-r .sep { width: 1px; height: 14px; background: var(--hair); }
main { padding-top: var(--bar); }

/* ── главная ─────────────────────────────────────────────── */
.intro { padding: 100px 0 140px; }
.me { display: flex; flex-direction: column; gap: 14px; }
.ava { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; }
.me p { color: var(--grey); line-height: 1.4; }
.me b { display: block; color: var(--ink); font-weight: 500; }
.hello { max-width: 560px; }
.hello h1 { font-weight: 500; font-size: 26px; line-height: 1.25; letter-spacing: -0.02em; }
.hello h1 span { color: var(--grey); }
.facts { display: flex; gap: 48px; margin-top: 48px; }
.facts li b { display: block; font-weight: 500; font-size: 26px; letter-spacing: -0.02em; }
.facts li span { display: block; color: var(--grey); font-size: 13px; margin-top: 4px; white-space: nowrap; }

.work-h { padding-bottom: 28px; color: var(--grey); font-size: 13px; }
.case { padding: 0 0 120px; }
.case-meta { position: sticky; top: calc(var(--bar) + 24px); align-self: start; display: flex; flex-direction: column; gap: 4px; }
.case-meta .n { color: var(--grey); font-size: 13px; margin-bottom: 10px; }
.case-meta .r { color: var(--grey); }
.case-meta .k { margin-top: 18px; font-size: 22px; letter-spacing: -0.02em; }
.case-meta .k + span { color: var(--grey); font-size: 13px; max-width: 200px; }
.case-meta .open { margin-top: 22px; color: var(--soft); }
.case-meta .open:hover { color: var(--ink); }

.plate { display: block; background: var(--plate); border-radius: var(--radius); overflow: hidden; padding: 56px 56px 0; position: relative; }
.plate.cover { aspect-ratio: 16 / 10.2; }
.plate.full { padding: 0; }
.plate .shot { border-radius: calc(var(--radius) * .6) calc(var(--radius) * .6) 0 0; overflow: hidden; box-shadow: 0 1px 0 var(--hair), 0 20px 60px rgba(0, 0, 0, .06); transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.plate.full .shot { border-radius: 0; box-shadow: none; height: 100%; }
.plate.full .shot video, .plate.full .shot img, .plate.full .shot .vbox { height: 100%; object-fit: cover; }
a.plate:hover .shot { transform: translateY(-6px); }
a.plate.full:hover .shot { transform: scale(1.012); }
.cap { display: flex; justify-content: space-between; gap: 24px; margin-top: 16px; }
.cap p { max-width: 520px; color: var(--grey); }
.cap p b { color: var(--ink); font-weight: 500; }
.cap .y { color: var(--grey); white-space: nowrap; }
.soon { padding-bottom: 160px; color: var(--grey); }
.soon b { color: var(--ink); font-weight: 500; }

/* ── подвал ─────────────────────────────────────────────── */
.foot { display: grid; grid-template-columns: var(--meta) repeat(3, minmax(0, 1fr)); gap: var(--gap); padding: 64px 0 80px; border-top: 1px solid var(--hair); font-size: 14px; }
.foot dt { color: var(--ink); }
.foot dd { color: var(--grey); }
.foot dd a:hover { color: var(--ink); }

/* ── страница кейса ─────────────────────────────────────── */
.c-hero { padding: 96px 0 56px; }
.c-side { display: flex; flex-direction: column; gap: 6px; }
.c-side .n { color: var(--grey); font-size: 13px; margin-bottom: 8px; }
.c-meta { margin-top: 24px; display: grid; gap: 14px; font-size: 13px; }
.c-meta dt { color: var(--grey); }
.c-meta dd { color: var(--ink); line-height: 1.4; }
.c-meta a { text-decoration: underline; text-decoration-color: var(--hair); text-underline-offset: 3px; }
.c-title { font-weight: 500; font-size: clamp(30px, 3vw, 40px); line-height: 1.1; letter-spacing: -0.03em; max-width: 16em; }
.c-tldr { margin-top: 28px; font-size: 20px; line-height: 1.4; letter-spacing: -0.015em; color: var(--grey); max-width: 34em; }
.c-tldr strong { color: var(--ink); font-weight: 500; }
.c-cover { padding-bottom: 120px; }

.c-body { padding-bottom: 80px; }
.toc { position: sticky; top: calc(var(--bar) + 24px); align-self: start; font-size: 14px; line-height: 1.9; }
.toc a { color: var(--grey); display: block; }
.toc a:hover, .toc a.on { color: var(--ink); }
.c-text { font-weight: 400; font-size: 17px; line-height: 1.6; letter-spacing: -0.008em; }
.c-text > * { max-width: 640px; }
.c-text > .media, .c-text > h2 { max-width: none; }
.c-text h2 { font-weight: 500; font-size: 13px; letter-spacing: 0; color: var(--grey); margin-top: 96px; }
.c-text h2:first-child { margin-top: 0; }
.c-text h2 + * { margin-top: 16px; }
.c-text h3 { font-weight: 500; font-size: 22px; line-height: 1.25; letter-spacing: -0.02em; margin-top: 64px; }
.c-text p, .c-text ul, .c-text ol { margin-top: 14px; }
.c-text li { position: relative; padding-left: 22px; margin-top: 8px; }
.c-text ul li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 5px; height: 5px; background: var(--ink); }
.c-text ol { counter-reset: n; }
.c-text ol li { counter-increment: n; }
.c-text ol li::before { content: counter(n); position: absolute; left: 0; color: var(--grey); font-size: 14px; top: .15em; }
.c-text strong, .c-text em { font-weight: 500; font-style: normal; }
.c-text blockquote { margin-top: 24px; font-size: 22px; line-height: 1.3; letter-spacing: -0.02em; }
.c-text p a, .c-text li a { text-decoration: underline; text-decoration-color: rgba(0,0,0,.2); text-underline-offset: 3px; }

.c-text .media { margin-top: 48px; margin-bottom: 40px; display: grid; gap: 48px; }
.c-text .fig .frame { background: var(--plate); border-radius: var(--radius); overflow: hidden; padding: 40px; }
.c-text .fig .frame img, .c-text .fig .frame .vbox { border-radius: calc(var(--radius) * .5); box-shadow: 0 0 0 1px rgba(0, 0, 0, .08), 0 18px 50px rgba(0, 0, 0, .06); }
.c-text .fig video { object-fit: cover; }
.c-text .fig figcaption { margin-top: 12px; font-size: 13px; line-height: 1.45; color: var(--grey); max-width: 560px; }
.c-text .fig.zoom img { cursor: zoom-in; }
.c-text .fig-svg .frame { padding: 0; background: transparent; }

.c-next { display: block; padding: 72px 0 120px; border-top: 1px solid var(--hair); }
.c-next .k { color: var(--grey); font-size: 13px; }
.c-next .t { display: block; margin-top: 10px; font-size: clamp(30px, 3vw, 40px); letter-spacing: -0.03em; line-height: 1.1; transition: color .2s; }
.c-next .l { display: block; margin-top: 10px; color: var(--grey); max-width: 34em; }
.c-next:hover .t { color: var(--grey); }

/* просмотр картинок крупно */
.lb { position: fixed; inset: 0; z-index: 50; background: rgba(255,255,255,.97); overflow-y: auto; opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; cursor: zoom-out; }
.lb.on { opacity: 1; visibility: visible; }
.lb img { width: min(100%, 1500px); margin: 0 auto; padding: 72px 24px; }
.lb-x { position: fixed; top: 18px; right: 24px; background: none; border: 0; font: 400 26px/1 var(--sans); color: var(--ink); cursor: pointer; }

/* ── HTML-схемы в новом стиле: тонко ────────────────────── */
.dg { font-size: 15px; line-height: 1.4; }
.dg-title { font-weight: 500; font-size: 20px; letter-spacing: -0.02em; }
.dg-sub { margin-top: 6px !important; color: var(--grey); max-width: 40em; }
.dg-k, .dg-cols span, .dgp-h, .dgt-h, .dgc-leg { font-size: 13px; color: var(--grey); }
.dg-foot { margin-top: 14px !important; font-size: 13px; color: var(--grey); }
.dg-cols, .dg-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1.25fr); gap: 0 20px; }
.dg-cols { margin-top: 28px; padding-bottom: 10px; border-bottom: 1px solid var(--hair); }
.dg-rows { position: relative; margin: 0 !important; }
.dg-rows::before { content: ""; position: absolute; left: 4px; top: 0; bottom: 0; width: 1px; background: var(--hair); }
.c-text .dg-rows li.dg-row { padding: 14px 0; margin: 0; border-bottom: 1px solid var(--hair); align-items: start; }
.c-text .dg-rows li.dg-row::before { content: none; }
.dg-row:last-child { border-bottom: 0 !important; }
.dg-dot { position: relative; z-index: 1; width: 7px; height: 7px; margin: 7px 0 0 1px; background: rgba(0,0,0,.2); }
.dg-stage i { display: block; font-style: normal; font-size: 12px; color: var(--grey); }
.dg-card { color: var(--soft); }
.dg-row.is-cur .dg-dot { background: var(--ink); }
.dg-row.is-alt .dg-dot { background: transparent; outline: 1px dashed rgba(0,0,0,.3); }
.dg-row.is-alt .dg-stage, .dg-row.is-alt .dg-tell { color: var(--grey); }
.dgc { display: grid; grid-template-columns: repeat(26, minmax(0, 1fr)); gap: 4px; margin-top: 24px; }
.dgc i, .dgc-leg i { display: block; aspect-ratio: 1; }
.dgc i.on, .dgc-leg i.on { background: var(--ink); }
.dgc i.off, .dgc-leg i.off { outline: 1px dashed rgba(0,0,0,.3); outline-offset: -1px; }
.dgc-leg { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 14px; }
.dgc-leg span { display: flex; align-items: center; gap: 8px; }
.dgc-leg i { width: 9px; }
.dg-if, .dg3 { display: grid; gap: 0 24px; margin-top: 28px; }
.dg-if { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dg3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dg-if > div, .dg3 > div { padding-top: 12px; border-top: 1px solid var(--hair); }
.dg-if p:not(.dg-k), .dg-p { margin-top: 6px !important; }
.dg-ui { margin-top: 10px !important; color: var(--soft); }
.dgp, .dgt { margin-top: 28px; }
.dgp-h, .dgp-r { display: grid; grid-template-columns: minmax(0, 1fr) 96px 96px; gap: 20px; align-items: center; }
.dgt-h, .dgt-r { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: baseline; }
.dgp-h, .dgt-h { padding: 8px 0; border-bottom: 1px solid var(--hair); }
.dgp-r, .dgt-r { padding: 12px 0; border-bottom: 1px solid var(--hair); }
.dgp-r i { font-style: normal; font-size: 12px; color: var(--grey); margin-right: 10px; }
.dgp-r b { display: block; height: 8px; background: rgba(0,0,0,.06); }
.dgp-r b.ai, .dgc-leg i.lg-ai { background: var(--ink); }
.dgp-r b.hu, .dgc-leg i.lg-hu { background: rgba(0,0,0,.35); }
.dgp-r b.half, .dgc-leg i.lg-half { background: linear-gradient(90deg, rgba(0,0,0,.35) 45%, rgba(0,0,0,.06) 45%); }
.dgc-leg i.lg-ai, .dgc-leg i.lg-hu, .dgc-leg i.lg-half { width: 22px; height: 8px; aspect-ratio: auto; }
.dgt-r span:first-child { color: var(--soft); }
.dgt-r .win { font-weight: 500; }
.c-text .fig-html { padding: 32px 36px 36px; background: #fff; border: 1px solid var(--hair); border-radius: var(--radius); }

/* ── появление ──────────────────────────────────────────── */
.js .fade { opacity: 0; transform: translateY(14px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .8, .2, 1); }
.js .fade.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .fade { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* ── адаптив ────────────────────────────────────────────── */
@media (max-width: 900px) {
  :root { --gap: 20px; --bar: 56px; }
  .wrap { padding: 0 18px; }
  .cols, .foot { grid-template-columns: minmax(0, 1fr); }
  .intro { padding: 20px 0 72px; }
  .me { flex-direction: row; align-items: center; gap: 14px; margin-bottom: 4px; }
  .ava { width: 88px; height: 88px; }
  .hello h1 { font-size: 24px; }
  .facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 28px; }
  .facts li b { font-size: 22px; }
  .facts li span { font-size: 12px; white-space: normal; }
  .hello .status { margin-top: 20px; }
  .case-meta, .toc { position: static; }
  .toc { display: none; }
  .case { padding-bottom: 72px; }
  .plate { padding: 22px 22px 0; }
  .facts { gap: 24px; flex-wrap: wrap; }
  .bar-r .status, .bar-r .sep { display: none; }
  .bar-r { gap: 13px; font-size: 14px; }
  .bar-l { gap: 16px; }
  .back span { display: none; }
  .bar-r .cta { padding: 6px 12px; }
  .c-hero { display: flex; flex-direction: column-reverse; gap: 32px; }
  .c-tldr { font-size: 17px; }
  .c-meta { grid-template-columns: 1fr 1fr; gap: 14px 20px; }
  .c-meta > div:first-child { grid-column: 1 / -1; }
  .c-side .n, .c-side > span:nth-child(2) { display: none; }
  .c-text { font-size: 16px; }
  .c-hero { padding: 40px 0 32px; }
  .c-cover { padding-bottom: 64px; }
  .c-text .fig .frame { padding: 16px; }
  .c-text h2 { margin-top: 72px; }
  .c-text .fig-html { padding: 20px; }
  .dg-cols { display: none; }
  .dg-row { grid-template-columns: 20px minmax(0, 1fr); }
  .dg-tell, .dg-card { grid-column: 2; margin-top: 4px; }
  .dg-if, .dg3 { grid-template-columns: minmax(0, 1fr); }
  .dgc { gap: 2px; }
  .dgp-h, .dgp-r { grid-template-columns: minmax(0, 1fr) 44px 44px; gap: 10px; }
  .dgt-h, .dgt-r { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 10px; font-size: 14px; }
}

.hello .status { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; color: var(--soft); }

/* иконки Remix Icon */
[class^="ri-"], [class*=" ri-"] { font-size: 1.05em; line-height: 1; vertical-align: -0.12em; }
.back i, .open i, .c-next .t i { transition: transform .25s; display: inline-block; }
.back:hover i { transform: translateX(-3px); }
.open:hover i, .c-next:hover .t i { transform: translateX(3px); }
.c-meta a i { font-size: .95em; margin-left: 2px; }
.lb-x { font-size: 24px; }

/* плейсхолдер, пока нет картинки */
.ph-box { display: grid; gap: 8px; place-content: center; text-align: center; min-height: 260px; padding: 24px; background: var(--plate); border-radius: var(--radius); color: var(--grey); font-size: 13px; }
.ph-tag { color: var(--ink); }
.c-text h2 + h3 { margin-top: 20px; }

/* схема флоу бронирования */
.dgf-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0 16px; margin-top: 32px; }
.c-text .dgf p { margin-top: 0; }
.c-text .dgf .dg-sub { margin-top: 6px; }
.c-text .dgf-timer { grid-column: 2 / 6; grid-row: 1; margin-bottom: 22px; padding-bottom: 8px; border-bottom: 1px dashed rgba(0, 0, 0, .25); font-size: 12px; color: var(--soft); text-align: center; }
.dgf-s { grid-row: 2; font-size: 13px; line-height: 1.4; }
.c-text .dgf-h { position: relative; padding-top: 14px; border-top: 1px solid var(--hair); font-weight: 500; font-size: 14px; }
.dgf-h i { font-style: normal; color: var(--grey); margin-right: 6px; }
.dgf-sq { position: absolute; top: -4px; left: 0; width: 7px; height: 7px; background: rgba(0, 0, 0, .25); }
.is-done .dgf-sq { background: var(--ink); }
.is-entry .dgf-sq { background: #fff; outline: 1px solid rgba(0, 0, 0, .35); outline-offset: -1px; }
.dgf-g { margin-top: 14px; color: var(--soft); }
.c-text .dgf-g p + p { margin-top: 3px; }
.c-text .dgf-g .dg-k { margin-bottom: 6px; }
.dgf-g b { font-weight: 500; color: var(--ink); }
.dgf-g s { display: block; margin-top: 6px; text-decoration: none; font-size: 12px; color: var(--grey); }
.is-entry .dgf-g:first-of-type { padding: 10px 10px 12px; border: 1px dashed rgba(0, 0, 0, .25); }
@media (max-width: 900px) {
  .dgf-grid { grid-template-columns: minmax(0, 1fr); }
  .c-text .dgf-timer { grid-column: auto; text-align: left; }
  .dgf-s { grid-row: auto; margin-bottom: 22px; }
}

nw-r { white-space: nowrap; }

/* видео: постер лежит под видео, само видео проявляется, когда пошли кадры */
.vbox { display: block; position: relative; overflow: hidden; background: var(--plate) center / cover no-repeat; }
.vbox video { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s ease; }
.vbox video.on { opacity: 1; }
@media (max-width: 400px) {
  .bar .wrap { gap: 10px; }
  .bar-l { gap: 10px; }
  .bar-r { gap: 10px; font-size: 13px; }
  .bar-r .cta { padding: 6px 10px; }
  .logo { width: 50px; height: 17px; }
}
