/* ============================================================
   Softmatika — кастомные стили
   Здесь только то, что нецелесообразно выражать утилитами Tailwind:
   CSS-переменные тем, keyframes, анимационные утилиты,
   фоновое свечение (glow) и сетка с радиальной маской.
   ============================================================ */

:root {
  --accent: #6c5cff;
  --accent2: #22d3ee;
  --grid-line: rgba(16, 18, 27, 0.045);
}

html.dark {
  --grid-line: rgba(255, 255, 255, 0.025);
}

/* Сглаживание шрифтов */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ---------- Keyframes ---------- */
@keyframes sm-float1 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(5%, 7%) scale(1.12); } }
@keyframes sm-float2 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-6%, -5%) scale(1.1); } }
@keyframes sm-float3 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(4%, -6%) scale(0.92); } }
@keyframes sm-pulse  { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }
@keyframes sm-rise   { from { transform: translateY(18px); } to { transform: translateY(0); } }

/* ---------- Анимационные утилиты ---------- */
.anim-float1 { animation: sm-float1 14s ease-in-out infinite; }
.anim-float2 { animation: sm-float2 18s ease-in-out infinite; }
.anim-float3 { animation: sm-float3 16s ease-in-out infinite; }
.anim-pulse  { animation: sm-pulse 2.4s ease-in-out infinite; }
.anim-rise   { animation: sm-rise 0.7s ease both; }
.anim-rise.d1 { animation-delay: 0.06s; }
.anim-rise.d2 { animation-delay: 0.12s; }
.anim-rise.d3 { animation-delay: 0.18s; }
.anim-rise.d4 { animation-delay: 0.28s; }

/* ---------- Фоновое свечение (glow) ---------- */
.glow-blob {
  position: absolute;
  border-radius: 9999px;
  pointer-events: none;
}
.glow-accent  { background: radial-gradient(circle, var(--accent) 0%, transparent 62%); }
.glow-accent2 { background: radial-gradient(circle, var(--accent2) 0%, transparent 64%); }
.glow-accent-wide { background: radial-gradient(ellipse, var(--accent) 0%, transparent 65%); }
.glow-accent-top  { background: radial-gradient(ellipse 60% 100% at 50% 0%, var(--accent), transparent 70%); }

/* ---------- Сетка с радиальной маской ---------- */
.grid-bg {
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
}
.grid-bg.mask-top {
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 30%, #000 35%, transparent 78%);
  mask-image: radial-gradient(ellipse 75% 70% at 50% 30%, #000 35%, transparent 78%);
}
.grid-bg.mask-center {
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 50%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 70% at 50% 50%, #000 30%, transparent 75%);
}

/* Градиентный текст заголовка */
.text-gradient {
  background: linear-gradient(100deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Аватар-плашка в макете продукта */
.avatar-gradient {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
}

@media (prefers-reduced-motion: reduce) {
  .anim-float1, .anim-float2, .anim-float3, .anim-pulse, .anim-rise { animation: none !important; }
}
