/* Вкладка «Район» (site/district.js). Свой слой поверх сцены: кадр и ролики — под градиентами .app::before/::after,
   точки и нижняя панель — над ними; шапка (.top, z-index 4) с вкладками остаётся сверху. */

.district {
  position: absolute;
  inset: 0;
}

.district[hidden] {
  display: none;
}

/* пока открыт район, остальной сайт под слоем не виден и не ловит наведение; время суток району не нужно (только вечер) */
.app[data-district] > :not(.top):not(.district),
.app[data-district] .moods {
  visibility: hidden;
}

.district-stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--ink);
}

/* cover по центру — так же точки считает pinsInView (coverTransform) */
.district-frame,
.district-fly {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

.district-fly[hidden] {
  display: none;
}

.district-pins {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.district-pins[hidden] {
  display: none;
}

.district-pin {
  position: absolute;
  transform: translate(-50%, calc(-100% - 10px));
  padding: 8px 14px;
  border: 1px solid rgba(230, 201, 149, 0.75);
  border-radius: 999px;
  background: rgba(11, 14, 20, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--text);
  font: 500 14px/1.2 var(--sans);
  white-space: nowrap;
  cursor: pointer;
  pointer-events: auto;
  animation: district-pin-in 0.45s var(--ease) both;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

/* ножка к месту и точка на земле */
.district-pin::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 100%;
  width: 1.5px;
  height: 10px;
  background: rgba(230, 201, 149, 0.8);
  transform: translateX(-50%);
}

.district-pin::after {
  content: '';
  position: absolute;
  left: 50%;
  top: calc(100% + 10px);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-2);
  box-shadow: 0 0 10px var(--gold-2);
  transform: translate(-50%, -50%);
}

.district-pin:hover,
.district-pin:focus-visible {
  background: var(--gold-2);
  border-color: var(--gold-3);
  color: #1b150c;
}

@keyframes district-pin-in {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-100% - 2px));
  }
}

.district-bar {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding: 120px 32px 26px;
  background: linear-gradient(to top, rgba(8, 10, 14, 0.72), rgba(8, 10, 14, 0.38) 55%, transparent);
  pointer-events: none;
}

.district-head {
  min-width: 200px;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.55);
}

.district-kicker {
  margin: 0 0 6px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-3);
}

.district-title {
  margin: 0;
  font: 600 40px/1.05 var(--serif);
  color: var(--text);
}

.district-places {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 760px;
  pointer-events: auto;
}

.district-chip {
  padding: 9px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  color: var(--text);
  font: 500 14px/1.2 var(--sans);
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.district-chip.hub {
  border-color: rgba(230, 201, 149, 0.55);
}

.district-chip:hover,
.district-chip:focus-visible {
  border-color: var(--gold-2);
}

.district-chip[aria-pressed='true'] {
  background: var(--gold-2);
  border-color: var(--gold-3);
  color: #1b150c;
}

/* в полёте точки убраны; кнопки работают — смена цели разворачивает ролик */
.district[data-flying] .district-title {
  opacity: 0.85;
}

@media (prefers-reduced-motion: reduce) {
  .district-pin {
    animation: none;
  }
}
