/* Секция «Стены, которые помнят гостей» на странице Атмосфера.
   Мозаика в естественных пропорциях + просмотр по клику. */

.loft-wall {
  margin: 0 0 24px;
}

.loft-wall__intro {
  max-width: 780px;
  margin-bottom: 34px;
}

.loft-wall__kicker {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: hsl(var(--primary));
  margin: 0 0 14px;
}

.loft-wall__title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 400;
  line-height: 1.15;
  color: hsl(var(--foreground));
  margin: 0 0 20px;
}

.loft-wall__lead {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.8;
  color: hsl(var(--foreground) / 0.8);
  margin: 0 0 14px;
}

.loft-wall__lead strong {
  font-weight: 600;
  color: hsl(var(--foreground));
}

.loft-wall__grid {
  column-count: 3;
  column-gap: 16px;
}

.loft-wall__item {
  display: block;
  width: 100%;
  margin: 0 0 16px;
  padding: 8px;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  text-align: left;
  cursor: zoom-in;
  appearance: none;
  font: inherit;
  color: inherit;
}

.loft-wall__item img {
  display: block;
  width: 100%;
  height: auto;
  transition: opacity 0.25s ease, transform 0.5s ease;
  user-select: none;
  -webkit-user-drag: none;
}

.loft-wall__item:hover img,
.loft-wall__item:focus-visible img {
  opacity: 0.9;
  transform: scale(1.012);
}

.loft-wall__item:focus-visible {
  outline: 2px solid hsl(var(--primary));
  outline-offset: 2px;
}

.loft-wall__caption {
  display: block;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 12.5px;
  line-height: 1.55;
  color: hsl(var(--foreground) / 0.62);
  margin: 11px 2px 3px;
}

.loft-wall__outro {
  max-width: 780px;
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid hsl(var(--border));
  font-family: "Inter", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.8;
  color: hsl(var(--foreground) / 0.8);
}

/* ---------- Просмотр во весь экран ---------- */

.loft-wall-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: hsl(22 14% 8% / 0.95);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
  cursor: zoom-out;
}

.loft-wall-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.loft-wall-lightbox__img {
  display: block;
  max-width: min(96vw, 1600px);
  max-height: 86vh;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 24px 70px hsl(22 14% 4% / 0.6);
}

.loft-wall-lightbox__close,
.loft-wall-lightbox__nav {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid hsl(0 0% 100% / 0.35);
  background: hsl(22 14% 8% / 0.55);
  color: hsl(0 0% 100% / 0.92);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.loft-wall-lightbox__close:hover,
.loft-wall-lightbox__nav:hover {
  background: hsl(22 14% 8% / 0.9);
  border-color: hsl(0 0% 100% / 0.7);
}

.loft-wall-lightbox__close {
  top: 22px;
  right: 24px;
  width: 44px;
  height: 44px;
  font-size: 21px;
  line-height: 1;
}

.loft-wall-lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  font-size: 20px;
}

.loft-wall-lightbox__nav--prev { left: 24px; }
.loft-wall-lightbox__nav--next { right: 24px; }

.loft-wall-lightbox__caption {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  max-width: min(90vw, 820px);
  text-align: center;
  color: hsl(0 0% 100% / 0.85);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.55;
}

.loft-wall-lightbox__counter {
  display: block;
  margin-top: 6px;
  color: hsl(0 0% 100% / 0.45);
  font-size: 11px;
  letter-spacing: 0.08em;
}

body.loft-wall-lightbox-open {
  overflow: hidden;
}

/* ---------- Адаптив ---------- */

@media (max-width: 1000px) {
  .loft-wall__grid { column-count: 2; }
}

@media (max-width: 620px) {
  .loft-wall__grid { column-count: 1; column-gap: 0; }
  .loft-wall__item { margin-bottom: 14px; }
  .loft-wall-lightbox { padding: 14px; }
  .loft-wall-lightbox__img { max-height: 76vh; }
  .loft-wall-lightbox__nav { width: 40px; height: 40px; }
  .loft-wall-lightbox__nav--prev { left: 10px; }
  .loft-wall-lightbox__nav--next { right: 10px; }
  .loft-wall-lightbox__close { top: 12px; right: 12px; width: 40px; height: 40px; }
}
