/* «Дуб і Сталь»: сталь и графит как основа, медовый дуб — действие, жёлтая рулетка — мера. */
:root {
  --steel-50: #f6f7f7;
  --steel-100: #e9eceb;
  --steel-200: #d5dbdb;
  --steel-500: #6c7a80;
  --graphite: #20282d;
  --graphite-2: #2b353b;
  --ink: #1b2328;
  --ink-2: #46545b;
  --oak: #c9893a;
  --oak-deep: #a96d24;
  --tape: #e7b93b;
  --steel-blue: #2c5a78;
  --ok: #2f7d5b;
  --err: #b03a48;

  --display: 'Unbounded', 'Golos Text', system-ui, sans-serif;
  --text: 'Golos Text', system-ui, sans-serif;
  --r-s: 6px;
  --r-m: 12px;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1280px;
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--steel-100); overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--steel-blue); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
h1, h2 { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.05; margin: 0; }
h2 { font-size: clamp(28px, 4vw, 44px); }

.demo-note {
  background: var(--graphite); color: #b9c4c8; font-size: 13px; text-align: center; padding: 6px var(--gutter);
}

/* ── кнопки ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 12px 22px; font: 600 16px/1.2 var(--text);
  text-decoration: none; cursor: pointer; transition: transform .15s, background-color .15s;
}
.btn:active { transform: translateY(1px); }
.btn-oak { background: var(--oak); color: #1d1408; }
.btn-oak:hover { background: #d6964a; }
.btn-lg { padding: 16px 30px; font-size: 18px; }
.btn-ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 1.5px currentColor; }
.btn-ghost:hover { background: rgba(255, 255, 255, .08); }
.btn:disabled { opacity: .45; cursor: default; }

/* ── шапка ── */
.nav {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 32px;
  padding: 12px var(--gutter); background: rgba(233, 236, 235, .86); backdrop-filter: blur(10px);
}
.logo { display: flex; align-items: center; gap: 10px; font: 700 18px var(--display); text-decoration: none; color: var(--graphite); }
.logo svg { width: 32px; height: 32px; color: var(--graphite); }
.nav-links { display: flex; gap: 24px; margin-left: auto; }
.nav-links a { text-decoration: none; color: var(--ink-2); font-weight: 500; }
.nav-links a:hover { color: var(--ink); }

/* ── hero ── */
.hero {
  max-width: var(--max); margin: 0 auto; padding: clamp(24px, 5vw, 64px) var(--gutter) 40px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(24px, 4vw, 56px); align-items: center;
}
.hero-kicker { margin: 0 0 18px; color: var(--ink-2); font-weight: 500; }
.hero-title { font-size: clamp(40px, 5.6vw, 80px); font-weight: 700; line-height: .98; }
.hero-title .line { display: block; }
.hero-title .line:last-child { color: var(--oak-deep); }
.hero-sub { max-width: 34em; margin: 24px 0 28px; color: var(--ink-2); font-size: 19px; }
.hero-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hero-time { color: var(--steel-500); font-size: 15px; }
.facts { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(4, auto); gap: 8px 28px; }
.facts li { display: grid; }
.facts b { font: 600 22px var(--display); }
.facts span { color: var(--ink-2); font-size: 14px; line-height: 1.3; max-width: 11em; }

.stage { position: relative; margin: 0; aspect-ratio: 5 / 4; border-radius: var(--r-m); overflow: hidden;
  background: radial-gradient(120% 90% at 50% 35%, #fbfcfc 0%, #dfe4e3 60%, #cfd6d5 100%); }
.stage-canvas, .stage-canvas canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage-canvas { cursor: grab; touch-action: pan-y; }
.stage-canvas:active { cursor: grabbing; }
.stage-fallback img { width: 100%; height: 100%; object-fit: cover; }
.stage-loading { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--steel-500); font-size: 15px; pointer-events: none; }
.dim-label {
  font: 600 13px var(--text); color: var(--steel-blue); background: rgba(246, 247, 247, .9);
  padding: 2px 8px; border-radius: 4px; white-space: nowrap; pointer-events: none;
}
.stage-ui { position: absolute; left: 16px; right: 16px; bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.swatches { display: flex; gap: 8px; background: rgba(246, 247, 247, .85); padding: 6px; border-radius: 999px; backdrop-filter: blur(6px); }
.swatch {
  display: flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 6px 12px 6px 6px;
  border-radius: 999px; cursor: pointer; font: 500 14px var(--text); color: var(--ink-2);
}
.swatch::before { content: ''; width: 22px; height: 22px; border-radius: 50%; background: var(--s); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.swatch[aria-checked="true"] { background: #fff; color: var(--ink); }
.stage-hint { font-size: 13px; color: var(--ink-2); background: rgba(246, 247, 247, .8); padding: 4px 10px; border-radius: 999px; }

/* ── квиз ── */
.quiz-section {
  background: var(--graphite); color: #eef2f2; padding: clamp(56px, 8vw, 96px) var(--gutter);
  scroll-margin-top: 56px;
}
.quiz-head, .tape, .step-count, .quiz-grid { max-width: var(--max); margin-left: auto; margin-right: auto; }
.quiz-head p { color: #a9b6bb; margin: 12px 0 32px; }

/* рулетка: прогресс квиза */
.tape { position: relative; height: 40px; }
.tape-body { position: absolute; inset: 0 0 10px; background: #39444a; border-radius: 4px; overflow: hidden; }
.tape-fill {
  height: 100%; width: 0; background: var(--tape);
  background-image: repeating-linear-gradient(90deg, rgba(0, 0, 0, .55) 0 1px, transparent 1px 10px);
  background-size: 100% 40%; background-repeat: repeat-x; background-position: top;
  transition: width .5s cubic-bezier(.2, .8, .2, 1);
}
.tape-ticks { position: absolute; left: 0; right: 0; bottom: 0; height: 10px; display: flex; justify-content: space-between; }
.tape-ticks span { font-size: 10px; color: #7f8d93; transform: translateX(-50%); }
.tape-ticks span:first-child { transform: none; }
.tape-ticks span:last-child { transform: translateX(-100%); }
.step-count { color: #a9b6bb; font-size: 14px; margin-top: 10px; margin-bottom: 28px; }

.quiz-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
.quiz { min-width: 0; }
.step-viewport { position: relative; min-height: 360px; }
.step h3 { font: 600 clamp(22px, 2.6vw, 30px)/1.2 var(--display); margin: 0 0 8px; }
.step .lead { color: #a9b6bb; margin: 0 0 24px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.card {
  position: relative; border: 0; padding: 0; border-radius: var(--r-m); overflow: hidden; cursor: pointer;
  background: var(--graphite-2); color: #fff; text-align: left; font: inherit;
  box-shadow: inset 0 0 0 2px transparent; transition: box-shadow .15s, transform .15s;
}
.card img { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; transition: transform .4s; }
.card:hover img { transform: scale(1.04); }
.card span { display: block; padding: 10px 12px 12px; font-weight: 600; }
.card small { display: block; color: #a9b6bb; font-weight: 400; font-size: 13px; }
.card[aria-checked="true"] { box-shadow: inset 0 0 0 3px var(--tape); }
.card[aria-checked="true"]::after {
  content: '✓'; position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; background: var(--tape); color: #1d1408; font-weight: 700;
}
.options { display: grid; gap: 10px; max-width: 560px; }
.option {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r-m); border: 0;
  background: var(--graphite-2); color: #eef2f2; font: inherit; text-align: left; cursor: pointer;
  box-shadow: inset 0 0 0 2px transparent;
}
.option b { font-weight: 600; }
.option small { display: block; color: #a9b6bb; }
.option .dot { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 2px #7f8d93; flex: none; }
.option .chip { width: 30px; height: 30px; border-radius: 6px; background: var(--c); flex: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); }
.option[aria-checked="true"] { box-shadow: inset 0 0 0 2px var(--tape); }
.option[aria-checked="true"] .dot { box-shadow: inset 0 0 0 6px var(--tape); }

/* ползунок-рулетка */
.measure { max-width: 620px; }
.measure-value { font: 700 clamp(48px, 7vw, 80px)/1 var(--display); color: var(--tape); }
.measure-value small { font-size: .4em; color: #a9b6bb; font-weight: 500; margin-left: 6px; }
.measure-hint { color: #a9b6bb; margin: 6px 0 22px; min-height: 1.5em; }
input[type="range"].tape-range {
  -webkit-appearance: none; appearance: none; width: 100%; height: 34px; background: transparent; cursor: pointer;
}
.tape-range::-webkit-slider-runnable-track {
  height: 34px; border-radius: 4px; background-color: var(--tape);
  background-image: repeating-linear-gradient(90deg, #1d1408 0 1px, transparent 1px var(--tick, 12px));
  background-size: 100% 45%; background-repeat: repeat-x;
}
.tape-range::-moz-range-track {
  height: 34px; border-radius: 4px; background-color: var(--tape);
  background-image: repeating-linear-gradient(90deg, #1d1408 0 1px, transparent 1px var(--tick, 12px));
  background-size: 100% 45%; background-repeat: repeat-x;
}
.tape-range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 6px; height: 50px; margin-top: -8px; background: var(--err); border-radius: 3px;
  box-shadow: 0 0 0 3px rgba(176, 58, 72, .25);
}
.tape-range::-moz-range-thumb { width: 6px; height: 50px; background: var(--err); border: 0; border-radius: 3px; }
.range-scale { display: flex; justify-content: space-between; color: #7f8d93; font-size: 13px; margin-top: 4px; }

.stepper { display: inline-flex; align-items: center; gap: 0; background: var(--graphite-2); border-radius: 999px; }
.stepper button { width: 48px; height: 48px; border: 0; background: none; color: #fff; font-size: 24px; cursor: pointer; border-radius: 50%; }
.stepper button:hover { background: rgba(255, 255, 255, .08); }
.stepper output { min-width: 56px; text-align: center; font: 700 26px var(--display); }
.toggle-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 18px; }

.fields { display: grid; gap: 14px; max-width: 520px; }
.fields label { display: grid; gap: 6px; font-weight: 500; }
.fields input, .fields textarea {
  padding: 13px 14px; border-radius: var(--r-s); border: 1.5px solid #46545b; background: var(--graphite-2);
  color: #fff; font: inherit;
}
.fields textarea { min-height: 84px; resize: vertical; }
.fields input:focus, .fields textarea:focus { border-color: var(--tape); outline: none; }
.fields .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: #c8d1d4; font-size: 15px; }
.fields .check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--tape); }
.consent { color: #8b989d; font-size: 13px; margin: 4px 0 0; }
.field-error { color: #ff9aa5; font-size: 14px; min-height: 1.3em; margin: 0; }

.quiz-nav { display: flex; justify-content: space-between; margin-top: 32px; max-width: 760px; }
.quiz-nav .btn { min-width: 140px; }

.done { text-align: left; max-width: 560px; }
.done h3 { font-size: clamp(28px, 3.4vw, 40px); }
.done p { color: #c8d1d4; }

/* чек заказа: перфорация сверху и снизу */
.receipt {
  position: sticky; top: 84px; background: var(--steel-50); color: var(--ink); padding: 26px 24px 28px;
  border-radius: 4px;
  --perf: radial-gradient(circle at 8px 0, transparent 6px, var(--steel-50) 6.5px);
  -webkit-mask: radial-gradient(circle at 8px 0, transparent 6px, #000 6.5px) 0 0 / 16px 51% repeat-x,
                radial-gradient(circle at 8px 100%, transparent 6px, #000 6.5px) 0 100% / 16px 51% repeat-x;
          mask: radial-gradient(circle at 8px 0, transparent 6px, #000 6.5px) 0 0 / 16px 51% repeat-x,
                radial-gradient(circle at 8px 100%, transparent 6px, #000 6.5px) 0 100% / 16px 51% repeat-x;
}
.receipt-title { margin: 0; font-weight: 600; color: var(--ink-2); }
.receipt-price { margin: 6px 0 4px; font: 700 40px/1.1 var(--display); font-variant-numeric: tabular-nums; }
.receipt-price .from, .receipt-price .cur { font: 500 16px var(--text); color: var(--ink-2); }
.receipt-note { font-size: 13px; color: var(--steel-500); margin: 0 0 16px; }
.receipt-lines { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; padding-top: 14px; border-top: 1.5px dashed var(--steel-200); font-size: 15px; }
.receipt-lines dt { color: var(--steel-500); }
.receipt-lines dd { margin: 0; text-align: right; white-space: nowrap; }
.receipt-hints { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; font-size: 14px; }
.receipt-hints li { padding: 8px 10px; border-radius: var(--r-s); background: #fff; border-left: 3px solid var(--oak); }
.receipt-hints li.warn { border-left-color: var(--err); }

/* ── процесс ── */
.process { max-width: var(--max); margin: 0 auto; padding: clamp(64px, 9vw, 112px) var(--gutter); }
.timeline { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; counter-reset: step; }
.timeline li { position: relative; padding-top: 28px; border-top: 2px solid var(--steel-200); display: grid; gap: 6px; align-content: start; }
.timeline li::before {
  counter-increment: step; content: counter(step); position: absolute; top: -15px; left: 0;
  width: 28px; height: 28px; border-radius: 50%; background: var(--graphite); color: #fff; display: grid; place-items: center;
  font: 600 13px var(--display);
}
.timeline b { font: 600 19px var(--display); }
.timeline span { color: var(--ink-2); font-size: 15px; }
.timeline em { order: -1; font-style: normal; color: var(--oak-deep); font-weight: 600; font-size: 14px; } /* срок над шагом — все сроки на одной линии */

/* ── галерея ── */
.works { padding: 0 0 clamp(64px, 9vw, 112px); }
.works-head {
  max-width: var(--max); margin: 0 auto 28px; padding: 0 var(--gutter);
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.works-head p { color: var(--ink-2); margin: 10px 0 0; }

/* слайдер: нативный scroll-snap (свайп работает сам) + стрелки, счётчик, прогресс и перетаскивание мышью */
.slider-nav { display: flex; align-items: center; gap: 10px; }
.slider-count { font: 600 15px var(--display); color: var(--ink-2); min-width: 4.5em; text-align: right; font-variant-numeric: tabular-nums; }
.slider-btn {
  width: 52px; height: 52px; border-radius: 50%; border: 1.5px solid var(--graphite); background: transparent;
  display: grid; place-items: center; cursor: pointer; color: var(--graphite); transition: background-color .15s, color .15s;
}
.slider-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.slider-btn:hover:not(:disabled) { background: var(--graphite); color: #fff; }
.slider-btn:disabled { opacity: .3; cursor: default; }

.works-strip {
  --slide: clamp(280px, 42vw, 620px);
  display: grid; grid-auto-flow: column; grid-auto-columns: var(--slide); gap: 20px;
  overflow-x: auto; overscroll-behavior-x: contain;
  /* отступ слева = отступ контента страницы, чтобы первый слайд стоял ровно под заголовком */
  padding: 0 max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
  scroll-padding-inline: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
  scroll-snap-type: x mandatory; scrollbar-width: none; cursor: grab;
}
.works-strip::-webkit-scrollbar { display: none; }
.works-strip.dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.works-strip.dragging img { pointer-events: none; }
.works-strip figure { margin: 0; scroll-snap-align: start; }
.works-strip img { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; border-radius: var(--r-m); -webkit-user-drag: none; }
.works-strip figcaption { margin-top: 10px; color: var(--ink-2); font-size: 15px; }
.slider-progress {
  max-width: calc(var(--max) - 2 * var(--gutter)); margin: 22px auto 0; height: 3px; background: var(--steel-200);
  border-radius: 2px; overflow: hidden;
  width: calc(100% - 2 * var(--gutter));
}
.works, .process, .faq { scroll-margin-top: 72px; }
.slider-progress i { display: block; height: 100%; width: 0; background: var(--graphite); border-radius: 2px; }

/* ── FAQ ── */
.faq { max-width: 860px; margin: 0 auto; padding: 0 var(--gutter) clamp(64px, 9vw, 112px); }
.faq h2 { margin-bottom: 24px; }
.faq details { border-top: 1.5px solid var(--steel-200); padding: 18px 0; }
.faq details:last-child { border-bottom: 1.5px solid var(--steel-200); }
.faq summary { cursor: pointer; font-weight: 600; font-size: 19px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: '+'; font: 500 24px/1 var(--display); color: var(--oak-deep); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary::-webkit-details-marker { display: none; }
.faq p { color: var(--ink-2); margin: 12px 0 0; max-width: 60ch; }

.footer {
  background: var(--graphite); color: #b9c4c8; padding: 40px var(--gutter); display: grid; grid-template-columns: 1fr 1.4fr; gap: 24px;
  font-size: 15px;
}
.footer b { color: #fff; font-family: var(--display); }
.footer p { margin: 8px 0 0; }
.footer-demo a { color: var(--tape); }

/* ── адаптив ── */
@media (max-width: 1080px) {
  .quiz-grid { grid-template-columns: 1fr; }
  .receipt { position: static; order: -1; }
  .timeline { grid-template-columns: 1fr 1fr; row-gap: 32px; }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-cta { margin-left: auto; }
  .hero { grid-template-columns: 1fr; }
  .facts { grid-template-columns: repeat(2, auto); }
  .footer { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  :root { font-size: 16px; }
  .nav { gap: 12px; }
  .logo { font-size: 15px; white-space: nowrap; }
  .logo svg { width: 28px; height: 28px; }
  .nav-cta { padding: 10px 14px; font-size: 14px; white-space: nowrap; }
  .cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .timeline { grid-template-columns: 1fr; }
  .stage-hint { display: none; }
  /* на телефоне — только цветные кружки, подпись остаётся для скринридеров */
  .swatch { padding: 6px; }
  .swatch span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .swatch::before { width: 28px; height: 28px; }
  .swatch[aria-checked="true"]::before { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--steel-blue); }
  .quiz-nav .btn { min-width: 0; flex: 1; }
  .quiz-nav { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}
