/* ============================================================
   Holod Media theme — base
   Значения типографики сверены с holod.media (computed styles)
   ============================================================ */

/* Self-hosted fonts, same files as legacy WP theme (_fonts.scss) */
@font-face {
  font-display: swap;
  font-family: "Golos Text Holod";
  font-style: normal;
  font-weight: 400;
  src: url("../fonts/Golos/golos-text-v4-cyrillic_cyrillic-ext_latin_latin-ext-regular.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Golos Text Holod";
  font-style: normal;
  font-weight: 500;
  src: url("../fonts/Golos/golos-text-v4-cyrillic_cyrillic-ext_latin_latin-ext-500.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Golos Text Holod";
  font-style: normal;
  font-weight: 600;
  src: url("../fonts/Golos/golos-text-v4-cyrillic_cyrillic-ext_latin_latin-ext-600.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Golos Text Holod";
  font-style: normal;
  font-weight: 700;
  src: url("../fonts/Golos/golos-text-v4-cyrillic_cyrillic-ext_latin_latin-ext-700.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Cormorant Garamond Holod";
  font-style: normal;
  font-weight: 400;
  src: url("../fonts/CormorantGaramond/cormorant-garamond-v16-cyrillic_cyrillic-ext_latin_latin-ext-regular.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Cormorant Garamond Holod";
  font-style: normal;
  font-weight: 500;
  src: url("../fonts/CormorantGaramond/cormorant-garamond-v16-cyrillic_cyrillic-ext_latin_latin-ext-500.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Cormorant Garamond Holod";
  font-style: normal;
  font-weight: 600;
  src: url("../fonts/CormorantGaramond/cormorant-garamond-v16-cyrillic_cyrillic-ext_latin_latin-ext-600.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Cormorant Garamond Holod";
  font-style: normal;
  font-weight: 700;
  src: url("../fonts/CormorantGaramond/cormorant-garamond-v16-cyrillic_cyrillic-ext_latin_latin-ext-700.woff2") format("woff2");
}

/* --- Design tokens (сняты с holod.media) --- */
:root {
  --font-body: "Golos Text Holod", system-ui, sans-serif;
  --font-serif: "Cormorant Garamond Holod", serif;
  --color-text: #191919;
  --color-accent: #fa6e4b;
  --color-bg: #fff;
  --header-height: 78px;
}

/* --- Reset / base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  /* Ghost Admin → Design → Typography может переопределить шрифт */
  font-family: var(--gh-font-body, var(--font-body));
  font-size: 16px;
  line-height: 1.375; /* 22px при 16px */
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
  overflow-x: hidden;
  /* Длинное неразрывное слово (ссылка, хештег, адрес почты) в узкой мобильной
     колонке иначе вылезает за край и молча срезается: и body, и .site-main
     режут по overflow: hidden, прокрутки не появляется. На white-space: pre
     (блоки кода) правило не действует — они по-прежнему скроллятся сами. */
  overflow-wrap: break-word;
  display: flex;
  flex-direction: column;
  position: relative;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--gh-font-heading, var(--font-body));
  font-weight: 500;
}

p,
h1,
h2,
h3,
h4,
h5,
h6,
li {
  margin: 0;
}

b,
strong {
  font-weight: 700;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style-type: none;
}

ul li,
ol li {
  padding: 0;
  position: relative;
}

a {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

svg {
  display: block;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Прогресс чтения: при скрытой шапке полоса поднимается к верху окна.
   В legacy селектор писался под .main — у нас <main> называется .site-main */
.header.header-hidden:not(.menu-open) ~ .site-main .article-line {
  top: 0;
}

/* Секции главной (из legacy _interface.scss) */
.section {
  margin-top: 25px;
}

@media (max-width: 991px) {
  .section {
    margin-top: 32px;
  }
}

/* Сетка (из legacy _interface.scss) */
.row {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  margin-left: -12.5px;
  margin-right: -12.5px;
  margin-bottom: -20px;
}

.col {
  padding-left: 12.5px;
  padding-right: 12.5px;
  margin-bottom: 20px;
}

input,
button,
textarea {
  color: var(--color-text);
  font-family: var(--gh-font-body, var(--font-body));
  font-weight: 400;
}

button {
  border: 0;
  outline: none;
  cursor: pointer;
  background: none;
  padding: 0;
  color: inherit;
  display: block;
  font-size: inherit;
  line-height: inherit;
}

button:active,
button:focus {
  outline: none !important;
}

/* Main — отступ под фиксированную шапку, flex — прижимает футер к низу */
.site-main {
  flex: 1 0 auto;
  overflow: hidden;
  width: 100%;
  position: relative;
  padding-top: 103px;
  padding-bottom: 25px;
}

@media (max-width: 991px) {
  .site-main {
    padding-top: 86px;
    padding-bottom: 32px;
  }
}

/* Широкие карточки редактора (kg-width-wide/full) центрируются в article.css
   тем же приёмом, что WP alignwide/alignfull — здесь правил нет намеренно:
   вариант с отрицательными маргинами ломался, когда .main-text figure
   перебивал margin, оставляя только transform (блок уезжал вправо) */
