/* ============================================================
   1. Токены
   ============================================================ */
:root {
  --paper:      #ffffff;
  --ink:        #111111;
  --text:       #2e2e2e;
  --muted:      #8c8c8c;
  --rule:       #dcdcdc;

  --serif: "Literata", Georgia, "Times New Roman", serif;
  --mono:  "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --w-wide: 1140px;
  --w-read: 672px;
  --gutter: clamp(20px, 5vw, 48px);
}

/* ============================================================
   2. Сброс и база
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.7;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--ink); }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

.skip-link:focus {
  position: fixed; z-index: 100; top: 8px; left: 8px;
  width: auto; height: auto; clip-path: none;
  padding: 10px 16px; background: var(--ink); color: var(--paper);
}

/* Служебная типографика: даты, рубрики, подписи, ссылки-действия */
.meta {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.meta--ink { color: var(--ink); }

.wrap { max-width: var(--w-wide); margin: 0 auto; padding: 0 var(--gutter); }
.wrap--read { max-width: var(--w-read); }

/* ============================================================
   3. Шапка — газетный колонтитул
   ============================================================ */
.masthead { border-bottom: 0; }

.masthead__inner {
  max-width: var(--w-wide);
  margin: 0 auto;
  padding: clamp(26px, 5vw, 54px) var(--gutter) 0;
  text-align: center;
}

.masthead__nav { border-bottom: 1px solid var(--ink); }

.masthead__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2rem, 7vw, 3.75rem);
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink);
}
.masthead__title a { color: inherit; text-decoration: none; }

/* Дефис из адреса сайта: виден вблизи, пропадает издалека. */
.masthead__hyphen {
  display: inline-block;
  color: #c9c9c9;
  /* Дефис рисуется по высоте строчных, а вокруг — прописные: приподнимаем к их центру. */
  transform: translateY(-0.07em);
}

.masthead__tagline { margin-top: 14px; }

/* Классическая двойная линейка: толстая сверху, тонкая снизу */
.masthead__rules {
  height: 3px;
  margin-top: clamp(18px, 3vw, 30px);
  border-top: 3px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(16px, 3vw, 34px);
  margin: 0;
  padding: 13px 0;
  list-style: none;
}
.nav a { text-decoration: none; }
.nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.nav .current-menu-item > a,
.nav .current_page_item > a { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

/* ============================================================
   4. Список интервью
   ============================================================ */
.entry {
  position: relative;
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: clamp(20px, 4vw, 56px);
  padding: clamp(34px, 5vw, 60px) 0;
  border-bottom: 1px solid var(--rule);
}
.entry:first-child { padding-top: clamp(38px, 6vw, 68px); }

.entry__rail { display: flex; flex-direction: column; gap: 7px; }

.entry__name {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.85rem, 4.4vw, 2.9rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.entry__name a { color: inherit; text-decoration: none; }
/* Кликабельна вся строка списка, но в разметке ссылка одна */
.entry__name a::after { content: ""; position: absolute; inset: 0; }
.entry:hover .entry__name,
.entry:focus-within .entry__name {
  text-decoration: underline;
  text-underline-offset: 7px;
  text-decoration-thickness: 2px;
}

/* Первое интервью на странице подаётся как «передовица» */
.entry--lead .entry__name { font-size: clamp(2.2rem, 6vw, 3.9rem); }
.entry--lead .entry__quote { font-size: clamp(1.2rem, 2.6vw, 1.6rem); }

.entry__role { margin-top: 13px; }

.entry__quote {
  max-width: 32em;
  margin: 17px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.05rem, 2.1vw, 1.3rem);
  line-height: 1.5;
  color: var(--text);
}

.entry__more { display: inline-block; margin-top: 21px; color: var(--ink); text-decoration: none; }

/* ============================================================
   5. Интервью — страница материала
   ============================================================ */
.article { padding-bottom: 0; }

.article__top { padding-top: clamp(28px, 4vw, 52px); }

.article__date { display: block; margin-bottom: 20px; }

.article__title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.8rem, 4.2vw, 2.85rem);
  line-height: 1.14;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-wrap: balance;
}

.byline {
  margin-top: clamp(24px, 3.5vw, 34px);
  padding: 15px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.byline__name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.1875rem;
  line-height: 1.3;
  color: var(--ink);
}
.byline__role { margin-top: 5px; }

.lead {
  margin: clamp(26px, 4vw, 36px) 0 0;
  font-size: clamp(1.125rem, 2.1vw, 1.3125rem);
  line-height: 1.6;
  font-weight: 500;
  color: var(--ink);
}

.article__photo { margin: clamp(28px, 4.5vw, 44px) 0 0; }
.article__photo img {
  display: block;
  width: 100%;
  /* Обесцвечивание выравнивает снимки разного качества и происхождения */
  filter: grayscale(1) contrast(1.06);
}
.article__photo figcaption { margin-top: 9px; }

.article__body {
  margin-top: clamp(32px, 5vw, 46px);
  padding-top: clamp(28px, 4vw, 38px);
  border-top: 3px solid var(--ink);
}

.article__body p {
  margin: 0 0 1.35em;
  font-size: 1.125rem;
  line-height: 1.78;
}

/* Реплика интервьюера */
.article__body p.is-style-question {
  margin-top: 2.4em;
  margin-bottom: 0.8em;
  font-weight: 700;
  font-size: 1.1875rem;
  line-height: 1.5;
  color: var(--ink);
}
.article__body > p.is-style-question:first-child { margin-top: 0; }

.article__body h2,
.article__body h3,
.page-body h2,
.page-body h3 {
  margin: 2.2em 0 0.7em;
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
}
.article__body h2,
.page-body h2 { font-size: 1.5rem; }
.article__body h3,
.page-body h3 { font-size: 1.25rem; }

.article__body a,
.page-body a { color: var(--ink); text-underline-offset: 3px; }

/* Вытяжка — крупная цитата поперёк колонки */
.article__body .wp-block-quote {
  margin: clamp(34px, 5vw, 50px) 0;
  padding: clamp(20px, 3vw, 28px) 0;
  border: 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.article__body .wp-block-quote p {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.25rem, 2.9vw, 1.625rem);
  line-height: 1.4;
  color: var(--ink);
}
.article__body .wp-block-quote cite {
  display: block;
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-style: normal;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.article__body ul, .article__body ol,
.page-body ul, .page-body ol { padding-left: 1.2em; margin: 0 0 1.35em; }
.article__body li,
.page-body li { margin-bottom: 0.5em; line-height: 1.7; }

.article__body figure { margin: clamp(28px, 4vw, 40px) 0; }
.article__body figure img { filter: grayscale(1) contrast(1.06); }
.article__body figcaption {
  margin-top: 9px;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Переходы к соседним интервью */
.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 4vw, 40px);
  margin-top: clamp(40px, 6vw, 64px);
  padding-top: clamp(22px, 3vw, 30px);
  border-top: 1px solid var(--ink);
}
.article-nav__item { min-width: 0; }
.article-nav__item--next { text-align: right; }
.article-nav__title {
  display: block;
  margin-top: 9px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.0625rem;
  line-height: 1.35;
  color: var(--ink);
  text-decoration: none;
}
.article-nav__title:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ============================================================
   6. Страницы, 404, пагинация, подвал
   ============================================================ */
.page-body { margin-top: clamp(26px, 4vw, 36px); }
.page-body p { margin: 0 0 1.3em; font-size: 1.125rem; line-height: 1.75; }

.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: clamp(36px, 5vw, 56px) 0;
}
.pagination .page-numbers {
  min-width: 34px;
  padding: 7px 9px;
  border: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.75rem;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
}
.pagination .page-numbers:hover { border-color: var(--ink); }
.pagination .page-numbers.current { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.site-footer { margin-top: clamp(52px, 7vw, 92px); }

.site-footer__inner {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  max-width: var(--w-wide);
  margin: 0 auto;
  padding: 24px var(--gutter) 40px;
}
/* Линейка рисуется внутри отступов, чтобы совпасть по ширине с линейками шапки. */
.site-footer__inner::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--gutter);
  right: var(--gutter);
  border-top: 3px solid var(--ink);
}

.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* ============================================================
   7. Уведомление о файлах cookie
   ============================================================ */
.cookie-note {
  position: fixed;
  z-index: 50;
  right: 0;
  bottom: 0;
  left: 0;
  background: var(--paper);
  border-top: 3px solid var(--ink);
}
/* Атрибут hidden сам по себе не переспорит position: fixed. */
.cookie-note[hidden] { display: none; }

.cookie-note__inner {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 44px);
  max-width: var(--w-wide);
  margin: 0 auto;
  padding: 16px var(--gutter);
}

.cookie-note__text {
  margin: 0;
  max-width: 62ch;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text);
}
.cookie-note__text a { color: var(--ink); text-underline-offset: 3px; }

.cookie-note__button {
  flex: none;
  margin: 0;
  padding: 12px 24px;
  border: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}
.cookie-note__button:hover { opacity: 0.82; }

@media (max-width: 640px) {
  .cookie-note__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding-bottom: 18px;
  }
  .cookie-note__text { font-size: 0.875rem; }
}

/* ============================================================
   8. Узкие экраны
   ============================================================ */
@media (max-width: 640px) {
  .entry {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .entry__rail { flex-direction: row; gap: 14px; }
  .article-nav { grid-template-columns: 1fr; }
  .article-nav__item--next { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

@media print {
  .masthead__rules, .nav, .article-nav, .site-footer, .pagination { display: none; }
  body { font-size: 11pt; }
}
