/* Cloud конфигуратор — клиентска версия (бранд: AK Brand Guidelines) */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --olive: #3a4d1e; --olive-mid: #4f6828; --gold: #a89050; --gold-lt: #c8b97a;
  --cream: #f5f0e8; --cream-dk: #ede6d6; --sage: #7a8a5a; --ink: #2c2c2c;
  --gold-text: #746437; --sage-text: #5d6a45; --line: #e2d9c6; --white: #fffdf8;
  --err: #a33a2a;
}
html { scroll-behavior: smooth; }
body {
  background: var(--cream); color: var(--ink);
  font-family: 'EB Garamond', Georgia, serif; font-size: 18px; line-height: 1.6;
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--olive); }
:focus-visible { outline: 2px solid var(--gold-text); outline-offset: 2px; }

/* ── Top bar ── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 6vw; border-bottom: 1px solid var(--gold-lt); background: var(--cream);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand svg { width: 42px; height: 42px; }
.brand-text { font-family: 'Cinzel', serif; font-weight: 700; color: var(--olive); font-size: 0.95rem; letter-spacing: 0.08em; line-height: 1.2; }
.brand-text small { display: block; font-weight: 400; font-size: 0.62rem; letter-spacing: 0.22em; color: var(--gold-text); text-transform: uppercase; }
.back { font-family: 'Cinzel', serif; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none; color: var(--olive); }
.back:hover { color: var(--gold-text); }

/* ── Layout ── */
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 48px 6vw 64px; flex: 1; }
.intro { max-width: 720px; margin-bottom: 36px; }
.eyebrow {
  font-family: 'Cinzel', serif; font-size: 0.7rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold-text); display: flex; align-items: center; gap: 14px; margin-bottom: 14px;
}
.eyebrow::before { content: ''; width: 32px; height: 1px; background: var(--gold); }
h1 { font-family: 'Cinzel', serif; font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.15; color: var(--olive); margin-bottom: 14px; }
.intro p { font-style: italic; opacity: 0.85; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.steps { display: flex; flex-direction: column; gap: 20px; }

/* ── Cards ── */
.card { background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--olive); padding: 26px 28px; }
.card-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 6px; }
.step { font-family: 'Cinzel', serif; font-weight: 700; font-size: 1.5rem; color: var(--gold-lt); line-height: 1; }
h2 { font-family: 'Cinzel', serif; font-size: 1.05rem; letter-spacing: 0.04em; color: var(--olive); }
.hint { font-size: 0.92rem; color: var(--sage-text); margin-bottom: 16px; }

/* ── Fields ── */
.field { display: block; margin-bottom: 14px; }
.field > span {
  display: block; font-family: 'Cinzel', serif; font-size: 0.62rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--sage-text); margin-bottom: 5px;
}
input, textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 9px 11px;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(168,144,80,.18); }
input[type=number] { text-align: right; font-variant-numeric: tabular-nums; }
input[aria-invalid=true] { border-color: var(--err); }
textarea { resize: vertical; min-height: 96px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.grid5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0 12px; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: 'Cinzel', serif; font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 12px 22px; border: 1px solid var(--olive); cursor: pointer; text-decoration: none;
  transition: background .2s, color .2s, border-color .2s;
}
.btn-primary { background: var(--olive); color: var(--cream); width: 100%; }
.btn-primary:hover { background: var(--olive-mid); }
.btn-primary[disabled] { opacity: .6; cursor: progress; }
.btn-ghost { background: transparent; color: var(--olive); border-color: var(--gold-lt); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-text); }
.chip {
  font: inherit; font-size: 0.85rem; background: var(--cream); color: var(--olive);
  border: 1px solid var(--gold-lt); border-radius: 999px; padding: 5px 14px; cursor: pointer;
}
.chip:hover { border-color: var(--gold); background: var(--cream-dk); }
.presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.icon-btn { background: none; border: 1px solid var(--line); width: 30px; height: 30px; cursor: pointer; color: var(--sage-text); }
.icon-btn:hover { border-color: var(--err); color: var(--err); }

/* ── VMs ── */
.vms { display: flex; flex-direction: column; gap: 14px; margin-bottom: 14px; }
.vm { border: 1px solid var(--line); background: var(--cream); padding: 16px 18px 4px; }
.vm-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.vm-title { font-family: 'Cinzel', serif; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--olive); }
.vms .vm:only-child [data-remove] { visibility: hidden; }

/* ── Catalog ── */
.catalog { display: flex; flex-direction: column; gap: 18px; }
.cat-title {
  font-family: 'Cinzel', serif; font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold-text); border-bottom: 1px solid var(--line); padding-bottom: 6px; margin-bottom: 4px;
}
.item { display: grid; grid-template-columns: 22px 1fr 96px; gap: 12px; align-items: center; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.item:last-child { border-bottom: 0; }
.item input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--olive); }
.item label { cursor: pointer; }
.item .qty input { padding: 6px 8px; }
.item .qty input:disabled { background: var(--cream); color: #999; }
.auto { font-size: 0.82rem; font-style: italic; color: var(--sage-text); text-align: right; }
.loading { font-style: italic; color: var(--sage-text); }

/* ── Contact extras ── */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.consent { display: grid; grid-template-columns: 22px 1fr; gap: 10px; font-size: 0.92rem; margin: 6px 0 14px; cursor: pointer; }
.consent input { width: 18px; height: 18px; margin-top: 4px; accent-color: var(--olive); }
.turnstile:empty { display: none; }

/* ── Summary ── */
.summary { position: sticky; top: 20px; }
.summary-inner { background: var(--olive); color: var(--cream); padding: 26px 24px; position: relative; }
.summary-inner::before { content: ''; position: absolute; top: 0; left: 24px; right: 24px; height: 3px; background: var(--gold); }
.summary h2 { color: var(--gold-lt); margin-bottom: 14px; }
.totals div { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid rgba(200,185,122,.22); }
.totals dt { font-size: 0.92rem; opacity: .85; }
.totals dd { font-family: 'Cinzel', serif; font-weight: 700; color: var(--gold-lt); font-variant-numeric: tabular-nums; }
.sum-note { font-size: 0.85rem; font-style: italic; opacity: .78; margin: 14px 0 16px; }
.summary .btn-primary { background: var(--gold-lt); color: var(--olive); border-color: var(--gold-lt); font-weight: 700; }
.summary .btn-primary:hover { background: var(--cream); border-color: var(--cream); }
.form-error { background: #fbeae6; color: var(--err); border: 1px solid #e6b8ae; padding: 9px 12px; font-size: 0.92rem; margin-bottom: 12px; }

/* ── Done ── */
.done { max-width: 640px; margin: 20px auto; text-align: center; background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--gold); padding: 44px 32px; }
.done .eyebrow { justify-content: center; }
.done p { margin-bottom: 10px; }
.done .btn { width: auto; margin-top: 14px; }
.done strong { font-family: 'Cinzel', serif; color: var(--olive); letter-spacing: 0.06em; }

/* ── Footer ── */
.foot {
  background: var(--olive); border-top: 2px solid var(--gold); padding: 18px 6vw;
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  font-family: 'Cinzel', serif; font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-lt);
}
.foot a { color: var(--gold-lt); text-decoration: none; }
.foot a:hover { color: var(--cream); }

/* ── Responsive ── */
@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; }
  .summary { position: static; }
}
@media (max-width: 640px) {
  body { font-size: 17px; }
  .wrap { padding-top: 30px; }
  .card { padding: 20px 16px; }
  .grid2 { grid-template-columns: 1fr; }
  .grid5 { grid-template-columns: repeat(2, 1fr); }
  .grid5 .field:last-child { grid-column: span 2; }
  .item { grid-template-columns: 22px 1fr 78px; }
  .brand-text { display: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
