/* ==========================================================================
   IMINERA Avatar, 0.1 «Лаборатория Iminera», тёмный: hub.css
   Только секции хаба: 1 hero · 2 выбор направления (.choose, .choice) · 3 «Почему» (.why).
   Подстраницы этот файл НЕ подключают. Общие токены, кнопки, шапка, форма и футер лежат
   в styles.css, движение (hover, reveal, переходы) в effects.css.
   Здесь описано СТАТИЧНОЕ состояние: именно его видят без JS, на тач-экранах
   и при prefers-reduced-motion. Mobile-first: база для 360 px.
   ========================================================================== */

/* ---------- 1. Hero ---------- */
.hero {
  padding-top: clamp(2rem, 5vw, 4rem);
  padding-bottom: clamp(3rem, 7vw, 6rem);
  overflow-x: clip;
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}
.hero__copy { max-width: 40rem; }
.hero__title { margin-top: 20px; }
.hero__lead {
  max-width: 34rem;
  margin-top: 24px;
  font-size: 1.0625rem;
  color: var(--text-soft);
}

.hero__bullets {
  display: grid;
  gap: 12px;
  margin: 32px 0 0;
  padding-top: 24px;
  list-style: none;
  border-top: 1px solid var(--line-d);
}
.hero__bullets li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: .9375rem;
  line-height: 1.45;
  color: var(--text);
}
.hero__bullet-icon {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.4;
}
.hero__bullet-icon circle { stroke-opacity: .55; }
.hero__bullet-icon path { stroke-linecap: round; stroke-linejoin: round; }

/* Фигура: тёплая «сцена» под фото. Светлая стена умножается на неё и маскируется по краям,
   поэтому растворяется в тёмном hero. --reveal (0..1) ведёт проявление (effects.css). */
.hero__figure {
  --reveal: 1;
  position: relative;
  isolation: isolate;
  overflow: clip;
  aspect-ratio: 3 / 4;
  width: 100%;
  max-width: 440px;
  margin-inline: auto;
  background: radial-gradient(ellipse 50% 45% at 50% 46%, #A08A72 0%, #5E4D3E 52%, var(--bg) 100%);
}
.hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: multiply;
  filter: brightness(calc(.5 + .6 * var(--reveal))) contrast(1.08);
  -webkit-mask-image: radial-gradient(ellipse calc(32% + 17% * var(--reveal)) calc(38% + 22% * var(--reveal)) at 50% 52%, #000 62%, transparent 100%);
  mask-image: radial-gradient(ellipse calc(32% + 17% * var(--reveal)) calc(38% + 22% * var(--reveal)) at 50% 52%, #000 62%, transparent 100%);
}

/* Слой мерных линий: viewBox 960 x 1280 равен пропорциям фото */
.hero__marks {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.mark__frame,
.mark__ruler {
  fill: none;
  stroke: var(--text-soft);
  stroke-width: 1px;
  vector-effect: non-scaling-stroke;
}
.mark__frame { stroke-opacity: .55; }
.mark__ruler { stroke-opacity: .5; }
.mark { pointer-events: none; }
.mark__girth,
.mark__lead,
.mark__ring {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1px;
  vector-effect: non-scaling-stroke;
}
.mark__girth { stroke-opacity: .85; stroke-dasharray: 3 4; }
.mark__lead { stroke-opacity: .9; }
.mark__ring { stroke-opacity: .5; }
.mark__dot { fill: var(--accent); }

.hero__labels {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  pointer-events: none;
}
.mark-label {
  position: absolute;
  right: 2%;
  font-size: clamp(10px, 2.9vw, 12px);
  line-height: 1.25;
  letter-spacing: .04em;
  white-space: nowrap;
  text-align: right;
}
.mark-label strong {
  position: relative;
  font-weight: 500;
  color: var(--text);
}
/* Положение подписи: доля высоты кадра = y / 1280 у линии выноски. Обычно подпись стоит НАД линией
   (bottom = 100% - y + 6px), у плеча ПОД линией (top = y + 6px), чтобы не слипаться с подписью шеи. */
.mark-label--neck { bottom: calc(69.7% + 6px); }
.mark-label--shoulder { top: calc(34.06% + 6px); }
.mark-label--bust { bottom: calc(53.9% + 6px); }
.mark-label--waist { bottom: calc(41.56% + 6px); }
.mark-label--hips { bottom: calc(24.6% + 6px); }

/* Точки замера: кнопки над точками фото. left/top = x / 960 и y / 1280 центра кружка в SVG.
   Без JS списка нет: кнопка без действия вводила бы в заблуждение. */
.hero__pts { display: none; }
.js-ready .hero__pts {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: block;
  margin: 0;
  padding: 0;
  list-style: none;
  pointer-events: none;
}
.mark-pt {
  position: absolute;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  padding: 0;
  color: var(--accent);
  background: none;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}
.mark-pt::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: 0;
  transform: scale(.7);
}
.mark-pt:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 0;
}
.mark-pt--neck { left: 57.4%; top: 30.3%; }
.mark-pt--shoulder { left: 68.96%; top: 34.06%; }
.mark-pt--bust { left: 67.5%; top: 46.1%; }
.mark-pt--waist { left: 62.8%; top: 58.4%; }
.mark-pt--hips { left: 68.96%; top: 75.4%; }

/* Счётчик «36 мерок»: слева сверху, на тёмном поле кадра. Итог 36 лежит в HTML. */
.hero__count {
  position: absolute;
  left: 8%;
  top: 6.5%;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 0;
  pointer-events: none;
}
.hero__count-num {
  display: block;
  min-width: 2ch;
  font-family: var(--font-head);
  font-size: clamp(2.75rem, 12vw, 4.25rem);
  font-weight: 300;
  font-variant-numeric: lining-nums tabular-nums;
  line-height: .9;
  letter-spacing: -.01em;
  color: var(--text);
}
.hero__count-bar {
  display: block;
  width: 3.5rem;
  height: 1px;
  margin: 10px 0 8px;
  background: var(--line-d);
}
.hero__count-bar i {
  display: block;
  height: 100%;
  background: var(--accent);
  transform-origin: 0 50%;
}
.hero__count-cap {
  font-size: .6875rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-soft);
}

/* линия «сканера» включается только в effects.css */
.hero__scan { display: none; }

@media (min-width: 1024px) {
  .hero__grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    column-gap: clamp(2rem, 5vw, 5rem);
  }
  /* колонка уже, чем в мобильной вёрстке, поэтому h1 чуть мельче базового clamp */
  .hero__title { font-size: clamp(3rem, 4.7vw, 4.75rem); }
  .hero__figure {
    max-width: 480px;
    margin-inline: auto 0;
  }
}

/* ---------- 2. Выбор направления (кремовый) ----------
   Статика: вертикальный стек карточек, у каждой иллюстрация, номер, заголовок, описание и кнопка.
   Раскрытие (Expando Grid) на широком экране включает effects.css. */
.choose__grid {
  --choose-gap: 12px;
  --choice-pad: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--choose-gap);
  margin: clamp(2.5rem, 6vw, 4rem) 0 0;
  list-style: none;
}
.choose__item {
  display: flex;
  min-width: 0;
}

/* Цвета карточки живут в --c-*: у раскрытой карточки effects.css подменяет их на тёмные */
.choice {
  --c-fg: var(--ink);
  --c-soft: var(--ink-soft);
  --c-line: var(--line-l);
  --c-line-strong: rgba(31, 27, 23, .5);
  --c-bg: var(--cream-2);
  --c-accent: var(--accent-dark);

  position: relative;
  isolation: isolate;
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "num art"
    "body body";
  align-content: start;
  gap: 20px;
  min-width: 0;
  padding: var(--choice-pad);
  color: var(--c-fg);
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
}

.choice__num {
  grid-area: num;
  font-family: var(--font-head);
  font-size: clamp(3.5rem, 12vw, 4.5rem);
  font-weight: 300;
  font-style: italic;
  font-variant-numeric: lining-nums;
  line-height: .9;
  color: var(--c-soft);
}

.choice__art {
  grid-area: art;
  width: 6.5rem;
  color: var(--c-fg);
}
.art {
  width: 100%;
  height: auto;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.art__thin { stroke-width: 1.1; stroke-opacity: .6; }
.art__axis { stroke-width: 1; stroke-opacity: .4; stroke-dasharray: 2 5; }
.art__floor { stroke-width: 1; stroke-opacity: .4; stroke-dasharray: 1 4; }
.art__stitch { stroke-width: 1.2; stroke-opacity: .7; stroke-dasharray: 3 4; }
.art__frame { stroke-width: 1.2; stroke-opacity: .55; }
.art__tape { stroke: var(--c-accent); stroke-width: 1.2; }
.art__ticks { stroke: var(--c-accent); stroke-width: 7; stroke-dasharray: 1 5; stroke-opacity: .75; }
.art__nodes circle { fill: var(--c-accent); stroke: none; }

.choice__body {
  grid-area: body;
  min-width: 0;
}
.choice__title {
  font-size: clamp(1.75rem, 6.5vw, 2.25rem);
  font-weight: 400;
  line-height: 1.1;
}
.choice__text {
  margin-top: 14px;
  font-size: .9375rem;
  line-height: 1.6;
  color: var(--c-soft);
}
.choice__cta {
  margin-top: 24px;
  color: #fff;
  background: var(--accent-dark);
}
.choice__cta:hover { background: var(--accent-darker); }
/* вся карточка кликабельна: ссылка растянута на карточку */
.choice__cta::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}
.choice__cta:focus-visible { outline: 0; }
.choice:has(.choice__cta:focus-visible) {
  outline: 2px solid var(--s-focus);
  outline-offset: 3px;
}
.choice__domain {
  margin-top: 10px;
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .1em;
  color: var(--c-soft);
}

/* от 640 до 1023: иллюстрация слева, текст справа */
@media (min-width: 640px) {
  .choose__grid { --choose-gap: 16px; --choice-pad: 28px; }
  .choice {
    grid-template-columns: 9rem minmax(0, 1fr);
    grid-template-areas:
      "num body"
      "art body";
    column-gap: 32px;
    align-content: stretch;
  }
  .choice__art {
    align-self: end;
    width: 100%;
    max-width: 9rem;
  }
}

/* от 1024: три колонки, карточка вертикальная: номер, иллюстрация, текст */
@media (min-width: 1024px) {
  .choose__grid {
    --choice-pad: clamp(24px, 2.4vw, 36px);
    --choose-gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    container-type: inline-size;
  }
  .choice {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "num"
      "art"
      "body";
    /* номер и иллюстрация по высоте содержимого, весь остаток уходит тексту:
       заголовки и описания у трёх карточек начинаются на одной линии, кнопки лежат внизу */
    grid-template-rows: auto auto 1fr;
    row-gap: 0;
    min-height: 40rem;
    padding-bottom: calc(var(--choice-pad) + 24px);
  }
  .choice__body {
    display: flex;
    flex-direction: column;
  }
  .choice__text { margin-bottom: 24px; }
  .choice__cta {
    align-self: flex-start;
    margin-top: auto;
  }
  /* адрес внешнего сайта: в нижнем поле карточки, чтобы не сдвигать кнопку */
  .choice__domain {
    position: absolute;
    left: var(--choice-pad);
    bottom: 14px;
    margin: 0;
  }
  .choice__num { font-size: clamp(4rem, 5.5vw, 5.5rem); }
  .choice__art {
    align-self: center;
    justify-self: center;
    width: clamp(8rem, 12vw, 11.5rem);
    max-width: none;
    margin-block: 24px;
  }
  /* две строки под заголовок у всех карточек: описания начинаются на одной линии */
  .choice__title {
    min-height: 2.2em;
    font-size: clamp(1.75rem, 2.4vw, 2.375rem);
  }
  /* Ширина текста равна ширине сжатой карточки (сумма долей 3.3 при раскрытии 1.3):
     так строки не перестраиваются, пока колонки меняют размер. */
  .choice__body {
    width: min(100%, calc((100cqw - 2 * var(--choose-gap)) / 3.3 - 2 * var(--choice-pad)));
  }
}

/* ---------- 3. «Почему бренды выбирают Iminera» (тёмный) ----------
   Статика: у каждой карточки номер, заголовок и описание одним столбцом.
   Hover-режим Card Hover включает effects.css (мышь, без reduced-motion). */
.why__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin: clamp(2.5rem, 6vw, 4rem) 0 0;
  list-style: none;
}
.why__card {
  position: relative;
  display: flex;
  min-width: 0;
  background: var(--bg-2);
  border: 1px solid var(--s-line);
}
.why__inner {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
}
.why__top {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 24px 24px 12px;
  background: var(--bg-3);
}
.why__num {
  font-family: var(--font-head);
  font-size: 2rem;
  font-style: italic;
  font-variant-numeric: lining-nums;
  line-height: 1;
  color: var(--text-soft);
}
.why__title {
  font-size: clamp(1.625rem, 2.4vw, 2rem);
  font-weight: 400;
  line-height: 1.12;
}
.why__more {
  flex: 1 1 auto;
  padding: 16px 24px 28px;
  background: var(--bg-2);
}
.why__text {
  font-size: .9375rem;
  line-height: 1.65;
  color: var(--text-soft);
}

@media (min-width: 640px) {
  .why__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  /* пять обычных карточек в двух колонках оставили бы пустую ячейку: пятая занимает ряд целиком */
  .why__card:nth-child(5) { grid-column: 1 / -1; }
}
@media (min-width: 1024px) {
  /* шесть линий: ряд 1 = три карточки по две линии, ряд 2 = две по три, ряд 3 = плашка на всю ширину */
  .why__grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 20px;
  }
  .why__card { grid-column: span 2; }
  .why__card:nth-child(n + 4):nth-child(-n + 5) { grid-column: span 3; }
}

/* ---------- 3a. Плашка «Опыт 23 года» (шестая карточка) ----------
   Кремовая плашка на всю ширину сетки: слева заголовок, справа три счётчика Cormorant.
   Итоговые значения лежат в HTML. Счёт и линию включает effects.js (is-counting). */
.why__card--stat {
  grid-column: 1 / -1;
  color: var(--ink);
  background: var(--cream);
  border-color: var(--cream);
}
.why__card--stat::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 100%;
  height: 2px;
  background: var(--accent-dark);
  transform-origin: 0 50%;
}
.stat {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  min-width: 0;
  padding: 36px 24px 28px;
}
.stat__head { min-width: 0; }
.stat__head .why__num { color: var(--ink-soft); }
.stat__title {
  margin-top: 20px;
  font-size: clamp(2rem, 4.4vw, 3rem);
  font-weight: 400;
  line-height: 1.05;
}
.stat__lead {
  max-width: 24rem;
  margin-top: 14px;
  font-size: .9375rem;
  line-height: 1.6;
  color: var(--ink-soft);
}
.stat__list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
}
.stat__item {
  min-width: 0;
  padding: 20px 0;
  border-top: 1px solid var(--line-l);
}
.stat__value {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: .5rem;
  margin: 0;
  font-family: var(--font-head);
  line-height: .95;
}
.stat__num {
  display: inline-block;
  min-width: 1.1ch;
  font-size: clamp(3.5rem, 5.4vw, 5.25rem);
  font-weight: 300;
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: -.015em;
  color: var(--ink);
}
.stat__plus {
  margin-left: -.42rem; /* прижимает «+» к числу: между flex-элементами стоит column-gap */
  font-size: clamp(3.5rem, 5.4vw, 5.25rem);
  font-weight: 300;
  line-height: .95;
  color: var(--accent-dark);
}
.stat__unit {
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  font-style: italic;
  font-weight: 400;
  color: var(--accent-dark);
}
.stat__cap {
  max-width: 15rem;
  margin: 12px 0 0;
  font-size: .875rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

@media (min-width: 640px) {
  .stat { padding: 40px 32px 32px; }
  .stat__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat__item { padding: 4px 20px; border-top: 0; border-left: 1px solid var(--line-l); }
  .stat__item:first-child { padding-left: 0; border-left: 0; }
  .stat__num,
  .stat__plus { font-size: clamp(2.75rem, 6.4vw, 4rem); }
}
@media (min-width: 1024px) {
  .stat {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    align-items: end;
    column-gap: 48px;
    padding: 56px 48px 48px;
  }
  .stat__num,
  .stat__plus { font-size: clamp(3.5rem, 5.4vw, 5.25rem); }
  .stat__item { padding: 4px 24px; }
}
