:root {
  --page-bg: #f6f6f6;
  --card-bg: #ffffff;
  --text: #222222;
  --muted: #6f6f6f;
  --line: #e5e5e5;
  --accent: #111111;
  --accent-soft: #f0f0f0;
  --max-width: 1180px;
  --content-width: 960px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--page-bg);
  font-size: 16px;
  line-height: 1.55;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: #777777;
}

.container {
  width: min(var(--max-width), calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 30px;
  align-items: center;
  min-height: 92px;
  padding: 16px 0;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  width: 180px;
}

.logo {
  width: 180px;
  max-height: 58px;
  object-fit: contain;
  object-position: left center;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 26px;
  font-size: 15px;
}

.top-nav a {
  padding: 8px 0;
  color: #232323;
  white-space: nowrap;
}

.header-contact {
  display: grid;
  gap: 2px;
  justify-items: end;
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
}

.header-contact a {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.article-section,
.contacts-section {
  padding: 34px 0;
}

.contacts-section {
  padding-top: 0;
  padding-bottom: 60px;
}

.content-card {
  max-width: var(--content-width);
  background: var(--card-bg);
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.04);
  padding: 54px 64px;
}

.article h1 {
  margin: 0 0 28px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #161616;
}

.lead {
  font-size: 18px;
  line-height: 1.65;
  color: #333333;
}

.article h3,
.contacts-card h2 {
  margin: 30px 0 18px;
  font-weight: 700;
  line-height: 1.2;
  color: #1d1d1d;
}

.article h3 {
  font-size: 24px;
}

.contacts-card h2 {
  margin-top: 12px;
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: -0.03em;
}

p {
  margin: 0 0 18px;
}

hr {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: 28px 0;
}

ol,
ul {
  margin: 0 0 18px;
  padding-left: 24px;
}

li {
  margin-bottom: 14px;
}

strong {
  font-weight: 700;
}

.article-image {
  margin: 34px 0 0;
}

.article-image img {
  width: 100%;
  border: 1px solid var(--line);
}

.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--muted);
}

.breadcrumbs a {
  color: var(--text);
}

.contacts-text a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.scroll-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: #171717;
  color: #ffffff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.scroll-top:hover {
  background: #444444;
}

.scroll-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

@media (max-width: 1024px) {
  .header-inner {
    grid-template-columns: 160px 1fr;
    gap: 18px 24px;
  }

  .header-contact {
    grid-column: 1 / -1;
    justify-items: start;
    border-top: 1px solid var(--line);
    padding-top: 12px;
  }

  .top-nav {
    justify-content: flex-end;
    gap: 6px 18px;
  }

  .content-card {
    padding: 46px 48px;
  }
}

@media (max-width: 768px) {
  .container {
    width: min(100% - 28px, var(--max-width));
  }

  .site-header {
    position: static;
  }

  .header-inner {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 14px 0 16px;
  }

  .logo-link,
  .logo {
    width: 170px;
  }

  .top-nav {
    justify-content: flex-start;
    gap: 4px 16px;
    font-size: 14px;
  }

  .top-nav a {
    padding: 4px 0;
  }

  .article-section,
  .contacts-section {
    padding: 18px 0;
  }

  .contacts-section {
    padding-top: 0;
    padding-bottom: 34px;
  }

  .content-card {
    padding: 34px 24px;
  }

  .lead {
    font-size: 16px;
  }

  .article h3 {
    font-size: 22px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 15px;
  }

  .container {
    width: calc(100% - 20px);
  }

  .content-card {
    padding: 28px 18px;
    box-shadow: none;
  }

  .article h1 {
    font-size: 29px;
  }

  ol,
  ul {
    padding-left: 20px;
  }

  .scroll-top {
    right: 14px;
    bottom: 14px;
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
}
