/* KATALIK-OPT · тёмное начало главной: герой, вступление, сетка групп.

   Перенос удачного начала из редизайна Codex (2026-09-11): крупная
   типографика с оранжевым акцентом, студийный кадр с круглой кнопкой,
   строка фактов, сетка семи групп каталога. Дальше страницы идёт прежний
   светлый дизайн — эти правила живут только внутри своих секций.

   Палитра и переменные — из base.css (.night даёт фон и цвет текста).
   Заголовки здесь набраны основным гротеском, не конденсом: в этом блоке
   характер даёт плотный набор с отрицательным трекингом, а не узость. */

/* ---------- герой ---------- */

/* шапка сайта фиксированная — герой начинается под ней */
.ed-hero { padding: 68px var(--pad) 0; }

.ed-hero__kicker {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 26px 0 22px;
  font-family: var(--f-mono); font-size: var(--t-label);
  letter-spacing: .08em; text-transform: uppercase;
  color: rgba(255, 255, 255, .55);
}
.ed-hero__kicker b { font-weight: 500; color: rgba(255, 255, 255, .8); }

.ed-hero__split {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 3.5vw; align-items: center; padding: 10px 0 36px;
}
.ed-hero__h {
  margin: 0 0 26px;
  font-family: var(--f-body);
  font-size: clamp(42px, 4.9vw, 88px);
  font-weight: 600; line-height: 1.0; letter-spacing: -.055em;
}
.ed-hero__h span { color: var(--flame); }
.ed-hero__txt p {
  margin: 0 0 26px; max-width: 420px;
  font-size: var(--t-lead); line-height: 1.6;
  color: rgba(255, 255, 255, .72);
}

.ed-link {
  display: inline-flex; align-items: center; gap: 28px;
  color: inherit; text-decoration: none;
  font-size: var(--t-body);
  border-bottom: 1px solid currentColor; padding-bottom: 8px;
  transition: color .2s, gap .25s;
}
.ed-link span { font-size: 24px; line-height: 1; }
.ed-link:hover { color: var(--flame); gap: 36px; }

/* кадр 3:2 целиком, без обрезки: пропорция рамки повторяет пропорцию фото */
.ed-hero__stage {
  position: relative; overflow: hidden; border-radius: 4px;
  aspect-ratio: 3 / 2; background: #151515;
}
.ed-hero__stage img {
  width: 100%; height: 100%; object-fit: cover; object-position: 60% 49%;
  display: block; transition: transform 1s ease; will-change: transform;
}
.ed-hero__stage:hover img { transform: scale(1.025); }
.ed-hero__stage::before {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(0, 0, 0, .28), transparent 45%);
}
/* тонкая чертёжная сетка поверх кадра — перекличка с размерами на фото */
.ed-hero__grid {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, transparent 32.9%, rgba(255,255,255,.07) 33%, transparent 33.15%,
      transparent 66.8%, rgba(255,255,255,.07) 66.9%, transparent 67.05%),
    linear-gradient(0deg, transparent 49.8%, rgba(255,255,255,.07) 50%, transparent 50.25%);
}

.ed-cta {
  position: absolute; right: 34px; bottom: 34px; z-index: 3;
  width: 142px; height: 142px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: var(--flame); color: #fff; text-decoration: none; text-align: center;
  font-family: var(--f-body); font-size: 15px; line-height: 1.25;
  transition: transform .3s, background .3s;
}
.ed-cta b { font-weight: 400; font-size: 28px; }
.ed-cta:hover { transform: rotate(-8deg); background: var(--flame-d); }

.ed-hero__facts {
  display: grid; grid-template-columns: repeat(3, 1fr) 1.2fr;
  gap: 20px; padding: 28px 0 34px;
  border-bottom: 1px solid var(--line-n2);
}
.ed-hero__facts > div { display: flex; align-items: center; gap: 15px; }
.ed-hero__facts strong {
  font-size: clamp(22px, 2.4vw, 34px); font-weight: 500;
  letter-spacing: -.04em; white-space: nowrap;
}
.ed-hero__facts span {
  font-size: var(--t-xs); line-height: 1.45; max-width: 120px;
  color: rgba(255, 255, 255, .55);
}
.ed-hero__facts > a { justify-self: end; align-self: center; }

/* ---------- вступление ---------- */

.ed-intro { padding: 96px var(--pad) 46px; }
.ed-intro h2 {
  margin: 0 0 34px;
  font-family: var(--f-body);
  font-size: clamp(34px, 4.6vw, 70px);
  font-weight: 600; line-height: 1.05; letter-spacing: -.05em;
}
.ed-intro h2 span { color: rgba(255, 255, 255, .45); }
.ed-intro__row {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 40px;
}
.ed-intro__row p {
  margin: 0; max-width: 520px;
  font-size: var(--t-lead); line-height: 1.65;
  color: rgba(255, 255, 255, .72);
}
.ed-intro__row .ed-link { white-space: nowrap; }

/* ---------- сетка групп ---------- */

.ed-groups {
  padding: 0 var(--pad) 90px;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px;
}
.ed-group {
  display: block; padding: 24px; overflow: hidden;
  background: var(--night-3); color: #E9EBED;
  border: 1px solid rgba(255, 255, 255, .09); border-radius: 4px;
  text-decoration: none;
  transition: transform .3s, border-color .3s;
}
.ed-group:hover { transform: translateY(-7px); border-color: rgba(255, 255, 255, .22); }
.ed-group__top {
  display: flex; justify-content: flex-end;
  font-size: 26px; line-height: 1; color: rgba(255, 255, 255, .45);
}
.ed-group__ph {
  height: 215px; display: flex; align-items: center; justify-content: center;
  background: var(--night-2); border-radius: 3px; margin-top: 6px;
}
.ed-group__ph img {
  width: 100%; height: 100%; object-fit: contain;
  transition: transform .6s ease;
}
.ed-group:hover .ed-group__ph img { transform: rotate(-6deg) scale(1.07); }
/* Реальные кадры склада вместо сгенерированных рендеров. Подложка в тон
   фона фото, поэтому кадр сливается с плиткой; поворот на наведении
   убран — квадрат кадра не должен крениться. */
.ed-group__ph--real { background: var(--photo); overflow: hidden; }
.ed-group:hover .ed-group__ph--real img { transform: scale(1.05); }
.ed-group__ph--scheme img { width: 86%; height: auto; }
.ed-group h3 {
  margin: 16px 0 10px;
  font-family: var(--f-body);
  font-size: clamp(20px, 1.9vw, 27px);
  font-weight: 600; letter-spacing: -.035em; line-height: 1.1;
}
.ed-group p {
  margin: 0; font-size: var(--t-xs); line-height: 1.65;
  color: rgba(255, 255, 255, .55);
}
/* семь карточек в сетке на четыре колонки: последняя закрывает ряд */
.ed-group:last-child { grid-column: span 2; }

/* ---------- ужимка ---------- */

@media (max-width: 1100px) {
  .ed-hero__facts > div { display: block; }
  .ed-hero__facts span { display: block; max-width: none; margin-top: 5px; }
  .ed-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ed-group:last-child { grid-column: span 2; }
}
@media (max-width: 760px) {
  .ed-hero__split { grid-template-columns: 1fr; gap: 26px; padding-bottom: 26px; }
  .ed-hero__h { font-size: clamp(38px, 10vw, 56px); letter-spacing: -.045em; margin-bottom: 18px; }
  .ed-hero__txt p { max-width: none; margin-bottom: 18px; }
  .ed-cta { width: 116px; height: 116px; right: 18px; bottom: 20px; font-size: 13.5px; }
  .ed-cta b { font-size: 24px; }
  .ed-hero__facts { grid-template-columns: repeat(3, 1fr); gap: 18px 10px; }
  .ed-hero__facts strong { font-size: 24px; }
  .ed-hero__facts > a {
    grid-column: 1 / -1; justify-self: start;
    border-top: 1px solid var(--line-n2); padding-top: 16px; width: 100%;
  }
  .ed-intro { padding: 56px var(--pad) 30px; }
  .ed-intro__row { display: block; }
  .ed-intro__row .ed-link { margin-top: 22px; }
  .ed-groups { padding-bottom: 56px; }
  .ed-group { padding: 16px; }
  .ed-group__ph { height: 150px; }
}
@media (max-width: 480px) {
  .ed-groups { grid-template-columns: 1fr; }
  .ed-group:last-child { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .ed-hero__stage img, .ed-group__ph img, .ed-cta, .ed-group { transition: none; }
}
