/* ==========================================================================
   IMINERA Avatar, K1 «Эталон»: sections.css (шаг 2: остальные секции)
   Содержание: 1 токены · 2 evolution · 3 pilot · 4 not-just-scan · 5 samples
   6 why · 7 form · 8 футер · 9 reduced motion
   Темы секций (--s-bg, --s-fg, --s-soft, --s-line, --s-focus) приходят из styles.css.
   Секции tasks и ladder (слоты шага 3) стилизуются в effects.css.
   Mobile-first: базовые стили для 360 px, расширения через min-width.
   ========================================================================== */

/* ---------- 1. Токены шага 2 ---------- */
:root {
  --evo-gap: 12px;
  --sticky-top: calc(var(--header-h) + 32px);
}

/* Липкая левая колонка (как .fit__head в styles.css) только на широком экране */
@media (min-width: 1024px) {
  .pilot__head,
  .samples__head,
  .contact__head {
    position: sticky;
    top: var(--sticky-top);
  }
}

/* Подчёркнутые ссылки-контакты в секциях (на тёмной и кремовой теме) */
.contact__links a,
.footer__contacts a,
.footer__links a {
  color: var(--s-fg);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  text-decoration-color: var(--s-line-strong);
  transition: text-decoration-color .18s var(--ease), color .18s var(--ease);
}
.contact__links a:hover,
.footer__contacts a:hover,
.footer__links a:hover {
  text-decoration-color: currentColor;
}

/* ---------- 2. Evolution (тёмный) ---------- */
.evo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px var(--evo-gap);
  margin: clamp(2.5rem, 6vw, 4rem) 0 0;
  list-style: none;
}
.evo__fig {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Светлая подложка: евековские кадры на белом, поэтому кладём их на --cream.
   У кадров прозрачный фон, подложка видна целиком. */
.evo__card {
  position: relative;
  aspect-ratio: 2 / 3;
  background: var(--cream);
}
.evo__card img {
  width: 100%;
  height: 100%;
  padding: 6% 4%;
  object-fit: contain;
}
/* четвёртый кадр: своё фото, без подложки и плашки */
.evo__card--own img {
  padding: 0;
  object-fit: cover;
  object-position: 50% 28%;
}

/* Подпись с «линией пути»: тонкая линия и точка над каждым шагом, у последнего акцентные */
.evo__fig figcaption {
  position: relative;
  display: grid;
  gap: 6px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--s-line);
}
.evo__fig figcaption::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 0;
  width: 7px;
  height: 7px;
  background: var(--s-bg);
  border: 1px solid var(--s-line-strong);
  border-radius: 50%;
}
.evo__item--own figcaption { border-top-color: var(--accent); }
.evo__item--own figcaption::before {
  background: var(--accent);
  border-color: var(--accent);
}
.evo__num {
  font-family: var(--font-head);
  font-size: 1rem;
  font-style: italic;
  font-variant-numeric: lining-nums;
  line-height: 1;
  color: var(--s-soft);
}
.evo__name {
  font-family: var(--font-head);
  font-size: 1.375rem;
  line-height: 1.2;
  color: var(--s-fg);
}
.evo__text {
  font-size: .8125rem;
  line-height: 1.55;
  color: var(--s-soft);
}

.evo__verdict {
  display: grid;
  gap: 20px;
  margin-top: clamp(3rem, 7vw, 5rem);
  padding-top: clamp(1.75rem, 4vw, 2.5rem);
  border-top: 1px solid var(--s-line);
}
.evo__statement {
  font-family: var(--font-head);
  font-size: clamp(1.75rem, 3.4vw, 2.75rem);
  font-weight: 300;
  font-variant-numeric: lining-nums;
  line-height: 1.15;
  text-wrap: balance;
}
.evo__statement em { font-style: italic; }
.evo__note {
  max-width: 32rem;
  color: var(--s-soft);
}

@media (min-width: 768px) {
  .evo {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0 20px;
  }
  .evo__name { font-size: 1.5rem; }
}
@media (min-width: 1024px) {
  .evo { column-gap: 32px; }
  .evo__text { font-size: .875rem; }
  .evo__verdict {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 4rem;
    align-items: end;
  }
}

/* ---------- 3. Pilot (кремовый) ---------- */
.pilot__terms {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 48px;
  margin: 32px 0;
  padding-block: 20px;
  border-block: 1px solid var(--s-line);
}
.pilot__term dt {
  font-size: .6875rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--s-soft);
}
.pilot__term dd {
  margin-top: 6px;
  font-family: var(--font-head);
  font-size: 1.75rem;
  font-variant-numeric: lining-nums;
  line-height: 1.2;
}

.pilot__main { min-width: 0; }
.pilot__sub {
  font-size: 1.5rem;
  font-style: italic;
  font-weight: 400;
}
.pilot__sub--steps { margin-top: clamp(2.5rem, 6vw, 3.5rem); }

.kit {
  margin: 16px 0 0;
  list-style: none;
  border-bottom: 1px solid var(--s-line);
}
.kit li {
  display: grid;
  gap: 4px;
  padding-block: 20px;
  border-top: 1px solid var(--s-line);
}
.kit__name {
  font-family: var(--font-head);
  font-size: 1.375rem;
  line-height: 1.25;
  color: var(--s-fg);
}
.kit__text { color: var(--s-soft); }

.steps {
  margin: 16px 0 0;
  list-style: none;
  border-bottom: 1px solid var(--s-line);
}
.step {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  gap: 12px;
  padding-block: 22px;
  border-top: 1px solid var(--s-line);
}
.step__num {
  font-family: var(--font-head);
  font-size: 1.75rem;
  font-style: italic;
  font-variant-numeric: lining-nums;
  line-height: 1;
  color: var(--s-soft);
}
.step__title {
  font-family: var(--font-head);
  font-size: 1.375rem;
  line-height: 1.25;
  color: var(--s-fg);
}
.step__text {
  margin-top: 6px;
  color: var(--s-soft);
}

@media (min-width: 640px) {
  .kit li {
    grid-template-columns: 14rem minmax(0, 1fr);
    gap: 24px;
    align-items: baseline;
  }
}
@media (min-width: 768px) {
  .steps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 32px;
  }
}

/* ---------- 4. Not-just-scan (тёмный) ---------- */
.scan__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 4rem);
  align-items: center;
}
.scan__text {
  max-width: 38rem;
  margin-top: 28px;
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.7;
  color: var(--s-fg);
}
.scan__body h2 { margin-top: 20px; }

/* слева контур из точек (цифры), справа сплошная линия (фигура) */
.scan__art {
  width: min(100%, 220px);
  height: auto;
  justify-self: start;
  color: var(--s-soft);
}
.scan__dots {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-dasharray: .1 7;
}
.scan__solid {
  fill: none;
  stroke: var(--s-fg);
  stroke-width: 1.2;
}
.scan__rings {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1;
  stroke-opacity: .8;
}

@media (min-width: 1024px) {
  .scan__grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: clamp(4rem, 7vw, 7rem);
  }
  .scan__art {
    width: min(100%, 260px);
    justify-self: center;
  }
}

/* ---------- 5. Samples (кремовый) ---------- */
.sample-list {
  margin: 0;
  list-style: none;
  border-bottom: 1px solid var(--s-line);
}
.sample {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding-block: 28px;
  border-top: 1px solid var(--s-line);
}
.sample__thumb {
  width: 72px;
  height: 72px;
  color: var(--s-soft);
  background: var(--cream-2);
  border: 1px solid var(--s-line);
}
.sample__thumb path,
.sample__thumb rect {
  fill: none;
  stroke: currentColor;
  stroke-width: 1px;
  vector-effect: non-scaling-stroke;
}
.sample__thumb .dot { fill: var(--accent-dark); }
.sample__body { min-width: 0; }
.sample__text {
  max-width: 32rem;
  margin-top: 8px;
  color: var(--s-soft);
}
/* длинная подпись неактивной кнопки переносится по словам */
.sample__btn {
  width: 100%;
  max-width: 22rem;
  margin-top: 18px;
  padding-block: 12px;
  font-size: .8125rem;
  line-height: 1.35;
  white-space: normal;
}
@media (min-width: 640px) {
  .sample {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 28px;
    padding-block: 36px;
  }
  .sample__thumb {
    width: 104px;
    height: 104px;
  }
}

/* ---------- 6. Why (тёмный) ---------- */
.why__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 4rem);
}
.why__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: clamp(2rem, 5vw, 3rem) 0 0;
  list-style: none;
  border-top: 1px solid var(--s-line);
}
.why__facts li {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 22px 16px 26px 0;
  border-bottom: 1px solid var(--s-line);
}
.why__facts li:nth-child(even) {
  padding-left: 20px;
  border-left: 1px solid var(--s-line);
}
/* «более 1000» должно помещаться в узкую колонку */
.why__facts .fact__num { font-size: clamp(2.25rem, 3.4vw, 3rem); }

.why__media {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: var(--evo-gap);
  align-items: start;
}
.why__fig--detail { margin-top: clamp(2rem, 9vw, 6rem); }
.why__fig img {
  width: 100%;
  height: auto;
  border: 1px solid var(--s-line);
}
.why__fig figcaption {
  margin-top: 12px;
  font-size: .75rem;
  line-height: 1.5;
  letter-spacing: .04em;
  color: var(--s-soft);
}

@media (min-width: 768px) {
  .why__media { gap: 24px; }
}
@media (min-width: 1024px) {
  .why__grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: clamp(4rem, 7vw, 7rem);
    align-items: center;
  }
  /* в HTML текст идёт первым (порядок чтения), на десктопе фото слева */
  .why__media {
    grid-column: 1;
    grid-row: 1;
  }
  .why__body {
    grid-column: 2;
    grid-row: 1;
  }
}

/* ---------- 7. Form (кремовый) ---------- */
.contact__links {
  display: grid;
  justify-items: start;
  gap: 4px;
  margin-top: 32px;
}
.contact__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-head);
  font-size: 1.5rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.contact__panel {
  min-width: 0;
  padding: clamp(20px, 4vw, 40px);
  background: var(--cream-2);
  border: 1px solid var(--s-line);
}
.form-row,
.form-row-split > div { min-width: 0; }
.req { color: var(--accent-dark); }
.form-hint {
  font-size: .8125rem;
  line-height: 1.5;
  color: var(--s-soft);
}

/* ---------- 8. Футер (тёмный) ---------- */
.site-footer {
  padding-block: clamp(2.5rem, 6vw, 4rem) 32px;
  border-top: 1px solid var(--s-line);
}
.footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 40px;
}
.footer__logo {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.footer__logo img {
  width: 132px;
  height: auto;
  filter: brightness(0) invert(1);
}
.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 28px;
  margin: 0;
  list-style: none;
}
.footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-head);
  font-size: 1.25rem;
}
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 32px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--s-line);
  font-size: .875rem;
  color: var(--s-soft);
}
.footer__contacts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 12px;
}
.footer__contacts a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.footer__note {
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* ---------- 9. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .contact__links a,
  .footer__contacts a,
  .footer__links a { transition: none; }
}
