/* ============================================================
   DataForge - SaaS Landing Page
   Shared Styles for all pages
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --dark: #1e293b;
  --gray: #64748b;
  --light: #f8fafc;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --radius-sm: 0.375rem;
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --transition: all 0.3s ease;
}

/* ---------- Smooth Scroll ---------- */
html {
  scroll-behavior: smooth;
}

/* ---------- Scrollbar Styling ---------- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #2563eb, #3b82f6);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #1d4ed8, #2563eb);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: #2563eb #f1f5f9;
}

/* ---------- Body ---------- */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: #1e293b;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ---------- Navbar ---------- */
#navbar {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
}
#navbar.scrolled {
  background-color: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
}
#navbar.scrolled a.nav-link {
  color: #334155 !important;
}
#navbar.scrolled a.nav-link:hover {
  color: #2563eb !important;
}
#navbar a.nav-link {
  transition: color 0.25s ease;
  position: relative;
}
#navbar a.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 100%;
  height: 2px;
  background: #2563eb;
  border-radius: 2px;
  transition: transform 0.3s ease;
}
#navbar a.nav-link:hover::after {
  transform: translateX(-50%) scaleX(1);
}

/* Mobile menu */
#mobile-menu {
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
}
#mobile-menu.open {
  max-height: 500px;
  opacity: 1;
}

/* Hamburger icon */
.hamburger-line {
  transition: all 0.3s ease;
  transform-origin: center;
}
#hamburger-btn.active .hamburger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
#hamburger-btn.active .hamburger-line:nth-child(2) {
  opacity: 0;
}
#hamburger-btn.active .hamburger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ---------- Feature Cards ---------- */
.feature-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid #e2e8f0;
  cursor: default;
}
.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px -12px rgba(37, 99, 235, 0.25);
  border-color: #93c5fd;
}
.feature-card:hover .feature-icon {
  transform: scale(1.1) rotate(-5deg);
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
}
.feature-icon {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 1.4rem;
  flex-shrink: 0;
}

/* ---------- Stats Section ---------- */
.stat-number {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* ---------- Testimonial Cards ---------- */
.testimonial-card {
  transition: all 0.35s ease;
  border: 1px solid #e2e8f0;
}
.testimonial-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  border-color: #bfdbfe;
}

/* ---------- FAQ Accordion ---------- */
.faq-item {
  transition: all 0.3s ease;
}
.faq-question {
  cursor: pointer;
  user-select: none;
  transition: all 0.25s ease;
}
.faq-question:hover {
  background-color: #f8fafc;
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1), padding 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
.faq-answer.open {
  max-height: 300px;
}
.faq-icon {
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}
.faq-icon.rotated {
  transform: rotate(180deg);
}
.faq-item.active {
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.08);
  border-color: #93c5fd !important;
}

/* ---------- CTA Section ---------- */
.cta-gradient {
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 30%, #2563eb 60%, #3b82f6 100%);
  position: relative;
  overflow: hidden;
}
.cta-gradient::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.08) 0%, transparent 60%);
  animation: ctaPulse 8s ease-in-out infinite;
}
@keyframes ctaPulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.15); opacity: 0.8; }
}
.cta-btn-glow {
  transition: all 0.35s ease;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4);
  animation: btnGlow 2.5s ease-in-out infinite;
}
.cta-btn-glow:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(37, 99, 235, 0.55);
  animation: none;
}
@keyframes btnGlow {
  0%, 100% { box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4); }
  50% { box-shadow: 0 8px 36px rgba(59, 130, 246, 0.6); }
}

/* ---------- Stats Counter Bar Animation ---------- */
.counter-bar {
  animation: counterFadeIn 0.6s ease-out forwards;
  opacity: 0;
}
@keyframes counterFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- About Page ---------- */
.about-hero {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 50%, #bfdbfe 100%);
}
.timeline-dot {
  width: 16px;
  height: 16px;
  background: #2563eb;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
  flex-shrink: 0;
}
.timeline-line {
  width: 2px;
  background: linear-gradient(180deg, #2563eb, #93c5fd);
  flex: 1;
  margin: 4px 0;
}

/* ---------- Contact Page ---------- */
.contact-input {
  transition: all 0.3s ease;
  border: 2px solid #e2e8f0;
}
.contact-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
  outline: none;
}
.contact-submit-btn {
  transition: all 0.35s ease;
}
.contact-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(37, 99, 235, 0.4);
}

/* ---------- Footer ---------- */
footer a {
  transition: color 0.25s ease, padding-left 0.25s ease;
}
footer a:hover {
  color: #93c5fd;
  padding-left: 4px;
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.animate-fade-in-up {
  animation: fadeInUp 0.7s ease-out forwards;
}
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* ---------- Service/Value Cards on About Page ---------- */
.value-card {
  transition: all 0.35s ease;
  border: 1px solid #e2e8f0;
}
.value-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  border-color: #bfdbfe;
}
.value-card:hover .value-icon-wrap {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #fff;
}
.value-icon-wrap {
  transition: all 0.35s ease;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 1.6rem;
}

/* ---------- Responsive Tweaks ---------- */
@media (max-width: 768px) {
  .feature-card:hover {
    transform: translateY(-4px);
  }
  .testimonial-card:hover {
    transform: translateY(-4px);
  }
}
