/* ============================================================
   КадрЭлит — Custom Styles
   Дополнительные стили поверх Tailwind CDN
   ============================================================ */

/* ---- RESET & BASE ---- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  overflow-x: hidden;
  max-width: 100%;
  position: relative;
}

::selection {
  background: rgba(37, 99, 235, 0.2);
  color: #0F172A;
}


/* ---- SHIMMER BUTTON ---- */
/* Кнопка с градиентом и анимированным бликом */
.shimmer-btn {
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 50%, #2563EB 100%);
  background-size: 200% auto;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.3);
}

.shimmer-btn:hover {
  box-shadow: 0 8px 40px rgba(37, 99, 235, 0.5);
}

.shimmer-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.15) 50%,
    transparent 100%
  );
  animation: shimmer-sweep 3s ease-in-out infinite;
}

@keyframes shimmer-sweep {
  0% { left: -100%; }
  50% { left: 100%; }
  100% { left: 100%; }
}


/* ---- GLASSMORPHISM CARDS ---- */
.glass-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-card-dark {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}


/* ---- HEADER ---- */
#header {
  background: transparent;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#header.scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

/* Когда шапка прозрачная — белые ссылки */
#header .nav-link {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.3s ease;
}
#header .nav-link:hover {
  color: #fff;
}

/* Когда шапка белая — тёмные ссылки */
#header.scrolled .nav-link {
  color: #64748B;
}
#header.scrolled .nav-link:hover {
  color: #2563EB;
}

/* Logo text color adapts */
#header .font-heading {
  color: #E8C96A;
}
#header.scrolled .font-heading {
  color: #C9A84C;
}

/* Логотип — шрифт и цвет не меняются при скролле */
#header a[href="#hero"] span {
  color: #C9A84C !important;
}
#header a[href="#hero"] span span {
  color: #E8C96A !important;
}

/* Phone link */
#header a[href^="tel"] {
  color: rgba(255, 255, 255, 0.9);
}
#header.scrolled a[href^="tel"] {
  color: #0F172A;
}

/* Телефон в мобильном меню — всегда чёрный */
#mobile-menu a[href^="tel"] {
  color: #1e293b !important;
}

/* Burger icon */
#header #burger i {
  color: white;
}
#header.scrolled #burger i {
  color: #0F172A;
}


/* ---- TEXT GRADIENT ---- */
.text-gradient {
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}


/* ---- ADVANTAGE CARDS ---- */
.advantage-card {
  padding: 2rem;
  background: white;
  border-radius: 24px;
  border: 1px solid #f1f5f9;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.advantage-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
  border-color: transparent;
}


/* ---- SERVICE CARDS ---- */
.service-card {
  padding: 2rem;
  background: white;
  border-radius: 24px;
  border: 1px solid #f1f5f9;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px;
  padding: 2px;
  background: linear-gradient(135deg, transparent, transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  transition: background 0.4s ease;
  pointer-events: none;
}

.service-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 30px 80px rgba(37, 99, 235, 0.12);
  border-color: transparent;
}

.service-card:hover::before {
  background: linear-gradient(135deg, #2563EB, #60A5FA);
}


/* ---- PRICING TABS ---- */
.pricing-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 14px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  transition: all 0.3s ease;
}

.pricing-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  border-color: rgba(255, 255, 255, 0.2);
}

.pricing-tab.active {
  background: #2563EB;
  border-color: #2563EB;
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4);
}

.pricing-panel {
  transition: opacity 0.3s ease;
}


/* ---- PRICING CARDS ---- */
.pricing-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pricing-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.07);
}

.pricing-card--popular {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: 0 0 60px rgba(37, 99, 235, 0.15);
}

.pricing-card--popular:hover {
  border-color: rgba(37, 99, 235, 0.5);
  box-shadow: 0 0 80px rgba(37, 99, 235, 0.25);
}


/* ---- TIMELINE ---- */
.timeline-card {
  padding: 1.5rem;
  background: white;
  border-radius: 20px;
  border: 1px solid #f1f5f9;
  transition: all 0.3s ease;
}

.timeline-card:hover {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
  transform: translateY(-4px);
}

.timeline-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.1);
  color: #2563EB;
  font-weight: 700;
  font-size: 0.875rem;
  flex-shrink: 0;
}


/* ---- BENTO GRID ---- */
.bento-card {
  background: white;
  border-radius: 24px;
  border: 1px solid #f1f5f9;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.bento-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
  border-color: transparent;
}


/* ---- TESTIMONIAL CARDS ---- */
.testimonial-card {
  padding: 2rem;
  background: white;
  border-radius: 24px;
  border: 1px solid #f1f5f9;
  transition: all 0.4s ease;
}

.testimonial-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.06);
}


/* ---- MARQUEE ---- */
.marquee-container {
  overflow: hidden;
  width: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  gap: 3rem;
}

.marquee-item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 160px;
  height: 72px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px 20px;
  transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.marquee-item:hover {
  border-color: #2563EB;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.12);
  transform: scale(1.05);
}

/* Реальные логотипы в marquee */
.marquee-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.55;
  transition: filter 0.3s ease, opacity 0.3s ease;
  display: block;
}

.marquee-item:hover .marquee-logo {
  filter: grayscale(0%);
  opacity: 1;
}

.logo-placeholder-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  background: #f1f5f9;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.75rem;
  color: #64748b;
}


/* ---- FAQ ACCORDION ---- */
.faq-item {
  transition: all 0.3s ease;
}

.faq-item.active {
  border-color: #2563EB;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.1);
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
  color: #2563EB;
}

.faq-item.active .faq-trigger span {
  color: #2563EB;
}


/* ---- FORM STYLES ---- */
.form-input:focus {
  border-color: #2563EB;
}

.form-group.error .form-input {
  border-color: #f87171;
}

.form-group.error .form-error {
  display: block;
}

select option {
  background: #0F172A;
  color: white;
}


/* ---- SCROLL REVEAL ANIMATIONS ---- */
.reveal-up,
.reveal-left,
.reveal-right {
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  transition-delay: var(--delay, 0s);
}

.reveal-up {
  transform: translateY(40px);
}

.reveal-left {
  transform: translateX(-40px);
}

.reveal-right {
  transform: translateX(40px);
}

.reveal-up.revealed,
.reveal-left.revealed,
.reveal-right.revealed {
  opacity: 1;
  transform: translate(0, 0);
}


/* ---- GRADIENT BACKGROUNDS ---- */
.bg-gradient-radial {
  background: radial-gradient(circle, var(--tw-gradient-from) 0%, var(--tw-gradient-to) 100%);
}


/* ---- CUSTOM SCROLLBAR ---- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}


/* ---- RESPONSIVE TWEAKS ---- */
@media (max-width: 640px) {
  .timeline-card {
    margin-left: 0;
    margin-bottom: 1rem;
  }

  .marquee-track {
    gap: 1.5rem;
  }

  .pricing-card--popular {
    order: -1;
  }
}

/* При малых высотах hero */
@media (max-height: 700px) {
  #hero {
    min-height: auto;
    padding-top: 6rem;
    padding-bottom: 4rem;
  }
}


/* ---- FOCUS VISIBLE ---- */
:focus-visible {
  outline: 2px solid #2563EB;
  outline-offset: 2px;
  border-radius: 4px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid #2563EB;
  outline-offset: 2px;
}


/* ---- REDUCED MOTION ---- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal-up,
  .reveal-left,
  .reveal-right {
    opacity: 1;
    transform: none;
  }

  .marquee-track {
    animation: none !important;
  }
}


/* ---- PRINT STYLES ---- */
@media print {
  #header,
  #sticky-cta,
  #modal-overlay,
  #exit-overlay,
  .shimmer-btn::after {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
  }

  section {
    page-break-inside: avoid;
  }
}
