/* pankovkirill.ru — главная.
   Бумага с зерном и графит; Unbounded для заголовков и знака, Onest для текста; тема по системе.
   Живость — фоном: два медленных облака, лампа за курсором, круги по клику. Всё тихое, под контентом. */

:root {
  --bg: #f3f1ec;
  --surface: rgba(255, 255, 255, .72);
  --surface-solid: #fbfaf8;
  --ink: #1a1917;
  --ink-2: #6a6761;
  --ink-3: #a6a39c;
  --line: rgba(26, 25, 23, .09);
  --line-2: rgba(26, 25, 23, .22);
  --hover: rgba(26, 25, 23, .04);
  --shadow: 0 1px 2px rgba(26, 25, 23, .04), 0 14px 36px -22px rgba(26, 25, 23, .28);
  --shadow-up: 0 2px 6px rgba(26, 25, 23, .06), 0 24px 48px -22px rgba(26, 25, 23, .36);
  --grain-op: .06;
  --grid: 26, 25, 23;      /* rgb линий сетки; альфа — в site.js */
  --grid-a: .07;
  --grid-hi: .28;
  --glow: 46, 58, 214;     /* «ультрафиолет»: цвет линий у курсора и света по клику */
  --glow-a: .4;
  --live: #3d8f5f;
  --beta: #c07a2c;
  --wip: var(--ink-3);
  --table-bg: rgba(26, 25, 23, .025);     /* слой таблицы в окне работы */
  --table-head: rgba(26, 25, 23, .05);
  --table-line: rgba(26, 25, 23, .14);
  /* тень плитки: на бумаге — настоящая; в темноте — короткая, иначе размытая чернота стирает линии вокруг плитки */
  --tile-shadow: 0 1px 0 var(--hi-top), 0 24px 48px -16px rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .25);
  --tile-shadow-up: 0 1px 0 var(--hi-top), 0 30px 56px -16px rgba(0, 0, 0, .6), 0 3px 8px rgba(0, 0, 0, .28);
  --display: "Unbounded", "SF Pro Display", -apple-system, sans-serif;
  --text: "Onest", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141414;
    --surface: rgba(255, 255, 255, .045);
    --surface-solid: #1d1d1d;
    --ink: #ebe9e4;
    --ink-2: #9c9a94;
    --ink-3: #66645f;
    --line: rgba(255, 255, 255, .08);
    --line-2: rgba(255, 255, 255, .2);
    --hover: rgba(255, 255, 255, .05);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 14px 36px -22px rgba(0, 0, 0, .7);
    --shadow-up: 0 2px 6px rgba(0, 0, 0, .35), 0 24px 48px -22px rgba(0, 0, 0, .8);
    --grain-op: .09;
    --grid: 255, 255, 255;
    --grid-a: .055;
    --grid-hi: .22;
    --glow: 128, 150, 255;
    --glow-a: .48;
    --live: #5fb983;
    --beta: #d9984c;
    --table-bg: rgba(255, 255, 255, .03);
    --table-head: rgba(255, 255, 255, .06);
    --table-line: rgba(255, 255, 255, .12);
    --tile-shadow: 0 1px 0 var(--hi-top), 0 6px 16px -8px rgba(0, 0, 0, .7), 0 1px 2px rgba(0, 0, 0, .4);
    --tile-shadow-up: 0 1px 0 var(--hi-top), 0 10px 22px -8px rgba(0, 0, 0, .75), 0 2px 3px rgba(0, 0, 0, .4);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); color-scheme: light dark; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.5 var(--text);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}

a { color: inherit; text-decoration: none; }

/* ---------- фон: карта изолиний на канвасе ---------- */
.bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.grain {
  position: absolute; inset: -50%;
  opacity: var(--grain-op);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
  mix-blend-mode: multiply;
}
@media (prefers-color-scheme: dark) { .grain { mix-blend-mode: screen; } }

/* цвета линий — --grid / --grid-a / --grid-hi, ультрафиолет — --glow. Холст растянут на весь слой: битмап в нём W×dpr,
   без этого правила на retina он вдвое больше окна и линии обрываются */
.grid-bg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* панель настройки (?tune=1) */
.tune[hidden] { display: none; }
.tune {
  position: fixed; right: 16px; bottom: 16px; z-index: 5;
  display: flex; flex-direction: column; gap: 8px; padding: 12px 14px;
  background: var(--surface-solid); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); font: 500 13px/1 var(--text); color: var(--ink-2);
}
.tune label { display: grid; grid-template-columns: 64px 140px 44px; align-items: center; gap: 8px; }
.tune b { font-weight: 600; color: var(--ink); text-align: right; }
.tune input { margin: 0; accent-color: var(--ink); }

/* ---------- страница ---------- */
.page {
  position: relative; z-index: 1;
  max-width: 1040px;
  margin: 0 auto;
  padding: 32px 20px 40px;
  display: flex; flex-direction: column;
  gap: clamp(40px, 7vh, 64px);
  min-height: 100dvh;
}

.head { display: flex; flex-direction: column; gap: 14px; }
.brand { display: inline-flex; align-items: center; gap: 12px; align-self: flex-start; margin-bottom: clamp(28px, 6vh, 56px); }
.mark {
  width: 40px; height: 40px; border-radius: 11px;
  display: grid; place-items: center;
  background: var(--ink); color: var(--bg);
  font: 700 17px/1 var(--display);
  letter-spacing: -.04em;
  padding-left: 1px;
}
.who { font: 500 15px/1 var(--text); color: var(--ink-2); letter-spacing: .01em; }

/* заголовок — лок-ап: «Дизайн» во всю ширину слова, вторая строка золотом подогнана по ширине под первую
   (отношение размеров — из ширин строк в Unbounded; .big и em считаются от --big) */
.title {
  margin: 0;
  font: 700 clamp(30px, 4.2vw, 50px)/1.06 var(--display);
  letter-spacing: -.025em;
}
.title em { font-style: normal; color: #c9931f; }   /* золото — как у знака алхимии */
.head .title { --big: clamp(58px, 17vw, 128px); display: flex; flex-direction: column; align-items: flex-start; font-size: var(--big); line-height: .95; letter-spacing: -.035em; }
.head .title .big { display: block; }
.head .title em { display: block; margin-top: .1em; font-size: calc(var(--big) * .3375); line-height: 1.1; letter-spacing: -.02em; }

/* Временная главная с работами: оформление скрытого блока сохранено. */
.head .title[hidden], .principles[hidden] { display: none; }
.head:has(.title[hidden]) .brand { margin-bottom: 0; }

/* подписи разделов */
.label { margin: 0 0 18px; font: 600 12px/1 var(--text); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }

/* ---------- принципы: три плитки с иллюстрациями ----------
   .lit — то же, что :hover, но от скролла: на тачскрине плитка загорается сама, когда её долистали (site.js) */
.pgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.pcard {
  display: flex; flex-direction: column; gap: 10px;
  padding: 18px 20px 22px;
  background: var(--surface-v1);
  border-radius: 20px;
  box-shadow: var(--tile-shadow);
}
/* наведение: то же свечение, что у плитки работы, вдвое слабее и вдвое короче */
.pcard { position: relative; }
.pcard::before {
  content: ""; position: absolute; inset: 0; border-radius: 20px; pointer-events: none;
  box-shadow: 0 0 33px 4px rgba(var(--glow), .035), 0 0 90px 15px rgba(var(--glow), .015);
  opacity: 0; transition: opacity .35s ease;
}
.pcard:hover::before, .pcard.lit::before { opacity: 1; }
.pcard h3 { margin: 8px 0 0; font: 700 22px/1.15 var(--display); letter-spacing: -.02em; }
.pcard p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink); }
.pcard .why { font-size: 13.5px; line-height: 1.45; color: var(--ink-2); padding-top: 10px; border-top: 1px solid var(--line); margin-top: auto; }   /* «почему» и цитата — один кегль, мельче сути */
/* цитата вместо «почему»: текст курсивом, имя в конце тем же шрифтом */
.pcard .quote { margin: auto 0 0; }
.pcard .quote p { font-style: italic; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.pcard .quote footer { margin-top: 5px; font-size: 13.5px; line-height: 1.45; color: var(--ink-3); }
/* формула — сложение в столбик: сначала то, что плюсуем, последним с минусом и пунктиром — чего нет; черта и результат.
   Одна геометрия во всех трёх плитках: столбец знаков 16px, пилюли во всю ширину и одной высоты, текст результата
   выровнен по тексту пилюль. div, не p — чтобы .pcard p не задавал размер */
.formula { display: grid; grid-template-columns: 16px 1fr; column-gap: 8px; row-gap: 5px; align-items: center; margin: 4px 0 6px; padding: 12px 14px 12px 12px; border-radius: 14px; background: var(--illo-bg); font: 600 12px/1 var(--text); color: var(--ink-2); }   /* своя подложка — слой той же фактуры, что поле иллюстрации */
.formula i { font: 700 15px/1 var(--text); font-style: normal; color: var(--ink-2); text-align: center; }
.formula .chip { display: block; padding: 5px 10px; border-radius: 999px; background: var(--surface-v1); color: var(--ink); border: 1px solid transparent; white-space: nowrap; }   /* пилюли — материал плитки на подложке */
.formula .off { color: var(--ink-3); }
.formula .chip.off { background: transparent; border: 1px dashed var(--line-2); }
.formula hr { grid-column: 1 / -1; margin: 3px 0; border: 0; border-top: 1px solid var(--line-2); }
.formula b { padding-left: 11px; font: 600 14px/24px var(--text); color: var(--ink); }

/* иллюстрации: поле 16:10, тёмное, без скринов — чистые формы */
.illo { aspect-ratio: 16 / 10; border-radius: 14px; background: var(--illo-bg); overflow: hidden; position: relative; display: grid; place-items: center; }
:root { --blk: #e0dfda; --blk2: #b4b2ae; --illo-bg: #f0eee9; --sk: rgba(26, 25, 23, .14); --sk-soft: rgba(26, 25, 23, .08); --sk2: rgba(26, 25, 23, .3); --fill2: rgba(26, 25, 23, .55); }
@media (prefers-color-scheme: dark) { :root { --blk: #282828; --blk2: #4b4b4b; --illo-bg: #181818; --sk: rgba(255, 255, 255, .12); --sk-soft: rgba(255, 255, 255, .07); --sk2: rgba(255, 255, 255, .26); --fill2: rgba(255, 255, 255, .5); } }

/* Понятно: скелет интерфейса — пунктирные формы; при наведении проявляется содержимое, и оно ровно то, что обещала форма */
.sk { position: relative; width: 62%; aspect-ratio: 16 / 11; }
.sk i { position: absolute; display: block; border-radius: 6px; border: 1.5px dashed var(--sk2); background: transparent; transition: background .45s ease, border-color .45s ease; }
.sk .av { left: 0; top: 0; width: 17%; aspect-ratio: 1; border-radius: 50%; }
.sk .b1 { left: 23%; top: 1%; width: 50%; height: 10%; }
.sk .b2 { left: 23%; top: 15%; width: 32%; height: 7%; }
.sk .l1 { left: 0; top: 40%; width: 100%; height: 7%; }
.sk .l2 { left: 0; top: 53%; width: 88%; height: 7%; }
.sk .l3 { left: 0; top: 66%; width: 64%; height: 7%; }
.sk .btn { left: 0; top: 84%; width: 38%; height: 16%; border-radius: 999px; border-color: transparent; background: #c9931f; }   /* кнопка золотая сразу: один золотой акцент в каждой иллюстрации */
.pcard:hover .sk i, .pcard.lit .sk i { border-color: transparent; background: var(--sk); }
.pcard:hover .sk .av, .pcard:hover .sk .b1, .pcard.lit .sk .av, .pcard.lit .sk .b1 { background: var(--fill2); }   /* полутоном, не белым: белая заливка делала плитку ярче соседей */
.pcard:hover .sk .b2, .pcard.lit .sk .b2 { background: var(--sk2); }
.pcard:hover .sk .btn, .pcard.lit .sk .btn { background: #c9931f; }

/* Красиво: карточка товара, которую «испортили», и золотое сечение. В покое — приглушённая серая раскладка без акцентов:
   сетка 3×2 одинаковых квадратов (третья миниатюра спрятана под второй), разорванный заголовок, строки по центру,
   широкая кнопка с лишним значком, толстая линия, блок не того тона — и поверх неё спираль золотым пунктиром.
   При наведении блоки за 0,4 с пересобираются в карточку, подогнанную под сечение: центр зазора между колонками
   на 61,8 % ширины, верх нижнего блока на 61,8 % высоты (точка старта спирали), зазор между фото и превью на 76,4 % —
   на уровне самого мелкого завитка; одновременно спираль прочерчивается от мелкого завитка к большому за 0,6 с
   (кривая та же, что у прямой в «Эффективно»), затем проступают пунктирные линии сечения, идущие по зазорам.
   При уходе курсора линии гаснут первыми, спираль втягивается, блоки разбредаются. Схема — svg 1618×1000, растянутый
   на композицию; рисуемая спираль без non-scaling-stroke, иначе длина штриха в пикселях и анимация ломается.
   Тона блоков непрозрачные (--blk/--blk2): полупрозрачные при наложении складываются. Расстановка автора 17.10 */
.comp { position: relative; width: 62%; aspect-ratio: 16 / 11; }
.comp i { position: absolute; display: block; border-radius: 8px; background: var(--blk); opacity: .4; will-change: left, top, width, height;
  transition: left .4s cubic-bezier(.45, 0, .15, 1), top .4s cubic-bezier(.45, 0, .15, 1), width .4s cubic-bezier(.45, 0, .15, 1), height .4s cubic-bezier(.45, 0, .15, 1), background .4s ease, opacity .4s ease, transform .3s ease; }
.comp .q1 { left: 0%; top: 0%; width: 21%; height: 30.5%; }
.comp .q2 { left: 24%; top: 0%; width: 21%; height: 30.5%; }
.comp .q3 { left: 0%; top: 34.9%; width: 21%; height: 30.5%; }
.comp .q4 { left: 24%; top: 34.9%; width: 21%; height: 30.5%; }
.comp .th1 { left: 0%; top: 69.8%; width: 21%; height: 30.5%; }
.comp .th2 { left: 24%; top: 69.8%; width: 21%; height: 30.5%; }
.comp .th3 { left: 24%; top: 69.8%; width: 21%; height: 30.5%; z-index: 0; }
.comp .hd1 { left: 58%; top: 0%; width: 20%; height: 11%; border-radius: 3px; background: var(--blk2); }
.comp .hd2 { left: 81%; top: 0%; width: 19%; height: 11%; border-radius: 3px; background: var(--blk2); }
.comp .t1 { left: 58%; top: 16.5%; width: 42%; height: 5%; border-radius: 3px; }
.comp .t2 { left: 62.5%; top: 25%; width: 33%; height: 5%; border-radius: 3px; }
.comp .btn { left: 58%; top: 36.5%; width: 30%; height: 12%; border-radius: 999px; background: var(--blk2); }
.comp .xb { left: 90%; top: 36.5%; width: 8.5%; height: 12%; border-radius: 3px; background: var(--blk2); }
.comp .xd { left: 43.5%; top: -4%; width: 8%; height: 11.5%; border-radius: 50%; background: var(--blk2); box-shadow: 0 0 0 2px var(--illo-bg); }
.comp .xl { left: 58%; top: 54%; width: 42%; height: 3%; border-radius: 1px; background: var(--blk2); }
.comp .xt { left: 58%; top: 61.5%; width: 42%; height: 38.5%; background: var(--blk2); }
.pcard:hover .comp i, .pcard.lit .comp i { opacity: 1; }
.pcard:hover .comp .q1, .pcard.lit .comp .q1, .pcard:hover .comp .q2, .pcard.lit .comp .q2, .pcard:hover .comp .q3, .pcard.lit .comp .q3, .pcard:hover .comp .q4, .pcard.lit .comp .q4 { left: 0%; top: 0%; width: 58.8%; height: 74.22%; }
.pcard:hover .comp .th1, .pcard.lit .comp .th1 { left: 0%; top: 78.58%; width: 17.6%; height: 21.42%; }
.pcard:hover .comp .th2, .pcard.lit .comp .th2 { left: 20.6%; top: 78.58%; width: 17.6%; height: 21.42%; }
.pcard:hover .comp .th3, .pcard.lit .comp .th3 { left: 41.2%; top: 78.58%; width: 17.6%; height: 21.42%; }
.pcard:hover .comp .hd1, .pcard.lit .comp .hd1, .pcard:hover .comp .hd2, .pcard.lit .comp .hd2 { left: 64.8%; top: 0%; width: 35.2%; height: 12%; }
.pcard:hover .comp .t1, .pcard.lit .comp .t1 { left: 64.8%; top: 18%; width: 35.2%; height: 5%; }
.pcard:hover .comp .t2, .pcard.lit .comp .t2 { left: 64.8%; top: 27.5%; width: 26%; height: 5%; }
.pcard:hover .comp .btn, .pcard.lit .comp .btn { left: 64.8%; top: 38%; width: 22%; height: 12%; background: #e0a93a; }
.pcard:hover .comp .xt, .pcard.lit .comp .xt { left: 64.8%; top: 61.8%; width: 35.2%; height: 38.2%; background: var(--blk); }
.pcard:hover .comp i.xb, .pcard:hover .comp i.xd, .pcard:hover .comp i.xl, .pcard.lit .comp i.xb, .pcard.lit .comp i.xd, .pcard.lit .comp i.xl { opacity: 0; transform: scale(.6); }
.comp .phi { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 2; shape-rendering: geometricPrecision; }
.comp .phi path { fill: none; stroke: #c9931f; stroke-linecap: round; }
.comp .phi .grid { stroke-width: 1; stroke-dasharray: 4 5; vector-effect: non-scaling-stroke; opacity: 0; transition: opacity .15s ease; }
.comp .phi .faint { stroke-width: 1.5; stroke-dasharray: 4 5; vector-effect: non-scaling-stroke; opacity: .7; transition: opacity .3s ease .3s; }   /* тоньше сплошной и гаснет под ней — иначе зубчатый двойной край */
.comp .phi .draw { stroke-width: 17; opacity: 1; stroke-dasharray: 3743; stroke-dashoffset: -3743; transition: stroke-dashoffset .6s cubic-bezier(.9, 0, .1, 1) .1s; }   /* 17 ед. ≈ 2 px; штрих в длину пути (3742); отрицательное смещение — рисуется с конца */
.pcard:hover .comp .phi .draw, .pcard.lit .comp .phi .draw { stroke-dashoffset: 0; transition-delay: 0s; }
.pcard:hover .comp .phi .grid, .pcard.lit .comp .phi .grid { opacity: .6; transition-delay: .6s; }
.pcard:hover .comp .phi .faint, .pcard.lit .comp .phi .faint { opacity: 0; }

/* Эффективно: в покое серый зигзаг из семи шагов сплошной (как есть), золотая прямая из трёх — пунктиром (как должно быть);
   при наведении зигзаг рассыпается в пунктир и уходит на второй план, а прямая прочерчивается сплошной поверх своего пунктира */
.illo-eff svg { width: 76%; height: auto; overflow: visible; }
.illo-eff .zig { fill: none; stroke: var(--sk2); stroke-width: 1.5; stroke-dasharray: 4 0; transition: stroke-dasharray .45s ease, opacity .45s ease; }
.illo-eff .zigdots circle { fill: var(--sk2); transition: opacity .45s ease; }
.illo-eff .straight-dash { fill: none; stroke: #c9931f; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 6 7; opacity: .7; }
.illo-eff .straight { fill: none; stroke: #c9931f; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 260; stroke-dashoffset: 260; transition: stroke-dashoffset .6s cubic-bezier(.9, 0, .1, 1); }   /* медленно–быстро–медленно */
.illo-eff .node { fill: #c9931f; }
.illo-eff .node.mid { fill: var(--illo-bg); stroke: #c9931f; stroke-width: 3; }
.pcard:hover .illo-eff .zig, .pcard.lit .illo-eff .zig { stroke-dasharray: 4 4; opacity: .35; }
.pcard:hover .illo-eff .zigdots circle, .pcard.lit .illo-eff .zigdots circle { opacity: .35; }
.pcard:hover .illo-eff .straight, .pcard.lit .illo-eff .straight { stroke-dashoffset: 0; }

/* ---------- работы: плитки 3:1 ---------- */
.works-wrap { display: flex; flex-direction: column; }
.works { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; align-items: start; }   /* по две плитки в ряд */
.tile {
  all: unset; cursor: pointer;
  width: 100%; box-sizing: border-box;
  display: grid;
  grid-template-columns: 1fr 2fr;
  /* плотная поверхность чуть светлее фона, блик по верхней кромке и настоящая тень — плитка как предмет на карте (вариант 3, автор 17.10) */
  background: var(--surface-v1);
  box-shadow: var(--tile-shadow);
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}
.tile:hover, .tile.lit { box-shadow: var(--tile-shadow-up); }
/* обводка — отдельным слоем поверх содержимого: border на скруглениях рисуется тоньше, а внутреннюю тень
   перекрывало поле знака слева */
.tile::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px var(--line);
}
.tile:hover, .tile.lit { transform: translateY(-2px); }
/* свет переходит на плитку: только мягкое свечение наружу (на обёртке .work — плитка режет всё по скруглению);
   обводка при наведении не меняется — её подсветка загоралась неровно */
.work { position: relative; }
.work::before {
  content: ""; position: absolute; inset: 0; border-radius: 20px; pointer-events: none;
  box-shadow: 0 0 66px 9px rgba(var(--glow), .07), 0 0 180px 30px rgba(var(--glow), .03);
  opacity: 0; transition: opacity .35s ease;
}
.work:hover::before, .work.lit::before { opacity: 1; }
.tile:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
/* стрелка-ссылка в правом верхнем углу плитки: тихая, при наведении на плитку поднимается вместе с ней и светлеет */
.go { position: absolute; top: 12px; right: 12px; z-index: 2; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  color: var(--ink-3); background: var(--surface-v1); box-shadow: inset 0 0 0 1px var(--line); transition: transform .25s ease, color .25s ease, background .25s ease; }
.go svg { width: 15px; height: 15px; }
.work:hover .go, .work.lit .go { transform: translateY(-2px); color: var(--ink-2); }
.go:hover, .go:focus-visible { color: var(--ink); background: var(--hover); outline: none; }
/* левая треть: квадрат со знаком работы */
.sign { display: grid; place-items: center; aspect-ratio: 1; background: var(--hover); overflow: hidden; }
.sign img { width: 86%; height: 86%; object-fit: contain; transition: transform .5s ease; }
.tile:hover .sign img, .tile.lit .sign img { transform: scale(1.04); }
.sign-text { font: 700 clamp(56px, 9vw, 120px)/1 var(--display); letter-spacing: -.03em; color: var(--ink); }
.sign.word .sign-text { font-size: clamp(24px, 3.4vw, 44px); letter-spacing: -.02em; text-align: center; padding: 0 8%; }
/* правые две трети: текст */
/* цвет работы (--accent) слабо заливает текстовую часть от знака вправо */
.text { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 8px; min-width: 0; padding: 22px clamp(20px, 2.6vw, 30px);
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent, transparent) 11%, transparent), color-mix(in srgb, var(--accent, transparent) 4%, transparent) 55%, transparent); }
.wname { font: 700 clamp(18px, 1.8vw, 23px)/1.15 var(--display); letter-spacing: -.02em; }
.wline { font-size: 15px; line-height: 1.4; color: var(--ink-2); }
.more { position: absolute; right: clamp(20px, 2.6vw, 30px); bottom: 16px; font-size: 13px; color: var(--ink-2); opacity: 0; transform: translateY(3px); transition: opacity .25s ease, transform .25s ease; }   /* места не занимает */
.tile:hover .more, .tile:focus-visible .more { opacity: 1; transform: none; }
/* без наведения (телефон) «Подробнее» не показываем — вместо него шеврон у правого края */
.chev { display: none; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px; margin-top: -5px; border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3); transform: rotate(-45deg); }
@media (hover: none) { .more { display: none; } .chev { display: block; } }

/* ---------- окно с историей ---------- */
.sheet {
  border: 0; padding: 0; margin: auto;
  width: min(760px, calc(100vw - 32px));
  max-height: min(92dvh, 960px);   /* потолок выше содержимого окна алхимии (~870px): иначе на больших экранах остаётся микропрокрутка */
  background: var(--surface-solid);
  color: var(--ink);
  border-radius: 24px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .45);
  overflow: hidden;
}
.sheet::backdrop { background: rgba(10, 10, 10, .45); backdrop-filter: blur(6px); }
.sheet[open] { animation: pop .22s cubic-bezier(.2, .8, .2, 1); }
.sheet.closing { animation: unpop .18s ease-in forwards; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes unpop { to { opacity: 0; transform: translateY(10px) scale(.98); } }
.grip { display: none; }
.sheet-in { position: relative; max-height: inherit; overflow: auto; padding: 26px 30px 26px; scrollbar-width: thin; scrollbar-color: var(--ink-3) transparent; }
.close {
  all: unset; cursor: pointer;
  position: absolute; right: 16px; top: 14px;
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 22px; line-height: 1; color: var(--ink-2);
  background: var(--hover);
}
.close:hover { color: var(--ink); }
.sheet-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; padding-right: 40px; }
.sign.small { width: 56px; height: 56px; aspect-ratio: auto; border-radius: 14px; flex: none; }
.sign.small img { width: 70%; height: 70%; }
.sign.small .sign-text { font-size: 28px; }
.pname { font: 700 22px/1.15 var(--display); letter-spacing: -.02em; }
/* изречения: латынь жирнее, перевод тише, тире одной колонкой */
.story .lines { display: grid; grid-template-columns: max-content max-content; column-gap: 14px; row-gap: 6px; margin: 0 0 26px; font: 400 clamp(16px, 1.8vw, 18px)/1.4 var(--text); }
.story .lines div { display: contents; }
.story .lines dt { margin: 0; font-weight: 600; color: var(--ink); letter-spacing: -.005em; }
.story .lines dd { margin: 0; color: var(--ink-2); }
.story .lines dd::before { content: "— "; color: var(--ink-3); }
.story .intro { margin: 0 0 30px; font: 600 clamp(16px, 1.8vw, 18px)/1.45 var(--text); letter-spacing: -.005em; max-width: 32em; color: var(--ink); white-space: pre-line; }   /* переводы строк в intro — абзацы */
/* таблица «проблема → решения» — отдельный слой: своя поверхность и рамка, шапка полосой, колонки разделены
   линией, ряды — линиями. С прищура видна форма: две колонки, три ряда, шапка */
.story .table { border: 1px solid var(--table-line); border-radius: 14px; overflow: hidden; background: var(--table-bg); }
.story .thead, .story .trow { display: grid; grid-template-columns: 1fr 1.15fr; align-items: stretch; }
.story .thead { background: var(--table-head); border-bottom: 1px solid var(--table-line); }
.story .thead h3 { margin: 0; padding: 12px 16px; font: 700 clamp(15px, 1.6vw, 17px)/1.2 var(--display); letter-spacing: -.01em; color: var(--ink); }
.story .trow { border-bottom: 1px solid var(--table-line); }
.story .trow:last-child { border-bottom: 0; }
.story .c1 { border-left: 1px solid var(--table-line); }
/* проблема: суть строкой, пояснение под ней; по центру ряда напротив списка */
.story .cell { display: flex; flex-direction: column; justify-content: center; gap: 3px; padding: 14px 16px; }
.story .cell b { display: block; font-weight: 600; font-size: 15px; line-height: 1.35; color: var(--ink); }
.story .cell span { display: block; font-size: 14px; line-height: 1.4; color: var(--ink-2); }
/* решения: каждое — одна строка, пояснение в ней же после тире */
.story ul.c1 { list-style: none; margin: 0; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.story ul.c1 li { position: relative; padding-left: 14px; font-size: 15px; line-height: 1.4; color: var(--ink-2); }
.story ul.c1 li::before { content: ""; position: absolute; left: 0; top: .6em; width: 5px; height: 5px; border-radius: 50%; background: var(--ink-3); }
.story ul.c1 b { font-weight: 600; color: var(--ink); }
.story ul.c1 b + span::before { content: " — "; }
/* решение сверх проблем — последняя строка таблицы, одна ячейка во всю ширину, со знаком «+» */
.story .trow-plus { grid-template-columns: 1fr; }
.story .plus { margin: 0; padding: 13px 16px; display: flex; gap: 12px; align-items: center; font-size: 15px; line-height: 1.4; color: var(--ink-2); }
.story .plus i { flex: none; width: 22px; text-align: center; font: 700 26px/1 var(--text); font-style: normal; color: var(--ink); }   /* знак крупно, по центру ячейки, без круга */
/* итоги (цена, результат) — отдельный блок на подложке цвета работы: ярлыки цветом, текст одним полным цветом */
.story .after { display: grid; grid-template-columns: max-content 1fr; column-gap: 18px; row-gap: 12px; margin: 20px 0 0; padding: 16px 18px; border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 8%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); }
.story .after div { display: contents; }
.story .after dt { padding-top: 3px; font: 700 11px/1.5 var(--text); letter-spacing: .1em; text-transform: uppercase; color: color-mix(in srgb, var(--accent) 75%, var(--ink)); }
.story .after dd { margin: 0; font-size: 15px; line-height: 1.45; color: var(--ink); }
.cta {
  display: inline-flex; align-items: center;
  margin-top: 18px;
  padding: 15px 26px;
  border-radius: 999px;
  background: var(--ink); color: var(--bg);
  font: 600 16px/1 var(--text);
  transition: transform .15s ease, opacity .15s ease;
}
.cta:hover { transform: translateY(-1px); opacity: .92; }
.cta[hidden] { display: none; }

/* ---------- контакты: две мини-плитки того же языка, что плитки работ; знак — как знак бренда «К.» ---------- */
.contacts { margin-top: auto; }
.cgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 330px)); justify-content: center; gap: 20px; }
.ctile {
  position: relative; display: grid; grid-template-columns: 56px 1fr; align-items: center; gap: 16px;
  padding: 12px 20px 12px 12px;
  background: var(--surface-v1); border-radius: 20px;
  box-shadow: var(--tile-shadow);
  transition: transform .25s ease, box-shadow .25s ease;
}
.ctile:hover, .ctile.lit { transform: translateY(-2px); box-shadow: var(--tile-shadow-up); }
.ctile::before {
  content: ""; position: absolute; inset: 0; border-radius: 20px; pointer-events: none;
  box-shadow: 0 0 33px 4px rgba(var(--glow), .035), 0 0 90px 15px rgba(var(--glow), .015);
  opacity: 0; transition: opacity .35s ease;
}
.ctile:hover::before, .ctile.lit::before { opacity: 1; }
.csign { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; background: var(--ink); color: var(--bg); }
.csign svg { width: 26px; height: 26px; }
.ctext { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ctext b { font: 700 17px/1.15 var(--display); letter-spacing: -.02em; color: var(--ink); }
.ctext span { font-size: 14px; line-height: 1.3; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- узкие экраны ---------- */
@media (max-width: 1000px) { .pgrid { grid-template-columns: 1fr; gap: 14px; } }
@media (max-width: 760px) {
  .works { grid-template-columns: 1fr; gap: 14px; }
  .tile, .work::before { border-radius: 18px; }
  .tile { grid-template-columns: 104px 1fr; }
  .sign img { width: 84%; height: 84%; }
  .cgrid { grid-template-columns: 1fr; gap: 14px; }
  .ctile, .ctile::before { border-radius: 18px; }
  .text { padding: 16px 36px 16px 16px; gap: 6px; }
  .wname { font-size: 17px; }
  .wline { font-size: 14px; }
}
@media (max-width: 600px) {
  /* шторка снизу: во всю ширину, без браузерных полей и ограничений dialog по умолчанию */
  .sheet { width: 100%; max-width: none; max-height: 92dvh; margin: 0; inset: auto 0 0 0; border-radius: 22px 22px 0 0; }
  .sheet[open] { animation: rise .3s cubic-bezier(.2, .8, .2, 1); }
  .sheet.closing { animation: sink .22s ease-in forwards; }
  @keyframes rise { from { transform: translateY(40px); opacity: 0; } }
  @keyframes sink { to { transform: translateY(40px); opacity: 0; } }
  .sheet-in { padding: 14px 18px calc(24px + env(safe-area-inset-bottom)); }
  .grip { display: block; width: 36px; height: 4px; margin: 0 auto 16px; border-radius: 2px; background: var(--line-2); }
  .close { right: 12px; top: 12px; }
  .sheet-head { gap: 12px; margin-bottom: 16px; }
  .sign.small { width: 44px; height: 44px; border-radius: 12px; }
  .pname { font-size: 19px; }
  .story .intro { margin-bottom: 20px; font-size: 16px; }
  .story .lines { font-size: 16px; margin-bottom: 18px; }
  /* таблица — в колонку: подписи колонок уезжают в каждый ряд мелкими метками; слой и линии остаются */
  .story .thead { display: none; }
  .story .trow { grid-template-columns: 1fr; }
  .story .c1 { border-left: 0; border-top: 1px dashed var(--table-line); }
  .story .cell, .story ul.c1 { padding: 12px 14px; }
  .story .c0::before, .story ul.c1::before { display: block; margin-bottom: 6px; font: 600 11px/1 var(--text); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
  .story .c0::before, .story ul.c1::before { content: attr(data-col); }
  .story .plus { padding: 12px 14px; font-size: 14px; }
  .story ul.c1 { gap: 7px; }
  .story ul.c1 li, .story .cell b { font-size: 14px; }
  .story .cell span { font-size: 13px; }
  .story .after { grid-template-columns: 1fr; row-gap: 2px; margin-top: 16px; padding: 14px; }
  .story .after div + div dt { margin-top: 12px; }
  .story .after dd { font-size: 14px; }
  .cta { margin-top: 16px; width: 100%; justify-content: center; padding: 14px 20px; }
}

/* ---------- сравнение вариантов (?compare=1, временно) ---------- */
.compare[hidden] { display: none; }
.compare { display: flex; flex-direction: column; gap: 18px; padding-top: 24px; border-top: 1px solid var(--line); }
.compare h2 { margin: 12px 0 0; font: 600 12px/1 var(--text); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.cmp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 40px; }
.cmp { position: relative; padding-left: 28px; }
.cmp > i { position: absolute; left: 0; top: 2px; font: 600 12px/1 var(--text); color: var(--ink-3); font-style: normal; }
.cmp .title { font-size: clamp(22px, 2.6vw, 30px); }
.cmp .title.big { font-size: clamp(28px, 3.4vw, 40px); }
.cmp .eyebrow { margin: 0 0 4px; font: 500 14px/1.3 var(--text); color: var(--ink-2); }
.title.balance { text-wrap: balance; }
.title em.mute { color: var(--ink-2); }
.title em.gold { color: #c9931f; }
.cmp-grid.tiles { grid-template-columns: 1fr 1fr; gap: 56px 40px; }
.cmp-grid.tiles .cmp { padding-left: 0; padding-top: 22px; }
/* варианты плитки */
.tile.v1 { background: var(--surface-v1); backdrop-filter: none; -webkit-backdrop-filter: none; }
.tile.v1::after { box-shadow: inset 0 1px 0 var(--hi-top), inset 0 0 0 1px var(--line); }
.tile.v2 { background: var(--surface-v1); backdrop-filter: none; -webkit-backdrop-filter: none; }
.tile.v2 .text { background: linear-gradient(90deg, color-mix(in srgb, var(--accent, transparent) 22%, transparent), color-mix(in srgb, var(--accent, transparent) 8%, transparent) 60%, color-mix(in srgb, var(--accent, transparent) 3%, transparent)); }
.tile.v2::after { box-shadow: inset 0 1px 0 var(--hi-top), inset 0 0 0 1px var(--line); }
.tile.v3 { background: var(--surface-v1); backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: var(--tile-shadow); }
.tile.v4 { background: var(--surface-v1); backdrop-filter: none; -webkit-backdrop-filter: none; }
.tile.v4::after { box-shadow: inset 0 0 0 1px var(--line-2); }
:root { --surface-v1: #ffffff; --hi-top: rgba(255, 255, 255, .9); }
@media (prefers-color-scheme: dark) { :root { --surface-v1: #212121; --hi-top: rgba(255, 255, 255, .09); } }
@media (max-width: 760px) { .cmp-grid, .cmp-grid.tiles { grid-template-columns: 1fr; } }

/* ---------- контакты ---------- */
.dot { color: var(--ink-3); }

@media (prefers-reduced-motion: reduce) {
  .sheet[open] { animation: none; }
  .sheet.closing { animation: none; }
  .tile, .more, .cta { transition: none; }
}
