/* ============================================================
   BASE — reset, типографика, каркас, фоновое свечение
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background var(--dur), color var(--dur);
}

body.no-scroll { overflow: hidden; }

img, svg, video { max-width: 100%; display: block; }
img { height: auto; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: var(--head-weight);
  letter-spacing: var(--head-tracking);
  line-height: 1.12;
  margin: 0;
  color: var(--text);
}
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; touch-action: manipulation; }
ul, ol { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--accent); color: var(--on-accent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- scrollbar ---------- */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; }

/* ============================================================
   ТИПОГРАФИЧЕСКАЯ ШКАЛА
   ============================================================ */
.h1 { font-size: clamp(30px, 6.4vw, 56px); }
.h2 { font-size: clamp(24px, 4.4vw, 40px); }
.h3 { font-size: clamp(19px, 2.4vw, 25px); }
.h4 { font-size: clamp(16px, 1.8vw, 19px); }

.lead {
  font-size: clamp(15px, 1.9vw, 19px);
  color: var(--text-dim);
  line-height: 1.62;
}
.body-dim { color: var(--text-dim); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; color: var(--text-mute); }

.mono {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: var(--text-mute);
}
[data-theme="neon"] .mono { letter-spacing: 1.5px; }

/* градиентный текст */
.grad-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
[data-theme="warm"] .grad-text { -webkit-text-fill-color: transparent; }

.num {
  font-family: var(--font-head);
  font-weight: var(--head-weight-hero);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.03em;
}

/* ============================================================
   КАРКАС
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section-y); position: relative; }
.section--alt { background: var(--bg-alt); }
.section-head { margin-bottom: clamp(24px, 4vw, 44px); }
.section-head .mono { display: block; margin-bottom: 12px; }
.section-head p { margin-top: 12px; max-width: 62ch; }

.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.wrap { flex-wrap: wrap; }
.gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-10 { gap: 10px; }
.gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; }
.gap-24 { gap: 24px; } .gap-32 { gap: 32px; }
.grow { flex: 1 1 auto; min-width: 0; }
.center { justify-content: center; }
.between { justify-content: space-between; }
.t-center { text-align: center; }
.mx-auto { margin-inline: auto; }
.mt-8{margin-top:8px}.mt-12{margin-top:12px}.mt-16{margin-top:16px}
.mt-24{margin-top:24px}.mt-32{margin-top:32px}.mt-40{margin-top:40px}
.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.grid { display: grid; gap: clamp(12px, 2vw, 20px); }
.grid-auto  { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid-auto-lg { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.grid-auto-sm { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-pain { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }

/* ============================================================
   ФОНОВОЕ СВЕЧЕНИЕ (дрейфующие пятна)
   ============================================================ */
.aura {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.aura span {
  position: absolute;
  width: clamp(280px, 46vw, 520px);
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(10px);
  will-change: transform;
}
.aura span:nth-child(1) {
  background: radial-gradient(circle, var(--aura-1), transparent 65%);
  top: -8%; right: -6%;
  animation: drift1 17s ease-in-out infinite;
}
.aura span:nth-child(2) {
  background: radial-gradient(circle, var(--aura-2), transparent 65%);
  bottom: 4%; left: -10%;
  animation: drift2 21s ease-in-out infinite;
}
.aura span:nth-child(3) {
  background: radial-gradient(circle, var(--aura-3), transparent 65%);
  top: 44%; left: 42%;
  animation: drift3 26s ease-in-out infinite;
}

@keyframes drift1 {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(-42px, 34px) scale(1.15); }
  100% { transform: translate(0, 0) scale(1); }
}
@keyframes drift2 {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(50px, -28px) scale(1.2); }
  100% { transform: translate(0, 0) scale(1); }
}
@keyframes drift3 {
  0%   { transform: translate(0, 0) scale(.95); }
  50%  { transform: translate(-30px, -40px) scale(1.1); }
  100% { transform: translate(0, 0) scale(.95); }
}

/* контент над фоном */
#app, .site-nav, .site-footer { position: relative; z-index: 1; }

/* ============================================================
   ПОЯВЛЕНИЕ ПРИ СКРОЛЛЕ
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .45s var(--ease), transform .45s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}
