/* Плакаты — стена расклейки: бетон, скотч, плакаты внахлёст */
:root {
  --concrete: #a8a59e;
  --ink: #121212;
  --paper: #f2efe8;
  --red: #ff3b14;
  --tape: rgba(238, 226, 190, .78);
  --g: clamp(16px, 2.2vw, 32px);
  --sans: "Deledda", system-ui, sans-serif;
  --mono: "Feature Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  color: var(--ink); font-family: var(--sans); font-weight: 300; overflow-x: hidden; overflow-x: clip;
  background-color: var(--concrete);
  background-image:
    radial-gradient(ellipse 40% 30% at 20% 30%, rgba(0, 0, 0, .1), transparent 70%),
    radial-gradient(ellipse 30% 40% at 80% 70%, rgba(255, 255, 255, .12), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: auto; }
::selection { background: var(--red); color: var(--ink); }

.mono { font-family: var(--mono); font-size: 11px; font-weight: 400; letter-spacing: .2em; text-transform: uppercase; line-height: 1.7; }
.mono b { font-weight: 700; }

/* ---------- верхняя полоса ---------- */
.bar { position: fixed; inset: 0 0 auto 0; z-index: 50; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px var(--g); mix-blend-mode: difference; color: #fff; }
.bar nav { display: flex; gap: 24px; }
.bar a:hover { text-decoration: line-through; }

/* ---------- шапка ---------- */
.top { padding: 72px var(--g) 0; position: relative; }
.top .labels { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 2px solid var(--ink); padding-top: 10px; }
.top h1 { position: relative; font-weight: 900; line-height: .8; letter-spacing: -.05em; text-transform: uppercase; margin: 5vh 0 0 -.04em; }
/* полоса бумаги под заголовком, как наклейка поверх расклейки */
.top h1::before { content: ""; position: absolute; z-index: -1; left: -2%; right: -1%; top: 18%; bottom: 8%; background: var(--paper); transform: rotate(-1.2deg); box-shadow: 0 2px 0 rgba(0, 0, 0, .15); }
.top .count { position: absolute; right: var(--g); top: 120px; font-weight: 900; font-size: clamp(80px, 16vw, 300px); line-height: .8; color: transparent; -webkit-text-stroke: 2px var(--red); transform: rotate(8deg); pointer-events: none; }
.top .lead { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--g); margin-top: 6vh; align-items: end; }
.top .lead p { font-size: clamp(18px, 1.8vw, 28px); line-height: 1.25; max-width: 40ch; }

/* ---------- фильтры ---------- */
.filters { position: sticky; top: 44px; z-index: 40; display: flex; flex-wrap: wrap; gap: 8px; padding: 14px var(--g); margin-top: 6vh; }
.filters button {
  font: 700 12px var(--mono); letter-spacing: .14em; text-transform: uppercase;
  padding: 9px 14px; cursor: pointer; border: 2px solid var(--ink); background: var(--paper); color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink); transition: transform .15s;
}
.filters button sup { font-size: .8em; margin-left: 4px; }
.filters button:hover { transform: translate(-1px, -1px); }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.filters .shuffle { margin-left: auto; background: var(--red); }

/* ---------- стена ---------- */
.wall { --n: 4; --gap: calc(var(--g) * 1.4); display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: calc(var(--g) * 1.8) var(--gap); padding: 5vh calc(var(--g) * 1.4) 10vh; overflow: hidden; }
.wall figure { flex: 0 0 calc((100% - (var(--n) - 1) * var(--gap)) / var(--n)); }
.wall figure {
  --r: 0deg; --x: 0px;
  position: relative; cursor: zoom-in;
  transform: translateX(var(--x)) rotate(var(--r));
  transition: transform .5s cubic-bezier(.2, .8, .2, 1), opacity .3s;
  box-shadow: 0 10px 22px -10px rgba(0, 0, 0, .55), 0 2px 3px rgba(0, 0, 0, .25);
}
.wall figure:hover { transform: rotate(0) scale(1.04); z-index: 5; }
.wall figure[hidden] { display: none; }
.wall img { background: #8f8c86; }
/* скотч */
.wall figure::before { content: ""; position: absolute; z-index: 2; top: -12px; left: 50%; width: 34%; height: 26px; margin-left: -17%; background: var(--tape); transform: rotate(-3deg); box-shadow: 0 1px 2px rgba(0, 0, 0, .15); }
.wall figure:nth-child(3n)::before { left: auto; right: -14px; top: 10px; width: 70px; margin: 0; transform: rotate(40deg); }
.wall figure:nth-child(4n + 1)::after { content: ""; position: absolute; z-index: 2; bottom: -10px; left: -14px; width: 70px; height: 24px; background: var(--tape); transform: rotate(35deg); }
/* повороты без JS */
.wall figure:nth-child(odd) { --r: -1.6deg; }
.wall figure:nth-child(even) { --r: 2deg; }
.wall figure:nth-child(5n) { --r: -3deg; }
.wall.shake figure { animation: paste .5s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--i, 0) * 30ms); }
@keyframes paste { from { opacity: 0; transform: translateY(-20px) rotate(calc(var(--r) * 3)) scale(1.05); } }

/* ---------- цифры + призыв ---------- */
.cta { padding: 6vh var(--g) 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 4vh; }
.cta ul { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.cta li { padding: 14px 14px 0 0; display: grid; gap: 8px; align-content: start; }
.cta li b { font-weight: 900; font-size: clamp(48px, 7.4vw, 140px); line-height: .85; letter-spacing: -.05em; }
.cta li > span { font-family: var(--mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; }
.cta .ask { display: block; background: var(--ink); color: var(--paper); padding: 6vh var(--g); transform: rotate(-1deg); box-shadow: 8px 8px 0 var(--red); margin-top: 6vh; }
.cta .ask .mono { color: var(--red); }
.cta .ask .big { display: block; font-weight: 900; font-size: clamp(32px, 6vw, 110px); line-height: .9; letter-spacing: -.04em; text-transform: uppercase; margin-top: 2vh; }
.cta .ask:hover { background: var(--red); color: var(--ink); }
.cta .ask:hover .mono { color: var(--ink); }

/* ---------- подвал ---------- */
footer { padding: 18vh var(--g) var(--g); display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.next { display: grid; gap: 8px; }
.next .big { font-weight: 900; font-size: clamp(56px, 13vw, 260px); line-height: .82; letter-spacing: -.05em; text-transform: uppercase; transition: color .3s; }
.next:hover .big { color: var(--red); }
footer .links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; border-top: 2px solid var(--ink); padding-top: 10px; }
footer .links a { font-weight: 900; font-size: clamp(20px, 3vw, 48px); line-height: 1; text-transform: uppercase; letter-spacing: -.02em; }
footer .links a:hover { color: var(--red); }

/* ---------- лайтбокс ---------- */
.lb { position: fixed; inset: 0; z-index: 100; background: rgba(18, 18, 18, .95); color: var(--paper); display: none; place-items: center; padding: 48px var(--g); cursor: zoom-out; }
.lb.on { display: grid; }
.lb img { max-width: 100%; max-height: calc(100svh - 96px); width: auto; object-fit: contain; }
.lb .mono { position: absolute; top: 14px; left: var(--g); right: var(--g); display: flex; justify-content: space-between; gap: 16px; }
.lb button { position: absolute; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--paper); font: 900 40px var(--sans); padding: 16px; cursor: pointer; }
.lb button:hover { color: var(--red); }
.lb [data-step="-1"] { left: 0; }
.lb [data-step="1"] { right: 0; }

/* ---------- планшет и телефон ---------- */
@media (max-width: 1100px) { .wall { --n: 3; } }
@media (max-width: 760px) {
  .bar nav, .bar > span { display: none; }
  .top .labels span:nth-child(2) { display: none; }
  .top .count { top: 112px; font-size: 24vw; }
  .top .lead { grid-template-columns: minmax(0, 1fr); }
  .filters { top: 40px; gap: 6px; }
  .filters button { padding: 7px 10px; font-size: 11px; }
  .filters .shuffle { margin-left: 0; }
  .wall { --n: 2; --gap: 14px; row-gap: 26px; padding: 4vh 16px 8vh; }
  .wall figure::before { height: 18px; top: -8px; }
  .wall figure:nth-child(3n)::before { right: -6px; width: 44px; }
  .wall figure:nth-child(4n + 1)::after { left: -6px; width: 44px; height: 18px; }
  .cta ul { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); row-gap: 24px; }
  .lb button { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .wall figure { transition: none; }
  .wall.shake figure { animation: none; }
}
