/* =========================================================
   Свободу Дмитрию Морозову — стили
   Цвета и шрифты вынесены в переменные: меняйте здесь.
   ========================================================= */
/* Шрифт Inter (SIL OFL 1.1, см. assets/fonts/OFL.txt) хранится на сайте:
   страница одинаково выглядит в Windows, macOS, iOS и Android, а браузер посетителя
   не обращается к сторонним серверам вроде Google Fonts. */
@font-face {
  font-family: "Inter Site";
  src: url("fonts/inter-cyrillic-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter Site";
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #141414;
  --paper: #f5f2eb;
  --paper-2: #ebe6da;
  --muted: #5c5a55;
  --accent: #e8401c;        /* основной акцент кампании */
  --accent-ink: #ffffff;
  --campaign: #2f9e6e;      /* маркер «результатов кампании» в хронологии */
  --line: rgba(20, 20, 20, .14);

  --font: "Inter Site", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --font-display: var(--font);

  --radius: 6px;
  --container: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.1; margin: 0 0 .5em; }
h2 { font-family: var(--font-display); font-weight: 800; font-size: clamp(30px, 4.5vw, 48px); letter-spacing: -.02em; }
h3 { font-size: 21px; }
p { margin: 0 0 1em; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 820px; }
.mt-lg { margin-top: 64px; }

/* Подсветка мест, где нужен реальный контент. Перед запуском — удалить все <mark class="todo"> */
mark.todo { background: #fff2a8; color: inherit; padding: 0 .2em; border-radius: 2px; }

.eyebrow {
  font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 12px;
}
.lead { font-size: 22px; font-weight: 700; line-height: 1.4; }
.lead--wide { max-width: 760px; font-weight: 500; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 26px; border-radius: var(--radius); border: 2px solid transparent;
  font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--sm { padding: 8px 16px; font-size: 15px; }
.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--accent:hover { background: #c9330f; }
.btn--ghost { border-color: currentColor; color: #fff; }
.btn--ghost:hover { background: #fff; color: var(--ink); }
.btn--dark { background: var(--ink); color: #fff; width: 100%; margin-top: auto; }
.btn--dark:hover { background: #333; }
.link-arrow { font-weight: 700; color: var(--accent); text-decoration: none; }
.link-arrow:hover { text-decoration: underline; }

/* ---------- Шапка ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(20, 20, 20, .92); backdrop-filter: blur(8px); color: #fff;
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo__text { font-weight: 800; font-size: 13px; line-height: 1.15; text-transform: uppercase; letter-spacing: .04em; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a:not(.btn) { text-decoration: none; font-size: 15px; font-weight: 600; opacity: .85; }
.nav a:not(.btn):hover { opacity: 1; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; transition: .2s; }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ink); padding: 8px var(--gutter) 20px;
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a:not(.btn) { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
  .nav .btn { margin-top: 14px; }
}

/* ---------- Первый экран ----------
   Компьютер: текст слева на тёмном фоне, фото справа плавно в него переходит.
   Телефон: фото сверху, текст под ним. */
.hero {
  position: relative; overflow: hidden; color: #fff; background: var(--ink);
  min-height: min(88vh, 760px); display: flex; align-items: center;
}
.hero__bg {
  position: absolute; top: 0; right: 0; height: 100%; width: min(64%, 1400px);
  object-fit: cover; object-position: 45% 25%;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 38%);
          mask-image: linear-gradient(to right, transparent 0%, #000 38%);
}
.hero__content { position: relative; z-index: 1; padding-top: 72px; padding-bottom: 72px; width: 100%; }
.hero__content > * { max-width: 560px; }
.hero__kicker {
  display: inline-block; background: var(--accent); padding: 4px 10px; border-radius: 3px;
  font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
}
.hero__title {
  font-family: var(--font-display); font-weight: 900; font-size: clamp(40px, 5.6vw, 76px);
  line-height: .98; letter-spacing: -.02em; text-transform: uppercase; margin: 16px 0 24px;
}
.hero__title span { color: var(--accent); }
.hero__counter { font-size: clamp(18px, 2.2vw, 22px); opacity: .95; }
.hero__counter strong { font-family: var(--font-display); font-size: 1.5em; color: var(--accent); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Планшеты в портретной ориентации и телефоны: фото сверху, текст под ним */
@media (max-width: 900px) {
  .hero { flex-direction: column; align-items: stretch; min-height: 0; }
  .hero__bg {
    position: relative; width: 100%; height: auto; aspect-ratio: 3 / 2; max-height: 45vh;
    object-position: 40% 25%;
    -webkit-mask-image: linear-gradient(to bottom, #000 65%, transparent 100%);
            mask-image: linear-gradient(to bottom, #000 65%, transparent 100%);
  }
  .hero__content { margin-top: -56px; padding-top: 0; padding-bottom: 56px; }
  .hero__content > * { max-width: 640px; }
  .hero__title { font-size: clamp(40px, 9vw, 68px); }
}
@media (max-width: 760px) {
  .hero__bg { aspect-ratio: 5 / 4; object-position: 38% 20%; }
  .hero__content { padding-bottom: 48px; }
}

/* Телефоны в горизонтальной ориентации и почти квадратные экраны (внутренний экран Galaxy Fold):
   фото сверху съело бы весь экран, поэтому возвращаем раскладку «текст слева, фото справа». */
@media (orientation: landscape) and (max-height: 500px),
       (min-width: 600px) and (max-width: 900px) and (min-aspect-ratio: 4 / 5) {
  .hero { flex-direction: row; align-items: center; }
  .hero__bg {
    position: absolute; top: 0; right: 0; height: 100%; width: 60%;
    aspect-ratio: auto; max-height: none; object-position: 45% 25%;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 40%);
            mask-image: linear-gradient(to right, transparent 0%, #000 40%);
  }
  .hero__content { margin-top: 0; padding-top: 48px; padding-bottom: 48px; }
  .hero__content > * { max-width: 62%; }
  .hero__title { font-size: clamp(30px, 5.4vw, 56px); }
}

/* Невысокие экраны в горизонтальной ориентации: всё компактнее, первый экран целиком помещается */
@media (orientation: landscape) and (max-height: 500px) {
  html { scroll-padding-top: 60px; }
  .topbar__inner { height: 52px; }
  .nav { top: 52px; max-height: calc(100vh - 52px); overflow-y: auto; }
  .hero { min-height: calc(100vh - 52px); }
  .hero__content { padding-top: 16px; padding-bottom: 20px; }
  .hero__kicker { font-size: 11px; }
  .hero__title { font-size: clamp(26px, 4.6vw, 44px); margin: 10px 0 12px; }
  .hero__counter { font-size: 16px; margin-bottom: 0; }
  .hero__actions { margin-top: 14px; gap: 8px; }
  .hero .btn { padding: 10px 16px; font-size: 15px; }
}

/* Невысокие телефоны в вертикальной ориентации (iPhone SE и т.п.): фото ниже, чтобы кнопки попали в первый экран */
@media (orientation: portrait) and (max-width: 600px) and (max-height: 700px) {
  .hero__bg { max-height: 36vh; }
  .hero__title { margin: 12px 0 16px; }
  .hero__actions { margin-top: 20px; }
}

/* Узкие телефоны: две кнопки первого экрана помещаются в одну строку */
@media (max-width: 400px) {
  .hero .btn { padding: 14px 18px; }
}

/* Очень узкие экраны (внешний экран Galaxy Fold, старые iPhone SE) */
@media (max-width: 340px) {
  .logo__text { font-size: 11px; }
  .hero__kicker { font-size: 11px; letter-spacing: .08em; }
}
.nowrap { white-space: nowrap; }

/* ---------- Секции ---------- */
.section { padding: clamp(64px, 10vw, 120px) 0; }
.section--dark { background: var(--ink); color: #f1efe9; }
.section--dark .tl__item p { color: #bcb8ae; }
.section--accent { background: var(--paper-2); }

/* ---------- О деле ---------- */
.about { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.about__photo { margin: 0; }
.about__photo img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
.about__photo figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; }
@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; }
  .about__photo { order: -1; max-width: 420px; }
}

/* ---------- Хронология ---------- */
.tl-legend { display: flex; gap: 24px; flex-wrap: wrap; font-size: 15px; color: #bcb8ae; margin: 8px 0 48px; }
.tl-legend__item { display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); display: inline-block; }
.dot--campaign { background: var(--campaign); }

.tl { list-style: none; margin: 0; padding: 0; position: relative; max-width: 820px; }
.tl::before {
  content: ""; position: absolute; left: 140px; top: 6px; bottom: 6px; width: 2px;
  background: rgba(255,255,255,.15);
}
.tl__item {
  position: relative; display: grid; grid-template-columns: 140px 1fr; column-gap: 40px;
  padding-bottom: 36px;
}
.tl__item::before {
  content: ""; position: absolute; left: 134px; top: 6px; width: 14px; height: 14px;
  border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--ink);
}
.tl__item--campaign::before { background: var(--campaign); }
.tl__item--now::before { animation: pulse 1.8s infinite; }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 4px var(--ink), 0 0 0 4px rgba(232,64,28,.6); }
  100% { box-shadow: 0 0 0 4px var(--ink), 0 0 0 18px rgba(232,64,28,0); }
}
.tl__date { grid-row: span 2; font-weight: 700; font-size: 15px; color: #bcb8ae; padding-top: 2px; font-variant-numeric: tabular-nums; }
.tl__title { margin-bottom: 4px; }
.tl__item p { margin: 0; }
@media (max-width: 640px) {
  .tl::before { left: 6px; }
  .tl__item { grid-template-columns: 1fr; padding-left: 36px; }
  .tl__item::before { left: 0; }
  .tl__date { grid-row: auto; }
}

/* ---------- Биография ---------- */
.prose p { font-size: 19px; }
.facts { list-style: none; padding: 0; margin: 0 0 1.4em; display: grid; gap: 12px; }
.facts li { padding: 16px 20px; background: #fff; border-left: 4px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0; }

/* ---------- Как помочь ---------- */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 40px; }
@media (max-width: 760px) { .cards { grid-template-columns: 1fr; } }
.cards > .card:last-child:nth-child(odd) { grid-column: 1 / -1; }
.card {
  background: #fff; border-radius: var(--radius); padding: 28px;
  display: flex; flex-direction: column; gap: 4px;
  border: 1px solid var(--line);
}
.card__num { font-family: var(--font-display); font-weight: 800; color: var(--accent); font-size: 15px; margin-bottom: 6px; }
.card p { font-size: 17px; }
.card__sub { font-size: 14px !important; color: var(--muted); margin: 10px 0 6px; }

.copybox {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center;
  background: var(--paper); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 16px;
}
.copybox__label { grid-column: 1 / -1; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.copybox__value { font-size: 14px; overflow-wrap: anywhere; font-family: ui-monospace, Menlo, Consolas, monospace; }
.copybox__btn {
  border: 0; background: var(--ink); color: #fff; font: inherit; font-size: 13px; font-weight: 700;
  padding: 8px 12px; border-radius: 4px; cursor: pointer;
}
.copybox__btn:hover { background: var(--accent); }
.copybox__btn--block { width: 100%; margin-top: 10px; }

.appeal { margin-bottom: 16px; background: var(--paper); border-radius: var(--radius); padding: 12px 14px; }
.appeal summary { cursor: pointer; font-weight: 700; font-size: 15px; }
.appeal__text { font-size: 15px; margin-top: 12px; max-height: 320px; overflow: auto; }
.appeal__text ol { padding-left: 1.3em; margin: 0 0 1em; }
.appeal__text li { margin-bottom: .5em; }

.share { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.share__btn {
  border: 2px solid var(--ink); background: transparent; color: var(--ink);
  font: inherit; font-size: 14px; font-weight: 700; padding: 7px 14px; border-radius: 999px;
  text-decoration: none; cursor: pointer;
}
.share__btn:hover, .share__btn--solid { background: var(--ink); color: #fff; }
.share__btn--solid:hover { background: var(--accent); border-color: var(--accent); }

@media (max-width: 420px) {
  .card { padding: 22px 18px; }
  .copybox { grid-template-columns: 1fr; }
  .copybox__btn { justify-self: start; }
}

/* ---------- Подвал ---------- */
.footer { background: var(--ink); color: #bcb8ae; padding: 40px 0; font-size: 15px; }
.footer strong { color: #fff; }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: flex-end; }
.footer p { margin: 4px 0 0; }

/* ---------- Уведомление «скопировано» ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px);
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px;
  font-size: 15px; font-weight: 600; opacity: 0; pointer-events: none; transition: .2s; z-index: 100;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

/* ---------- Блок «Письмо из СИЗО» ---------- */
.letter-block__inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.letter-sheet {
  margin: 0; background: #fff; padding: 28px 24px 18px; border-radius: 3px; color: var(--muted);
  box-shadow: 0 2px 4px rgba(0,0,0,.3), 0 18px 40px rgba(0,0,0,.35);
  transform: rotate(-2deg);
}
.letter-sheet img { width: 100%; height: auto; display: block; }
.letter-sheet figcaption { font-size: 14px; margin-top: 12px; text-align: right; }
.letter-block__text h2 { font-size: clamp(30px, 4vw, 44px); }
.letter-block__transcript { font-size: 20px; line-height: 1.5; color: #fff; }
.letter-block__text p:not(.eyebrow):not(.letter-block__transcript) { color: #bcb8ae; }
.letter-block .btn { margin-top: 8px; }
@media (max-width: 860px) {
  .letter-block__inner { grid-template-columns: 1fr; }
  .letter-sheet { max-width: 480px; transform: rotate(-1.2deg); }
}
