:root {
  --bg: #0e0e0d;
  --ink: #fff;
  --dim: rgba(255, 255, 255, .6);
  --line: rgba(255, 255, 255, .16);
  --font: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 300;
}
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px clamp(16px, 4vw, 56px);
}
.logo {
  font-weight: 700;
  font-size: 26px;
  letter-spacing: .04em;
  text-decoration: none;
}
.back {
  font-size: 15px;
  letter-spacing: .06em;
  padding: .6em 1.2em;
  border: 1px solid var(--line);
  border-radius: 40px;
  text-decoration: none;
  transition: background .2s;
}
.back:hover { background: rgba(255, 255, 255, .1); }

main { padding: 0 clamp(16px, 4vw, 56px) 80px; max-width: 1400px; margin: 0 auto; }
h1 { font-weight: 700; font-size: clamp(32px, 5vw, 64px); margin: 24px 0 28px; line-height: 1.05; }

.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 48px; }
.filters button {
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: none;
  border: 1px solid var(--line);
  border-radius: 40px;
  padding: .5em 1.2em;
  cursor: pointer;
}
.filters button:hover { border-color: #fff; }
.filters button.active { background: #fff; color: #111; border-color: #fff; }

.artist { margin-bottom: 72px; }
.artist h2 { font-weight: 700; font-size: clamp(22px, 2.6vw, 34px); margin: 0 0 8px; }
.artist .about { margin: 0 0 28px; max-width: 60ch; color: var(--dim); line-height: 1.5; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 28px 24px;
}
.work { background: none; border: 0; padding: 0; text-align: left; color: inherit; font: inherit; cursor: pointer; }
.work .pic {
  aspect-ratio: 1;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  transition: transform .2s;
}
.work:hover .pic { transform: translateY(-4px); }
.work img { max-width: 100%; max-height: 100%; display: block; }
.work .t { display: block; margin-top: 10px; font-size: 16px; }
.work .m { display: block; margin-top: 2px; font-size: 14px; color: var(--dim); }

/* Просмотр работы */
dialog {
  width: min(1000px, 94vw);
  max-height: 92vh;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: #181817;
  color: var(--ink);
  overflow: auto;
}
dialog::backdrop { background: rgba(0, 0, 0, .8); }
dialog[open] { display: grid; grid-template-columns: 1.4fr 1fr; }
dialog img { width: 100%; height: 100%; max-height: 92vh; object-fit: contain; background: #fff; padding: 20px; }
.info { padding: 40px 32px; align-self: center; }
.info h2 { margin: 0 0 8px; font-weight: 700; font-size: 28px; }
.info p { margin: 0 0 6px; color: var(--dim); line-height: 1.5; }
.room-btn {
  display: inline-block;
  margin-top: 24px;
  padding: .7em 1.4em;
  background: #fff;
  color: #111;
  border-radius: 40px;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
}
.close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .6);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
@media (max-width: 700px) {
  dialog[open] { grid-template-columns: 1fr; }
  .info { padding: 24px 20px 32px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 20px 14px; }
}

/* Язык, кнопки заказа */
[hidden] { display: none !important; }
.top { flex-wrap: wrap; gap: 12px; }
.top .right { display: flex; gap: 10px; align-items: center; }
.lang { font: inherit; font-size: 15px; color: var(--ink); background: none; border: 1px solid var(--line); border-radius: 40px; padding: .6em 1em; cursor: pointer; }
.lang:hover { background: rgba(255, 255, 255, .1); }
.buttons { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.room-btn { margin-top: 0; display: block; text-align: center; background: none; color: #fff; border: 1px solid var(--line); font-weight: 300; }
.room-btn:hover { border-color: #fff; }
.room-btn.solid { background: #fff; color: #111; border-color: #fff; font-weight: 700; }
.channels { display: flex; flex-wrap: wrap; gap: 8px; }
.chan { padding: .5em 1em; border: 1px solid var(--line); border-radius: 40px; text-decoration: none; font-size: 14px; }
.chan:hover { background: rgba(255, 255, 255, .1); }
@media (max-width: 700px) { .logo { font-size: 22px; } .back, .lang { font-size: 13px; } }

.logo img { display: block; height: 44px; width: auto; filter: brightness(0) invert(1); }
@media (max-width: 700px) { .logo img { height: 32px; } }

/* Горизонтальный телефон: компактное окно работы */
@media (orientation: landscape) and (max-height: 520px) {
  .top { padding: 12px clamp(16px, 4vw, 56px); }
  dialog img { padding: 10px; }
  .info { padding: 16px 20px; }
  .info h2 { font-size: 22px; }
  .buttons { margin-top: 14px; }
}

.credit {
  position: fixed;
  right: 16px;
  bottom: 10px;
  margin: 0;
  font: 300 11px/1 var(--font);
  letter-spacing: .16em;
  color: rgba(255, 255, 255, .4);
  text-decoration: none;
  pointer-events: auto;
  user-select: none;
}

/* Шапка всегда на экране; отступы учитывают вырез и строку состояния iPhone */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  padding-top: calc(20px + env(safe-area-inset-top));
  padding-bottom: 14px;
  padding-left: max(clamp(16px, 4vw, 56px), env(safe-area-inset-left));
  padding-right: max(clamp(16px, 4vw, 56px), env(safe-area-inset-right));
  background: transparent;
}
main { padding-left: max(clamp(16px, 4vw, 56px), env(safe-area-inset-left)); padding-right: max(clamp(16px, 4vw, 56px), env(safe-area-inset-right)); }
.work { scroll-margin-top: 120px; }
@media (orientation: landscape) and (max-height: 520px) {
  .top { padding-top: calc(10px + env(safe-area-inset-top)); padding-bottom: 10px; }
}

.work .pic { position: relative; }
.work .p { display: block; margin-top: 2px; font-size: 15px; }
.badge { position: absolute; top: 8px; left: 8px; padding: .25em .75em; background: #111; color: #fff; border-radius: 40px; font-size: 12px; letter-spacing: .04em; }
.work.sold .pic img { opacity: .45; }
.info .price { color: #fff; font-size: 18px; }

/* Страница «О проекте» */
.page { max-width: 760px; }
.page p { margin: 0 0 14px; font-size: 17px; line-height: 1.7; color: rgba(255, 255, 255, .82); }
.page h2 { margin: 48px 0 12px; font-size: 20px; }
.links { display: flex; flex-wrap: wrap; gap: 10px; }
html[lang="ru"] .en, html[lang="en"] .ru { display: none; }

/* Фото и видео на странице «О проекте» */
.page { max-width: 960px; }
.page h1 { font-size: clamp(22px, 2.6vw, 32px); margin: 24px 0 20px; }
.page .lead { max-width: 760px; margin: 0 0 40px; font-size: clamp(15px, 1.5vw, 19px); line-height: 1.6; color: rgba(255, 255, 255, .9); font-weight: 300; }
.page p, .page h2 { max-width: 760px; }
.gallery { columns: 2 300px; column-gap: 14px; }
.gallery figure { margin: 0 0 14px; break-inside: avoid; }
.gallery img, .gallery video { display: block; width: 100%; height: auto; border-radius: 4px; background: #1a1a19; }
.gallery img { cursor: zoom-in; }

.lb { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, .92); cursor: zoom-out; }
.lb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.filters { margin-top: 24px; }
