@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700&family=Poppins:wght@400;500;600;700&display=swap');

* { box-sizing: border-box; }

:root {
  /* Typography */
  --font-heading: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-body: 'Open Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  /* Brand buttons (same in both themes) */
  --wa: #25D366;
  --tg: #229ED9;
  --max: #7C3AED;
  --call: #22C55E;
  --yellow: #FFCC00;
  /* Effects */
  --radius: 18px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --ease: cubic-bezier(.4, 0, .2, 1);
}

/* ---------- DARK THEME (default) ---------- */
:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #0B1120;
  --surface: #13203A;
  --surface-2: #16233A;
  --foreground: #E8EEF7;
  --muted: #94A3B8;
  --border: #223049;
  --border-hover: #2C3D5E;
  --accent: #38BDF8;
  --accent-hover: #0EA5E9;
  --accent-soft: rgba(56,189,248,.14);
  --destructive: #F87171;
  --route: #475569;
  --btn-gray-bg: #1E293B;
  --btn-gray-text: #E2E8F0;
  --btn-gray-hover: #26354F;
  /* Header / hero / footer zones */
  --header-bg: #0F172A;
  --header-text: #FFFFFF;
  --header-muted: rgba(255,255,255,.72);
  --control-border: rgba(255,255,255,.35);
  --control-hover: rgba(255,255,255,.12);
  --hero-bg: linear-gradient(160deg, #0B1120 0%, #0F172A 55%, #13203A 100%);
  --hero-text: #FFFFFF;
  --hero-muted: rgba(255,255,255,.85);
  --badge-bg: rgba(255,255,255,.06);
  --badge-border: rgba(255,255,255,.22);
  --badge-text: #7DD3FC;
  --footer-bg: #0F172A;
  --footer-text: #FFFFFF;
  --footer-muted: rgba(255,255,255,.7);
  --glow: rgba(56,189,248,.16);
  --tint-bg: linear-gradient(180deg, #0E1628 0%, #0B1120 100%);
  --shadow-s: 0 1px 3px rgba(0,0,0,.35), 0 1px 2px rgba(0,0,0,.3);
  --shadow-m: 0 10px 30px rgba(0,0,0,.4), 0 3px 8px rgba(0,0,0,.3);
  --shadow-l: 0 28px 70px rgba(0,0,0,.5), 0 8px 20px rgba(0,0,0,.35);
}

/* ---------- LIGHT THEME ---------- */
:root[data-theme="light"] {
  color-scheme: light;
  --background: #F8FAFC;
  --surface: #FFFFFF;
  --surface-2: #EEF1F6;
  --foreground: #020617;
  --muted: #64748B;
  --border: #E2E8F0;
  --border-hover: #CBD5E1;
  --accent: #0369A1;
  --accent-hover: #075985;
  --accent-soft: #E0F2FE;
  --destructive: #DC2626;
  --route: #334155;
  --btn-gray-bg: #EEF1F5;
  --btn-gray-text: #1E293B;
  --btn-gray-hover: #E2E8F0;
  /* Header / hero / footer zones */
  --header-bg: #FFFFFF;
  --header-text: #0F172A;
  --header-muted: #64748B;
  --control-border: rgba(15,23,42,.3);
  --control-hover: rgba(15,23,42,.06);
  --hero-bg: linear-gradient(160deg, #F8FAFC 0%, #E9F0F8 55%, #D9E6F2 100%);
  --hero-text: #0F172A;
  --hero-muted: #475569;
  --badge-bg: rgba(3,105,161,.08);
  --badge-border: rgba(3,105,161,.3);
  --badge-text: #0369A1;
  --footer-bg: #FFFFFF;
  --footer-text: #0F172A;
  --footer-muted: #64748B;
  --glow: rgba(3,105,161,.12);
  --tint-bg: linear-gradient(180deg, #FFFFFF 0%, #F1F5F9 100%);
  --shadow-s: 0 1px 3px rgba(2,6,23,.06), 0 1px 2px rgba(2,6,23,.04);
  --shadow-m: 0 8px 24px rgba(2,6,23,.09), 0 2px 6px rgba(2,6,23,.06);
  --shadow-l: 0 24px 60px rgba(2,6,23,.12), 0 6px 16px rgba(2,6,23,.07);
}

html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font-body); font-size: 16px; line-height: 1.6;
  color: var(--foreground); background: var(--background); -webkit-font-smoothing: antialiased;
  transition: background 200ms var(--ease), color 200ms var(--ease);
}
h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--foreground); letter-spacing: -0.015em; }
p { margin-top: 0; }
a { color: var(--accent); }
img, svg { vertical-align: middle; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* Focus — visible ring for keyboard users */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.btn:focus-visible, .sticky-bar a:focus-visible { outline-color: #fff; }
.lang a:focus-visible, .theme-toggle:focus-visible { outline-color: var(--header-text); }

/* Header */
.header { background: var(--header-bg); color: var(--header-text); border-bottom: 1px solid var(--border); transition: background 200ms var(--ease), color 200ms var(--ease), border-color 200ms var(--ease); }
.header-inner { display: flex; align-items: flex-start; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; gap: 12px 16px; flex-wrap: wrap; }
.brand { display: flex; flex-direction: column; }
.brand strong { font-family: var(--font-heading); font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.brand-sub { display: block; font-size: 15px; color: var(--header-muted); margin-top: 2px; }
.header-side { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.lang a { display: inline-flex; align-items: center; justify-content: center; height: 30px; padding: 0 12px; color: var(--header-text); text-decoration: none; border: 1px solid var(--control-border); border-radius: var(--radius-pill); font-size: 13px; font-weight: 600; transition: background 150ms var(--ease), transform 100ms var(--ease), border-color 200ms var(--ease); cursor: pointer; }
.lang a:hover { background: var(--control-hover); }
.lang a:active { transform: scale(.96); }
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; padding: 0; border-radius: 50%;
  border: 1px solid var(--control-border); background: transparent; color: var(--header-text);
  cursor: pointer; transition: background 150ms var(--ease), transform 100ms var(--ease), border-color 200ms var(--ease), color 200ms var(--ease);
}
.theme-toggle:hover { background: var(--control-hover); }
.theme-toggle:active { transform: scale(.92); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .theme-moon { display: none; }
html[data-theme="light"] .theme-toggle .theme-sun { display: none; }
html[data-theme="light"] .theme-toggle .theme-moon { display: inline; }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  background: var(--hero-bg); color: var(--hero-text); text-align: center; padding: 72px 20px 60px;
  transition: background 200ms var(--ease), color 200ms var(--ease);
}
.hero::before {
  content: ""; position: absolute; top: -180px; left: 50%; transform: translateX(-50%);
  width: 720px; height: 420px; border-radius: 50%;
  background: radial-gradient(closest-side, var(--glow), transparent 70%);
  pointer-events: none;
}
.hero-inner { position: relative; }
.hero h1 { color: var(--hero-text); font-size: clamp(30px, 5vw, 48px); font-weight: 700; margin: 0 0 14px; letter-spacing: -0.02em; line-height: 1.12; }
.hero-sub { color: var(--hero-muted); margin: 0 auto 12px; max-width: 560px; font-size: 18px; }
.hero-address {
  margin: 0 auto 34px; max-width: 640px;
  font-size: 17px; font-weight: 600; color: var(--hero-text);
  text-align: center;
}
.hero-pin {
  display: inline-flex; align-items: center; vertical-align: middle;
  color: var(--accent); margin-right: 6px;
}
.hero-pin svg { width: 18px; height: 18px; }

/* Buttons */
.cta-grid { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 18px; }
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 30px; border-radius: var(--radius-pill); text-decoration: none;
  font-weight: 600; color: #fff; border: 0; cursor: pointer; font-size: 16px; line-height: 1;
  transition: transform 120ms var(--ease), box-shadow 180ms var(--ease), filter 150ms ease;
  box-shadow: var(--shadow-s);
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { transform: translateY(-1px); filter: brightness(1.08); box-shadow: var(--shadow-m); }
.btn:active { transform: scale(.97); filter: brightness(.95); }
.btn::after {
  content: ""; position: absolute; top: 0; left: 0; width: 40%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.35), transparent);
  transform: translateX(-150%) skewX(-20deg); pointer-events: none;
  transition: transform 500ms var(--ease);
}
.btn:hover::after { transform: translateX(350%) skewX(-20deg); }
.btn-wa { background: var(--wa); } .btn-tg { background: var(--tg); } .btn-max { background: var(--max); }
.btn-call { background: var(--call); } .btn-route { background: var(--route); }
.btn-ghost {
  background: transparent; border: 1.5px solid var(--control-border);
  box-shadow: none; color: var(--hero-text); font-weight: 500;
}
.btn-ghost:hover { background: var(--control-hover); border-color: var(--hero-text); box-shadow: none; }
.btn-yellow {
  background: var(--yellow); color: #0F172A;
  box-shadow: 0 6px 18px rgba(255,204,0,.28);
}
.btn-yellow:hover { filter: brightness(1.05); box-shadow: 0 10px 26px rgba(255,204,0,.42); }
.btn-yellow svg { color: #0F172A; }
.btn-gray {
  background: var(--btn-gray-bg); color: var(--btn-gray-text);
  border: 1px solid rgba(128,138,158,.18);
}
.btn-gray:hover { background: var(--btn-gray-hover); box-shadow: var(--shadow-m); }
.btn-gray svg { color: currentColor; }
.btn-icon { width: 20px; height: 20px; object-fit: contain; border-radius: 50%; flex-shrink: 0; transition: transform 180ms var(--ease); }
.btn:hover .btn-icon { transform: scale(1.12); }


/* Benefits strip */
.benefits { padding: 40px 0; margin-top: -6px; }
.benefits-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.benefit {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow-s);
  transition: box-shadow 180ms var(--ease), transform 150ms var(--ease), background 200ms var(--ease), border-color 200ms var(--ease);
}
.benefit:hover { box-shadow: var(--shadow-m); transform: translateY(-2px); }
.benefit-icon {
  flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 14px;
  background: var(--accent-soft); color: var(--accent);
  transition: transform 180ms var(--ease), background 180ms var(--ease);
}
.benefit-icon svg { width: 22px; height: 22px; }
.benefit:hover .benefit-icon { transform: scale(1.08); }
.benefit h3 { font-size: 15px; font-weight: 600; margin: 0 0 4px; color: var(--foreground); }
.benefit p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.benefit a { color: var(--accent); text-decoration: none; font-weight: 600; }
.benefit a:hover { text-decoration: underline; }

/* Sections & cards */
.section { padding: 56px 0; }
.section-tint { background: var(--tint-bg); transition: background 200ms var(--ease); }
.section-title { font-size: clamp(24px, 3.4vw, 32px); font-weight: 600; margin: 0 0 28px; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.service-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 22px;
  box-shadow: var(--shadow-s);
  transition: box-shadow 180ms var(--ease), transform 150ms var(--ease), background 200ms var(--ease), border-color 200ms var(--ease);
}
.service-card:hover { box-shadow: var(--shadow-m); transform: translateY(-3px); border-color: var(--border-hover); }
.service-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 14px; margin-bottom: 16px;
  background: var(--accent-soft); color: var(--accent);
  transition: transform 180ms var(--ease), background 180ms var(--ease);
}
.service-icon svg { width: 24px; height: 24px; }
.service-card:hover .service-icon { transform: scale(1.08); background: var(--accent); color: #fff; }
.service-card h3 { font-size: 18px; font-weight: 600; margin: 0 0 8px; color: var(--foreground); }
.service-card p { margin: 0; color: var(--muted); font-size: 15px; }
.hint { color: var(--muted); font-size: 14px; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.gallery figure { margin: 0; border-radius: var(--radius); overflow: hidden; }
.gallery img { width: 100%; height: 180px; object-fit: cover; border: 1px solid var(--border); background: var(--surface-2); transition: transform 180ms var(--ease), box-shadow 180ms var(--ease); }
.gallery figure:hover img { transform: scale(1.03); box-shadow: var(--shadow-m); }
.gallery figcaption { font-size: 13px; margin-top: 8px; color: var(--muted); padding: 0 2px; }

/* Route */
.address { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 600; color: var(--foreground); margin-bottom: 18px; }
.address-icon { display: inline-flex; color: var(--accent); }
.address-icon svg { width: 20px; height: 20px; }
.route-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-m); }

/* Footer */
.footer { margin-top: 32px; background: var(--footer-bg); color: var(--footer-text); padding: 44px 0 100px; border-top: 1px solid var(--border); transition: background 200ms var(--ease), color 200ms var(--ease), border-color 200ms var(--ease); }
.footer a { color: var(--footer-text); }
.footer-inner { text-align: center; }
.footer-name { font-family: var(--font-heading); font-size: 20px; font-weight: 600; margin: 0 0 6px; }
.footer-contacts { margin: 0 0 4px; font-size: 16px; }
.footer-contacts a { text-decoration: none; font-weight: 600; }
.footer-contacts a:hover { text-decoration: underline; }
.footer-meta { margin: 0 0 20px; color: var(--footer-muted); font-size: 14px; }
.footer-cta { margin-top: 4px; }

/* Sticky bar — плавающие круглые кнопки справа снизу с отступом от краёв */
.sticky-bar {
  position: fixed; bottom: 20px; right: 20px; z-index: 50;
  display: flex; flex-direction: row; gap: 12px;
}
.sticky-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 50%;
  color: #fff; text-decoration: none;
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
  transition: transform 120ms var(--ease), box-shadow 180ms var(--ease);
}
.sticky-btn svg { width: 24px; height: 24px; }
.sticky-btn .btn-icon { width: 27px; height: 27px; }
.sticky-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,0,0,.42); }
.sticky-btn:active { transform: scale(.94); }
.sticky-call { background: var(--yellow); color: #0F172A; }
.sticky-wa { background: var(--btn-gray-bg); color: var(--btn-gray-text); }

/* Lightbox — полноэкранный просмотр фото с зумом */
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.92);
  display: none; align-items: center; justify-content: center;
  padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox-img {
  max-width: 92vw; max-height: 88vh;
  border-radius: 10px; box-shadow: 0 12px 50px rgba(0,0,0,.6);
  transform-origin: center center;
  transition: transform 120ms var(--ease);
  cursor: grab; user-select: none; -webkit-user-select: none;
  touch-action: none;
}
.lightbox-img.zoomed { cursor: grabbing; }
.lightbox-btn {
  position: absolute; display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; padding: 0; border-radius: 50%;
  background: rgba(255,255,255,.16); color: #fff; border: 0; cursor: pointer;
  font-size: 22px; line-height: 1;
  transition: background 150ms var(--ease), transform 100ms var(--ease);
}
.lightbox-btn:hover { background: rgba(255,255,255,.3); }
.lightbox-btn:active { transform: scale(.92); }
.lightbox-close { top: 18px; right: 18px; }
.lightbox-zoom-in { bottom: 22px; right: 74px; }
.lightbox-zoom-out { bottom: 22px; right: 22px; }
.lightbox-caption {
  position: absolute; left: 22px; bottom: 22px; max-width: 60%;
  color: #fff; font-size: 14px; background: rgba(0,0,0,.5);
  padding: 6px 14px; border-radius: 999px;
}

@media (max-width: 640px) {
  /* Шапка на телефоне: название + маленькие кнопки в правом верхнем углу */
  .header-inner { position: relative; padding-top: 12px; padding-bottom: 12px; padding-right: 96px; }
  .brand strong { font-size: 17px; }
  .brand-sub { font-size: 13px; line-height: 1.35; }
  .header-side { position: absolute; top: 12px; right: 12px; gap: 6px; }
  .lang a { height: 28px; padding: 0 10px; font-size: 12px; }
  .theme-toggle { width: 28px; height: 28px; }
  .theme-toggle svg { width: 15px; height: 15px; }
  .hero { padding: 48px 16px 44px; }
  .hero-sub { font-size: 16px; }
  .btn { width: 100%; }
  .benefits-grid { grid-template-columns: 1fr 1fr; }
  .benefit { flex-direction: column; }
  .footer { padding-bottom: 120px; }
}

@media (min-width: 641px) and (max-width: 900px) {
  .benefits-grid { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .benefit, .service-card, .gallery img, .sticky-btn, .lang a, .theme-toggle, body, .hero, .section-tint, .header, .footer, .lightbox-img, .lightbox-btn { transition: none; }
  .btn:hover, .benefit:hover, .service-card:hover, .gallery figure:hover img, .sticky-btn:hover { transform: none; }
}
