/* =========================================================
   Палата69 — основные стили
   ========================================================= */

:root {
  /* Цвета */
  --paper: #ecefe8;
  --paper-2: #e1e6dd;
  --paper-3: #d5dcd2;
  --card: #f8faf6;
  --ink: #111513;
  --ink-2: #2a322d;
  --muted: #4a534d;
  --line-soft: #9aa39c;
  --green: #1f4d3a;
  --green-deep: #16241d;
  --on-dark: #ecefe8;
  --on-dark-2: #cfd8d1;
  --on-dark-3: #a9bdb1;
  --dash-dark: #6e8f7e;
  --accent: #e5402a;

  /* Шрифты */
  --font-display: 'Unbounded', 'Arial Black', sans-serif;
  --font-body: 'Golos Text', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Сетка */
  --gutter: clamp(16px, 5.5vw, 80px);
  --container: 1440px;
  --section-y: clamp(64px, 8.5vw, 120px);
  --header-h: 88px;

  /* Прочее */
  --border: 2px solid var(--ink);
  --shadow: 5px 5px 0 var(--ink);
  --ease: cubic-bezier(.2, .7, .3, 1);
}

@media (max-width: 1099px) {
  :root { --header-h: 64px; }
}

/* ---------- База ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.no-scroll { overflow: hidden; }

h1, h2, h3, p, ul, dl, dd { margin: 0; }
/* hidden должен побеждать display у .btn, .rows и т.п. */
[hidden] { display: none !important; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

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

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 12px 16px;
  background: var(--ink);
  color: var(--on-dark);
  font-weight: 600;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.icon {
  width: 1.1em;
  height: 1.1em;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Больничная «плитка» */
.tiles {
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(17, 21, 19, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 21, 19, .07) 1px, transparent 1px);
  background-size: 40px 40px;
}
.tiles--dark {
  background-color: var(--green-deep);
  background-image:
    linear-gradient(rgba(236, 239, 232, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(236, 239, 232, .05) 1px, transparent 1px);
}

/* ---------- Типографика ---------- */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.eyebrow--accent { color: var(--accent); }
.eyebrow--line {
  display: flex;
  align-items: center;
  gap: 12px;
}
.eyebrow--line::before {
  content: '';
  width: 32px;
  height: 2px;
  background: currentColor;
  flex-shrink: 0;
}

.label {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.label--strong { font-weight: 700; letter-spacing: .1em; color: inherit; }
.label--on-dark { font-weight: 700; color: var(--on-dark-3); }

.tag {
  display: inline-block;
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.tag--accent { background: var(--accent); color: var(--ink); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  transition: gap .2s var(--ease);
}
.link-arrow:hover { gap: 12px; }
.link-arrow--accent { color: var(--accent); }

/* ---------- Кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px;
  border: var(--border);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease), background-color .15s;
}
.btn--sm { min-height: 44px; padding: 0 18px; font-size: 15px; }
.btn--lg { min-height: 60px; padding: 0 30px; font-size: 18px; }
.btn--block { display: flex; width: 100%; }
.btn--split { justify-content: space-between; }

.btn--accent { background: var(--accent); color: var(--ink); box-shadow: var(--shadow); }
.btn--accent:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.btn--accent:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--ink); }

.btn--light { background: var(--card); color: var(--ink); }
.btn--light:hover { background: var(--paper-2); }

.btn--outline { background: transparent; color: var(--ink); }
.btn--outline:hover { background: var(--card); }

.btn--dark { background: var(--ink); color: var(--on-dark); border-color: var(--ink); }
.btn--dark:hover { background: var(--ink-2); }

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  50% { opacity: .35; }
}

/* ---------- Шапка ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: var(--border);
}

.header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
}
.logo__mark { width: 40px; height: 40px; }
.logo__text {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 24px;
  letter-spacing: -.02em;
}

.nav {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-left: clamp(24px, 6vw, 120px);
}
.nav__list { display: flex; gap: clamp(20px, 3vw, 40px); }
.nav__link {
  position: relative;
  font-weight: 500;
  padding: 8px 0;
}
.nav__link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s var(--ease);
}
.nav__link:hover::after,
.nav__link[aria-current='page']::after { transform: scaleX(1); }
.nav__actions { display: flex; gap: 12px; }

.burger {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: var(--ink);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.burger__line {
  width: 20px;
  height: 2px;
  background: var(--on-dark);
  transition: transform .2s var(--ease), opacity .2s;
}
.is-menu-open .burger__line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.is-menu-open .burger__line:nth-child(2) { opacity: 0; }
.is-menu-open .burger__line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1099px) {
  .logo__mark { width: 32px; height: 32px; }
  .logo__text { font-size: 19px; }
  .burger { display: flex; }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 0;
    padding: 32px var(--gutter);
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    background: var(--paper);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .2s, transform .2s var(--ease), visibility 0s .2s;
  }
  .is-menu-open .nav {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity .2s, transform .2s var(--ease);
  }
  .nav__list { flex-direction: column; gap: 0; }
  .nav__link {
    display: block;
    padding: 18px 0;
    border-bottom: 1px dashed var(--line-soft);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 32px;
  }
  .nav__link::after { display: none; }
  .nav__actions { flex-direction: column; }
  .nav__actions .btn { min-height: 56px; font-size: 17px; }
}

/* ---------- Hero ---------- */

.hero { overflow-x: clip; }

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 480px;
  align-items: center;
  gap: 64px;
  padding-block: clamp(40px, 6vw, 88px) clamp(48px, 5vw, 72px);
  min-height: min(760px, calc(100svh - var(--header-h)));
}

.hero__content {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(60px, 9.4vw, 136px);
  line-height: .92;
  letter-spacing: -.045em;
}
.hero__num {
  color: var(--accent);
  -webkit-text-stroke: clamp(2px, .2vw, 3px) var(--ink);
  paint-order: stroke fill;
}

.hero__lead {
  max-width: 600px;
  font-size: clamp(18px, 1.55vw, 22px);
  line-height: 1.45;
  color: var(--ink-2);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* Медкарта */
.medcard {
  position: relative;
  background: var(--card);
  border: var(--border);
  box-shadow: 10px 10px 0 var(--ink);
}
.medcard__head {
  height: 48px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--ink);
  color: var(--on-dark);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.medcard__body {
  padding: 28px 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.medcard__title {
  margin-top: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 2.8vw, 40px);
  line-height: 1.05;
  letter-spacing: -.02em;
}

.stamp {
  position: absolute;
  top: -26px;
  right: -22px;
  padding: 10px 18px;
  border: 4px solid var(--accent);
  background: var(--card);
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: .04em;
  transform: rotate(-12deg);
  pointer-events: none;
}

/* Строки «ключ — значение» */
.medcard__empty { color: var(--muted); }

.rows { border-top: 2px dashed var(--ink); }
.rows__item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px dashed var(--line-soft);
}
.rows__item:last-child { border-bottom: 0; }
.rows dt { color: var(--muted); }
.rows dd { font-weight: 600; text-align: right; }
.rows--compact .rows__item { padding: 12px 0; font-size: 16px; }

@media (max-width: 1099px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    gap: 48px;
  }
  .medcard { max-width: 520px; }
}

@media (max-width: 599px) {
  .hero__content { gap: 24px; }
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; }
  .medcard { box-shadow: 6px 6px 0 var(--ink); }
  .medcard__head { height: 40px; padding: 0 16px; font-size: 12px; }
  .medcard__body { padding: 20px 16px; gap: 16px; }
  .rows__item { padding: 11px 0; font-size: 16px; }
  .stamp { top: -20px; right: 10px; padding: 6px 12px; border-width: 3px; font-size: 15px; }
}

/* ---------- Бегущая строка ---------- */

.ticker {
  overflow: hidden;
  background: var(--ink);
  color: var(--on-dark);
}
.ticker__track {
  display: flex;
  align-items: center;
  gap: 36px;
  width: max-content;
  height: 64px;
  padding-left: 36px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: .02em;
  white-space: nowrap;
  animation: ticker 30s linear infinite;
}
.ticker__track b { color: var(--accent); }

@keyframes ticker {
  to { transform: translateX(-50%); }
}

@media (max-width: 599px) {
  .ticker__track { height: 48px; gap: 20px; padding-left: 20px; font-size: 15px; }
}

/* ---------- Секции ---------- */

.section { padding-block: var(--section-y); }
.section--dark { color: var(--on-dark); }

.section__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 24px 48px;
  margin-bottom: clamp(32px, 4vw, 56px);
}
.section__title {
  margin-top: 16px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(44px, 6.7vw, 96px);
  line-height: .95;
  letter-spacing: -.04em;
}
.section__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  max-width: 440px;
  font-size: 19px;
  color: var(--ink-2);
}
.section--dark .section__aside { color: var(--on-dark-2); }
.section__aside .link-arrow {
  padding-bottom: 2px;
  border-bottom: 2px solid currentColor;
  color: var(--ink);
}
.section--dark .section__aside .link-arrow { color: var(--accent); }
.section__links { display: flex; gap: 12px; }

/* ---------- Ивенты ---------- */

.events {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.event-featured {
  grid-column: span 2;
  min-height: 420px;
  padding: 40px;
  display: flex;
  gap: 32px;
  background: var(--green);
  color: var(--on-dark);
  border: var(--border);
}
.event-featured__content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}
.event-featured__top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}
.event-featured__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 3.6vw, 52px);
  line-height: 1;
  letter-spacing: -.03em;
}
.event-featured__text { font-size: 18px; color: var(--on-dark-2); }
.event-featured__media { width: 340px; flex-shrink: 0; overflow: hidden; }
.event-featured--wide { grid-column: 1 / -1; }
.event-featured--empty { min-height: 320px; }

.has-image { padding: 0; }
.has-image img { width: 100%; height: 100%; object-fit: cover; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips li {
  padding: 8px 14px;
  border: 1.5px solid var(--on-dark);
  font-size: 15px;
  font-weight: 500;
}

.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--paper-2);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .06em;
  text-align: center;
}
.placeholder--dark {
  background: transparent;
  border: 2px dashed var(--dash-dark);
  color: var(--on-dark-3);
}

.casting {
  min-height: 420px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  background: var(--accent);
  color: var(--ink);
  border: var(--border);
}
.casting__top { display: flex; flex-direction: column; gap: 18px; }
.casting__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 2.2vw, 32px);
  line-height: 1.1;
  letter-spacing: -.02em;
}

.archive-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: var(--border);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.archive-card:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--ink); }
.archive-card__media { height: 180px; border-bottom: var(--border); overflow: hidden; }

/* Обложка ивента без картинки: «процедура» с номером на больничной плитке */
.cover {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px 20px;
  background-color: var(--green);
  background-image:
    linear-gradient(rgba(236, 239, 232, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(236, 239, 232, .08) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--on-dark);
}
.cover__label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--on-dark-3);
}
.cover__num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 56px;
  line-height: .9;
  letter-spacing: -.04em;
  color: var(--accent);
}
.cover__game {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.archive-card:nth-child(3n + 2) .cover { background-color: var(--ink-2); }

.events__more { display: flex; justify-content: center; margin-top: 32px; }
.events__count {
  padding: 2px 8px;
  background: var(--ink);
  color: var(--on-dark);
  font-family: var(--font-mono);
  font-size: 13px;
}

/* ---------- Страница «Ивенты» ---------- */

.year-block + .year-block { margin-top: clamp(48px, 6vw, 80px); }
.year-block__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px dashed var(--ink);
}
.year-block__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1;
  letter-spacing: -.04em;
}
.upcoming-list { display: flex; flex-direction: column; gap: 24px; }
.upcoming-list .event-featured { min-height: 360px; }
.archive-card__body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.archive-card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.2;
}
.archive-card .link-arrow { margin-top: 6px; }

@media (max-width: 1099px) {
  .events { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .event-featured--wide { grid-column: span 2; }
  .event-featured { flex-direction: column; min-height: 0; }
  .event-featured__media { width: auto; min-height: 200px; }
  .casting { grid-column: span 2; min-height: 0; }
}

@media (max-width: 699px) {
  .cover { padding: 8px; justify-content: center; align-items: center; }
  .cover__label, .cover__game { display: none; }
  .cover__num { font-size: 28px; }
  .events { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .event-featured,
  .casting { grid-column: auto; padding: 24px; }
  .event-featured__media { order: -1; min-height: 180px; }
  .event-featured__text { font-size: 16px; }

  .archive-card { flex-direction: row; align-items: center; gap: 14px; padding: 14px; }
  .archive-card__media { width: 88px; height: 88px; flex-shrink: 0; padding: 8px; border: 0; font-size: 11px; }
  .archive-card__body { padding: 0; gap: 6px; }
  .archive-card__title { font-size: 17px; }
  .archive-card .link-arrow { display: none; }
}

/* ---------- Команда ---------- */

.team {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
}

.badge {
  position: relative;
  padding: 40px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--paper);
  color: var(--ink);
  border-radius: 10px;
  transition: transform .2s var(--ease);
}
.badge:hover { transform: rotate(-1.5deg) translateY(-4px); }
/* прорезь под шнурок */
.badge::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  width: 56px;
  height: 10px;
  margin-left: -28px;
  border-radius: 5px;
  background: var(--green-deep);
}

.badge__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.badge__num { color: var(--muted); }
.badge__dept { padding: 3px 8px; background: var(--ink); color: var(--on-dark); }

.avatar {
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper-3);
  border: var(--border);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  overflow: hidden;
}
.avatar:not(.has-image) {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 900;
  color: var(--ink);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.badge__who { display: flex; flex-direction: column; gap: 6px; }
.badge__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
}
.badge__nick { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }

.badge__role {
  margin-top: auto;
  padding-top: 14px;
  border-top: 2px dashed var(--ink);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.badge__role strong { font-size: 17px; font-weight: 600; }
.badge__role span { font-size: 14px; line-height: 1.4; color: var(--muted); }

.depts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 24px;
}
.dept {
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 2px dashed var(--dash-dark);
  border-radius: 10px;
}
.dept__title {
  margin: 8px 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 30px;
  letter-spacing: -.02em;
}
.dept__text { color: var(--on-dark-2); }
.dept__links { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; flex-shrink: 0; }
.dept__links .link-arrow { color: var(--on-dark); }
.dept__links .link-arrow--accent { color: var(--accent); }

@media (max-width: 1199px) {
  .team { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dept { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 767px) {
  .team { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .badge { padding: 30px 14px 16px; gap: 12px; border-radius: 8px; }
  .badge::before { top: 10px; width: 44px; height: 8px; margin-left: -22px; }
  .badge--lead { grid-column: span 2; }
  .avatar { width: 64px; height: 64px; font-size: 10px; }
  .badge__name { font-size: 20px; }
  .badge__role strong { font-size: 15px; }
  .badge__role span { font-size: 13px; }

  .depts { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 12px; }
  .dept { padding: 20px; flex-direction: column; align-items: flex-start; }
  .dept__title { font-size: 24px; }
}

/* ---------- Страница «Команда» ---------- */

.page-hero { padding-block: clamp(48px, 7vw, 96px) clamp(40px, 5vw, 64px); border-bottom: var(--border); }
.page-hero__title {
  margin-top: 16px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(56px, 9vw, 128px);
  line-height: .92;
  letter-spacing: -.045em;
}
.page-hero__lead { margin-top: 24px; max-width: 640px; font-size: clamp(18px, 1.5vw, 21px); color: var(--ink-2); }

.dept-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.dept-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: var(--border);
  background: var(--card);
  font-weight: 600;
  transition: background-color .15s;
}
.dept-nav a:hover { background: var(--paper-2); }
.dept-nav span { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }

.dept-block + .dept-block { margin-top: clamp(56px, 7vw, 96px); }
.dept-block__head > div { min-width: 0; }
.dept-block__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px 40px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 2px dashed var(--dash-dark);
}
.dept-block__title {
  margin-top: 10px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(26px, 4.4vw, 60px);
  line-height: 1;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}
.dept-block__text { max-width: 480px; color: var(--on-dark-2); }
.dept-block__empty {
  padding: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  border: 2px dashed var(--dash-dark);
  border-radius: 10px;
  color: var(--on-dark-2);
}

/* ---------- Кликабельные карточки ---------- */

/* Ссылка в заголовке растягивается на всю карточку (карточка — position: relative) */
.archive-card, .event-featured, .medcard { position: relative; }
.card-link { color: inherit; }
.card-link::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.card-link:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.archive-card [data-field="link"],
.medcard .btn,
.event-featured .btn { position: relative; z-index: 2; }
.medcard .stamp { z-index: 2; }

/* ---------- Участник: период и контакты ---------- */

.badge__period {
  align-self: flex-start;
  margin-top: 4px;
  padding: 2px 8px;
  background: var(--paper-3);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
}
.badge--former { opacity: .72; }
.badge--former .badge__period { background: var(--line-soft); color: var(--ink); }
.badge__contacts { display: flex; flex-wrap: wrap; gap: 6px; }
.contact {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1.5px solid var(--ink);
  background: var(--card);
  color: var(--ink);
  font: 600 13px/1 var(--font-body);
  cursor: pointer;
}
.contact:hover { background: var(--ink); color: var(--on-dark); }

/* ---------- Отметки статуса и окно участника ---------- */

.badge { position: relative; }
.card-link--button {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.badge__contacts { position: relative; z-index: 2; }

.status-mark {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.status-mark::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-mark--active { background: #dcebe2; color: var(--green); }
.status-mark--discharged { background: var(--paper-3); color: var(--muted); }
.status-mark--transferred { background: #fbe4e1; color: #b3261e; }

.member-modal {
  width: min(720px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  padding: 0;
  border: var(--border);
  background: var(--card);
  color: var(--ink);
  box-shadow: 12px 12px 0 var(--ink);
}
.member-modal::backdrop { background: rgba(17, 21, 19, .6); }
.member-modal__close {
  position: sticky;
  top: 0;
  float: right;
  z-index: 3;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-left: var(--border);
  border-bottom: var(--border);
  background: var(--ink);
  color: var(--on-dark);
  cursor: pointer;
}
.member-modal__close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.member-modal__body { padding: 28px clamp(18px, 4vw, 36px) 32px; display: flex; flex-direction: column; gap: 22px; }
.member-modal__head { display: flex; gap: 20px; align-items: center; padding-right: 36px; }
.member-modal__avatar { width: 112px; height: 112px; flex-shrink: 0; font-size: 48px; }
.member-modal__who { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.member-modal__name { font: 900 clamp(28px, 4vw, 40px)/1 var(--font-display); letter-spacing: -.03em; overflow-wrap: anywhere; }
.member-modal__reason { font-size: 14px; color: var(--muted); }
.member-modal__facts { border-top-width: 2px; }
.member-modal__section { display: flex; flex-direction: column; gap: 10px; }
.member-modal__heading {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.member-modal__text { white-space: pre-line; font-size: 17px; line-height: 1.55; }
.member-modal__loading { padding: 32px 0; color: var(--muted); }

.history { display: flex; flex-direction: column; border-left: 3px solid var(--ink); }
.history__item { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 4px 0 14px 18px; }
.history__item::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 8px;
  width: 13px;
  height: 13px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--card);
}
.history__item:first-child::before { background: var(--accent); }
.history__dept {
  align-self: flex-start;
  padding: 2px 8px;
  background: var(--paper-3);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.history__dept--dark { background: var(--ink); color: var(--on-dark); }
.history__role { font-size: 17px; }
.history__desc { color: var(--muted); font-size: 15px; }
.history__period { font-family: var(--font-mono); font-size: 13px; color: var(--green); }

.member-events { display: flex; flex-direction: column; gap: 8px; }
.member-events li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.member-events__link { font-weight: 600; border-bottom: 2px solid var(--accent); }
.member-events__meta { font-size: 14px; color: var(--muted); }

@media (max-width: 520px) {
  .member-modal__head { flex-direction: column; align-items: flex-start; }
  .member-modal__avatar { width: 88px; height: 88px; font-size: 36px; }
}

/* ---------- «Команда»: годы ---------- */

.year-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.year-tab {
  min-height: 44px;
  padding: 0 18px;
  border: var(--border);
  background: var(--card);
  color: var(--ink);
  font: 700 16px var(--font-display);
  cursor: pointer;
}
.year-tab:hover { background: var(--paper-2); }
.year-tab[aria-pressed='true'] { background: var(--ink); color: var(--on-dark); box-shadow: 4px 4px 0 var(--accent); }
.empty-note--dark { border-color: var(--dash-dark); color: var(--on-dark-2); }

/* ---------- Страница ивента ---------- */

.event-hero { padding-block: clamp(32px, 5vw, 64px) clamp(48px, 6vw, 88px); border-bottom: var(--border); }
.crumbs { display: flex; gap: 10px; margin-bottom: 28px; font-family: var(--font-mono); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.crumbs a { border-bottom: 2px solid transparent; }
.crumbs a:hover { border-color: currentColor; }
.event-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
.event-hero__text { display: flex; flex-direction: column; gap: 22px; }
.event-hero__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(44px, 6.4vw, 96px);
  line-height: .95;
  letter-spacing: -.04em;
  overflow-wrap: anywhere;
}
.event-hero__lead { font-size: clamp(17px, 1.5vw, 20px); color: var(--ink-2); max-width: 560px; }
.event-hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.chips--light li { border-color: var(--ink); }
.event-media {
  aspect-ratio: 16 / 9;
  border: var(--border);
  box-shadow: 10px 10px 0 var(--ink);
  background: var(--card);
  overflow: hidden;
}
.event-media iframe { width: 100%; height: 100%; border: 0; display: block; }
.event-media.cover { box-shadow: 10px 10px 0 var(--ink); }
.event-media .cover__num { font-size: clamp(64px, 9vw, 128px); }
.event-pager__inner { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.pager-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px 28px;
  border: var(--border);
  background: var(--card);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.pager-card:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--ink); }
.pager-card strong { font: 700 22px/1.2 var(--font-display); }
.pager-card__date { color: var(--muted); }
.pager-card--next { text-align: right; align-items: flex-end; grid-column: 2; }

@media (max-width: 899px) {
  .event-hero__grid { grid-template-columns: minmax(0, 1fr); }
  .event-media { box-shadow: 6px 6px 0 var(--ink); }
  .event-pager__inner { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .pager-card--next { grid-column: auto; }
}

/* ---------- Анкета ---------- */

.apply { max-width: 880px; }
.apply-form { display: flex; flex-direction: column; gap: 24px; }
.apply-form__group { margin: 0; padding: 0; border: 0; }
.apply-form__legend { margin-bottom: 14px; padding: 0; font: 700 14px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; }
.role-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.role-option {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 18px 18px 50px;
  border: var(--border);
  background: var(--card);
  cursor: pointer;
}
.role-option input { position: absolute; left: 18px; top: 20px; width: 20px; height: 20px; accent-color: var(--accent); }
.role-option strong { font: 700 20px var(--font-display); }
.role-option span { font-size: 14px; color: var(--muted); }
.role-option:has(input:checked) { box-shadow: 5px 5px 0 var(--accent); }
.apply-form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; }
.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-field__label { font-weight: 600; }
.form-field__label b { color: var(--accent); }
.form-field__hint { font-size: 13px; color: var(--muted); }
.form-input {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: var(--border);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  font: 17px/1.4 var(--font-body);
}
textarea.form-input { resize: vertical; min-height: 140px; }
.form-input:focus { outline: 3px solid var(--accent); outline-offset: 0; }
.check-line { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.check-line input { width: 22px; height: 22px; margin: 0; flex-shrink: 0; accent-color: var(--green); }
.form-alert { padding: 14px 16px; border: 2px solid #b3261e; background: #fbe4e1; color: #b3261e; font-weight: 600; }
.apply-form .btn { align-self: flex-start; }
.apply-result { display: flex; flex-direction: column; gap: 16px; }
.apply-result__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
/* Ловушка для ботов: убрана с экрана, но остаётся в форме */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 599px) {
  .apply-form__grid { grid-template-columns: minmax(0, 1fr); }
  .apply-form .btn { align-self: stretch; }
}

/* ---------- Клипы ---------- */

.clips {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.clip {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.clip__media {
  position: relative;
  aspect-ratio: 9 / 14;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--green);
  border: var(--border);
  overflow: hidden;
}
.clip__media--alt { background-color: var(--ink-2); }
.clip__media { background-size: cover; background-position: center; }
.clip__source {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 5px 10px;
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.play {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  border: var(--border);
  transition: transform .2s var(--ease);
}
.play svg { width: 28px; height: 28px; fill: var(--ink); }
.clip:hover .play { transform: scale(1.12); }
.clip__title { font-weight: 600; font-size: 18px; line-height: 1.35; }

@media (max-width: 999px) {
  .clips { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
}
@media (max-width: 599px) {
  .clip__source { top: 8px; left: 8px; padding: 4px 8px; font-size: 11px; }
  .play { width: 52px; height: 52px; }
  .play svg { width: 22px; height: 22px; }
  .clip__title { font-size: 15px; }
  .section__links { width: 100%; }
  .section__links .btn { flex: 1; }
}

/* ---------- Набор ---------- */

.join {
  padding-block: clamp(64px, 8vw, 112px);
  background: var(--accent);
  color: var(--ink);
  border-top: var(--border);
}
.join__inner {
  display: grid;
  grid-template-columns: minmax(0, 560px) minmax(0, 1fr);
  gap: 64px;
}
.join__intro {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
}
.join__title {
  margin: 20px 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(42px, 6.1vw, 88px);
  line-height: .95;
  letter-spacing: -.04em;
}
.join__lead { font-size: 20px; }
.join__actions { display: flex; flex-wrap: wrap; gap: 14px; }

.roles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.role-card {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--card);
  border: var(--border);
  box-shadow: 6px 6px 0 var(--ink);
}
.role-card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 36px;
  letter-spacing: -.02em;
}
.role-card .rows { margin-top: auto; }
.role-card .btn { margin-top: auto; }
.role-card .rows + .btn { margin-top: 0; }
.role-card--closed { box-shadow: none; opacity: .75; }
.role-card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.status {
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.status--open { background: var(--green); color: var(--on-dark); }
.status--closed { background: var(--paper-3); color: var(--muted); }

.empty-note {
  padding: 32px;
  border: 2px dashed var(--line-soft);
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1099px) {
  .join__inner { grid-template-columns: minmax(0, 1fr); gap: 40px; }
}
@media (max-width: 599px) {
  .join__lead { font-size: 17px; }
  .join__actions { flex-direction: column; }
  .join__actions .btn { width: 100%; }
  .roles { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .role-card { padding: 24px; }
  .role-card__title { font-size: 28px; }
}

/* ---------- Подвал ---------- */

.footer {
  padding-block: clamp(48px, 6vw, 88px) clamp(32px, 3vw, 48px);
  background: var(--ink);
  color: var(--on-dark);
}
.footer__top {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 40px 48px;
}
.footer__about {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 420px;
  font-size: 18px;
  color: var(--on-dark-2);
}
.footer__nav { display: flex; gap: clamp(48px, 7vw, 96px); }
.footer__nav ul { display: flex; flex-direction: column; gap: 14px; }
.footer__nav a { transition: color .15s; }
.footer__nav a:hover { color: var(--accent); }
.footer__heading {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--line-soft);
}
.footer__mark {
  margin-top: clamp(40px, 5vw, 72px);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(36px, 11.6vw, 176px);
  line-height: .85;
  letter-spacing: -.05em;
  white-space: nowrap;
}
.footer__mark span { color: var(--accent); }
.footer__bottom {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #3a433d;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-size: 15px;
  color: var(--line-soft);
}

/* ---------- Меньше движения ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
