/* ===== ROCKSTONES SRM LANDING 2026 — B2B SaaS ===== */
/* Hero buttons: contrast +18%, saturation 125%, bloom on icons, dark/light */

/* ============================================================
   WELCOME PAGE: dark geometric background — pill shapes style
   (как на скриншоте: тёмный #030303, floating pills, glow)
   Только body.page-welcome — не влияет на другие страницы.
   ============================================================ */
body.page-welcome {
  background-color: #030712;
  color: #f8fafc;
}

/* Фиксированный контейнер фигур: z-index=-1, не перекрывает контент */
#welcome-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

/* Тонкий шум поверх фона для глубины */
.bg-noise {
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  opacity: 0.4;
}

/* Мягкие цветовые пятна фона */
.bg-glow-indigo {
  position: absolute;
  top: 0; left: 0;
  width: 70%; height: 70%;
  background: radial-gradient(ellipse at 30% 20%, rgba(99, 102, 241, 0.07) 0%, transparent 60%);
}
.bg-glow-rose {
  position: absolute;
  bottom: 0; right: 0;
  width: 70%; height: 70%;
  background: radial-gradient(ellipse at 70% 80%, rgba(244, 63, 94, 0.06) 0%, transparent 60%);
}

/* === PILL базовый стиль === */
.pill {
  position: absolute;
  border-radius: 9999px;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border: 1.5px solid rgba(255, 255, 255, 0.13);
  box-shadow: 0 8px 32px 0 rgba(255, 255, 255, 0.06);
}
/* Псевдоэлемент — внутренний radial glow */
.pill::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.18), transparent 70%);
}

/* === Размеры, позиции, цвета и поворот каждой пилюли === */
.pill-1 {
  width: min(580px, 55vw); height: min(136px, 10vw);
  left: -8%; top: 18%;
  transform: rotate(12deg);
  background: linear-gradient(to right, rgba(99, 102, 241, 0.18), transparent);
  animation: pill-entrance 2.4s cubic-bezier(0.23, 0.86, 0.39, 0.96) 0.3s both,
             pill-float 12s ease-in-out 2.7s infinite;
}
.pill-2 {
  width: min(480px, 45vw); height: min(116px, 9vw);
  right: -4%; top: 68%;
  transform: rotate(-15deg);
  background: linear-gradient(to right, rgba(244, 63, 94, 0.18), transparent);
  animation: pill-entrance 2.4s cubic-bezier(0.23, 0.86, 0.39, 0.96) 0.5s both,
             pill-float-alt 14s ease-in-out 2.9s infinite;
}
.pill-3 {
  width: min(300px, 30vw); height: min(80px, 7vw);
  left: 8%; bottom: 12%;
  transform: rotate(-8deg);
  background: linear-gradient(to right, rgba(139, 92, 246, 0.18), transparent);
  animation: pill-entrance 2.4s cubic-bezier(0.23, 0.86, 0.39, 0.96) 0.4s both,
             pill-float 16s ease-in-out 2.8s infinite;
}
.pill-4 {
  width: min(200px, 22vw); height: min(60px, 6vw);
  right: 18%; top: 12%;
  transform: rotate(20deg);
  background: linear-gradient(to right, rgba(251, 191, 36, 0.15), transparent);
  animation: pill-entrance 2.4s cubic-bezier(0.23, 0.86, 0.39, 0.96) 0.6s both,
             pill-float-alt 10s ease-in-out 3.0s infinite;
}
.pill-5 {
  width: min(150px, 18vw); height: min(44px, 5vw);
  left: 24%; top: 8%;
  transform: rotate(-25deg);
  background: linear-gradient(to right, rgba(6, 182, 212, 0.15), transparent);
  animation: pill-entrance 2.4s cubic-bezier(0.23, 0.86, 0.39, 0.96) 0.7s both,
             pill-float 13s ease-in-out 3.1s infinite;
}

/* === Анимации === */
/* Вход: падает сверху (y: -150px → 0) + fade in */
@keyframes pill-entrance {
  from {
    opacity: 0;
    transform: translateY(-150px) rotate(inherit);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(inherit);
  }
}

/* Плавное парение вверх-вниз (15px), как framer-motion у оригинала */
@keyframes pill-float {
  0%, 100% { translate: 0 0px; }
  50%       { translate: 0 15px; }
}
@keyframes pill-float-alt {
  0%, 100% { translate: 0 0px; }
  50%       { translate: 0 -15px; }
}

/* Верхний/нижний затемняющий градиент (как в оригинале) */
body.page-welcome::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(3, 7, 18, 0.8) 0%,
    transparent 20%,
    transparent 75%,
    rgba(3, 7, 18, 0.85) 100%
  );
}

/* Элементы поверх тёмного фона: гарантируем читаемость */
body.page-welcome .text-gray-900,
body.page-welcome .text-slate-900 { color: #f1f5f9; }
body.page-welcome .text-gray-600,
body.page-welcome .text-slate-600 { color: #94a3b8; }
body.page-welcome .text-gray-400,
body.page-welcome .text-slate-400 { color: #64748b; }
body.page-welcome .text-gray-500 { color: #94a3b8; }

/* ========== Единый современный стиль карточек на тёмном фоне ========== */
body.page-welcome .glass-card {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.25rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.25s ease;
}
body.page-welcome .glass-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}
body.page-welcome .glass-panel {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.25rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}
body.page-welcome .trust-metric {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.25rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}
body.page-welcome .trust-metric:hover {
  border-color: rgba(14, 165, 233, 0.35);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18), 0 0 24px rgba(14, 165, 233, 0.12);
}
body.page-welcome .trust-bar-bg {
  background: linear-gradient(135deg, rgba(3, 7, 18, 0.4) 0%, rgba(7, 89, 133, 0.12) 50%, rgba(3, 7, 18, 0.4) 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

body.page-welcome #faq .faq-item {
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}
body.page-welcome #faq .faq-item summary {
  padding: 1rem 1.25rem;
}
body.page-welcome #faq .faq-item summary:hover {
  background: rgba(255, 255, 255, 0.04);
}
body.page-welcome #faq .faq-item[open] summary {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
body.page-welcome #faq .faq-item > div {
  padding: 0 1.25rem 1rem;
  border-top: none;
}

body.page-welcome .cta-gradient-hover {
  border-radius: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}
body.page-welcome .cta-gradient-hover:hover {
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25), 0 0 32px rgba(14, 165, 233, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

@media (prefers-reduced-motion: reduce) {
  .pill { animation: pill-entrance 0.5s ease both; }
  body.page-welcome::before { content: none; }
}

:root {
  --spring: cubic-bezier(0.22, 1, 0.36, 1.2);
  --spring-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --landing-contrast: 1.22;
  --landing-vibrance: 1.25;
  --hero-icon-contrast: 1.18;
  --hero-icon-saturate: 1.25;
}

/* ---- Nav: right-aligned, gap-4, mobile stack vertical ---- */
.nav-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
}

@media (min-width: 640px) {
  .nav-actions {
    flex-direction: row;
    align-items: center;
    margin-left: auto;
  }
}

/* ---- Hero / Nav buttons: Возможности (primary) + Начать работу (outline) ---- */
.btn-hero {
  transition: transform 0.3s ease-out, box-shadow 0.3s ease-out, background-color 0.3s ease-out, color 0.3s ease-out, border-color 0.3s ease-out;
}

.btn-hero .hero-btn-icon {
  display: inline-flex;
  align-items: center;
  transition: transform 0.3s ease-out;
  filter: contrast(var(--hero-icon-contrast)) saturate(var(--hero-icon-saturate));
}

.btn-hero:hover .hero-btn-icon {
  transform: rotate(6deg);
  animation: hero-icon-pulse 1.2s ease-in-out infinite;
}

.btn-hero:active {
  transform: scale(0.98);
}

@keyframes hero-icon-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}

/* Возможности — primary cyan #0ea5e9, white text, hover scale 1.05 + glow + translateY(-2px) */
.btn-hero-primary,
.btn-hero-primary-nav {
  background-color: #0ea5e9;
  color: #fff;
  box-shadow: 0 0 0 0 rgba(56, 189, 248, 0);
}

.btn-hero-primary:hover,
.btn-hero-primary-nav:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
}

.btn-hero-primary:active,
.btn-hero-primary-nav:active {
  transform: scale(0.98);
}

.btn-hero-primary:hover:active,
.btn-hero-primary-nav:hover:active {
  transform: translateY(-2px) scale(0.98);
}

.dark .btn-hero-primary,
.dark .btn-hero-primary-nav {
  background-color: #0ea5e9;
  color: #fff;
}

.dark .btn-hero-primary:hover,
.dark .btn-hero-primary-nav:hover {
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.55);
}

/* Subtle bloom on primary button icons */
.btn-hero-primary .hero-btn-icon,
.btn-hero-primary-nav .hero-btn-icon {
  filter: contrast(var(--hero-icon-contrast)) saturate(var(--hero-icon-saturate)) drop-shadow(0 0 6px rgba(255, 255, 255, 0.35));
}

.dark .btn-hero-primary .hero-btn-icon,
.dark .btn-hero-primary-nav .hero-btn-icon {
  filter: contrast(var(--hero-icon-contrast)) saturate(var(--hero-icon-saturate)) drop-shadow(0 0 8px rgba(255, 255, 255, 0.25));
}

/* Начать работу — dark gradient bg, white text, rounded, hover scale + glow (same micro-animations) */
.btn-hero-cta,
.btn-hero-cta-nav {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 50%, #0c4a6e 100%);
  color: #fff;
  border: none;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

.btn-hero-cta:hover,
.btn-hero-cta-nav:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.5), 0 6px 20px rgba(2, 132, 199, 0.4);
}

.btn-hero-cta:active,
.btn-hero-cta-nav:active {
  transform: scale(0.98);
}

.btn-hero-cta:hover:active,
.btn-hero-cta-nav:hover:active {
  transform: translateY(-2px) scale(0.98);
}

.dark .btn-hero-cta,
.dark .btn-hero-cta-nav {
  background: linear-gradient(135deg, #0369a1 0%, #075985 50%, #0c4a6e 100%);
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.25);
}

.dark .btn-hero-cta:hover,
.dark .btn-hero-cta-nav:hover {
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.5), 0 6px 24px rgba(0, 0, 0, 0.3);
}

.btn-hero-cta .hero-btn-icon,
.btn-hero-cta-nav .hero-btn-icon {
  filter: contrast(var(--hero-icon-contrast)) saturate(var(--hero-icon-saturate)) drop-shadow(0 0 6px rgba(255, 255, 255, 0.3));
}

.dark .btn-hero-cta .hero-btn-icon,
.dark .btn-hero-cta-nav .hero-btn-icon {
  filter: contrast(var(--hero-icon-contrast)) saturate(var(--hero-icon-saturate)) drop-shadow(0 0 8px rgba(255, 255, 255, 0.2));
}

/* Возможности в nav — outline (в hero — primary cyan) */
.btn-hero-outline,
.btn-hero-outline-nav {
  border: 2px solid rgb(14, 165, 233);
  color: rgb(2, 132, 199);
  background: transparent;
}

.btn-hero-outline:hover,
.btn-hero-outline-nav:hover {
  background: rgba(224, 242, 254, 0.8);
  color: #fff;
  border-color: rgb(14, 165, 233);
  transform: translateY(-2px);
}

.btn-hero-outline:active,
.btn-hero-outline-nav:active {
  transform: scale(0.98);
}

.btn-hero-outline:hover:active,
.btn-hero-outline-nav:hover:active {
  transform: translateY(-2px) scale(0.98);
}

.dark .btn-hero-outline,
.dark .btn-hero-outline-nav {
  border-color: rgb(56, 189, 248);
  color: rgb(56, 189, 248);
}

.dark .btn-hero-outline:hover,
.dark .btn-hero-outline-nav:hover {
  background: rgba(14, 165, 233, 0.85);
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .btn-hero { transition: none; }
  .btn-hero:hover .hero-btn-icon { animation: none; transform: none; }
  .btn-hero:hover { transform: none; }
  .btn-hero:active { transform: none; }
}

/* ---- Scroll-triggered fade-up stagger (sections) ---- */
.landing-section {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--spring), transform 0.7s var(--spring);
}

.landing-section.visible {
  opacity: 1;
  transform: translateY(0);
}

.landing-section.visible .stagger-1 { transition-delay: 0ms; }
.landing-section.visible .stagger-2 { transition-delay: 80ms; }
.landing-section.visible .stagger-3 { transition-delay: 160ms; }
.landing-section.visible .stagger-4 { transition-delay: 240ms; }
.landing-section.visible .stagger-5 { transition-delay: 320ms; }

@media (prefers-reduced-motion: reduce) {
  .landing-section { opacity: 1; transform: none; transition: none; }
}

/* ---- Before/After: dark blue gradient, top line flush, glass cards, stagger + hover ---- */
.before-after-block {
  position: relative;
  overflow: hidden;
}

.before-after-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #0c4a6e 0%, #075985 50%, #0369a1 100%);
  z-index: 0;
}

.dark .before-after-bg {
  background: linear-gradient(180deg, #0c4a6e 0%, #075985 60%, #0f172a 100%);
}

/* Верхняя полоска: вровень с секцией, без выхода вверх */
.before-after-top-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
  z-index: 1;
  pointer-events: none;
}

/* Stagger fade-in слева направо, 300ms между карточками */
.before-after-card {
  opacity: 0;
  transform: translateX(-20px);
  transition: transform 0.4s var(--spring), box-shadow 0.35s ease, border-color 0.3s ease;
}

#before-after.before-after-visible .before-after-card-left {
  animation: before-after-fade-in 0.5s ease-out forwards;
  animation-delay: 0ms;
}

#before-after.before-after-visible .before-after-card-right {
  animation: before-after-fade-in 0.5s ease-out forwards;
  animation-delay: 300ms;
}

@keyframes before-after-fade-in {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Карточки: новый фон — плотные панели с цветным акцентом */
.before-after-card {
  padding: 2rem;
  border-radius: 1.25rem;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  transition: transform 0.35s var(--spring), box-shadow 0.35s ease;
}

@media (min-width: 768px) {
  .before-after-card { padding: 2.5rem; }
}

/* Левая карточка: тёмная панель + красная полоска сверху */
.before-after-card-left {
  background: linear-gradient(180deg, rgba(45, 30, 35, 0.98) 0%, rgba(25, 18, 22, 0.98) 100%);
  border-color: rgba(248, 113, 113, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.before-after-card-left::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, rgba(248, 113, 113, 0.9) 0%, rgba(239, 68, 68, 0.6) 100%);
}

.before-after-card-left:hover {
  transform: scale(1.02);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35), 0 0 24px rgba(248, 113, 113, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  border-color: rgba(248, 113, 113, 0.35);
}

/* Правая карточка: тёмная панель + cyan полоска сверху */
.before-after-card-right {
  background: linear-gradient(180deg, rgba(25, 40, 55, 0.98) 0%, rgba(15, 28, 42, 0.98) 100%);
  border-color: rgba(56, 189, 248, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.before-after-card-right::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.9) 0%, rgba(14, 165, 233, 0.6) 100%);
}

.before-after-card-right:hover {
  transform: scale(1.02);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35), 0 0 24px rgba(14, 165, 233, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  border-color: rgba(56, 189, 248, 0.35);
}

/* Список: slide-in слева + иконка pulse при hover карточки */
.before-after-list-item {
  opacity: 1;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.before-after-list-item .before-after-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  transition: transform 0.2s ease;
}

.before-after-card:hover .before-after-list-item {
  animation: before-after-item-slide 0.2s ease-out backwards;
}

.before-after-card:hover .before-after-list-item:nth-child(1) { animation-delay: 0ms; }
.before-after-card:hover .before-after-list-item:nth-child(2) { animation-delay: 50ms; }
.before-after-card:hover .before-after-list-item:nth-child(3) { animation-delay: 100ms; }

@keyframes before-after-item-slide {
  from { transform: translateX(-8px); opacity: 0.7; }
  to { transform: translateX(0); opacity: 1; }
}

.before-after-card:hover .before-after-icon {
  animation: before-after-icon-pulse 0.5s ease-in-out;
}

@keyframes before-after-icon-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

@media (prefers-reduced-motion: reduce) {
  .before-after-card { opacity: 1; transform: none; animation: none; }
  #before-after.before-after-visible .before-after-card { animation: none; opacity: 1; transform: none; }
  .before-after-card:hover { transform: scale(1.01); }
  .before-after-card:hover .before-after-list-item { animation: none; }
  .before-after-card:hover .before-after-icon { animation: none; }
}

/* Light mode: секция всё равно тёмная, заголовки остаются светлыми */
.before-after-block h2,
.before-after-block .text-white\\/80 {
  position: relative;
  z-index: 1;
}

/* ---- Glassmorphism base ---- */
.glass-panel {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
  border-radius: 1.25rem;
}

.dark .glass-panel {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

/* ---- Nav glass (legacy, другие страницы) ---- */
.nav-glass {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.dark .nav-glass {
  background: rgba(15, 23, 42, 0.85);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

/* ========== Welcome page: Header (modern dark glass) ========== */
.header-welcome {
  background: rgba(3, 7, 18, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

.header-welcome.scrolled {
  background: rgba(3, 7, 18, 0.82);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.header-inner {
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

@media (min-width: 640px) {
  .header-inner { padding: 0 1.5rem; }
}

@media (min-width: 1024px) {
  .header-inner { padding: 0 2rem; }
}

.header-logo {
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s ease;
}

.header-logo:hover {
  opacity: 0.9;
}

.header-logo-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #0ea5e9 0%, #0369a1 100%);
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.header-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.header-link {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  border-radius: 0.5rem;
  transition: color 0.2s ease, background 0.2s ease;
}

.header-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.header-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  margin-left: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  border-radius: 0.5rem;
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(14, 165, 233, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.header-cta:hover {
  box-shadow: 0 4px 20px rgba(14, 165, 233, 0.45);
  opacity: 0.95;
}

.header-cta:active {
  transform: scale(0.98);
}

/* ========== Welcome page: Footer (modern dark glass) ========== */
.footer-welcome {
  background: rgba(3, 7, 18, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-inner {
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding: 3rem 1rem 2rem;
}

@media (min-width: 640px) {
  .footer-inner { padding-left: 1.5rem; padding-right: 1.5rem; }
}

@media (min-width: 1024px) {
  .footer-inner { padding: 4rem 2rem 2.5rem; }
}

.footer-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 3rem;
  }
}

.footer-brand {
  grid-column: 1 / -1;
}

@media (min-width: 640px) {
  .footer-brand { grid-column: auto; }
}

.footer-logo-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, #0ea5e9 0%, #0369a1 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.footer-heading {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 1rem;
}

.footer-link {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: #fff;
}

.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

@media (min-width: 1024px) {
  .footer-bottom { margin-top: 3rem; padding-top: 2rem; }
}

/* ---- CTA pulse (subtle) ---- */
.cta-pulse {
  animation: cta-pulse 2.5s ease-in-out infinite;
}

@keyframes cta-pulse {
  0%, 100% { box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35); }
  50% { box-shadow: 0 4px 20px rgba(2, 132, 199, 0.5); }
}

.dark .cta-pulse {
  animation: cta-pulse-dark 2.5s ease-in-out infinite;
}

@keyframes cta-pulse-dark {
  0%, 100% { box-shadow: 0 4px 14px rgba(56, 189, 248, 0.25); }
  50% { box-shadow: 0 4px 22px rgba(56, 189, 248, 0.4); }
}

@media (prefers-reduced-motion: reduce) {
  .cta-pulse { animation: none; }
}

/* ---- Trust bar: градиентный фон, карточки метрик ---- */
.trust-bar {
  position: relative;
  overflow: hidden;
}

.trust-bar-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(241, 245, 249, 0.95) 0%, rgba(226, 232, 240, 0.9) 50%, rgba(248, 250, 252, 0.95) 100%);
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.dark .trust-bar-bg {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.97) 0%, rgba(30, 41, 59, 0.95) 50%, rgba(15, 23, 42, 0.97) 100%);
  border-top-color: rgba(71, 85, 105, 0.4);
  border-bottom-color: rgba(71, 85, 105, 0.4);
}

.trust-bar-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 50%, rgba(14, 165, 233, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

.dark .trust-bar-bg::before {
  background: radial-gradient(ellipse 80% 60% at 50% 50%, rgba(14, 165, 233, 0.08) 0%, transparent 60%);
}

.trust-metric {
  transition: transform 0.35s var(--spring), box-shadow 0.3s ease, border-color 0.3s ease, color 0.2s ease;
}

.trust-metric:hover {
  transform: scale(1.04) translateY(-2px);
}

/* ---- Feature cards: glass + appear + icon animations ---- */
.glass-card {
  border-radius: 1.25rem;
  border: 1px solid rgba(226, 232, 240, 0.8);
  padding: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.25s ease, background 0.25s ease;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transform: scale(0.92);
  opacity: 0;
}

#features.features-visible .glass-card {
  animation: feature-card-appear 0.65s var(--spring) forwards;
}

#features.features-visible .glass-card:nth-child(1) { animation-delay: 0ms; }
#features.features-visible .glass-card:nth-child(2) { animation-delay: 120ms; }
#features.features-visible .glass-card:nth-child(3) { animation-delay: 240ms; }
#features.features-visible .glass-card:nth-child(4) { animation-delay: 360ms; }

@keyframes feature-card-appear {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

.dark .glass-card {
  background: rgba(30, 41, 59, 0.75);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

/* Icon wrap: color correction (contrast +22%, vibrance +25%) + hover spring */
.feature-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  overflow: hidden;
  transition: transform 0.5s var(--spring), box-shadow 0.35s ease, background 0.4s ease;
  filter: contrast(var(--landing-contrast)) saturate(var(--landing-vibrance)) brightness(1.05);
}

.feature-icon-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0.5px 0 0 rgba(14, 165, 233, 0.12), inset -0.5px 0 0 rgba(236, 72, 153, 0.08);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.dark .feature-icon-wrap::before {
  box-shadow: inset 0.5px 0 0 rgba(255,255,255,0.06), inset -0.5px 0 0 rgba(255,255,255,0.04);
}

.group:hover .feature-icon-wrap::before {
  opacity: 1;
}

.group:hover .feature-icon-wrap {
  transform: translateY(-4px) scale(1.12);
  animation: feature-hover-overshoot 0.6s var(--spring) forwards;
}

@keyframes feature-hover-overshoot {
  0% { transform: translateY(-4px) scale(1.12); }
  55% { transform: translateY(-5px) scale(1.18); }
  100% { transform: translateY(-4px) scale(1.12); }
}

/* 1. Склад (cyan) — drop-bounce */
.feature-icon-1 {
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
}

.group:hover .feature-icon-1 {
  background: linear-gradient(135deg, rgba(224, 242, 254, 0.9) 0%, rgba(186, 230, 253, 0.85) 100%);
}

.dark .feature-icon-1 {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.25) 0%, rgba(2, 132, 199, 0.2) 100%);
}

.group:hover .feature-icon-1 svg {
  animation: feature-boxes-drop-bounce 0.8s var(--spring-bounce) 1;
}

@keyframes feature-boxes-drop-bounce {
  0% { transform: translateY(0) scale(1); }
  25% { transform: translateY(3px) scale(1.02); }
  45% { transform: translateY(-2px) scale(0.98); }
  65% { transform: translateY(1px) scale(1.01); }
  100% { transform: translateY(0) scale(1); }
}

/* 2. Продажи (green) — fold-unfold overshoot */
.feature-icon-2 {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
}

.group:hover .feature-icon-2 {
  background: linear-gradient(135deg, rgba(220, 252, 231, 0.9) 0%, rgba(187, 247, 208, 0.85) 100%);
}

.dark .feature-icon-2 {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.25) 0%, rgba(22, 163, 74, 0.2) 100%);
}

.group:hover .feature-icon-2 svg {
  animation: feature-invoice-unfold 0.6s var(--spring) 1;
}

@keyframes feature-invoice-unfold {
  0% { transform: scaleY(0.94) scaleX(1); }
  50% { transform: scaleY(1.04) scaleX(1.02); }
  100% { transform: scaleY(1) scaleX(1); }
}

/* 3. Интеграции (purple) — stretch & snap */
.feature-icon-3 {
  background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
}

.group:hover .feature-icon-3 {
  background: linear-gradient(135deg, rgba(237, 233, 254, 0.9) 0%, rgba(221, 214, 254, 0.85) 100%);
}

.dark .feature-icon-3 {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.25) 0%, rgba(124, 58, 237, 0.2) 100%);
}

.group:hover .feature-icon-3 svg {
  animation: feature-links-stretch-snap 0.55s var(--spring) 1;
}

@keyframes feature-links-stretch-snap {
  0% { transform: scale(1); }
  40% { transform: scale(1.15); }
  70% { transform: scale(0.96); }
  100% { transform: scale(1); }
}

/* 4. Аналитика (orange) — bars spring + wobble */
.feature-icon-4 {
  background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%);
}

.group:hover .feature-icon-4 {
  background: linear-gradient(135deg, rgba(255, 237, 213, 0.9) 0%, rgba(254, 215, 170, 0.85) 100%);
}

.dark .feature-icon-4 {
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.25) 0%, rgba(194, 65, 12, 0.2) 100%);
}

.feature-icon-4 .bar {
  transform-origin: bottom;
  transform: scaleY(0);
  transition: transform 0.5s var(--spring);
}

.feature-icon-4 .bar:nth-child(1) { transition-delay: 0ms; }
.feature-icon-4 .bar:nth-child(2) { transition-delay: 80ms; }
.feature-icon-4 .bar:nth-child(3) { transition-delay: 160ms; }

#features.features-visible .feature-icon-4 .bar {
  transform: scaleY(1);
}

#features.features-visible .feature-icon-4 .bar:nth-child(1) { transition-delay: 360ms; }
#features.features-visible .feature-icon-4 .bar:nth-child(2) { transition-delay: 440ms; }
#features.features-visible .feature-icon-4 .bar:nth-child(3) { transition-delay: 520ms; }

.group:hover .feature-icon-4 .bar {
  animation: feature-bar-wobble 0.5s var(--spring) 1;
}

@keyframes feature-bar-wobble {
  0%, 100% { transform: scaleY(1); }
  33% { transform: scaleY(1.08); }
  66% { transform: scaleY(0.95); }
}

.dark .group:hover .feature-icon-1 { box-shadow: 0 0 24px rgba(56, 189, 248, 0.35); }
.dark .group:hover .feature-icon-2 { box-shadow: 0 0 24px rgba(74, 222, 128, 0.35); }
.dark .group:hover .feature-icon-3 { box-shadow: 0 0 24px rgba(167, 139, 250, 0.35); }
.dark .group:hover .feature-icon-4 { box-shadow: 0 0 24px rgba(251, 146, 60, 0.35); }

@media (prefers-reduced-motion: reduce) {
  .glass-card { transform: scale(1); opacity: 1; animation: none; }
  #features.features-visible .glass-card { animation: none; }
  .group:hover .feature-icon-wrap { animation: none; transform: translateY(-4px) scale(1.12); }
  .group:hover .feature-icon-1 svg,
  .group:hover .feature-icon-2 svg,
  .group:hover .feature-icon-3 svg { animation: none; }
  .feature-icon-4 .bar { transition: none; transform: scaleY(1); }
  .group:hover .feature-icon-4 .bar { animation: none; }
}

/* ---- Pricing: glassmorphism, gradient bg, stagger, hover glow, CTA pulse ---- */
.pricing-block {
  position: relative;
  overflow: visible;
}

/* Тень сзади секции */
.pricing-block-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #d4d4d4 0%, #a3a3a3 40%, #525252 70%, #1a1a2e 100%);
  z-index: 0;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35), 0 12px 24px -8px rgba(0, 0, 0, 0.2);
}

.dark .pricing-block-bg {
  background: linear-gradient(180deg, #334155 0%, #1e293b 50%, #0f172a 100%);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 12px 24px -8px rgba(0, 0, 0, 0.35);
}

.pricing-block h2,
.pricing-block .pricing-subtitle {
  position: relative;
  z-index: 1;
}

/* Текст в секции тарифов: белее и крупнее */
.pricing-block .pricing-title {
  color: #ffffff;
  font-size: clamp(1.875rem, 4vw, 3rem);
}

.pricing-block .pricing-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.125rem;
}

@media (min-width: 768px) {
  .pricing-block .pricing-subtitle { font-size: 1.25rem; }
}

.dark .pricing-block .pricing-title { color: #f8fafc; }
.dark .pricing-block .pricing-subtitle { color: rgba(248, 250, 252, 0.9); }

/* Карточки: начальное состояние для stagger + базовый layout */
.pricing-grid {
  position: relative;
  z-index: 1;
}

.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-align: center;
  padding: 2rem;
  border-radius: 1.5rem;
  border: 1px solid transparent;
  opacity: 0;
  transform: translateY(24px);
  transition: transform 0.35s var(--spring), box-shadow 0.35s ease, border-color 0.3s ease, background 0.3s ease;
}

.pricing-badge {
  position: absolute;
  top: -0.75rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.375rem 1rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.5);
  white-space: nowrap;
}

/* Фон карточек тарифов: плотные панели, без полупрозрачной «мытой» заливки */
.pricing-card-start,
.pricing-card-corporate {
  background: linear-gradient(180deg, rgba(30, 45, 60, 0.97) 0%, rgba(18, 28, 42, 0.97) 100%);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.pricing-card-business {
  background: linear-gradient(180deg, rgba(14, 80, 120, 0.35) 0%, rgba(7, 45, 75, 0.5) 50%, rgba(12, 35, 55, 0.95) 100%);
  border: 1px solid rgba(56, 189, 248, 0.3);
  box-shadow: 0 8px 36px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(56, 189, 248, 0.1) inset, inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.pricing-card-business::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 1.5rem 1.5rem 0 0;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.9) 0%, rgba(14, 165, 233, 0.8) 50%, rgba(2, 132, 199, 0.9) 100%);
}

.pricing-card-corporate {
  padding-left: 1rem;
  padding-right: 1rem;
}

#pricing.pricing-visible .pricing-card {
  animation: pricing-fade-up 0.6s ease-out forwards;
}

#pricing.pricing-visible .pricing-card:nth-child(1) { animation-delay: 0ms; }
#pricing.pricing-visible .pricing-card:nth-child(2) { animation-delay: 200ms; }
#pricing.pricing-visible .pricing-card:nth-child(3) { animation-delay: 400ms; }

@keyframes pricing-fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hover: lift + glow */
.pricing-card-start:hover,
.pricing-card-corporate:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35), 0 0 24px rgba(56, 189, 248, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  border-color: rgba(56, 189, 248, 0.3);
}

.pricing-card-business {
  transform: scale(1.02);
}

#pricing.pricing-visible .pricing-card-featured {
  animation: pricing-fade-up-featured 0.6s ease-out 200ms forwards;
}

@keyframes pricing-fade-up-featured {
  from { opacity: 0; transform: translateY(24px) scale(1.02); }
  to { opacity: 1; transform: translateY(0) scale(1.02); }
}

.pricing-card-business:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4), 0 0 32px rgba(14, 165, 233, 0.35), 0 0 0 1px rgba(56, 189, 248, 0.2) inset, inset 0 1px 0 rgba(255, 255, 255, 0.08);
  border-color: rgba(56, 189, 248, 0.5);
}

/* Список: галочка появляется слева направо при hover карточки */
.pricing-list {
  list-style: none;
  padding-left: 0;
}

.pricing-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow: hidden;
}

.pricing-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 0;
  max-width: 0;
  overflow: hidden;
  color: #10b981;
  font-weight: bold;
  transition: max-width 0.35s ease-out, margin-right 0.35s ease-out;
}

.pricing-card:hover .pricing-list li .pricing-check {
  max-width: 1.5rem;
  margin-right: 0.25rem;
}

.pricing-check::before {
  content: "✓";
}

.dark .pricing-check { color: #34d399; }

/* Задержка появления галочек по очереди */
.pricing-card:hover .pricing-list li:nth-child(1) .pricing-check { transition-delay: 0ms; }
.pricing-card:hover .pricing-list li:nth-child(2) .pricing-check { transition-delay: 60ms; }
.pricing-card:hover .pricing-list li:nth-child(3) .pricing-check { transition-delay: 120ms; }

/* CTA кнопки в карточках: idle pulse scale 1 → 1.02 → 1, 2s */
.pricing-cta-pulse {
  animation: pricing-cta-pulse 2s ease-in-out infinite;
}

@keyframes pricing-cta-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.pricing-card:hover .pricing-cta-pulse {
  animation: none;
  transform: scale(1);
}

/* Корпоратив: перенос длинного текста */
#pricing .pricing-card-corporate .hyphens-auto {
  hyphens: auto;
}

@media (prefers-reduced-motion: reduce) {
  .pricing-card { opacity: 1; transform: none; animation: none; }
  #pricing.pricing-visible .pricing-card { animation: none; opacity: 1; transform: none; }
  .pricing-card:hover { transform: translateY(-4px); }
  .pricing-cta-pulse { animation: none; }
  .pricing-check { transition: none; }
  .pricing-card:hover .pricing-list li .pricing-check { max-width: 1.5rem; margin-right: 0.25rem; }
}

/* ---- FAQ smooth expand ---- */
.faq-smooth {
  display: grid;
  grid-template-rows: auto 0fr;
  transition: grid-template-rows 0.3s ease;
}

.faq-smooth[open] {
  grid-template-rows: auto 1fr;
}

.faq-smooth > div {
  overflow: hidden;
  min-height: 0;
}

/* ---- CTA gradient shift on hover ---- */
.cta-gradient-hover {
  background-size: 220% 220%;
  background-position: 0% 50%;
  transition: background-position 0.6s ease, box-shadow 0.4s ease;
}

.cta-gradient-hover:hover {
  background-position: 100% 50%;
  box-shadow: 0 20px 40px rgba(14, 165, 233, 0.25);
}

.dark .cta-gradient-hover:hover {
  box-shadow: 0 20px 40px rgba(14, 165, 233, 0.2);
}

/* ---- Nav sticky fade (scroll) ---- */
.nav-glass {
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

.nav-glass.scrolled {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.dark .nav-glass.scrolled {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ---- Pricing card featured (legacy) ---- */
.pricing-featured {
  @apply ring-2 ring-primary-500 shadow-xl scale-[1.02];
  background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(240,249,255,0.92) 100%);
}

.dark .pricing-featured {
  background: linear-gradient(180deg, rgba(30,41,59,0.9) 0%, rgba(15,23,42,0.95) 100%);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

/* ---- FAQ accordion ---- */
.faq-item summary {
  list-style: none;
  cursor: pointer;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}
