/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #060b14;
  --surface:     #0d1526;
  --border:      rgba(255,255,255,0.07);
  --text:        #e8f0fe;
  --text-muted:  rgba(200,215,240,0.55);
  --accent:      #3b82f6;
  --accent-2:    #60a5fa;
  --cta:         #2563eb;
  --cta-hover:   #1d4ed8;
  --radius-sm:   8px;
  --radius:      14px;
}

html  { scroll-behavior: smooth; }
body  {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ============================================================
   HERO — контейнер
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
}

/* ============================================================
   HERO — фоновый слой
   ============================================================ */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(130px);
  opacity: 0.18;
  animation: pulse 8s ease-in-out infinite alternate;
}
.hero__glow--1 {
  width: 700px; height: 700px;
  background: radial-gradient(circle, #1e40af, transparent 70%);
  top: -200px; right: -100px;
}
.hero__glow--2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #0ea5e9, transparent 70%);
  bottom: -100px; left: -100px;
  animation-delay: -4s; opacity: 0.12;
}
@keyframes pulse {
  to { transform: scale(1.15) translate(20px,-20px); opacity: 0.25; }
}

/* Карта России */
#russia-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  pointer-events: none;
  filter: invert(1) sepia(1) hue-rotate(195deg) saturate(2);
  opacity: 0.10;
  /* поднимаем + сдвигаем вправо; MAP_RAISE/MAP_SHIFT в main.js должны совпадать */
  transform: translateY(-10%) translateX(25%);
}

/* Canvas анимации маршрутов */
#route-canvas {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  display: block;
}

/* ============================================================
   HERO — двухколоночный layout (десктоп)
   ============================================================ */
.hero__layout {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: 100svh;
  padding: 72px max(40px, 6vw) 80px;
  gap: 0;
}

/* Левая колонка: весь контент */
.hero__left {
  flex: 0 0 46%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

/* Правая колонка: пустая (карта видна сзади) */
.hero__right {
  flex: 1;
}

/* Зазор для карты (скрыт на десктопе, виден на мобилке) */
.hero__map-gap { display: none; }

/* ============================================================
   HERO — бейдж
   ============================================================ */
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 18px;
  border-radius: 100px;
  background: rgba(59,130,246,0.10);
  border: 1px solid rgba(59,130,246,0.25);
  color: var(--accent-2);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  margin-bottom: 28px;
  animation: fadeDown 0.6s ease both;
}
.badge__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #22d3ee;
  box-shadow: 0 0 8px #22d3ee;
  animation: blink 2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes blink { 50% { opacity: 0.3; } }

/* ============================================================
   HERO — заголовок и подзаголовок
   ============================================================ */
.hero__title {
  font-size: clamp(2rem, 4vw, 3.6rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 18px;
  animation: fadeDown 0.7s 0.1s ease both;
}
.hero__accent {
  background: linear-gradient(135deg, #60a5fa 0%, #38bdf8 50%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero__subtitle {
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  color: var(--text-muted);
  font-weight: 400;
  margin-bottom: 36px;
  animation: fadeDown 0.7s 0.2s ease both;
}

/* ============================================================
   HERO — города
   ============================================================ */
.hero__cities {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 36px;
  animation: fadeDown 0.7s 0.3s ease both;
}
.city-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(255,255,255,0.035);
  border: 1px solid var(--border);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  transition: background 0.2s, border-color 0.2s;
}
.city-card:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.city-card:last-child  { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.city-card:hover {
  background: rgba(59,130,246,0.10);
  border-color: rgba(59,130,246,0.30);
}
.city-card__icon { width: 15px; height: 15px; color: var(--accent-2); flex-shrink: 0; }

/* ============================================================
   HERO — CTA кнопка
   ============================================================ */
.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 17px 40px;
  background: linear-gradient(135deg, var(--cta), #1e3a8a);
  border: 1px solid rgba(59,130,246,0.40);
  border-radius: var(--radius);
  color: #fff;
  font-family: inherit;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 40px rgba(37,99,235,0.40), inset 0 1px 0 rgba(255,255,255,0.10);
  animation: fadeDown 0.7s 0.4s ease both;
  margin-bottom: 14px;
  align-self: flex-start; /* не растягивается по ширине */
}
.hero__cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.10), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}
.hero__cta:hover { transform: translateY(-2px); box-shadow: 0 8px 60px rgba(37,99,235,0.55), inset 0 1px 0 rgba(255,255,255,0.15); }
.hero__cta:hover::before { opacity: 1; }
.hero__cta:active { transform: translateY(0); }
.cta__icon { width: 21px; height: 21px; flex-shrink: 0; }

.hero__note {
  font-size: 0.82rem;
  color: var(--text-muted);
  animation: fadeDown 0.7s 0.5s ease both;
}

/* ============================================================
   АНИМАЦИИ появления
   ============================================================ */
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--surface); border-top: 1px solid var(--border); }
.footer__inner { max-width: 1100px; margin: 0 auto; padding: 60px 24px 36px; }

.footer__top { margin-bottom: 40px; padding-bottom: 32px; border-bottom: 1px solid var(--border); }
.footer__heading { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; }
.footer__company { font-size: 1.35rem; font-weight: 700; color: #fff; }

.footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px 40px; margin-bottom: 48px; }

.footer__section-title { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.10em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 16px; }
.footer__list { display: flex; flex-direction: column; gap: 10px; }
.footer__row { display: flex; flex-direction: column; gap: 2px; }
.footer__row dt { font-size: 0.73rem; color: var(--text-muted); }
.footer__row dd { font-size: 0.88rem; color: var(--text); font-weight: 500; }
.footer__row dd.mono { font-family: 'SF Mono','Fira Code','Cascadia Code',monospace; font-size: 0.82rem; letter-spacing: 0.04em; color: rgba(200,215,240,0.75); }
.footer__row dd a { color: var(--accent-2); text-decoration: none; transition: color 0.2s; }
.footer__row dd a:hover { color: #93c5fd; }

.footer__copy { text-align: center; font-size: 0.75rem; color: var(--text-muted); padding-top: 24px; border-top: 1px solid var(--border); }

/* ============================================================
   RESPONSIVE — планшет (≤ 900px)
   ============================================================ */
@media (max-width: 900px) {
  .hero__layout {
    padding: 60px 32px 72px;
  }
  .hero__left {
    flex: 0 0 54%;
    max-width: 100%;
  }
}

/* ============================================================
   RESPONSIVE — мобилка (≤ 680px)
   Порядок: бейдж → заголовок → подзаголовок → КАРТА → города → кнопка → подпись
   ============================================================ */
@media (max-width: 680px) {

  /* сбрасываем сдвиг вправо, оставляем только подъём */
  #russia-map {
    transform: translateY(-10%) translateX(0%);
  }

  .hero__layout {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 52px 20px 64px;
    gap: 0;
    min-height: 100svh;
  }

  .hero__left {
    flex: none;
    width: 100%;
    max-width: 100%;
    align-items: center;
    text-align: center;
  }

  .hero__right { display: none; }

  /* зазор для карты — между подзаголовком и городами */
  .hero__map-gap {
    display: block;
    width: 100%;
    /* высота пропорциональна ширине экрана, чтобы карта не искажалась */
    height: calc(100vw / 1.61);
    max-height: 55vh;
    flex-shrink: 0;
  }

  .hero__badge   { margin-bottom: 20px; }
  .hero__title   { font-size: clamp(1.8rem, 8vw, 2.6rem); }
  .hero__subtitle { margin-bottom: 0; /* зазор заменяет .hero__map-gap */ }

  .hero__cities {
    justify-content: center;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 28px;
  }
  .city-card {
    border-radius: var(--radius-sm) !important;
    width: 100%;
    max-width: 260px;
    justify-content: center;
  }

  .hero__cta {
    align-self: stretch;
    justify-content: center;
    font-size: 1.1rem;
    padding: 16px 24px;
  }

  .hero__note { text-align: center; }

  .footer__grid { grid-template-columns: 1fr; }
  .footer__inner { padding: 40px 16px 28px; }
  .footer__company { font-size: 1.1rem; }
}
