:root {
  --bg: #eef7f2;
  --bg-soft: #dff1e8;
  --ink: #15211c;
  --ink-soft: #52635b;
  --accent: #136f4a;
  --accent-2: #ffb84d;
  --line: #c5ded1;
  --white: #ffffff;
  --radius: 20px;
  --maxw: 760px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: 'Nunito Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: 'Rubik', 'Nunito Sans', sans-serif;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* Шапка */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--accent) 0%, #18a06d 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-family: 'Rubik', 'Nunito Sans', sans-serif;
  font-weight: 700;
  font-size: 18px;
}

.logo-text {
  font-family: 'Rubik', 'Nunito Sans', sans-serif;
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.01em;
}

.menu-btn {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
}

.menu-btn:active { background: var(--bg-soft); }

/* Мобильное меню */
.nav {
  display: none;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 65px;
  z-index: 49;
}
.nav.open { display: block; }
.nav ul {
  max-width: var(--maxw);
  margin: 0 auto;
  list-style: none;
  padding: 6px 18px 14px;
}
.nav li { border-bottom: 1px solid var(--bg-soft); }
.nav li:last-child { border-bottom: none; }
.nav a {
  display: block;
  padding: 14px 2px;
  font-size: 15px;
  color: var(--ink);
}

/* Hero */
.hero {
  padding: 36px 18px 28px;
  max-width: var(--maxw);
  margin: 0 auto;
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--bg-soft);
  padding: 6px 12px;
  border-radius: 100px;
  margin-bottom: 18px;
  font-weight: 500;
}

.hero h1 {
  font-size: clamp(28px, 7vw, 36px);
  margin-bottom: 16px;
  color: var(--ink);
}

.hero h1 em {
  font-style: italic;
  color: var(--accent);
  font-weight: 500;
}

.hero-lead {
  font-size: 16px;
  color: var(--ink-soft);
  margin-bottom: 22px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: var(--white);
  padding: 14px 22px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}
.hero-cta:hover { text-decoration: none; background: var(--accent); }
.hero-cta svg { width: 14px; height: 14px; }

/* Иллюстрация */
.hero-art {
  margin-top: 30px;
  padding: 26px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}

.hero-art::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 10%, rgba(19, 111, 74, 0.12), transparent 52%), radial-gradient(circle at 10% 90%, rgba(255, 184, 77, 0.16), transparent 45%);
  pointer-events: none;
}

.device-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  position: relative;
}

.device-card {
  background: var(--bg);
  border-radius: 16px;
  padding: 16px 14px;
  text-align: center;
  border: 1px solid var(--line);
}

.device-card .icon {
  width: 38px;
  height: 38px;
  margin: 0 auto 10px;
  color: var(--accent);
}

.device-card .name {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}

.device-card .meta {
  font-size: 11px;
  color: var(--ink-soft);
  margin-top: 4px;
}

/* Разделы */
section { padding: 40px 18px; }
.section-inner { max-width: var(--maxw); margin: 0 auto; }

.section-title {
  font-size: clamp(24px, 6vw, 30px);
  margin-bottom: 8px;
}

.section-sub {
  color: var(--ink-soft);
  font-size: 15px;
  margin-bottom: 26px;
}

/* О сайте */
.about { background: var(--bg-soft); }

.about-grid {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.about-card {
  background: var(--white);
  padding: 22px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  display: block;
  color: inherit;
}

a.about-card { text-decoration: none; transition: transform 0.15s ease, border-color 0.15s ease; }
a.about-card:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-2px); }

.about-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--ink);
}

.about-card p {
  font-size: 14px;
  color: var(--ink-soft);
}

.about-card .num {
  display: inline-block;
  font-family: 'Rubik', 'Nunito Sans', sans-serif;
  font-size: 22px;
  color: var(--accent-2);
  margin-bottom: 8px;
  font-weight: 700;
}

a.about-card .arrow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
}

a.about-card .arrow svg { width: 12px; height: 12px; }

/* Темы */
.topics-list {
  display: grid;
  gap: 12px;
}

.topic-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.topic-item:hover {
  text-decoration: none;
  border-color: var(--accent);
  transform: translateY(-2px);
}

.topic-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 16px;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.topic-icon svg { width: 22px; height: 22px; }

.topic-content { flex: 1; }

.topic-content h3 {
  font-size: 16px;
  font-family: 'Nunito Sans', sans-serif;
  font-weight: 600;
  margin-bottom: 4px;
}

.topic-content p {
  font-size: 13px;
  color: var(--ink-soft);
}

.topic-chevron {
  flex-shrink: 0;
  color: var(--ink-soft);
  width: 16px;
  height: 16px;
}

/* FAQ */
.faq-list { display: grid; gap: 10px; }

details {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
}

summary {
  padding: 18px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 15px;
}

summary::-webkit-details-marker { display: none; }

summary::after {
  content: '+';
  font-size: 22px;
  color: var(--accent);
  transition: transform 0.2s ease;
  font-weight: 300;
}

details[open] summary::after { transform: rotate(45deg); }

details > div {
  padding: 0 18px 18px;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.7;
}

/* Контакты */
.contacts { background: var(--ink); color: var(--white); }
.contacts .section-title { color: var(--white); }
.contacts .section-sub { color: rgba(255,255,255,0.7); }

.contact-list {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.contact-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
}

.contact-row .ic {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--accent-2);
  margin-top: 2px;
}

.contact-row .label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 4px;
}

.contact-row .val {
  font-size: 15px;
  color: var(--white);
}

.contact-row a { color: var(--white); }

/* Подвал */
footer {
  padding: 30px 18px 36px;
  background: var(--ink);
  color: rgba(255,255,255,0.6);
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 13px;
}

.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-links a {
  color: rgba(255,255,255,0.7);
  font-size: 13px;
}

.legal { line-height: 1.7; }
.legal p { margin-bottom: 6px; }

/* Хлебные крошки и внутренние страницы */
.crumb {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 18px 0;
  font-size: 13px;
  color: var(--ink-soft);
}
.crumb a { color: var(--ink-soft); }

.article-page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 18px 50px;
}

.article-page .eyebrow { margin-bottom: 14px; }

.article-page h1 {
  font-family: 'Rubik', 'Nunito Sans', sans-serif;
  font-size: clamp(26px, 6.5vw, 34px);
  line-height: 1.25;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.article-meta {
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 26px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.article-body p {
  margin-bottom: 16px;
  color: #2d3748;
  font-size: 16px;
  line-height: 1.75;
}

.article-body h2 {
  font-family: 'Rubik', 'Nunito Sans', sans-serif;
  font-size: 22px;
  margin: 32px 0 12px;
  color: var(--ink);
}

.article-body h3 {
  font-family: 'Nunito Sans', sans-serif;
  font-size: 17px;
  font-weight: 600;
  margin: 22px 0 10px;
  color: var(--ink);
}

.article-body ul, .article-body ol {
  padding-left: 22px;
  margin-bottom: 18px;
}

.article-body li {
  margin-bottom: 8px;
  color: #2d3748;
  line-height: 1.7;
}

.article-body strong { color: var(--ink); font-weight: 600; }

.callout {
  background: var(--white);
  border-left: 3px solid var(--accent-2);
  border-radius: 8px;
  padding: 18px 20px;
  margin: 22px 0;
  font-size: 15px;
  color: var(--ink-soft);
}

.callout strong { color: var(--ink); }

.related {
  margin-top: 40px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.related-title {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 14px;
  font-weight: 500;
}

.related-list { display: grid; gap: 10px; }

.related-list a {
  display: block;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
}

.related-list a:hover { border-color: var(--accent); text-decoration: none; }

/* Desktop */
@media (min-width: 768px) {
  .hero { padding: 60px 24px 40px; }
  section { padding: 60px 24px; }
  .about-grid { grid-template-columns: repeat(3, 1fr); }
  .topics-list { grid-template-columns: repeat(2, 1fr); }
  .article-page { padding: 30px 24px 60px; }
  .crumb { padding: 24px 24px 0; }
}

/* Доступность */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
