/* Раскрой мебели — главная. Все значения из токенов ниже; системные шрифты, без внешних файлов. */
:root {
  --paper: #f6f4ef;
  --surface: #ffffff;
  --ink: #1d2329;
  --ink-soft: #4f5863;
  --line: #dcd7cc;
  --accent: #b8430f;        /* текст и линии: ~4.9:1 на --paper, ~4.6:1 на --accent-tint (AA) */
  --accent-bg: #c2410c;     /* кнопка с белым текстом: 5.2:1 */
  --accent-tint: #fbe9df;
  --dark: #1d2329;
  --dark-ink: #ece8de;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono", monospace;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px;
  --r1: 6px; --r2: 12px;
  --wrap: 1140px;
  --text: 1.0625rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font: 400 var(--text)/1.6 var(--font);
  color: var(--ink);
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
}
h1, h2, h3 { line-height: 1.2; margin: 0 0 var(--s4); text-wrap: balance; }
h1 { font-size: clamp(2rem, 4.6vw, 3.25rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -0.01em; margin-bottom: var(--s6); }
h3 { font-size: 1.125rem; margin-bottom: var(--s2); }
p { margin: 0 0 var(--s4); }
a { color: var(--accent); }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
code { font-family: var(--mono); font-size: 0.92em; background: var(--accent-tint); padding: 0 0.3em; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--s5); }

/* Шапка */
.top { position: sticky; top: 0; z-index: 10; background: var(--paper); background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: var(--s5); min-height: 60px; }
.logo { display: flex; align-items: center; gap: var(--s2); color: var(--ink); text-decoration: none; font-weight: 700; }
.nav { display: flex; gap: var(--s5); margin-left: auto; }
.nav a { color: var(--ink-soft); text-decoration: none; font-size: 0.95rem; }
.nav a:hover { color: var(--ink); }
.badge { font-size: 0.85rem; font-weight: 600; color: var(--accent); background: var(--accent-tint); padding: var(--s1) var(--s3); border-radius: 999px; white-space: nowrap; }

/* Первый экран */
.hero { padding: var(--s8) 0 var(--s7); }
.hero-in { display: grid; grid-template-columns: 1.05fr 1fr; gap: var(--s7); align-items: center; }
.kicker { color: var(--accent); font-weight: 600; font-size: 0.95rem; margin-bottom: var(--s3); }
.lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 36em; }
.cta { display: flex; flex-wrap: wrap; gap: var(--s3); margin: var(--s5) 0 var(--s3); }
.btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 var(--s5); border-radius: var(--r1); font-weight: 600; text-decoration: none; }
.btn-main { background: var(--accent-bg); color: #fff; }
.btn-line { border: 1.5px solid var(--ink); color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.note { font-size: 0.95rem; color: var(--ink-soft); }

.hero-pic { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r2); padding: var(--s4); box-shadow: 0 1px 2px rgb(29 35 41 / 6%), 0 12px 32px rgb(29 35 41 / 8%); }
.hero-pic svg { display: block; width: 100%; height: auto; }
.sheet { fill: #efe6d6; stroke: #c9bba3; }
.part { fill: #fffaf2; stroke: var(--ink); stroke-width: 0.8; }
.part-curve { fill: var(--accent-tint); stroke: var(--accent); }
.hole circle { fill: var(--accent); }
.lbl text { font: 600 8px var(--font); fill: var(--ink-soft); text-anchor: middle; }
.dim { font: 7px var(--mono); fill: var(--ink-soft); text-anchor: middle; }
.code { margin: var(--s3) 0 0; background: var(--dark); color: var(--dark-ink); border-radius: var(--r1); padding: var(--s3) var(--s4); font: 0.85rem/1.55 var(--mono); overflow-x: auto; }
.code code { background: none; padding: 0; font-size: inherit; }

/* Разделы */
.block { padding: var(--s8) 0; }
.block-alt { background: var(--surface); border-block: 1px solid var(--line); }

.steps, .train-steps { list-style: none; margin: 0; padding: 0; counter-reset: n; display: grid; gap: var(--s5); }
.steps { grid-template-columns: repeat(3, 1fr); }
.steps li, .train-steps li { counter-increment: n; position: relative; padding-top: var(--s7); }
.steps li::before, .train-steps li::before {
  content: counter(n); position: absolute; top: 0; left: 0;
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 50%; background: var(--ink); color: var(--paper); font-weight: 700;
}
.steps p, .train-steps p, .features p { color: var(--ink-soft); margin: 0; }

.features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4); }
.features li { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r2); padding: var(--s5); }

.train { display: grid; grid-template-columns: 1fr 1.2fr; gap: var(--s7); align-items: start; }
.train-steps li { padding: 0 0 0 56px; min-height: 36px; }
.train-steps li::before { background: var(--accent-bg); color: #fff; }

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4); align-items: stretch; }
.plan { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r2); padding: var(--s6) var(--s5); }
.plan-main { border: 2px solid var(--accent); background: var(--surface); }
.price { font-size: 1.6rem; font-weight: 700; margin-bottom: var(--s4); }
.plan:not(:first-child) .price { font-size: 1.15rem; color: var(--ink-soft); }
.plan ul { margin: 0; padding: 0; list-style: none; }
.plan li { padding: var(--s2) 0 var(--s2) 26px; position: relative; border-top: 1px solid var(--line); }
.plan li::before { content: ""; position: absolute; left: 4px; top: 0.95em; width: 10px; height: 6px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }

.faq > * { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); padding: var(--s4) 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.08rem; list-style-position: outside; }
.faq details p { margin: var(--s3) 0 0; color: var(--ink-soft); }

.foot { border-top: 1px solid var(--line); padding: var(--s6) 0; color: var(--ink-soft); font-size: 0.95rem; }
.foot-in { display: flex; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; }

@media (max-width: 960px) {
  .hero-in, .train { grid-template-columns: 1fr; gap: var(--s6); }
  .features { grid-template-columns: 1fr 1fr; }
  .nav { display: none; }
  .badge { margin-left: auto; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 var(--s4); }
  .hero { padding: var(--s7) 0 var(--s6); }
  .block { padding: var(--s7) 0; }
  .steps, .features, .plans { grid-template-columns: 1fr; }
  .lead { font-size: 1.08rem; }
  .btn { flex: 1 1 auto; justify-content: center; }
}
