/* Олфонет-Сервис — фирменный синий #178ACB снят с логотипа */
:root {
  --brand: #178acb;
  --brand-dark: #0f6ca2;
  --brand-deep: #0e2436;
  --ink: #16202b;
  --muted: #5f7183;
  --line: #e2e9ef;
  --bg: #ffffff;
  --bg-soft: #f5f9fc;
  --tint: #e9f4fb;
  --shadow: 0 1px 2px rgba(16, 40, 60, .06), 0 8px 24px rgba(16, 40, 60, .06);
  --shadow-lg: 0 2px 4px rgba(16, 40, 60, .06), 0 18px 46px rgba(16, 40, 60, .12);
  --radius: 16px;
  --anydesk: #ef443b;
  --anydesk-dark: #cf3227;
  --rustdesk: #0a7fd4;
  --rustdesk-dark: #0764a8;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--brand-dark); text-decoration: none; }
a:hover { color: var(--brand); }

h1, h2, h3 { margin: 0; line-height: 1.18; letter-spacing: -.02em; font-weight: 700; }
h1 { font-size: clamp(30px, 4.6vw, 50px); }
h2 { font-size: clamp(24px, 3vw, 33px); }
h3 { font-size: 19px; letter-spacing: -.01em; }

p { margin: 0 0 14px; }
p:last-child { margin-bottom: 0; }

.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* ---------- Шапка ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 74px;
}

.brand { display: flex; align-items: center; flex: 0 0 auto; }
.brand img { height: 38px; width: auto; }

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex-wrap: wrap;
}

.nav a {
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 10px;
  white-space: nowrap;
}
.nav a:hover { background: var(--tint); color: var(--brand-dark); }
.nav a[aria-current="page"] { color: var(--brand-dark); background: var(--tint); }

.header-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  font-weight: 700;
  font-size: 16px;
  color: var(--brand-dark);
  padding: 9px 16px;
  border: 1px solid var(--brand);
  border-radius: 999px;
  white-space: nowrap;
}
.header-phone:hover { background: var(--brand); color: #fff; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font: inherit;
  font-weight: 600;
  padding: 13px 24px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-dark); }

/* ---------- Первый экран ---------- */
.hero {
  background:
    radial-gradient(1000px 420px at 82% -12%, rgba(23, 138, 203, .16), transparent 70%),
    linear-gradient(180deg, var(--bg-soft), #fff);
  border-bottom: 1px solid var(--line);
  padding: 68px 0 60px;
}

.hero-lead {
  font-size: clamp(17px, 2vw, 20px);
  color: var(--muted);
  max-width: 60ch;
  margin: 18px 0 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--brand-dark);
  background: var(--tint);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}

/* ---------- Скачивание удалённого доступа ---------- */
.downloads {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin: 34px 0 0;
}

.dl {
  display: flex;
  align-items: center;
  gap: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
  color: var(--ink);
  transition: box-shadow .18s, transform .18s, border-color .18s;
}
.dl:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); color: var(--ink); }

.dl-icon {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: grid;
  place-items: center;
}
.dl-icon svg { width: 32px; height: 32px; }

.dl-body { flex: 1 1 auto; min-width: 0; }
.dl-name { display: block; font-size: 20px; font-weight: 700; line-height: 1.2; }
.dl-note { display: block; font-size: 14px; color: var(--muted); }

.dl-go {
  flex: 0 0 auto;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
}

/* AnyDesk — красный, RustDesk — синий: цвета сохранены, чтобы не путались */
.dl-any { border-color: rgba(239, 68, 59, .35); }
.dl-any:hover { border-color: var(--anydesk); }
.dl-any .dl-icon { background: var(--anydesk); }
.dl-any .dl-go { background: var(--anydesk); }
.dl-any:hover .dl-go { background: var(--anydesk-dark); }

.dl-rust { border-color: rgba(10, 127, 212, .35); }
.dl-rust:hover { border-color: var(--rustdesk); }
.dl-rust .dl-icon { background: var(--rustdesk); }
.dl-rust .dl-go { background: var(--rustdesk); }
.dl-rust:hover .dl-go { background: var(--rustdesk-dark); }

.hero-note {
  margin-top: 22px;
  font-size: 15px;
  color: var(--muted);
}

/* Подсказка «откройте на компьютере» — только на телефоне */
.phone-only { display: none; }
.pc .phone-only { display: none; }
.phone .phone-only { display: block; }
.phone .pc-only { display: none; }

.callout {
  background: var(--tint);
  border: 1px solid rgba(23, 138, 203, .25);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 28px 0 0;
}
.callout .phones-big {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-top: 12px;
  font-size: 21px;
  font-weight: 700;
}

/* ---------- Секции ---------- */
.section { padding: 64px 0; }
.section-soft { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 62ch; margin-bottom: 32px; }
.section-head p { margin-top: 12px; color: var(--muted); }

.page-head { padding: 52px 0 40px; background: linear-gradient(180deg, var(--bg-soft), #fff); border-bottom: 1px solid var(--line); }
.page-head p { margin-top: 16px; color: var(--muted); max-width: 62ch; font-size: 18px; }

.prose { max-width: 68ch; }
.prose h2 { margin: 34px 0 12px; }
.prose h3 { margin: 26px 0 8px; }
.prose ul, .prose ol { margin: 0 0 14px; padding-left: 22px; }
.prose li { margin-bottom: 6px; }

/* ---------- Карточки ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow);
  transition: box-shadow .18s, transform .18s;
}
.card p { color: var(--muted); margin-top: 10px; }
.card ul { color: var(--muted); margin: 10px 0 0; padding-left: 20px; }
.card ul li { margin-bottom: 5px; }
.card-link { display: block; color: inherit; }
.card-link:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); color: inherit; }
.card-more { display: inline-block; margin-top: 14px; color: var(--brand-dark); font-weight: 600; font-size: 15px; }

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--tint);
  color: var(--brand-dark);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}
.card-icon svg { width: 24px; height: 24px; }

/* ---------- Цифры ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}
.stat {
  border-left: 3px solid var(--brand);
  padding: 4px 0 4px 18px;
}
.stat b { display: block; font-size: 34px; line-height: 1.1; letter-spacing: -.02em; }
.stat span { color: var(--muted); font-size: 15px; }

/* ---------- Шаги ---------- */
.steps { display: grid; gap: 14px; counter-reset: step; }
.step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.step b {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 15px;
  display: grid;
  place-items: center;
}
.step p { color: var(--muted); margin: 4px 0 0; }

/* ---------- Логотипы вендоров ---------- */
.logos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}
.logos figure {
  margin: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  height: 96px;
  display: grid;
  place-items: center;
  padding: 16px;
  transition: border-color .18s, box-shadow .18s;
}
.logos figure:hover { border-color: rgba(23, 138, 203, .5); box-shadow: var(--shadow); }
.logos img { max-height: 46px; width: auto; object-fit: contain; }

/* ---------- Галерея сканов и отзывов ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
}
.gallery a {
  display: block;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.gallery a:hover { border-color: var(--brand); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.gallery img { width: 100%; height: 240px; object-fit: cover; object-position: top; }
.gallery figcaption { padding: 10px 12px; font-size: 14px; color: var(--muted); }

.photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.photos img { border-radius: 14px; border: 1px solid var(--line); }

/* ---------- Всплывающий просмотр изображений ---------- */
.lightbox-open { overflow: hidden; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 64px 72px;
  background: rgba(8, 20, 30, .93);
  backdrop-filter: blur(3px);
}
.lightbox[hidden] { display: none; }

/* Затемнение появляется сразу, «выезжает» только само изображение */
@keyframes lightbox-in {
  from { opacity: 0; transform: scale(.97); }
  to { opacity: 1; transform: none; }
}

.lightbox-figure {
  animation: lightbox-in .18s ease-out;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 100%;
  max-height: 100%;
}

.lightbox-img {
  max-width: 100%;
  max-height: calc(100vh - 150px);
  width: auto;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .5);
  cursor: default;
}

.lightbox-caption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 6px 16px;
  color: #fff;
  font-size: 15px;
  text-align: center;
}
.lightbox-count { color: rgba(255, 255, 255, .6); font-variant-numeric: tabular-nums; }

.lightbox-close,
.lightbox-nav {
  position: absolute;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s;
}
.lightbox-close:hover,
.lightbox-nav:hover { background: var(--brand); border-color: var(--brand); }
.lightbox-close:focus-visible,
.lightbox-nav:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.lightbox-close svg,
.lightbox-nav svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lightbox-close { top: 18px; right: 18px; width: 44px; height: 44px; }
.lightbox-nav { top: 50%; width: 52px; height: 52px; margin-top: -26px; }
.lightbox-prev { left: 14px; }
.lightbox-next { right: 14px; }
.lightbox-nav:hover { transform: scale(1.06); }

@media (max-width: 780px) {
  .lightbox { padding: 56px 12px 84px; }
  .lightbox-img { max-height: calc(100vh - 190px); }
  .lightbox-nav { top: auto; bottom: 16px; margin-top: 0; width: 46px; height: 46px; }
  .lightbox-prev { left: 50%; margin-left: -54px; }
  .lightbox-next { right: 50%; margin-right: -54px; }
}

/* ---------- Контактные плитки ---------- */
.contact-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.contact-list dt { font-size: 14px; color: var(--muted); }
.contact-list dd { margin: 2px 0 14px; font-weight: 600; }
.contact-list dd:last-child { margin-bottom: 0; }

.hours { display: grid; gap: 10px; margin: 0; }
.hours div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.hours div:last-child { border-bottom: 0; }
.hours span:first-child { color: var(--muted); }
.hours span:last-child { font-weight: 600; text-align: right; }

/* ---------- Полоса призыва ---------- */
.cta {
  background: linear-gradient(120deg, var(--brand-dark), var(--brand));
  color: #fff;
  padding: 52px 0;
}
.cta h2 { color: #fff; }
.cta p { color: rgba(255, 255, 255, .85); margin-top: 12px; max-width: 60ch; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.cta .btn-primary { background: #fff; color: var(--brand-dark); }
.cta .btn-primary:hover { background: rgba(255, 255, 255, .88); color: var(--brand-dark); }
.cta .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); }
.cta .btn-ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; border-color: #fff; }

/* ---------- Подвал ---------- */
.site-footer {
  background: #0e2436;
  color: #b9c8d5;
  padding: 52px 0 28px;
  font-size: 15px;
}
.site-footer img { height: 34px; width: auto; margin-bottom: 18px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}
.site-footer h3 { color: #fff; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 14px; }
.site-footer a { color: #e7eff6; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.footer-legal {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: 13px;
  color: #8fa4b6;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
}

/* ---------- Адаптив ---------- */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 780px) {
  body { font-size: 16px; }
  .header-row { min-height: 64px; flex-wrap: wrap; gap: 12px 16px; padding-top: 12px; padding-bottom: 12px; }
  .brand img { height: 32px; }
  .header-phone { order: 2; margin-left: auto; }
  .nav { order: 3; width: 100%; margin-left: 0; gap: 2px; overflow-x: auto; }
  .nav a { padding: 7px 10px; font-size: 14px; }
  .hero { padding: 44px 0 44px; }
  .section { padding: 46px 0; }
  .dl { padding: 16px; gap: 14px; }
  .dl-icon { width: 48px; height: 48px; }
  .gallery img { height: 190px; }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .dl-go { padding: 9px 14px; font-size: 14px; }
  /* Номер с кодом длинный, на узких экранах поджимаем кнопку */
  .header-phone { font-size: 15px; padding: 8px 13px; }
}

@media (max-width: 360px) {
  .wrap { padding: 0 16px; }
  .header-phone { font-size: 14px; padding: 7px 11px; }
}
