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

:root {
  /* Colors */
  --bg-primary: #070B18;
  --bg-secondary: #0D1528;
  --accent-blue: #3B82F6;
  --accent-cyan: #06B6D4;
  --accent-purple: #8B5CF6;
  
  --text-primary: #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.4);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  --gradient-glow: linear-gradient(90deg, var(--accent-blue), var(--accent-purple), var(--accent-blue));
  
  /* Glassmorphism */
  --glass-bg: rgba(13, 21, 40, 0.4);
  --glass-border: rgba(255, 255, 255, 0.05);
  --glass-blur: blur(12px);

  /* Fonts */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Spacing */
  --section-padding: 120px 0;
  
  /* Easing */
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-in-out-circ: cubic-bezier(0.785, 0.135, 0.15, 0.86);
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: initial; /* Lenis handles this */
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: clamp(1rem, 2vw, 1.125rem);
  line-height: 1.6;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

.section-title {
  font-size: clamp(2rem, 5vw, 4rem);
  margin-bottom: 1.5rem;
  text-align: center;
}

.section-subtitle {
  font-size: clamp(1.125rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  text-align: center;
  max-width: 600px;
  margin: 0 auto 4rem;
  line-height: 1.6;
}

/* Layout */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: var(--section-padding);
  position: relative;
  z-index: 1;
}

/* Components */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.5rem;
  min-height: 48px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  border-radius: 100px;
  transition: all 0.4s var(--ease-out-expo);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

@media (max-width: 768px) {
  .btn {
    width: 100%;
    padding: 1rem;
  }
}

.btn-primary {
  background: var(--text-primary);
  color: var(--bg-primary);
  border: none;
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Magnetic Button Wrapper */
.magnetic-wrap {
  display: inline-block;
}

/* Cursor Glow */
.cursor-glow {
  position: fixed;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.05) 0%, rgba(0, 0, 0, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s;
}

/* Noise Texture Overlay */
.noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  background-image: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
}

/* Button Ripple */
.btn {
  position: relative;
  overflow: hidden;
}
.btn .ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: ripple-anim 0.6s linear;
  background-color: rgba(255, 255, 255, 0.3);
}
@keyframes ripple-anim {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

@keyframes rotation {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Dashboard UI Components */
.dashboard-widget {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.5rem;
  backdrop-filter: blur(10px);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.status-dot.active {
  background: #10B981;
  box-shadow: 0 0 10px #10B981;
}
.status-dot.warning {
  background: #F59E0B;
  box-shadow: 0 0 10px #F59E0B;
}

.pulse-ring {
  position: relative;
}
.pulse-ring::before {
  content: '';
  position: absolute;
  left: -4px;
  top: -4px;
  width: calc(100% + 8px);
  height: calc(100% + 8px);
  border-radius: 50%;
  border: 1px solid #10B981;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(2); opacity: 0; }
}

.chart-bar {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
  overflow: hidden;
  height: 6px;
}
.chart-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 4px;
}

/* Technologies Section */
.tech-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}
.tech-category-card {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
}
.tech-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  color: var(--text-secondary);
}
.tech-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.1rem;
}
.tech-icon-small {
  display: inline-block;
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}
.tech-category-card:hover .tech-icon-small {
  transform: scale(1.2);
}

/* Case Studies */
.case-studies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}
.case-card {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.case-image {
  height: 220px;
  background: #111827;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.case-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.case-meta {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--accent-cyan);
}
.case-content h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}
.case-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0;
}
.case-tech span {
  font-size: 0.8rem;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.case-outcome {
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.case-outcome h4 {
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}
.case-outcome ul {
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding-left: 1.25rem;
  list-style: disc;
}
.case-outcome ul li {
  margin-bottom: 0.25rem;
}

/* Glow Border Wrap */
.glow-border-wrap {
  position: relative;
}
.glow-border-wrap::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 24px;
  background: var(--gradient-glow);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.glow-border-wrap:hover::after {
  opacity: 1;
}

/* Testimonials */
.testimonial-card {
  padding: 3rem 2rem;
  position: relative;
  text-align: left;
}
.quote-icon {
  font-family: Georgia, serif;
  font-size: 4rem;
  color: rgba(255,255,255,0.05);
  position: absolute;
  top: 1rem;
  right: 2rem;
  line-height: 1;
}
.stars {
  color: #FBBF24;
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  letter-spacing: 2px;
}
.client-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}
.client-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  color: #fff;
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

/* Logos */
.nav-logo {
  height: 48px;
  width: auto;
  object-fit: contain;
}
@media (max-width: 992px) {
  .nav-logo {
    height: 42px;
  }
}
@media (max-width: 768px) {
  .nav-logo {
    height: 36px;
  }
}
.footer-logo {
  height: 56px;
  width: auto;
  object-fit: contain;
}

/* Mobile Navigation */
.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 2000;
  padding: 0.5rem;
}
.menu-toggle span {
  display: block;
  width: 28px;
  height: 2px;
  background: var(--text-primary);
  margin: 6px 0;
  transition: 0.4s;
  border-radius: 2px;
}
.mobile-menu {
  display: flex;
  gap: 2rem;
  align-items: center;
}

@media (max-width: 992px) {
  .menu-toggle {
    display: block;
  }
  .mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transform: translateX(100%);
    transition: transform 0.5s var(--ease-out-expo);
    z-index: 1999;
  }
  .mobile-menu.active {
    transform: translateX(0);
  }
  .mobile-menu a {
    font-size: 1.5rem;
    font-family: var(--font-heading);
  }
  .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
  }
  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
  }
  body.menu-open {
    overflow: hidden;
  }
}

/* Responsive Overrides */
@media (max-width: 992px) {
  .tech-category-grid, .case-studies-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  .site-footer .container {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .tech-category-grid, .case-studies-grid {
    grid-template-columns: 1fr;
  }
  .site-footer .container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .site-footer .container ul {
    align-items: center;
  }
  .magnetic-wrap {
    display: block;
    width: 100%;
  }
}
