/* ================================================================
   Кластер 73 · лендинг продажи помещения
   Наследует tokens.css + reset.css главной. Здесь только то,
   чего на главной нет: hero лота, bento, лайтбокс, форма.
   ================================================================ */

.sale { background: var(--paper); }

/* Primitives ------------------------------------------------------
   Главная держит их в main.css, но тот файл определяет свои .hero и
   .footer — они бы перебили лендинг. Поэтому только нужное, локально. */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--page-pad); }
.container--wide { max-width: var(--container-wide); }

.eyebrow {
  font-family: var(--font-mono); font-weight: 700; font-size: 11px;
  text-transform: uppercase; letter-spacing: .18em;
  color: var(--brand-teal-dark); margin: 0 0 var(--s-4);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ''; width: 28px; height: 1px; background: currentColor; flex-shrink: 0; }
.eyebrow--light { color: rgba(255,255,255,.62); }

.section-title {
  font-family: var(--font-serif); font-size: clamp(40px, 5.2vw, 64px);
  line-height: 1; letter-spacing: -.01em; margin: 0 0 var(--s-5);
}
.section-title em { font-style: italic; color: var(--brand-teal-dark); }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 28px; border-radius: var(--r-cta); border: 0;
  font-family: var(--font-sans); font-size: 15px; font-weight: 600;
  letter-spacing: .01em; white-space: nowrap; cursor: pointer;
  transition: transform var(--t-fast) var(--ease-snap),
              background var(--t-fast) var(--ease-out),
              color var(--t-fast) var(--ease-out);
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--brand-teal); color: var(--ink); }
.btn--primary:hover { background: var(--brand-teal-bright); }
.btn--lg { padding: 20px 34px; font-size: 16px; }
.btn--md { padding: 12px 24px; font-size: 14px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--white); padding: 12px 20px;
  border-radius: 0 0 var(--r-sm) 0;
}
.skip:focus { left: 0; }

/* Topbar ---------------------------------------------------------- */
.topbar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 50;
  padding: var(--s-5) 0;
}
.topbar__inner {
  max-width: var(--container-wide); margin: 0 auto;
  padding: 0 var(--page-pad);
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-5);
}
.topbar__logo img { display: block; height: 30px; width: auto; }
.topbar__right { display: flex; align-items: center; gap: var(--s-5); }
.topbar__phone {
  font-family: var(--font-mono); font-size: 13px; font-weight: 700;
  color: var(--white); white-space: nowrap;
}
@media (max-width: 560px) {
  .topbar__phone { display: none; }
}

/* Hero ------------------------------------------------------------ */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: flex-end;
  padding: var(--s-9) 0 var(--s-7);
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(6,16,15,.92) 0%, rgba(6,16,15,.55) 42%, rgba(6,16,15,.12) 72%, rgba(6,16,15,.30) 100%);
}
.hero__body { position: relative; width: 100%; color: var(--white); }

.hero__title {
  font-family: var(--font-serif);
  font-size: clamp(52px, 8.4vw, 122px);
  line-height: .92; letter-spacing: -.02em;
  margin: 0 0 var(--s-5);
  max-width: 12ch;
}
.hero__title em { font-style: italic; color: var(--brand-teal); }

.hero__lead {
  max-width: 40ch; font-size: clamp(19px, 1.8vw, 24px);
  line-height: 1.45; color: var(--text-on-dark);
  margin: 0 0 var(--s-6);
}

.hero__facts {
  display: grid; gap: var(--s-6) var(--s-8);
  grid-template-columns: repeat(auto-fit, minmax(130px, max-content));
  margin: 0; padding-top: var(--s-6);
  border-top: 1px solid rgba(255,255,255,.18);
}
.fact dt {
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .16em;
  color: rgba(255,255,255,.55); margin-bottom: 8px;
}
.fact dd {
  margin: 0; font-family: var(--font-serif);
  font-size: clamp(34px, 3.8vw, 50px); line-height: 1;
}
.fact dd span { font-family: var(--font-sans); font-size: .42em; opacity: .6; margin-left: 3px; }

/* Акцентный факт (fact.hl в lots.json) — то, чем лот отличается от прочих.
   Подсвечиваем и подпись, и число: на тёмном hero бирюза читается сразу. */
.fact--hl dt { color: var(--brand-teal); opacity: 1; }
.fact--hl dd { color: var(--brand-teal); }
.fact--hl dd span { opacity: .75; }

.hero__hint {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  width: 1px; height: 44px; overflow: hidden;
  background: rgba(255,255,255,.22);
}
.hero__hint span {
  position: absolute; inset: 0;
  background: var(--brand-teal);
  animation: hint 2.4s var(--ease-out) infinite;
}
@keyframes hint {
  0%   { transform: translateY(-100%); }
  60%  { transform: translateY(100%); }
  100% { transform: translateY(100%); }
}
@media (prefers-reduced-motion: reduce) {
  .hero__hint span { animation: none; }
}

/* Placeholder marker — снимается вместе с текстом объявления -------- */
.tbd {
  position: relative;
  outline: 1px dashed rgba(200,119,47,.55); outline-offset: 4px;
  border-radius: 2px;
}
.tbd::after {
  content: 'TBD'; position: absolute; top: -9px; right: -6px;
  font: 700 8px/1 var(--font-mono); letter-spacing: .1em;
  color: #c8772f; background: var(--paper);
  padding: 2px 4px; border-radius: 2px;
}
.hero .tbd::after { background: rgba(6,16,15,.9); }

/* Intro ----------------------------------------------------------- */
.intro { padding: clamp(72px, 10vw, 140px) var(--page-pad); }
.intro__cols {
  display: grid; gap: clamp(48px, 6vw, 96px);
  grid-template-columns: 1.15fr .85fr; align-items: start;
}
@media (max-width: 860px) { .intro__cols { grid-template-columns: 1fr; } }

/* Описание — журнальный кегль. Первый абзац крупнее (лид-абзац),
   остальные базовым; между абзацами — воздух. */
.intro__text > p { margin: 0 0 var(--s-5); color: var(--text-primary); }
.intro__text > p:last-child { margin-bottom: 0; }
.intro__text > p { font-size: clamp(18px, 1.55vw, 22px); line-height: 1.6; }
.intro__text .intro__lead {
  font-family: var(--font-serif);
  font-size: clamp(26px, 3vw, 40px); line-height: 1.2;
  letter-spacing: -.01em; color: var(--ink);
  margin-bottom: var(--s-6);
}

/* Характеристики — крупнее, больше воздуха между строк. */
.intro__specs { list-style: none; margin: 0; padding: 0; }
.intro__specs li {
  display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-5);
  padding: 20px 0; border-bottom: 1px solid var(--line);
}
.intro__specs li:first-child { border-top: 1px solid var(--line); }
.intro__specs span {
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em; color: var(--text-muted);
  flex: none;
}
.intro__specs b { font-size: 18px; font-weight: 600; text-align: right; }

/* Bento ----------------------------------------------------------- */
.bento-wrap { padding: 0 0 clamp(72px, 10vw, 140px); }
.bento-wrap .container { padding: 0 var(--page-pad); }

/* Ритм задан nth-child, а не именованными областями: число кадров у лота
   произвольное (менеджер добавляет их в админке), и жёсткая карта областей
   ломалась бы на любом количестве, кроме одного. Паттерн повторяется
   каждые 7 плиток; dense подбирает хвост неполного ряда. */
.bento {
  margin-top: var(--s-7);
  display: grid;
  gap: var(--s-3);
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 14vw;
  grid-auto-flow: dense;
}
.bento .tile                { grid-column: span 2; grid-row: span 1; }
.bento .tile:nth-child(7n+1){ grid-column: span 3; grid-row: span 2; }
.bento .tile:nth-child(7n+2),
.bento .tile:nth-child(7n+3){ grid-column: span 1; grid-row: span 1; }

@media (max-width: 1100px) {
  .bento { grid-auto-rows: 22vw; }
  .bento .tile:nth-child(7n+1){ grid-column: span 2; grid-row: span 2; }
  .bento .tile:nth-child(7n+2),
  .bento .tile:nth-child(7n+3){ grid-column: span 2; grid-row: span 1; }
}
@media (max-width: 640px) {
  .bento { grid-template-columns: 1fr; grid-auto-rows: 62vw; }
  .bento .tile,
  .bento .tile:nth-child(7n+1),
  .bento .tile:nth-child(7n+2),
  .bento .tile:nth-child(7n+3) { grid-column: span 1; grid-row: span 1; }
}

/* Плитка — флекс-колонка: кадр забирает свободную высоту, подпись живёт
   под ним. Иначе figcaption вылезает за грид-строку и её перекрывает
   следующий ряд (видны были только подписи нижнего ряда). */
.tile { margin: 0; position: relative; display: flex; flex-direction: column; min-height: 0; }

.tile__btn {
  display: block; width: 100%; flex: 1; min-height: 0; padding: 0;
  border: 0; background: var(--paper-dim); cursor: zoom-in;
  border-radius: var(--r-md); overflow: hidden; position: relative;
}
.tile__btn img {
  width: 100%; height: 100%; object-fit: cover;
  object-position: var(--pos, 50% 50%);
  transition: transform var(--t-slow) var(--ease-out);
}
.tile__btn:hover img { transform: scale(1.035); }
.tile__btn:focus-visible { outline: 2px solid var(--brand-teal); outline-offset: 3px; }

.tile__zoom {
  position: absolute; right: 12px; bottom: 12px;
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; color: var(--ink);
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(6px);
  opacity: 0; transform: translateY(6px);
  transition: opacity var(--t-med) var(--ease-out), transform var(--t-med) var(--ease-out);
}
.tile__btn:hover .tile__zoom,
.tile__btn:focus-visible .tile__zoom { opacity: 1; transform: none; }

.tile figcaption {
  flex: 0 0 auto; padding-top: 9px;
  font-family: var(--font-mono); font-size: 10.5px; line-height: 1.35;
  letter-spacing: .06em; color: var(--text-muted);
}
@media (max-width: 640px) { .tile figcaption { padding-bottom: var(--s-4); } }

/* CTA ------------------------------------------------------------- */
.cta { background: var(--ink); color: var(--white); padding: clamp(72px, 9vw, 128px) 0; }
.cta__inner {
  display: grid; gap: var(--s-8);
  grid-template-columns: 1fr .85fr; align-items: start;
}
@media (max-width: 860px) { .cta__inner { grid-template-columns: 1fr; } }

.cta__title {
  font-family: var(--font-serif); font-size: clamp(40px, 5.2vw, 64px);
  line-height: 1; margin: 0 0 var(--s-5);
}
.cta__title em { font-style: italic; color: var(--brand-teal); }
.cta__lead { max-width: 42ch; color: var(--text-on-dark); line-height: 1.6; margin: 0 0 var(--s-6); }
.cta__phones { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.cta__phone {
  font-family: var(--font-mono); font-weight: 700;
  font-size: clamp(20px, 2.4vw, 28px); color: var(--white);
  border-bottom: 1px solid rgba(255,255,255,.3); padding-bottom: 3px;
  transition: color var(--t-fast), border-color var(--t-fast);
}
.cta__phone:hover { color: var(--brand-teal); border-color: var(--brand-teal); }

/* Lead form ------------------------------------------------------- */
.lead {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--r-lg); padding: var(--s-6);
  display: grid; gap: var(--s-4);
}
.lead__hp { position: absolute; left: -9999px; opacity: 0; height: 0; }
.lead__field { display: grid; gap: 7px; }
.lead__field span {
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .14em; color: rgba(255,255,255,.5);
}
.lead__field input,
.lead__field textarea {
  font-family: var(--font-sans); font-size: 15px; color: var(--white);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--r-sm); padding: 13px 15px; resize: vertical;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.lead__field input::placeholder,
.lead__field textarea::placeholder { color: rgba(255,255,255,.32); }
.lead__field input:focus,
.lead__field textarea:focus {
  outline: none; border-color: var(--brand-teal); background: rgba(255,255,255,.1);
}
.lead__field input:user-invalid { border-color: #E4674A; }

.lead__submit { justify-content: center; margin-top: var(--s-2); }
.lead__submit[disabled] { opacity: .55; pointer-events: none; }
.lead__note { font-size: 12px; color: rgba(255,255,255,.45); margin: 0; line-height: 1.5; }
.lead__note a { color: rgba(255,255,255,.7); text-decoration: underline; }
.lead__status { margin: 0; font-size: 14px; min-height: 1.2em; }
.lead__status.is-ok  { color: var(--brand-teal); }
.lead__status.is-err { color: #E4674A; }

/* Footer ---------------------------------------------------------- */
.foot { background: var(--ink-soft); color: var(--white); padding: var(--s-6) 0; border-top: 1px solid rgba(255,255,255,.08); }
.foot__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); flex-wrap: wrap; }
.foot__logo img { display: block; height: 28px; width: auto; }
.foot__addr { margin: 0; font-size: 13px; color: rgba(255,255,255,.5); }

/* Каталог --------------------------------------------------------- */
.sale--catalogue { background: var(--paper); }
.topbar--solid { position: static; background: var(--ink); }

.cat-head {
  background: var(--ink); color: var(--white);
  padding: clamp(56px, 8vw, 104px) 0 clamp(72px, 10vw, 128px);
}
.cat-head__title {
  font-family: var(--font-serif); font-size: clamp(44px, 7vw, 88px);
  line-height: .98; letter-spacing: -.015em; margin: 0 0 var(--s-5);
}
.cat-head__title em { font-style: italic; color: var(--brand-teal); }
.cat-head__lead { max-width: 48ch; color: var(--text-on-dark); line-height: 1.6; margin: 0; }

.cat { padding: clamp(48px, 6vw, 80px) var(--page-pad) clamp(72px, 10vw, 128px); }
.cat__empty { font-size: 17px; color: var(--text-muted); }
.cat__empty a { color: var(--brand-teal-dark); font-weight: 600; }

.cat__grid {
  display: grid; gap: var(--s-6);
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
}
@media (max-width: 420px) { .cat__grid { grid-template-columns: 1fr; } }

.card {
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden; color: inherit;
  transition: transform var(--t-med) var(--ease-snap), box-shadow var(--t-med) var(--ease-out);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card:focus-visible { outline: 2px solid var(--brand-teal); outline-offset: 3px; }

.card__media { position: relative; aspect-ratio: 16 / 10; background: var(--paper-dim); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow) var(--ease-out); }
.card:hover .card__media img { transform: scale(1.04); }
.card__noimg {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-muted);
}
.card__code {
  position: absolute; left: 12px; top: 12px;
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  background: rgba(255,255,255,.9); color: var(--ink);
  padding: 5px 9px; border-radius: var(--r-cta);
}

.card__body { padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-4); flex: 1; }
.card__title { font-family: var(--font-serif); font-size: 26px; line-height: 1.1; margin: 0; }
.card__facts { display: flex; flex-wrap: wrap; gap: var(--s-5); margin: 0; }
.card__facts dt {
  font-family: var(--font-mono); font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .14em; color: var(--text-muted); margin-bottom: 3px;
}
.card__facts dd { margin: 0; font-size: 15px; font-weight: 600; }
.card__go {
  margin-top: auto; font-size: 14px; font-weight: 600; color: var(--brand-teal-dark);
  transition: gap var(--t-fast);
}
.card:hover .card__go { text-decoration: underline; }

/* Хлебная крошка внутри eyebrow на странице лота */
.crumb { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.crumb:hover { color: var(--brand-teal); }

.cta__more { margin: var(--s-5) 0 0; }
.cta__more a { color: var(--text-on-dark); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.cta__more a:hover { color: var(--brand-teal); }

/* 404 ------------------------------------------------------------- */
.nf { padding: clamp(96px, 16vw, 200px) var(--page-pad); text-align: center; }
.nf .eyebrow { justify-content: center; }
.nf__title { font-family: var(--font-serif); font-size: clamp(40px, 6vw, 72px); line-height: 1; margin: 0 0 var(--s-4); }
.nf__title em { font-style: italic; color: var(--brand-teal-dark); }
.nf__lead { color: var(--text-muted); margin: 0 0 var(--s-6); }

/* Lightbox -------------------------------------------------------- */
.lb {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(6,16,15,.96);
  display: grid; place-items: center; padding: clamp(16px, 4vw, 56px);
  opacity: 0; transition: opacity var(--t-med) var(--ease-out);
}
.lb[hidden] { display: none; }
.lb.is-open { opacity: 1; }
.lb__stage { margin: 0; max-width: 100%; max-height: 100%; display: grid; gap: var(--s-4); }
.lb__img {
  max-width: 100%; max-height: 82vh; object-fit: contain;
  border-radius: var(--r-md); justify-self: center;
}
.lb__cap {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em;
  color: rgba(255,255,255,.55); text-align: center;
}
.lb__close, .lb__nav {
  position: absolute; background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16); color: var(--white);
  border-radius: 50%; cursor: pointer; line-height: 1;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.lb__close:hover, .lb__nav:hover { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.4); }
.lb__close { top: 20px; right: 20px; width: 44px; height: 44px; font-size: 26px; }
.lb__nav { top: 50%; transform: translateY(-50%); width: 48px; height: 48px; font-size: 30px; }
.lb__nav--prev { left: 16px; }
.lb__nav--next { right: 16px; }
@media (max-width: 640px) {
  .lb__nav { width: 40px; height: 40px; font-size: 24px; }
}
