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

:root {
  --bg-dark: #020617;        /* Dark Blue */
  --bg-card: rgba(15, 23, 42, 0.7);
  --primary: #7dd3fc;        /* Light Blue */
  --primary-hover: #38bdf8;
  --secondary: #fb923c;      /* Orange */
  --accent: #fb923c;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border: rgba(255, 255, 255, 0.08);
  --glass: rgba(2, 6, 23, 0.8);
  --gradient-tech: linear-gradient(135deg, #7dd3fc 0%, #fb923c 100%);
  --gradient-safari: linear-gradient(135deg, #fb923c 0%, #d97706 100%);
  --brown: #8B4513;
  --gradient-brown: linear-gradient(135deg, #8B4513 0%, #a0522d 100%);
  --shadow-premium: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* Mobile: Disable smooth scroll for better performance */
@media (max-width: 768px) {
  html {
    scroll-behavior: auto;
  }
}

/* --- Optimized Background --- */
.bg-waves {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  background: var(--bg-dark);
}

.wave-container {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

.wave {
  position: absolute;
  top: 50%;
  left: -25%;
  width: 150%;
  height: 400px;
  background: transparent;
  opacity: 0.15;
  transform: translateY(-50%);
}

.wave svg {
  width: 100%;
  height: 100%;
}

.wave path {
  fill: none;
  stroke: var(--primary);
  stroke-width: 3;
  stroke-linecap: round;
  animation: snakyMove 20s infinite ease-in-out;
  will-change: transform;
}

.wave:nth-child(2) path {
  stroke: var(--secondary);
  animation-delay: -10s;
  animation-duration: 25s;
}

.wave:nth-child(3) path {
  stroke: var(--primary);
  opacity: 0.2;
  animation-delay: -15s;
  animation-duration: 30s;
}

@keyframes snakyMove {
  0%, 100% {
    transform: translateX(0) scaleY(1);
  }
  50% {
    transform: translateX(2%) scaleY(1.1);
  }
}

/* Disable expensive wave animations on mobile */
@media (max-width: 768px) {
  .wave path {
    animation: none;
    opacity: 0.08;
  }
}

h1, h2, h3, h4, .logo {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.container {
  width: 90%;
  max-width: 1280px;
  margin: 0 auto;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  font-size: 1.5rem;
  color: var(--text-main);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo span {
  background: var(--gradient-tech);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
  position: relative;
}

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

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.2s ease;
  will-change: width;
}

.nav-links a:hover::after {
  width: 100%;
}

/* Hero Section */
.hero {
  padding: 180px 0 100px;
  min-height: 90vh;
  display: flex;
  align-items: center;
  position: relative;
}

.hero-content {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-tagline {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 99px;
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 24px;
  animation: fadeInDown 0.8s ease-out;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.1;
  margin-bottom: 24px;
  animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.hero h1 span {
  background: var(--gradient-tech);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 600px;
  animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  animation: fadeInUp 0.8s ease-out 0.6s backwards;
}

.hero-visual {
  position: relative;
  animation: fadeInRight 1s ease-out 0.8s backwards;
}

.hero-visual img {
  width: 100%;
  border-radius: 24px;
  box-shadow: var(--shadow-premium);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  border: none;
  font-size: 1rem;
  will-change: transform;
}

.btn-primary {
  background: rgb(222, 109, 3);
  color: white;
  box-shadow: 0 4px 14px 0 rgba(255, 165, 0, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 165, 0, 0.4);
}

.btn-brown {
  background: var(--gradient-brown);
  color: white;
  box-shadow: 0 4px 14px 0 rgba(139, 69, 19, 0.3);
  will-change: transform;
}

.btn-brown:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 69, 19, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border);
}

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

/* Sections */
section {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 60px;
}

.section-label {
  color: var(--primary);
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
  display: block;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.5rem);
  margin-bottom: 16px;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.125rem;
}

/* Service Cards */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 40px;
  border-radius: 24px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  will-change: transform;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-tech);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.service-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary);
}

.service-card > * {
  position: relative;
  z-index: 1;
}

.service-icon {
  width: 60px;
  height: 60px;
  background: rgba(56, 189, 248, 0.1);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--primary);
  font-size: 1.5rem;
}

.service-card h3 {
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.service-card p {
  color: var(--text-muted);
}

/* Stats */
.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  background: var(--bg-card);
  padding: 60px;
  border-radius: 32px;
  border: 1px solid var(--border);
  text-align: center;
}

.stat-item h4 {
  font-size: 3rem;
  background: var(--gradient-tech);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}

.stat-item p {
  color: var(--text-muted);
  font-weight: 500;
}

/* Footer */
.footer {
  padding: 100px 0 40px;
  background: #010409;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 60px;
  margin-bottom: 60px;
}

.footer-about .logo {
  margin-bottom: 24px;
}

.footer-about p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

.footer h5 {
  color: var(--text-main);
  font-size: 1.125rem;
  margin-bottom: 24px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.footer-bottom {
  padding-top: 40px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Performance: Reduce motion for accessibility & lower-end devices */
@media (prefers-reduced-motion: reduce), (max-width: 768px) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- Global Loader --- */
#global-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: var(--bg-dark);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
}

#global-loader.active {
  opacity: 1 !important;
  visibility: visible !important;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(125, 211, 252, 0.1);
  border-left-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  will-change: transform;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Mobile Navigation --- */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  z-index: 1002;
  padding: 8px;
}

.mobile-only {
  display: none;
}

@media (max-width: 992px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 400px;
    height: 100vh;
    background: var(--glass);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 32px;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    z-index: 1001;
    margin: 0;
    padding: 0;
  }

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

  .nav-content .btn-primary {
    display: none; /* Hide on mobile in navbar */
  }

  .mobile-only {
    display: block;
    width: 80%;
    text-align: center;
  }

  .mobile-only .btn-primary {
    display: inline-block;
    width: 100%;
  }

  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-buttons {
    justify-content: center;
  }

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

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* Logo Image Styling */
.logo img {
  height: 32px;
  width: auto;
  vertical-align: middle;
}
