/* v11 — по мотивам bleibtgleich.dev: белый лист, жирный гротеск, колонка
   подписей и вертикальная линия, ступенчатые строки. Заголовки .goo
   проявляются из «чернильных капель» (SVG-фильтры из app.js). Пять тем —
   квадрат в левом верхнем углу (data-theme на <html>). */

:root {
  --bg: #fff; --ink: #000; --ghost: #e6e6e6; --line: #d8d8d8; --muted: #8c8c8c; --card: #f1f1f1;
  --c2: 195px;            /* где начинается вторая колонка */
  --wrap: min(100% - 40px, 1160px);
  --font: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
}
html[data-theme="1"] { --bg: #0d0d0d; --ink: #f2f2f2; --ghost: #1f1f1f; --line: #2c2c2c; --muted: #7a7a7a; --card: #181818; }
html[data-theme="2"] { --bg: #efe9dc; --ink: #2b2118; --ghost: #e2d9c6; --line: #d3c8b2; --muted: #8b7d66; --card: #e7dfcd; }
html[data-theme="3"] { --bg: #1f3dff; --ink: #fff; --ghost: #3552ff; --line: #4a64ff; --muted: #b7c2ff; --card: #2b48ff; }
html[data-theme="4"] { --bg: #d9ff3f; --ink: #111; --ghost: #cbef2e; --line: #b7d92a; --muted: #5d6b1c; --card: #ccf033; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 600 15px/1.25 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; transition: background .4s ease, color .4s ease; overflow-x: hidden; }
a { color: inherit; }
::selection { background: var(--ink); color: var(--bg); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 300; padding: 8px 14px; background: var(--ink); color: var(--bg); }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.defs { position: absolute; width: 0; height: 0; }

/* ---------- Прелоадер ---------- */
.loader { display: none; }
.js .loader { display: grid; place-items: center; position: fixed; inset: 0; z-index: 250; background: var(--bg); font: 700 22px var(--font); transition: opacity .6s ease; }
.js .loader.done { opacity: 0; pointer-events: none; }
.js .loader.gone { display: none; }

/* ---------- Фиксированные мелочи ---------- */
.theme-dot { position: fixed; left: 18px; top: 22px; z-index: 120; width: 16px; height: 16px; padding: 0; border: 0; cursor: pointer; background: var(--ghost); transition: background .3s ease, transform .2s ease; }
.theme-dot:hover { transform: scale(1.25); background: var(--ink); }
.menu-pill {
  position: fixed; right: 18px; top: 18px; z-index: 120;
  padding: 4px 11px 5px; border: 0; border-radius: 999px; cursor: pointer;
  font: 700 15px var(--font); color: var(--bg); background: var(--ink);
}
.corner { position: fixed; bottom: 4px; z-index: 0; margin: 0; pointer-events: none; font: 700 clamp(44px, 5.6vw, 108px)/1 var(--font); letter-spacing: -.05em; color: var(--ghost); transition: color .4s ease; }
.corner.left { left: 18px; }
.corner.right { right: 18px; }
.progress { position: fixed; left: 50%; bottom: 14px; z-index: 120; margin: 0; translate: -50% 0; font: 700 12px var(--font); color: var(--muted); }

/* меню на весь экран */
.menu { position: fixed; inset: 0; z-index: 110; display: flex; flex-direction: column; justify-content: center; padding: 0 max(20px, calc((100% - 1160px) / 2)); background: var(--bg); }
.menu[hidden] { display: none; }
.menu ol { list-style: none; margin: 0; padding: 0; }
.menu ol a { display: flex; align-items: baseline; gap: 20px; text-decoration: none; font: 700 clamp(48px, 8vw, 130px)/.95 var(--font); letter-spacing: -.055em; }
.menu ol a i { font-style: normal; font-size: 16px; letter-spacing: 0; color: var(--muted); width: var(--c2); flex: none; }
.menu ol a:hover { color: var(--muted); }
.menu-versions { margin: 40px 0 0 var(--c2); color: var(--muted); }
.menu-versions a { margin-right: 10px; color: var(--ink); text-decoration: none; }
.menu-versions a[aria-current] { text-decoration: underline; }

/* ---------- Сетка ---------- */
main { position: relative; z-index: 1; }
.grid { position: relative; width: var(--wrap); margin: 0 auto; display: grid; grid-template-columns: var(--c2) 1fr; }
.full { grid-column: 1 / -1; }
.ln { display: block; position: relative; }
.ln.in1 { padding-left: var(--c2); }
.ln.in2 { padding-left: calc(var(--c2) + 18%); }
.ln.in3 { padding-left: calc(var(--c2) + 34%); }
.lft { position: absolute; right: calc(100% - var(--c2) + .35em); }

.huge, .name { margin: 0; font: 700 clamp(48px, 6.6vw, 128px)/.9 var(--font); letter-spacing: -.055em; }
.mid { margin: 0; font: 700 clamp(48px, 5.6vw, 104px)/.9 var(--font); letter-spacing: -.05em; }
.small-note { margin: 0; max-width: 24em; color: var(--ink); }

/* ---------- Hero ---------- */
.hero { min-height: 100vh; min-height: 100svh; grid-template-rows: auto 1fr auto; padding: 18px 0 9vh; }
.hero::before { content: ""; position: absolute; left: calc(var(--c2) - 20px); top: 18px; bottom: 9vh; width: 1px; background: var(--ink); opacity: .7; }
.hero-mark { grid-column: 1; grid-row: 1; padding-top: 30px; }
.hero-mark svg { width: 110px; display: block; }
.hero-mark .blob { fill: var(--ink); }
.hero-mark text { fill: var(--bg); font: 700 34px ui-monospace, "Courier New", monospace; }
.hero-meta { grid-column: 2; grid-row: 1; margin: 6px 0 0; }
.hero-role { grid-column: 1; grid-row: 3; align-self: end; margin: 0 0 .6em; }
.name { grid-column: 2; grid-row: 3; }

/* ---------- Высказывания ---------- */
.statement { padding: 6vh 0 30vh; row-gap: 8vh; }
.statement .small-note { grid-column: 1 / 2; grid-row: 2; font-size: 14px; max-width: 15em; }
.split { padding: 10vh 0 30vh; row-gap: 6vh; }
.split::before { content: ""; position: absolute; left: calc(var(--c2) - 20px); top: 0; height: 32vh; width: 1px; background: var(--ink); opacity: .7; }
.split .small-note { grid-column: 2; }

/* ---------- Работы ---------- */
.work { position: relative; height: 280vh; }
.work-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; place-items: center; overflow: hidden; }
.work .mid { position: relative; z-index: 2; text-align: center; }
.flyers { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; z-index: 1; }
.flyers li { position: absolute; left: var(--x); top: var(--y); width: clamp(140px, 15vw, 230px); will-change: transform; }
.flyers a { display: block; text-decoration: none; }
.flyers pre {
  margin: 0; aspect-ratio: 4 / 5; padding: 14px 12px; overflow: hidden;
  font: 500 11px/1.45 ui-monospace, "Courier New", monospace; color: var(--ink);
  background: var(--card); white-space: pre-wrap;
  transition: transform .4s cubic-bezier(.2, .7, .2, 1);
}
.flyers span { display: block; margin-top: 8px; font-size: 13px; }
.flyers a:hover pre { transform: scale(.96); }
.all-works { position: absolute; z-index: 3; left: 50%; bottom: 12vh; translate: -50% 0; padding: 4px 12px; border-radius: 999px; font-size: 15px; background: var(--bg); }

/* ---------- Реестр ---------- */
.index { padding: 26vh 0 22vh; row-gap: 12vh; }
.idx-title .lft { position: absolute; }
.table { grid-column: 1 / -1; }
.row { display: grid; grid-template-columns: var(--c2) 1.4fr 1.6fr 1fr; column-gap: 14px; }
.row span { padding: 6px 4px 5px; border-bottom: 1px solid var(--line); min-height: 28px; }
.row.head span { color: var(--muted); font-weight: 500; }
.row a { text-decoration: none; }
.row a:hover { text-decoration: underline; text-underline-offset: 3px; }
.group { margin-top: 26px; }

.rule { width: calc(100% - 36px); margin: 0 auto; border: 0; border-top: 1px solid var(--ink); opacity: .7; }

/* ---------- Финал ---------- */
.outro { padding: 18vh 0 22vh; row-gap: 3vh; }
.counter { grid-column: 1 / -1; margin: 0; font: 700 clamp(28px, 2.6vw, 48px) var(--font); letter-spacing: -.03em; padding-left: var(--c2); }
.contact-side { grid-column: 1; grid-row: 4; align-self: center; font-size: 15px; }
.end-lines { grid-row: 4; }
.contact-side p { margin: 0 0 14px; }
.muted { color: var(--muted); }
.contact-side a { text-decoration: none; }
.contact-side a:hover { text-decoration: underline; }
.circles { grid-column: 1 / -1; grid-row: 5; list-style: none; display: flex; justify-content: center; gap: 8px; margin: 12vh 0 0; padding: 0; }
.circles a { display: grid; place-items: center; width: 70px; height: 70px; border: 1px solid var(--ink); border-radius: 50%; text-decoration: none; font-size: 15px; transition: background .2s ease, color .2s ease; }
.circles a:hover { background: var(--ink); color: var(--bg); }
.foot { grid-column: 1 / -1; grid-row: 6; margin: 10vh 0 0; text-align: center; color: var(--muted); font-size: 13px; }

/* ---------- Капли: слова ---------- */
.goo .w { display: inline-block; white-space: pre; will-change: filter, transform; }

/* ---------- Узкий экран ---------- */
@media (max-width: 760px) {
  :root { --c2: 0px; --wrap: calc(100% - 32px); }
  .grid { grid-template-columns: 1fr; }
  .hero::before, .split::before { display: none; }
  .hero { grid-template-rows: auto auto 1fr auto auto; padding-top: 64px; }
  .hero-mark, .hero-meta, .hero-role, .name { grid-column: 1; }
  .hero-meta { grid-row: 2; margin-top: 18px; }
  .hero-role { grid-row: 4; margin-top: 40px; }
  .name { grid-row: 5; }
  .hero-mark svg { width: 70px; }
  .ln.in1 { padding-left: 0; }
  .ln.in2 { padding-left: 14%; }
  .ln.in3 { padding-left: 28%; }
  .lft { position: static; }
  .statement .small-note, .split .small-note, .contact-side { grid-column: 1; grid-row: auto; }
  .end-lines, .circles, .foot { grid-row: auto; }
  .row { grid-template-columns: 54px 1fr; }
  .row span:nth-child(3), .row span:nth-child(4) { grid-column: 2; border-bottom: 0; padding-top: 0; color: var(--muted); font-weight: 500; }
  .row span:nth-child(2) { border-bottom: 0; }
  .row span:nth-child(4) { border-bottom: 1px solid var(--line); }
  .row span:nth-child(1) { grid-row: span 3; }
  .row.head { display: none; }
  .flyers li { width: 120px; }
  .corner { font-size: 30px; letter-spacing: -.04em; }
  .menu ol a i { width: auto; }
  .menu-versions { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .loader { display: none; }
  .goo .w { filter: none !important; transform: none !important; }
}
