/* Конфигуратор демо-витрины — оформление лендинга Z&K. */

:root {
  --bg: #0B0F17;
  --line: rgba(148, 163, 184, 0.16);
  --muted: #94A3B8;
  --dim: #64748B;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: #E5E7EB;
  font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  overflow-x: hidden;
}

button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: #A5B4FC; }

.glow {
  position: fixed;
  top: -320px; left: 50%;
  margin-left: -500px;
  width: 1000px; height: 700px;
  background: radial-gradient(circle at center, rgba(99, 102, 241, 0.2), rgba(34, 211, 238, 0.06) 45%, transparent 70%);
  filter: blur(30px);
  pointer-events: none;
  z-index: 0;
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(32px, 6vh, 72px) clamp(18px, 3.5vw, 44px) 80px;
}

.kicker {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #475569;
  margin-bottom: 16px;
}

h1 {
  font-size: clamp(30px, 4.6vw, 54px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 18ch;
}

h1 em {
  font-style: normal;
  background: linear-gradient(135deg, #818CF8, #22D3EE);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lede {
  margin-top: 20px;
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.6;
  color: var(--muted);
  max-width: 58ch;
}

.cols {
  margin-top: 46px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 40px;
  align-items: start;
}

@media (max-width: 900px) {
  .cols { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .preview { order: -1; }
}

.label {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 14px;
}

.block { margin-bottom: 34px; }

.niches { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }

.niche {
  text-align: left;
  padding: 18px 18px 20px;
  border-radius: 15px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.25s, background 0.25s, transform 0.25s;
}

.niche:hover { border-color: rgba(99, 102, 241, 0.5); transform: translateY(-2px); }

.niche[aria-pressed='true'] {
  border-color: rgba(34, 211, 238, 0.6);
  background: linear-gradient(160deg, rgba(34, 211, 238, 0.09), rgba(255, 255, 255, 0.015));
}

.niche-dot { width: 26px; height: 26px; border-radius: 8px; margin-bottom: 14px; }
.niche-name { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.niche-sub { font-size: 12.5px; color: var(--dim); margin-top: 5px; line-height: 1.45; }

.text-input {
  width: 100%;
  max-width: 460px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(255, 255, 255, 0.03);
  outline: none;
  font-size: 16px;
}

.text-input:focus { border-color: rgba(99, 102, 241, 0.6); }
.text-input::placeholder { color: #475569; }

.swatches { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.swatch {
  width: 38px; height: 38px;
  border-radius: 11px;
  border: 2px solid transparent;
  outline: 1px solid var(--line);
  outline-offset: 2px;
}

.swatch[aria-pressed='true'] { outline-color: #22D3EE; outline-width: 2px; }

.swatch-custom { position: relative; width: 38px; height: 38px; border-radius: 11px; overflow: hidden; outline: 1px solid var(--line); outline-offset: 2px; }
.swatch-custom input { position: absolute; inset: -6px; width: 200%; height: 200%; border: 0; padding: 0; cursor: pointer; background: none; }

.submit {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: 13px;
  background: linear-gradient(135deg, #6366F1, #22D3EE);
  color: #0B0F17;
  font-weight: 600;
  font-size: 16px;
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.35);
}

.submit:disabled { opacity: 0.5; box-shadow: none; cursor: not-allowed; }

.note { margin-top: 16px; font-size: 12.5px; color: var(--dim); line-height: 1.6; max-width: 52ch; }
.err { color: #FCA5A5; font-size: 13.5px; margin-top: 12px; min-height: 18px; }

/* Превью телефона */

.preview { position: sticky; top: 40px; }

.phone {
  width: 300px;
  max-width: 100%;
  margin: 0 auto;
  border-radius: 34px;
  border: 9px solid #12151C;
  background: #F6F7F9;
  overflow: hidden;
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.55);
  color: #111827;
}

.p-top { padding: 16px 15px 14px; color: #fff; }
.p-brand { display: flex; align-items: center; gap: 10px; }
.p-mark { width: 32px; height: 32px; border-radius: 9px; background: rgba(255, 255, 255, 0.24); display: grid; place-items: center; font-weight: 700; font-size: 16px; }
.p-name { font-size: 15px; font-weight: 600; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-sub { font-size: 10px; opacity: 0.8; font-family: 'IBM Plex Mono', ui-monospace, monospace; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 2px; }
.p-search { margin-top: 12px; background: rgba(255, 255, 255, 0.2); border-radius: 9px; padding: 9px 11px; font-size: 12.5px; opacity: 0.85; }

.p-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px; }
.p-card { background: #fff; border: 1px solid #E5E7EB; border-radius: 13px; padding: 8px 9px 10px; }
.p-thumb { aspect-ratio: 1; border-radius: 10px; display: grid; place-items: center; margin-bottom: 8px; }
.p-thumb svg { width: 42%; height: 42%; fill: none; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.p-item { font-size: 11px; line-height: 1.3; height: 28px; overflow: hidden; }
.p-price { font-size: 13px; font-weight: 600; margin-top: 6px; }

.p-bar { margin: 4px 12px 12px; border-radius: 11px; padding: 11px 13px; color: #fff; display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; font-weight: 600; }

.preview-note { text-align: center; font-size: 12px; color: var(--dim); margin-top: 16px; line-height: 1.55; }
