/* ============================================================
   ХК ТРАКТОР · 2017 — style.css
   Чистый CSS. Строгая палитра: чёрный / белый / акцент.
   ============================================================ */

/* ---------- Токены ---------- */
:root {
  --black:        #000000;
  --black-soft:   #08080a;
  --black-card:   #0c0c0e;
  --black-line:   #1c1c20;
  --white:        #ffffff;
  --white-dim:    rgba(255, 255, 255, 0.62);
  --white-faint:  rgba(255, 255, 255, 0.35);

  /* Акцент: ледовый циан. Поменяйте одну строку — и акцент везде.
     Альтернативы: #E4001F (тракторовский красный), #F5C518 (золото) */
  --accent:       #19C6E8;
  --accent-dark:  #0E9DBB;

  --font-display: 'Russo One', 'Oswald', 'Arial Narrow', system-ui, sans-serif;
  --font-cond:    'Oswald', 'Arial Narrow', system-ui, sans-serif;

  --container:    1280px;
  --header-h:     72px;
  --radius:       2px;

  --ease:         cubic-bezier(0.22, 0.61, 0.36, 1);
  --shadow-glow:  0 0 0 1px var(--accent),
                  0 18px 40px -18px rgba(25, 198, 232, 0.55),
                  0 0 32px -8px rgba(25, 198, 232, 0.35);
}

/* ---------- Сброс ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--font-cond);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
.card__img,
.modal__img {
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3, p, dl, dd, dt { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--black); }

/* ---------- Фон сайта: чёрный + текстура льда (диагонали) ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1200px 700px at 50% -10%, rgba(255, 255, 255, 0.055), transparent 70%),
    radial-gradient(900px 600px at 110% 110%, rgba(25, 198, 232, 0.05), transparent 70%),
    var(--black);
  pointer-events: none;
}
.bg-texture {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.05;
  background-image:
    repeating-linear-gradient(135deg, var(--white) 0 1px, transparent 1px 14px),
    repeating-linear-gradient(45deg, var(--white) 0 1px, transparent 1px 96px);
  background-size: auto, 100% 100%;
  pointer-events: none;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 40px);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 18px;
  background: var(--white);
  color: var(--black);
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.08em;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; }

/* ============================================================
   HEADER
   ============================================================ */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  background: transparent;
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease),
              backdrop-filter 0.35s var(--ease), height 0.35s var(--ease);
}
.header.is-scrolled,
.header.is-open {
  height: 60px;
  background: var(--black);
  box-shadow: 0 1px 0 var(--black-line), 0 10px 30px -12px rgba(0, 0, 0, 0.9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.header__inner {
  height: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 40px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.logo__img {
  width: 42px; height: 42px;
  filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.18));
  transition: transform 0.35s var(--ease);
}
.logo:hover .logo__img { transform: rotate(-6deg) scale(1.04); }
.logo__text { display: flex; flex-direction: column; line-height: 1; }
.logo__title {
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: 0.14em;
}
.logo__year {
  margin-top: 4px;
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.42em;
  color: var(--accent);
}

/* Навигация */
.nav__list { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 38px); }
.nav__link {
  position: relative;
  display: inline-block;
  padding: 6px 2px;
  font-family: var(--font-cond);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--white-dim);
  transition: color 0.25s var(--ease);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav__link:hover,
.nav__link.is-active { color: var(--white); }
.nav__link:hover::after,
.nav__link.is-active::after { transform: scaleX(1); }

/* Бургер */
.burger {
  display: none;
  position: relative;
  width: 44px; height: 44px;
  margin-right: -8px;
  flex-shrink: 0;
}
.burger__line {
  position: absolute;
  left: 10px; right: 10px;
  height: 2px;
  background: var(--white);
  transition: transform 0.35s var(--ease), opacity 0.2s var(--ease), top 0.35s var(--ease);
}
.burger__line:nth-child(1) { top: 15px; }
.burger__line:nth-child(2) { top: 21px; }
.burger__line:nth-child(3) { top: 27px; }
.burger.is-active .burger__line:nth-child(1) { top: 21px; transform: rotate(45deg); }
.burger.is-active .burger__line:nth-child(2) { opacity: 0; }
.burger.is-active .burger__line:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: calc(var(--header-h) + 20px) 0 90px;
}

.hero__bg {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.hero__logo {
  width: min(78vw, 760px);
  height: auto;
  opacity: 0.07;
  filter: blur(0.4px);
  transform: scale(1.02);
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__eyebrow {
  font-family: var(--font-cond);
  font-weight: 500;
  font-size: clamp(11px, 1.4vw, 14px);
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--white-faint);
  margin-bottom: clamp(18px, 3vh, 34px);
  padding-left: 0.5em; /* компенсация letter-spacing */
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(52px, 12.5vw, 172px);
  line-height: 0.88;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  color: var(--white);
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.25),
    0 30px 80px rgba(0, 0, 0, 0.8);
}

.hero__year {
  position: relative;
  margin-top: clamp(10px, 2vh, 22px);
  font-family: var(--font-display);
  font-size: clamp(40px, 8vw, 104px);
  line-height: 1;
  letter-spacing: 0.06em;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.85);
  text-shadow: 0 0 60px rgba(25, 198, 232, 0.25);
}

.hero__stats {
  margin-top: clamp(26px, 4.5vh, 52px);
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: clamp(13px, 1.8vw, 18px);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--white);
}
.hero__dot { color: var(--accent); font-weight: 700; }
.hero__season {
  margin-top: 12px;
  font-family: var(--font-cond);
  font-weight: 400;
  font-size: clamp(10px, 1.1vw, 13px);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--white-faint);
}

/* Стрелка вниз */
.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: clamp(18px, 4vh, 40px);
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.hero__scroll:hover { border-color: var(--accent); background: rgba(25, 198, 232, 0.08); }
.hero__arrow {
  width: 11px; height: 11px;
  border-right: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
  transform: rotate(45deg) translate(-2px, -2px);
  animation: arrow-pulse 2s var(--ease) infinite;
}
@keyframes arrow-pulse {
  0%, 100% { transform: rotate(45deg) translate(-2px, -2px); opacity: 1; }
  50%      { transform: rotate(45deg) translate(2px, 2px);  opacity: 0.45; }
}

/* Появление hero при загрузке */
.anim-hero {
  opacity: 0;
  transform: translateY(26px);
  animation: fade-up 0.9s var(--ease) forwards;
}
.anim-hero:nth-of-type(1) { animation-delay: 0.15s; }
.hero__title      { animation-delay: 0.3s; }
.hero__year       { animation-delay: 0.5s; }
.hero__stats      { animation-delay: 0.68s; }
.hero__season     { animation-delay: 0.84s; }
.hero__scroll     { animation-delay: 1.0s; }

@keyframes fade-up {
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   СЕКЦИИ
   ============================================================ */
.section {
  position: relative;
  padding-block: clamp(64px, 10vh, 120px);
  scroll-margin-top: calc(var(--header-h) + 8px);
}
.section::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--black-line) 15%, var(--black-line) 85%, transparent);
}
.section--coaches { padding-top: clamp(48px, 8vh, 96px); }

.section__head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: end;
  gap: clamp(12px, 2.2vw, 28px);
  margin-bottom: clamp(28px, 5vh, 52px);
}
.section__index {
  font-family: var(--font-display);
  font-size: clamp(13px, 1.4vw, 16px);
  letter-spacing: 0.2em;
  color: var(--accent);
  padding-bottom: 0.35em;
}
.section__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(30px, 5.4vw, 64px);
  line-height: 0.95;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.section__count {
  font-family: var(--font-cond);
  font-weight: 500;
  font-size: clamp(12px, 1.3vw, 15px);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--white-faint);
  padding-bottom: 0.5em;
  white-space: nowrap;
}

/* ---------- Сетки ---------- */
.grid { display: grid; gap: clamp(14px, 2vw, 26px); }

.grid--coaches {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
}
.grid--players { grid-template-columns: repeat(5, minmax(0, 1fr)); }

@media (max-width: 1180px) {
  .grid--players { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .grid--players { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .grid--coaches { grid-template-columns: 1fr; }
  .grid--players { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ============================================================
   КАРТОЧКА (общая логика для игрока и тренера)
   ============================================================ */
.card {
  --card-accent: var(--accent);
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, #17171b 0%, #101013 42%, #0a0a0c 100%);
  overflow: hidden;
  text-align: left;
  isolation: isolate;
  transition:
    transform 0.45s var(--ease),
    border-color 0.35s var(--ease),
    box-shadow 0.45s var(--ease);
  will-change: transform;
}
.card::before {
  /* тонкий диагональный блик как на форме */
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, transparent 0 44%, rgba(255, 255, 255, 0.045) 44% 56%, transparent 56%),
    radial-gradient(120% 70% at 50% 110%, rgba(25, 198, 232, 0.10), transparent 60%);
  z-index: 0;
  transition: opacity 0.4s var(--ease);
}
.card::after {
  /* нижний градиент под текст */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 52%;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72) 72%);
  z-index: 2;
  pointer-events: none;
}
.card:hover,
.card:focus-visible {
  transform: translateY(-5px);
  border-color: var(--card-accent);
  box-shadow: var(--shadow-glow);
}

/* Фото */
.card__figure {
  position: absolute;
  inset: 0;
  z-index: 1;
  margin: 0;
}
.card__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
  transition: transform 0.5s var(--ease), filter 0.5s var(--ease);
  filter: saturate(0.95) contrast(1.02);
}
.card:hover .card__img { transform: scale(1.035); filter: saturate(1.05) contrast(1.05); }

/* Режим «фото заполняет кадр» — для фото в свитере, обрезанных по 3:4 */
.card--fill .card__img { object-fit: cover; object-position: top center; }

/* Текст */
.card__text {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 3;
  padding: clamp(10px, 1.4vw, 16px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.card__name {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
}

.card__lastname {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(13px, 1.15vw, 17px);
  line-height: 1.1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  overflow-wrap: break-word;
}

.card__firstname {
  font-family: var(--font-cond);
  font-weight: 500;
  font-size: clamp(10px, 0.9vw, 13px);
  line-height: 1.15;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  overflow-wrap: break-word;
}

/* Увеличенный текст для тренеров */
.card--coach .card__lastname {
  font-size: clamp(16px, 1.5vw, 22px);
}
.card--coach .card__firstname {
  font-size: clamp(12px, 1.1vw, 16px);
}

/* Плашка с должностью на карточке тренера */
.card__badge {
  margin-top: 2px;
}

/* Крупный номер игрока в правом верхнем углу */
.card__num-big {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  font-family: var(--font-display);
  font-size: clamp(20px, 2.2vw, 32px);
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--card-accent);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.9);
  white-space: nowrap;
}

/* Бейдж амплуа */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 20px;
  padding: 0 7px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 1px;
  background: rgba(0, 0, 0, 0.35);
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--white);
  line-height: 1;
  white-space: nowrap;
}
.badge--solid {
  background: var(--white);
  border-color: var(--white);
  color: var(--black);
}
.badge--accent {
  background: var(--card-accent);
  border-color: var(--card-accent);
  color: var(--black);
}

/* Вариация тренера — акцент на карточке */
.card--coach { --card-accent: #F5C518; }
.card--coach::before {
  background:
    linear-gradient(115deg, transparent 0 40%, rgba(245, 197, 24, 0.05) 40% 52%, transparent 52%),
    radial-gradient(120% 70% at 50% 110%, rgba(245, 197, 24, 0.10), transparent 60%);
}

/* ============================================================
   МОДАЛЬНОЕ ОКНО
   ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: clamp(12px, 3vw, 32px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0s linear 0.35s;
}
.modal.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.35s var(--ease), visibility 0s;
}
.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.modal__dialog {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  /* Фиксированная высота для всех модалок */
  height: min(90vh, 680px); 
  overflow: hidden; /* Убираем любые прокрутки */
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  background: #131316;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.9);
  transform: translateY(18px) scale(0.985);
  transition: transform 0.4s var(--ease);
}
.modal.is-open .modal__dialog { transform: none; }

.modal__close {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 3;
  width: 42px; height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 1px;
  background: rgba(0, 0, 0, 0.55);
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.modal__close span {
  position: absolute;
  width: 18px; height: 1.5px;
  background: var(--white);
}
.modal__close span:first-child { transform: rotate(45deg); }
.modal__close span:last-child  { transform: rotate(-45deg); }
.modal__close:hover { background: var(--white); border-color: var(--white); transform: rotate(90deg); }
.modal__close:hover span { background: var(--black); }

.modal__media {
  position: relative;
  min-height: 320px;
  background:
    radial-gradient(90% 60% at 50% 100%, rgba(255, 255, 255, 0.06), transparent 70%),
    linear-gradient(180deg, #19191d, #101013);
  overflow: hidden;
}
.modal__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.modal__body {
  --card-accent: #F5C518;
  padding: clamp(16px, 4vh, 40px);
  display: flex;
  flex-direction: column;
  gap: 0;
  height: 100%;
  overflow: hidden;
}
.modal__kicker {
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.modal__name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(20px, 4vh, 36px);
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  padding-right: 44px;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.modal__name-line {
  display: block;
}
.modal__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}
.modal__number {
  font-family: var(--font-display);
  font-size: clamp(30px, 3.6vh, 46px);
  line-height: 1;
  color: var(--white);
  opacity: 0.92;
}
[hidden] { display: none !important; }

.modal__table {
  margin-top: clamp(16px, 3vh, 32px);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.modal__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}
.modal__row dt {
  font-family: var(--font-cond);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--white-faint);
}
.modal__row dd {
  margin: 0;
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: clamp(15px, 1.5vw, 18px);
  letter-spacing: 0.04em;
  text-align: right;
}

.modal__nav {
  margin-top: auto;
  padding-top: clamp(16px, 3vh, 30px);
  display: flex;
  gap: 10px;
}
.modal__btn {
  flex: 1;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 1px;
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white-dim);
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease), background 0.25s var(--ease);
}
.modal__btn:hover {
  border-color: var(--accent);
  color: var(--black);
  background: var(--accent);
}

@media (max-width: 760px) {
  .modal__dialog {
    display: block;
    height: min(90vh, 820px);
    height: min(90dvh, 820px);
    overflow: hidden;
  }
  .modal__media {
    position: absolute;
    inset: 0;
    z-index: 0;
    min-height: 0;
  }
  .modal__media::after {
    content: "";
    position: absolute;
    inset: 36% 0 0;
    z-index: 1;
    background: linear-gradient(
      180deg,
      rgba(8, 8, 10, 0) 0%,
      rgba(8, 8, 10, 0.32) 38%,
      rgba(8, 8, 10, 0.9) 100%
    );
    pointer-events: none;
  }
  .modal__img {
    position: relative;
    z-index: 0;
    object-fit: contain;
    object-position: center top;
  }
  .modal__body {
    position: absolute;
    z-index: 2;
    inset: auto 0 0;
    width: 100%;
    height: auto;
    max-height: 82%;
    padding: clamp(16px, 5vw, 24px);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: linear-gradient(
      180deg,
      rgba(8, 8, 10, 0.45) 0%,
      rgba(8, 8, 10, 0.82) 20%,
      rgba(8, 8, 10, 0.94) 100%
    );
  }
  .modal__name { 
    font-size: clamp(20px, 4vh, 28px); 
    padding-right: 0; 
  }
  .modal__row { padding: 8px 0; }
  .modal__table { margin-top: 12px; }
  .modal__nav { padding-top: 16px; }
}

/* ============================================================
   АНИМАЦИЯ ПОЯВЛЕНИЯ ПРИ СКРОЛЛЕ
   ============================================================ */
.reveal,
.card {
  opacity: 0;
  transform: translateY(40px);
}
.reveal.is-visible,
.card.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.6s var(--ease),
    transform 0.6s var(--ease),
    border-color 0.35s var(--ease),
    box-shadow 0.45s var(--ease);
}
/* после появления карточка должна уметь hover-подъём без конфликта transition */
.card.is-visible:hover,
.card.is-visible:focus-visible {
  transform: translateY(-5px);
  transition-delay: 0s;
  transition-duration: 0.35s;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding-block: clamp(30px, 5vh, 54px);
  border-top: 1px solid var(--black-line);
}
.footer__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.footer__logo { opacity: 0.5; filter: grayscale(1); }
.footer__text {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.12em;
}
.footer__copy {
  margin-left: auto;
  font-family: var(--font-cond);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--white-faint);
}

/* ============================================================
   АДАПТИВ: НАВИГАЦИЯ
   ============================================================ */
@media (max-width: 860px) {
  .burger {
    display: block;
    position: relative;
    z-index: 2;
  }
  .logo { position: relative; z-index: 2; }

  .nav {
    position: fixed;
    inset: 0;
    z-index: 1;
    padding: calc(var(--header-h) + 32px) 24px 40px;
    background: rgba(0, 0, 0, 0.68);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.3s var(--ease), visibility 0s linear 0.3s, transform 0.3s var(--ease);
  }
  .nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.3s var(--ease), visibility 0s, transform 0.3s var(--ease);
  }
  .nav__list {
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: min(100%, 420px);
    margin-inline: auto;
    padding: 18px 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius);
    background: rgba(0, 0, 0, 0.94);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  }
  .nav__link {
    display: block;
    padding: 14px 10px;
    font-family: var(--font-display);
    font-size: clamp(22px, 7vw, 34px);
    letter-spacing: 0.04em;
    color: var(--white);
  }
  .nav__link::after { display: none; }
  body.menu-open { overflow: hidden; }
}

@media (max-width: 480px) {
  :root { --header-h: 64px; }
  .logo__img { width: 36px; height: 32px; }
  .logo__title { font-size: 15px; }
  .hero__stats { letter-spacing: 0.18em; gap: 8px; }
  .section__head { grid-template-columns: auto 1fr; }
  .section__count { grid-column: 2; padding-bottom: 0; }
  .footer__copy { margin-left: 0; width: 100%; }
}

/* ============================================================
   REDUCED MOTION — уважаем системную настройку
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .anim-hero,
  .reveal,
  .card {
    opacity: 1 !important;
    transform: none !important;
  }
  .card:hover,
  .card:focus-visible { transform: none; }
  .hero__arrow { animation: none; }
}
