/* ============================================================
   ONRE — Allocation Checker
   Палитра / шрифты / радиусы — в :root.
   Эстетика: тёплый крем, белые линии-«чертежи», жёлтый акцент.
   ============================================================ */

:root {
  --bg: #F2EDE2;
  --ink: #161512;
  --ink-2: #3E3B33;
  --muted: #75705F;
  --line: rgba(255, 255, 255, 0.78);
  --panel: rgba(255, 255, 255, 0.22);
  --panel-soft: rgba(255, 255, 255, 0.13);
  --accent: #F1C232;
  --accent-deep: #A87F0B;
  --card: #FBF8F0;
  --card-line: rgba(22, 21, 18, 0.09);
  --r-lg: 26px;
  --r-md: 18px;
  --r-sm: 12px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;
  --shadow: 0 14px 40px rgba(35, 30, 15, 0.08);
  --touch: 44px;
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  padding-left: var(--safe-l);
  padding-right: var(--safe-r);
  padding-bottom: var(--safe-b);
}
img { max-width: 100%; display: block; }
.shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 max(20px, calc(16px + var(--safe-l)));
  padding-right: max(20px, calc(16px + var(--safe-r)));
}

/* ---------------- кнопки ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--touch);
  border-radius: 999px; border: 1px solid transparent;
  padding: 16px 28px;
  font: 500 15px/1 var(--font);
  cursor: pointer; white-space: nowrap;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn .arr { transition: transform .2s ease; font-family: var(--font); }
.btn:hover .arr { transform: translateX(4px); }
.btn--light {
  background: #fff; color: var(--ink);
  border-color: rgba(22, 21, 18, 0.05);
  box-shadow: 0 2px 12px rgba(35, 30, 15, 0.07);
}
.btn--light:hover { box-shadow: 0 6px 18px rgba(35, 30, 15, 0.1); }
.btn--accent {
  background: var(--accent); color: #181510;
  box-shadow: 0 8px 22px rgba(241, 194, 50, 0.35);
}
.btn--accent:hover { box-shadow: 0 10px 26px rgba(241, 194, 50, 0.45); }
.btn--ghost {
  background: transparent; color: var(--ink);
  border-color: rgba(22, 21, 18, 0.16);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.6); }
.btn--lg { padding: 19px 36px; font-size: 16px; }

/* ---------------- навигация ---------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(242, 237, 226, 0.78);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.55);
  transition: box-shadow .25s ease;
  padding-left: var(--safe-l);
  padding-right: var(--safe-r);
}
.nav.scrolled { box-shadow: 0 8px 24px rgba(35, 30, 15, 0.06); }
.nav__in {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  height: 100px;
}
.nav__left { justify-self: start; display: flex; align-items: center; }
.nav__links { display: flex; gap: 34px; }
.nav__links a {
  font-size: 15.5px; font-weight: 500; color: var(--ink-2); text-decoration: none;
  transition: color .2s ease;
}
.nav__links a:hover { color: var(--ink); }
.brand {
  justify-self: center;
  display: inline-flex; align-items: center;
  color: var(--ink);
  text-decoration: none;
  transition: opacity .2s ease;
}
.brand:hover { opacity: 0.7; }
.brand__logo { display: block; height: 22px; width: auto; color: inherit; }
.nav__right { justify-self: end; display: flex; align-items: center; gap: 24px; }
.aum { font-size: 15px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.aum b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }

/* бургер (мобильный) */
.burger {
  display: none;
  width: 44px; height: 44px;
  border: none; background: transparent; cursor: pointer;
  position: relative;
}
.burger span {
  position: absolute; left: 11px; right: 11px; height: 2px;
  background: var(--ink); border-radius: 2px;
  transition: transform .3s ease;
}
.burger span:nth-child(1) { top: 18px; }
.burger span:nth-child(2) { top: 26px; }
.burger.open span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.burger.open span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

/* мобильное меню */
.mnav {
  position: absolute; top: 100%; left: 0; right: 0;
  background: rgba(242, 237, 226, 0.98);
  border-bottom: 1px solid rgba(22, 21, 18, 0.08);
  box-shadow: 0 18px 30px rgba(35, 30, 15, 0.1);
  animation: mnav-in .25s ease;
}
.mnav[hidden] { display: none; }
@keyframes mnav-in { from { opacity: 0; transform: translateY(-8px); } }
.mnav a {
  display: block; padding: 19px 24px;
  font-size: 17px; font-weight: 600; color: var(--ink); text-decoration: none;
  border-top: 1px solid rgba(22, 21, 18, 0.06);
}
.mnav a:first-child { border-top: none; }
.mnav a:active { background: rgba(255, 255, 255, 0.5); }
.mnav__cta {
  display: none;
  padding: 18px max(20px, calc(16px + var(--safe-l))) calc(22px + var(--safe-b));
  border-top: 1px solid rgba(22, 21, 18, 0.08);
  background: rgba(255, 255, 255, 0.28);
}
.mnav__cta .btn { width: 100%; }
.mnav__cta .btn + .btn { margin-top: 10px; }

/* ---------------- герой + сетка-«чертёж» ---------------- */
.hero {
  position: relative; overflow: hidden;
  min-height: calc(100vh - 214px);
  min-height: calc(100svh - 214px);
  display: flex; align-items: center;
  padding: 72px 0 64px;
}
.hero__grid { position: absolute; inset: 0; pointer-events: none; }
.gl { position: absolute; background: var(--line); }
.gl--v { top: 0; bottom: 0; width: 1px; }
.gl--h { left: 0; right: 0; height: 1px; }
.gl--v1 { left: 16.5%; } .gl--v2 { left: 31.5%; }
.gl--v3 { left: 79.5%; } .gl--v4 { left: 88.5%; }
.gl--h1 { top: 17%; } .gl--h2 { top: 80%; } .gl--h3 { top: 92%; }
.gp { position: absolute; }
.gp--mid { left: 31.5%; right: 20.5%; top: 17%; bottom: 20%; background: var(--panel); }
.gp--rc { left: 88.5%; right: 0; top: 0; bottom: 80%; background: var(--panel-soft); }
.gacc { position: absolute; background: var(--accent); }
.gacc--tr { top: 17%; left: 88.5%; right: 0; height: 2px; }
.gacc--bl { top: 80%; left: 0; width: 16.5%; height: 2px; }

.hero__in {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.hero h1 {
  margin: 0;
  font-size: clamp(44px, 7.6vw, 104px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.04;
}
.hero__sub {
  margin: 26px 0 0;
  font-size: clamp(16px, 1.7vw, 20px);
  color: var(--ink-2);
}
.hero__in .btn { margin-top: 42px; }
.hero__in .reveal:nth-child(2) { transition-delay: .08s; }
.hero__in .reveal:nth-child(3) { transition-delay: .16s; }

/* ---------------- бегущая строка бэкеров ---------------- */
.marquee {
  border-top: 1px solid var(--line);
  padding: 28px 0 32px;
  overflow: hidden;
}
.marquee__label {
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}
.marquee__track {
  display: flex; width: max-content;
  animation: marquee 36s linear infinite;
  will-change: transform;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee__list {
  display: flex; align-items: center;
  gap: 72px; padding-right: 72px;
}
.logo {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(22, 21, 18, 0.34);
  white-space: nowrap;
}
.logo .mk { display: inline-block; font-size: 11px; line-height: 1; }
.logo .mk--dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.logo .mk--x { font-weight: 800; }

/* ---------------- reveal-анимации ---------------- */
.reveal {
  opacity: 0; transform: translateY(18px);
  transition: opacity .7s ease var(--d, 0s), transform .7s ease var(--d, 0s);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------------- stats ---------------- */
.stats { padding: 8px 0 40px; }
.stats__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.stat {
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: var(--r-md);
  padding: 20px 18px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.stat::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: var(--accent);
  opacity: 0.85;
}
.stat__val {
  margin: 0;
  font-size: clamp(22px, 4vw, 28px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.stat__label {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.stat__hint {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

/* ---------------- steps ---------------- */
.steps-sec { padding: 12px 0 48px; }
.steps-sec__head { margin-bottom: 22px; text-align: center; }
.eyebrow {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-deep);
}
.steps-sec__head h2 {
  margin: 0;
  font-size: clamp(24px, 5vw, 32px);
  font-weight: 500;
  letter-spacing: -0.03em;
}
.steps-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.step {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 14px;
  align-items: start;
  padding: 18px 16px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--card-line);
  border-radius: var(--r-md);
}
.step__n {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--accent);
  font: 700 13px/1 var(--mono);
  color: #181510;
}
.step h3 {
  margin: 2px 0 6px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.step p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-2);
}
.steps-sec__cta {
  margin-top: 28px;
  text-align: center;
}
.steps-sec__cta .btn { width: 100%; max-width: 360px; }

/* ---------------- trust ---------------- */
.trust { padding: 0 0 40px; }
.trust__in {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 16px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.62);
  border: 1px dashed rgba(22, 21, 18, 0.14);
}
.trust__ico {
  flex: 0 0 auto;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent);
  font-size: 14px;
  font-weight: 800;
  color: #181510;
}
.trust p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2);
}

/* ---------------- footer ---------------- */
.foot {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.35);
  padding: 32px 0 calc(28px + var(--safe-b));
}
.foot__in {
  display: grid;
  gap: 16px;
  text-align: center;
  justify-items: center;
}
.brand--foot { opacity: 0.9; }
.foot__note {
  margin: 0;
  max-width: 38ch;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}
.foot__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: center;
}
.foot__links a {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
}
.foot__links a:hover { color: var(--ink); }
.foot__copy {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .marquee__track { animation: none; }
}

/* ---------------- адаптив ---------------- */
@media (max-width: 860px) {
  .nav {
    background: rgba(242, 237, 226, 0.94);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .nav__in {
    height: 68px;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
  }
  .nav__left { min-width: 44px; }
  .nav__links { display: none; }
  .burger { display: block; }
  .brand {
    justify-self: center;
    max-width: 42vw;
  }
  .brand__logo { height: 18px; width: auto; max-width: 100%; }
  .nav__right { gap: 8px; }
  .mnav__cta { display: grid; }
  .hero {
    min-height: auto;
    padding: clamp(36px, 10vw, 56px) 0 clamp(28px, 8vw, 44px);
  }
  .hero::before {
    content: "";
    position: absolute;
    inset: 12% 8% 18%;
    background:
      linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 28%,
      linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 28% 100%;
    opacity: 0.45;
    pointer-events: none;
  }
  .hero::after {
    content: "";
    position: absolute;
    left: 8%; right: 8%; top: 12%; bottom: 18%;
    background: var(--panel);
    pointer-events: none;
  }
  .hero__grid { display: none; }
  .hero h1 {
    font-size: clamp(34px, 9.2vw, 56px);
    line-height: 1.06;
    max-width: 12ch;
  }
  .hero__sub {
    margin-top: 18px;
    font-size: clamp(15px, 4.1vw, 18px);
    line-height: 1.5;
    max-width: 28ch;
    padding: 0 4px;
  }
  .hero__in .btn {
    margin-top: 28px;
    width: 100%;
    max-width: 360px;
    padding: 18px 24px;
    font-size: 16px;
  }
  .marquee { padding: 20px 0 24px; }
  .marquee__list { gap: 36px; padding-right: 36px; }
  .marquee__track { animation-duration: 28s; }
  .logo { font-size: 11px; letter-spacing: 0.1em; }
  .stats__grid { grid-template-columns: 1fr; gap: 10px; }
  .stat { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 12px; padding: 16px 14px; }
  .stat__val { grid-column: 1; grid-row: 1; font-size: 24px; }
  .stat__label { grid-column: 1; grid-row: 2; margin-top: 4px; }
  .stat__hint { grid-column: 2; grid-row: 1 / span 2; text-align: right; align-self: center; max-width: 11ch; font-size: 11px; }
  .steps-sec { padding-bottom: 36px; }
  .foot { padding-top: 28px; }
}

@media (max-width: 720px) {
  .aum { display: none; }
}

@media (max-width: 640px) {
  .nav__right .btn { display: none; }
  .nav__in { height: 64px; }
  .brand__logo { height: 17px; }
}

@media (max-width: 520px) {
  .shell { padding-left: max(16px, var(--safe-l)); padding-right: max(16px, var(--safe-r)); }
  .hero h1 {
    font-size: clamp(30px, 8.8vw, 40px);
    letter-spacing: -0.028em;
    max-width: none;
  }
  .hero__sub { font-size: 15px; }
  .hero__in .btn--lg { padding: 17px 22px; }
  .mnav a { padding: 16px 20px; font-size: 16px; min-height: var(--touch); display: flex; align-items: center; }
  .marquee__list { gap: 28px; padding-right: 28px; }
}

@media (max-width: 380px) {
  .hero h1 { font-size: 1.75rem; }
  .btn--lg { font-size: 15px; }
}

@media (hover: none) {
  .btn:hover { transform: none; }
  .btn:hover .arr { transform: none; }
  .btn--light:hover,
  .btn--accent:hover { box-shadow: inherit; }
  .brand:hover { opacity: 1; }
  .nav__links a:hover { color: var(--ink-2); }
  .marquee:hover .marquee__track { animation-play-state: running; }
}

@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; transform: none; }
}

html.menu-open { overflow: hidden; }
html.menu-open body { touch-action: none; }

@media (min-width: 861px) {
  .stats__grid { gap: 18px; }
  .steps-sec__head { text-align: left; }
  .steps-sec__cta { text-align: left; }
  .steps-sec__cta .btn { width: auto; }
  .foot__in { text-align: left; justify-items: start; }
  .foot__links { justify-content: flex-start; }
}
