/* ═══════════════════════════════════════════════════════════════
   Витрина «Массив» - Derevo Group (Тенгиз Берая), этап 05 клуба.
   Тёплая рифма к «Монолиту» Стройки: та же структура токенов
   (--ease/--gut/--h1-h3), другая температура - жжёный дуб вместо
   мокрого камня, тёплый акцент вместо кедра. Материя и рука,
   самая тактильная страница клуба. Канон: transform/opacity,
   один сильный ход - кульминация «Укладка», без WebGL/видео.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --graphit: #191410;      /* жжёный дуб - не чистый чёрный */
  --graphit-lift: #221b15;
  --surface: #241d17;      /* плашка на графите */
  --ivory: #ece3d6;        /* слоновая кость - не чистый белый */
  --ivory-dim: #a89a89;
  --ivory-faint: #6e6355;
  --ember: #b8703a;        /* тлеющий уголь - единственный акцент */
  --ember-dp: #8f5426;
  --rule: #332921;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-heavy: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 180ms;
  --t-mid: 420ms;
  --gut: clamp(1.2rem, 4vw, 4rem);
  --max: 100rem;
  --h1: clamp(4.5rem, 17vw, 15rem);
  --h2: clamp(2.2rem, 4.5vw, 4.2rem);
  --h3: clamp(1.15rem, 1.2vw + 0.7rem, 1.6rem);
  --mono: ui-monospace, 'SF Mono', 'Roboto Mono', 'Cascadia Code', monospace;
}

* { margin: 0; box-sizing: border-box; }
html { scroll-behavior: auto; }
body {
  background: var(--graphit);
  color: var(--ivory);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: clip;
}

/* зерно: тот же рецепт, что на Стройке и Отделке - плотность 0.03-0.06 */
body::after {
  content: "";
  position: fixed; inset: -50%;
  z-index: 90;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
  animation: grain 9s steps(6) infinite;
}
@media (prefers-reduced-motion: reduce) { body::after { animation: none; } }
@keyframes grain {
  0%,100% { transform: translate(0,0); } 20% { transform: translate(-4%,3%); }
  40% { transform: translate(3%,-2%); } 60% { transform: translate(-2%,-4%); } 80% { transform: translate(4%,2%); }
}

/* заголовки - тяжёлый слэб-сериф Bitter: засечки рифмуются с врезкой и
   пазом столярного соединения, отличает витрину от гротесков соседей */
h1, h2, h3 { font-family: 'Bitter', Georgia, serif; font-weight: 800; letter-spacing: 0; line-height: 1.02; text-wrap: balance; }
h2 { font-size: var(--h2); }
h3 { font-size: var(--h3); font-weight: 600; }
a { color: inherit; }
img { display: block; max-width: 100%; }
.wrap { padding-left: var(--gut); padding-right: var(--gut); max-width: var(--max); margin-inline: auto; }
section { position: relative; padding: clamp(4rem, 9vw, 7.5rem) 0; }

/* ── появления по скроллу ── */
.rv { opacity: 0; transform: translateY(16px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1 !important; transform: none !important; transition: none !important; } }

/* ── клубная планка + шапка (общий паттерн витрин) ── */
.clubbar { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; justify-content: space-between; padding: 0.6rem var(--gut); font-size: 0.78rem; background: var(--surface); color: var(--ivory-dim); }
.clubbar a { color: var(--ivory); text-decoration: none; border-bottom: 1px solid rgba(236,227,214,0.3); }
/* переход по якорю меню не должен прятать заголовок под липкую шапку */
section[id] { scroll-margin-top: 5.5rem; }
.top { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem var(--gut); position: sticky; top: 0; z-index: 20; background: rgba(25,20,16,0.86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule); }
.top__logo { font-family: 'Bitter', serif; font-weight: 800; font-size: 1.2rem; text-decoration: none; letter-spacing: 0; display: flex; align-items: baseline; gap: 0.5rem; }
.top__logo i { color: var(--ember); font-style: normal; }
.top__club { font-size: 0.68rem; font-weight: 500; text-transform: lowercase; color: var(--ivory-faint); letter-spacing: 0.04em; }
.top__nav { display: flex; gap: clamp(0.8rem, 2vw, 1.8rem); font-size: 0.88rem; }
.top__nav a { text-decoration: none; color: var(--ivory-dim); transition: color var(--t-fast) var(--ease); }
.top__nav a:hover { color: var(--ivory); }
@media (max-width: 760px) { .top__nav { display: none; } }

/* ── 1. герой: массивный объект в темноте ── */
.hero { min-height: 92svh; display: flex; flex-direction: column; justify-content: flex-end; position: relative; overflow: clip; }
/* слайд-шоу героя - три реальных кадра компании (паркет с главной сайта,
   ванна из массива, дом в Комарово), кроссфейд только через opacity */
.hero__img { position: absolute; inset: 0; z-index: -2; }
.hero__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 38%; opacity: 0; transition: opacity 1400ms var(--ease); }
.hero__img img.is-active { opacity: 1; }
/* дерево ванны - главный аргумент кадра, не топим его в темноте.
   Лёгкая теплая дымка снизу вместо сплошного затемнения, читаемость
   текста держит тень букв (text-shadow), не подложка на всё фото */
.hero__img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(25,20,16,0) 0%, rgba(25,20,16,0.05) 60%, rgba(25,20,16,0.45) 100%); }
.hero__inner { position: relative; padding: 0 var(--gut) clamp(3rem, 7vw, 5.5rem); max-width: var(--max); margin: 0 auto; width: 100%; }
.hero__kicker { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ember); margin-bottom: 0.8rem; text-shadow: 0 2px 12px rgba(0,0,0,0.7); }

/* герой держит настоящую марку компании, не выдуманное слово -
   двухъярусная композиция повторяет пропорции реального логотипа
   Derevo Group (крупное слово / черта / трекинг помельче снизу) */
.hero__title--brand { display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; }
.hero__title-main { font-size: clamp(3.2rem, 10vw, 8rem); letter-spacing: 0.01em; text-transform: uppercase; }
.hero__title-rule { display: block; width: min(58%, 22rem); height: 2px; background: var(--ivory); opacity: 0.8; }
.hero__title-sub { font-size: clamp(1rem, 2vw, 1.7rem); font-weight: 500; letter-spacing: 0.42em; text-transform: uppercase; padding-left: 0.42em; }
.hero__title { font-size: var(--h1); line-height: 0.9; color: var(--ivory); text-shadow: 0 4px 30px rgba(0,0,0,0.55); }
.hero__lead { max-width: 42ch; color: var(--ivory-dim); font-size: 1.1rem; margin-top: 1.2rem; text-shadow: 0 2px 14px rgba(0,0,0,0.75); }
.hero__scroll { font-size: 0.85rem; color: var(--ivory-faint); margin-top: 1.6rem; font-family: var(--mono); letter-spacing: 0.04em; }

/* ── 2. полоса фактов (рифма к Стройке) ── */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; padding: clamp(2.4rem, 5vw, 4rem) var(--gut); background: var(--surface); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.facts > div { display: flex; flex-direction: column; gap: 0.3rem; }
.facts b { font-weight: 800; font-size: clamp(1.8rem, 3.2vw, 2.6rem); color: var(--ivory); font-variant-numeric: tabular-nums; }
.facts b i { font-style: normal; font-weight: 600; font-size: 0.55em; color: var(--ember); }
.facts span { font-size: 0.85rem; color: var(--ivory-dim); }
@media (max-width: 860px) { .facts { grid-template-columns: repeat(2, 1fr); } }

/* ── 3. три материала ── */
.trio__head { max-width: var(--max); margin: 0 auto 2.6rem; padding: 0 var(--gut); }
.trio__lede { max-width: 52ch; color: var(--ivory-dim); margin-top: 0.7rem; }
/* было: grid-template-columns 3fr 1fr 1fr с aspect-ratio на каждой карточке -
   узкие колонки считали свою высоту от своей же узкой ширины (3:4), широкая
   колонка «Дерево» - от своей широкой, строка растягивалась под самую
   высокую и под узкими карточками оставалась пустота. Теперь честный
   bento: «Дерево» держит явную высоту всей сетки на два ряда, «Металл» и
   «Камень» делят вторую колонку пополам - высота задана контейнером,
   не угадывается из aspect-ratio отдельных карточек. */
.trio__list { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); display: grid; grid-template-columns: 3fr 1fr; grid-template-rows: 1fr 1fr; gap: 1.2rem; height: clamp(420px, 46vw, 640px); }
.trio__item { position: relative; border-radius: 3px; overflow: hidden; background: var(--surface); }
.trio__item:nth-child(1) { grid-row: 1 / 3; }
.trio__item:nth-child(2) { grid-row: 1; }
.trio__item:nth-child(3) { grid-row: 2; }
.trio__item img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease-heavy); }
.trio__item:hover img { transform: scale(1.03); }
.trio__item::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(25,20,16,0.85) 100%); }
.trio__label { position: absolute; left: 1.2rem; bottom: 1.1rem; z-index: 1; font-family: var(--mono); font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ivory); }
.trio__label small { display: block; font-size: 0.7rem; color: var(--ivory-dim); font-weight: 400; margin-top: 0.2rem; text-transform: none; letter-spacing: 0.02em; }
@media (max-width: 760px) { .trio__list { grid-template-columns: 1fr; grid-template-rows: none; height: auto; gap: 0.9rem; } .trio__item, .trio__item:nth-child(1), .trio__item:nth-child(2), .trio__item:nth-child(3) { grid-row: auto; aspect-ratio: 16/10; } }

/* ── 4. порода и селекция ── */
.selection { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
/* исходник 1350px - на широкой колонке шире честного предела резкости,
   ограничиваем сверху, композиция не страдает */
.selection__photo { border-radius: 3px; overflow: hidden; max-width: 42rem; }
.selection__photo img { width: 100%; height: auto; }
.selection__list { display: flex; flex-direction: column; gap: 0.9rem; }
.selection__row { display: flex; align-items: baseline; gap: 1rem; padding-bottom: 0.9rem; border-bottom: 1px solid var(--rule); font-family: var(--mono); }
.selection__code { font-size: 0.78rem; color: var(--ember); min-width: 6.5ch; }
.selection__name { font-size: 0.95rem; color: var(--ivory); flex: 1; font-weight: 600; }
.selection__tone { font-size: 0.78rem; color: var(--ivory-faint); }
@media (max-width: 860px) { .selection { grid-template-columns: 1fr; } }

/* ── 5. старая сосна - пауза ── */
.pine { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2rem; }
.pine__kicker { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ember); }
.pine__title { font-size: clamp(1.8rem, 3.6vw, 3rem); max-width: 20ch; }
/* ширина упирается в честный предел резкости исходника (1280px, сеть
   ретины - 640 CSS px), не в композицию - шире исходник не тянем */
.pine__photo { width: min(100%, 40rem); border-radius: 3px; overflow: hidden; margin-top: 1rem; }
.pine__photo img { width: 100%; height: auto; }
.pine__cap { font-size: 0.9rem; color: var(--ivory-dim); max-width: 48ch; }

/* ── 6. кульминация: укладка ── */
.assembly { padding: 0; overflow: clip; }
.assembly__pin { position: relative; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem var(--gut); }
.assembly__head { text-align: center; margin-bottom: clamp(1.6rem, 4vw, 3rem); }
.assembly__head .h3 { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ember); }
.assembly__head h2 { margin-top: 0.6rem; }
.assembly__grid { position: relative; width: min(100%, 82rem); aspect-ratio: 16/9; }
/* гнёзда: столярная разметка места сборки, видна всегда, тише
   фрагментов - при заполнении тайлом их всё равно перекрывает */
.assembly__slot { position: absolute; border: 1px dashed rgba(236,227,214,0.14); background: repeating-linear-gradient(45deg, rgba(236,227,214,0.025) 0 2px, transparent 2px 16px); }
.assembly__slot::after { content: ''; position: absolute; top: 50%; left: 50%; width: 10px; height: 10px; transform: translate(-50%,-50%); border: 1px solid rgba(184,112,58,0.3); border-radius: 50%; }
@media (max-width: 760px) { .assembly__slot { display: none; } }
.assembly__tile { position: absolute; overflow: hidden; will-change: transform, opacity; z-index: 1; }
.assembly__tile img { width: 100%; height: 100%; object-fit: cover; }
.assembly__tile-cap { position: absolute; left: 0.8rem; bottom: 0.7rem; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ivory); text-shadow: 0 1px 6px rgba(0,0,0,0.6); opacity: 0; transition: opacity 300ms var(--ease); }
.assembly.is-settled .assembly__tile-cap { opacity: 0.85; }
@media (max-width: 760px) { .assembly__pin { min-height: auto; padding: 2rem var(--gut) 3rem; } .assembly__grid { aspect-ratio: 3/4; } }

/* ── 7. цех ── */
.factory { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.factory__text { display: flex; flex-direction: column; gap: 1rem; }
.factory__path { display: flex; align-items: center; gap: 0.8rem; font-family: var(--mono); font-size: 0.85rem; color: var(--ivory-dim); margin-top: 0.6rem; }
.factory__path b { color: var(--ember); font-weight: 600; }
.factory__photos { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.factory__photos img { border-radius: 3px; width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3/4; }
@media (max-width: 860px) { .factory { grid-template-columns: 1fr; } }

/* ── 8. частные интерьеры ── */
.private__head { max-width: var(--max); margin: 0 auto 2.4rem; padding: 0 var(--gut); }
.private__grid { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
.private__grid img { border-radius: 3px; width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; }
@media (max-width: 760px) { .private__grid { grid-template-columns: 1fr; } }

/* ── место в цепочке (общий паттерн клуба) ── */
.chain__list { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2rem; }
.chain__list a, .chain__list > span { display: flex; align-items: center; gap: 0.6rem; padding: 0.7rem 1.1rem; border: 1px solid var(--rule); border-radius: 100px; text-decoration: none; font-size: 0.9rem; transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease); }
.chain__list > span { opacity: 0.45; }
.chain__list a:hover { border-color: var(--ember); background: rgba(184,112,58,0.08); }
.chain__list a.is-here { background: var(--ember); color: var(--graphit); border-color: var(--ember); }
.chain__step { font-family: var(--mono); font-weight: 600; color: var(--ember); }
.chain__list a.is-here .chain__step { color: var(--graphit); }
.chain__cta { margin-top: 1.6rem; padding-top: 1.4rem; border-top: 1px solid var(--rule); font-size: 0.92rem; color: var(--ivory-dim); }
.chain__cta a { color: var(--ember); }

/* ── тенгиз берая: тот же формат портрета, что у Петрунькина/Сесёлкина
   на соседних витринах клуба - крупное фото, не иконка-аватар ── */
.chelovek { display: flex; gap: clamp(2rem, 5vw, 3.5rem); align-items: flex-start; max-width: var(--max); margin: 0 auto; padding: clamp(3rem, 7vw, 5.5rem) var(--gut); flex-wrap: wrap; }
.chelovek__portrait img { border-radius: 3px; display: block; box-shadow: 0 24px 50px -24px rgba(0,0,0,0.6); }
.chelovek__name { font-family: 'Bitter', Georgia, serif; font-weight: 700; font-size: 1.5rem; color: var(--ivory); margin-bottom: 0.35rem; }
.chelovek__role { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ember); margin-bottom: 1.1rem; }
.chelovek__text { color: var(--ivory-dim); max-width: 58ch; line-height: 1.65; }
@media (max-width: 640px) { .chelovek { flex-direction: column; align-items: center; text-align: center; } .chelovek__text { margin: 0 auto; } }

/* ── faq ── */
.faq__list { max-width: 70ch; margin: 0 auto; display: flex; flex-direction: column; }
.faq__item { padding: 1.4rem 0; border-bottom: 1px solid var(--rule); }
.faq__q { font-weight: 600; margin-bottom: 0.5rem; }
.faq__a { color: var(--ivory-dim); font-size: 0.95rem; }

/* ── контакт ── */
.contact { background: var(--surface); }
.contact__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.4rem; margin-top: 2rem; }
.contact__label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ivory-faint); margin-bottom: 0.4rem; font-family: var(--mono); }
.contact__val { font-weight: 600; }
.contact__val a { text-decoration: none; border-bottom: 1px solid rgba(236,227,214,0.3); }
.contact__val a:hover { border-color: var(--ivory); }
.contact__sub { display: block; font-size: 0.82rem; font-weight: 400; color: var(--ivory-dim); margin-top: 0.2rem; }

/* ── бланк заявки ── */
.zayavka { max-width: var(--max); margin: 2.8rem auto 0; padding: 0 var(--gut); padding-top: 2rem; border-top: 1px solid var(--rule); }
.zayavka__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; }
.zayavka__title { font-weight: 700; font-size: 1.15rem; }
.zayavka__num { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ivory-faint); }
.zayavka__rows { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.zayavka__row { display: flex; flex-direction: column; gap: 0.35rem; }
.zayavka__label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ivory-faint); font-family: var(--mono); }
.zayavka__input { font: inherit; font-size: 0.95rem; color: var(--ivory); background: transparent; border: none; border-bottom: 1px solid var(--rule); padding: 0.45rem 0; border-radius: 0; transition: border-color var(--t-fast) var(--ease); }
.zayavka__input::placeholder { color: var(--ivory-faint); opacity: 0.6; }
.zayavka__input:focus { outline: none; border-bottom-color: var(--ember); }
.zayavka__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.zayavka__consent { display: flex; align-items: flex-start; gap: 0.6rem; margin-top: 1.6rem; font-size: 0.82rem; color: var(--ivory-dim); max-width: 62ch; cursor: pointer; }
.zayavka__consent input { margin-top: 0.15rem; accent-color: var(--ember); flex-shrink: 0; }
.zayavka__consent a { color: var(--ivory); text-decoration: none; border-bottom: 1px solid rgba(236,227,214,0.35); }
.zayavka__submit { margin-top: 1.4rem; font: inherit; font-weight: 700; font-size: 0.95rem; color: var(--graphit); background: var(--ember); border: none; border-radius: 2px; padding: 0.85rem 1.8rem; cursor: pointer; transition: background var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease); }
.zayavka__submit:hover { background: #c9814a; }
.zayavka__submit:disabled { opacity: 0.5; cursor: default; }
.zayavka__err { margin-top: 0.9rem; font-size: 0.85rem; color: #d97a4a; min-height: 1.2em; }
.zayavka__ok { display: none; max-width: var(--max); margin: 2.8rem auto 0; padding: 0 var(--gut); padding-top: 2rem; border-top: 1px solid var(--rule); font-weight: 700; font-size: 1.05rem; }
.zayavka__ok.on { display: block; }
@media (max-width: 760px) { .zayavka__rows { grid-template-columns: 1fr; } .zayavka__submit { width: 100%; } }

/* ── kicker/lede общие ── */
.kicker { font-family: var(--mono); font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.8rem; color: var(--ember); }
.lede { max-width: 52ch; margin-top: 0.8rem; color: var(--ivory-dim); }

footer.foot { display: flex; flex-wrap: wrap; gap: 0.8rem 1.6rem; justify-content: space-between; align-items: center; padding: 1.6rem var(--gut); background: var(--surface); border-top: 1px solid var(--rule); font-size: 0.85rem; color: var(--ivory-dim); }
.foot__nav { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.foot__nav a { text-decoration: none; color: var(--ivory); border-bottom: 1px solid rgba(236,227,214,0.25); }

/* ── клубный слой: фоновое слово и выход на главную ── */
.club, .chain { position: relative; overflow: clip; }
.club-mark {
  position: absolute;
  left: 50%; bottom: -0.08em;
  transform: translateX(-50%);
  z-index: 0;
  font-family: Bitter, Georgia, serif;
  font-weight: 800;
  font-size: clamp(4rem, 13vw, 13rem);
  color: var(--ivory);
  opacity: 0.04;
  pointer-events: none; user-select: none; white-space: nowrap;
}
.club-home {
  position: relative; z-index: 1;
  display: inline-block; margin-top: 1.6rem;
  font-size: 0.9375rem; color: var(--ember);
  border-bottom: 1px solid rgba(184,112,58,0.4); padding-bottom: 2px;
  transition: color 300ms ease, border-color 300ms ease;
}
.club-home:hover { color: var(--ivory); border-color: var(--ivory); }
.club-home span { display: inline-block; transition: transform 200ms ease; }
.club-home:hover span { transform: translateX(4px); }


/* ── метка клуба в правом краю шапки: один вид на всех витринах ── */
.top__nav, .top nav { margin-left: auto; }

/* ── общий знак клуба в шапке витрины ──
   один и тот же на всех шести: контур дома в языке хаба плюс подпись.
   Цвет берём у шапки через currentColor, поэтому знак одинаково живёт и
   на тёмных витринах, и на светлой «Скандик». Переход - в том же окне:
   клуб это один проект */
.club-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  margin-left: clamp(0.8rem, 1.6vw, 1.4rem);
  align-self: center;
  text-decoration: none;
  color: inherit;
  opacity: 0.55;
  white-space: nowrap;
  transition: opacity 220ms ease;
}
.club-tag:hover { opacity: 1; }
.club-tag__mark {
  width: 1.35em; height: 1.12em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
}
.club-tag span {
  display: inline-flex; gap: 0.34em; align-items: baseline;
  font-size: 0.82rem; letter-spacing: 0.06em; text-transform: lowercase;
}
.club-tag span i { font-style: normal; opacity: 0.72; }
@media (max-width: 700px) { .club-tag span { display: none; } .club-tag__mark { width: 1.05em; height: 1.05em; } }

/* ── карточка участника целиком кликабельна ──
   ссылка стоит на display:contents, чтобы не ломать сетку карточки, но
   такой элемент не создаёт своего блока: не было ни курсора-руки, ни
   подсветки, карточка выглядела мёртвой. Растягиваем область клика
   псевдоэлементом на всю карточку и даём внятный отклик */
.chain__i { position: relative; }
.chain__link { display: contents; color: inherit; text-decoration: none; }
.chain__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: pointer;
  border: 1px solid transparent;
  transition: border-color 240ms ease, background-color 240ms ease;
}
.chain__i:hover .chain__link::after {
  border-color: currentColor;
  background: rgb(255 255 255 / 0.03);
}
.chain__link:focus-visible::after { border-color: currentColor; outline: 2px solid currentColor; outline-offset: 2px; }

@media (max-width: 760px) { .chain__step, .sezon__caption { font-size: 11px; } }

/* ── мобильная доводка: пальцевые цели ──
   замер показал ссылки высотой 17-27px, точки схем 11x11 - в такое трудно
   попасть пальцем. Норма 44px, добираем отступами, чтобы не менять вид */
@media (max-width: 760px) {
  .clubbar a, .foot a, .foot__nav a, .contact a, .kontakt a,
  .chelovek__links a, .club-home, .sem__link a, .lede a {
    display: inline-block;
    padding-block: 0.55rem;
    min-height: 44px;
  }
  .club-tag {
    min-width: 44px; min-height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
  }
  .club-tag__mark { width: 1.05em; height: 1.05em; }
  /* поля у края: текст не должен касаться границы экрана */
  h1, h2, h3, p, li { padding-inline: 0; }
  section > h2, section > p, .poryadok__title, .poryadok__cap { padding-inline: 0.2rem; }
}
@media (max-width: 760px) {
  /* поля формы и согласие: высота под палец */
  .zayavka__input, input[type=text], input[type=tel], input[type=email], textarea { min-height: 44px; padding-block: 0.7rem; }
  .zayavka__consent, label:has(input[type=checkbox]) { min-height: 44px; display: flex; align-items: center; gap: 0.6rem; }
  input[type=checkbox] { width: 22px; height: 22px; flex: none; }
}

/* ── мобильное меню: цвета витрины «Дерево групп» ── */
.mobmenu, .mobmenu__btn {
  --mm-bg: var(--graphit-lift);
  --mm-fg: var(--ivory);
  --mm-dim: var(--ivory-dim);
  --mm-accent: var(--ember);
  --mm-rule: rgb(236 227 214 / 0.14);
  --mm-scrim: rgb(0 0 0 / 0.55);
}

/* ── пальцевая цель: логотип шапки ── */
@media (max-width: 760px) {
  .top__logo { min-height: 44px; align-items: center; }
  /* флажок держим у первой строки: по центру многострочной метки он висел сам по себе */
  .zayavka__consent { align-items: flex-start; padding-block: 0.3rem; }
  .zayavka__consent input { width: 20px; height: 20px; margin-top: 0.15rem; }
}

/* ── заголовки на телефоне: последнее слово не остаётся одно в строке ── */
@media (max-width: 760px) {
  h2, h3 { text-wrap: balance; }
}

/* ── поля формы на телефоне: 16px ──
   Safari на iOS сам увеличивает страницу, когда фокус попадает в поле
   с кеглем меньше 16px, и вернуть масштаб пальцами уже сложно ── */
@media (max-width: 760px) {
  .zayavka__input, .zayavka input, .zayavka textarea, .zayavka select { font-size: 16px; }
}
