/* ============================================================
   /cases/modul51 — «сайт как кейс».
   Дизайн-система клиента (CONTAINER HOUSE/web/app/globals.css: B2B
   functional theme — off-white, ink, плоские карточки без скруглений),
   перенесённая в ванильный CSS и изолированная под .m51.
   Анимации — только transform/opacity.
   ============================================================ */
.m51 {
  --m51-paper: #f7f7f8;
  --m51-paper-soft: #efeff1;
  --m51-white: #ffffff;
  --m51-ink: #0f1115;
  --m51-ink-soft: #5b6168;
  --m51-line: rgba(15, 17, 21, 0.1);
  --m51-line-strong: rgba(15, 17, 21, 0.22);
  --m51-accent: #2a2f36;
  --m51-fitting: #efc200;
  --m51-scene-bg: #f0ece4;
  --m51-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --m51-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  position: relative;
  background: var(--m51-paper);
  color: var(--m51-ink);
  font-family: var(--m51-font-inter), -apple-system, system-ui, sans-serif;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  color-scheme: light;
  overflow-x: clip;
}
.m51 *,
.m51 *::before,
.m51 *::after { box-sizing: border-box; }
.m51 a { color: inherit; text-decoration: none; }
.m51 h1, .m51 h2, .m51 h3, .m51 p, .m51 dl, .m51 dd, .m51 ol, .m51 ul { margin: 0; padding: 0; }
.m51 ol, .m51 ul { list-style: none; }
.m51 ::selection { background: var(--m51-ink); color: var(--m51-paper); }
.m51 [id] { scroll-margin-top: 84px; }
.m51 i { font-style: normal; }

.m51-container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 48px);
}
.m51-section { padding-block: clamp(56px, 8vw, 104px); }
.m51-band { border-block: 1px solid var(--m51-line); background: var(--m51-white); }
.m51-col { max-width: 790px; }

/* Типографика клиента */
.m51-eyebrow {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--m51-ink);
}
.m51-eyebrow::after {
  content: '';
  display: block;
  width: 32px;
  height: 2px;
  margin-top: 8px;
  background: var(--m51-ink);
}
.m51-eyebrow-sm { font-size: 11px; }
.m51-eyebrow-sm::after { width: 24px; margin-top: 6px; }
.m51-display {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--m51-ink);
}
.m51-h1 { font-size: clamp(1.875rem, 3.6vw, 3rem); max-width: 672px; }
.m51-h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); margin-top: 16px !important; }
.m51-h2-lg { font-size: clamp(1.875rem, 3.6vw, 3rem); }
.m51-head { max-width: 790px; }
.m51-sub { margin-top: 14px !important; max-width: 576px; font-size: 0.875rem; color: rgba(15, 17, 21, 0.72); }
.m51-cap {
  display: block;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--m51-ink-soft);
}

.m51-logo { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.025em; line-height: 1.2; white-space: nowrap; }
.m51-logo-city {
  margin-left: 8px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.5;
}

/* Кнопки клиента: плоские, без скруглений */
.m51-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.35;
  border: 1px solid var(--m51-ink);
  border-radius: 0;
  cursor: pointer;
  transition: background-color 0.15s linear, color 0.15s linear, border-color 0.15s linear;
}
.m51 .m51-btn-primary { background: var(--m51-ink); color: var(--m51-paper); }
.m51 a.m51-btn-primary:hover,
.m51 .m51-btn-primary.m51-is-hover { background: var(--m51-accent); border-color: var(--m51-accent); }
.m51 .m51-btn-ghost {
  padding: 11px 18px;
  background: transparent;
  border-color: var(--m51-line-strong);
  color: var(--m51-ink);
}
.m51 .m51-btn-ghost:hover,
.m51 .m51-btn-ghost.active { background: var(--m51-ink); border-color: var(--m51-ink); color: var(--m51-paper); }
.m51 .m51-btn-sm { padding: 6px 12px; }
.m51 .m51-btn-cta { height: 40px; padding: 0 14px; font-size: 10px; letter-spacing: 0.16em; white-space: nowrap; }
.m51 span.m51-btn { cursor: default; }
.m51-btn i, .m51-bb-tile-more i {
  margin-left: 4px;
  padding: 1px 5px;
  font-family: var(--m51-mono);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0;
  border: 1px solid currentColor;
  opacity: 0.7;
}

/* ---------- HERO: сцена во всё окно ---------- */
.m51-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(72px + 58px + 32px) 0 148px;
  background: var(--m51-scene-bg);
  overflow: hidden;
}
.m51-scene { position: absolute; inset: 72px 0 0; }
.m51-scene-frame { display: block; width: 100%; height: 100%; border: 0; opacity: 0; transition: opacity 0.6s; }
.m51-scene[data-ready='true'] .m51-scene-frame { opacity: 1; }
/* «затемнение» на светлом сайте — это осветление: вуаль под текст слева и стык с paper снизу */
.m51-scene-veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(247, 247, 248, 0.82) 0%, rgba(247, 247, 248, 0.5) 38%, rgba(247, 247, 248, 0) 60%),
    linear-gradient(180deg, rgba(247, 247, 248, 0) 78%, var(--m51-paper) 100%);
  box-shadow: inset 0 0 80px rgba(28, 31, 35, 0.08);
}

.m51-site-header {
  position: absolute;
  inset: 72px 0 auto;
  z-index: 3;
  border-bottom: 1px solid var(--m51-line);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}
.m51-site-header-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 8px; }
.m51-site-nav { display: flex; align-items: center; gap: 4px; }

/* колонка не перекрывает сцену: события ловят только ссылки */
.m51-hero-copy { position: relative; z-index: 2; pointer-events: none; }
.m51-hero-col { max-width: 700px; }
.m51-hero-col a { pointer-events: auto; }
.m51-hero-col :is(h1, p, .m51-eyebrow) {
  text-shadow: 0 0 2px rgba(247, 247, 248, 1), 0 0 6px rgba(247, 247, 248, 0.7);
}
.m51-back {
  display: inline-block;
  margin-bottom: 24px;
  font-size: 12px;
  font-weight: 500;
  opacity: 0.55;
  transition: opacity 0.15s linear;
}
.m51-back:hover { opacity: 1; }
.m51-hero-col .m51-h1 { margin-top: 16px; }
.m51-hero-lead { margin-top: 24px !important; max-width: 576px; font-size: clamp(1rem, 1.25vw, 1.125rem); color: rgba(15, 17, 21, 0.8); }
.m51-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }

/* подпись поверх сцены — как на сайте клиента, справа внизу */
.m51-scene-label {
  position: absolute;
  right: clamp(20px, 4vw, 48px);
  bottom: 148px;
  z-index: 2;
  max-width: 384px;
  text-align: right;
  pointer-events: none;
  animation: m51-rise 0.45s ease both;
}
.m51-scene-label-eyebrow {
  margin-bottom: 8px;
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--m51-ink-soft);
  opacity: 0.8;
}
.m51-scene-label-title { font-size: clamp(1.5rem, 2.4vw, 1.875rem); line-height: 1.2; }

/* режимы сцены */
.m51-modes-dock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 36px;
  z-index: 2;
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 48px);
  pointer-events: none;
}
.m51-modes-cap {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.m51-modes-hint { font-weight: 400; color: var(--m51-ink-soft); }
.m51-modes { display: flex; flex-wrap: wrap; gap: 4px; }
.m51-modes .m51-btn { pointer-events: auto; background: rgba(247, 247, 248, 0.72); white-space: nowrap; }

@keyframes m51-rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.m51-rise { animation: m51-rise 0.6s var(--m51-ease) both; }

/* ---------- Задача ---------- */
.m51-task-text { display: grid; gap: 16px; margin-top: 28px; max-width: 680px; color: rgba(15, 17, 21, 0.8); }

/* ---------- Брендбук ---------- */
.m51-bb {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
  margin-top: 36px;
}
.m51-swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--m51-line); border: 1px solid var(--m51-line); }
.m51-swatch {
  display: grid;
  gap: 3px;
  padding: 10px 10px 12px;
  text-align: left;
  font: inherit;
  color: var(--m51-ink);
  background: var(--m51-white);
  border: 0;
  border-radius: 0;
  cursor: pointer;
  transition: background-color 0.15s linear;
}
.m51-swatch:last-child { grid-column: span 2; }
.m51-swatch:hover { background: var(--m51-paper-soft); }
.m51-swatch[aria-selected='true'] { box-shadow: inset 0 0 0 2px var(--m51-ink); }
.m51-swatch-chip { display: block; height: 84px; margin-bottom: 6px; border: 1px solid var(--m51-line-strong); }
.m51-swatch-name { font-size: 0.82rem; font-weight: 600; line-height: 1.25; }
.m51-swatch-hex { font-size: 0.72rem; letter-spacing: 0.04em; color: var(--m51-ink-soft); font-variant-numeric: tabular-nums; }

.m51-swatch-roles { display: grid; margin-top: 24px; }
.m51-swatch-roles p {
  grid-area: 1 / 1;
  padding-left: 16px;
  border-left: 2px solid var(--m51-ink);
  font-size: 0.95rem;
  color: rgba(15, 17, 21, 0.8);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.3s, transform 0.3s var(--m51-ease), visibility 0s 0.3s;
}
.m51[data-hl='ink'] [data-role='ink'],
.m51[data-hl='paper'] [data-role='paper'],
.m51[data-hl='white'] [data-role='white'],
.m51[data-hl='soft'] [data-role='soft'],
.m51[data-hl='inksoft'] [data-role='inksoft'],
.m51[data-hl='accent'] [data-role='accent'],
.m51[data-hl='fitting'] [data-role='fitting'] {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}

.m51-bb-stage {
  padding: clamp(18px, 2.4vw, 28px);
  background: var(--m51-paper);
  border: 1px solid var(--m51-line-strong);
  outline: 2px dashed transparent;
  outline-offset: -7px;
  transition: outline-color 0.3s;
}
.m51-bb-stage [data-c] { transition: opacity 0.3s, outline-color 0.3s; }
.m51-bb-shot { margin-bottom: 18px; overflow: hidden; border: 1px solid var(--m51-line); background: var(--m51-scene-bg); }
.m51-bb-shot img { display: block; width: 100%; height: auto; outline: 2px dashed transparent; outline-offset: -6px; }
.m51-bb-title { margin-top: 12px !important; font-size: 1.75rem; }
.m51-panel {
  padding: 20px;
  background: var(--m51-white);
  border: 1px solid var(--m51-line-strong);
  outline: 2px dashed transparent;
  outline-offset: -5px;
}
.m51-bb-stage .m51-panel { margin-top: 16px; }
.m51-bb-tile {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 14px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  background: var(--m51-paper-soft);
  border: 1px solid var(--m51-line);
  outline: 2px dashed transparent;
  outline-offset: -4px;
}
.m51-bb-tile-more { font-size: 12px; font-weight: 500; color: var(--m51-ink-soft); }
.m51-bb-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.m51-bb-actions .m51-btn { padding: 11px 14px; }

/* подсветка: «листовые» цвета гаснут, у поверхностей — пунктирный контур */
.m51[data-hl='ink'] .m51-bb-stage :is([data-c='inksoft'], [data-c='accent'], [data-c='fitting']),
.m51[data-hl='inksoft'] .m51-bb-stage :is([data-c='ink'], [data-c='accent'], [data-c='fitting']),
.m51[data-hl='accent'] .m51-bb-stage :is([data-c='ink'], [data-c='inksoft'], [data-c='fitting']),
.m51[data-hl='fitting'] .m51-bb-stage :is([data-c='ink'], [data-c='inksoft'], [data-c='accent']),
.m51:is([data-hl='paper'], [data-hl='white'], [data-hl='soft']) .m51-bb-stage :is([data-c='ink'], [data-c='inksoft'], [data-c='accent'], [data-c='fitting']) {
  opacity: 0.2;
}
.m51[data-hl='paper'] .m51-bb-stage,
.m51[data-hl='white'] .m51-bb-stage .m51-panel,
.m51[data-hl='soft'] .m51-bb-stage .m51-bb-tile,
.m51[data-hl='fitting'] .m51-bb-stage .m51-bb-shot img { outline-color: var(--m51-ink); }

/* Типоразмер (FormatSwitcher) */
.m51-format { padding: 20px; background: var(--m51-white); border: 1px solid var(--m51-line-strong); }
.m51-format-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 20px; }
.m51-pill {
  padding: 8px 16px;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--m51-ink);
  background: transparent;
  border: 1px solid var(--m51-line-strong);
  border-radius: 0;
  transition: background-color 0.15s linear, color 0.15s linear, border-color 0.15s linear;
}
.m51 button.m51-pill { cursor: pointer; }
.m51-pill:not(.active) { color: var(--m51-ink-soft); }
.m51 button.m51-pill:not(.active):hover { color: var(--m51-ink); }
.m51-pill.active { background: var(--m51-ink); border-color: var(--m51-ink); color: var(--m51-paper); }
.m51-format-dl { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; }
.m51-format-dl dd { margin-top: 4px !important; font-size: 1.125rem; font-weight: 700; line-height: 1.35; font-variant-numeric: tabular-nums; }

/* Шрифты */
.m51-types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: clamp(40px, 6vw, 72px); }
.m51-type { padding-left: 16px; border-left: 2px solid var(--m51-line-strong); }
.m51-type-sample { display: flex; align-items: flex-end; min-height: 3.4em; font-size: clamp(1.4rem, 2.1vw, 1.75rem); }
.m51-specimen-ui { font-size: clamp(1rem, 1.4vw, 1.125rem); font-weight: 500; line-height: 1.5; font-variant-numeric: tabular-nums; }
.m51-type-name { margin-top: 16px; font-weight: 600; }
.m51-type-role { margin-top: 6px; font-size: 0.875rem; color: rgba(15, 17, 21, 0.7); }
.m51-dev-chip {
  display: inline-block;
  padding: 4px 9px 3px;
  font-family: var(--m51-font-unbounded), sans-serif;
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: -0.02em;
  line-height: 1;
  color: #ffe500;
  background: #0e0f11;
  border-radius: 4px;
}
.m51-type-sample .m51-dev-chip { font-size: 1.5rem; padding: 8px 14px 6px; }

/* ---------- Плитки (сетка «Пять направлений») ---------- */
.m51-grid {
  display: grid;
  gap: 1px;
  margin-top: 36px;
  background: var(--m51-line);
  border: 1px solid var(--m51-line);
}
.m51-grid-2 { grid-template-columns: repeat(2, 1fr); }
.m51-grid-3 { grid-template-columns: repeat(3, 1fr); }
.m51-grid-4 { grid-template-columns: repeat(4, 1fr); }
/* подложка, чтобы сквозь 1px-зазоры не просвечивали скрытые до reveal плитки */
.m51-tile {
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: var(--m51-white);
  transition: background-color 0.15s linear;
}
.m51 a.m51-tile:hover { background: var(--m51-paper-soft); }
.m51-tile-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.m51-tile-title { font-size: 1.125rem; font-weight: 600; line-height: 1.3; }
.m51-tile-meta { font-family: var(--m51-mono); font-size: 11px; white-space: nowrap; opacity: 0.5; }
.m51-tile-text { margin-bottom: 16px; font-size: 0.875rem; color: rgba(15, 17, 21, 0.7); }
.m51-tile-more { margin-top: auto; font-size: 12px; font-weight: 500; opacity: 0.6; transition: opacity 0.15s linear; }
.m51-tile:hover .m51-tile-more { opacity: 1; }
.m51-screen-shot { display: block; margin: -20px -20px 18px; overflow: hidden; border-bottom: 1px solid var(--m51-line); }
.m51-screen-shot img { display: block; width: 100%; height: auto; transition: transform 0.5s var(--m51-ease); }
.m51-screen:hover .m51-screen-shot img { transform: scale(1.03); }

/* ---------- Четыре шага ---------- */
.m51-steps-block { margin-top: clamp(56px, 8vw, 96px); }
.m51-steps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 48px; margin-top: 36px !important; max-width: 1000px; }
.m51-step { display: flex; align-items: baseline; gap: 24px; }
.m51-step-n { font-family: var(--m51-mono); font-weight: 700; opacity: 0.6; font-variant-numeric: tabular-nums; }
.m51-step-t { font-size: 1.125rem; font-weight: 600; }
.m51-step-d { margin-top: 4px !important; max-width: 448px; font-size: 0.875rem; color: rgba(15, 17, 21, 0.7); }

/* ---------- Карточка и заявка ---------- */
.m51-ui { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; margin-top: 36px; }
.m51-ui-note { margin-top: 16px !important; max-width: 520px; font-size: 0.875rem; color: rgba(15, 17, 21, 0.72); }
.m51-input {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 12px 14px;
  font: inherit;
  font-size: 1.125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--m51-ink);
  background: var(--m51-paper);
  border: 1px solid var(--m51-line-strong);
  border-radius: 0;
  outline: none;
  transition: border-color 0.15s linear;
}
.m51-input:focus { border-color: var(--m51-ink); }
.m51-phone-note { margin-top: 10px !important; min-height: 2.9em; font-size: 12px; color: var(--m51-ink-soft); }
.m51-phone-note[data-ok='true'] { color: var(--m51-ink); font-weight: 600; }

/* ---------- Шесть причин ---------- */
.m51-why { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px 32px; margin-top: 36px; }
.m51-why-item { padding-left: 16px; border-left: 2px solid var(--m51-line-strong); }
.m51-why-n { margin-bottom: 8px; font-family: var(--m51-mono); font-size: 10px; opacity: 0.5; }
.m51-why-t { margin-bottom: 6px; font-weight: 600; }
.m51-why-d { font-size: 0.875rem; color: rgba(15, 17, 21, 0.7); }
.m51-stack { margin-top: clamp(40px, 6vw, 64px); }
.m51-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px !important; }
.m51-chips li { padding: 4px 10px; font-size: 12px; border: 1px solid var(--m51-line-strong); opacity: 0.85; }

/* ---------- FAQ ---------- */
.m51-faq { margin-top: 36px; border-block: 1px solid var(--m51-line); }
.m51-faq details { padding-block: 20px; }
.m51-faq details + details { border-top: 1px solid var(--m51-line); }
.m51-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}
.m51-faq summary::-webkit-details-marker { display: none; }
.m51-faq-plus { font-size: 1.25rem; line-height: 1; opacity: 0.6; transition: transform 0.2s; }
.m51-faq details[open] .m51-faq-plus { transform: rotate(45deg); }
.m51-faq details p { margin-top: 12px; max-width: 576px; font-size: 0.875rem; color: rgba(15, 17, 21, 0.75); }

/* ---------- Метрики ---------- */
.m51-metrics { margin-top: 0; border-color: var(--m51-line-strong); }
.m51-metric { padding: 24px 20px; background: var(--m51-white); }
.m51-metric-num { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.m51-metric-label { margin-top: 8px; font-size: 0.875rem; color: var(--m51-ink-soft); }

/* ---------- Финал ---------- */
.m51-final-text { margin-top: 24px !important; max-width: 680px; color: rgba(15, 17, 21, 0.8); }
.m51-final-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.m51-made {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: clamp(48px, 7vw, 88px);
  padding-top: 24px;
  border-top: 1px solid var(--m51-line);
  font-size: 0.8rem;
  color: var(--m51-ink-soft);
}
.m51-made .m51-logo { color: var(--m51-ink); }
.m51-made .m51-dev-chip { margin-inline: 4px 8px; }

/* ---------- Появления (только с JS и без reduced-motion) ---------- */
.m51.js-sc [data-sc='reveal'] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--m51-ease), transform 0.6s var(--m51-ease), background-color 0.15s linear;
  transition-delay: calc(var(--i, 0) * 80ms), calc(var(--i, 0) * 80ms), 0s;
}
.m51.js-sc [data-sc='reveal'].in-view { opacity: 1; transform: none; }
.m51.js-sc [data-sc='steps'] .m51-step {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s, transform 0.5s var(--m51-ease);
  transition-delay: calc(var(--i, 0) * 130ms);
}
.m51.js-sc [data-sc='steps'].in-view .m51-step { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .m51-rise, .m51-scene-label { animation: none; }
  .m51-scene-frame { transition: none; }
}

/* ---------- Адаптив ---------- */
@media (max-width: 1023px) {
  .m51-site-nav { display: none; }
  .m51-bb { grid-template-columns: 1fr; }
  .m51-bb-stage { max-width: 520px; }
  .m51-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .m51-why { grid-template-columns: repeat(2, 1fr); }
}
/* < 900px сцена сама переезжает в верхнюю часть кадра (setViewOffset) — текст уходит под неё */
@media (max-width: 899px) {
  .m51-hero { justify-content: flex-start; padding: calc(42px + 42svh) 0 36px; background: var(--m51-paper); }
  .m51-scene { bottom: auto; height: calc(100svh - 72px); }
  .m51-hero-copy { order: 2; margin-top: 28px; }
  .m51-hero-col { pointer-events: auto; }
  .m51-scene-veil {
    background: linear-gradient(180deg, rgba(247, 247, 248, 0) 44%, var(--m51-paper) 58%);
  }
  .m51-scene-label { display: none; }
  .m51-hero-actions { margin-top: 28px; }
  .m51-modes-dock { position: relative; bottom: auto; order: 1; }
  .m51-modes {
    flex-wrap: nowrap;
    margin-inline: calc(-1 * clamp(20px, 5vw, 48px));
    padding-inline: clamp(20px, 5vw, 48px);
    overflow-x: auto;
    scrollbar-width: none;
    pointer-events: auto;
  }
  .m51-modes::-webkit-scrollbar { display: none; }
}
@media (max-width: 767px) {
  .m51-types { grid-template-columns: 1fr; gap: 28px; }
  .m51-type-sample { min-height: 0; }
  .m51-grid-2, .m51-grid-3 { grid-template-columns: 1fr; }
  .m51-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .m51-steps, .m51-ui { grid-template-columns: 1fr; }
  .m51-why { grid-template-columns: 1fr; gap: 28px; }
  .m51-swatch-chip { height: 44px; }
}
@media (max-width: 479px) {
  .m51-swatches { grid-template-columns: repeat(2, 1fr); }
  .m51-format-dl { grid-template-columns: 1fr; }
  .m51-logo { font-size: 1.25rem; }
  .m51-logo-city { display: none; }
}
