.hero {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  padding-inline: var(--container-padding-x);
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  align-items: start;
  overflow: hidden;
}

/* Hero background = живое «табло направлений»: вертикальный луп реальных
   пар городов Костанайской области (+ межгран Костанай–Челябинск). Строки
   рендерит motion-init.js, скролл крутит Motion. Маска сверху/снизу гасит
   строки на краях, чтобы они растворялись, а не обрезались. */
.hero__board {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  display: flex;
  justify-content: center;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(
    180deg,
    transparent 0%,
    #000 16%,
    #000 58%,
    transparent 100%
  );
          mask-image: linear-gradient(
    180deg,
    transparent 0%,
    #000 16%,
    #000 58%,
    transparent 100%
  );
}

.hero__board-track {
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.7vw, 22px);
  padding-top: 6vh;
  width: min(920px, 92vw);
  will-change: transform;
}

.hero__board-row {
  display: grid;
  grid-template-columns: clamp(48px, 6vw, 88px) 1fr auto 1fr;
  align-items: baseline;
  gap: clamp(10px, 2vw, 30px);
  font-family: var(--font-display);
  font-size: clamp(19px, 3vw, 40px);
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.hero__board-time {
  font-family: var(--font-meta);
  font-size: clamp(12px, 1.3vw, 17px);
  letter-spacing: 0.14em;
  text-align: right;
  color: rgba(245, 194, 5, 0.66);
}

.hero__board-from {
  text-align: right;
  color: rgba(255, 255, 255, 0.26);
}

.hero__board-arrow {
  font-size: 0.78em;
  color: rgba(245, 194, 5, 0.58);
}

.hero__board-to {
  text-align: left;
  color: rgba(245, 194, 5, 0.36);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    180deg,
    rgba(6, 6, 6, 0.55) 0%,
    rgba(6, 6, 6, 0.10) 30%,
    rgba(6, 6, 6, 0.40) 70%,
    rgba(6, 6, 6, 1) 100%
  );
  pointer-events: none;
}

.hero__title {
  margin: clamp(40px, 7vw, 72px) 0 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(40px, 7.6vw, 96px);
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  background: var(--grad-text-light);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
          color: transparent;
  filter: drop-shadow(0 4px 6px rgba(12, 12, 12, 0.4));
}

.hero__subtitle {
  margin: clamp(32px, 4vw, 56px) 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 2.5vw, 40px);
  font-family: var(--font-meta);
  font-weight: 500;
  font-size: clamp(18px, 1.6vw, 24px);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

.hero__subtitle::before,
.hero__subtitle::after {
  content: "";
  flex: 0 0 clamp(60px, 9vw, 140px);
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--color-accent-from) 50%,
    transparent 100%
  );
}

.hero__cta {
  align-self: end;
  padding-block: clamp(40px, 6vw, 78px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 568px));
  gap: clamp(12px, 1.4vw, 19px);
  justify-content: center;
  width: 100%;
}

.hero__btn {
  min-height: clamp(72px, 5.5vw, 84px);
  padding-inline: 32px;
  border-radius: var(--radius-button);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(26px, 2.6vw, 36px);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-align: center;
  color: var(--color-text-on-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-button);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.35);
}

.hero__btn:active {
  transform: translateY(0);
}

.hero__btn--primary {
  background: var(--grad-accent);
}

.hero__btn--secondary {
  background: var(--grad-secondary);
}

@media (max-width: 720px) {
  /* Shorter hero and a compact, vertically-centred stack: the header
     (logo + profile) drops away from the very top and sits close to the
     headline, killing the empty video gap. */
  .hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 72vh;
    min-height: 72svh;
  }

  .hero .site-header__logo img {
    width: clamp(170px, 50vw, 220px);
  }

  .hero__title {
    margin-top: 22px;
  }

  .hero__subtitle {
    margin-top: 18px;
  }

  .hero__cta {
    grid-template-columns: 1fr;
    padding-block: 28px 0;
  }

  .hero__btn {
    min-height: 60px;
  }
}

@media (max-width: 480px) {
  .hero__subtitle::before,
  .hero__subtitle::after {
    display: none;
  }

  .hero__subtitle {
    gap: 0;
    text-align: center;
    line-height: 1.4;
  }
}
