@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400&family=Noto+Sans+SC:wght@300;400;500;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ===== Linear - Calm Dark Theme ===== */

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  font-family: 'Inter', 'DM Sans', 'Noto Sans SC', system-ui, sans-serif;
  overflow-x: hidden;
  max-width: 100vw;
  color: #fafafa;
  background: #09090b;
  -webkit-font-smoothing: antialiased;
}
*, *::before, *::after { box-sizing: border-box; }

/* --- Section Padding --- */
.section-padding { padding-top: 3.5rem; padding-bottom: 3.5rem; }
@media (min-width: 768px) { .section-padding { padding-top: 5rem; padding-bottom: 5rem; } }

/* --- Container --- */
.container-custom { max-width: 1200px; margin-left: auto; margin-right: auto; padding-left: 1.25rem; padding-right: 1.25rem; }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 { font-family: 'Inter', 'Noto Sans SC', sans-serif; font-weight: 600; }

/* --- Fade-in Animation --- */
.fade-in { opacity: 0; transform: translateY(30px); transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1); }
.fade-in.visible { opacity: 1; transform: translateY(0); }
.fade-in:nth-child(2) { transition-delay: 0.08s; }
.fade-in:nth-child(3) { transition-delay: 0.16s; }
.fade-in:nth-child(4) { transition-delay: 0.24s; }

/* --- Section Label --- */
.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(243, 244, 246, 0.5);
  margin-bottom: 0.5rem;
}

/* --- Section Title --- */
.section-title {
  font-family: 'Inter', 'Noto Sans SC', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
  color: #fafafa;
}
@media (min-width: 768px) { .section-title { font-size: 3rem; } }

/* --- Section Divider --- */
.section-divider {
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, #6366f1, #a855f7);
  margin-top: 1.5rem;
}
.section-divider.center { margin-left: auto; margin-right: auto; }

/* --- Card Hover Effect --- */
.card-hover { transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s; }
.card-hover:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(99, 102, 241, 0.1); border-color: rgba(99, 102, 241, 0.3); }

/* --- Navbar --- */
.nav-scrolled { background: rgba(9, 9, 11, 0.8); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.nav-scrolled .nav-inner { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.nav-link {
  position: relative;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: rgba(243, 244, 246, 0.7);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-link:hover { color: #fafafa; }
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #6366f1, #a855f7);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-link:hover::after { width: 100%; }

/* --- Language Toggle --- */
.lang-toggle {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
}
.nav-scrolled .lang-toggle { border-color: rgba(255, 255, 255, 0.1); }
.lang-btn {
  color: rgba(243, 244, 246, 0.5);
  transition: all 0.2s;
  background: transparent;
}
.lang-btn:hover { color: white; background: rgba(255, 255, 255, 0.08); }
.lang-btn.active {
  background-color: rgba(99, 102, 241, 0.2);
  color: white;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

/* Mobile menu button */
.nav-scrolled #mobileMenuBtn { color: white; }

/* Nav logo text */
.nav-logo-title { color: #fafafa; }
.nav-logo-sub { color: rgba(243, 244, 246, 0.5); }
.nav-scrolled .nav-logo-title { color: white; }
.nav-scrolled .nav-logo-sub { color: rgba(243, 244, 246, 0.5); }

/* Mobile menu */
#mobileMenu { background: #09090b; border-top: 1px solid rgba(255, 255, 255, 0.08); }
#mobileMenu a { color: rgba(243, 244, 246, 0.7); }

/* --- Hero Section --- */
.hero-section {
  background: linear-gradient(180deg, #09090b 0%, #18181b 100%);
  position: relative;
  overflow: hidden;
}
.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}
.hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.08;
  pointer-events: none;
}
.hero-glow-1 { background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%); top: -200px; right: -100px; }
.hero-glow-2 { background: radial-gradient(circle, rgba(168, 85, 247, 0.08) 0%, transparent 70%); bottom: -200px; left: -100px; }

/* --- Stat Block --- */
.stat-block {
  background: rgba(24, 24, 27, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  border-radius: 12px;
  padding: 1.5rem;
  transition: border-color 0.3s, background 0.3s;
}
.stat-block:hover {
  border-color: rgba(99, 102, 241, 0.3);
  background: rgba(24, 24, 27, 0.8);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.05);
}

/* --- Service Card --- */
.service-card {
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  transition: border-color 0.3s, transform 0.2s ease, box-shadow 0.2s ease;
}
.service-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.08);
}
.service-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

/* --- Smart System Banner --- */
.smart-banner {
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 3rem 2rem;
  position: relative;
  overflow: hidden;
}
.smart-banner::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

/* --- Carousel --- */
.carousel-viewport { overflow: hidden; position: relative; }
.carousel-track { display: flex; transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1); }

@media (max-width: 767px) {
  .carousel-viewport {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .carousel-track { transition: none; }
  .carousel-slide { scroll-snap-align: center; }
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(243, 244, 246, 0.3);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: none;
  padding: 0;
}
.carousel-dot.active { background: linear-gradient(90deg, #6366f1, #a855f7); width: 32px; border-radius: 4px; }

/* --- Brand Logo --- */
.brand-logo { filter: grayscale(100%) brightness(0.7); opacity: 0.5; transition: all 0.3s; }
.brand-logo:hover { filter: grayscale(0%) brightness(1); opacity: 0.8; }

/* --- Case Card --- */
.case-card {
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.2s ease, box-shadow 0.2s ease;
}
.case-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.08);
}

/* --- Timeline --- */
.timeline-line { border-left: 1px solid rgba(255, 255, 255, 0.08); }
@media (min-width: 768px) { .timeline-line { border-left-width: 1px; } }
.timeline-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  position: absolute;
  left: -5px;
  top: 6px;
}
.timeline-dot.orange { background: #fb923c; }

/* --- Contact Form --- */
.form-input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-family: 'Inter', 'Noto Sans SC', sans-serif;
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  background: #18181b;
  color: #fafafa;
}
.form-input:focus {
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  background: #09090b;
}
.form-input::placeholder { color: rgba(243, 244, 246, 0.4); }

/* --- Buttons --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.8rem 2rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s, transform 0.2s;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #7c3aed, #c084fc);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: #fafafa;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-outline:hover {
  border-color: rgba(99, 102, 241, 0.5);
  background: rgba(99, 102, 241, 0.1);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.15);
}

/* --- Footer --- */
.site-footer { background: #09090b; border-top: 1px solid rgba(255, 255, 255, 0.08); }

/* --- Smooth transitions --- */
a, button { transition: all 0.2s ease; }

/* --- Noise Texture Overlay --- */
.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.015;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 128px 128px;
}

/* --- Monospace accent --- */
.mono { font-family: 'JetBrains Mono', monospace; }

/* --- Tag/Pill --- */
.tag {
  display: inline-block;
  background: rgba(243, 244, 246, 0.08);
  color: rgba(243, 244, 246, 0.8);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* --- Text Muted --- */
.text-muted { color: rgba(243, 244, 246, 0.6); }

/* ===== Performance Optimizations ===== */
/* Reduce paint layout on scroll for mobile */
.card-hover {
  will-change: transform;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* Smooth scrolling */
.carousel-viewport {
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

/* Reduce image memory usage */
img {
  -webkit-user-drag: none;
  user-select: none;
}

/* Optimize animations */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== Brand Highlight Animation ===== */
@keyframes brand-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

.brand-item {
  transition: opacity 0.3s ease, transform 0.3s ease, filter 0.3s ease;
}

.brand-item.highlight {
  animation: brand-pulse 1s ease-in-out;
  filter: brightness(2.5) drop-shadow(0 0 25px rgba(99, 102, 241, 1));
}
