/* Тёмная готика вместо слоновой кости: почти чёрный с красным подтоном и кровь в акценте.
   Оттенки живут в токенах темы, как у NOIR, поэтому вся остальная разметка не трогается.
   Красный взят светлее «кровяного» #c4303f: тот на этом фоне даёт 2.5:1 и в ссылках и
   мелком тексте просто не читается, а #e0505f даёт 5.1:1.
   От NOIR тема расходится по акценту — там античное золото, здесь кровь, — иначе два
   тёмных сайта из шести читались бы как один. */
.public-page[data-theme="forma"] {
  --paper: #0f0b0d; --ink: #ece2e1; --muted: #a49195; --line: #3a2730;
  --button-bg: var(--accent); --button-ink: #14090c;
  color-scheme: dark;
  --accent: #e0505f; --surface: #191115; --portrait: #251821; --portrait-ink: #b28f96;
  --card-text: #c9b9bc; --card-action: #ef6472;
}
/* FORMA — editorial split: the heading and the lead sit side by side, never centred. */
.public-page[data-theme="forma"] .page-intro {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 0 8%;
  align-items: end; text-align: left; padding-block: 72px 54px;
}
.public-page[data-theme="forma"] .page-intro h1 { font-size: clamp(40px, 5vw, 72px); letter-spacing: -2px; }
.public-page[data-theme="forma"] .page-intro p {
  max-width: 460px; margin: 0; padding-left: 26px; border-left: 1px solid var(--line);
}
.public-page[data-theme="forma"] .catalog-heading h2 { display: flex; align-items: baseline; gap: 20px; }
/* The staggered column keeps a four-card row from reading as one solid block. */
@media (min-width: 1001px) {
  .public-page[data-theme="forma"] .catalog .profile-grid { gap: 30px 26px; align-items: start; }
  .public-page[data-theme="forma"] .catalog .profile-grid > .profile:nth-child(2n) { margin-top: 38px; }
}
.public-page[data-theme="forma"] .filters {
  border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: transparent; padding: 20px 0 18px; margin-bottom: 34px;
}
.public-page[data-theme="forma"] .filters-heading { margin-bottom: 14px; }
.public-page[data-theme="forma"] .filters-heading h2 { font-size: 18px; letter-spacing: .4px; text-transform: uppercase; }
.public-page[data-theme="forma"] .filter-field input, .public-page[data-theme="forma"] .filter-field select {
  border: 0; border-bottom: 1px solid var(--line); background: transparent; padding-inline: 0;
}
.public-page[data-theme="forma"] .filter-field input:hover, .public-page[data-theme="forma"] .filter-field select:hover { border-color: var(--accent); }
.public-page[data-theme="forma"] .taxonomy-card a { background: transparent; border-left: 2px solid var(--line); border-block: 0; border-right: 0; padding-left: 20px; }
.public-page[data-theme="forma"] .taxonomy-card a:hover { border-left-color: var(--accent); }
@media (max-width: 700px) {
  .public-page[data-theme="forma"] .page-intro { display: block; padding-block: 42px 36px; }
  .public-page[data-theme="forma"] .page-intro p { margin-top: 18px; padding-left: 16px; }
}

/* Фон страницы: два мягких багровых пятна по почти чёрному — сверху над шапкой и в нижнем
   правом углу. Закреплены (background-attachment), поэтому при прокрутке длинного каталога
   не уезжают и не превращаются в полосы. Контраст текста не трогают: пятна тёмные, самое
   светлое место фона остаётся темнее #35101c. */
body.public-page[data-theme="forma"] {
  background:
    radial-gradient(132% 56% at 50% -12%, #35101c 0%, #35101c00 62%),
    radial-gradient(92% 46% at 104% 104%, #24101a 0%, #24101a00 58%),
    var(--paper);
  background-attachment: fixed;
}

/* Карточка каталога. Рамка нарисована через outline, а не border: outline лежит вне потока,
   поэтому фиксированные высоты фотографии и текстовой части остаются прежними — на них
   держится вся сетка и браузерная проверка. */
.public-page[data-theme="forma"] .profile {
  outline: 1px solid var(--line);
  background: linear-gradient(180deg, #17101500, #171015);
  transition: outline-color .2s ease, transform .2s ease;
}
.public-page[data-theme="forma"] .profile:is(:hover, :focus-within) {
  outline-color: var(--accent);
  transform: translateY(-2px);
}
/* Затемнение к низу снимка: фотография переходит в панель с именем без видимого стыка. */
.public-page[data-theme="forma"] .portrait::before {
  content: ''; position: absolute; inset: auto 0 0; height: 46%; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, #0b070900, #0b0709e6);
}
.public-page[data-theme="forma"] .profile:is(:hover, :focus-within) .portrait img { transform: scale(1.04); }
.public-page[data-theme="forma"] .profile-info {
  padding: 12px 13px 0; border-top: 1px solid var(--line);
}
.public-page[data-theme="forma"] .profile-info h3 { font-size: 24px; }
.public-page[data-theme="forma"] .detail-link { border-bottom-color: transparent; }
.public-page[data-theme="forma"] .profile:is(:hover, :focus-within) .detail-link { border-bottom-color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .public-page[data-theme="forma"] .profile,
  .public-page[data-theme="forma"] .portrait img { transition: none; }
  .public-page[data-theme="forma"] .profile:is(:hover, :focus-within) { transform: none; }
  .public-page[data-theme="forma"] .profile:is(:hover, :focus-within) .portrait img { transform: none; }
}
