:root{
  /* Memorian.ru core */
  --bg:#111214;
  --panel:#17181b;
  --panel-soft: rgba(23,24,27,.92);
  --text:#e7e5e4;
  --muted:#a1a1aa;
  --gold:#d4af37;
  --line:#2a2b2f;

  --radius:16px;
  --radius-sm:12px;
  --shadow: 0 14px 40px rgba(0,0,0,.45);

  /* extra accents */
  --soft-white: rgba(255,255,255,.06);
  --soft-gold: rgba(212,175,55,.10);

  /* dynamic header height (set by JS) */
  --header-h: 64px;

  /* Динамическая позиция мокапа по центру экрана (JS задаёт --mock-top) */
  --mock-top: calc(var(--header-h) + 16px);
}

*{box-sizing:border-box}
html,body{
  margin:0;
  padding:0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  overflow-x: hidden;
}
a{color:var(--text);text-decoration:none}
.container{max-width:1100px;margin:0 auto;padding:0 16px}

/* ---------- базовые мемориан-компоненты ---------- */
.card{
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;

  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;

  background-clip: padding-box;
}
.card-pad{ padding: 18px; }

.p{ color: var(--muted); margin: 0; line-height: 1.55; }
.h1{ font-size: 44px; line-height: 1.15; margin: 0 0 14px; }
.h2{ font-size: 26px; line-height: 1.25; margin: 0 0 14px; }

/* ---------- кнопки как Memorian.ru ---------- */
.btn{
  background: var(--gold);
  color: #111;
  padding: 12px 16px;
  border-radius: 12px;
  border: 0;
  display: inline-block;
  font-weight: 600;
  transition: transform .12s ease, filter .12s ease, opacity .12s ease;
}
.btn:hover{ transform: translateY(-1px); filter: brightness(1.03); }
.btn:active{ transform: translateY(0); }

.btn.ghost{
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
}
.btn.small{ padding: 8px 12px; border-radius: 10px; font-size: 13px; }
.btn.tiny{ padding: 8px 10px; border-radius: 10px; font-size: 12px; }

/* ---------- поля ---------- */
.label{ display:block; margin: 10px 0 6px; color: var(--muted); font-size: 13px; }
.input, .select, textarea{
  width:100%;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 12px 14px;
  border-radius: 12px;
  min-height: 44px;
  font-size: 16px;
  outline: none;
}
textarea{ min-height: 96px; }

/* ---------- сетки ---------- */
.grid{ display:grid; gap:16px; }
.grid-2{ grid-template-columns: 1fr 1fr; }
.grid-3{ grid-template-columns: repeat(3, 1fr); }

@media (max-width:900px){
  .grid-3{ grid-template-columns: 1fr 1fr; }
}
@media (max-width:700px){
  .grid-2, .grid-3{ grid-template-columns: 1fr; }
}

/* ---------- ambient (НЕ режем) ---------- */
.page-ambient{
  position: relative;
  overflow: visible;
  isolation: isolate;
}
.page-ambient::before{
  content:"";
  position:absolute;
  inset:-120px -120px auto auto;
  width:520px;
  height:520px;
  background: radial-gradient(circle, rgba(212,175,55,.12), rgba(0,0,0,0) 62%);
  pointer-events:none;
  z-index:-1;
}
.page-ambient::after{
  content:"";
  position:absolute;
  inset:auto auto -160px -160px;
  width:560px;
  height:560px;
  background: radial-gradient(circle, rgba(255,255,255,.06), rgba(0,0,0,0) 62%);
  pointer-events:none;
  z-index:-1;
}

/* ---------- hero ---------- */
.hero{
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(212,175,55,.06), rgba(212,175,55,0) 46%),
    radial-gradient(1200px 420px at 25% 0, rgba(212,175,55,.10), rgba(0,0,0,0) 60%);
}
.hero-content{ padding-top: 92px; padding-bottom: 64px; position:relative; z-index:1; }
.hero p{ max-width: 640px; }

/* ---------- безопасная мобилка ---------- */
@media (max-width:900px){
  .hero-content{ padding-top: 64px; padding-bottom: 44px; }
  .h1{ font-size: 34px; }
}
@media (max-width:430px){
  .h1{ font-size: 30px; }
  .container{ padding: 0 14px; }
}

/* === headings === */
.section-kicker{
  color: var(--gold);
  font-size: 12px;
  letter-spacing: .35px;
  text-transform: uppercase;
  margin: 0 0 8px;
}
.section-title{
  font-size: 28px;
  line-height: 1.22;
  margin: 0 0 18px;
  color: var(--text);
  font-weight: 800;
  letter-spacing: .2px;
}

.card h3, .card-title{ color: var(--text); font-weight: 800; }

.card b,
.card strong{ color: var(--text); font-weight: 800; }
.card strong{ color: var(--gold); }

/* =========================================================
   Sections + dividers (НЕ режем)
   ========================================================= */
.slice{
  position: relative;
  padding: 64px 0;
}
@media (max-width:900px){
  .slice{ padding: 52px 0; }
}

.slice-divider{
  position: relative;
  height: 1px;
  overflow: visible;
}
.slice-divider::before{
  content:"";
  position:absolute;
  left:50%;
  transform:translateX(-50%);
  width:100vw;
  height:1px;
  background:
    linear-gradient(90deg,
      rgba(42,43,47,0),
      rgba(42,43,47,.85),
      rgba(212,175,55,.20),
      rgba(42,43,47,.85),
      rgba(42,43,47,0)
    );
  opacity:.9;
}

.slice-ambient{
  position: relative;
  overflow: visible;
  isolation: isolate;
}
.slice-ambient::before{
  content:"";
  position:absolute;
  inset:-140px auto auto -160px;
  width:560px;
  height:560px;
  background: radial-gradient(circle, rgba(255,255,255,.06), rgba(0,0,0,0) 64%);
  pointer-events:none;
  opacity:.95;
  z-index:-1;
}
.slice-ambient::after{
  content:"";
  position:absolute;
  inset:auto -180px -180px auto;
  width:640px;
  height:640px;
  background: radial-gradient(circle, rgba(212,175,55,.10), rgba(0,0,0,0) 62%);
  pointer-events:none;
  opacity:.9;
  z-index:-1;
}

/* =========================================================
   STEPS (новые секции)
   ========================================================= */
.steps-head{ max-width: 860px; }

.steps-list{
  margin-top: 18px;
  display: grid;
  gap: 18px;
}

.step{
  background: rgba(23,24,27,.68);
}

.step-inner{
  display:flex;
  gap:14px;
  padding: 18px;
  align-items:flex-start;
}

.step-num{
  width:36px;height:36px;
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(212,175,55,.30);
  background: rgba(212,175,55,.10);
  color: var(--gold);
  font-weight: 900;
  flex:0 0 auto;
}

.step-body{ min-width:0; }

.step-title{
  margin: 0 0 8px;
  font-weight: 900;
  color: var(--text);
  font-size: 18px;
}

.step-note{
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.08);
  color: rgba(231,229,228,.72);
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width:700px){
  .step-inner{ padding: 16px; }
  .step-title{ font-size: 17px; }
}

/* =========================================================
   Scroll reveal
   ========================================================= */
.reveal{
  opacity: 0;
  transform: translateY(14px);
  filter: blur(4px);
  transition: opacity .7s ease, transform .7s ease, filter .7s ease;
  will-change: opacity, transform, filter;
}
.reveal.is-visible{
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}
.reveal-delay-1{ transition-delay: .06s; }
.reveal-delay-2{ transition-delay: .12s; }
.reveal-delay-3{ transition-delay: .18s; }
.reveal-delay-4{ transition-delay: .24s; }

@media (prefers-reduced-motion: reduce){
  .reveal{ opacity: 1; transform:none; filter:none; transition:none; }
}

/* =========================================================
   Старые стили мокапа оставлены, но пока не используются
   (чтобы потом быстро вернуть)
   ========================================================= */

.visual-card{
  background: rgba(23,24,27,.72);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.mock-topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(0,0,0,.18);
}

.dots{ display:flex; gap:6px; align-items:center; }
.dot-ui{
  width:8px;height:8px;border-radius:50%;
  background: rgba(255,255,255,.22);
  border:1px solid rgba(255,255,255,.12);
}
.dot-ui.gold{
  background: var(--gold);
  border-color: rgba(212,175,55,.6);
  box-shadow: 0 0 0 4px rgba(212,175,55,.12);
}

.mock-title{ font-size: 12px; color: var(--muted); white-space: nowrap; }

.mock-chip{
  font-size: 12px;
  color: #e8e0c8;
  border:1px solid var(--line);
  background: rgba(212,175,55,.06);
  padding: 5px 10px;
  border-radius: 999px;
}

.mock-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0,0,0,.18);
}
.mock-left{ display:flex; align-items:center; gap:10px; min-width:0; }
.mock-ic{
  width:28px;height:28px;border-radius:10px;
  border:1px solid rgba(212,175,55,.28);
  background: rgba(212,175,55,.08);
  display:flex; align-items:center; justify-content:center;
  color: var(--gold);
  font-weight: 800;
  font-size: 12px;
  flex:0 0 auto;
}
.mock-k{ color: var(--muted); font-size: 12px; margin:0 0 2px; }
.mock-v{
  color: var(--text);
  font-weight: 750;
  font-size: 14px;
  margin:0;
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
}
.mock-right{ color: var(--muted); font-size: 12px; white-space: nowrap; }

.mock-gallery{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
}
.mock-photo{
  aspect-ratio: 4/3;
  border-radius: 14px;
  border:1px solid var(--line);
  background:
    radial-gradient(260px 180px at 40% 30%, rgba(255,255,255,.08), rgba(0,0,0,0) 70%),
    radial-gradient(260px 180px at 70% 60%, rgba(212,175,55,.12), rgba(0,0,0,0) 72%),
    #0b0c0f;
  position:relative;
  overflow:hidden;
}
.mock-photo::after{
  content:"";
  position:absolute;
  inset:-40%;
  background: linear-gradient(120deg, rgba(255,255,255,0), rgba(255,255,255,.08), rgba(255,255,255,0));
  transform: translateX(-60%);
  opacity: .25;
}
.mock-photo .tag{
  position:absolute;
  left:10px;
  top:10px;
  font-size:12px;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.45);
  color: #fff;
  z-index:2;
}
@media (prefers-reduced-motion: no-preference){
  .mock-photo:hover::after{
    transform: translateX(60%);
    transition: transform .7s ease;
  }
}

/* --- якоря не прячем под шапку --- */
#steps, #levels, #action{ scroll-margin-top: 110px; }

/* ============================
   STEPS ROWS (мокап справа у каждого шага)
   ============================ */

.steps-rows{ overflow: visible; isolation: isolate; }

.steps-list--rows{
  margin-top: 18px;
  display: grid;
  gap: 18px;
}

/* одна строка: слева шаг, справа мокап */
.step-row{
  display:grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 26px;
  align-items: start;
}

@media (max-width:900px){
  .step-row{ grid-template-columns: 1fr; }
}

/* мокап справа */
.step-mock{ min-width:0; }
.step-mock .visual-card{
  background: rgba(23,24,27,.72);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.step-mock-body{
  padding: 14px;
  display:grid;
  gap:10px;
  min-height: 220px;
}

@media (max-width:900px){
  .step-mock-body{ min-height: unset; }
}

/* подсветка шага при активе (оставляем твой стиль + чуть дороже) */
.step{ position: relative; }
.step.is-active{
  border-color: rgba(212,175,55,.40);
  background: rgba(23,24,27,.78);
  box-shadow:
    0 12px 36px rgba(0,0,0,.32),
    0 0 0 1px rgba(212,175,55,.10) inset;
}
.step.is-active .step-num{
  box-shadow: 0 0 0 6px rgba(212,175,55,.10);
  border-color: rgba(212,175,55,.55);
}
.step.is-active .step-title{ color: #f3ead2; }