/* ==========================================
   Scratchly CRM Landing Page - Custom Styles
   ========================================== */

/* Perspective container for 3D card tilt */
.perspective-1000 {
  perspective: 1000px;
}

/* Glass Navbar Scrolled State */
#main-nav.nav-scrolled {
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  box-shadow: 0 4px 20px -5px rgba(0, 0, 0, 0.04);
}

/* Kanban Drag & Drop Target Active Style */
.kanban-column.drag-over {
  border-color: #0066ff !important;
  background-color: rgba(239, 246, 255, 0.7) !important;
  box-shadow: 0 0 0 2px rgba(0, 102, 255, 0.2) inset !important;
}

/* Deal Card Dragging Ghost Style */
.deal-card.is-dragging {
  opacity: 0.45;
  transform: scale(0.97);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Smooth Touch Scrolling on mobile */
.scroll-touch {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

/* Checkmark SVG Draw Animation */
.check-path {
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  animation: drawCheck 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards 0.2s;
}

@keyframes drawCheck {
  to {
    stroke-dashoffset: 0;
  }
}

/* Fade in animation helper */
.animate-fade-in {
  animation: fadeIn 0.3s ease-out forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Multi-step form pill selection active state */
.size-pill.active {
  border-color: #0066ff;
  background-color: #eff6ff;
  color: #0066ff;
  box-shadow: 0 0 0 1px #0066ff;
}

/* Range slider custom styling */
input[type=range] {
  -webkit-appearance: none;
  background: #334155;
  border-radius: 9999px;
  height: 6px;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 18px;
  width: 18px;
  border-radius: 50%;
  background: #0066ff;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0, 102, 255, 0.5);
  transition: transform 0.15s ease;
}

input[type=range]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Scroll reveal initial hidden state */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Respect user prefers-reduced-motion settings */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal-on-scroll {
    opacity: 1 !important;
    transform: none !important;
  }
}
