/* Портфолио tarkva.ee: список работ (/portfolio/) и страницы проектов (/portfolio/<проект>/).
   Визуальный язык: матовое стекло на тёмном, зелёный акцент, стеклянные папки, веер карточек, шкала этапов,
   плашки-«таблетки» со значками. Цвета, шрифты, кнопки, шапка и подвал — из main.css; всё в ширине макета. */

/* --glass, --glass-2, --glass-line и сама карточка-«папка» (.pf-card, .folder, .tags) — в main.css: они нужны и на главной */

.pf { position: relative; padding: clamp(108px, 11vw, 150px) 0 0; }
.pf::before {   /* мягкое зелёное свечение сверху */
  content: ""; position: absolute; z-index: -1; left: 50%; top: -200px; width: min(1400px, 120vw); height: 640px; translate: -50% 0;
  background: radial-gradient(closest-side, rgba(34, 229, 127, .12), rgba(34, 229, 127, 0)); pointer-events: none;
}
.pf::after {   /* еле заметная сетка точек */
  content: ""; position: absolute; z-index: -1; inset: 0 0 auto; height: 900px; pointer-events: none;
  background: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1.2px) 0 0 / 26px 26px;
  mask: linear-gradient(#000, transparent); -webkit-mask: linear-gradient(#000, transparent);
}
/* круглая кнопка «назад» над хлебными крошками страницы проекта */
.case-back {
  display: grid; place-items: center; width: 46px; height: 46px; margin: 0 0 16px; border-radius: 50%; color: #fff;
  background: rgba(255, 255, 255, .12); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07), 0 12px 26px -16px rgba(0, 0, 0, .9);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: background-color .25s;
}
.case-back svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .4s var(--ease); }
.case-back:hover { background: rgba(255, 255, 255, .2); }
.case-back:hover svg { transform: translateX(-3px); }
.case-back:focus-visible { outline: 2px solid var(--g); outline-offset: 3px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 18px; font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); transition: color .2s; }
.crumbs a:hover { color: var(--g); }
.crumbs i { width: 4px; height: 4px; border-radius: 50%; background: var(--dim); }
.pf svg { flex: none; }

/* ---------- список работ: заголовок и веер стеклянных карточек ---------- */
.pf-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(20px, 4vw, 64px); align-items: center; margin-bottom: clamp(24px, 3vw, 40px); }
.pf-title { margin: 0; font: 400 clamp(36px, 4.6vw, 76px)/.98 var(--font-d); letter-spacing: -.058em; }
.pf-lead { margin: 22px 0 0; max-width: 520px; color: #b9c8bf; font-size: clamp(15px, 1.15vw, 18px); line-height: 1.6; }

.fan { --w: min(44%, 290px); position: relative; height: clamp(250px, 24vw, 360px); perspective: 1300px; perspective-origin: 30% 40%; }
.fan__stage { clip-path: inset(-40% 0 -40% -40%); }   /* веер не выходит за правый край макета */
.fan__stage { position: absolute; inset: 0; transform-style: preserve-3d; }
.fan__pane {
  position: absolute; top: 14%; left: calc(13% + var(--i) * (46% / var(--n))); width: var(--w); aspect-ratio: 16 / 10.5;
  border-radius: 14px; overflow: hidden; transform-origin: 0 50%; transform: rotateY(-62deg);
  background: #d9dedb; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5), 0 30px 60px -30px rgba(0, 0, 0, .95);
  transition: transform .8s var(--ease), filter .6s;
}
.fan__pane img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; filter: grayscale(1) contrast(.8) brightness(1.25); opacity: .5; transition: filter .6s, opacity .6s; }
.fan__pane::after { content: ""; position: absolute; inset: 0; background: linear-gradient(150deg, rgba(255, 255, 255, .62), rgba(240, 244, 242, .2)); transition: background .6s; }
.fan__pane.is-on { transform: rotateY(-38deg) translateZ(70px) translateY(-5%); z-index: 2; }
.fan__pane.is-on::after { background: linear-gradient(150deg, rgba(34, 229, 127, .78), rgba(34, 229, 127, .28)); }
.fan__pane.is-on img { filter: none; opacity: .95; }
.fan__card {
  position: absolute; left: 0; top: 0; z-index: 3; width: min(270px, 58%); padding: 16px 18px 18px; border-radius: 22px;
  background: linear-gradient(140deg, rgba(255, 255, 255, .9), rgba(226, 233, 229, .7)); color: #0d1210;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .9), inset 0 1px 0 #fff; backdrop-filter: blur(14px);
}
.fan__num { display: block; margin-bottom: 10px; font: 300 13px var(--font-mono); color: #66706b; }
.fan__num b { font: 300 34px/1 var(--font-d); letter-spacing: -.04em; color: #0d1210; }
.fan__list { position: relative; height: 3.3em; margin: 0; padding: 0; list-style: none; overflow: hidden; }
.fan__list li { position: absolute; inset: 0; opacity: 0; transform: translateY(8px); transition: opacity .5s, transform .5s var(--ease); }
.fan__list li.is-on { opacity: 1; transform: none; }
.fan__list b { display: block; font: 500 19px/1.15 var(--font-d); letter-spacing: -.04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fan__list span { display: block; margin-top: 3px; font-size: 13px; color: #5d6762; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fan__go { position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(13, 18, 16, .08); }
.fan__go svg { width: 15px; height: 15px; fill: none; stroke: #0d1210; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* фильтр — «таблетки» со значками */
.pf-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 clamp(20px, 2.2vw, 30px); }
.pf-filter button {
  display: inline-flex; align-items: center; gap: 9px; height: 46px; padding: 0 18px 0 14px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--glass-line); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
  color: #d5e0da; font-size: 14.5px; transition: background-color .25s, color .25s, border-color .25s, box-shadow .3s;
}
.pf-filter svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.pf-filter small { font-size: 13px; color: var(--dim); }
.pf-filter small::before { content: "("; }
.pf-filter small::after { content: ")"; }
.pf-filter button:hover { background: var(--glass-2); color: #fff; }
.pf-filter button.is-on { background: linear-gradient(90deg, #2ee584, #1fbf68); border-color: transparent; color: var(--ink); box-shadow: 0 12px 34px -14px rgba(34, 229, 127, .8); }
.pf-filter button.is-on small { color: rgba(3, 20, 10, .62); }

/* сетка карточек работ; сами карточки — стеклянные папки — в main.css («Карточка работы») */
.pf-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 24px); }

.pf-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  margin: clamp(40px, 5vw, 72px) 0 clamp(72px, 9vw, 130px); padding: clamp(24px, 3vw, 40px);
  border-radius: 28px; border: 1px solid rgba(34, 229, 127, .25);
  background: radial-gradient(120% 160% at 0% 0%, rgba(34, 229, 127, .2), rgba(34, 229, 127, .03) 55%), var(--bg-2);
}
.pf-cta h2 { margin: 0 0 8px; font: 400 clamp(24px, 2.6vw, 40px)/1.05 var(--font-d); letter-spacing: -.05em; }
.pf-cta p { margin: 0; color: var(--muted); max-width: 560px; line-height: 1.6; }
.pf-cta__btns { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- страница проекта ---------- */
.case-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .7fr); gap: clamp(22px, 4vw, 64px); align-items: end; margin-bottom: clamp(18px, 2.4vw, 30px); }
.case-kicker { margin: 0 0 14px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--g); }
.case-title { margin: 0; font: 400 clamp(46px, 7.4vw, 120px)/.92 var(--font-d); letter-spacing: -.065em; overflow-wrap: break-word; }
.case-title--long { font-size: clamp(36px, 5.2vw, 88px); }
.case-lead { margin: 18px 0 0; max-width: 640px; color: #b9c8bf; font-size: clamp(15px, 1.2vw, 18px); line-height: 1.6; }
/* данные проекта — плашки со значком */
.case-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; padding: 0; list-style: none; }
.case-chips li, .case-chips a { display: flex; align-items: center; gap: 11px; min-width: 0; }
.case-chips li { padding: 8px 14px 8px 8px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-line); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04); }
.chip__ic { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .07); color: #dce7e0; }
.chip__ic svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.chip__t { display: grid; gap: 2px; min-width: 0; }
.chip__t b { font-size: 14px; font-weight: 600; line-height: 1.25; color: var(--text); overflow-wrap: anywhere; }
.chip__t small { font-size: 12px; color: var(--muted); }
.case-chips .chip--site { grid-column: 1 / -1; background: linear-gradient(90deg, rgba(46, 229, 132, .2), rgba(46, 229, 132, .06)); border-color: rgba(46, 229, 132, .3); }
.chip--site .chip__ic { background: var(--g); color: var(--ink); }
.chip--site a { flex: 1; }
.chip--site a:hover b { color: var(--g); }

/* окно с живым сайтом: как отдельная «виртуалка» — сайт открывается внутри, страница никуда не уходит */
.demo {
  --bar: 52px; position: relative; isolation: isolate; border-radius: 22px; overflow: hidden;
  background: #0a0f0d; border: 1px solid var(--line-2);
  box-shadow: 0 50px 120px -50px rgba(0, 0, 0, .95), 0 0 0 1px rgba(0, 0, 0, .4);
}
.demo__bar { display: flex; align-items: center; gap: 12px; height: var(--bar); padding: 0 10px 0 16px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .03); }
.demo__dots { display: flex; gap: 7px; flex: none; }
.demo__dots i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; opacity: .8; }
.demo__dots i:nth-child(2) { background: #febc2e; }
.demo__dots i:nth-child(3) { background: #28c840; }
.demo__url {
  flex: 1; min-width: 0; max-width: 460px; height: 32px; margin: 0 auto; padding: 0 14px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; gap: 8px; background: rgba(255, 255, 255, .055);
  font-size: 13px; color: #cbd8d0; white-space: nowrap; overflow: hidden;
}
.demo__url svg { flex: none; width: 13px; height: 13px; fill: none; stroke: var(--g); stroke-width: 2; }
.demo__url span { overflow: hidden; text-overflow: ellipsis; }
.demo__tools { display: flex; align-items: center; gap: 2px; flex: none; }
.demo__tools button, .demo__tools a { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); transition: background-color .2s, color .2s; }
.demo__tools button:hover, .demo__tools a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.demo__tools [aria-pressed="true"] { background: rgba(34, 229, 127, .14); color: var(--g); }
.demo__tools svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.demo__sep { width: 1px; height: 20px; margin: 0 6px; background: var(--line-2); }
[data-full] .i-full { display: contents; }
[data-full] .i-shrink, [data-full][aria-pressed="true"] .i-full { display: none; }
[data-full][aria-pressed="true"] .i-shrink { display: contents; }
.demo__screen { position: relative; height: clamp(440px, 74vh, 860px); overflow: hidden; background: #f3f4f3; }
.demo[data-view="tablet"] .demo__screen, .demo[data-view="phone"] .demo__screen { background: radial-gradient(120% 80% at 50% 0%, #15201b, #070a09 70%); }
.demo__poster { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; object-fit: cover; object-position: top; transition: opacity .7s var(--ease); }
.demo.is-live .demo__poster, .demo:not([data-view="desktop"]) .demo__poster { opacity: 0; pointer-events: none; }
.demo__frame { position: absolute; top: 0; left: 50%; z-index: 1; border: 0; background: #fff; transform-origin: 50% 0; }
.demo:not([data-view="desktop"]) .demo__frame, .demo:not([data-view="desktop"]) .demo__scroll img { border-radius: 22px; box-shadow: 0 0 0 3px #1b201d, 0 0 0 4px rgba(255, 255, 255, .12), 0 40px 80px -30px rgba(0, 0, 0, .9); }
.demo__load {
  position: absolute; left: 50%; bottom: 22px; z-index: 3; translate: -50% 0; display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: 999px; background: rgba(6, 8, 7, .82); backdrop-filter: blur(12px);
  font-size: 13px; color: #dfe9e3; white-space: nowrap; transition: opacity .4s;
}
.demo__load::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .2); border-top-color: var(--g); animation: demoSpin .8s linear infinite; }
.demo.is-live .demo__load, .demo[data-embed="0"] .demo__load { opacity: 0; pointer-events: none; }
@keyframes demoSpin { to { transform: rotate(1turn); } }
.demo__scroll { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .25) transparent; }
.demo__scroll img { display: block; width: 100%; height: auto; margin: 0 auto; }
.demo:not([data-view="desktop"]) .demo__scroll { padding: 24px 0; }
.demo__note { display: flex; align-items: flex-start; gap: 10px; margin: 14px 4px 0; font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.demo__note::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--g); box-shadow: 0 0 12px var(--g); }
.demo[data-embed="0"] + .demo__note::before { background: var(--lime); box-shadow: 0 0 12px rgba(214, 255, 92, .6); }
.demo.is-full { position: fixed; inset: clamp(8px, 1.6vw, 22px); z-index: 130; border-radius: 18px; }
.demo.is-full .demo__screen { height: calc(100% - var(--bar)); }
.demo-back { position: fixed; inset: 0; z-index: 125; background: rgba(2, 4, 3, .78); backdrop-filter: blur(6px); opacity: 0; pointer-events: none; transition: opacity .3s; }
.demo-back.is-on { opacity: 1; pointer-events: auto; }

/* шкала этапов: деления, точки и плашка «сайт работает» / «сейчас здесь».
   --p — где бегунок, в долях этапа: 0 — линия «Бриф», 1 — «Дизайн»…; в покое — середина текущего этапа (там плашка) */
@property --p { syntax: "<number>"; inherits: true; initial-value: 0; }
.ruler { --at: 3; --n: 4; --p: calc(var(--at) + .5); --hc: var(--g); --hc-a: rgba(34, 229, 127, .55); position: relative; margin: clamp(30px, 3.4vw, 46px) 0 0; padding: 0 0 64px; }
.ruler.is-dev { --hc: var(--lime); --hc-a: rgba(214, 255, 92, .5); }
.ruler__steps { position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
.ruler__steps li { position: relative; padding: 0 8px 30px 16px; font-size: 15px; color: var(--muted); transition: color .5s .15s; }
.ruler__steps li::before { content: ""; position: absolute; left: 0; top: .72em; width: 7px; height: 7px; border-radius: 50%; background: var(--dim); translate: 0 -50%; transition: background-color .45s .15s, box-shadow .45s .15s; }
.ruler__steps li::after { content: ""; position: absolute; left: 3px; top: calc(.72em + 6px); bottom: 0; width: 1px; background: rgba(255, 255, 255, .16); }
.ruler__steps li.is-done { color: #d7e3dc; }
.ruler__steps li.is-done::before { background: #e8efe9; }
.ruler__steps li.is-now { color: var(--hc); }
.ruler__steps li.is-now::before { background: var(--hc); box-shadow: 0 0 12px var(--hc); }
.ruler::before {   /* деления линейки; пройденная часть ярче */
  content: ""; position: absolute; left: 0; right: 0; bottom: 34px; height: 14px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .3) 0 1px, transparent 1px 9px) 0 100% / 100% 8px no-repeat,
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .55) 0 1px, transparent 1px 45px) 0 100% / 100% 14px no-repeat;
  mask: linear-gradient(90deg, #000 calc(var(--p) / var(--n) * 100% + 3.5px), rgba(0, 0, 0, .35) 0);
  -webkit-mask: linear-gradient(90deg, #000 calc(var(--p) / var(--n) * 100% + 3.5px), rgba(0, 0, 0, .35) 0);
}
.ruler::after {   /* цветные метки на линейке */
  content: ""; position: absolute; left: 0; right: 0; bottom: 31px; height: 6px;
  background:
    radial-gradient(circle, #f2c94c 2.5px, transparent 3px) 2% 50% / 6px 6px no-repeat,
    radial-gradient(circle, #ff5a5a 2.5px, transparent 3px) 17% 50% / 6px 6px no-repeat,
    radial-gradient(circle, #31c8f0 2.5px, transparent 3px) 39% 50% / 6px 6px no-repeat,
    radial-gradient(circle, #2ee584 2.5px, transparent 3px) 61% 50% / 6px 6px no-repeat,
    radial-gradient(circle, #2ee584 2.5px, transparent 3px) 83% 50% / 6px 6px no-repeat,
    radial-gradient(circle, #f2c94c 2.5px, transparent 3px) 98% 50% / 6px 6px no-repeat;
}
.ruler__pill {
  position: absolute; bottom: 0; left: clamp(80px, calc((var(--at) + .5) / var(--n) * 100%), calc(100% - 80px)); translate: -50% 0;
  overflow: hidden; padding: 8px 16px; border-radius: 999px; background: linear-gradient(90deg, #2ee584, #1fbf68); color: var(--ink);
  font-size: 13.5px; font-weight: 600; white-space: nowrap; box-shadow: 0 12px 30px -12px rgba(34, 229, 127, .8);
  transition: opacity .5s, transform .8s cubic-bezier(.22, 1.18, .36, 1);
}
.ruler__pill.is-dev { background: var(--lime); box-shadow: 0 12px 30px -12px rgba(214, 255, 92, .7); }

/* анимация шкалы (portfolio.js): бегунок встаёт на «Бриф», от шкалы к точке бежит сигнал, точка вспыхивает — этап готов;
   «чик» — бегунок перескакивает к следующему этапу; на последнем уезжает к середине этапа и превращается в плашку.
   Пока шкала не проиграна, этапы приглушены, плашки нет (только с JS; при «меньше движения» сразу итог) */
.ruler__head {
  position: absolute; z-index: 1; bottom: 30px; left: calc(var(--p) / var(--n) * 100% + 3.5px); width: 2px; height: 24px;
  border-radius: 2px; background: var(--hc); box-shadow: 0 0 8px var(--hc), 0 0 20px var(--hc-a); translate: -50% 0;
  opacity: 0; pointer-events: none; transition: opacity .5s;
}
.ruler__head::after { content: ""; position: absolute; left: 50%; bottom: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--hc); box-shadow: 0 0 10px var(--hc); translate: -50% 0; }
.ruler.is-anim { transition: --p .64s cubic-bezier(.65, .05, .36, 1); }   /* плавно разгоняется и плавно встаёт */
.ruler.is-anim .ruler__head { opacity: 1; }
.ruler.is-anim.is-launch { transition-duration: .6s; transition-timing-function: cubic-bezier(.5, 0, .25, 1); }
.ruler.is-launch .ruler__head { opacity: 0; transition: opacity .4s .3s; }
.ruler__head.is-snap { animation: rulerSnap .6s ease-in-out; }   /* на этапе бегунок мягко светится ярче */
@keyframes rulerSnap { 40% { box-shadow: 0 0 12px var(--hc), 0 0 30px var(--hc-a); } }
.js .ruler[data-ruler]:not(.is-played):not(.is-anim) { --p: 0; }
.js .ruler[data-ruler]:not(.is-played) .ruler__steps li:not(.is-hit) { color: var(--muted); }
.js .ruler[data-ruler]:not(.is-played) .ruler__steps li:not(.is-hit)::before { background: var(--dim); box-shadow: none; }
.js .ruler[data-ruler]:not(.is-played):not(.is-launch) .ruler__pill { opacity: 0; transform: translateY(10px) scale(.6); }
.ruler.is-anim li.is-hit::after { background: linear-gradient(transparent, var(--hc) 45%, #fff 55%, transparent) 0 0 / 100% 60% no-repeat, rgba(255, 255, 255, .16); animation: rulerSignal .42s ease-out both; }
@keyframes rulerSignal { from { background-position: 0 300%, 0 0; } to { background-position: 0 -200%, 0 0; } }
.ruler.is-anim li.is-hit::before { animation: rulerPing .9s .14s ease-in-out; }
.ruler.is-anim li.is-hit > span { animation: rulerBlink .9s .14s ease-in-out; }   /* подпись «мигает» вместе с точкой */
@keyframes rulerBlink { 35% { text-shadow: 0 0 12px rgba(255, 255, 255, .7); color: #fff; } }
.ruler.is-anim li.is-now.is-hit::before { animation-name: rulerPingNow; animation-duration: 1.3s; }
@keyframes rulerPing { 0% { scale: 1; box-shadow: 0 0 0 0 rgba(255, 255, 255, .5); } 40% { scale: 1.45; } 100% { scale: 1; box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); } }
@keyframes rulerPingNow { 0% { scale: 1; box-shadow: 0 0 0 0 var(--hc-a), 0 0 0 0 var(--hc-a); } 40% { scale: 1.6; } 100% { scale: 1; box-shadow: 0 0 0 14px transparent, 0 0 0 26px transparent; } }
.ruler.is-launch .ruler__pill { animation: pillBurst 1.3s .2s ease-out; }
@keyframes pillBurst { from { box-shadow: 0 0 0 0 var(--hc-a), 0 12px 30px -12px var(--hc-a); } to { box-shadow: 0 0 0 16px transparent, 0 12px 30px -12px var(--hc-a); } }
.ruler.is-launch .ruler__pill::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .7) 50%, transparent 65%); transform: translateX(-120%); animation: pillShine 1.2s .5s ease-in-out forwards; }
@keyframes pillShine { to { transform: translateX(120%); } }
/* сайт в разработке: точка «сейчас здесь» дышит — работа идёт */
.ruler.is-dev.is-played li.is-now::before { animation: rulerBreath 2.4s ease-in-out infinite; }
@keyframes rulerBreath { 50% { box-shadow: 0 0 0 6px rgba(214, 255, 92, .12), 0 0 16px var(--hc); } }

/* текст и снимки */
.case-body { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: clamp(28px, 5vw, 90px); align-items: start; margin-top: clamp(44px, 5.5vw, 90px); }
.case-text { position: sticky; top: 104px; }
.case-text h2 { margin: 0 0 12px; font: 400 clamp(26px, 2.5vw, 40px)/1.05 var(--font-d); letter-spacing: -.05em; }
.case-text h2:not(:first-child) { margin-top: 34px; }
.case-text p { margin: 0; color: #b9c8bf; font-size: 15.5px; line-height: 1.7; }
.case-done { position: relative; display: grid; gap: 12px; margin: 6px 0 0; padding: 18px 18px 18px 16px; list-style: none; border-radius: 22px; background: var(--glass); border: 1px solid var(--glass-line); }
.case-done::before { content: ""; position: absolute; left: 25px; top: 30px; bottom: 30px; border-left: 1px dashed rgba(255, 255, 255, .16); }
.case-done li { position: relative; padding-left: 32px; color: #d7e3dc; font-size: 15px; line-height: 1.5; }
.case-done li::before {
  content: ""; position: absolute; left: 0; top: 1px; width: 19px; height: 19px; border-radius: 50%;
  background: #0f1714 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.3l3 3 6-6.4' fill='none' stroke='%2322e57f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 13px no-repeat;
  box-shadow: inset 0 0 0 1px rgba(34, 229, 127, .45);
}
.case-shots { display: grid; gap: 16px; min-width: 0; }
.win__bar { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; background: rgba(255, 255, 255, .045); font-size: 11px; color: var(--muted); }
.win__bar i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .16); }
.win__bar span { margin-left: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shot-win { border-radius: 18px; overflow: hidden; background: #0a0f0d; border: 1px solid var(--line); }
.shot-win .win__bar { height: 34px; }
.shot-win__scroll { height: clamp(380px, 56vh, 640px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .25) transparent; }
.shot-win__scroll img { display: block; width: 100%; height: auto; }
.shot-cap { margin: 0; font-size: 12.5px; color: var(--dim); }
.phones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 1.4vw, 18px); padding: clamp(18px, 2.2vw, 30px); border-radius: 24px; background: radial-gradient(120% 90% at 50% 0%, #142019, #080b0a 75%); border: 1px solid var(--line); perspective: 1400px; }
/* телефон: тонкая рамка, экран без лишней черноты (класс pf-phone — у главной свой .phone) */
.pf-phone { margin: 0; padding: 0; aspect-ratio: 390 / 844; border-radius: clamp(16px, 1.7vw, 26px); overflow: hidden; background: #111513; border: 3px solid #1b201d; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 28px 56px -30px rgba(0, 0, 0, .95); transition: transform .8s var(--ease); }
.pf-phone:nth-child(1) { transform: rotateY(12deg) translateZ(-8px); }
.pf-phone:nth-child(2) { transform: translateY(-3%) translateZ(24px); }
.pf-phone:nth-child(3) { transform: rotateY(-12deg) translateZ(-8px); }
.phones:hover .pf-phone { transform: none; }
.pf-phone img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* три сильные стороны: средняя — зелёное стекло */
.case-feats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: clamp(48px, 6vw, 90px); }
.feat { padding: clamp(20px, 2vw, 28px); border-radius: 24px; background: linear-gradient(160deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02)); border: 1px solid var(--glass-line); }
.feat__n { display: block; margin-bottom: 22px; font: 300 clamp(34px, 3vw, 46px)/1 var(--font-d); letter-spacing: -.05em; color: rgba(255, 255, 255, .85); }
.feat h3 { margin: 0 0 10px; font: 500 clamp(17px, 1.35vw, 20px)/1.25 var(--font-d); letter-spacing: -.035em; }
.feat p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.6; }
.feat:nth-child(2) { background: linear-gradient(160deg, #36e98c, #1aa95c); border-color: transparent; color: var(--ink); box-shadow: 0 30px 60px -30px rgba(34, 229, 127, .55); }
.feat:nth-child(2) .feat__n { color: rgba(3, 20, 10, .75); }
.feat:nth-child(2) p { color: rgba(3, 20, 10, .78); }

.case-next { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin: clamp(56px, 7vw, 110px) 0 clamp(72px, 9vw, 130px); }
.next-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; gap: 18px; padding: 16px 16px 16px 26px; border-radius: 26px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .012)); transition: border-color .3s, transform .6s var(--ease); }
.next-card:hover { border-color: var(--line-2); transform: translateY(-3px); }
.next-card small { display: block; margin-bottom: 8px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.next-card b { display: block; font: 500 clamp(22px, 2.2vw, 34px)/1.05 var(--font-d); letter-spacing: -.05em; }
.next-card > div > span { display: block; margin-top: 8px; color: var(--muted); font-size: 14px; }
.case-next .pf-cta { margin: 0; flex-direction: column; align-items: flex-start; justify-content: center; }

@media (max-width: 1100px) {
  .pf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-feats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
  .pf-hero, .case-top, .case-body, .case-next { grid-template-columns: 1fr; }
  .fan { height: clamp(230px, 50vw, 330px); }
  .case-text { position: static; }
  .demo__screen { height: clamp(420px, 70vh, 760px); }
}
@media (max-width: 640px) {
  .pf-grid, .case-feats { grid-template-columns: 1fr; }
  .fan { --w: 58%; height: 230px; }
  .fan__card { width: 66%; padding: 14px 15px 15px; }
  .fan__num b { font-size: 28px; }
  .pf-filter button { height: 42px; padding: 0 14px 0 11px; font-size: 14px; }
  .case-chips { gap: 6px; }
  .case-chips li { padding: 6px 10px 6px 6px; gap: 8px; }
  .chip__ic { width: 32px; height: 32px; }
  .chip__ic svg { width: 16px; height: 16px; }
  .chip__t b { font-size: 13px; }
  .chip__t small { font-size: 11px; }
  .demo { --bar: 48px; border-radius: 18px; }
  .demo__bar { gap: 8px; padding: 0 6px 0 12px; }
  .demo__dots i { width: 9px; height: 9px; }
  .demo__url { padding: 0 10px; font-size: 12px; }
  .demo__tools [data-view="desktop"], .demo__tools [data-view="tablet"], .demo__sep { display: none; }
  .demo__screen { height: 76svh; }
  .demo__frame { border-radius: 0 !important; box-shadow: none !important; }
  .ruler__steps li { font-size: 12.5px; padding-left: 12px; }
  .phones { padding: 14px; gap: 8px; }
  .next-card { grid-template-columns: 1fr; padding: 20px; }
}
/* узкий телефон: подписи этапов мельче, длинные слова переносятся по мягкому переносу из переводов, а не наезжают на соседнюю точку */
@media (max-width: 420px) {
  .ruler__steps li { font-size: 11.5px; padding: 0 3px 30px 11px; }
}

/* ---------- персонаж (Pixar-версия хозяина студии, белая рубашка) ---------- */
/* заголовок: вторая часть всегда с новой строки — у персонажа понятная «стойка» */
.pf-title .mut { display: block; }
.pf-hero__copy { position: relative; }
/* облокотился на конец самой длинной строки заголовка: место и рост считает portfolio.js.
   Картинка 372×900: низ предплечья — 28.5% высоты, оно лежит на последних буквах, кисть свисает сразу за ними */
.pf-lean { position: absolute; z-index: 2; left: 0; top: 0; width: 160px; pointer-events: none; opacity: 0; visibility: hidden; }
.pf-lean.is-on { opacity: 1; visibility: visible; transition: opacity .8s .2s; }
.pf-lean img { display: block; width: 100%; height: auto; transform-origin: 8% 31.8%; }
@media (prefers-reduced-motion: no-preference) {
  .pf-lean.is-on img { animation: lean-breathe 6s ease-in-out infinite; }
}
@keyframes lean-breathe { 0%, 100% { transform: none; } 50% { transform: rotate(.6deg); } }
/* место под ноги в начале описания (размер задаёт portfolio.js, только если ноги заходят на текст) */
.pf-lean-gap { float: right; }
.fan { translate: var(--lean-push, 0) 0; }

/* «Нужен похожий сайт?»: персонаж выглядывает из-за карточки. Окно обрезает его по краю карточки,
   кончики пальцев — та же картинка ниже линии среза (95.06% высоты) — лежат поверх края.
   Над карточкой оставлено место под него, чтобы он не заходил на карточки проектов */
.pf-cta { --pw: clamp(150px, 15vw, 230px); --peek: calc(var(--pw) * 789 / 720 * .9435); position: relative; margin-top: calc(var(--peek) + clamp(20px, 2.5vw, 36px)); }
.case-next { margin-top: calc(clamp(150px, 15vw, 230px) * 789 / 720 * .9435 + clamp(24px, 3vw, 44px)); }
.case-next .pf-cta { margin: 0; }
.pf-peek { position: absolute; z-index: 1; right: clamp(20px, 8%, 120px); bottom: calc(100% + 1px); width: var(--pw); height: var(--peek); pointer-events: none; }
.pf-peek__win { position: absolute; inset: 0; overflow: hidden; }
.pf-peek__fig, .pf-peek__tips { position: absolute; left: 0; top: 0; width: 100%; }
.pf-peek img { display: block; width: 100%; height: auto; }
/* подмигивание как живое: веко опускается ~0.16 с, задерживается, поднимается чуть медленнее */
/* подмигивание: кусок лица с закрытым глазом и улыбкой шире проявляется сверху вниз — сначала опускается веко (~0.08 с),
   за ним чуть шире улыбка; открывается в обратном порядке, медленнее. Место куска — из assets/raw/character/process.py */
.pf-peek .pf-peek__wink { position: absolute; left: 30.53%; top: 24.82%; width: 39.05%; height: auto; clip-path: inset(0 0 100% 0); transition: clip-path .34s cubic-bezier(.45, 0, .55, 1); }
.pf-peek__tips { clip-path: inset(94.35% 0 0 0); }
.js .pf-peek__fig { transform: translateY(101%); }
.js .pf-peek__tips { opacity: 0; }
.pf-peek.is-up .pf-peek__fig { transform: none; transition: transform 1.1s cubic-bezier(.16, .84, .3, 1); }
.pf-peek.is-up .pf-peek__tips { opacity: 1; transition: opacity .2s .85s; }
.pf-peek.is-wink .pf-peek__wink { clip-path: inset(0 0 0 0); transition-duration: .26s; transition-timing-function: cubic-bezier(.5, 0, .3, 1); }
@media (prefers-reduced-motion: reduce) {
  .js .pf-peek__fig { transform: none; }
  .js .pf-peek__tips { opacity: 1; }
}
/* «тык» (portfolio.js): кисть перегибается через край и тычет в «Обсудить проект». Кадр peek-poke ложится поверх основного
   (та же рамка и то же лицо, рукав остаётся на краю), пальцы этой руки на кромке прячутся, кисть ниже края — слой
   pf-peek__reach: выезжает из-за края (clip-path + translateY), палец попадает в кнопку без растяжки
   (места — из assets/raw/character/poke.py). Где до кнопки не дотянуться (телефон, страницы проектов), JS не ставит
   can-poke — эти картинки тогда и не грузятся. Касание — мягкая вспышка под пальцем */
.pf-peek .pf-peek__poke, .pf-peek__reach, .pf-peek__tap { display: none; }
.pf-peek.can-poke .pf-peek__poke { display: block; position: absolute; left: 0; top: 0; opacity: 0; transition: opacity .12s; }
.pf-peek.can-poke .pf-peek__reach { display: block; position: absolute; left: 5.53%; top: 100%; width: 20.69%; transform-origin: 39.45% 0; opacity: 0; }
.pf-peek.can-poke .pf-peek__tap { display: block; position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .5), rgba(214, 255, 92, .28) 40%, transparent 70%); opacity: 0; }
.pf-peek.is-poke .pf-peek__poke { opacity: 1; }
/* под кадром «тыка» основная картинка прячется, как только он проявился, — иначе в прозрачных местах кадра (просвет
   между запястьем и рубашкой) просвечивала старая кисть; при возврате она видна сразу, кадр «тыка» гаснет поверх неё */
.pf-peek.is-poke .pf-peek__base { visibility: hidden; transition: visibility 0s .12s; }
.pf-peek.is-poke .pf-peek__tips { clip-path: inset(94.35% 0 0 50%); }

/* ---------- зелень ---------- */
/* мох обрастает кромку карточки «Нужен похожий сайт?»: от левого угла по верху, огибает угол и спускается по левому краю.
   Угол карточки в картинке — на (30, 35) px, скругление то же (28 px), поэтому картинка стоит ровно на кромке */
.pf-moss { position: absolute; z-index: 1; left: -30px; top: -35px; pointer-events: none; }
.pf-moss img { display: block; width: 603px; height: auto; max-width: none; }
.case-next .pf-moss img { -webkit-mask-image: linear-gradient(90deg, #000 42%, transparent 72%); mask-image: linear-gradient(90deg, #000 42%, transparent 72%); }
@media (max-width: 640px) { .pf-moss img { width: 233px; } .case-next .pf-moss img { -webkit-mask-image: none; mask-image: none; } }
/* веточка с клеверами в шапке списка работ (Blender, assets/raw/ui/vine/branch.py — pf): тонкий стебель входит сверху
   у правого края (с самого верха страницы, начала не видно), провисает влево, с него свисают тонкие побеги — за веером карточек.
   Картинка 900×1200 = кадр 6×8 единиц; точка крепления — 90 % ширины по верхнему краю, вокруг неё ветка чуть покачивается */
.pf-hero { position: relative; }
.pf-hero > .pf-hero__copy, .pf-hero > .fan { position: relative; z-index: 1; }
.pf-branch {
  position: absolute; z-index: 0; top: -230px; right: -40px;
  width: clamp(260px, 24vw, 360px); height: auto; max-width: none; pointer-events: none; transform-origin: 90% 0%;
}
@media (prefers-reduced-motion: no-preference) {
  .pf-branch { animation: pf-branch 9s ease-in-out infinite; }
}
@keyframes pf-branch { 0%, 100% { rotate: -1.6deg; } 50% { rotate: 1.4deg; } }
@media (max-width: 1180px) { .pf-branch { top: -200px; } }
@media (max-width: 960px) { .pf-branch { top: -186px; right: -24px; width: 230px; } }
/* телефон: в шапке тесно (меню, крошки, заголовок с персонажем) — веточки нет */
@media (max-width: 640px) { .pf-branch { display: none; } }
