:root {
  --bg: #e9e8e4;
  --text: #111111;
  --muted: #626262;
  --surface: #dbdad6;

  --gutter: 24px;
  --container: 1152px;

  --font: Roboto, Arial, sans-serif;
  --font-display: "Roboto Condensed", "Arial Narrow", sans-serif;

  --arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1 9 9 1M3 1h6v6' fill='none' stroke='black' stroke-width='1.6'/%3E%3C/svg%3E");
}

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.4;
  color: var(--text);
  background: var(--bg);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(40px, 6vw, 80px);
  line-height: 0.95;
}

h3 {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

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

[hidden] {
  display: none !important;
}

/* Раскладка */

header,
main,
footer {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

section {
  padding-block: clamp(40px, 6vw, 80px);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px 48px;
  margin-bottom: clamp(32px, 4vw, 48px);
}

/* Длинный заголовок переносится, а кнопка остаётся справа */
.section-head h2 {
  flex: 1 1 0;
  min-width: 12ch;
}

/* Ссылки и кнопки */

header a,
.footer-bottom a,
.footer-bottom p,
.link {
  color: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-transform: uppercase;
}

header a:hover,
footer a:hover,
.link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  white-space: nowrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 28px;
  border: 1px solid var(--text);
  background: var(--text);
  color: var(--bg);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.button:hover {
  background: transparent;
  color: var(--text);
}

/* Стрелка ↗ */

.button::after,
.link::after {
  content: "";
  width: 10px;
  height: 10px;
  background: currentColor;
  -webkit-mask: var(--arrow) center / contain no-repeat;
  mask: var(--arrow) center / contain no-repeat;
}

/* Полоса с ближайшим мероприятием и таймером (countdown.js): на тон темнее страницы, с линией снизу, на всю ширину экрана */

.event-bar {
  display: block;
  border-bottom: 1px solid var(--text);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}

.event-bar:focus-visible {
  outline-offset: -4px;
}

.event-bar-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 4px 24px;
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
  padding-block: 14px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Появление: текст проявляется через цвет, без подъёма. При движении мелкий текст рисуется размыто
   и в конце анимации резко «встаёт» на место; переход цвета браузер рисует обычным способом — текст всё время чёткий.
   Смена запасного шрифта на фирменный приходится на начало анимации и незаметна */
@keyframes text-fade-in {
  from {
    color: transparent;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .event-bar-title,
  .event-bar-timer {
    animation: text-fade-in 0.8s cubic-bezier(0.2, 0.65, 0.2, 1) backwards;
  }

  .event-bar-timer {
    animation-delay: 80ms;
  }
}

.event-bar:hover .event-bar-title {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Подпись и цифры не рвутся внутри; если не помещаются в строку — цифры целиком переносятся ниже */
.event-bar-timer {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  font-weight: 400;
  white-space: nowrap;
}

.event-bar-date {
  white-space: nowrap;
}

/* Цифры одинаковой ширины — строка не дёргается каждую секунду */
/* Стрелка ↗ прикреплена к цифрам, чтобы при переносе не оставаться одна на строке */
.event-bar-timer b {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: 0;
}

/* Ширина цифр задана в em — не зависит ни от смены секунд, ни от того, успел ли загрузиться шрифт.
   Так строка не «прыгает», когда Safari на iPhone перерисовывает страницу при возвращении во вкладку */
.event-bar-digits {
  display: inline-block;
  width: 6.1em;
  text-align: right;
  white-space: nowrap;
}

/* На десктопе подпись тоже в блоке фиксированной ширины: когда запасной шрифт сменяется фирменным,
   начало подписи и цифры остаются на месте — меняется только промежуток между ними */
@media (min-width: 721px) {
  .event-bar-label {
    display: inline-block;
    width: 13.6em;
  }
}

.event-bar-timer b::after {
  content: "";
  width: 10px;
  height: 10px;
  background: currentColor;
  -webkit-mask: var(--arrow) center / contain no-repeat;
  mask: var(--arrow) center / contain no-repeat;
}

@media (max-width: 720px) {
  .event-bar-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .event-bar-inner {
    font-size: 14px;
  }

  /* Подпись слева, цифры справа — положение цифр не зависит от ширины подписи */
  .event-bar-timer {
    align-self: stretch;
    justify-content: space-between;
    gap: 4px 8px;
  }

  .event-bar-timer b {
    gap: 8px;
    font-size: 20px;
  }
}

/* Шапка */

header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 32px;
  padding-block: 12px;
}

header a {
  display: block;
  padding: 8px 0;
}

/* Логотип: стрелка ↗ в тёмном квадрате и название в две строки */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0;
}

.logo-mark {
  position: relative;
  flex: none;
  width: 40px;
  height: 40px;
  background: var(--text);
}

/* Стрелка вырезана цветом фона — тот же знак, что на кнопках сайта */
.logo-mark::after {
  content: "";
  position: absolute;
  inset: 22%;
  background: var(--bg);
  -webkit-mask: var(--arrow) center / contain no-repeat;
  mask: var(--arrow) center / contain no-repeat;
}

.logo-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.01em;
}

nav ul {
  display: flex;
  column-gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu-toggle {
  display: none;
  padding: 8px 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
}

.menu-toggle:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* На десктопе подчёркивание пунктов меню вырастает слева направо */
@media (min-width: 881px) {
  header a {
    background: linear-gradient(currentColor, currentColor) 0 calc(100% - 5px) / 0 1px no-repeat;
  }

  header a:hover,
  header a[aria-current="page"] {
    background-size: 100% 1px;
    text-decoration: none;
  }

  /* У логотипа линия идёт по нижнему краю: в пунктах меню она поднята под текст,
     а здесь это резало бы квадрат со стрелкой */
  .logo {
    background-position: 0 100%;
  }
}

@media (min-width: 881px) and (prefers-reduced-motion: no-preference) {
  header a {
    transition: background-size 0.3s cubic-bezier(0.2, 0.65, 0.2, 1);
  }
}

/* На телефоне и планшете меню прячется за кнопкой и раскрывается списком на всю ширину.
   Граница 880px: на экранах шире логотип и три пункта меню помещаются в одну строку */
@media (max-width: 880px) {
  header {
    justify-content: space-between;
    gap: 0;
  }

  /* После касания состояние наведения на телефоне залипает, и у логотипа остаётся
     подчёркивание под названием — выглядит как ошибка вёрстки */
  .logo:hover {
    text-decoration: none;
  }

  .menu-toggle {
    display: block;
  }

  /* Меню раскрывается по высоте (0fr → 1fr); visibility убирает закрытые пункты из перехода по Tab */
  header nav {
    display: grid;
    grid-template-rows: 0fr;
    width: 100%;
    visibility: hidden;
  }

  .menu-toggle[aria-expanded="true"] + nav {
    grid-template-rows: 1fr;
    visibility: visible;
  }

  nav ul {
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
  }

  nav li:first-child {
    padding-top: 8px;
  }

  nav a {
    padding: 14px 0;
    border-top: 1px solid var(--text);
  }

  nav li:last-child a {
    border-bottom: 1px solid var(--text);
  }
}

@media (max-width: 880px) and (prefers-reduced-motion: no-preference) {
  header nav {
    transition: grid-template-rows 0.35s cubic-bezier(0.2, 0.65, 0.2, 1), visibility 0s 0.35s;
  }

  .menu-toggle[aria-expanded="true"] + nav {
    transition: grid-template-rows 0.35s cubic-bezier(0.2, 0.65, 0.2, 1), visibility 0s;
  }

  nav li {
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  .menu-toggle[aria-expanded="true"] + nav li {
    opacity: 1;
    transform: none;
    transition-delay: 0.1s;
  }

  .menu-toggle[aria-expanded="true"] + nav li + li {
    transition-delay: 0.18s;
  }
}

/* Первый экран */

.hero {
  container-type: inline-size;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px 48px;
  padding-top: 8px;
}

/* Размер подобран так, чтобы заголовок занимал всю ширину в одну строку.
   Отрицательный отступ компенсирует пустое место слева у буквы «Б» */
.hero h1 {
  grid-column: 1 / -1;
  margin-left: -0.05em;
  font-size: calc(100cqi / 8.82);
  line-height: 0.85;
  white-space: nowrap;
}

/* На узких экранах — в две строки: «Бизнес-клуб» / «СПбГУ» */
@media (max-width: 720px) {
  .hero h1 {
    margin-left: 0;
    font-size: calc(100cqi / 5.92);
    line-height: 0.9;
    white-space: normal;
  }
}

/* «СПбГУ» остаётся со строчной «б» даже в заглавном тексте */
abbr {
  text-decoration: none;
  text-transform: none;
}

.hero p {
  max-width: 520px;
}

/* На десктопе подзаголовок скрыт, показываем только на телефоне */
@media (min-width: 721px) {
  .hero p {
    display: none;
  }
}

/* Кто мы */

.about > p {
  max-width: 640px;
  margin-top: 24px;
}

.about .cards {
  margin-top: clamp(32px, 4vw, 48px);
}

/* Карточки */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cards li {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  min-height: 220px;
  padding: 20px;
  border: 1px solid var(--text);
}

/* Гости */

/* Фото на белом фоне: multiply растворяет белый в фоне страницы */
.interview-card img,
.article-hero img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: top;
  mix-blend-mode: multiply;
}

/* На телефоне гости — карусель на всю ширину экрана: карточки уходят за край экрана,
   а не обрезаются отступами страницы. На десктопе остаётся обычная сетка.
   Два класса — чтобы перебить сетку .interviews, объявленную ниже */
@media (max-width: 720px) {
  .cards.carousel {
    grid-auto-flow: column;
    grid-template-columns: none;
    grid-auto-columns: min(300px, 78%);
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-padding-inline: var(--gutter);
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .carousel::-webkit-scrollbar {
    display: none;
  }

  .carousel > li {
    scroll-snap-align: start;
  }
}

/* Программа */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px 48px;
}

.split-intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.split-intro h2 {
  width: min-content;
}

.split-intro p {
  max-width: 320px;
}

.split-intro .button {
  margin-top: auto;
}

.numbered {
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--text);
}

.numbered li {
  padding: 20px 0 24px;
  border-top: 1px solid var(--text);
}

.numbered p {
  margin-top: 8px;
}

/* Мероприятия */

.events ul {
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--text);
}

.events li {
  display: grid;
  grid-template-columns: 200px 1fr auto;
  align-items: center;
  gap: 8px 48px;
  padding: 24px 0;
  border-top: 1px solid var(--text);
}

.events time {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  line-height: 1;
}

.events li p {
  margin-top: 8px;
  color: var(--muted);
}

.events .link {
  justify-self: start;
}

/* Заглушка вместо ссылки, пока регистрация закрыта: серая и без стрелки, чтобы не выглядела нажимаемой */
.link-soon {
  justify-self: start;
  padding: 8px 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* CTA */

.cta {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 24px 48px;
}

.cta h2,
.cta p {
  grid-column: 1;
}

.cta p {
  max-width: 520px;
}

.cta .button {
  grid-column: 2;
  grid-row: 1 / 3;
}

/* Telegram: тот же призыв, что и CTA, но в рамке — чтобы два блока подряд не сливались */
.telegram {
  padding: clamp(32px, 5vw, 64px) clamp(20px, 4vw, 48px);
  border: 1px solid var(--text);
}

/* Подвал */

footer {
  border-top: 1px solid var(--text);
}

/* Карточки в ряд; если не помещаются — друг под другом */
/* Общие строки для всех карточек: заголовок, подпись под ним и контакты.
   Поэтому контакты начинаются на одном уровне, даже если подписи в карточке нет */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
  grid-template-rows: auto auto 1fr;
  gap: 24px;
  margin-top: clamp(32px, 4vw, 48px);
}

.contact-card {
  display: grid;
  grid-row: span 3;
  grid-template-rows: subgrid;
  row-gap: 0;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--text);
}

/* Заголовок карточки крупнее контактов — сразу видно, чьи это контакты и для чего */
.contact-card h3 {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.5vw, 28px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.contact-card > p {
  margin-top: 6px;
  color: var(--muted);
}

/* Контакты в ряд, всегда в третьей строке карточки — даже если подписи под заголовком нет */
.contacts {
  display: flex;
  flex-wrap: wrap;
  grid-row: 3;
  align-content: start;
  gap: 12px 24px;
  margin: 0;
  padding-top: 24px;
}

.contacts div {
  flex: 1 1 auto;
  padding-top: 12px;
  border-top: 1px solid var(--text);
}

.contacts dt {
  font-size: 14px;
  color: var(--muted);
}

.contacts dd {
  margin: 4px 0 0;
  font-size: clamp(18px, 2vw, 22px);
}

.contacts a {
  color: inherit;
  text-decoration: none;
  overflow-wrap: anywhere;
}

/* Карта в подвале: виджет Яндекс Карт в своих цветах — так читаются метка и ориентиры */
.map-section h2 {
  font-size: clamp(32px, 4vw, 48px);
}

.map-section p {
  max-width: 520px;
  margin-top: 16px;
}

.map {
  margin-top: clamp(24px, 3vw, 32px);
  border: 1px solid var(--text);
  aspect-ratio: 16 / 7;
}

.map iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 720px) {
  .map {
    aspect-ratio: 4 / 5;
  }
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px 48px;
  padding-block: 32px 40px;
  border-top: 1px solid var(--text);
}

.footer-bottom address {
  font-size: 14px;
  font-style: normal;
}

/* На телефоне улица и дом — всегда второй строкой */
@media (max-width: 720px) {
  .footer-bottom address span {
    display: block;
  }
}

.legal {
  display: flex;
  flex-wrap: wrap;
  flex-basis: 100%;
  order: 1;
  gap: 8px 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-bottom .legal a {
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
}

.footer-bottom .legal a:hover {
  color: var(--text);
}

/* Страница программы для основателей */

/* На телефоне и планшете текущий пункт меню подчёркнут обычной линией; на десктопе — анимированной (раздел «Шапка») */
@media (max-width: 880px) {
  header a[aria-current="page"] {
    text-decoration: underline;
    text-underline-offset: 4px;
  }
}

.page-hero {
  padding-top: 8px;
}

/* Минимум 48px, но на экранах уже ~370px он уменьшается вместе с экраном —
   иначе длинное слово («МЕРОПРИЯТИЙ») не помещается в строку на 320px */
.page-hero h1 {
  font-size: clamp(min(48px, 13vw), 9vw, 120px);
  line-height: 0.9;
  text-wrap: balance;
}

/* Отрицательный отступ компенсирует пустое место слева у буквы «П», как на главной.
   У «А» в «Архиве мероприятий» такого места почти нет, поэтому там сдвига нет */
.program-hero h1 {
  margin-left: -0.05em;
}

@media (max-width: 720px) {
  .program-hero h1 {
    margin-left: 0;
  }
}

.page-hero > p {
  max-width: 640px;
  margin-top: 24px;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.35;
}

.page-hero > .button {
  margin-top: 32px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 24px;
  margin: clamp(48px, 6vw, 80px) 0 0;
}

.stats div {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--text);
}

/* Число над подписью, хотя в разметке подпись первая — так пара правильно читается скринридером */
.stats dd {
  order: -1;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 700;
  line-height: 1;
}

.stats dt {
  max-width: 260px;
  color: var(--muted);
}

.split-text p {
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.4;
}

.split-text p + p {
  margin-top: 16px;
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  border-bottom: 1px solid var(--text);
}

.steps li {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) minmax(0, 2fr);
  align-items: baseline;
  gap: 8px 48px;
  padding: 24px 0;
  border-top: 1px solid var(--text);
  counter-increment: step;
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  line-height: 1;
}

@media (max-width: 720px) {
  .steps li {
    grid-template-columns: 1fr;
  }
}

.benefits {
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
}

.benefits li {
  min-height: 180px;
}

/* Архив и интервью */

.interviews {
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
}

.interviews li {
  padding: 0;
  border: 0;
}

/* Вся карточка — ссылка. Подпись «Читать интервью ↗» и подсветка при наведении показывают, что на неё можно нажать */
.interview-card {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
  border: 1px solid var(--text);
  color: inherit;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

/* Непрозрачный цвет: фото смешиваются с ним через multiply */
.interview-card:hover {
  background: var(--surface);
}

/* Safari смешивает multiply только с фоном элементов страницы, а не с фоном body,
   поэтому у контейнеров фото свой фон — иначе белый фон на фото остаётся белым */
.interview-card,
.article-hero {
  isolation: isolate;
  background-color: var(--bg);
}

.interview-card:hover .link {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.interview-card .link {
  margin-top: auto;
  padding: 0;
}

.card-label {
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--muted);
}

.interview-card h3 + p {
  margin-top: 8px;
}

.back-link {
  display: inline-block;
  padding: 8px 0;
  color: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-transform: uppercase;
}

.back-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.article-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 400px);
  align-items: end;
  gap: 32px 48px;
  padding-top: 8px;
}

/* Отрицательный отступ компенсирует пустое место слева у буквы «И» */
.article-hero h1 {
  margin: 24px 0 0 -0.05em;
  font-size: clamp(40px, 6vw, 88px);
  line-height: 0.95;
  text-wrap: balance;
}

.article-hero p {
  margin-top: 16px;
  font-size: clamp(18px, 2vw, 22px);
  color: var(--muted);
}

@media (max-width: 720px) {
  .article-hero {
    grid-template-columns: 1fr;
  }

  .article-hero h1 {
    margin-left: 0;
  }
}

/* Идеи встречи — это предложения, поэтому без заглавных букв */
.ideas h3 {
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0;
  text-transform: none;
}

/* Страницы документов. Самое длинное слово «КОНФИДЕНЦИАЛЬНОСТИ» — около 10,7 своей высоты шрифта в ширину,
   поэтому на узком экране размер не больше (ширина экрана − поля) / 11 */
.legal-page h1 {
  font-size: clamp(min(26px, (100vw - 2 * var(--gutter)) / 11), 6vw, 80px);
}

/* Текст документа: узкая колонка для чтения, заголовки разделов заметно меньше обычных */
.legal-doc {
  max-width: 760px;
  padding-bottom: clamp(40px, 6vw, 80px);
  line-height: 1.6;
  overflow-wrap: break-word;
}

/* line-height 1.1 — чтобы «Д» и «Й» в соседних строках заголовка не накладывались */
.legal-doc h2 {
  margin: 48px 0 16px;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.1;
}

.legal-doc h2:first-child {
  margin-top: 0;
}

.legal-doc p + p,
.legal-doc ul + p {
  margin-top: 12px;
}

.legal-doc ul {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.legal-doc li {
  position: relative;
  padding-left: 24px;
}

.legal-doc li + li {
  margin-top: 8px;
}

.legal-doc li::before {
  content: "—";
  position: absolute;
  left: 0;
}

.legal-doc a {
  color: inherit;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

/* Мобильные */

@media (max-width: 720px) {
  .hero,
  .split,
  .cta,
  .events li {
    grid-template-columns: 1fr;
  }

  .cta .button {
    grid-column: 1;
    grid-row: auto;
  }

  .button {
    width: 100%;
  }

  .cards li {
    min-height: 160px;
  }
}

/* Анимации: появление при прокрутке (animations.js) и стрелка ↗ при наведении.
   Только проявление и небольшой подъём — без масштабирования и «прыжков», в духе строгого дизайна */

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
}

@media (prefers-reduced-motion: no-preference) {
  /* Те же селекторы, что в animations.js */
  .js-anim :is(.hero > *, .page-hero > :is(h1, p, .button), .article-hero > *, .section-head, .split-intro, .split-text, .about > :is(h2, p), .cta > *, footer section > h2):not(.is-visible),
  .js-anim :is(.cards, .numbered, .events ul, .steps, .stats, .contact-cards):not(.is-visible) > * {
    opacity: 0;
  }

  /* backwards: во время задержки элемент скрыт, после анимации возвращаются обычные стили */
  .js-anim :is(.hero > *, .page-hero > :is(h1, p, .button), .article-hero > *, .section-head, .split-intro, .split-text, .about > :is(h2, p), .cta > *, footer section > h2).is-visible,
  .js-anim :is(.cards, .numbered, .events ul, .steps, .stats, .contact-cards).is-visible > * {
    animation: reveal 0.8s cubic-bezier(0.2, 0.65, 0.2, 1) calc(var(--i, 0) * 80ms) backwards;
  }

  .button::after,
  .link::after {
    transition: transform 0.2s ease;
  }

  .button:hover::after,
  .link:hover::after,
  .interview-card:hover .link::after {
    transform: translate(2px, -2px);
  }
}

/* Пока встреча загружается, страница держит высоту — подвал не прыгает вверх */
#post:empty {
  min-height: 70vh;
}

/* Фотографии встречи в посте архива (post.html) */
.photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: clamp(12px, 2vw, 20px);
  margin: clamp(24px, 3vw, 32px) 0 0;
  padding: 0;
  list-style: none;
}

.photos img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--text);
  object-fit: cover;
}

/* Админка (admin.html): вход редактора, списки мероприятий и постов, формы */

/* Поля — как кнопки: тонкая рамка без скруглений. Шрифт 16px — иначе iPhone увеличивает страницу при вводе */
.lock-form input,
.field input,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--text);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  -webkit-appearance: none;
  appearance: none;
}

.field input[type="file"] {
  padding: 12px 14px;
  line-height: 1.4;
}

.field textarea {
  min-height: 120px;
  padding-block: 12px;
  resize: vertical;
}

.field {
  display: grid;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

.field small {
  font-size: 14px;
}

.lock-form {
  display: grid;
  gap: 16px;
  max-width: 560px;
  margin-top: 32px;
}

/* Место под сообщение об ошибке занято заранее — форма не сдвигается, когда оно появляется */
.form-error {
  min-height: 1.4em;
  font-weight: 500;
}

.form-fields {
  display: grid;
  gap: 24px;
  min-width: 0;
  max-width: 720px;
  margin: 0;
  padding: 0;
  border: 0;
}

.field-group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.field-group legend {
  margin-bottom: 8px;
  padding: 0;
  font-size: 14px;
  color: var(--muted);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 32px;
}

.checkbox {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  cursor: pointer;
}

.checkbox input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--text);
}

/* Кнопка без рамки — как «Меню» в шапке */
.text-button {
  padding: 8px 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}

.text-button:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Почта редактора и выход — в шапке админки */
.admin-user {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
  font-size: 14px;
  color: var(--muted);
}

.admin-tabs {
  display: flex;
  gap: 32px;
  border-bottom: 1px solid var(--text);
}

.admin-tabs .is-current {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.admin-list {
  margin: clamp(24px, 3vw, 32px) 0 0;
  padding: 0;
  list-style: none;
}

.admin-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px 32px;
  padding: 20px 0;
  border-bottom: 1px solid var(--text);
}

.admin-row h3 {
  margin: 4px 0;
}

.admin-row .link {
  padding: 4px 0 0;
  font-size: 14px;
}

.admin-row-actions {
  display: flex;
  flex: none;
  gap: 24px;
}

.admin-empty {
  padding: 24px 0;
  border-block: 1px solid var(--text);
  color: var(--muted);
}

.admin-form {
  display: grid;
  gap: 24px;
  margin-top: clamp(24px, 3vw, 32px);
  padding: 24px;
  border: 1px solid var(--text);
}

/* Идея встречи: заголовок, текст и кнопка «убрать» */
.idea-row {
  display: grid;
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--surface);
}

.admin-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.admin-photo {
  display: grid;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
}

.admin-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--text);
  object-fit: cover;
}

.admin-photo span {
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 720px) {
  .admin-form {
    padding: 16px;
  }

  .admin-row {
    flex-direction: column;
  }
}
