:root {
  --bg: #ece5da;
  --ink: #241f1a;
  --muted: #7d7367;
  --line: rgba(36, 31, 26, 0.12);
  --card: rgba(255, 255, 255, 0.72);
  --accent: #a4703c;
  --swatch-body: #c99b63;
  --radius: 22px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: Manrope, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

#stage {
  position: fixed;
  inset: 0;
  z-index: 0;
}

#stage canvas { display: block; }

.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 10%, rgba(255, 255, 255, 0.5), transparent 60%),
    radial-gradient(100% 70% at 50% 100%, rgba(120, 100, 70, 0.22), transparent 65%);
}

/* ---------- верхняя панель ---------- */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(20px, 4vw, 54px);
}

.brand { display: flex; align-items: center; gap: 12px; }

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(150deg, #c99b63, #8a5632);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.brand strong {
  display: block;
  font-size: 15px;
  letter-spacing: 0.22em;
  font-weight: 800;
}

.brand span {
  display: block;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.topnav { display: flex; gap: 26px; }

.topnav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 13.5px;
  letter-spacing: 0.02em;
  opacity: 0.75;
  transition: opacity 0.2s;
}

.topnav a:hover { opacity: 1; }

/* ---------- первый экран ---------- */
.hero {
  position: relative;
  z-index: 10;
  padding: clamp(120px, 22vh, 210px) clamp(20px, 6vw, 90px) 40px;
  max-width: 640px;
  pointer-events: none;
}

.hero > * { pointer-events: auto; }

.kicker {
  margin: 0 0 14px;
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1 {
  margin: 0;
  font-size: clamp(38px, 6.4vw, 76px);
  line-height: 0.98;
  font-weight: 300;
  letter-spacing: -0.03em;
}

.lede {
  margin: 20px 0 30px;
  max-width: 420px;
  font-size: 16px;
  line-height: 1.6;
  color: #4d453c;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- кнопки ---------- */
.btn {
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 14px 24px;
  border-radius: 999px;
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s;
}

.btn-primary {
  background: var(--ink);
  color: #f8f4ee;
  box-shadow: 0 14px 30px -14px rgba(36, 31, 26, 0.7);
}

.btn-primary:hover { transform: translateY(-2px); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
  backdrop-filter: blur(10px);
}

.btn-ghost:hover { background: rgba(255, 255, 255, 0.85); }

/* ---------- панель конфигурации ---------- */
.panel {
  position: fixed;
  z-index: 15;
  top: 96px;
  right: clamp(20px, 4vw, 54px);
  width: 320px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 30px 70px -40px rgba(40, 32, 22, 0.75), inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(18px) saturate(140%);
  animation: rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.panel-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.panel-head p {
  margin: 6px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.block {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.block-title {
  display: block;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

.swatches { display: flex; gap: 10px; }

.swatch {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 12px;
  border: 0;
  cursor: pointer;
  background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
  transition: transform 0.16s, box-shadow 0.16s;
  position: relative;
}

.swatch:hover { transform: translateY(-2px); }

.swatch.is-active {
  box-shadow: 0 0 0 2px var(--ink), inset 0 0 0 1px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.swatch-name {
  margin-top: 12px;
  font-size: 13.5px;
  font-weight: 600;
}

.toggles { display: grid; gap: 12px; }

.toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 13.5px;
}

.toggle input { position: absolute; opacity: 0; pointer-events: none; }

.track {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: rgba(36, 31, 26, 0.16);
  position: relative;
  transition: background 0.2s;
  flex: none;
}

.dot {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s;
}

.toggle input:checked + .track { background: var(--accent); }
.toggle input:checked + .track .dot { transform: translateX(18px); }

.specs { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }

.specs li {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
}

.specs li:last-child { border-bottom: 0; padding-bottom: 0; }
.specs span { color: var(--muted); }

.panel-foot {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.price {
  display: block;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.note { display: block; font-size: 11.5px; color: var(--muted); }

.panel-foot .btn { padding: 12px 20px; }

/* ---------- нижние блоки ---------- */
.info,
.specs-section {
  position: relative;
  z-index: 10;
  padding: 90px clamp(20px, 6vw, 90px);
}

.info { background: linear-gradient(180deg, transparent, rgba(236, 229, 218, 0.94) 22%); }

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
  max-width: 1080px;
  margin: 0 auto;
}

.info-grid article {
  padding: 26px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.info-grid h3 { margin: 0 0 10px; font-size: 16px; }
.info-grid p { margin: 0; font-size: 14px; line-height: 1.6; color: #575047; }

.specs-section { max-width: 1080px; margin: 0 auto; }

.specs-section h2 {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 300;
  letter-spacing: -0.02em;
  margin: 0 0 26px;
}

.specs-section table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}

.specs-section td {
  padding: 15px 4px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.specs-section td:first-child { color: var(--muted); width: 220px; }

.foot {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 30px clamp(20px, 6vw, 90px) 44px;
  font-size: 12.5px;
  color: var(--muted);
}

/* ---------- уведомление ---------- */
.toast {
  position: fixed;
  z-index: 40;
  bottom: 26px;
  left: 50%;
  transform: translate(-50%, 20px);
  padding: 14px 24px;
  border-radius: 999px;
  background: var(--ink);
  color: #f8f4ee;
  font-size: 13.5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
}

.toast.is-shown { opacity: 1; transform: translate(-50%, 0); }

/* ---------- адаптив ---------- */
@media (max-width: 1080px) {
  .panel {
    position: static;
    width: auto;
    margin: 0 clamp(20px, 5vw, 60px) 40px;
  }
  .hero { padding-bottom: 10px; }
}

@media (max-width: 640px) {
  .topnav { display: none; }
  .hero h1 { font-size: 42px; }
  .lede { font-size: 15px; }
  .panel { margin: 0 16px 32px; padding: 20px; }
  .info, .specs-section { padding: 60px 20px; }
  .specs-section td:first-child { width: 130px; }
}
