/* ============================================================
   PRB — базовые стили и типографика
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: auto; } /* Lenis управляет плавностью сам */
body {
  margin: 0;
  background: var(--bg-page);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* фоновые декоративные фигуры немного выходят за секции */
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

::selection { background: var(--prb-lavender); color: var(--prb-accent-dark); }

a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible {
  outline: 2px solid var(--prb-primary);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text-heading);
  margin: 0;
  text-wrap: balance;
}

h1 { font-weight: 700; font-size: clamp(32px, 3.6vw, 48px); line-height: 1.12; letter-spacing: -0.02em; }
h2 { font-weight: 700; font-size: clamp(26px, 3.2vw, 38px); line-height: 1.15; letter-spacing: -0.01em; }
h3 { font-weight: 600; font-size: clamp(19px, 2vw, 22px); line-height: 1.3; }

p { margin: 0; max-width: 62ch; }
.lede { font-size: clamp(17px, 1.6vw, 19px); color: var(--text-muted); max-width: 56ch; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--prb-accent-dark);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
}
.eyebrow::before {
  content: "";
  width: 16px;
  height: 1.5px;
  background: var(--prb-accent-dark);
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}

.section {
  padding: clamp(64px, 9vw, 108px) 0;
}
.section--tint { background: var(--bg-lavender); }
.section--ink { background: var(--bg-ink); color: #ede9f7; }
.section--ink h1, .section--ink h2, .section--ink h3 { color: #ffffff; }
.section--ink .eyebrow { color: var(--prb-accent-blue); }
.section--ink .eyebrow::before { background: var(--prb-accent-blue); }
.section--ink p:not(.lede-strong) { color: #b8b0d4; }

.stack { display: flex; flex-direction: column; }
.gap-sm { gap: 12px; }
.gap-md { gap: 20px; }
.gap-lg { gap: 32px; }

.grid { display: grid; gap: 20px; }

@media (max-width: 860px) {
  .section { padding: clamp(48px, 12vw, 72px) 0; }
}

/* ---- Двухколоночные блоки, схлопывающиеся на мобильном ---- */
.hero-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 48px; align-items: center; }
.detail-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; align-items: center; }
.cta-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: start; }
@media (max-width: 860px) {
  .hero-grid, .detail-grid, .cta-grid { grid-template-columns: 1fr; }
  .hero-grid { gap: 36px; }
}

/* ---- Кнопки ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 13px 24px;
  border-radius: 100px;
  border: none;
  transition: transform 180ms var(--ease-out), box-shadow 180ms var(--ease-out), background 180ms var(--ease-out);
  white-space: nowrap;
}
.btn-primary {
  position: relative;
  z-index: 0;
  overflow: hidden;
  background: var(--prb-primary);
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(134, 59, 255, 0.55);
}
.btn-primary:hover { background: var(--prb-primary-hover); transform: translateY(-1px); box-shadow: 0 12px 26px -8px rgba(134, 59, 255, 0.6); }
/* Пульс внутри кнопки — по образцу rechka.ai: диск раздувается из центра
   и гаснет, обрезан силуэтом самой кнопки (overflow:hidden), не мешает
   тексту (z-index:-1 внутри собственного стекового контекста кнопки). */
.btn-primary::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 220%; height: 480%;
  z-index: -1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%) scale(0);
  animation: btn-ripple 2.4s ease-out infinite;
  pointer-events: none;
}
@keyframes btn-ripple {
  0% { opacity: 0.55; transform: translate(-50%, -50%) scale(0); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
}
.btn-ghost {
  background: transparent;
  color: var(--text-heading);
  border: 1.5px solid var(--border-soft);
}
.btn-ghost:hover { border-color: var(--prb-primary); color: var(--prb-primary); }
.section--ink .btn-ghost { border-color: #3c3555; color: #ede9f7; }
.section--ink .btn-ghost:hover { border-color: var(--prb-accent-blue); color: var(--prb-accent-blue); }

/* ---- Карточки (плоские, без теней — приём Ponder Digital) ---- */
.flat-card {
  background: var(--bg-tint);
  border-radius: var(--radius-md);
  padding: 22px 24px;
}
.raised-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 26px 28px;
  transition: box-shadow 220ms var(--ease-out), transform 220ms var(--ease-out);
}

/* ---- Скрин-для-незрячих ---- */
.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;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* ============================================================
   Фоновые дрейфующие пятна (по образцу rechka.ai — там растровая
   текстура + CSS-анимация translate/rotate; у нас без внешних
   ассетов, тот же дрейф, но заливка радиальным градиентом + blur).
   Применяется структурно (первая секция страницы = hero, и любая
   тёмная секция) — работает на всех страницах без правки HTML.
   ============================================================ */
main > section:first-child,
.section--ink {
  position: relative;
  z-index: 0;
}
main > section:first-child::before,
.section--ink::before {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  animation: blob-drift 22s ease-in-out infinite alternate;
}
main > section:first-child::before {
  width: 620px; height: 620px;
  top: -240px; right: -180px;
  background: radial-gradient(circle, rgba(134, 59, 255, 0.24), rgba(134, 59, 255, 0) 70%);
}
.section--ink::before {
  width: 520px; height: 520px;
  bottom: -220px; left: -160px;
  background: radial-gradient(circle, rgba(71, 191, 255, 0.22), rgba(71, 191, 255, 0) 70%);
  animation-delay: -8s;
}
@keyframes blob-drift {
  0%   { transform: translate(0, 0) rotate(0deg) scale(1); }
  50%  { transform: translate(38px, -46px) rotate(9deg) scale(1.08); }
  100% { transform: translate(-28px, 30px) rotate(-7deg) scale(0.95); }
}
@media (max-width: 760px) {
  main > section:first-child::before, .section--ink::before { width: 340px; height: 340px; filter: blur(56px); }
}
