/* Стартовая: четыре шага сверху вниз, сборки, инструкции */

.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: start;
  padding: 32px 0 20px;
}
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; animation: rise .7s .2s both; }
.hero-cta .btn { height: 46px; padding: 0 20px; font-size: 15px; }

/* маршрут в шапке: четыре плитки-ссылки на шаги */
.route { display: grid; gap: 10px; counter-reset: r; }
.route a {
  --c: var(--k-skill);
  position: relative; display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 14px; align-items: center;
  padding: 12px 16px 12px 12px; border-radius: 16px; border: 1px solid var(--line);
  background: var(--panel); backdrop-filter: blur(14px); text-decoration: none;
  transition: transform .2s, border-color .2s, box-shadow .2s;
  animation: rise .6s both; animation-delay: calc(var(--i) * 70ms + 150ms);
}
.route a:hover { transform: translateX(4px); border-color: color-mix(in oklab, var(--c) 55%, transparent); box-shadow: 0 16px 40px -22px var(--c); }
.route .num {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px;
  font: 800 18px var(--display); color: #0b0b12; background: var(--c);
  box-shadow: 0 0 22px -4px var(--c);
}
.route .t { font-weight: 600; font-size: 15px; line-height: 1.3; }
.route .m { display: block; margin-top: 2px; font: 500 12px var(--mono); color: var(--muted); }
.route .arr { color: var(--c); font-size: 18px; }
/* линия, связывающая шаги */
.route a:not(:last-child)::after {
  content: ""; position: absolute; left: 34px; top: 100%; width: 2px; height: 10px;
  background: linear-gradient(var(--c), transparent);
}

/* ---------- шаги ---------- */
main { max-width: 1320px; margin: 0 auto; padding: 0 32px; }
.step { --c: var(--k-skill); position: relative; margin-top: 72px; scroll-margin-top: 24px; }
.step-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 22px; align-items: end; margin-bottom: 22px; }
.step-no {
  grid-row: span 2; font: 800 clamp(64px, 8vw, 112px)/.8 var(--display); letter-spacing: -.04em;
  color: transparent; -webkit-text-stroke: 2px var(--c);
  background: linear-gradient(180deg, color-mix(in oklab, var(--c) 45%, transparent), transparent 75%);
  -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 0 22px color-mix(in oklab, var(--c) 40%, transparent));
}
.step-kicker { font: 600 12px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--c); }
.step-head h2 { margin: 0; font: 700 clamp(22px, 2.6vw, 34px)/1.15 var(--display); letter-spacing: -.01em; }
.step-sub { margin: -8px 0 20px; color: var(--muted); font-size: 15px; max-width: 72ch; }
.skip {
  display: inline-flex; align-items: center; gap: 8px; margin: 16px 0 0; padding: 8px 14px; border-radius: 99px;
  border: 1px dashed var(--line-2); color: var(--muted); font-size: 14px; text-decoration: none;
}
.skip:hover { color: var(--text); border-color: var(--k-skill); }

/* ---------- сборка ---------- */
.bundle {
  --c: var(--k-skill);
  position: relative; display: flex; flex-direction: column; gap: 14px;
  padding: 24px; border-radius: 22px; border: 1px solid var(--line);
  background: var(--panel-solid); overflow: hidden;
  animation: rise .5s both; animation-delay: calc(var(--i) * 60ms);
}
.bundle::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--c), color-mix(in oklab, var(--c) 30%, transparent));
  box-shadow: 0 0 20px var(--c);
}
.bundle::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(70% 50% at 0% 0%, color-mix(in oklab, var(--c) 13%, transparent), transparent 65%);
}
.bundle > * { position: relative; z-index: 1; }
.b-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.bundle h3 { margin: 0; font: 700 22px/1.2 var(--display); letter-spacing: -.01em; }
.b-why { margin: 0; font-size: 15.5px; }
.b-who { margin: 0; font-size: 14px; color: var(--muted); }
.b-who b { color: color-mix(in oklab, var(--text) 80%, var(--c)); font-weight: 600; }
.bundle .note { font-size: 13.5px; }

.b-price { flex: none; text-align: right; }
.b-price .v { font: 800 28px/1 var(--display); color: var(--z); white-space: nowrap; }
.b-price .u { display: block; margin-top: 5px; font: 500 11px var(--mono); color: var(--muted); white-space: nowrap; }
.b-price .req { margin-top: 8px; font: 600 13px var(--mono); color: var(--k-mcp); white-space: nowrap; }
.b-price .req small { font-weight: 500; color: var(--muted); }

.mix-l { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.mix { display: flex; height: 10px; border-radius: 99px; overflow: hidden; background: var(--line); }
.mix i { height: 100%; background: var(--c); border-right: 2px solid var(--panel-solid); transition: filter .15s; }
.mix i:last-child { border-right: 0; }
.mix i:hover { filter: brightness(1.3); }

.items { display: flex; flex-wrap: wrap; gap: 8px; }
.item {
  --c: var(--k-skill);
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 10px; border-radius: 10px;
  border: 1px solid color-mix(in oklab, var(--c) 30%, var(--line)); text-decoration: none; font-size: 13.5px; font-weight: 500;
  background: color-mix(in oklab, var(--c) 7%, transparent);
  transition: border-color .15s, background .15s, transform .15s;
}
.item::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); flex: none; }
.item[data-kind="pack"]::before { border-radius: 2px; }
.item[data-kind="plugin"]::before { border-radius: 2px; transform: rotate(45deg); }
.item[data-kind="mcp"]::before { background: transparent; border: 2px solid var(--c); width: 9px; height: 9px; box-sizing: border-box; }
.item small { font: 500 11px var(--mono); color: var(--muted); }
.item:hover { border-color: var(--c); background: color-mix(in oklab, var(--c) 15%, transparent); transform: translateY(-1px); }

.term { border-radius: 14px; border: 1px solid var(--line); background: var(--bg-2); overflow: hidden; }
.term-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border-bottom: 1px solid var(--line); }
.term-bar span { font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.term-bar .btn { height: 32px; font-size: 13px; padding: 0 12px; }
.term pre { margin: 0; padding: 12px 14px; font: 400 13px/1.65 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.term pre b { color: var(--k-mcp); font-weight: 500; user-select: none; }

/* базовая сборка - во всю ширину, справа цена и состав */
.bundle.base { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px 32px; padding: 28px; }
.bundle.base .b-main { display: flex; flex-direction: column; gap: 14px; }
.bundle.base .b-side { display: flex; flex-direction: column; gap: 16px; }
.bundle.base h3 { font-size: clamp(24px, 2.6vw, 32px); }
.bundle.base .b-price { text-align: left; padding: 18px; border-radius: 16px; border: 1px solid var(--line); background: color-mix(in oklab, var(--z) 6%, transparent); }
.bundle.base .b-price .v { font-size: 44px; }
.bundle.base .term { grid-column: 1 / -1; }

.dirs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.dirs .term { margin-top: auto; }
.dirs > .bundle:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* ---------- инструкции ---------- */
.guides { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.guides.single { grid-template-columns: 1fr; }
.guide {
  --c: var(--k-mcp);
  border-radius: 16px; border: 1px solid var(--line); background: var(--panel-solid);
  transition: border-color .2s, box-shadow .2s;
}
.guide:hover { border-color: color-mix(in oklab, var(--c) 40%, transparent); }
.guide[open] { border-color: color-mix(in oklab, var(--c) 55%, transparent); box-shadow: 0 18px 44px -26px var(--c); }
.guide summary {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px; align-items: start;
  padding: 16px 18px; cursor: pointer; list-style: none;
}
.guide summary::-webkit-details-marker { display: none; }
.guide .g-t { font: 600 16px/1.35 var(--body); }
.guide .g-s { grid-column: 1; font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.guide .g-x {
  grid-row: 1 / span 2; grid-column: 2; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  border: 1px solid var(--line-2); color: var(--c); font: 600 18px/1 var(--body); transition: transform .2s, background .2s;
}
.guide[open] .g-x { transform: rotate(45deg); background: color-mix(in oklab, var(--c) 15%, transparent); }
.g-body { padding: 0 18px 18px; }
.g-steps { margin: 0; padding: 0; list-style: none; counter-reset: g; display: grid; gap: 12px; }
.g-steps li { counter-increment: g; position: relative; padding-left: 36px; font-size: 14.5px; }
.g-steps li::before {
  content: counter(g); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  font: 700 11px var(--display); color: #0b0b12; background: var(--c);
}
.g-steps .code-box { margin-top: 8px; }
.g-steps .code-box pre { padding: 10px 12px; padding-right: 100px; font-size: 12.5px; }
.g-steps .code-box .btn { top: 5px; right: 5px; }
.g-body .note { margin-top: 14px; }

/* ---------- напоследок ---------- */
.after {
  position: relative; margin-top: 72px; padding: 28px 30px; border-radius: 22px; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 32px; align-items: center;
  border: 1px solid var(--line-2); background: var(--panel-solid);
}
.after::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 120% at 100% 50%, color-mix(in oklab, var(--k-plugin) 16%, transparent), transparent 70%),
    radial-gradient(50% 120% at 0% 100%, color-mix(in oklab, var(--k-mcp) 12%, transparent), transparent 70%);
}
.after > * { position: relative; }
.after p { margin: 0; color: var(--muted); font-size: 15px; max-width: 80ch; }
.after p b { display: block; margin-bottom: 6px; font: 700 20px var(--display); color: var(--text); }
.after .btn { height: 48px; padding: 0 22px; font-size: 15px; }

@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .bundle.base { grid-template-columns: 1fr; }
  .dirs, .guides { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  main { padding-left: 16px; padding-right: 16px; }
  .hero-grid { padding: 22px 0 8px; }
  .step { margin-top: 56px; }
  .step-head { gap: 4px 14px; }
  .step-no { font-size: 58px; -webkit-text-stroke-width: 1.5px; }
  .bundle, .bundle.base { padding: 18px; }
  .b-top { flex-direction: column; gap: 10px; }
  .b-price { text-align: left; }
  .bundle.base .b-price .v { font-size: 36px; }
  .route a { grid-template-columns: 40px minmax(0, 1fr) auto; padding: 10px 14px 10px 10px; }
  .route .num { width: 40px; height: 40px; font-size: 16px; }
  .route a:not(:last-child)::after { left: 29px; }
  .after { grid-template-columns: 1fr; padding: 22px 18px; }
  .after .btn { width: 100%; }
  .g-steps .code-box pre { padding-right: 12px; padding-top: 44px; }
}
