/* ═══════════════════════════════════════════════════════════
   ДРУГ — стили новой сборки: блоки выпуска, темы, Яндекс Формы,
   юридические страницы. Остальное — в tokens/base/components/pages/v2.
   ═══════════════════════════════════════════════════════════ */

[hidden] { display: none !important; }

/* ── Темы выпуска: в фирменной палитре, меняется акцент ───── */
.issue--factory  { --accent: #B76E4A; --accent-dark: #A05D3C; --accent-soft: rgba(183,110,74,.16); --accent-line: rgba(183,110,74,.38); }
.issue--mountain { --accent: #7E97A8; --accent-dark: #6A8394; --accent-soft: rgba(126,151,168,.16); --accent-line: rgba(126,151,168,.38); }
.issue--village  { --accent: #9A9A5C; --accent-dark: #85854D; --accent-soft: rgba(154,154,92,.16); --accent-line: rgba(154,154,92,.38); }

/* ── Блоки выпуска ────────────────────────────────────────── */
.blocks { display: grid; gap: var(--s-5); }
.blocks > .block { margin: 0; }
.block--text { max-width: var(--measure); }
.block--photo .ph img, .block--gallery .ph img { width: 100%; height: 100%; object-fit: cover; }
.block--gallery { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.block--gallery figure { margin: 0; }
.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--bg-deep); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.block--audio audio { width: 100%; }
.block--number { display: grid; gap: var(--s-2); max-width: var(--measure); }
.big-number { font-family: var(--font-display); font-size: var(--fs-hero); line-height: var(--lh-tight); color: var(--accent); }
.ph--16x9 { aspect-ratio: 16 / 9; }

/* ── Фото в команде ───────────────────────────────────────── */
.person__photo--img { overflow: hidden; padding: 0; }
.person__photo--img picture { display: block; width: 100%; height: 100%; }
.person__photo--img img { width: 100%; height: 100%; object-fit: cover; }

/* ── Яндекс Форма ─────────────────────────────────────────── */
.yaform { border-radius: var(--radius); overflow: hidden; background: var(--paper); }
.yaform iframe { display: block; width: 100%; min-height: 900px; border: 0; }

/* ── Юридические страницы ─────────────────────────────────── */
.legal { max-width: 80ch; }
.legal p, .legal li { color: var(--text-dim); line-height: var(--lh-body); }
.legal strong { color: var(--text); }
.legal table { width: 100%; border-collapse: collapse; margin: var(--s-4) 0; font-size: var(--fs-sm); }
.legal th, .legal td { border: 1px solid var(--line); padding: .6rem .75rem; text-align: left; vertical-align: top; }
.legal th { color: var(--text); background: var(--surface); }
@media (max-width: 640px) {
  .legal table, .legal thead, .legal tbody, .legal tr, .legal th, .legal td { display: block; }
  .legal thead { display: none; }
  .legal td { border-width: 0 0 1px; padding-inline: 0; }
  .legal tr { border-top: 1px solid var(--line); margin-bottom: var(--s-3); }
}

/* ── «Как стать частью «Друга»»: фото + три карточки ─────────── */
.ways__intro {
  display: flex; flex-direction: column; gap: .15em;
  margin: 0 0 var(--s-5);
  font-family: var(--font-display); font-size: var(--fs-h3); line-height: 1.2; color: var(--text);
}
.ways__intro-mute { color: var(--text-mute); }
.ways {
  display: grid; gap: var(--gap);
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.ways__photo {
  position: relative; margin: 0; overflow: hidden;
  border-radius: var(--radius); background: var(--surface);
}
.ways__photo picture, .ways__photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.ways__photo:has(figcaption)::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, transparent 45%, rgba(20, 18, 17, .78));
}
.ways__photo figcaption {
  position: absolute; left: var(--s-4); right: var(--s-4); bottom: var(--s-4); z-index: 1;
  font-family: var(--font-display); font-size: var(--fs-h3); line-height: 1.15; color: var(--text);
}
.ways__card {
  display: flex; flex-direction: column; overflow: hidden;
  padding: var(--s-4);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--text); text-decoration: none;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
              opacity .65s var(--ease) var(--d, 0s), transform .65s var(--ease) var(--d, 0s);
}
.ways__card:hover { background: var(--surface-2); border-color: var(--accent-line); }
.ways__pic {
  display: block; aspect-ratio: 4 / 3; margin: calc(var(--s-4) * -1) calc(var(--s-4) * -1) var(--s-4);
  overflow: hidden; border-radius: var(--radius) var(--radius) 0 0; background: var(--bg-deep);
}
.ways__pic picture, .ways__pic img {
  display: block; width: 100%; height: 100%; object-fit: cover;
}
.ways__num { font-size: var(--fs-xs); letter-spacing: var(--ls-caps); color: var(--accent); }
.ways__title {
  margin: var(--s-1) 0 0;
  font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 500; line-height: 1.15;
}
.ways__text { margin: var(--s-1) 0 var(--s-4); font-size: var(--fs-sm); line-height: 1.5; color: var(--text-dim); }
.ways__list {
  list-style: none; margin: auto 0 0; padding: var(--s-5) 0 0;
  display: flex; flex-direction: column; gap: .6rem;
}
.ways__list li {
  position: relative; padding-left: 1.6rem;
  font-size: var(--fs-sm); line-height: 1.4; color: var(--text-dim);
}
.ways__list li::before {
  content: ''; position: absolute; left: .1rem; top: .2em;
  width: .45rem; height: .8rem;
  border: solid var(--accent); border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.ways__more {
  display: flex; align-items: center; gap: var(--s-3);
  margin-top: auto; padding-top: var(--s-3); border-top: 1px solid var(--line);
  font-size: var(--fs-sm); color: var(--accent);
}
.ways__more > span:first-child { flex: none; }
/* Длинная тонкая стрелка до правого края карточки */
.ways__line {
  position: relative; flex: 1; height: 1px; background: currentColor;
  opacity: .35; transition: opacity var(--dur) var(--ease);
}
.ways__line::after {
  content: ''; position: absolute; right: 0; top: 50%;
  width: .4rem; height: .4rem; border: solid currentColor; border-width: 1px 1px 0 0;
  transform: translateY(-50%) rotate(45deg);
}
.ways__card:hover .ways__line, .ways__card:focus-visible .ways__line { opacity: 1; }
.ways__text + .ways__more, .ways__title + .ways__more { margin-top: auto; }
.ways__list + .ways__more { margin-top: var(--s-4); }

@media (max-width: 1100px) {
  .ways { grid-template-columns: repeat(2, minmax(0, 1fr)); min-height: 0; }
  .ways__photo { min-height: 0; aspect-ratio: 4 / 3; }
  .ways__list { margin-top: var(--s-4); padding-top: 0; }
}
@media (max-width: 640px) {
  .ways { grid-template-columns: 1fr; }
  .ways__photo { display: none; }
}

/* ── Низ формы: согласие → кнопка → примечание ──────────────── */
/* кнопка ближе к галочке согласия: это одно действие */
.form__foot { margin-top: var(--s-5); }
/* примечание под формой — второстепенное: мельче, тише, отделено линией */
.form ~ .form__hint {
  max-width: 46rem;
  margin: var(--s-4) 0 0;
  font-size: .8125rem;
  line-height: 1.6;
  color: var(--text-mute);
}
.form__hint a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.form__hint a:hover { color: var(--text); }
