/*
  Калькулятор — стили. Встроен в страницу сайта (общий layout).
  Токены/кнопки — в base.css.
*/

.calc { max-width: 760px; margin: 0 auto; padding: 48px 0 64px; }

.calc__head { margin-bottom: 28px; }
.calc__head h1 { font-size: clamp(1.8rem, 5vw, 2.5rem); margin: 8px 0 10px; }
.calc__lede { color: var(--muted); max-width: 56ch; margin: 0; }

/* Прогресс */
.steps { list-style: none; display: flex; gap: 8px; margin: 24px 0; padding: 0; counter-reset: step; }
.steps li { flex: 1; display: flex; align-items: center; gap: 8px; font-size: .82rem;
  color: var(--muted); padding-bottom: 12px; border-bottom: 2px solid var(--line);
  transition: color .2s, border-color .2s; }
.steps li::before { counter-increment: step; content: counter(step); display: grid;
  place-items: center; width: 24px; height: 24px; flex: none; border-radius: 50%;
  border: 1.5px solid var(--line); font-size: .78rem; font-variant-numeric: tabular-nums; transition: all .2s; }
.steps li[data-state="active"] { color: var(--ink); border-bottom-color: var(--brass); }
.steps li[data-state="active"]::before { border-color: var(--brass); background: var(--brass); color: #fff; }
.steps li[data-state="done"] { color: var(--ink); border-bottom-color: var(--brass); }
.steps li[data-state="done"]::before { border-color: var(--brass); color: var(--brass); content: "✓"; }
.steps__label { display: none; }
@media (min-width: 560px) { .steps__label { display: inline; } }

.step__title { font-family: var(--serif); font-weight: 400; font-size: 1.35rem; margin: 0 0 6px; }
.step__note { color: var(--muted); font-size: .92rem; margin: 0 0 20px; max-width: 52ch; }

/* Карточки */
.calc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.calc-grid--tiers { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
@media (max-width: 520px) { .calc-grid, .calc-grid--tiers { grid-template-columns: 1fr; } }

.calc-card { position: relative; text-align: left; background: var(--card); border: 1.5px solid var(--line);
  border-radius: 4px; padding: 18px; cursor: pointer; font: inherit; color: inherit; box-shadow: var(--shadow);
  transition: border-color .18s, box-shadow .18s, transform .18s; }
.calc-card:hover { border-color: var(--brass); box-shadow: var(--shadow-lift); transform: translateY(-1px); }
.calc-card:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.calc-card[aria-checked="true"] { border-color: var(--brass); box-shadow: var(--shadow-lift), inset 0 0 0 1px var(--brass); }
.calc-card[aria-checked="true"]::after { content: "✓"; position: absolute; top: 14px; right: 14px;
  width: 22px; height: 22px; display: grid; place-items: center; background: var(--brass); color: #fff;
  border-radius: 50%; font-size: .76rem; }
.calc-card__title { font-weight: 600; font-size: 1rem; }
.calc-card__hint { color: var(--muted); font-size: .84rem; margin-top: 3px; }

.calc-card--tier { padding-right: 44px; }
.calc-card__price { font-family: var(--serif); font-size: 1.5rem; color: var(--brass-dark);
  margin-top: 12px; font-variant-numeric: tabular-nums; }
.calc-card__price small { font-size: .8rem; color: var(--muted); font-family: var(--sans); }
.calc-card__example { color: var(--muted); font-size: .78rem; margin-top: 6px; }

.swatch { width: 100%; height: 6px; border-radius: 3px; margin-bottom: 12px; }
.swatch--plain { background: linear-gradient(90deg, #F3F1EC, #E8E5DE); }
.swatch--sand { background: linear-gradient(90deg, #E8DFCB, #D8C9A8); }
.swatch--marble { background: linear-gradient(90deg, #EDE9E2, #DAD3C6),
  repeating-linear-gradient(115deg, transparent 0 8px, rgba(138,133,120,.35) 8px 9px);
  background-blend-mode: multiply; }

/* Длина */
.length { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.length__range { flex: 1; min-width: 200px; -webkit-appearance: none; appearance: none; height: 4px;
  border-radius: 2px; background: var(--line); outline: none; }
.length__range::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%;
  background: var(--brass); border: 3px solid #fff; box-shadow: var(--shadow-lift); cursor: pointer; }
.length__range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--brass);
  border: 3px solid #fff; box-shadow: var(--shadow-lift); cursor: pointer; }
.length__field { display: flex; align-items: baseline; gap: 6px; border: 1.5px solid var(--line);
  border-radius: 4px; padding: 8px 14px; background: var(--card); }
.length__field:focus-within { border-color: var(--brass); }
.length__input { width: 68px; border: none; background: none; font-family: var(--serif); font-size: 1.5rem;
  color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.length__input:focus { outline: none; }
.length__unit { color: var(--muted); font-size: .9rem; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1.5px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 14px;
  font: inherit; font-size: .86rem; color: var(--muted); cursor: pointer; transition: all .15s; }
.chip:hover { border-color: var(--brass); color: var(--ink); }
.chip[aria-pressed="true"] { border-color: var(--brass); background: var(--brass); color: #fff; }

/* Результат */
.result { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: var(--graphite); color: var(--marble); border-radius: 4px; padding: 22px 26px;
  margin: 20px 0; box-shadow: var(--shadow-lift); }
.result__label { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .16em;
  color: rgba(245,242,236,.6); margin-bottom: 4px; }
.result__value { font-family: var(--serif); font-size: clamp(1.8rem, 6vw, 2.4rem); color: #fff;
  font-variant-numeric: tabular-nums; }
.result__hint { display: block; font-size: .8rem; color: rgba(245,242,236,.55); margin-top: 4px; }

.calc-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }
.btn--ghost.btn--nav { padding-left: 8px; padding-right: 8px; }

.calc__foot { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line-soft);
  color: var(--muted); font-size: .84rem; display: flex; gap: 8px 20px; flex-wrap: wrap; }
.calc__foot b { color: var(--ink); font-weight: 600; }

.calc-lead { background: var(--card); border: 1.5px solid var(--line); border-radius: 4px;
  padding: 28px; box-shadow: var(--shadow); margin-top: 8px; }
.calc-lead__summary { color: var(--muted); font-size: .92rem; margin: 0 0 18px; }
.calc-lead__done { text-align: center; padding: 20px 0; }
.calc-lead__check { width: 56px; height: 56px; margin: 0 auto 14px; display: grid; place-items: center;
  background: var(--brass); color: #fff; border-radius: 50%; font-size: 1.6rem; }
.calc-lead__done h3 { font-family: var(--serif); font-weight: 400; font-size: 1.4rem; margin: 0 0 8px; }
.calc-lead__done p { color: var(--muted); max-width: 40ch; margin: 0 auto; }

.step-anim { animation: calcfade .25s ease; }
@keyframes calcfade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .step-anim { animation: none; } }
