/* ===== Маркеториум — стили. Палитра из логотипа (docs/spec/brand.md) ===== */
:root {
  --bg:        #020819;   /* фон логотипа */
  --bg-2:      #0a1226;   /* панели/секции-tint */
  --card:      #0e1730;   /* карточки */
  --line:      #1e2b4d;   /* границы */
  --text:      #eef2fb;   /* основной текст */
  --muted:     #97a3c2;   /* приглушённый */
  --blue:      #0445DA;
  --cyan:      #01A1FE;
  --violet:    #8629F9;
  --orange:    #FE8108;
  --yellow:    #EBB917;
  --grad:      linear-gradient(90deg, #0445DA 0%, #8629F9 50%, #FE8108 100%);
  --radius:    14px;
  --maxw:      1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ——— Кнопки ——— */
.btn {
  display: inline-block; border: 0; cursor: pointer;
  font: inherit; font-weight: 600; color: var(--text);
  padding: 11px 22px; border-radius: 10px; background: var(--card);
  transition: transform .08s ease, opacity .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--grad); color: #fff; }
.btn--ghost { background: transparent; border: 1px solid var(--line); }
.btn--lg { padding: 14px 30px; font-size: 1.05rem; }

/* ——— Шапка: в потоке страницы, НЕ липкая. Лого крупное, прижато к левому краю ——— */
.site-header {
  display: flex; align-items: center; gap: 24px;
  width: 100%; padding: 20px 28px 20px 24px;
}
.logo { margin-right: 8px; }
.logo img { height: 96px; width: auto; display: block; }
.site-nav { display: flex; gap: 22px; margin-left: 12px; }
.site-nav a { color: var(--muted); font-weight: 500; }
.site-nav a:hover { color: var(--text); text-decoration: none; }
.header-cta { margin-left: auto; }

/* ——— Секции ——— */
.section { max-width: var(--maxw); margin: 0 auto; padding: 56px 20px; }
.section--tint { max-width: none; background: var(--bg-2); }
.section--tint > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.section__title { font-size: 1.7rem; margin: 0 0 24px; }

/* ——— HERO ——— */
.hero {
  background:
    radial-gradient(900px 400px at 15% -10%, rgba(4,69,218,.35), transparent 60%),
    radial-gradient(900px 400px at 85% 0%, rgba(254,129,8,.25), transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--line);
}
.hero__inner { max-width: var(--maxw); margin: 0 auto; padding: 70px 20px 60px; text-align: center; }
.hero__title { font-size: clamp(2rem, 5vw, 3.2rem); margin: 0 0 14px; line-height: 1.1; }
.hero__subtitle { color: var(--muted); font-size: 1.15rem; max-width: 620px; margin: 0 auto 28px; }
.hero__tabs { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 28px; }

/* Табы категорий (hero + переключатель каталога) */
.tab {
  padding: 10px 20px; border-radius: 999px; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); color: var(--text);
  font: inherit; font-weight: 600;
}
.tab.is-active { background: var(--grad); border-color: transparent; color: #fff; }

/* ——— Плитки категорий ——— */
.cat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.cat-tile {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; cursor: pointer; text-align: left; color: var(--text);
  transition: border-color .15s, transform .08s;
}
.cat-tile:hover { border-color: var(--violet); transform: translateY(-2px); }
.cat-tile__icon { font-size: 2.4rem; }
.cat-tile__name { font-size: 1.25rem; font-weight: 700; margin: 10px 0 4px; }
.cat-tile__count { color: var(--muted); }

/* ——— Витрина: карусель на каждую категорию ——— */
.showcase__cat { font-size: 1.35rem; margin: 8px 0 16px; display: flex; align-items: center; gap: 8px; }
.carousel {
  display: flex; gap: 18px; overflow-x: auto; padding-bottom: 14px; margin-bottom: 30px;
  scroll-snap-type: x mandatory;
}
.carousel::-webkit-scrollbar { height: 8px; }
.carousel::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }
.carousel .lot-card { flex: 0 0 300px; scroll-snap-align: start; }

/* ——— Каталог ——— */
.catalog-bar { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }
.cat-switch { display: flex; gap: 12px; flex-wrap: wrap; }
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.filter { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--muted); }
.filter select, .filter input {
  font: inherit; color: var(--text); background: var(--card);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-width: 130px;
}
.filter--range { flex-direction: row; align-items: flex-end; gap: 6px; }
.filter--range .filter__pair { display: flex; gap: 6px; }
.filter--range input { min-width: 90px; }

/* ——— Сетка лотов + карточка ——— */
.lot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.lot-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; display: flex; flex-direction: column;
  transition: border-color .15s, transform .08s;
}
.lot-card:hover { border-color: var(--violet); transform: translateY(-2px); }
.lot-card__media { position: relative; aspect-ratio: 3 / 2; background: var(--bg-2); }
.lot-card__media img { width: 100%; height: 100%; object-fit: cover; }
.lot-card__badge {
  position: absolute; top: 10px; left: 10px; background: var(--grad);
  color: #fff; font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: 999px;
}
.lot-card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.lot-card__title { font-weight: 700; font-size: 1.02rem; }
.lot-card__price { font-size: 1.25rem; font-weight: 800; }
.lot-card__specs { color: var(--muted); font-size: .88rem; margin-top: auto; }
.catalog-more { text-align: center; margin-top: 30px; }
.catalog-empty { color: var(--muted); padding: 30px 0; text-align: center; }

/* ——— Как это работает ——— */
.steps { list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.step__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; background: var(--grad); color: #fff;
  font-weight: 800; font-size: 1.1rem; margin-bottom: 12px;
}
.step h3 { margin: 0 0 6px; }
.step p { margin: 0; color: var(--muted); }

/* ——— Форма заявки ——— */
.lead__inner { max-width: 560px; margin: 0 auto; }
.lead__hint { color: var(--muted); margin-top: -14px; margin-bottom: 22px; }
.lead-form { display: flex; flex-direction: column; gap: 16px; }
.lead-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.lead-form input[type=text], .lead-form input[type=tel], .lead-form textarea {
  font: inherit; color: var(--text); background: var(--card);
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
}
.lead-form input.invalid, .lead-form .checkbox.invalid span { border-color: var(--orange); }
.lead-form .checkbox.invalid span { color: var(--orange); }
.checkbox { flex-direction: row !important; align-items: flex-start; gap: 10px; font-weight: 400; }
.checkbox input { margin-top: 4px; }
.lead-form__note { color: var(--muted); font-size: .85rem; text-align: center; margin: 0; }
.lead-form__lot {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 14px; color: var(--cyan); font-weight: 600;
}

/* ——— FAQ ——— */
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq__item { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; }
.faq__item summary { cursor: pointer; font-weight: 600; }
.faq__item p { color: var(--muted); margin: 12px 0 0; }

/* ——— Подвал ——— */
.site-footer {
  background: var(--bg-2); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px;
  max-width: var(--maxw); margin: 0 auto; padding: 46px 20px;
}
.footer-logo { height: 40px; margin-bottom: 12px; }
.site-footer p { color: var(--muted); margin: 0; }
.site-footer h4 { margin: 0 0 12px; }
.footer-legal { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-legal a { color: var(--muted); }
.site-footer__copy { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 20px; color: var(--muted); }

/* ——— Модалки (без шапки; своя строка закрытия) ——— */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.7); backdrop-filter: blur(3px); }
.modal__box {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); max-width: 780px; width: 100%;
  max-height: 90vh; overflow: auto; z-index: 1;
}
.modal__box--sm { max-width: 420px; }
.modal__close {
  position: absolute; top: 12px; right: 14px; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--bg-2); color: var(--text); font-size: 1.4rem; line-height: 1;
}
.modal__body { padding: 26px; }

/* Карточка лота внутри модалки */
.lot-detail__media { aspect-ratio: 16/9; background: var(--bg-2); border-radius: 10px; overflow: hidden; margin-bottom: 18px; }
.lot-detail__media img { width: 100%; height: 100%; object-fit: cover; }
.lot-detail__price { font-size: 1.8rem; font-weight: 800; margin: 6px 0 16px; }
.lot-detail__specs { list-style: none; padding: 0; margin: 0 0 18px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.lot-detail__specs li { background: var(--bg-2); border-radius: 8px; padding: 8px 12px; }
.lot-detail__specs span { color: var(--muted); display: block; font-size: .8rem; }
.lot-detail__desc { color: var(--text); margin-bottom: 22px; }

/* Юр.документы */
.legal h3 { margin-top: 0; }
.legal p { color: var(--muted); }

/* Спасибо */
.thanks { text-align: center; }
.thanks__icon {
  width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%;
  background: var(--grad); color: #fff; font-size: 2rem; display: flex; align-items: center; justify-content: center;
}
.thanks__note { color: var(--muted); font-size: .85rem; }

/* ——— Адаптив ——— */
@media (max-width: 760px) {
  .site-nav { display: none; }
  .site-footer { grid-template-columns: 1fr; }
  .logo img { height: 62px; }
  .site-header { padding: 16px; gap: 12px; }
}
