/* ============================================================
   city-styles.css — городские страницы kgvision.ru
   Дизайн совпадает с главной страницей kgvision.ru
   ============================================================ */

:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #fbfbfd;
  --border: rgba(0,0,0,0.08);
  --text: #1d1d1f;
  --text-muted: #6e6e73;
  --accent: #0071e3;
  --accent-press: #0058b0;
  --accent-ink: #ffffff;
  --nav-bg: rgba(255,255,255,0.72);
  --card-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.06);
  --card-shadow-hover: 0 2px 4px rgba(0,0,0,0.05), 0 16px 40px rgba(0,0,0,0.10);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #1d1d1f;
    --surface-2: #161617;
    --border: rgba(255,255,255,0.1);
    --text: #f5f5f7;
    --text-muted: #86868b;
    --accent: #2997ff;
    --accent-press: #1f7fdb;
    --accent-ink: #ffffff;
    --nav-bg: rgba(0,0,0,0.62);
    --card-shadow: 0 1px 2px rgba(0,0,0,0.3), 0 8px 24px rgba(0,0,0,0.35);
    --card-shadow-hover: 0 2px 4px rgba(0,0,0,0.35), 0 16px 40px rgba(0,0,0,0.5);
  }
}

:root[data-theme="dark"] {
  --bg: #000000;
  --surface: #1d1d1f;
  --surface-2: #161617;
  --border: rgba(255,255,255,0.1);
  --text: #f5f5f7;
  --text-muted: #86868b;
  --accent: #2997ff;
  --accent-press: #1f7fdb;
  --accent-ink: #ffffff;
  --nav-bg: rgba(0,0,0,0.62);
  --card-shadow: 0 1px 2px rgba(0,0,0,0.3), 0 8px 24px rgba(0,0,0,0.35);
  --card-shadow-hover: 0 2px 4px rgba(0,0,0,0.35), 0 16px 40px rgba(0,0,0,0.5);
}

:root[data-theme="light"] {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #fbfbfd;
  --border: rgba(0,0,0,0.08);
  --text: #1d1d1f;
  --text-muted: #6e6e73;
  --accent: #0071e3;
  --accent-press: #0058b0;
  --accent-ink: #ffffff;
  --nav-bg: rgba(255,255,255,0.72);
  --card-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.06);
  --card-shadow-hover: 0 2px 4px rgba(0,0,0,0.05), 0 16px 40px rgba(0,0,0,0.10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.5 -apple-system, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* -------- NAV -------- */
nav.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--nav-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
}

nav.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.nav-city-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--border));
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 220ms cubic-bezier(0.2,0,0,1), opacity 220ms cubic-bezier(0.2,0,0,1);
}
.menu-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.navlinks {
  display: flex;
  gap: 1.8rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.navlinks a { text-decoration: none; transition: color 180ms ease; }
.navlinks a:hover { color: var(--text); }

@media (max-width: 560px) {
  .menu-toggle { display: flex; }
  .navlinks {
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--nav-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
    padding: 0.4rem 1.5rem 0.8rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 220ms cubic-bezier(0.2,0,0,1), transform 220ms cubic-bezier(0.2,0,0,1), visibility 220ms;
  }
  .navlinks.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .navlinks a {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
    color: var(--text);
  }
  .navlinks a:last-child { border-bottom: none; }
}

/* -------- BUTTONS -------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.98rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 980px;
  padding: 0.72rem 1.5rem;
  transition: transform 120ms cubic-bezier(0.2,0,0,1), background 120ms ease, box-shadow 180ms ease;
  font-family: inherit;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-press); }
.btn-primary:active { transform: scale(0.97); }
.btn-text { color: var(--accent); padding: 0.72rem 0.2rem; }
.btn-text:active { transform: scale(0.97); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* -------- HERO -------- */
.hero {
  text-align: center;
  padding: 5.5rem 1.5rem 4.5rem;
}

.eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: -0.01em;
  margin-bottom: 0.9rem;
}

h1.display {
  font-size: clamp(2.4rem, 6.2vw, 4.2rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.06;
  margin: 0 0 1.1rem;
  text-wrap: balance;
}

.hero p.sub {
  font-size: clamp(1.05rem, 2.3vw, 1.3rem);
  color: var(--text-muted);
  max-width: 42ch;
  margin: 0 auto 2.2rem;
  letter-spacing: -0.005em;
}

.hero-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.6rem;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2.4rem;
  flex-wrap: wrap;
  margin-top: 2.8rem;
}

.hero-stat strong {
  display: block;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero-stat span {
  display: block;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.1rem;
}

/* -------- SECTIONS -------- */
section { padding: 5.5rem 0; }
section.alt { background: var(--surface-2); }

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
}

.kicker {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 0.6rem;
  display: block;
}

h2.display {
  font-size: clamp(1.85rem, 4.2vw, 2.7rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0 0 0.9rem;
  text-wrap: balance;
}

.section-head p {
  color: var(--text-muted);
  font-size: 1.05rem;
  letter-spacing: -0.005em;
  margin: 0;
}

/* -------- SERVICES GRID -------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}

@media (max-width: 780px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .services-grid { grid-template-columns: 1fr; } }

.svc-card {
  background: var(--surface);
  border-radius: 20px;
  padding: 1.6rem 1.5rem;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border);
  transition: transform 220ms cubic-bezier(0.2,0,0,1), box-shadow 220ms ease;
}

.svc-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
}

.svc-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.svc-card h3 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 0.45rem;
}

.svc-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* -------- WHY GRID -------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.4rem;
}
@media (max-width: 780px) { .why-grid { grid-template-columns: 1fr; gap: 1.8rem; } }

.why-item { text-align: center; }

.why-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.1rem;
  font-size: 1.4rem;
}

.why-item h3 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 0.5rem;
}

.why-item p {
  color: var(--text-muted);
  font-size: 0.93rem;
  margin: 0;
  line-height: 1.55;
}

/* -------- PROCESS -------- */
.process-track {
  display: flex;
  justify-content: space-between;
  position: relative;
  max-width: 760px;
  margin: 0 auto;
}

.process-track::before {
  content: "";
  position: absolute;
  top: 17px;
  left: 34px;
  right: 34px;
  height: 1px;
  background: var(--border);
}

.process-step {
  position: relative;
  flex: 1;
  text-align: center;
  padding: 0 0.6rem;
}

.process-num {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 auto 1rem;
}

.process-step strong {
  display: block;
  font-size: 0.98rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.process-step span {
  display: block;
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.4;
}

@media (max-width: 640px) {
  .process-track { flex-direction: column; gap: 1.8rem; text-align: left; }
  .process-track::before { display: none; }
  .process-step { display: flex; align-items: flex-start; gap: 1rem; text-align: left; padding: 0; }
  .process-num { margin: 0; flex-shrink: 0; }
}

/* -------- CITIES SECTION -------- */
.cities-wrap {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.5rem;
}

.city-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.6rem 1.2rem;
  border-radius: 980px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  box-shadow: var(--card-shadow);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.city-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-hover);
  border-color: var(--accent);
}

.city-link.current {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

/* -------- CONTACT -------- */
.contact-section {
  text-align: center;
  padding: 5.5rem 1.5rem;
}

.contact-section h2.display { margin-bottom: 1rem; }

.contact-section p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 40ch;
  margin: 0 auto 2rem;
}

/* -------- FOOTER -------- */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0 2.5rem;
}

.foot-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.foot-row .copy {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.foot-row a { text-decoration: none; }
.foot-row a:hover { color: var(--accent); }

.tg-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.tg-link:hover { color: var(--accent-press); }

/* -------- SCROLL REVEAL -------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 640ms cubic-bezier(0.2,0,0,1), transform 640ms cubic-bezier(0.2,0,0,1);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal.in { opacity: 1; transform: none; transition: none; }
  .svc-card, .city-link { transition: none; }
  .svc-card:hover, .city-link:hover { transform: none; }
}
