/* ============================================================
   Дивизион «Запад» — Рога и Копыта
   Корпоративный лендинг (согласованная версия)
   ============================================================ */

:root {
  --navy: #0A2E5C;
  --navy-deep: #061C38;
  --blue: #00A3E0;
  --blue-light: #7FD7F4;
  --blue-soft: #E7F6FD;
  --bg: #F4F7FB;
  --white: #ffffff;
  --text: #1B2B3F;
  --text-muted: #5A6B80;
  --line: #E2E9F2;
  --radius: 16px;
  --shadow: 0 20px 50px rgba(10, 46, 92, 0.12);
  --shadow-sm: 0 8px 24px rgba(10, 46, 92, 0.08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --container: 1200px;
}

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

html { scroll-behavior: smooth; }

section[id] { scroll-margin-top: 96px; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Прелоадер ---------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--navy-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.preloader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader-inner { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.preloader-mark { width: 56px; height: 56px; animation: preloaderPulse 1.4s ease-in-out infinite; }
.preloader-bar { width: 160px; height: 3px; background: rgba(255,255,255,0.15); border-radius: 999px; overflow: hidden; }
.preloader-bar-fill { display: block; width: 40%; height: 100%; background: var(--blue); border-radius: 999px; animation: preloaderSlide 1.2s ease-in-out infinite; }
@keyframes preloaderPulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.08); opacity: 0.8; } }
@keyframes preloaderSlide { 0% { transform: translateX(-100%); } 100% { transform: translateX(400%); } }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 10px 24px rgba(0, 163, 224, 0.35);
}
.btn-primary:hover { background: #0089c2; transform: translateY(-2px); box-shadow: 0 16px 32px rgba(0, 163, 224, 0.4); }
.btn-ghost {
  background: rgba(255,255,255,0.08);
  color: var(--white);
  border-color: rgba(255,255,255,0.4);
}
.btn-ghost:hover { background: rgba(255,255,255,0.18); transform: translateY(-2px); }

/* ---------- Шапка ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 40px; height: 40px; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 15px; color: var(--navy); font-weight: 700; }
.brand-text span { font-size: 12px; color: var(--text-muted); }

.main-nav { display: flex; gap: 26px; }
.main-nav a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  position: relative;
  padding: 4px 0;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--blue);
  transition: width 0.25s ease;
}
.main-nav a:hover { color: var(--navy); }
.main-nav a:hover::after { width: 100%; }
.main-nav a.active { color: var(--navy); }
.main-nav a.active::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 14px; }

.lang-toggle {
  background: var(--blue-soft);
  color: var(--navy);
  border: none;
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-burger span { width: 24px; height: 2px; background: var(--navy); border-radius: 2px; transition: transform 0.25s ease, opacity 0.25s ease; }
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 640px; display: flex; align-items: center; color: var(--white); overflow: hidden; }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(6, 28, 56, 0.92) 0%, rgba(10, 46, 92, 0.78) 45%, rgba(0, 90, 130, 0.45) 100%);
}
.hero-content { position: relative; z-index: 1; padding: 96px 0; max-width: 720px; }

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-light);
  margin-bottom: 16px;
}
.hero h1 {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.hero-lead { font-size: 18px; color: rgba(255,255,255,0.88); margin-bottom: 32px; max-width: 560px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 2;
}
.scroll-hint-mouse {
  display: block;
  width: 26px;
  height: 42px;
  border: 2px solid rgba(255,255,255,0.7);
  border-radius: 999px;
  position: relative;
}
.scroll-hint-wheel {
  position: absolute;
  top: 7px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  background: var(--white);
  border-radius: 999px;
  animation: scrollWheel 1.6s ease-in-out infinite;
}
@keyframes scrollWheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { transform: translateY(0); opacity: 0; } }

/* ---------- Статистика ---------- */
.stats { background: var(--white); border-bottom: 1px solid var(--line); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 48px 0;
}
.stat { text-align: center; }
.stat-value {
  display: block;
  font-size: 44px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
}
.stat-label { display: block; font-size: 14px; color: var(--text-muted); margin-top: 8px; }

/* ---------- Секции ---------- */
.section { padding: 96px 0; }
.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 16px;
}
.section-sub { font-size: 17px; color: var(--text-muted); }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.about-media img { border-radius: var(--radius); box-shadow: var(--shadow); height: 100%; object-fit: cover; }
.about-body h2 {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 20px;
}
.about-body > p { color: var(--text-muted); font-size: 16px; margin-bottom: 14px; }
.check-list { margin-top: 24px; display: grid; gap: 12px; }
.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-weight: 500;
  color: var(--text);
}
.check-list li::before {
  content: "";
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  background: var(--blue);
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 12px;
  background-position: center;
  background-repeat: no-repeat;
}

/* ---------- Услуги ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.service-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.service-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--blue-soft);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.service-icon svg { width: 28px; height: 28px; }
.service-card h3 { font-size: 20px; font-weight: 700; color: var(--navy); margin-bottom: 10px; }
.service-card p { font-size: 15px; color: var(--text-muted); }

/* ---------- Процесс ---------- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.process-step {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.process-step:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.process-num {
  display: block;
  font-size: 42px;
  font-weight: 800;
  color: var(--blue);
  opacity: 0.3;
  line-height: 1;
  margin-bottom: 20px;
}
.process-body h3 { font-size: 19px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.process-body p { font-size: 14px; color: var(--text-muted); }

/* ---------- География ---------- */
.geography-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.geography-media img { border-radius: var(--radius); box-shadow: var(--shadow); height: 100%; object-fit: cover; }
.geography-body h2 {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 20px;
}
.geography-body > p { color: var(--text-muted); font-size: 16px; margin-bottom: 24px; }
.geo-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.geo-tags span {
  background: var(--blue-soft);
  color: var(--navy);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
}

/* ---------- Преимущества ---------- */
.advantages-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.advantage {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
  overflow: hidden;
}
.advantage-num { font-size: 40px; font-weight: 800; color: var(--blue); opacity: 0.35; line-height: 1; display: block; margin-bottom: 16px; }
.advantage h3 { font-size: 18px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.advantage p { font-size: 14px; color: var(--text-muted); }

/* ---------- Отрасли ---------- */
.industries-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.industry-tile {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  font-size: 17px;
  font-weight: 600;
  color: var(--navy);
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.industry-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); border-color: var(--blue); background: var(--blue-soft); }

/* ---------- CTA баннер ---------- */
.cta-banner {
  background: linear-gradient(120deg, var(--navy-deep) 0%, var(--navy) 60%, #0b4a8c 100%);
  padding: 72px 0;
  color: var(--white);
}
.cta-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-banner-text h2 {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 10px;
}
.cta-banner-text p { font-size: 16px; color: rgba(255,255,255,0.8); max-width: 520px; }

/* ---------- Контакты ---------- */
.contacts { background: var(--white); border-top: 1px solid var(--line); }
.contacts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.contacts-info h2 {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 16px;
}
.contacts-info > p { color: var(--text-muted); font-size: 16px; margin-bottom: 28px; }
.contact-list { display: grid; gap: 18px; }
.contact-list li { display: flex; flex-direction: column; }
.contact-list li span:first-child { font-size: 13px; color: var(--text-muted); }
.contact-list li a, .contact-list li span:last-child { font-size: 17px; font-weight: 600; color: var(--text); }

.contact-form {
  display: grid;
  gap: 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
}
.contact-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--text); }
.contact-form input, .contact-form textarea {
  font: inherit;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  color: var(--text);
  transition: border-color 0.2s ease;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--blue); }
.contact-form textarea { resize: vertical; }
.form-note { font-size: 12px; color: var(--text-muted); }

/* ---------- Футер ---------- */
.site-footer { background: var(--navy-deep); color: rgba(255,255,255,0.7); padding: 56px 0 24px; }
.footer-inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer-brand { display: flex; flex-direction: row; gap: 14px; align-items: flex-start; max-width: 460px; }
.footer-logo { flex-shrink: 0; }
.footer-logo .brand-mark { width: 40px; height: 40px; }
.footer-text { display: flex; flex-direction: column; line-height: 1.4; }
.footer-text .footer-name { font-size: 15px; color: var(--white); font-weight: 700; }
.footer-text .footer-division { font-size: 12px; color: rgba(255,255,255,0.6); }
.footer-tagline { font-size: 13px; color: rgba(255,255,255,0.6); margin-top: 10px; line-height: 1.5; }
.footer-nav { display: grid; grid-template-columns: repeat(2, auto); gap: 12px 28px; }
.footer-nav a { font-size: 14px; color: rgba(255,255,255,0.75); transition: color 0.2s ease; }
.footer-nav a:hover { color: var(--blue-light); }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.12); }
.footer-copy { font-size: 13px; color: rgba(255,255,255,0.5); }

/* ---------- Кнопка наверх ---------- */
.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease, background 0.2s ease;
}
.to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--blue); }
.to-top svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

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

/* ---------- Адаптив ---------- */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .advantages-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .industries-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid, .geography-grid, .contacts-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .main-nav {
    position: fixed;
    inset: 72px 0 0 0;
    background: var(--white);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: 24px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    border-top: 1px solid var(--line);
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav a { font-size: 18px; padding: 12px 0; }
  .nav-burger { display: flex; }
  .section { padding: 64px 0; }
  .hero { min-height: 560px; }
  .footer-inner { flex-direction: column; }
}

@media (max-width: 560px) {
  .services-grid, .advantages-grid, .stats-grid { grid-template-columns: 1fr; }
  .process-grid, .industries-grid { grid-template-columns: 1fr; }
  .hero-cta .btn { width: 100%; }
  .cta-banner-inner { flex-direction: column; align-items: flex-start; }
  .brand-text strong { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
