/* Современный UI: анимированный фон, стекло, без npm — Tailwind через CDN в base.html */

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .page-bg__mesh,
  .page-bg__blob,
  .page-bg__shine,
  .page-bg__orb,
  .text-gradient-animated,
  .offer-glow-top {
    animation: none !important;
  }
  .monitor-bar,
  .monitor-scanline,
  .status-led {
    animation: none !important;
  }
  .animate-ping {
    animation: none !important;
  }
  .landing-hero__orb,
  .landing-hero__mesh,
  .landing-hero-in,
  .card-hover-rise {
    animation: none !important;
  }
  .js-reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ——— Глобальный анимированный фон ——— */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(165deg, #f8fafc 0%, #eef2ff 45%, #f0f9ff 100%);
}

.page-bg__mesh {
  position: absolute;
  inset: -40%;
  opacity: 0.85;
  background:
    radial-gradient(ellipse 70% 55% at 15% 25%, rgba(99, 102, 241, 0.22), transparent 55%),
    radial-gradient(ellipse 55% 45% at 85% 15%, rgba(14, 165, 233, 0.18), transparent 50%),
    radial-gradient(ellipse 50% 60% at 70% 85%, rgba(168, 85, 247, 0.14), transparent 55%),
    radial-gradient(ellipse 45% 40% at 25% 90%, rgba(59, 130, 246, 0.12), transparent 50%);
  animation: mesh-drift 22s ease-in-out infinite alternate;
}

@keyframes mesh-drift {
  0% {
    transform: translate(0, 0) scale(1) rotate(0deg);
  }
  100% {
    transform: translate(-4%, 2%) scale(1.05) rotate(6deg);
  }
}

.page-bg__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.55;
  mix-blend-mode: multiply;
  animation: blob-orbit 16s ease-in-out infinite;
}

.page-bg__blob--1 {
  width: min(90vw, 36rem);
  height: min(90vw, 36rem);
  background: linear-gradient(135deg, #60a5fa, #818cf8);
  top: -12%;
  left: -18%;
  animation-delay: 0s;
}

.page-bg__blob--2 {
  width: min(85vw, 32rem);
  height: min(85vw, 32rem);
  background: linear-gradient(145deg, #c084fc, #38bdf8);
  top: 35%;
  right: -20%;
  animation-delay: -5s;
  animation-duration: 19s;
}

.page-bg__blob--3 {
  width: min(80vw, 28rem);
  height: min(80vw, 28rem);
  background: linear-gradient(160deg, #34d399, #22d3ee);
  bottom: -15%;
  left: 20%;
  animation-delay: -9s;
  animation-duration: 21s;
}

@keyframes blob-orbit {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(4%, 6%) scale(1.08);
  }
  66% {
    transform: translate(-3%, 3%) scale(0.96);
  }
}

.page-bg__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.07) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 85% 65% at 50% 30%, black 15%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 85% 65% at 50% 30%, black 15%, transparent 70%);
}

.page-bg__shine {
  position: absolute;
  inset: -150% -50%;
  background: linear-gradient(
    115deg,
    transparent 42%,
    rgba(255, 255, 255, 0.55) 48%,
    rgba(255, 255, 255, 0.2) 52%,
    transparent 58%
  );
  animation: shine-sweep 28s ease-in-out infinite;
  opacity: 0.35;
}

@keyframes shine-sweep {
  0% {
    transform: translateX(-20%) translateY(10%) rotate(12deg);
  }
  50% {
    transform: translateX(15%) translateY(-5%) rotate(12deg);
  }
  100% {
    transform: translateX(-20%) translateY(10%) rotate(12deg);
  }
}

.page-bg__orb {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  margin: -160px 0 0 -160px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
  animation: orb-pulse 10s ease-in-out infinite;
}

@keyframes orb-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.25);
    opacity: 1;
  }
}

/* Контент поверх фона */
.site-content {
  position: relative;
  z-index: 1;
}

/* ——— Навигация и стекло ——— */
.glass-nav {
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.72);
  box-shadow:
    0 4px 24px rgba(15, 23, 42, 0.06),
    0 1px 0 rgba(255, 255, 255, 0.8) inset;
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
}

.glass-panel {
  border-radius: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.78);
  box-shadow:
    0 20px 40px -12px rgba(15, 23, 42, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.card-glass {
  border-radius: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 12px 40px -8px rgba(15, 23, 42, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.section-frost {
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.text-gradient {
  background: linear-gradient(120deg, #0f172a 0%, #2563eb 45%, #4f46e5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.text-gradient-animated {
  background: linear-gradient(
    95deg,
    #0f172a,
    #2563eb,
    #7c3aed,
    #0891b2,
    #2563eb,
    #0f172a
  );
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradient-flow 7s linear infinite;
}

@keyframes gradient-flow {
  to {
    background-position: 200% center;
  }
}

.monitor-glow {
  box-shadow:
    0 0 0 1px rgba(148, 163, 184, 0.2),
    0 28px 56px -12px rgba(15, 23, 42, 0.25),
    0 0 80px -20px rgba(59, 130, 246, 0.35);
}

.offer-glow-top {
  background: linear-gradient(90deg, #2563eb, #7c3aed, #06b6d4, #2563eb);
  background-size: 200% 100%;
  animation: offer-bar-flow 8s linear infinite;
}

@keyframes offer-bar-flow {
  to {
    background-position: 200% 0;
  }
}

@keyframes monitor-bar {
  0%,
  100% {
    transform: scaleY(0.35);
  }
  50% {
    transform: scaleY(1);
  }
}

@keyframes monitor-scan {
  0% {
    transform: translateY(-100%);
    opacity: 0;
  }
  15% {
    opacity: 0.35;
  }
  85% {
    opacity: 0.35;
  }
  100% {
    transform: translateY(100%);
    opacity: 0;
  }
}

@keyframes monitor-blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

.monitor-bar {
  transform-origin: bottom;
  animation: monitor-bar 2.4s ease-in-out infinite;
}

.monitor-bar:nth-child(1) {
  animation-delay: 0s;
}
.monitor-bar:nth-child(2) {
  animation-delay: 0.2s;
}
.monitor-bar:nth-child(3) {
  animation-delay: 0.4s;
}
.monitor-bar:nth-child(4) {
  animation-delay: 0.1s;
}
.monitor-bar:nth-child(5) {
  animation-delay: 0.35s;
}

.monitor-scanline {
  animation: monitor-scan 4s linear infinite;
}

.status-led {
  animation: monitor-blink 1.8s ease-in-out infinite;
}

.js-reveal {
  opacity: 0;
  transform: translateY(1.25rem);
  transition:
    opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.js-reveal.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.modal-surface {
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.92);
  box-shadow:
    0 25px 50px -12px rgba(15, 23, 42, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* ——— Интернет-магазин: минимализм, чёрные кнопки, градиентные акценты ——— */
.page-bg--shop {
  background: linear-gradient(165deg, #fafafa 0%, #ffffff 45%, #f4f4f5 100%);
}

.page-bg--shop .page-bg__blob {
  opacity: 0.2;
}

.page-bg--shop .page-bg__mesh {
  opacity: 0.4;
}

.btn-shop-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #0a0a0a 0%, #262626 55%, #171717 100%);
  color: #ffffff;
  font-weight: 600;
  transition:
    opacity 0.15s ease,
    transform 0.15s ease;
  box-shadow: 0 10px 25px -10px rgba(0, 0, 0, 0.35);
}

.btn-shop-primary:hover {
  opacity: 0.92;
}

.btn-shop-primary:focus-visible {
  outline: 2px solid #171717;
  outline-offset: 2px;
}

.btn-shop-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  border: 1px solid #171717;
  background: #ffffff;
  color: #171717;
  font-weight: 600;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.btn-shop-outline:hover {
  background: #171717;
  color: #ffffff;
}

.shop-input {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid #e5e5e5;
  background: #ffffff;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #171717;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.shop-input:focus {
  outline: none;
  border-color: #171717;
  box-shadow: 0 0 0 3px rgba(23, 23, 23, 0.08);
}

.shop-input--textarea {
  min-height: 6rem;
  resize: vertical;
}

.shop-hero-gradient {
  background: linear-gradient(135deg, #0f172a 0%, #312e81 42%, #5b21b6 100%);
}

/* ——— Лендинг: hero, карточки, акценты ——— */
.landing-hero {
  position: relative;
  isolation: isolate;
}

.landing-hero__mesh {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background:
    radial-gradient(ellipse 80% 50% at 20% 30%, rgba(129, 140, 248, 0.45), transparent 55%),
    radial-gradient(ellipse 60% 45% at 80% 70%, rgba(167, 139, 250, 0.35), transparent 50%);
  animation: landing-mesh-pulse 14s ease-in-out infinite alternate;
}

@keyframes landing-mesh-pulse {
  0% {
    opacity: 0.28;
    transform: scale(1);
  }
  100% {
    opacity: 0.42;
    transform: scale(1.03);
  }
}

.landing-hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(64px);
  pointer-events: none;
  animation: landing-orb-float 18s ease-in-out infinite;
}

.landing-hero__orb--1 {
  width: min(28rem, 70vw);
  height: min(28rem, 70vw);
  top: -15%;
  right: -10%;
  background: radial-gradient(circle at 30% 30%, rgba(96, 165, 250, 0.55), rgba(79, 70, 229, 0.25));
  animation-delay: 0s;
}

.landing-hero__orb--2 {
  width: min(22rem, 55vw);
  height: min(22rem, 55vw);
  bottom: -10%;
  left: -5%;
  background: radial-gradient(circle at 70% 60%, rgba(167, 139, 250, 0.5), rgba(91, 33, 182, 0.2));
  animation-delay: -6s;
  animation-duration: 22s;
}

@keyframes landing-orb-float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  40% {
    transform: translate(-3%, 4%) scale(1.06);
  }
  70% {
    transform: translate(2%, -2%) scale(0.98);
  }
}

@keyframes landing-fade-up {
  from {
    opacity: 0;
    transform: translateY(1.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.landing-hero-in {
  animation: landing-fade-up 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.landing-hero-in--1 {
  animation-delay: 0.05s;
}
.landing-hero-in--2 {
  animation-delay: 0.12s;
}
.landing-hero-in--3 {
  animation-delay: 0.2s;
}
.landing-hero-in--4 {
  animation-delay: 0.28s;
}
.landing-hero-in--5 {
  animation-delay: 0.36s;
}

.landing-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: 0.22em;
}

.landing-kicker::before {
  content: '';
  display: inline-block;
  width: 2rem;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.85));
}

.card-hover-rise {
  transition:
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.4s ease,
    border-color 0.3s ease;
}

.card-hover-rise:hover {
  transform: translateY(-6px);
  box-shadow:
    0 22px 40px -16px rgba(15, 23, 42, 0.18),
    0 0 0 1px rgba(99, 102, 241, 0.08);
}

.landing-section-title {
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #0a0a0a 0%, #334155 55%, #0f172a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.landing-glass-panel {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.landing-step-num {
  display: flex;
  height: 3rem;
  width: 3rem;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  font-size: 0.875rem;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 12px 28px -10px rgba(79, 70, 229, 0.55);
}

.landing-risk-card {
  position: relative;
  overflow: hidden;
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s ease;
}

.landing-risk-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.45), transparent 60%);
  transition: opacity 0.35s ease;
}

.landing-risk-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 36px -18px rgba(15, 23, 42, 0.2);
}

.landing-risk-card:hover::before {
  opacity: 0.12;
}

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.875rem;
  background: #ffffff;
  padding: 1rem 2rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: #0f172a;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.35);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
}

.btn-hero-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 48px -12px rgba(0, 0, 0, 0.4);
  background: #f8fafc;
}

.btn-hero-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.875rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  padding: 1rem 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  backdrop-filter: blur(8px);
  transition:
    transform 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease;
}

.btn-hero-ghost:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.55);
}
