/* ========== ШРИФТЫ (локальные) ========== */
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'DM Serif Display';
  src: url('../fonts/DMSerifDisplay-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #05050A;
  --gold: #D4AF37;
  --gold-light: #F0D87A;
  --text: #ECECEC;
  --muted: #9A9AA8;
  --transition: all 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.7;
  background: #000;
  color: #ECECEC;
  overflow-x: clip;           /* безопасная замена hidden */
  -webkit-font-smoothing: antialiased;
}

/* Движущиеся линии */
.moving-lines {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
}
.moving-lines div {
  position: absolute;
  height: 1px;
  width: 100%;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.2;
  animation: moveLine 10s linear infinite;
}
.moving-lines div:nth-child(1) { top: 15%; }
.moving-lines div:nth-child(2) { top: 35%; animation-delay: -2.5s; }
.moving-lines div:nth-child(3) { top: 55%; animation-delay: -5s; }
.moving-lines div:nth-child(4) { top: 75%; animation-delay: -7.5s; }

@keyframes moveLine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Основной контент */
#app-content {
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s cubic-bezier(0.22, 1, 0.36, 1);
}
#app-content.visible {
  opacity: 1;
  visibility: visible;
}

/* Hero секция */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(rgba(5,5,10,0.15), rgba(5,5,10,0.5)), url('../images/street.jpg') center center / contain no-repeat;
  background-color: #000;
  position: relative;
  z-index: 1;
  padding: 60px 20px 80px 20px;
}
.hero-line {
  width: 120px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 30px auto;
  opacity: 0;
  transition: opacity 0.8s ease, width 0.8s ease;
}
.hero-line.visible { opacity: 0.7; }
.hero-buttons {
  display: flex;
  gap: 25px;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  margin: 30px 0;
}
.hero-buttons.visible { opacity: 1; transform: translateY(0); }

.btn {
  padding: 14px 36px;
  border: 1px solid rgba(255,255,255,0.25);
  background: transparent;
  color: white;
  cursor: pointer;
  letter-spacing: 0.2em;
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition);
  backdrop-filter: blur(4px);
  border-radius: 40px;
}
.btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-3px);
}
.btn-gold {
  border-color: var(--gold);
  color: var(--gold);
}
.btn-gold:hover {
  background: var(--gold);
  color: #000;
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.5);
  transform: translateY(-3px);
}

.hero-benefits {
  position: absolute;
  bottom: 30px;
  left: 0; right: 0;
  text-align: center;
  pointer-events: none;
  z-index: 2;
}
.hero-benefits p {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: 0.03em;
  line-height: 1.5;
  text-shadow: 0 0 8px rgba(0,0,0,0.6);
  background: rgba(0, 0, 0, 0.45);
  display: inline-block;
  padding: 12px 24px;
  border-radius: 40px;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(212, 175, 55, 0.3);
}
.hero-benefits strong { color: var(--gold); }

/* Общие секции */
.section {
  position: relative;
  padding: 100px 20px;
  z-index: 1;
}
.section:not(.bg-contact)::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 120px;
  background: linear-gradient(to bottom, transparent, rgba(5, 5, 10, 0.9));
  pointer-events: none;
  z-index: 2;
}
.section::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 120px;
  background: linear-gradient(to top, transparent, rgba(5, 5, 10, 0.9));
  pointer-events: none;
  z-index: 2;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 180px;
  background: linear-gradient(to bottom, transparent, rgba(5, 5, 10, 0.96));
  pointer-events: none;
  z-index: 2;
}

/* Фоны секций */
.bg-mid {
  background: linear-gradient(rgba(5,5,10,0.6), rgba(5,5,10,0.8)), url('../images/office121.jpg') center center / contain no-repeat fixed;
  background-color: #000;
}
.bg-info {
  background: linear-gradient(rgba(5,5,10,0.7), rgba(5,5,10,0.7)), url('../images/people.jpg') center center / contain no-repeat fixed;
  background-color: #000;
}
.bg-contact {
  background: linear-gradient(rgba(5,5,10,0.5), rgba(5,5,10,0.6)), url('../images/down.jpg') top center / contain no-repeat fixed;
  background-color: #000;
  padding-bottom: 120px;
}
.bg-contact::after { display: none; }

/* Заголовки */
h2 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(32px, 5vw, 48px);
  text-align: center;
  margin-bottom: 50px;
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-shadow: 0 0 8px rgba(212, 175, 55, 0.2);
}
h2::before {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), #F0D87A, var(--gold), transparent);
  opacity: 0.6;
}

.vacancies-subtitle {
  text-align: center;
  font-size: 0.9rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  margin-top: -20px;
  margin-bottom: 40px;
  opacity: 0.8;
}

/* Сетки карточек */
.jobs-grid, .features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  max-width: 1300px;
  margin: 0 auto;
}
.job-card, .feature-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  border-radius: 28px;
  padding: 30px 20px;
  text-align: center;
  transition: var(--transition);
}
.job-card:hover, .feature-card:hover {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), 0 20px 30px -5px rgba(212, 175, 55, 0.3);
  transform: translateY(-6px);
}
.job-card img {
  width: 80px; height: 80px;
  margin: 0 auto 20px;
  object-fit: contain;
  filter: drop-shadow(0 0 5px rgba(212,175,55,0.3));
}
.job-card h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.4rem;
  margin-bottom: 12px;
}
.job-card p {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
}
.salary {
  color: var(--gold);
  font-weight: 700;
  margin-top: 18px;
  font-size: 1.2rem;
}

.feature-icon img {
  width: 110px; height: 110px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(212,175,55,0.4));
  margin-bottom: 20px;
}
.stat-number {
  font-size: 2.8rem;
  font-weight: 500;
  font-family: 'Syne', sans-serif;
  color: var(--gold);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  text-shadow: 0 0 6px rgba(212, 175, 55, 0.2);
}
.feature-card .desc {
  font-size: 0.9rem;
  color: rgba(236,236,236,0.9);
  line-height: 1.4;
}

/* Бейджи доверия */
.trust-badges {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 55px auto 0;
  flex-wrap: wrap;
}
.trust-badge {
  background: rgba(255,255,255,0.03);
  border-radius: 60px;
  padding: 10px 24px;
  font-size: 0.9rem;
  color: var(--muted);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(212,175,55,0.3);
  transition: var(--transition);
  white-space: nowrap;
  cursor: default;
}
.trust-badge:hover {
  border-color: var(--gold);
  color: var(--gold-light);
  transform: translateY(-2px);
}

/* Отзывы */
.testimonials {
  position: relative;
  max-width: 1300px;
  margin: 0 auto;
  min-height: 650px;
}
.testimonials img {
  position: absolute;
  width: 220px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.4s ease;
  border: 2px solid rgba(255,255,255,0.1);
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}
.testimonials img:hover {
  transform: scale(1.08);
  z-index: 10;
  border-color: var(--gold);
  box-shadow: 0 0 35px rgba(212,175,55,0.3);
}
.testimonials img:nth-child(1) { top: 0; left: 5%; }
.testimonials img:nth-child(2) { top: 80px; left: 30%; }
.testimonials img:nth-child(3) { top: 200px; left: 60%; }
.testimonials img:nth-child(4) { top: 350px; left: 15%; }
.testimonials img:nth-child(5) { top: 150px; left: 80%; }
.testimonials img:nth-child(6) { top: 420px; left: 45%; }
.testimonials img:nth-child(7) { top: 50px; left: 75%; }
.testimonials img:nth-child(8) { top: 280px; left: 85%; }
.testimonials img:nth-child(9) { top: 500px; left: 70%; }
.testimonials img:nth-child(10){ top: 550px; left: 20%; }

/* Инфо-блок */
.info-text {
  max-width: 1000px;
  margin: 0 auto;
  background: rgba(5,5,10,0.65);
  backdrop-filter: blur(12px);
  border-radius: 32px;
  padding: 50px 40px;
  text-align: left;
  line-height: 1.7;
}
.info-text p { margin-bottom: 20px; }
.info-text ul { margin: 20px 0 20px 30px; }
.info-text li { margin-bottom: 8px; }
.info-text strong { color: var(--gold); }

.limited-access {
  position: relative;
  border: 1px solid var(--gold);
  color: var(--gold);
  max-width: 500px;
  margin: 60px auto;
  padding: 14px 32px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-align: center;
  backdrop-filter: blur(4px);
  background: rgba(5,5,10,0.3);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.2);
}

/* ========== МОДАЛКИ ========== */
.modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: 0.3s;
  z-index: 2000;
  isolation: isolate;       /* улучшает изоляцию */
}
.modal.active {
  opacity: 1;
  pointer-events: auto;
}
/* Специальный фон для калькулятора */
.modal.calc-modal {
  background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('../images/street_calc.jpg') center center / contain no-repeat;
  background-color: #000;
}
/* Модалка изображений (отзывы) — обычный полупрозрачный фон */
.modal#modal {
  background: rgba(0, 0, 0, 0.85);
}

/* ========== СТИЛИ ДЛЯ ВСЕХ .modal-content ========== */
.modal-content {
  background: rgba(10, 10, 20, 0.96);
  border: none;
  border-radius: 32px;
  padding: 32px 28px;
  max-width: 550px;
  width: 90%;
  position: relative;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  text-align: center;
}

/* Крестик скрыт (закрытие по фону) */
.close-modal {
  display: none;
}

/* Заголовок по умолчанию (для калькулятора) */
.modal-content h2,
.modal-content h3 {
  font-family: 'DM Serif Display', serif;
  text-align: center;
  margin-bottom: 20px;
  color: var(--gold);
}
.modal-content h2 { font-size: 1.8rem; }
.modal-content h3 { font-size: 1.6rem; }

/* ========== СПЕЦИАЛЬНЫЕ СТИЛИ ДЛЯ МОДАЛКИ ВАКАНСИЙ ========== */
.modal-content:has(.job-details) {
  position: relative;
  overflow: hidden;
  background: rgba(10, 10, 20, 0.92);
  padding-top: 20px;
  padding-bottom: 32px;
}
.modal-content:has(.job-details)::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 120px;
  background: url('../images/people.jpg') center center / cover no-repeat;
  opacity: 0.25;
  z-index: 0;
  border-radius: 32px 32px 0 0;
  pointer-events: none;
}
.modal-content:has(.job-details) .close-modal,
.modal-content:has(.job-details) h3,
.modal-content:has(.job-details) .job-desc,
.modal-content:has(.job-details) .job-details,
.modal-content:has(.job-details) .btn-primary {
  position: relative;
  z-index: 2;
}
.modal-content:has(.job-details) h3 {
  color: #ffffff;
  font-size: 2.2rem;
  margin-top: 0;
  margin-bottom: 8px;
}
.modal-content:has(.job-details) .job-desc {
  color: #f0f0f0;
  text-align: center;
  margin-top: 0;
  margin-bottom: 16px;
}
.modal-content:has(.job-details) .job-details {
  list-style: none;
  padding-left: 0;
  margin-top: 0;
  margin-bottom: 20px;
  max-width: 80%;
  margin-left: auto;
  margin-right: auto;
}
.modal-content:has(.job-details) .job-details li {
  color: #f0f0f0;
  text-align: center;
  padding-left: 0;
  margin-bottom: 12px;
}
.modal-content:has(.job-details) .job-details li::before {
  content: none;
}
.modal-content:has(.job-details) .btn-primary {
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid var(--gold);
  color: var(--gold-light);
  margin-top: 8px;
  padding: 10px 24px;
}
.modal-content:has(.job-details) .btn-primary:hover {
  background: rgba(212, 175, 55, 0.3);
  color: white;
}

/* ========== КАЛЬКУЛЯТОР (отключаем полосу) ========== */
.modal.calc-modal .modal-content::before {
  display: none;
}
.modal.calc-modal .modal-content {
  text-align: left;
  background: rgba(10, 10, 20, 0.98);
}
.modal.calc-modal .modal-content h2 {
  text-align: center;
  margin-top: 0;
}

/* Скрываем золотую линию, если она есть в HTML */
.modal-gold-line {
  display: none;
}

/* Специальные стили для калькулятора (шире) */
.calc-modal .modal-content {
  max-width: 1000px;
}

/* Контакты */
.contact-items {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin: 30px 0 20px;
  flex-wrap: wrap;
}
.contact-item {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(212,175,55,0.3);
  border-radius: 28px;
  padding: 20px 28px;
  transition: var(--transition);
  text-align: center;
  min-width: 200px;
  flex: 1 1 auto;
  cursor: pointer;
}
.contact-item:hover {
  border-color: var(--gold);
  transform: translateY(-5px);
  background: rgba(212,175,55,0.05);
}
.contact-icon { font-size: 2rem; display: block; margin-bottom: 12px; }
.contact-text {
  font-family: monospace;
  font-size: 0.9rem;
  color: var(--text);
  background: rgba(0,0,0,0.4);
  padding: 6px 12px;
  border-radius: 20px;
  display: inline-block;
  word-break: break-all;
}
.contact-item p {
  font-size: 0.7rem;
  margin-top: 8px;
  color: var(--muted);
}
.contact-footer {
  text-align: center;
  font-size: 0.75rem;
  margin-top: 20px;
  color: var(--muted);
}

/* Калькулятор */
.rates {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 12px;
  margin: 20px 0;
}
.rate-item {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}
.rate-item:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}
.rate-price {
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--gold);
}
.package-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  padding: 12px;
  background: rgba(0,0,0,0.3);
  border-radius: 20px;
  flex-wrap: wrap;
}
.package-select, .package-qty {
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 8px 12px;
  color: var(--text);
}
.remove-pkg {
  background: transparent;
  border: none;
  color: var(--gold);
  font-size: 1.2rem;
  cursor: pointer;
}
.result {
  background: rgba(184,154,92,0.05);
  border: 1px solid var(--gold);
  border-radius: 24px;
  padding: 20px;
  text-align: center;
  margin-top: 20px;
}
.total {
  font-size: 2rem;
  color: var(--gold);
  font-weight: 500;
}
.details {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 10px;
}

/* Анимация появления */
.scroll-fade {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.scroll-fade.visible { opacity: 1; transform: translateY(0); }

.cta-button {
  display: block;
  margin: 40px auto 0 auto;
}
.modal-img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 16px;
}

/* Sparkles */
.sparkle {
  position: absolute;
  width: 4px; height: 4px;
  background: var(--gold);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  z-index: 10;
  filter: blur(1px);
  box-shadow: 0 0 6px 2px rgba(212,175,55,0.8);
  animation: sparkleFloat 2.5s ease-in-out infinite;
}
@keyframes sparkleFloat {
  0% { transform: translate(0, 0) scale(1); opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 0.8; }
  100% { transform: translate(var(--tx, 20px), var(--ty, -20px)) scale(0); opacity: 0; }
}

/* Адаптивность */
@media (max-width: 1100px) {
  .jobs-grid, .features-grid { grid-template-columns: repeat(2,1fr); gap: 25px; }
}
@media (max-width: 700px) {
  .jobs-grid, .features-grid { grid-template-columns: 1fr; }
  .hero-buttons { flex-direction: column; align-items: center; gap: 15px; }
  .btn { width: 80%; }
  .limited-access { font-size: 0.7rem; letter-spacing: 0.2em; }
  .info-text { padding: 30px 20px; }
  .section::before, .section::after { height: 80px; }
  .hero::after { height: 100px; }
  .hero-line { width: 80px; margin: 20px auto; }
  .hero-benefits p { font-size: 0.85rem; padding: 8px 16px; }
  .hero-benefits { bottom: 20px; }
  .bg-contact { padding-bottom: 80px; }
  .vacancies-subtitle { font-size: 0.75rem; margin-top: -15px; margin-bottom: 25px; }
  .feature-icon img { width: 90px; height: 90px; }
  .stat-number { font-size: 2.2rem; }
  .trust-badge { padding: 6px 16px; font-size: 0.85rem; white-space: normal; }
  .trust-badges { gap: 12px; }
  .modal-content { padding: 24px 18px; }
  .contact-item { padding: 15px 20px; min-width: 140px; }
  .contact-items { gap: 15px; }
  .calc-modal .modal-content { max-width: 95%; padding: 20px; }
  .testimonials { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; min-height: auto; }
  .testimonials img { position: static; width: 100%; height: auto; }
}
@media (max-width: 480px) {
  .testimonials { grid-template-columns: 1fr; }
}

/* Кинематографичный интро */
.bg-parallax {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background: url('../images/street2.jpg') center center / auto 100% no-repeat;
  background-color: #000;
  will-change: transform;
  pointer-events: none;
}
.film-grain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px;
  mix-blend-mode: overlay;
}
.vignette {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 50%, rgba(0,0,0,0.5) 100%);
  opacity: 0.5;
}
.promo-video-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.2s ease, visibility 1.2s;
  pointer-events: none;
  background: #000;
}
.promo-video-container.active {
  opacity: 1;
  visibility: visible;
}
.promo-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
