/* ==========================================================================
   Shokha Ads · дизайн-система «Block» · фундамент
   Содержание:
   1. Токены   2. Сброс и база   3. Типографика   4. Темы секций
   5. Каркас (container, section, section-head)
   6. Компоненты (sticker, sign, pill, btn, card, num, grid, списки, формы)
   7. Шапка, язык, мобильное меню   8. Первый экран
   9. Нижняя мобильная панель   10. Футер   11. Служебное и адаптив
   Правила: без градиентов, blur и теней; цвета только через токены.
   ========================================================================== */

/* 1. ТОКЕНЫ ---------------------------------------------------------------- */
:root {
  --cobalt: #1D3BFF;
  --lime:   #D4FF3A;
  --black:  #0B0B0B;
  --white:  #FFFFFF;
  --light:  #F1F1EC;
  --soft:   #C9D1FF;
  --muted:  #3A3A3A;

  --line-on-cobalt: rgba(255, 255, 255, 0.24);
  --line-on-light:  rgba(11, 11, 11, 0.14);
  --ring:           rgba(255, 255, 255, 0.18);
  --overlay:        rgba(11, 11, 11, 0.72);

  --font-head: 'Rubik', system-ui, sans-serif;
  --font-body: 'Golos Text', system-ui, sans-serif;

  --radius-card: 32px;
  --radius-card-sm: 24px;
  --radius-pill: 100px;
  --radius-sticker: 0.2em;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  --container: 1200px;
  --gutter: 20px;
  --section-pad: clamp(64px, 9vw, 120px);
  --header-h: 72px;
  --tap: 48px;

  --focus: var(--black);
}

/* 2. СБРОС И БАЗА ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--light);
  color: var(--black);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

html.menu-open, html.menu-open body { overflow: hidden; }

h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
strong, b { font-weight: 600; }

section[id] { scroll-margin-top: var(--header-h); }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

/* 3. ТИПОГРАФИКА ----------------------------------------------------------- */
h1, h2 {
  font-family: var(--font-head);
  font-weight: 900;
  line-height: 0.98;
  text-transform: uppercase;
  text-wrap: balance;
  overflow-wrap: break-word;
}

h1 { font-size: clamp(38px, 6vw, 88px); }
h2 { font-size: clamp(30px, 4.4vw, 60px); }

.num-hero {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(40px, 5.6vw, 80px);
  line-height: 1;
}

h3, h4 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.15;
  text-wrap: balance;
}

.text { font-size: clamp(16px, 1.5vw, 18px); line-height: 1.5; }
.text-2, .lead { color: var(--fg-2, var(--muted)); }
.lead { font-size: clamp(17px, 1.7vw, 20px); line-height: 1.5; font-weight: 500; }

.caption {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--fg-2, var(--muted));
}

/* 4. ТЕМЫ СЕКЦИЙ ----------------------------------------------------------- */
.theme-cobalt {
  --bg: var(--cobalt); --fg: var(--white); --fg-2: var(--white);
  --btn-bg: var(--lime); --btn-fg: var(--black); --focus: var(--lime);
  --line: var(--line-on-cobalt);
  --mark-bg: var(--lime); --mark-fg: var(--black);
  --sign-bg: var(--lime); --sign-fg: var(--cobalt);
}
.theme-light {
  --bg: var(--light); --fg: var(--black); --fg-2: var(--muted);
  --btn-bg: var(--cobalt); --btn-fg: var(--white); --focus: var(--black);
  --line: var(--line-on-light);
  --mark-bg: var(--cobalt); --mark-fg: var(--white);
  --sign-bg: var(--cobalt); --sign-fg: var(--white);
}
.theme-lime {
  --bg: var(--lime); --fg: var(--black); --fg-2: var(--black);
  --btn-bg: var(--black); --btn-fg: var(--white); --focus: var(--black);
  --line: var(--line-on-light);
  --mark-bg: var(--black); --mark-fg: var(--white);
  --sign-bg: var(--cobalt); --sign-fg: var(--white);
}
.theme-black {
  --bg: var(--black); --fg: var(--white); --fg-2: var(--soft);
  --btn-bg: var(--lime); --btn-fg: var(--black); --focus: var(--lime);
  --line: var(--line-on-cobalt);
  --mark-bg: var(--lime); --mark-fg: var(--black);
  --sign-bg: var(--lime); --sign-fg: var(--black);
}

.theme-cobalt, .theme-light, .theme-lime, .theme-black {
  background: var(--bg);
  color: var(--fg);
}

/* 5. КАРКАС ---------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-pad); }

.section-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
  max-width: 820px;
  margin-bottom: clamp(32px, 5vw, 56px);
}
.section-head .lead { max-width: 640px; }

.has-rings { position: relative; overflow: hidden; overflow: clip; isolation: isolate; }
.has-rings > .container { position: relative; z-index: 1; }

/* 6. КОМПОНЕНТЫ ------------------------------------------------------------ */

/* Стикер-акцент: одно слово в заголовке на лаймовой плашке */
.sticker {
  display: inline-block;
  background: var(--lime);
  color: var(--black);
  border-radius: var(--radius-sticker);
  padding: 0.04em 0.22em;
  transform: rotate(-2deg);
}
.theme-lime .sticker { background: var(--black); color: var(--white); }

/* Знак: круг с буквой S */
.sign {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: var(--sign-size, 40px);
  height: var(--sign-size, 40px);
  border-radius: 50%;
  background: var(--sign-bg, var(--cobalt));
  color: var(--sign-fg, var(--white));
  font-family: var(--font-head);
  font-weight: 900;
  font-size: calc(var(--sign-size, 40px) * 0.55);
  line-height: 1;
  transform: rotate(-10deg);
}

/* Пилюля-рубрика */
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 36px;
  padding: 6px 16px;
  border: 2px solid currentColor;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--fg, var(--black));
}
.pill--lime  { background: var(--lime);  border-color: var(--lime);  color: var(--black); }
.pill--black { background: var(--black); border-color: var(--black); color: var(--white); }

/* Кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 52px;
  padding: 0 28px;
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--btn-bg, var(--cobalt));
  color: var(--btn-fg, var(--white));
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 16px;
  line-height: 1.1;
  text-align: center;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-primary { background: var(--btn-bg, var(--cobalt)); color: var(--btn-fg, var(--white)); }
.btn-ghost {
  background: transparent;
  color: var(--fg, var(--black));
  border-color: currentColor;
}
.btn-sm { min-height: var(--tap); padding: 0 20px; font-size: 15px; }
.btn-block { display: flex; width: 100%; }

/* Карточки: на кобальте белые, на светлом белые с рамкой */
.card {
  --fg: var(--black); --fg-2: var(--muted);
  --btn-bg: var(--cobalt); --btn-fg: var(--white); --focus: var(--black);
  --line: var(--line-on-light);
  --mark-bg: var(--cobalt); --mark-fg: var(--white);
  background: var(--white);
  color: var(--fg);
  border-radius: var(--radius-card);
  padding: clamp(24px, 3vw, 36px);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-width: 0;
}
.theme-light .card, .theme-lime .card { border: 2px solid var(--line-on-light); }

.card--lime {
  --fg: var(--black); --fg-2: var(--black);
  --btn-bg: var(--black); --btn-fg: var(--white);
  --mark-bg: var(--black); --mark-fg: var(--white);
  background: var(--lime);
  border-color: var(--lime);
}

/* Номер в круге */
.num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--mark-bg, var(--cobalt));
  color: var(--mark-fg, var(--white));
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 24px;
  line-height: 1;
}

/* Сетки */
.grid-2, .grid-3 { display: grid; gap: clamp(16px, 2.2vw, 24px); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 992px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Списки */
.check-list, .strike-list { display: flex; flex-direction: column; gap: var(--space-3); }
.check-list li, .strike-list li {
  position: relative;
  padding-left: 38px;
  font-size: 16px;
  line-height: 1.45;
}
.check-list li::before, .strike-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.05em;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--mark-bg, var(--cobalt));
}
.check-list li::after {
  content: "";
  position: absolute;
  left: 7px;
  top: calc(0.05em + 7px);
  width: 10px;
  height: 6px;
  border-left: 3px solid var(--mark-fg, var(--white));
  border-bottom: 3px solid var(--mark-fg, var(--white));
  transform: rotate(-45deg);
}
.strike-list li { color: var(--fg-2); text-decoration: line-through; text-decoration-thickness: 2px; }
.strike-list li::before { background: transparent; border: 2px solid currentColor; }
.strike-list li::after {
  content: "";
  position: absolute;
  left: 6px;
  top: calc(0.05em + 11px);
  width: 12px;
  border-top: 2px solid currentColor;
  transform: rotate(-45deg);
}

/* Формы */
.field { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.field-label { font-size: 14px; font-weight: 600; line-height: 1.3; color: var(--fg); }

.input {
  width: 100%;
  min-height: 56px;
  padding: 0 24px;
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--white);
  color: var(--black);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
}
.theme-light .input, .theme-lime .input, .card .input { border-color: var(--line-on-light); }
.input::placeholder { color: var(--muted); opacity: 1; }
textarea.input { min-height: 120px; padding: 16px 24px; border-radius: var(--radius-card-sm); resize: vertical; }
select.input { padding-right: 16px; }
.input:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.input[aria-invalid="true"] { border-color: var(--focus); border-width: 3px; }

.field-error {
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: 12px;
  background: var(--black);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}
.field-error:empty { display: none; }

/* Группа выбора: кнопки aria-pressed или radio + label.choice */
.choice-group { display: flex; flex-wrap: wrap; gap: 10px; }
.choice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0 20px;
  border: 2px solid var(--line);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.choice:hover { border-color: currentColor; }
.choice[aria-pressed="true"], .choice.is-active, input:checked + .choice {
  background: var(--mark-bg);
  color: var(--mark-fg);
  border-color: var(--mark-bg);
}
input:focus-visible + .choice { outline: 3px solid var(--focus); outline-offset: 3px; }

/* Декоративные кольца: два контура, уходят за край */
.rings { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.rings::before, .rings::after {
  content: "";
  position: absolute;
  border: 3px solid var(--ring);
  border-radius: 50%;
}
.rings::before { width: 720px; height: 720px; right: -260px; top: -180px; }
.rings::after  { width: 1080px; height: 1080px; right: -440px; top: -360px; }

/* 7. ШАПКА ----------------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: var(--gutter);
  top: 0;
  z-index: 200;
  padding: 12px 20px;
  border-radius: 0 0 16px 16px;
  background: var(--lime);
  color: var(--black);
  font-weight: 600;
  transform: translateY(-120%);
}
.skip-link:focus-visible { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: var(--tap);
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.nav-menu { display: none; align-items: center; gap: var(--space-1); }
.nav-item {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 14px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 600;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.nav-item:hover { background: var(--lime); color: var(--black); }

.header-controls { display: flex; align-items: center; gap: var(--space-2); }
.header-cta { display: none; }

.lang-switch { display: inline-flex; align-items: center; }
.lang-btn {
  min-width: 44px;
  min-height: var(--tap);
  padding: 0 8px;
  border-radius: var(--radius-pill);
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 14px;
  color: var(--fg-2);
}
.lang-btn:hover { color: var(--fg); }
.lang-btn[aria-pressed="true"] { color: var(--fg); text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; }
.lang-btn[aria-pressed="true"] { text-decoration-color: var(--lime); }

.burger-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: var(--tap);
  height: var(--tap);
  border: 2px solid var(--line);
  border-radius: 50%;
}
.burger-line { display: block; width: 20px; height: 3px; border-radius: 3px; background: currentColor; }

/* Мобильное меню */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  flex-direction: column;
  padding: 0 var(--gutter) var(--space-5);
  overflow-y: auto;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
}
.menu-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tap);
  height: var(--tap);
  border: 2px solid var(--line);
  border-radius: 50%;
}
.mobile-menu-list { display: flex; flex-direction: column; margin-top: var(--space-5); }
.mobile-menu-link {
  display: flex;
  align-items: center;
  min-height: 64px;
  border-bottom: 2px solid var(--line);
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(26px, 8vw, 40px);
  text-transform: uppercase;
  line-height: 1;
}
.mobile-menu-link:hover { color: var(--lime); }
.mobile-menu .btn { margin-top: var(--space-6); }

/* 8. ПЕРВЫЙ ЭКРАН ---------------------------------------------------------- */
.hero { padding-block: clamp(24px, 3.5vw, 48px) var(--section-pad); }

.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(40px, 6vw, 64px); align-items: center; }
.hero-main { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; min-width: 0; }
.hero-title { max-width: 14em; }
.hero-desc { max-width: 38em; color: var(--fg-2); font-size: clamp(16px, 1.6vw, 19px); line-height: 1.5; font-weight: 500; }
.hero-btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.hero-trust { font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--fg-2); }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5) var(--space-4);
  width: 100%;
  padding-top: var(--space-5);
  border-top: 2px solid var(--line);
}
.stat { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
.stat-value {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: clamp(28px, 7vw, 40px);
  line-height: 1;
  white-space: nowrap;
}
.stat-label { font-size: 13px; font-weight: 600; line-height: 1.3; color: var(--fg-2); }

@media (min-width: 600px) { .hero-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 992px) {
  .hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
  .hero-title { font-size: clamp(44px, 4.2vw, 60px); }
  .stat-value { font-size: clamp(24px, 2.2vw, 32px); }
}

/* 9. НИЖНЯЯ МОБИЛЬНАЯ ПАНЕЛЬ ----------------------------------------------- */
.sticky-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  display: none;
  gap: 10px;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  visibility: hidden;
  transition: transform 0.25s ease, visibility 0.25s;
}
.sticky-bar .btn { flex: 1; min-height: var(--tap); padding: 0 12px; font-size: 15px; }
.sticky-bar.visible { transform: translateY(0); visibility: visible; }
@media (max-width: 767px) { .sticky-bar { display: flex; } }

/* 10. ФУТЕР (каркас, содержимое доделывает последний исполнитель) ---------- */
.site-footer { padding-block: var(--space-7); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-5); }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--space-5); font-weight: 600; }
.footer-links a { display: inline-flex; align-items: center; min-height: var(--tap); }
.footer-links a:hover { color: var(--lime); }
.footer-brand { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); }
@media (max-width: 767px) { .site-footer { padding-bottom: calc(var(--space-7) + 72px + env(safe-area-inset-bottom, 0px)); } }

/* 11. СЛУЖЕБНОЕ И АДАПТИВ -------------------------------------------------- */
.nowrap { white-space: nowrap; }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 768px) {
  :root { --gutter: 40px; }
}

@media (min-width: 1100px) {
  .nav-menu { display: flex; }
  .header-cta { display: inline-flex; }
  .burger-btn { display: none; }
  .mobile-menu { display: none !important; }
  .header-controls { gap: var(--space-4); }
}
@media (min-width: 768px) and (max-width: 1099px) {
  .header-cta { display: inline-flex; }
}

@media (max-width: 480px) {
  :root { --header-h: 64px; }
  .card { border-radius: var(--radius-card-sm); }
  .brand { font-size: 16px; gap: 8px; }
  .brand { --sign-size: 34px; }
  .btn { padding: 0 22px; }
  .hero-btn-row .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .btn:hover { transform: none; }
}
