*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--slate-700); text-decoration-color: var(--amber-500); text-underline-offset: 3px; text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--amber-500); outline-offset: 2px; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--space-2); }
.stack > * + * { margin-top: var(--space-2); }

/* Шапка и подвал */
.site-header { background: var(--white); border-bottom: 1px solid var(--slate-200); }
.brand { display: inline-flex; align-items: center; }
.brand img { display: block; height: 28px; width: auto; }
.brand .wm--dark { display: none; }
[data-theme="dark"] .brand .wm--light { display: none; }
[data-theme="dark"] .brand .wm--dark { display: block; }
.nav { display: flex; gap: var(--space-3); flex-wrap: nowrap; white-space: nowrap; line-height: 1.2; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.nav a:hover { text-decoration: underline; text-decoration-color: var(--amber-500); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.site-footer { margin-top: var(--space-5); padding: var(--space-4) 0; border-top: 1px solid var(--slate-200); color: var(--slate-500); font-size: 15px; }

/* Две точки: два индикатора включённого блока */
.dots { display: inline-flex; gap: 5px; align-items: center; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--amber-500); box-shadow: var(--glow); display: inline-block; }
.dot--wait { background: var(--slate-500); box-shadow: none; }
.dot--work { animation: pulse 1.4s ease-in-out infinite; }
.dot--done { background: var(--ok); box-shadow: 0 0 10px 2px rgba(47, 163, 107, 0.5); }
@keyframes pulse { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .dot--work { animation: none; } }

/* Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 var(--space-3); border-radius: var(--radius-s); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; border: 2px solid transparent; }
.btn--primary { background: var(--amber-500); color: var(--on-accent); }
.btn--ghost { background: transparent; color: var(--slate-700); border-color: var(--slate-700); }
.btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.btn-row { display: flex; gap: var(--space-2); flex-wrap: wrap; }

/* Карточки и плашки */
.card { background: var(--white); border: 1px solid var(--slate-200); border-radius: var(--radius-m); padding: var(--space-3); }
.note { background: var(--amber-100); border-radius: var(--radius-s); padding: var(--space-2); color: var(--ink); }

/* Заголовки: на сайте только три размера, шрифт Unbounded (широкий, поэтому размеры скромнее) */
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.01em; }
h1 { font-size: clamp(25px, 5.2vw, 42px); line-height: 1.15; margin: 0 0 var(--space-2); font-weight: 700; }
h2 { font-size: clamp(20px, 3.4vw, 28px); line-height: 1.22; margin: var(--space-4) 0 var(--space-2); font-weight: 700; }
h3 { font-size: 17px; line-height: 1.3; margin: var(--space-3) 0 var(--space-1); font-weight: 500; }
strong, b, th { font-weight: 600; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--slate-500); }

/* Формы */
label { display: block; font-weight: 600; margin-bottom: 6px; }
.field + .field { margin-top: var(--space-2); }
input[type="text"], input[type="tel"], select, textarea { width: 100%; min-height: 48px; padding: 10px 12px; font: inherit; color: var(--ink); background: var(--white); border: 1px solid var(--slate-500); border-radius: var(--radius-s); }
.hint { font-size: 14px; color: var(--slate-500); margin-top: 4px; }
.consent { display: flex; gap: 10px; align-items: flex-start; }
.consent input { margin-top: 5px; width: 20px; height: 20px; }

/* Витрина */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--space-2); }
.swatch { border: 1px solid var(--slate-200); border-radius: var(--radius-s); overflow: hidden; background: var(--white); }
.swatch__color { height: 64px; }
.swatch__meta { padding: 8px 10px; font-size: 14px; }
.hero { padding: var(--space-5) 0 var(--space-4); }
.hero .lead { font-size: 20px; max-width: 40ch; color: var(--slate-700); }


/* Витрина: логотипы и шрифты */
.logo-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-2); }
.logo-tile { background: var(--white); border: 1px solid var(--slate-200); border-radius: var(--radius-m); padding: var(--space-3); display: flex; flex-direction: column; gap: var(--space-1); align-items: flex-start; }
.logo-tile--paper { background: var(--paper); }
.logo-tile img { max-width: 100%; height: auto; }
.icons { display: flex; gap: var(--space-2); align-items: flex-end; }
.font-sample { display: grid; gap: var(--space-1); }

/* Фон из бегущего кода (codebg.js): холст на всю страницу под содержимым */
#codebg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.site-footer, .local-strip { position: relative; z-index: 1; }
main { position: relative; z-index: 1; }
.site-footer { background: var(--veil); }

/* Переключатель темы */
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: var(--ink); cursor: pointer; border-radius: var(--radius-s); }
.theme-toggle:hover { background: var(--slate-200); }
.theme-toggle svg { width: 22px; height: 22px; }

/* Мигающий курсор после слогана */
.cursor { display: inline-block; width: 0.5em; height: 0.82em; background: var(--amber-500); vertical-align: -0.06em; margin-left: 0.12em; animation: blink 1.05s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cursor { animation: none; } }
