/* =========================================
   KVJ ANALYTICS - GLOBAL STYLES
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Color Palette - Premium Light Theme */
  --bg-dark: #F8FAFC;
  --bg-darker: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F1F5F9;

  --text-main: #0F172A;
  --text-muted: #475569;

  --accent-primary: #3B82F6;
  /* Vibrant Blue */
  --accent-primary-hover: #2563EB;
  --accent-secondary: #10B981;
  /* Emerald Green */
  --accent-tertiary: #8B5CF6;
  /* Vibrant Violet */

  --gradient-primary: rgba(28, 61, 109, 1);
  --gradient-text: rgba(28, 61, 109, 1);

  /* Glassmorphism */
  --glass-border: 1px solid rgba(0, 0, 0, 0.05);
  --glass-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.08);

  /* Layout & Spacing */
  --container-width: 1280px;
  --nav-height: 80px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Animation Speeds */
  --ticker-speed: 120s;
}

/* =========================================
   RESET & BASE STYLES
   ========================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* =========================================
   UTILITIES & COMPONENTS
   ========================================= */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.text-gradient {
  background: linear-gradient(to right, rgba(28, 61, 109, 1) 0%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  /* Fallback for older browsers if needed */
}

.section {
  padding: 6rem 0;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition-normal);
  border: none;
  font-family: 'Inter', sans-serif;
  text-align: center;
}

.btn-primary {
  background: rgba(28, 61, 109, 1);
  color: #ffffff !important;
  box-shadow: 0 4px 15px rgba(28, 61, 109, 0.4);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(28, 61, 109, 0.6);
  color: #ffffff !important;
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--text-main);
}

.btn-outline:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: var(--text-main);
}

/* =========================================
   NAVIGATION
   ========================================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: var(--glass-border);
  z-index: 1000;
  transition: all var(--transition-normal);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  color: var(--accent-secondary);
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-main);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
  background-color: var(--bg-darker);
  border-top: var(--glass-border);
  padding: 5rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  color: var(--text-muted);
  margin-top: 1rem;
  max-width: 300px;
}

.footer-socials {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.footer-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-card);
  border: var(--glass-border);
  transition: all var(--transition-normal);
}

.footer-socials a:hover {
  background: var(--accent-primary);
  transform: translateY(-3px);
}

.footer h4 {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: var(--text-main);
}

.footer-links li {
  margin-bottom: 0.8rem;
}

.footer-links a {
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--accent-secondary);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: var(--glass-border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* =========================================
   RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: -100%;
    width: 100%;
    height: calc(100vh - var(--nav-height));
    background: var(--bg-dark);
    flex-direction: column;
    padding: 2rem;
    transition: left var(--transition-normal);
  }

  .nav-links.active {
    left: 0;
  }

  .mobile-menu-btn {
    display: block;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================
   HERO SECTION (MODERN SAAS)
   ========================================= */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: calc(var(--nav-height) + 5rem) 0 5rem;
  background-color: var(--bg-dark);
  /* Light theme BG */
}

/* Canvas styling */
.analytics-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  /* Let parent handle mouse events */
}

.hero .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 1;
  position: relative;
  max-width: 900px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.hero-content h1 {
  font-size: 3.8rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero-content h1.text-gradient {
  background: linear-gradient(to right, rgba(28, 61, 109, 1) 0%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.hero-content h2 {
  font-size: 1.6rem;
  color: var(--text-main);
  font-weight: 500;
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.hero-content p {
  color: var(--text-muted);
  font-size: 1.25rem;
  margin-bottom: 2.8rem;
  max-width: 700px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  justify-content: center;
}

/* New Glowing Button for light bg */
.hero-buttons .btn-primary {
  background: linear-gradient(135deg, rgba(28, 61, 109, 1), #3b82f6);
  color: #ffffff !important;
  box-shadow: 0 8px 20px rgba(28, 61, 109, 0.25);
  font-size: 1.1rem;
  padding: 1rem 2.2rem;
  border-radius: 50px;
  position: relative;
  overflow: hidden;
  border: none;
}

.hero-buttons .btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: all 0.5s ease;
}

.hero-buttons .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(28, 61, 109, 0.4);
}

.hero-buttons .btn-primary:hover::before {
  left: 100%;
}

@media (max-width: 992px) {
  .hero {
    padding-top: calc(var(--nav-height) + 3rem);
    min-height: auto;
  }

  .hero-content p {
    margin: 0 auto 2.5rem;
  }

  .hero-content h1 {
    font-size: 3rem;
  }
}

@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2.4rem;
  }

  .hero-content h2 {
    font-size: 1.3rem;
  }
}

/* =========================================
   CARDS & GRIDS
   ========================================= */
.services-section {
  background-color: var(--bg-dark);
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

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

.glass-card {
  background: var(--bg-card);
  border: var(--glass-border);
  border-radius: 20px;
  padding: 2.5rem;
  transition: all var(--transition-normal);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: var(--glass-shadow);
}

.glass-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-5px);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.12);
}

.card-icon {
  width: 60px;
  height: 60px;
  border-radius: 15px;
  background: rgba(28, 61, 109, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: rgba(28, 61, 109, 1);
  margin-bottom: 1.5rem;
}

.glass-card h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.glass-card p {
  color: var(--text-muted);
  flex-grow: 1;
}

@media (max-width: 1200px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 992px) {

  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {

  .grid-3,
  .grid-4,
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* =========================================
   PAGE HEADERS
   ========================================= */
.page-header {
  padding: calc(var(--nav-height) + 4rem) 0 4rem;
  text-align: center;
  background: radial-gradient(circle at center, rgba(59, 130, 246, 0.08) 0%, transparent 60%);
  border-bottom: var(--glass-border);
}

.page-title {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto;
}

/* =========================================
   CONTENT SECTIONS
   ========================================= */
.content-block {
  margin-bottom: 3rem;
}

.content-block h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--accent-secondary);
}

.content-block h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.content-block p {
  margin-bottom: 1.5rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.feature-list {
  list-style: none;
  margin-bottom: 2rem;
}

.feature-list li {
  margin-bottom: 0.8rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  color: var(--text-muted);
}

.feature-list i {
  color: var(--accent-primary);
  margin-top: 0.3rem;
}

/* =========================================
   CLIENT LOGO TICKER
   ========================================= */
.ticker-section {
  padding: 3rem 0;
  background-color: var(--bg-darker);
  border-bottom: var(--glass-border);
}

.ticker-wrapper {
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  width: 100%;
}

.ticker-track {
  display: inline-flex;
  animation: scroll var(--ticker-speed) linear infinite;
  gap: 4rem;
  align-items: center;
}

.ticker-item {
  flex: 0 0 auto;
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-muted);
  /* opacity: 0.6; */
  filter: grayscale(1);
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ticker-item:hover {
  opacity: 1;
  filter: grayscale(0);
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* =========================================
   TESTIMONIALS SECTION
   ========================================= */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.testimonial-card {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
}

.quote-icon {
  font-size: 2rem;
  color: var(--accent-primary);
  opacity: 0.2;
  margin-bottom: 1.5rem;
}

.testimonial-text {
  font-style: italic;
  font-size: 1.05rem;
  color: var(--text-main);
  line-height: 1.8;
  margin-bottom: 2rem;
  flex-grow: 1;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.author-info h4 {
  font-size: 1.1rem;
  margin-bottom: 0.2rem;
}

.author-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

@media (max-width: 992px) {
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* =========================================
   HERO DASHBOARD SIMULATION
   ========================================= */
.hero-dashboard {
  width: 100%;
  max-width: 550px;
  height: 380px;
  background: #f8fafc;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
  display: flex;
  overflow: hidden;
  position: relative;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  animation: float 6s ease-in-out infinite;
}

.db-sidebar {
  width: 60px;
  background: #0f172a;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 0.8rem;
  gap: 1.2rem;
  align-items: center;
}

.db-sidebar-item {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.db-sidebar-item.active {
  background: #fbbf24;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
}

.db-main {
  flex: 1;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.db-header {
  height: 20px;
  width: 150px;
  background: #e2e8f0;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.db-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
}

.db-card {
  background: white;
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  border-top: 3px solid #e2e8f0;
  transition: all 0.5s ease;
}

.db-card.blue {
  border-top-color: #3b82f6;
}

.db-card.green {
  border-top-color: #10b981;
}

.db-card.purple {
  border-top-color: #8b5cf6;
}

.db-card.amber {
  border-top-color: #fbbf24;
}

.db-card-label {
  font-size: 0.7rem;
  color: #64748b;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.db-card-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1e293b;
  margin-top: 0.2rem;
}

.db-chart-container {
  background: white;
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.db-chart-title {
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #475569;
}

.db-bar-wrap {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding-bottom: 5px;
}

.db-bar {
  flex: 1;
  background: #3b82f6;
  border-radius: 2px 2px 0 0;
  transition: height 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  opacity: 0.8;
}

.db-cursor {
  position: absolute;
  width: 18px;
  height: 18px;
  background: rgba(0, 0, 0, 0.15);
  border: 1.5px solid white;
  border-radius: 50%;
  pointer-events: none;
  z-index: 100;
  transition: all 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================
   SaaS Hero Analytics Visualization Animations
   ========================================= */

@keyframes float {
  0% {
    transform: translateY(0px) scale(1);
  }

  50% {
    transform: translateY(-8px) scale(1.01);
  }

  100% {
    transform: translateY(0px) scale(1);
  }
}

@keyframes float-delayed {
  0% {
    transform: translateY(0px) scale(1);
  }

  50% {
    transform: translateY(-10px) scale(1.01);
  }

  100% {
    transform: translateY(0px) scale(1);
  }
}

@keyframes pulse-glow {
  0% {
    box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.4);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(56, 189, 248, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(56, 189, 248, 0);
  }
}

@keyframes wave-flow {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

@keyframes dash-flow {
  to {
    stroke-dashoffset: -20;
  }
}

@keyframes draw-line {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.kpi-card {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  will-change: transform;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

.kpi-card:hover {
  transform: translateY(-8px) scale(1.02) !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(56, 189, 248, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
  z-index: 10;
}

.kpi-card:hover .kpi-icon-box {
  animation: pulse-glow 1.5s infinite;
}

.kpi-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 1rem;
}

.kpi-value {
  font-size: 2rem;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.1;
  font-family: "Outfit", sans-serif;
}

.kpi-label {
  font-size: 0.8rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-top: 0.25rem;
}

.mini-chart-container {
  height: 45px;
  width: 100%;
  margin-top: 1rem;
  position: relative;
}