/* ===== TT City — базовые переменные ===== */
:root {
  --bg: #0A1A30;          /* тёмный фон / заглушка карты */
  --accent: #E1251B;      /* красный акцент */

  /* Ширина кадра карты. От неё считаются размеры плашек и точек,
     поэтому всё на карте масштабируется вместе с изображением.

     Множитель 1.93 вместо пропорции картинки (1.7768) даёт кадру
     заполнить экран по ширине: лишняя высота уходит под обрез. Вместе
     с `align-items: safe center` у .map весь обрез приходится на низ
     кадра — сверху ничего не срезается, поэтому эмблема на башне цела.
     Снизу под нижним рядом плашек свободно 9% высоты, а множитель 1.93
     срезает не больше 8% — запас есть. */
  --frame-w: min(100vw, calc(100vh * 1.93));
  --text: #FFFFFF;
  --header-bg: rgba(10, 11, 13, 0.72);
  --muted: rgba(255, 255, 255, 0.5);

  /* Графитовое полупрозрачное окно — карта чуть просвечивает */
  --panel-bg: rgba(13, 15, 18, 0.78);
  --panel-border: rgba(255, 255, 255, 0.1);
}

* { box-sizing: border-box; }

/* Кнопки и поля не наследуют шрифт сами — задаём явно,
   чтобы Montserrat стоял действительно везде */
button, input, select, textarea {
  font-family: inherit;
}

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: "Montserrat", sans-serif;
  color: var(--text);
  background: var(--bg);
  overflow: hidden;
}

/* ===== Карта ===== */
/* Карта живёт под шапкой, поэтому город никогда не уходит ей за спину */
.map {
  position: fixed;
  inset: 0;
  display: flex;
  /* safe center: кадр по центру, пока помещается, а когда перерастает
     экран — прижимается к верху, и обрез уходит вниз, в воду */
  align-items: safe center;
  justify-content: center;
  overflow: hidden;
  background-color: var(--bg);
}

/* Кадр с пропорцией картинки (1672×941): вписывается по меньшей
   стороне, вокруг остаётся фон в тон. Всё, что лежит на карте,
   задаётся в процентах от этого кадра и масштабируется вместе с ним. */
.map-frame {
  position: relative;
  width: var(--frame-w);
  aspect-ratio: 1672 / 941;
  /* Запасной тёмный фон: виден, пока карта грузится */
  background-color: var(--bg);
}

.map-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* кадр уже точной пропорции картинки, поэтому растягиваем по нему */
  object-fit: fill;
  transition: opacity 0.4s ease;
}

/* Плавное появление — только когда JavaScript работает и может поймать
   момент загрузки. Без JS картинка видна сразу, как обычная <img>. */
.js .map-image { opacity: 0; }
.js .map.has-map .map-image { opacity: 1; }

/* Заглушка на время загрузки и на случай, если файла нет.
   Появляется с задержкой, чтобы не мигать при быстрой загрузке. */
.map-placeholder {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.28);
  user-select: none;
}

.js .map-placeholder {
  display: flex;
  opacity: 0;
  animation: placeholder-in 0.35s ease 0.6s forwards;
}

.js .map.has-map .map-placeholder { display: none; }

@keyframes placeholder-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ===== Блики на воде ===== */
/* Два слоя мягких светлых пятен, плывущих с разной скоростью.
   Маска гасит эффект в центре кадра, где стоит город, и оставляет
   его по краям — там вода. */
.water-shimmer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.75;
  mix-blend-mode: screen;
  /* water-mask.png — карта воды, снятая с самой map.png: белое там, где
     вода, прозрачное на суше. Благодаря ей блики не выходят на город.
     Если map.png заменится, маску нужно пересобрать под новую картинку. */
  -webkit-mask-image: url("water-mask.png");
  mask-image: url("water-mask.png");
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.water-shimmer::before,
.water-shimmer::after {
  content: "";
  position: absolute;
  inset: -25%;
}

.water-shimmer::before {
  background:
    radial-gradient(circle at 18% 28%, rgba(150, 222, 255, 0.12) 0%, rgba(150, 222, 255, 0) 40%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0) 36%),
    radial-gradient(circle at 66% 82%, rgba(140, 212, 255, 0.11) 0%, rgba(140, 212, 255, 0) 38%),
    radial-gradient(circle at 10% 74%, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 34%);
  animation: water-drift-a 44s ease-in-out infinite alternate;
}

.water-shimmer::after {
  background:
    radial-gradient(circle at 42% 12%, rgba(170, 230, 255, 0.1) 0%, rgba(170, 230, 255, 0) 34%),
    radial-gradient(circle at 92% 58%, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 32%),
    radial-gradient(circle at 30% 92%, rgba(150, 222, 255, 0.1) 0%, rgba(150, 222, 255, 0) 36%),
    radial-gradient(circle at 6% 46%, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0) 30%);
  animation: water-drift-b 58s ease-in-out infinite alternate;
}

/* alternate — движение идёт туда-обратно, без рывка на стыке цикла */
@keyframes water-drift-a {
  from { transform: translate3d(-2.5%, -1.5%, 0) scale(1);    opacity: 0.7; }
  to   { transform: translate3d(3%, 2%, 0) scale(1.09);       opacity: 1; }
}

@keyframes water-drift-b {
  from { transform: translate3d(2%, 1.5%, 0) scale(1.06);     opacity: 1; }
  to   { transform: translate3d(-3%, -2%, 0) scale(1);        opacity: 0.72; }
}

/* ===== Свечение центрального кристалла ===== */
.crystal-glow {
  position: absolute;
  left: 50.2%;
  top: 39.5%;
  width: 29%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
  background: radial-gradient(circle,
    rgba(225, 37, 27, 0.95) 0%,
    rgba(225, 37, 27, 0.52) 28%,
    rgba(225, 37, 27, 0.2) 50%,
    rgba(225, 37, 27, 0) 72%);
  mix-blend-mode: screen;
  opacity: 0.8;
  animation: crystal-pulse 5s ease-in-out infinite;
}

/* Крайние кадры — спокойное свечение: при отключённых анимациях
   кристалл остаётся заметно подсвеченным */
@keyframes crystal-pulse {
  0%, 100% { opacity: 0.68; transform: translate(-50%, -50%) scale(0.96); }
  50%      { opacity: 0.95; transform: translate(-50%, -50%) scale(1.08); }
}

/* ===== Эмблема на вершине центральной башни ===== */
/* Позиция в процентах от кадра, поэтому держится на шпиле при ресайзе */
.tower-emblem {
  position: absolute;
  left: 50.3%;
  top: 4.2%;
  width: calc(var(--frame-w) * 0.03);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  perspective: 420px;
  pointer-events: none;
}

/* Мягкий красный ореол — эмблема читается как маяк */
.tower-emblem::before {
  content: "";
  position: absolute;
  inset: -90%;
  background: radial-gradient(circle,
    rgba(225, 37, 27, 0.72) 0%,
    rgba(225, 37, 27, 0.34) 36%,
    rgba(225, 37, 27, 0.12) 54%,
    rgba(225, 37, 27, 0) 72%);
  mix-blend-mode: screen;
  animation: emblem-beacon 6s ease-in-out infinite;
}

.tower-emblem img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(225, 37, 27, 1))
          drop-shadow(0 0 16px rgba(225, 37, 27, 0.7))
          drop-shadow(0 0 32px rgba(225, 37, 27, 0.4));
  animation: emblem-spin 16s linear infinite;
}

@keyframes emblem-spin {
  from { transform: rotateY(0deg); }
  to   { transform: rotateY(360deg); }
}

/* Крайние кадры — спокойное свечение: при отключённых анимациях
   эмблема остаётся подсвеченной, а не гаснет */
@keyframes emblem-beacon {
  0%, 100% { opacity: 0.88; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.08); }
}

/* ===== Линии-выноски ===== */
.links {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  /* один фильтр на все линии сразу — дешевле, чем по фильтру на каждую */
  filter: drop-shadow(0 0 2px rgba(225, 37, 27, 0.45));
}

.link {
  stroke: rgba(225, 37, 27, 0.62);
  stroke-width: 1;
  transition: stroke 0.3s ease;
}

.link.is-hot {
  stroke: var(--accent);
  stroke-width: 1.6;
  filter: drop-shadow(0 0 4px rgba(225, 37, 27, 0.9));
}

/* ===== Точки на зданиях ===== */
/* Сам элемент только позиционируется; свечение и пульсация живут
   в псевдоэлементах, чтобы анимации не спорили с translate() */
.dot {
  position: absolute;
  width: calc(var(--frame-w) * 0.007);
  height: calc(var(--frame-w) * 0.007);
  min-width: 7px;
  min-height: 7px;
  padding: 0;
  transform: translate(-50%, -50%);
  background: transparent;
  border: none;
  cursor: pointer;
}

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

/* Сама точка */
.dot::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 7px rgba(225, 37, 27, 0.9), 0 0 14px rgba(225, 37, 27, 0.4);
  /* фоновая пульсация: у каждой точки своя задержка (--d),
     поэтому город мерцает вразнобой */
  animation: dot-idle 7.5s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}

/* Свечение здания под точкой — разгорается при наведении */
.dot::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--frame-w) * 0.055);
  height: calc(var(--frame-w) * 0.055);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(225, 37, 27, 0.5) 0%,
    rgba(225, 37, 27, 0.2) 38%,
    rgba(225, 37, 27, 0) 70%);
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}

.dot.is-hot::after { opacity: 1; }

.dot.is-hot::before {
  box-shadow: 0 0 16px rgba(225, 37, 27, 1), 0 0 30px rgba(225, 37, 27, 0.75);
  animation: dot-hot 2.4s ease-in-out infinite;
  animation-delay: 0s;
}

/* Спокойное мерцание: меняются только прозрачность и масштаб —
   это дёшево для браузера и не даёт резких вспышек */
@keyframes dot-idle {
  0%, 100% { opacity: 0.82; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.1); }
}

@keyframes dot-hot {
  0%, 100% { opacity: 1; transform: scale(1.22); }
  50%      { opacity: 1; transform: scale(1.42); }
}

/* Точка на кристалле — крупнее, она же центр свечения */
.dot-crystal {
  width: calc(var(--frame-w) * 0.011);
  height: calc(var(--frame-w) * 0.011);
  min-width: 10px;
  min-height: 10px;
}

.dot-crystal::before {
  box-shadow: 0 0 14px rgba(225, 37, 27, 1), 0 0 28px rgba(225, 37, 27, 0.65);
}

/* ===== Плашки-подписи ===== */
.plaque {
  position: absolute;
  display: flex;
  align-items: center;
  gap: calc(var(--frame-w) * 0.008);
  width: calc(var(--frame-w) * 0.132);
  padding: calc(var(--frame-w) * 0.006) calc(var(--frame-w) * 0.009);
  transform: translate(-50%, -50%);
  font-family: inherit;
  text-align: left;
  color: var(--text);
  background: rgba(13, 15, 18, 0.72);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  border: 1px solid rgba(225, 37, 27, 0.5);
  border-radius: calc(var(--frame-w) * 0.006);
  box-shadow: 0 0 14px rgba(225, 37, 27, 0.32), 0 6px 18px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transition: transform 0.32s ease, border-color 0.32s ease,
              box-shadow 0.32s ease, background-color 0.32s ease;
}

.plaque:hover,
.plaque:focus-visible,
.plaque.is-hot {
  transform: translate(-50%, -50%) translateY(calc(var(--frame-w) * -0.0025));
  background: rgba(30, 12, 12, 0.8);
  border-color: var(--accent);
  box-shadow: 0 0 18px rgba(225, 37, 27, 0.6), 0 10px 24px rgba(0, 0, 0, 0.55);
  outline: none;
}

.plaque-icon {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(var(--frame-w) * 0.019);
  height: calc(var(--frame-w) * 0.019);
  color: var(--accent);
  filter: drop-shadow(0 0 4px rgba(225, 37, 27, 0.45));
}

.plaque-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.plaque-text { min-width: 0; }

.plaque-title {
  display: block;
  font-size: calc(var(--frame-w) * 0.0079);
  font-weight: bold;
  line-height: 1.25;
}

.plaque-desc {
  display: block;
  margin-top: calc(var(--frame-w) * 0.0022);
  font-size: calc(var(--frame-w) * 0.0063);
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.55);
}

/* Виньетка для глубины — не мешает кликам */
.vignette {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%,
    rgba(0, 0, 0, 0) 52%,
    rgba(0, 0, 0, 0.28) 82%,
    rgba(0, 0, 0, 0.5) 100%);
}

/* ===== Логотип поверх карты ===== */
/* Шапки нет: логотип лежит прямо на карте, без подложки, рамки и фона.

   Размер и отступ считаются от ширины кадра карты: верхние плашки
   масштабируются вместе с картой, поэтому логотип фиксированного размера
   наезжал бы на них на небольших экранах. На широких экранах это ровно
   48px и отступ 24px. */
.logo {
  position: fixed;
  top: clamp(12px, calc(var(--frame-w) * 0.0125), 24px);
  left: clamp(12px, calc(var(--frame-w) * 0.0125), 24px);
  z-index: 20;
  display: block;
  height: clamp(24px, calc(var(--frame-w) * 0.025), 48px);
  width: auto;
  pointer-events: none;
  user-select: none;
}

/* ===== Модальное окно ===== */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(3, 5, 8, 0.55);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.overlay.is-open { opacity: 1; }
.overlay[hidden] { display: none; }

/* Окно и карточка «Спросите меня о…» стоят рядом: когда карточка
   открывается, окно сдвигается влево, как в макете */
.hub-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  width: 100%;
  max-height: 100%;
}

/* Матовое стекло со светящейся красной обводкой */
.glass {
  background: var(--panel-bg);
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  border: 1px solid rgba(225, 37, 27, 0.75);
  border-radius: 20px;
  box-shadow:
    0 0 22px rgba(225, 37, 27, 0.32),
    0 0 60px rgba(225, 37, 27, 0.12),
    inset 0 0 24px rgba(225, 37, 27, 0.06),
    0 40px 90px rgba(0, 0, 0, 0.65);
}

.modal {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 0 1 900px;
  max-width: 900px;
  max-height: 88vh;
  padding: 26px 30px 24px;
  overflow: hidden;
  animation: hub-in 0.32s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

@keyframes hub-in {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

/* ===== Круглые кнопки-иконки ===== */
.icon-close,
.icon-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--text);
  background: rgba(225, 37, 27, 0.1);
  border: 1px solid rgba(225, 37, 27, 0.7);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.icon-close:hover, .icon-close:focus-visible,
.icon-back:hover, .icon-back:focus-visible {
  background: rgba(225, 37, 27, 0.55);
  box-shadow: 0 0 14px rgba(225, 37, 27, 0.55);
  outline: none;
}

.icon-close:active, .icon-back:active { transform: scale(0.94); }

.icon-close svg,
.icon-back svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 22px;
  z-index: 2;
}

/* ===== Шапка окна ===== */
.hub-head {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 6px 52px 24px 0;
}

.hub-badge {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  font-size: 26px;
  font-weight: bold;
  letter-spacing: 1px;
  background: rgba(225, 37, 27, 0.12);
  border: 1.5px solid var(--accent);
  border-radius: 14px;
  box-shadow:
    0 0 16px rgba(225, 37, 27, 0.4),
    inset 0 0 18px rgba(225, 37, 27, 0.15);
}

.hub-titles { flex: 1 1 auto; min-width: 0; }

.hub-title {
  margin: 4px 0 9px;
  font-size: 28px;
  font-weight: normal;
}

.hub-subtitle {
  margin: 0;
  max-width: 340px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.hub-head-person {
  flex: none;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  max-width: 250px;
}

.head-person-role {
  font-size: 13px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.92);
}

.head-person-name {
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.92);
}

/* ===== Аватары ===== */
.avatar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  font-size: 13px;
  font-weight: bold;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  object-fit: cover;
  user-select: none;
}

.avatar-md {
  width: 62px;
  height: 62px;
  font-size: 18px;
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 14px rgba(0, 0, 0, 0.5);
}

.avatar-lg {
  width: 84px;
  height: 84px;
  font-size: 24px;
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.5);
}

.person-meta { min-width: 0; }

.person-name { font-size: 12px; color: var(--text); }

.person-role {
  margin-top: 5px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
}

/* ===== Круглые иконки почты и чата ===== */
.icon-row { display: flex; gap: 12px; }

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  color: var(--accent);
  border: 1px solid rgba(225, 37, 27, 0.4);
  border-radius: 50%;
  transition: background-color 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.icon-btn:hover,
.icon-btn:focus-visible {
  background: rgba(225, 37, 27, 0.18);
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(225, 37, 27, 0.45);
  outline: none;
}

.icon-btn svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hub-head-person .icon-row { margin-top: 12px; }

/* Мелкая иконка чата в карточке команды */
.member .avatar { width: 44px; height: 44px; font-size: 14px; }
.member-foot .icon-btn { width: 26px; height: 26px; }
.member-foot .icon-btn svg { width: 13px; height: 13px; }

/* ===== Вкладки ===== */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tab {
  position: relative;
  padding: 0 0 13px;
  font-family: inherit;
  font-size: 13px;
  white-space: nowrap;
  color: var(--muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.tab:hover { color: rgba(255, 255, 255, 0.85); }
.tab:focus-visible { color: var(--text); outline: none; }
.tab.is-active { color: var(--text); }

.tab::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(225, 37, 27, 0.8);
  transform: scaleX(0);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.tab.is-active::after { transform: scaleX(1); }

/* ===== Тело окна ===== */
.hub-body {
  flex: 1 1 auto;
  min-height: 270px;
  padding: 24px 2px 4px;
  overflow-y: auto;
}

/* Плавная смена содержимого вкладок */
.hub-body.fade-in { animation: tab-in 0.28s ease both; }

@keyframes tab-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

.col-title {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: normal;
  color: rgba(255, 255, 255, 0.9);
}

/* ===== Команда ===== */
.team-layout {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 24px;
  align-items: start;
}

.lead-card {
  padding: 22px 18px 18px;
  background: rgba(225, 37, 27, 0.05);
  border: 1px solid rgba(225, 37, 27, 0.85);
  border-radius: 14px;
  box-shadow:
    0 0 16px rgba(225, 37, 27, 0.3),
    inset 0 0 20px rgba(225, 37, 27, 0.05);
}

.lead-name {
  margin-top: 18px;
  font-size: 15px;
  color: var(--text);
}

.lead-role {
  margin-top: 7px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

.lead-card .icon-row { margin-top: 18px; }

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 13px;
}

.member {
  display: flex;
  flex-direction: column;
  padding: 13px 12px 11px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease,
              box-shadow 0.2s ease, background-color 0.2s ease;
}

/* Наведение — лёгкое поднятие и красная подсветка рамки */
.member:hover,
.member:focus-visible {
  transform: translateY(-3px);
  background: rgba(225, 37, 27, 0.07);
  border-color: var(--accent);
  box-shadow: 0 0 16px rgba(225, 37, 27, 0.35), 0 10px 22px rgba(0, 0, 0, 0.4);
  outline: none;
}

.member-top { display: flex; gap: 10px; }
.member-foot { margin-top: 15px; }

/* ===== Списки с красными светящимися буллетами ===== */
.bullets { margin: 0; padding: 0; list-style: none; }

.bullets li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 15px;
  font-size: 12.5px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.85);
}

.bullets li:last-child { margin-bottom: 0; }

.bullets li::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 2px;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(225, 37, 27, 0.9);
}

/* ===== Процессы ===== */
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.flow-step {
  padding: 11px 17px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.flow-step:hover {
  border-color: rgba(225, 37, 27, 0.7);
  box-shadow: 0 0 14px rgba(225, 37, 27, 0.28);
}

.flow-arrow { color: var(--accent); font-size: 15px; }

/* ===== Документы ===== */
.doc-list { display: flex; flex-direction: column; gap: 9px; }

.doc {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 17px;
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 11px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.doc:hover,
.doc:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 0 16px rgba(225, 37, 27, 0.3);
  outline: none;
}

.doc-arrow { display: flex; color: var(--accent); }

.doc-arrow svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ===== Показатели ===== */
.metrics { display: flex; flex-direction: column; }

.metric {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.metric:last-child { border-bottom: none; }
.metric-label { font-size: 13px; color: rgba(255, 255, 255, 0.8); }

.metric-value {
  font-size: 17px;
  font-weight: bold;
  color: var(--accent);
  text-shadow: 0 0 10px rgba(225, 37, 27, 0.6);
}

/* ===== Заглушка ===== */
.stub {
  padding: 36px 18px;
  font-size: 13px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 11px;
}

/* ===== Подвал окна ===== */
.hub-foot {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 20px;
  margin-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-drive {
  flex: none;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  font-size: 13px;
  font-weight: bold;
  line-height: 1.35;
  color: var(--text);
  text-decoration: none;
  background: var(--accent);
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(225, 37, 27, 0.5), 0 10px 26px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-drive:hover,
.btn-drive:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 0 28px rgba(225, 37, 27, 0.7), 0 14px 30px rgba(0, 0, 0, 0.5);
  outline: none;
}

.btn-drive:active { transform: translateY(0); }

.btn-drive svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-drive-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 50%;
}

.btn-drive-icon svg { width: 19px; height: 19px; }

.btn-drive-out {
  display: flex;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 7px;
}

.btn-drive-out svg { width: 15px; height: 15px; }

/* Контакты руководителя — по центру подвала */
.hub-contacts { flex: 1 1 auto; text-align: center; }

.contacts-label {
  margin-bottom: 11px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.88);
}

.contacts-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 26px;
}

.contacts-row a {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  transition: color 0.18s ease;
}

.contacts-row a:hover { color: var(--text); }

.contact-ico { display: flex; color: var(--accent); }

.contact-ico svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ===== Карточка «Спросите меня о…» ===== */
.ask-panel {
  flex: none;
  width: 384px;
  max-height: 88vh;
  padding: 18px 24px 26px;
  overflow-y: auto;
  opacity: 0;
  transform: translateX(-18px) scale(0.98);
  transition: opacity 0.26s ease, transform 0.26s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.ask-panel.is-open { opacity: 1; transform: none; }
.ask-panel[hidden] { display: none; }

.ask-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.ask-person { display: flex; align-items: center; gap: 16px; }

.ask-name { font-size: 17px; color: var(--text); }

.ask-role {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.ask-panel .icon-row { margin: 18px 0 22px; }

.ask-title {
  margin: 0 0 18px;
  padding-top: 20px;
  font-size: 15px;
  font-weight: normal;
  color: var(--text);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Темы появляются по очереди */
.ask-panel .bullets li {
  animation: topic-in 0.32s ease both;
  animation-delay: calc(var(--i) * 45ms);
}

@keyframes topic-in {
  from { opacity: 0; transform: translateX(10px); }
  to   { opacity: 1; transform: none; }
}

/* ===== Узкие экраны ===== */
@media (max-width: 1360px) {
  .hub-layout { flex-direction: column; gap: 16px; overflow-y: auto; }
  .ask-panel { width: 100%; max-width: 900px; }
}

@media (max-width: 720px) {
  .modal { padding: 20px; }
  .hub-head { flex-wrap: wrap; padding-right: 44px; }
  .team-layout { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .hub-foot { flex-direction: column; align-items: stretch; }
  .tabs { gap: 16px; }
}

/* ===== Системная настройка «уменьшить движение» ===== */
/*
   НАМЕРЕННО ОТКЛЮЧЕНО. Анимации показываются всем одинаково,
   независимо от системной настройки prefers-reduced-motion.
   Взамен все движущиеся эффекты замедлены и приглушены, чтобы
   оставаться комфортными.

   Имейте в виду: prefers-reduced-motion — настройка доступности.
   Её включают люди с чувствительностью к движению: вестибулярные
   нарушения, мигрень, укачивание. Для них движение на экране бывает
   не просто раздражающим, а болезненным.

   ЧТОБЫ ВЕРНУТЬ УЧЁТ НАСТРОЙКИ: раскомментируйте блок ниже целиком.
   Больше нигде ничего менять не нужно.

@media (prefers-reduced-motion: reduce) {
  .water-shimmer { display: none; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
*/
