/* =========================================================================
   ELEMENTPANEL — общий design-token слой для 3 вариантов лендинга.
   Один файл, три темы: базовые токены задаются здесь, а каждый вариант
   (catalog / index / showroom) переопределяет :root-переменные и шрифты
   в собственном inline <style>. Утилиты ниже читают только переменные.
   ========================================================================= */

:root {
  /* Тёплая палитра донора elementalpanel.ru */
  --ink:        #2a2724;
  --ink-soft:   #6b625a;
  --muted:      #9c948b;
  --bg:         #fffdf9;
  --surface:    #f6f2ec;
  --surface-2:  #efe8df;
  --border:     #e6ddd0;
  --accent:     #b86b3e;   /* медь / шпон */
  --accent-hover:#a15a30;
  --accent-soft:#f3e3d6;
  --sand:       #dec6a7;
  --taupe:      #726e61;
  --charcoal:   #1c1a17;
  --charcoal-2: #262220;
  --ok:         #2f8f57;
  --ok-soft:    #e3f2e8;
  --warn:       #b6822a;
  --warn-soft:  #f7ecd4;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(42,39,36,.05);
  --shadow-md: 0 6px 22px -8px rgba(42,39,36,.16);
  --shadow-lg: 0 20px 48px -16px rgba(42,39,36,.24);

  --font-body: 'Montserrat', system-ui, -apple-system, sans-serif;
  --font-head: 'Montserrat', system-ui, sans-serif;
  --head-transform: none;
  --head-spacing: -0.01em;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;           /* страховка от горизонтального скролла */
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; text-underline-offset: 3px; }

h1, h2, h3, h4, .font-head {
  font-family: var(--font-head);
  text-transform: var(--head-transform);
  letter-spacing: var(--head-spacing);
  line-height: 1.1;
  margin: 0;
}

/* ---------- Layout ---------- */
.container-x { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 20px; }
@media (min-width: 768px) { .container-x { padding-inline: 32px; } }
.section { padding: 56px 0; }
@media (min-width: 768px) { .section { padding: 88px 0; } }
.section-sm { padding: 40px 0; }
section[id] { scroll-margin-top: 84px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent);
}
.lead { color: var(--ink-soft); font-size: 1.0625rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 26px; border-radius: var(--radius-sm);
  font-family: var(--font-body); font-weight: 600; font-size: 15px; line-height: 1;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background-color .18s, color .18s, border-color .18s, transform .18s, box-shadow .18s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px -10px rgba(184,107,62,.7); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-dark { background: var(--charcoal); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-light { background: #fff; color: var(--ink); border-color: var(--border); }
.btn-light:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost-light { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.28); }
.btn-ghost-light:hover { background: rgba(255,255,255,.16); }
.btn-lg { padding: 17px 32px; font-size: 16px; }
.btn-sm { padding: 10px 18px; font-size: 14px; }
.btn-block { width: 100%; white-space: normal; line-height: 1.25; text-align: center; }
@media (max-width: 480px) {
  .btn-lg { padding: 15px 18px; font-size: 15px; }
}

/* ---------- Cards / chips ---------- */
.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.card-hover:hover { border-color: var(--sand); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 600; letter-spacing: .01em;
  background: var(--surface-2); color: var(--ink); border: 1px solid var(--border);
}
.chip-accent  { background: var(--accent-soft); color: var(--accent-hover); border-color: #e9cdb8; }
.chip-dark    { background: var(--charcoal); color: #fff; border-color: var(--charcoal); }
.chip-sand    { background: var(--sand); color: #5b4326; border-color: #d3b88f; }
.chip-success { background: var(--ok-soft); color: #1e6b3e; border-color: #bfe3cc; }
.chip-warning { background: var(--warn-soft); color: #8a5f13; border-color: #ecd8a8; }

/* ---------- Feature list (checkmarks) ---------- */
.feat { display: flex; align-items: flex-start; gap: 10px; }
.feat i, .feat svg { flex: 0 0 auto; color: var(--accent); width: 18px; height: 18px; margin-top: 2px; }

/* ---------- FAQ accordion (<details>) ---------- */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 20px 0; display: flex;
  align-items: center; justify-content: space-between; gap: 16px;
  font-weight: 600; font-size: 1.0625rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item .faq-body { padding: 0 0 20px; color: var(--ink-soft); max-width: 62ch; }
.faq-item .faq-sign { flex: 0 0 auto; transition: transform .2s; color: var(--accent); }
.faq-item[open] .faq-sign { transform: rotate(45deg); }

/* ---------- Quiz pills ---------- */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 16px; border-radius: var(--radius-pill);
  border: 1px solid var(--border); background: #fff; color: var(--ink);
  font-size: 14px; font-weight: 500; cursor: pointer; user-select: none;
  transition: border-color .16s, background-color .16s, color .16s;
}
.pill:hover { border-color: var(--accent); }
.pill.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.pill-swatch { padding-left: 10px; }
.pill-swatch .sw { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); }

/* ---------- Stepped quiz ---------- */
.quiz-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.quiz-count { font-size: 13px; font-weight: 700; color: var(--ink-soft); white-space: nowrap; }
.quiz-count b { color: var(--accent); }
.quiz-track { flex: 1; height: 6px; border-radius: 99px; background: rgba(0,0,0,.09); overflow: hidden; }
.quiz-fill { height: 100%; width: 20%; border-radius: 99px; background: var(--accent); transition: width .35s cubic-bezier(.4,0,.2,1); }
.quiz-q { display: block; font-size: 19px; font-weight: 700; color: var(--ink); margin-bottom: 14px; line-height: 1.3; }
[data-step] { animation: quizIn .28s ease; }
[data-step] .pill { padding: 13px 18px; font-size: 15px; }
@keyframes quizIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.quiz-back { display: inline-flex; align-items: center; gap: 5px; background: none; border: 0; cursor: pointer;
  color: var(--ink-soft); font-size: 13px; font-weight: 600; padding: 0; margin-bottom: 14px; }
.quiz-back:hover { color: var(--accent); }
@media (prefers-reduced-motion: reduce) { [data-step] { animation: none; } }

/* ---------- Form fields ---------- */
.field-label { display: block; font-size: 12px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--ink-soft); margin-bottom: 8px; }
.input {
  width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 13px 15px; font-family: var(--font-body); font-size: 15px; color: var(--ink);
  background: #fff; transition: border-color .16s, box-shadow .16s;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input::placeholder { color: var(--muted); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- Range slider ---------- */
input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 6px;
  background: var(--surface-2); border-radius: 999px; outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); cursor: pointer; border: 4px solid #fff; box-shadow: var(--shadow-md);
}
input[type="range"]::-moz-range-thumb {
  width: 24px; height: 24px; border-radius: 50%; background: var(--accent);
  cursor: pointer; border: 4px solid #fff; box-shadow: var(--shadow-md);
}

/* ---------- Lightbox ---------- */
.lb { position: fixed; inset: 0; z-index: 1200; display: none; align-items: center; justify-content: center;
  background: rgba(20,18,16,.94); padding: 24px; }
.lb.open { display: flex; animation: fade .2s ease; }
.lb img { max-width: 100%; max-height: 92vh; object-fit: contain; border-radius: 6px; }
.lb-btn { position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.06); color: #fff; font-size: 22px; cursor: pointer; display: flex;
  align-items: center; justify-content: center; transition: background .16s; }
.lb-btn:hover { background: rgba(255,255,255,.16); }
.lb-close { top: 20px; right: 20px; }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }

/* ---------- Thank-you / modal ---------- */
.modal-back { position: fixed; inset: 0; z-index: 1300; display: none; align-items: center; justify-content: center;
  padding: 20px; background: rgba(28,26,23,.55); backdrop-filter: blur(3px); }
.modal-back.open { display: flex; animation: fade .2s ease; }
.modal-card { background: #fff; border-radius: var(--radius-lg); max-width: 420px; width: 100%;
  padding: 34px 28px; text-align: center; box-shadow: var(--shadow-lg); animation: pop .28s cubic-bezier(.2,.8,.3,1); }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.97) } to { opacity: 1; transform: none } }
.modal-ic { width: 62px; height: 62px; border-radius: 50%; background: var(--ok-soft); color: var(--ok);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }

/* ---------- Floating chat (FAB) ---------- */
.fab-wrap { position: fixed; right: 18px; bottom: 18px; z-index: 900; display: flex; flex-direction: column-reverse; align-items: flex-end; gap: 12px; }
.fab {
  width: 58px; height: 58px; border-radius: 50%; background: var(--accent); color: #fff; border: none;
  box-shadow: var(--shadow-lg); cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: transform .18s, background .18s;
}
.fab:hover { background: var(--accent-hover); transform: scale(1.05); }
.fab-menu { display: none; flex-direction: column; gap: 10px; }
.fab-menu.open { display: flex; animation: fade .18s ease; }
.fab-item { width: 52px; height: 52px; border-radius: 50%; background: #fff; color: var(--ink);
  box-shadow: var(--shadow-md); display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); }
.fab-item:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Mobile sticky CTA ---------- */
.sticky-mob { position: fixed; left: 0; right: 0; bottom: 0; z-index: 850; padding: 10px 14px;
  background: rgba(255,253,249,.96); backdrop-filter: blur(8px); border-top: 1px solid var(--border);
  display: none; }
@media (max-width: 767px) { .sticky-mob { display: block; } .fab-wrap { bottom: 78px; } }

/* ---------- Before/After slider ---------- */
.ba { position: relative; overflow: hidden; border-radius: var(--radius-md); user-select: none; touch-action: none; }
.ba img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ba .ba-after { position: absolute; inset: 0; width: 50%; overflow: hidden; border-right: 2px solid #fff; }
.ba .ba-after img { width: 100vw; max-width: none; height: 100%; }
.ba .ba-handle { position: absolute; top: 0; bottom: 0; left: 50%; width: 40px; transform: translateX(-50%);
  cursor: ew-resize; display: flex; align-items: center; justify-content: center; }
.ba .ba-knob { width: 40px; height: 40px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-md);
  display: flex; align-items: center; justify-content: center; color: var(--accent); font-size: 18px; }
.ba .ba-tag { position: absolute; bottom: 12px; padding: 4px 10px; border-radius: 999px; font-size: 12px;
  font-weight: 600; background: rgba(28,26,23,.7); color: #fff; }

/* ---------- Utility ---------- */
.muted { color: var(--muted); }
.soft { color: var(--ink-soft); }
.grid-auto { display: grid; gap: 20px; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.aspect-square { aspect-ratio: 1 / 1; }
.aspect-photo { aspect-ratio: 4 / 5; }
.aspect-video { aspect-ratio: 16 / 9; }
.obj-cover { width: 100%; height: 100%; object-fit: cover; }
.divider { height: 1px; background: var(--border); border: 0; margin: 0; }
/* reveal-on-scroll — только когда JS активен (.js на <html>); без JS контент виден */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js [data-reveal].in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
