/* ————————————————————————————————————————————————————————————
   Цех88 — общая дизайн-система (один источник истины по стилю).
   Подключается на всех страницах. Палитру/шрифты не менять без
   согласования (см. CLAUDE.md).
   ———————————————————————————————————————————————————————————— */

:root {
  --ink: #15171C;
  --ink-2: #565C68;
  --ink-3: #8A909C;
  --bg: #FFFFFF;
  --bg-2: #F5F6F8;
  --line: rgba(21,23,28,0.10);
  --line-2: rgba(21,23,28,0.20);
  --accent: #1F49D6;        /* деловой акцент, дозированно */
  --accent-soft: #EEF2FE;
  --r: 12px;
  --r-sm: 8px;
  --f: "Inter", system-ui, sans-serif;
  --fm: "Space Mono", monospace;
  --maxw: 1180px;
}

/* ——— База ——— */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f); font-size: 16px; line-height: 1.55; font-weight: 500; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { max-width: 100%; display: block; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.mono { font-family: var(--fm); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; }
.muted { color: var(--ink-2); } .dim { color: var(--ink-3); }

/* ——— Кнопки ——— */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 13px 20px; border-radius: var(--r-sm); font-weight: 700; font-size: 14px; line-height: 1; border: 1px solid var(--ink); background: var(--ink); color: #fff; transition: opacity .15s, background .15s; }
.btn:hover { opacity: .86; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--bg-2); opacity: 1; }
.btn-sm { padding: 10px 15px; font-size: 13px; }
.btn-full { width: 100%; }

/* ——— Шапка (общая, рендерится из site.js) ——— */
.hdr { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,0.86); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.hdr-in { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; letter-spacing: -0.02em; font-size: 18px; }
.brand .dot { width: 10px; height: 10px; border-radius: 3px; background: var(--accent); }
.nav { display: flex; align-items: center; gap: 24px; }
.nav .links { display: flex; gap: 24px; }
.nav a { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.nav a:hover { color: var(--ink); }
.hdr .tel { font-family: var(--fm); font-weight: 700; font-size: 13px; }
@media (max-width: 900px) { .nav .links, .hdr .tel { display: none; } }

/* ——— Подвал (общий, рендерится из site.js) ——— */
.ftr { border-top: 1px solid var(--line); padding: 48px 0 36px; background: var(--bg-2); }
.ftr-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; margin-bottom: 30px; }
@media (max-width: 720px) { .ftr-top { grid-template-columns: 1fr; gap: 22px; } }
.ftr h5 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); margin: 0 0 12px; }
.ftr a.fl { display: block; color: var(--ink-2); font-size: 14px; padding: 4px 0; }
.ftr a.fl:hover { color: var(--ink); }
.ftr .req { font-size: 12.5px; color: var(--ink-3); line-height: 1.7; max-width: 42ch; }
.ftr-bot { border-top: 1px solid var(--line); padding-top: 20px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-3); }

/* ——— Секции (общее) ——— */
section { padding: 84px 0; }
.sec-top { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: 40px; flex-wrap: wrap; }
.sec-top h2 { font-size: clamp(26px, 3.4vw, 40px); letter-spacing: -0.03em; font-weight: 800; margin: 10px 0 0; }
.sec-top .lead { color: var(--ink-2); max-width: 46ch; margin: 8px 0 0; }
.alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ============================================================
   ГЛАВНАЯ (index.html)
   ============================================================ */

/* Hero */
.hero { padding: 92px 0 76px; border-bottom: 1px solid var(--line); }
.hero .trust { color: var(--ink-3); margin-bottom: 18px; }
.hero h1 { font-size: clamp(38px, 6vw, 74px); line-height: 1.03; letter-spacing: -0.035em; font-weight: 800; margin: 0 0 22px; max-width: 17ch; }
.hero p { font-size: clamp(17px, 2vw, 20px); color: var(--ink-2); max-width: 62ch; margin: 0 0 34px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* Brands marquee */
.brands { padding: 26px 0; border-bottom: 1px solid var(--line); overflow: hidden; }
.brands .lbl { text-align: center; margin-bottom: 16px; }
.marquee { display: flex; gap: 14px; width: max-content; animation: scroll 32s linear infinite; }
.brands:hover .marquee { animation-play-state: paused; }
@keyframes scroll { to { transform: translateX(-50%); } }
.brand-chip { display: flex; align-items: center; gap: 10px; padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-3); font-weight: 700; white-space: nowrap; }
.brand-chip .bm { width: 16px; height: 16px; border-radius: 4px; background: var(--bg-2); border: 1px solid var(--line); }

/* Directions grid 3×4 */
.dirs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .dirs { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .dirs { grid-template-columns: 1fr; } }
.dir { text-align: left; width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: border-color .15s, transform .15s, box-shadow .15s; }
.dir:hover { border-color: var(--line-2); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(21,23,28,0.07); }
.dir-photo { aspect-ratio: 4/3; position: relative; background: repeating-linear-gradient(45deg, var(--bg-2) 0 11px, #fff 11px 22px); display: grid; place-items: center; overflow: hidden; }
.dir-photo .dir-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.dir:hover .dir-img { transform: scale(1.06); }
.dir-photo .price { position: absolute; left: 12px; bottom: 12px; background: var(--ink); color: #fff; font-family: var(--fm); font-weight: 700; font-size: 12px; padding: 6px 11px; border-radius: 999px; }
.dir-body { padding: 16px 18px 18px; }
.dir-body .ix { font-family: var(--fm); font-size: 11px; color: var(--ink-3); font-weight: 700; }
.dir-body h3 { font-size: 16.5px; font-weight: 700; letter-spacing: -0.01em; margin: 4px 0 5px; }
.dir-body p { font-size: 13.5px; color: var(--ink-2); margin: 0 0 12px; }
.dir-body .go { font-size: 12.5px; font-weight: 700; color: var(--ink-3); display: inline-flex; gap: 6px; transition: color .15s, gap .15s; }
.dir:hover .go { color: var(--accent); gap: 9px; }

/* Stats */
.cap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
@media (max-width: 760px) { .cap { grid-template-columns: repeat(2, 1fr); } }
.cap > div { background: var(--bg-2); padding: 30px 22px; }
.cap .n { font-size: clamp(28px, 3vw, 38px); font-weight: 800; letter-spacing: -0.03em; }
.cap .l { color: var(--ink-2); font-size: 14px; margin-top: 6px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
@media (max-width: 820px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .steps { grid-template-columns: 1fr; } }
.step { border-top: 2px solid var(--ink); padding-top: 16px; }
.step .k { font-family: var(--fm); font-size: 12px; color: var(--ink-3); font-weight: 700; }
.step h4 { margin: 8px 0 6px; font-size: 16px; font-weight: 700; }
.step p { margin: 0; font-size: 14px; color: var(--ink-2); }

/* Delivery & payment */
.dp { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 720px) { .dp { grid-template-columns: 1fr; } }
.dp-card { border: 1px solid var(--line); border-radius: var(--r); padding: 28px; }
.dp-card h3 { margin: 0 0 14px; font-size: 18px; font-weight: 800; letter-spacing: -0.01em; }
.dp-card ul { list-style: none; margin: 0; padding: 0; }
.dp-card li { display: flex; gap: 11px; padding: 9px 0; font-size: 15px; color: var(--ink-2); border-bottom: 1px solid var(--line); }
.dp-card li:last-child { border-bottom: none; }
.dp-card li::before { content: ""; width: 6px; height: 6px; margin-top: 8px; flex: none; background: var(--accent); border-radius: 50%; }

/* Contact: form + details */
.contact-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 28px; }
.contact-grid.no-form { grid-template-columns: 1fr; max-width: 640px; }
@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; } }
.form { border: 1px solid var(--line); border-radius: var(--r); padding: 30px; background: var(--bg); }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .form .row2 { grid-template-columns: 1fr; } }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.field label .req { color: var(--accent); }
.field input, .field select, .field textarea { width: 100%; padding: 12px 13px; border: 1px solid var(--line-2); border-radius: var(--r-sm); font-size: 15px; background: var(--bg); transition: border-color .15s, box-shadow .15s; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field textarea { min-height: 96px; resize: vertical; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; color: var(--ink-3); margin: 4px 0 16px; }
.consent input { margin-top: 2px; }
.consent a { color: var(--ink-2); text-decoration: underline; }
.form-ok { display: none; padding: 14px; border: 1px solid var(--accent); background: var(--accent-soft); border-radius: var(--r-sm); font-weight: 600; font-size: 14px; margin-bottom: 14px; }

.info { display: flex; flex-direction: column; gap: 14px; }
.info .item { border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.info .item .k { font-size: 12px; color: var(--ink-3); font-weight: 700; margin-bottom: 4px; }
.info .item .v { font-weight: 700; }
.info .item .v.tel { font-family: var(--fm); }
.map { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; height: 200px; position: relative; background: var(--bg-2); display: grid; place-items: center; text-align: center; }
.map .stub { color: var(--ink-3); }
.map a.open { position: absolute; right: 12px; bottom: 12px; }

/* Drill-in (боковая панель направления) */
.ov { position: fixed; inset: 0; z-index: 80; display: none; }
.ov.open { display: block; }
.ov-bg { position: absolute; inset: 0; background: rgba(21,23,28,0.42); }
.ov-pan { position: absolute; right: 0; top: 0; height: 100%; width: min(680px, 100%); background: var(--bg); border-left: 1px solid var(--line-2); overflow-y: auto; padding: 30px 34px 64px; animation: sl .22s ease; }
@keyframes sl { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.ov-x { position: sticky; top: 0; float: right; margin: -8px -10px 0 0; width: 38px; height: 38px; border: 1px solid var(--line-2); border-radius: 50%; font-size: 18px; font-weight: 700; background: var(--bg); }
.ov-pan h2 { font-size: 28px; letter-spacing: -0.03em; font-weight: 800; margin: 8px 0 6px; }
.ov-price { font-family: var(--fm); font-weight: 700; color: var(--accent); margin-bottom: 6px; }
.ov-gal { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 20px 0 24px; }
.ov-gal .ph { aspect-ratio: 1; border: 1px solid var(--line); border-radius: var(--r-sm); background: repeating-linear-gradient(45deg, var(--bg-2) 0 10px, #fff 10px 20px); display: grid; place-items: center; overflow: hidden; }
.ov-gal .ph img { width: 100%; height: 100%; object-fit: cover; }
.ov-gal .ph .mono { color: var(--ink-3); }
.ov-sub { font-family: var(--fm); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; margin: 24px 0 12px; }
.ov-list { list-style: none; margin: 0; padding: 0; }
.ov-list li { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.ov-list li::before { content: ""; width: 7px; height: 7px; margin-top: 7px; flex: none; background: var(--accent); border-radius: 50%; }
.ov-grid-note { font-size: 13px; color: var(--ink-3); margin-top: 12px; padding: 12px 14px; border: 1px dashed var(--line-2); border-radius: var(--r-sm); }
.ov-pdf { margin-top: 14px; }
.ov-pdf:empty { display: none; }
.ov-cta { margin-top: 26px; }

/* Зум фото в галерее раздела при наведении */
.ov-gal .ph img { transition: transform .35s ease; }
.ov-gal .ph-zoom { cursor: zoom-in; }
.ov-gal .ph-zoom:hover img { transform: scale(1.08); }

/* ============================================================
   ЛАЙТБОКС (полноэкранный просмотр фото)
   ============================================================ */
.lb { position: fixed; inset: 0; z-index: 100; display: none; background: rgba(21,23,28,0.92); }
.lb.open { display: grid; grid-template-columns: auto 1fr auto; align-items: center; }
.lb-stage { grid-column: 2; height: 100vh; display: grid; place-items: center; padding: 24px; box-sizing: border-box; }
.lb-img { max-width: 100%; max-height: calc(100vh - 48px); object-fit: contain; border-radius: var(--r-sm); animation: lbIn .2s ease; }
.lb-x { position: absolute; top: 18px; right: 20px; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.3); background: rgba(255,255,255,0.08); color: #fff; font-size: 24px; font-weight: 700; line-height: 1; cursor: pointer; }
.lb-x:hover { background: rgba(255,255,255,0.18); }
.lb-nav { z-index: 2; width: 52px; height: 52px; margin: 0 14px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.3); background: rgba(255,255,255,0.08); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.lb-nav:hover { background: rgba(255,255,255,0.18); }
.lb-prev { grid-column: 1; }
.lb-next { grid-column: 3; }
.lb-count { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,0.82); font-family: var(--fm); font-size: 13px; letter-spacing: 0.04em; }
@keyframes lbIn { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: none; } }
@media (max-width: 560px) {
  .lb-nav { width: 44px; height: 44px; margin: 0 6px; font-size: 26px; }
  .lb-stage { padding: 12px; }
}

/* Галерея (между доставкой и контактами) */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 860px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 540px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
.gal-item { aspect-ratio: 4/3; border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--line); cursor: zoom-in; background: var(--bg-2); }
.gal-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.gal-item:hover img { transform: scale(1.06); }

/* Логотипы брендов в marquee */
.brand-chip .brand-logo { height: 20px; width: auto; max-width: 80px; object-fit: contain; border-radius: 2px; }

/* Секция «Полный каталог» (PDF) — между направлениями и статистикой */
.catalog-band { padding: 40px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-2); }
.catalog-band[hidden] { display: none; }
.catalog-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.catalog-in h2 { font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -0.03em; font-weight: 800; margin: 8px 0 0; }
.catalog-in .lead { color: var(--ink-2); max-width: 52ch; margin: 8px 0 0; }
.catalog-in .btn { flex: none; }

/* ============================================================
   ВНУТРЕННИЕ СТРАНИЦЫ (materials.html, requirements.html, юр-страницы)
   ============================================================ */

/* Hero внутренней страницы (компактнее главного) */
.subhero { padding: 64px 0 36px; border-bottom: 1px solid var(--line); }
.subhero h1 { font-size: clamp(32px, 5vw, 56px); letter-spacing: -0.035em; font-weight: 800; margin: 14px 0 16px; }
.subhero p { color: var(--ink-2); max-width: 62ch; font-size: 18px; margin: 0; }
.crumbs a { color: var(--ink-3); }
.crumbs a:hover { color: var(--ink); }

/* Контентная секция внутренней страницы (компактнее главной) */
.sec-sub { padding: 48px 0; }

/* Карточки материалов (materials.html) */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .grid { grid-template-columns: 1fr; } }
.card { border: 1px solid var(--line); border-radius: var(--r); padding: 24px; }
.card .sw { width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--line-2); margin-bottom: 14px; }
.card h3 { margin: 0 0 6px; font-size: 17px; font-weight: 700; }
.card p { margin: 0; font-size: 14px; color: var(--ink-2); }

/* Текстовый документ-список (requirements.html, юр-страницы) — узкая колонка для чтения */
.doc { max-width: 820px; }
.doc h2 { font-size: 22px; letter-spacing: -0.02em; font-weight: 800; margin: 34px 0 12px; }
.doc h2:first-child { margin-top: 0; }
.doc ul { padding-left: 0; list-style: none; margin: 0; }
.doc li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.doc li::before { content: ""; width: 7px; height: 7px; margin-top: 9px; flex: none; background: var(--accent); border-radius: 50%; }
.doc li b { font-weight: 700; }

/* Заметка-заглушка (dashed) */
.note { margin-top: 30px; padding: 16px 18px; border: 1px dashed var(--line-2); border-radius: var(--r-sm); color: var(--ink-3); font-size: 14px; }
