/* RGBee — база: сброс, типографика, сетка, общие компоненты (кнопки, метки, карточки). */

/* ---------- Сброс ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font: 400 var(--fs-body)/var(--lh-body) var(--font-sans);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--c-honey); color: var(--c-on-honey); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- Типографика ---------- */
h1, h2, h3, h4 { font-weight: 700; line-height: var(--lh-heading); letter-spacing: var(--ls-heading); text-wrap: balance; }
.h1 { font-size: var(--fs-h1); }
.h2 { font-size: var(--fs-h2); }
.h3 { font-size: var(--fs-h3); }
.lead { font-size: var(--fs-lead); color: var(--c-text-muted); max-width: 62ch; }
.muted { color: var(--c-text-muted); }
.small { font-size: var(--fs-small); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.eyebrow {
  font: 500 var(--fs-caption)/1.3 var(--font-mono);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--c-text-muted);
}
.price { font-family: var(--font-mono); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Сетка ---------- */
.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); background: var(--c-bg); color: var(--c-text); }
.section--surface { background: var(--c-surface); }
.section--graphite { background: var(--c-bg); color: var(--c-text); }
.section--tight { padding-block: calc(var(--section-y) * .6); }

.section-head { display: grid; gap: var(--sp-4); margin-bottom: var(--sp-12); max-width: 760px; }
.section-head--split {
  max-width: none; grid-template-columns: minmax(0, 1fr) minmax(0, auto); align-items: end; gap: var(--sp-6);
}
@media (max-width: 899px) { .section-head--split { grid-template-columns: 1fr; } }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: 48px; padding: var(--sp-3) var(--sp-6);
  border: 0; border-radius: var(--r-md);
  background: var(--c-btn); color: var(--c-btn-text);
  font-weight: 600; font-size: var(--fs-body); line-height: 1.2; text-decoration: none; text-align: center;
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.btn:hover { background: var(--c-btn-hover); }
.btn:active { transform: translateY(1px); }
.btn--honey { background: var(--c-honey); color: var(--c-on-honey); }
.btn--honey:hover { background: var(--c-honey-hover); }
.btn--ghost { background: transparent; color: var(--c-text); box-shadow: inset 0 0 0 1px var(--c-line-strong); }
.btn--ghost:hover { background: var(--c-surface-2); }
.btn--sm { min-height: 40px; padding: var(--sp-2) var(--sp-4); font-size: var(--fs-small); }
.btn--block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); }

/* Текстовая ссылка со стрелкой */
.link-arrow { display: inline-flex; align-items: center; gap: var(--sp-2); font-weight: 600; text-decoration: none; }
.link-arrow::after { content: "→"; transition: transform var(--dur) var(--ease); }
.link-arrow:hover::after { transform: translateX(3px); }

/* ---------- Метки каналов R · G · B ---------- */
.channel {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font: 500 var(--fs-caption)/1.2 var(--font-mono); letter-spacing: .04em; color: var(--c-text-muted);
}
.channel::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--channel, var(--c-text-faint)); flex: none; }
.channel--r { --channel: var(--c-r); }
.channel--g { --channel: var(--c-g); }
.channel--b { --channel: var(--c-b); }

/* ---------- Карточка ---------- */
.card {
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--r-lg);
  padding: clamp(var(--sp-5), 2.5vw, var(--sp-8)); min-width: 0;
}

/* ---------- Знак (inline SVG через <use href="#rgbee-mark">) ---------- */
.mark { display: block; width: var(--mark-size, 40px); height: auto; aspect-ratio: 60.56 / 64.5; }
.mark .m1 { fill: var(--c-mark-1); }
.mark .m2 { fill: var(--c-mark-2); }
.mark .m3 { fill: var(--c-mark-3); }
.mark .mh { fill: var(--c-honey); }

/* ---------- Служебное ---------- */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
/* Прототип: факт с текущего сайта, который нужно подтвердить у владельца (title = что именно проверить) */
.verify { text-decoration: underline dashed var(--c-honey); text-decoration-thickness: 2px; text-underline-offset: .25em; cursor: help; }
.placeholder-note {
  font: 500 var(--fs-caption)/1.4 var(--font-mono); color: var(--c-error);
  border: 1px dashed currentColor; border-radius: var(--r-sm); padding: var(--sp-1) var(--sp-2);
}

/* Прототип: переключатель пометок «уточнить» (в WordPress-теме не переносится) */
.proto-bar {
  position: fixed; right: var(--sp-4); bottom: calc(var(--sp-4) + env(safe-area-inset-bottom, 0px)); z-index: 60;
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--sp-2); max-width: calc(100vw - 2 * var(--sp-4));
}
.proto-bar__variants {
  display: flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--c-line-strong); border-radius: var(--r-pill);
  background: var(--c-surface); box-shadow: var(--shadow-pop); font: 500 var(--fs-caption)/1.2 var(--font-mono);
}
.proto-bar__variants span { padding-inline: var(--sp-2); color: var(--c-text-muted); }
.proto-bar__variants a { padding: var(--sp-2) var(--sp-3); border-radius: var(--r-pill); text-decoration: none; color: var(--c-text); white-space: nowrap; }
.proto-bar__variants a[aria-current="page"] { background: var(--c-text); color: var(--c-surface); }
.proto-toggle {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4); border: 1px solid var(--c-line-strong); border-radius: var(--r-pill);
  background: var(--c-surface); color: var(--c-text); box-shadow: var(--shadow-pop);
  font: 500 var(--fs-caption)/1.2 var(--font-mono);
}
.proto-toggle::before { content: ""; width: 14px; height: 0; border-top: 2px dashed var(--c-honey); }
.hide-verify .verify { text-decoration: none; cursor: auto; }
