:root {
  color-scheme: light;
  --paper: #f8f9f7;
  --white: #ffffff;
  --concrete: #eceeed;
  --ink: #202528;
  --muted: #656b6e;
  --line: #d5d9d8;
  --accent: #f4bd36;
  --accent-hover: #e9ad20;
  --dark: #191f22;
  --on-dark: #f5f6f4;
  --muted-on-dark: #c3c9cb;
  --max: 1440px;
  --gutter: clamp(24px, 3.34vw, 48px);
  --section-space: clamp(80px, 7.8vw, 112px);
  --font: 'Onest', system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 112px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font);
  font-size: clamp(16px, 1rem, 18px); /* адаптивный базовый размер */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

button {
  font: inherit;
  border: none;
  cursor: pointer;
}

::selection {
  color: var(--ink);
  background: var(--accent);
}

[id] {
  scroll-margin-top: 24px;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 249, 247, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 80px; /* более компактный и современный */
}

.brand {
  display: flex;
  align-items: center;
}

.brand img {
  height: auto;
  width: auto;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 1.65vw, 24px);
}

.nav-link {
  padding: 12px 8px;
  font-size: clamp(14px, 0.875rem, 15px);
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--accent);
}

/* Кнопка меню (мобильное) */
.menu-toggle {
  display: none; /* скрыто на десктопе */
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}

.menu-icon {
  display: inline-block;
  width: 20px;
  height: 2px;
  background-color: currentColor;
  position: relative;
}

.menu-icon::before,
.menu-icon::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: currentColor;
}

.menu-icon::before {
  top: -8px;
}

.menu-icon::after {
  bottom: -8px;
}

/* CTA кнопка */
.btn.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border: 1px solid var(--ink);
  border-color: var(--accent);
  background: var(--accent);
  color: var(--ink);
  font-size: clamp(14px, 0.875rem, 15px);
  font-weight: 600;
  line-height: 1.5;
  border-radius: 6px;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn.cta:hover,
.btn.cta:focus-visible {
  background: var(--accent-hover);
  transform: translateY(-1px);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Адаптив */
@media (max-width: 1140px) {
  .nav-wrapper {
    flex-wrap: wrap;
  }

  .nav-links {
    order: 4;
    width: 100%;
    margin: 0;
    padding: 16px var(--gutter) 24px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    display: none; /* скрыто по умолчанию */
    background: var(--paper);
    border-top: 1px solid var(--line);
  }

  .has-js .nav-links[aria-expanded="true"] {
    display: flex; /* показываем через JS */
  }

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .btn.cta {
    margin-left: 0;
    order: 3;
    width: 100%;
    justify-content: center;
  }
}
/* До 600px: логотип 72×65 */
@media (max-width: 600px) {
  .brand img {
    width: 72px;
    height: 65px;
  }
}

/* От 600px и выше: логотип 108×76 */
@media (min-width: 601px) {
  .brand img {
    width: 108px;
    height: 97px;
  }
}