/* HoReCa-Техно — система Mercury (палитра, типографика, сетка — marketing/horeca-techno/MERCURY-SYSTEM.md) */

:root {
  --canvas: #171721;
  --surface: #1e1e2a;
  --surface-2: #272735;
  --border: #70707d;
  --hairline: #e2e3ed;
  --ink: #ededf3;
  --ink-soft: #c3c3cc;
  --accent: #5266eb;
  --accent-ink: #ffffff;

  --shell: 1200px;
  --gap: 12px;
  --pad-card: 32px;
  --rhythm: 72px;

  --r-card: 12px;
  --r-pill: 32px;
  --r-nav: 40px;

  --display: "Onest", "Segoe UI", system-ui, sans-serif;
  --text: "Golos Text", "Segoe UI", system-ui, sans-serif;

  /* шкала из DESIGN.md — новых размеров не заводить */
  --fs-display: clamp(38px, 6.2vw, 65px);
  --fs-headline: clamp(28px, 3.4vw, 42px);

  /* Лестница светлоты: каждая секция светлее предыдущей, карточки и чипы
     внутри неё поднимаются вместе с фоном. Глубина по-прежнему только
     светлотой — теней нет. */
  --l1-canvas: #1c1c27; --l1-surface: #262632; --l1-surface-2: #2f2f3c;
  --l2-canvas: #21212d; --l2-surface: #2b2b38; --l2-surface-2: #343442;
  --l3-canvas: #262633; --l3-surface: #30303e; --l3-surface-2: #393948;
  --l4-canvas: #2b2b39; --l4-surface: #353544; --l4-surface-2: #3e3e4e;
  --l5-canvas: #30303f; --l5-surface: #3a3a4a; --l5-surface-2: #434354;
  --l6-canvas: #353545; --l6-surface: #3f3f50; --l6-surface-2: #48485a;

  /* переменные движка */
  --sc-canvas: var(--canvas);
  --sc-surface: var(--surface);
  --sc-ink: var(--ink);
  --sc-ink-soft: var(--ink-soft);
  --sc-accent: var(--accent);
  --sc-accent-ink: var(--accent-ink);
}

*, *::before, *::after { box-sizing: border-box; }

section[id], [id^="panel-"] { scroll-margin-top: 88px; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--display); font-weight: 500; margin: 0; }
p { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

.shell {
  width: min(100% - 48px, var(--shell));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: var(--accent-ink);
  padding: 12px 20px; border-radius: 0 0 var(--r-pill) 0;
}
.skip:focus { left: 0; }

:focus-visible { outline: 2px solid var(--hairline); outline-offset: 3px; }

/* ── кнопки ─────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px;
  border-radius: var(--r-pill); border: 1px solid transparent;
  font-family: var(--text); font-size: 16px; font-weight: 500;
  text-decoration: none; cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: #6076ef; }
.btn--primary:active { transform: translateY(1px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--hairline); border-radius: var(--r-nav); }
.btn--ghost:hover { background: rgba(237, 237, 243, .08); }
.btn--sm { min-height: 40px; padding: 0 20px; font-size: 14px; }
.btn--block { width: 100%; }

/* ── навигация ──────────────────────────────────────────── */

.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  padding: 14px 0;
  border-bottom: 1px solid transparent;
  transition: background-color .25s ease, backdrop-filter .25s ease, border-color .25s ease;
}
.nav.is-stuck {
  background: rgba(23, 23, 33, .82);
  backdrop-filter: blur(20px);
  border-bottom-color: rgba(112, 112, 125, .35);
}
.nav__inner {
  width: min(100% - 48px, var(--shell));
  margin-inline: auto;
  display: flex; align-items: center; gap: 24px;
}
.nav__brand {
  font-family: var(--display); font-weight: 600; font-size: 18px;
  letter-spacing: .01em; text-decoration: none;
}
.nav__brand span { color: var(--ink-soft); font-weight: 400; }
.nav__links { display: flex; gap: 4px; margin-left: auto; }
.nav__links a {
  padding: 8px 20px; border-radius: var(--r-nav);
  font-size: 16px; color: var(--ink); text-decoration: none;
  transition: background-color .18s ease;
}
.nav__links a:hover { background: rgba(237, 237, 243, .08); }
.nav__actions { display: flex; align-items: center; gap: 16px; }
.nav__phone { font-size: 16px; text-decoration: none; white-space: nowrap; }
.nav__call { display: none; }
.nav__links a.is-current { background: var(--surface-2); }

/* ── hero ───────────────────────────────────────────────── */

.hero__stage { background: #0f0f16; }
.hero__poster { object-fit: cover; }
.hero video { width: 100%; height: 100%; object-fit: cover; }

.hero__scrim {
  background:
    linear-gradient(to top, rgba(23, 23, 33, .88) 0%, rgba(23, 23, 33, .6) 36%, rgba(23, 23, 33, .22) 64%, rgba(23, 23, 33, .45) 100%);
}

.hero__copy {
  position: absolute; inset: auto 0 0 0; z-index: 3;
  width: min(100% - 48px, var(--shell));
  margin-inline: auto;
  padding-bottom: clamp(72px, 12vh, 128px);
}
.kicker {
  font-size: 12px; font-weight: 500; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-soft); margin-bottom: 20px;
}
.hero h1 {
  font-size: var(--fs-display);
  line-height: 1.1; letter-spacing: -.01em;
  max-width: 15ch;
}
.hero__sub {
  margin-top: 24px; max-width: 54ch;
  font-size: 18px; line-height: 1.45; color: var(--ink);
}
.hero__actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 16px; }
.hero__finale {
  position: absolute; inset: auto 0 0 0; z-index: 4;
  width: min(100% - 48px, 760px);
  margin-inline: auto;
  padding-bottom: clamp(80px, 14vh, 140px);
  text-align: center;
}
.hero__finale::before {
  content: ""; position: absolute; z-index: -1;
  inset: -64px -18vw -40px;
  background: radial-gradient(74% 86% at 50% 58%,
    rgba(23, 23, 33, .88) 0%, rgba(23, 23, 33, .66) 46%, rgba(23, 23, 33, 0) 78%);
}
.hero__finale-hook {
  font-family: var(--display);
  font-size: var(--fs-display);
  font-weight: 500; line-height: 1.12; letter-spacing: -.01em;
}
.hero__finale-sub {
  margin: 20px auto 32px; max-width: 52ch;
  font-size: 18px; line-height: 1.45; color: var(--ink);
}

.hero__scrollhint {
  position: absolute; right: 24px; bottom: 24px; z-index: 3;
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft);
}

/* ── липкие секции, наезжающие снизу ────────────────────── */

.stack {
  position: sticky; top: 0;
  min-height: 100svh;
  display: flex; align-items: center;
  background: var(--canvas);
  padding: var(--rhythm) 0;
}
.stack--paths {
  --canvas: var(--l1-canvas); --surface: var(--l1-surface); --surface-2: var(--l1-surface-2);
  border-radius: 32px 32px 0 0;
  border-top: 1px solid rgba(226, 227, 237, .16);
  text-align: center;
  z-index: 1;
}
.stack--branch {
  --canvas: var(--l2-canvas); --surface: var(--l2-surface); --surface-2: var(--l2-surface-2);
  z-index: 2;
  border-radius: 32px 32px 0 0;
}

.stack--paths .section-lead { margin-inline: auto; }
.stack--paths .section-title { font-size: var(--fs-display); }

.section {
  padding: calc(var(--rhythm) * 1.2) 0;
  background: var(--canvas);
  position: relative; z-index: 3;
  border-radius: 32px 32px 0 0;
  margin-top: -32px;
}
.section--stock {
  --canvas: var(--l3-canvas); --surface: var(--l3-surface); --surface-2: var(--l3-surface-2);
  z-index: 4;
}
.section--cases {
  --canvas: var(--l4-canvas); --surface: var(--l4-surface); --surface-2: var(--l4-surface-2);
  z-index: 5;
}
.section--terms {
  --canvas: var(--l5-canvas); --surface: var(--l5-surface); --surface-2: var(--l5-surface-2);
  z-index: 6;
}
.section--lead {
  --canvas: var(--l6-canvas); --surface: var(--l6-surface); --surface-2: var(--l6-surface-2);
  z-index: 7;
}

.section-title { font-size: clamp(28px, 3.4vw, 42px); line-height: 1.15; letter-spacing: -.005em; }
.section-lead { margin-top: 16px; max-width: 62ch; color: var(--ink-soft); font-size: 18px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap; }

/* ── развилка ───────────────────────────────────────────── */

.paths { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 56px; }
.path {
  cursor: pointer;
  background: var(--surface); color: var(--ink);
  border: 1px solid rgba(226, 227, 237, .22); border-radius: var(--r-card);
  padding: 40px var(--pad-card);
  font-family: var(--text);
  display: grid; gap: 12px; min-height: clamp(200px, 30svh, 280px); align-content: center;
  text-align: center;
  transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
}
.path:hover { border-color: rgba(226, 227, 237, .5); }
.path[aria-selected="true"] { border-color: transparent; }
.path__title { font-family: var(--display); font-size: var(--fs-headline); font-weight: 500; line-height: 1.12; }
.path__sub { color: var(--ink-soft); font-size: 16px; }
.path[aria-selected="true"] { background: var(--accent); }
.path[aria-selected="true"] .path__sub { color: #ffffff; }
.path[aria-selected="true"] .path__title { color: var(--accent-ink); }

.facts { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 56px; margin: 56px 0 0; padding: 0; }
.facts li { display: grid; gap: 4px; }
.facts b { font-family: var(--display); font-size: 21px; font-weight: 500; }
.facts span { color: var(--ink-soft); font-size: 14px; }

/* ── карточки ───────────────────────────────────────────── */

.card { background: var(--surface); border-radius: var(--r-card); padding: var(--pad-card); }

.zones { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 40px; }
.zone { display: grid; align-content: start; gap: 16px; }
.zone h3 { font-size: 21px; }
.zone ul { margin: 0; padding-left: 18px; display: grid; gap: 8px; color: var(--ink-soft); font-size: 16px; }
.zone__brands { color: var(--ink-soft); font-size: 13px; letter-spacing: .01em; opacity: .8; }

.note {
  margin-top: 32px; display: flex; align-items: center; justify-content: space-between;
  gap: 32px; flex-wrap: wrap;
  padding: 24px var(--pad-card);
  background: var(--surface-2); border-radius: var(--r-card);
}
.note p { max-width: 62ch; color: var(--ink-soft); }
.note b { color: var(--ink); font-weight: 500; }

.tags {
  list-style: none; display: flex; flex-wrap: wrap; align-items: baseline;
  gap: 10px; margin: 32px 0 0; padding: 0;
  font-size: 13px; color: var(--ink-soft);
}
.tags li.tags__lead {
  background: none; padding: 6px 0; margin-right: 6px;
  color: var(--ink-soft); opacity: .75;
}
.tags li {
  background: var(--surface-2); border-radius: var(--r-nav);
  padding: 6px 16px; font-weight: 400;
}

.grid { display: grid; gap: 20px; margin-top: 40px; }
.grid--stock { grid-template-columns: repeat(3, 1fr); }
.grid--cases { grid-template-columns: repeat(3, 1fr); }
.grid--terms { grid-template-columns: repeat(4, 1fr); }

.item { padding: 20px; display: grid; gap: 10px; align-content: start; }
.item img {
  border-radius: 8px; aspect-ratio: 3 / 2; object-fit: cover;
  filter: saturate(.72) contrast(1.04) brightness(.92);
}
.item h3 { font-size: 18px; margin-top: 6px; }
.item__meta { color: var(--ink-soft); font-size: 14px; }
.item__price { font-family: var(--display); font-size: 21px; font-weight: 500; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.item__stamp {
  font-family: var(--text); font-size: 12px; font-weight: 400; letter-spacing: .01em;
  color: var(--ink-soft); background: var(--surface-2);
  border-radius: var(--r-nav); padding: 3px 12px;
}
.item__lead { color: var(--ink-soft); font-size: 13px; }

/* ── таблица цен ────────────────────────────────────────── */

.proof { margin-top: 56px; border-top: 1px solid rgba(112, 112, 125, .3); padding-top: 40px; }
.proof__title { font-size: 28px; }
.proof__lead { margin-top: 12px; color: var(--ink-soft); max-width: 62ch; }
.proof__table { width: 100%; border-collapse: collapse; margin-top: 24px; font-size: 16px; }
.proof__table th {
  text-align: left; font-family: var(--text); font-weight: 400; font-size: 12px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft);
  padding: 0 0 12px; border-bottom: 1px solid rgba(112, 112, 125, .5);
}
.proof__table td { padding: 20px 0; border-bottom: 1px solid rgba(112, 112, 125, .25); vertical-align: top; }
.proof__table td.num { font-family: var(--display); font-weight: 500; white-space: nowrap; }
.proof__table td.num span { display: block; font-family: var(--text); font-weight: 400; font-size: 13px; color: var(--ink-soft); white-space: normal; }
.proof__table td:last-child { color: var(--ink-soft); text-align: right; }

/* ── кейсы ──────────────────────────────────────────────── */

.case { margin: 0; }
.case img {
  border-radius: var(--r-card); aspect-ratio: 3 / 2; object-fit: cover;
  filter: saturate(.8) contrast(1.03) brightness(.94);
}
.case figcaption { display: grid; gap: 4px; padding-top: 16px; }
.case b { font-weight: 500; font-size: 16px; }
.case span { color: var(--ink-soft); font-size: 14px; }

/* ── условия ────────────────────────────────────────────── */

.term { display: grid; gap: 12px; align-content: start; }
.term h3 { font-size: 18px; }
.term p { color: var(--ink-soft); font-size: 16px; }
.term__flag {
  justify-self: start; font-size: 12px; letter-spacing: .01em;
  color: var(--ink-soft); background: var(--surface-2);
  border-radius: var(--r-nav); padding: 5px 14px;
}
.microcopy { margin-top: 32px; color: var(--ink-soft); font-size: 14px; max-width: 72ch; }

/* ── заявка ─────────────────────────────────────────────── */


.lead { display: grid; grid-template-columns: 1fr minmax(360px, 480px); gap: 56px; align-items: start; }
.lead__contacts { list-style: none; margin: 40px 0 0; padding: 0; display: grid; gap: 16px; }
.lead__contacts li { display: grid; gap: 2px; }
.lead__contacts span { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.lead__contacts a { font-family: var(--display); font-size: 21px; text-decoration: none; }
.lead__contacts a:hover { text-decoration: underline; }

.lead__form {
  /* Секция — самая светлая ступень, а карточка заявки наоборот уходит вглубь:
     так кобальтовая кнопка снова держит границу (3.38:1 против 2.19:1),
     а форма читается как фокус страницы. */
  --surface-2: var(--l2-surface);
  background: var(--l2-canvas);
  display: grid; gap: 20px;
}
.field { display: grid; gap: 8px; }
.field label { font-size: 14px; color: var(--ink-soft); }
.field input, .field textarea {
  background: var(--surface-2); color: var(--ink);
  border: 1px solid rgba(226, 227, 237, .25);
  border-radius: var(--r-pill);
  padding: 16px 24px;
  font-family: var(--text); font-size: 16px;
}
.field textarea { border-radius: 20px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-soft); opacity: .7; }
.field input:focus-visible, .field textarea:focus-visible { border-color: var(--hairline); outline: none; }

.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 13px; color: var(--ink-soft); }
.consent input { margin-top: 3px; accent-color: var(--accent); width: 18px; height: 18px; }
.form-status { font-size: 14px; color: var(--ink-soft); min-height: 20px; }
.form-status.is-error {
  color: var(--ink);
  background: var(--surface-2);
  border-radius: 8px;
  padding: 12px 16px;
}

/* ── футер ──────────────────────────────────────────────── */

.footer {
  position: relative; z-index: 8;
  background: var(--canvas);
  border-radius: 32px 32px 0 0;
  margin-top: -32px;
  padding: calc(56px + 32px) 0 40px;
}
.footer__inner { display: grid; grid-template-columns: 1fr auto; gap: 32px 56px; }
.footer__brand { font-family: var(--display); font-weight: 600; font-size: 18px; }
.footer__line { margin-top: 8px; color: var(--ink-soft); font-size: 14px; max-width: 48ch; }
.footer__col { display: grid; gap: 8px; align-content: start; justify-items: start; font-size: 16px; }
.footer__col a { text-decoration: none; }
.footer__col a:hover { text-decoration: underline; }
.footer__legal { grid-column: 1 / -1; color: var(--ink-soft); font-size: 12px; letter-spacing: .01em; max-width: 86ch; }

/* ── адаптив ────────────────────────────────────────────── */

@media (max-width: 1080px) {
  .zones { grid-template-columns: repeat(2, 1fr); }
  .grid--terms { grid-template-columns: repeat(2, 1fr); }
  .grid--stock, .grid--cases { grid-template-columns: repeat(2, 1fr); }
  .lead { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 720px) {
  :root { --rhythm: 56px; --pad-card: 24px; }
  .shell, .nav__inner { width: min(100% - 32px, var(--shell)); }
  .nav__inner { gap: 10px; }
  .nav__brand { font-size: 16px; }
  .nav__links { display: none; }
  .nav__phone { display: none; }
  .nav__call { display: inline-flex; }
  .nav__actions { margin-left: auto; gap: 8px; }
  .btn--sm { padding: 0 16px; }

  /* Ролик снят широким: при cover на 390px от кухни остаётся кусок стены.
     Показываем кадр целиком полосой сверху, текст уходит на тёмный холст. */
  .hero__stage :is(video[data-sc-scrub], .sc-stage__poster) {
    object-fit: contain;
    object-position: 50% 22%;
  }
  .hero__stage::after {
    content: ""; position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(to bottom, rgba(23, 23, 33, .35) 0 6%, rgba(23, 23, 33, 0) 16%);
    pointer-events: none;
  }
  .hero__scrim {
    background: linear-gradient(to top,
      rgba(23, 23, 33, .97) 0%, rgba(23, 23, 33, .95) 46%, rgba(23, 23, 33, .12) 62%, rgba(23, 23, 33, .35) 100%);
  }
  .hero__copy { padding-bottom: 88px; }
  .hero h1 { max-width: 18ch; }
  .hero__sub { font-size: 16px; }
  .hero__finale { padding-bottom: 104px; }
  .hero__finale::before { inset: -48px -10vw -40px; }
  .hero__finale-sub { font-size: 16px; margin-bottom: 24px; }
  .hero__scrollhint { display: none; }
  .stack { min-height: auto; position: static; padding: var(--rhythm) 0; }
  .paths { grid-template-columns: 1fr; }
  .zones, .grid--stock, .grid--cases, .grid--terms { grid-template-columns: 1fr; }
  .facts { gap: 24px; }
  .section-head { align-items: flex-start; }
  .proof__table thead { display: none; }
  .proof__table td { display: block; border: none; padding: 4px 0; }
  .proof__table tr { display: block; padding: 20px 0; border-bottom: 1px solid rgba(112, 112, 125, .25); }
  .proof__table td:last-child { text-align: left; }
  .footer__inner { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .path, .nav { transition: none; }
}
