/* ============================================================
   glaspro — направление C «Округлый гуманист»
   ДНК 16-okruglyy-gumanist · cold/light · editorial-rail
   Палитра и токены залочены манифестом (manifest.md §8)
   ============================================================ */

/* ---------- Шрифты (self-hosted, кириллица) ---------- */
/* Rubik — display, округло-геометрический гротеск, родная кириллица (OFL) */
@font-face {
  font-family: 'Rubik'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('fonts/rubik-cyrillic-500.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Rubik'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('fonts/rubik-latin-500.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2116, U+2122, U+2212;
}
@font-face {
  font-family: 'Rubik'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('fonts/rubik-cyrillic-600.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Rubik'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('fonts/rubik-latin-600.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2116, U+2122, U+2212;
}
@font-face {
  font-family: 'Rubik'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('fonts/rubik-cyrillic-700.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Rubik'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('fonts/rubik-latin-700.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2116, U+2122, U+2212;
}
/* Nunito Sans — body, округлый гуманист-гротеск (OFL, variable 400..700) */
@font-face {
  font-family: 'Nunito Sans'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('fonts/nunitosans-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Nunito Sans'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('fonts/nunitosans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2116, U+2122, U+2212;
}
@font-face {
  font-family: 'Nunito Sans'; font-style: italic; font-weight: 400 700; font-display: swap;
  src: url('fonts/nunitosans-cyrillic-italic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Nunito Sans'; font-style: italic; font-weight: 400 700; font-display: swap;
  src: url('fonts/nunitosans-latin-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2116, U+2122, U+2212;
}

/* ---------- Токены ---------- */
:root {
  --bg: #F2F5F3;
  --surface: #E7EDE9;
  --card: #FFFFFF;
  --ink: #1A211D;
  --muted: #47544D;
  --sage: #276045;        /* акцент: CTA, ссылки, галочки — WCAG 7.38 c белым, 6.72 как текст на фоне */
  --sage-deep: #1E4E38;   /* hover CTA */
  --sage-tint: #E3EDE7;   /* пилюли-теги */
  --amber: #FFB41D;       /* только декор-маркеры, никогда не текст */

  --font-display: 'Rubik', 'Trebuchet MS', sans-serif;
  --font-body: 'Nunito Sans', 'Segoe UI', sans-serif;

  /* шкала ×1.25, body 18px */
  --fs-14: 0.875rem; --fs-16: 1rem; --fs-18: 1.125rem; --fs-22: 1.375rem;
  --fs-28: 1.75rem;  --fs-35: 2.1875rem; --fs-44: 2.75rem; --fs-55: 3.4375rem;

  --radius: 16px;
  --shadow: 0 1px 2px rgba(20, 33, 26, 0.05), 0 16px 40px rgba(20, 33, 26, 0.08);
  --shadow-soft: 0 1px 2px rgba(20, 33, 26, 0.04), 0 8px 24px rgba(20, 33, 26, 0.06);
  --ease: cubic-bezier(0.25, 0.6, 0.35, 1);
  --container: 1440px;
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-18);
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sage); }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; margin: 0; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

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

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.section { position: relative; padding-block: 64px; }
.section--surface { background: var(--surface); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: var(--fs-16);
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
  padding: 12px 24px;
  transition: transform 160ms var(--ease), background-color 160ms var(--ease), color 160ms var(--ease);
}
.btn--primary { background: var(--sage); color: #FFFFFF; }
.btn--primary:hover { background: var(--sage-deep); transform: translateY(-2px); }
.btn--primary:active { transform: scale(0.98); }
.btn--ghost { background: transparent; color: var(--sage); }
.btn--ghost:hover { background: var(--sage-tint); transform: translateY(-2px); }
.btn--lg { font-size: var(--fs-18); padding: 16px 32px; }
.btn--sm { padding: 8px 20px; }

/* ---------- Шапка ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(242, 245, 243, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}
.header__logo { display: inline-flex; flex-shrink: 0; }
.header__logo img { height: 30px; width: auto; }

.nav { display: none; }
.nav__list { display: flex; gap: 8px; }
.nav__link {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: var(--fs-16);
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  transition: background-color 160ms var(--ease), color 160ms var(--ease);
}
.nav__link:hover { background: var(--sage-tint); color: var(--sage-deep); }

.header__actions { display: flex; align-items: center; gap: 8px; }
.header__demo { display: none; }

/* Бургер: две линии морфятся в крестик */
.burger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 48px;
  height: 48px;
  padding: 12px;
  border: 0;
  border-radius: 999px;
  background: var(--sage-tint);
  cursor: pointer;
}
.burger__line {
  display: block;
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 240ms var(--ease);
}
.burger[aria-expanded="true"] .burger__line:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.burger[aria-expanded="true"] .burger__line:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

/* Мобильная панель меню */
.mobile-menu {
  position: fixed;
  inset: 72px 0 0 0;
  z-index: 39;
  background: var(--bg);
  padding: 32px 24px 48px;
  overflow-y: auto;
}
.mobile-menu__list { display: flex; flex-direction: column; }
.mobile-menu__link {
  display: block;
  padding: 16px 8px;
  font-family: var(--font-display);
  font-size: var(--fs-28);
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border-radius: 8px;
}
.mobile-menu__link:hover { color: var(--sage); }
.mobile-menu__cta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 32px;
}
body.menu-open { overflow: hidden; }

/* ---------- Вертикальный рейл (только ≥920px) ---------- */
.rail { display: none; }

/* ---------- Hero ---------- */
.hero { padding-block: 48px 64px; }
.hero__grid { display: grid; gap: 40px; }
/* защита от grid-blowout: интринсик-ширина мокапов не должна распирать колонку */
.hero__grid > *, .steps > * { min-width: 0; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: var(--fs-14);
  font-weight: 700;
  color: var(--muted);
  box-shadow: var(--shadow-soft);
}
.badge__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--amber);
}

.hero__title {
  font-size: var(--fs-35);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: 24px;
  max-width: 15ch;
}
.hero__sub {
  margin-top: 16px;
  max-width: 52ch;
  color: var(--muted);
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}
.hero__stores {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 40px;
}
.hero__stores img { height: 40px; width: auto; }
.hero__stores a { display: inline-flex; border-radius: 8px; }
.hero__vks {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  font-size: var(--fs-16);
  color: var(--muted);
}
.hero__vks img { height: 32px; width: auto; flex-shrink: 0; }

.hero__media { align-self: center; }
.hero__figure {
  position: relative;
  margin: 0;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}
.hero__figure > img { border-radius: 8px; }

/* Сигнатурный чип записи с пульсирующей амбер-точкой */
.rec-chip {
  position: absolute;
  top: 40px;
  right: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: var(--fs-14);
  font-weight: 700;
  color: var(--ink);
  box-shadow: var(--shadow-soft);
  font-variant-numeric: tabular-nums;
}
.rec-chip__dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--amber);
  animation: rec-pulse 1.8s var(--ease) infinite;
}
@keyframes rec-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.55; }
}

/* ---------- Как это работает ---------- */
.how { padding-block: 64px; }
.kicker {
  font-size: var(--fs-14);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage);
}
.how__title {
  font-size: var(--fs-28);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: 16px;
  max-width: 22ch;
}
.steps {
  counter-reset: step;
  display: grid;
  gap: 24px;
  margin-top: 48px;
}
.step {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease);
}
.step:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.step__media {
  background: var(--surface);
  overflow: hidden;
}
.step__media img { width: 100%; height: auto; }
.step__body { padding: 24px; }
.step__num {
  font-family: var(--font-display);
  font-size: var(--fs-16);
  font-weight: 600;
  color: var(--sage);
  font-variant-numeric: tabular-nums;
}
.step__title {
  font-size: var(--fs-22);
  font-weight: 600;
  margin-top: 8px;
}
.step__text {
  margin-top: 8px;
  font-size: var(--fs-16);
  color: var(--muted);
  max-width: 44ch;
}

/* Документальное доказательство: реальный скрин приложения */
.proof {
  margin-top: 48px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  display: grid;
}
.proof__media {
  position: relative;
  background: var(--surface);
  min-height: 360px;
  overflow: hidden;
}
.proof__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%; /* кадр на экран телефона, без маркетинговой шапки исходника */
}
.proof__body {
  padding: 32px 24px;
  align-self: center;
}
.proof__title {
  font-size: var(--fs-22);
  font-weight: 600;
}
.proof__text {
  margin-top: 8px;
  font-size: var(--fs-16);
  color: var(--muted);
  max-width: 44ch;
}
.proof__caption {
  margin-top: 16px;
  font-size: var(--fs-14);
  color: var(--muted);
}

/* ---------- Подвал ---------- */
.footer { padding-block: 40px; }
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 32px;
}
.footer__inner img { height: 24px; width: auto; }
.footer__mail { font-weight: 700; text-decoration: none; }
.footer__mail:hover { text-decoration: underline; }
.footer__note {
  font-size: var(--fs-14);
  color: var(--muted);
  margin-left: auto;
}

/* ---------- Reveal: единая система появления (момент №1) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 240ms var(--ease), transform 240ms var(--ease);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }
/* стаггер на входе внутри сетки шагов (≤80мс по ДНК) */
.steps.in-view .step { opacity: 1; transform: translateY(0); }
.steps .step {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 240ms var(--ease), transform 240ms var(--ease),
              box-shadow 160ms var(--ease);
}
.steps.in-view .step:nth-child(2) { transition-delay: 70ms; }
.steps.in-view .step:nth-child(3) { transition-delay: 140ms; }
.steps.in-view .step:nth-child(4) { transition-delay: 210ms; }
.steps.in-view .step:hover { transform: translateY(-2px); transition-delay: 0ms; }

/* ---------- Доступность: отключение движения ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .steps .step { opacity: 1; transform: none; transition: none; }
  .rec-chip__dot { animation: none; }
  .btn, .step, .burger__line, .nav__link { transition: none; }
}

/* ============================================================
   Адаптив (mobile-first)
   ============================================================ */

/* ≥640px: шаги в 2 колонки */
@media (min-width: 640px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .hero__title { font-size: var(--fs-44); }
}

/* ≥920px: рейл, hero в 2 колонки, плотность по краям */
@media (min-width: 920px) {
  .container { padding-inline: 48px; }
  .section { padding-block: 96px; }
  .hero { padding-block: 64px 96px; }

  .rail {
    display: block;
    position: absolute;
    top: 96px;
    left: 16px;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-family: var(--font-display);
    font-size: var(--fs-14);
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
  }

  .hero__grid {
    grid-template-columns: 6fr 6fr;
    gap: 48px;
    align-items: center;
  }
  .hero__title { font-size: var(--fs-44); }
  .how__title { font-size: var(--fs-35); }

  .proof { grid-template-columns: 4fr 8fr; margin-top: 64px; }
  .proof__media { min-height: 400px; }
  .proof__body { padding: 40px 48px; }
}

/* ≥1024px: полная навигация, бургер прячется */
@media (min-width: 1024px) {
  .nav { display: block; }
  .burger { display: none; }
  .mobile-menu { display: none; }
  .header__demo { display: inline-flex; }
  .header__inner { min-height: 80px; }
}

/* ≥1280px: полный масштаб типографики */
@media (min-width: 1280px) {
  .hero__title { font-size: var(--fs-55); }
  .hero__grid { grid-template-columns: 7fr 6fr; gap: 64px; }
  .steps { gap: 32px; }
}
