/* ========================================
   KAMYA Technology Group — Custom Styles
   Design System: Dark-first, cyber-themed
   ======================================== */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Brand Colors */
  --color-primary: #0A1628;
  --color-primary-light: #162040;
  --color-accent: #00D4FF;
  --color-accent-alt: #7C3AED;
  --color-success: #10B981;
  --color-warning: #F59E0B;
  --color-danger: #EF4444;

  /* Surfaces */
  --color-surface: #0F172A;
  --color-surface-elevated: #1E293B;
  --color-surface-hover: #334155;

  /* Text */
  --color-text-primary: #E2E8F0;
  --color-text-secondary: #94A3B8;
  --color-text-muted: #64748B;

  /* Gradient */
  --gradient-accent: linear-gradient(135deg, #00D4FF, #7C3AED);
  --gradient-hero: linear-gradient(160deg, #0A1628 0%, #162040 50%, #0F172A 100%);
  --gradient-card: linear-gradient(145deg, rgba(22,32,64,0.8), rgba(15,23,42,0.6));

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 20px rgba(0,212,255,0.15);

  /* Typography */
  --font-heading: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  /* Spacing */
  --section-padding: 6rem 0;
  --container-max: 1200px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;

  /* Border */
  --border-color: rgba(148, 163, 184, 0.1);
  --border-radius: 12px;
  --border-radius-lg: 20px;
}

/* ---------- Light Mode Overrides ---------- */
[data-theme="light"] {
  --color-surface: #F8FAFC;
  --color-surface-elevated: #FFFFFF;
  --color-surface-hover: #F1F5F9;
  --color-text-primary: #1E293B;
  --color-text-secondary: #475569;
  --color-text-muted: #94A3B8;
  --gradient-hero: linear-gradient(160deg, #F8FAFC 0%, #E2E8F0 50%, #F1F5F9 100%);
  --gradient-card: linear-gradient(145deg, rgba(255,255,255,0.9), rgba(241,245,249,0.7));
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.1);
  --shadow-glow: 0 0 20px rgba(0,212,255,0.08);
  --border-color: rgba(30, 41, 59, 0.08);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--color-surface);
  color: var(--color-text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text-primary);
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--color-accent-alt);
}

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

/* ---------- Utility Classes ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: var(--section-padding);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 2px;
  background: var(--gradient-accent);
  border-radius: 1px;
}

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

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

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-accent);
  color: #fff;
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 212, 255, 0.45);
  color: #fff;
}

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

.btn-outline:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-2px);
}

/* ---------- Navigation ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 0;
  transition: all var(--transition-slow);
  background: transparent;
}

.navbar.scrolled {
  background: rgba(10, 22, 40, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.65rem 0;
}

[data-theme="light"] .navbar.scrolled {
  background: rgba(248, 250, 252, 0.85);
}

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

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-text-primary);
}

.navbar-brand:hover {
  color: var(--color-text-primary);
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: var(--gradient-accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #fff;
}

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

.nav-links a {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition-base);
  position: relative;
}

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

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-accent);
  transition: width var(--transition-base);
}

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

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle {
  background: var(--color-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-text-secondary);
  font-size: 1.1rem;
  transition: all var(--transition-base);
}

.theme-toggle:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

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

/* ---------- Mobile Nav ---------- */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    max-width: 320px;
    height: 100vh;
    background: var(--color-primary);
    flex-direction: column;
    align-items: flex-start;
    padding: 5rem 2rem 2rem;
    gap: 1.5rem;
    transition: right var(--transition-slow);
    border-left: 1px solid var(--border-color);
  }

  [data-theme="light"] .nav-links {
    background: var(--color-surface-elevated);
  }

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

  .nav-links a {
    font-size: 1.1rem;
  }

  .mobile-toggle {
    display: flex;
  }

  .nav-right .btn {
    display: none;
  }
}

/* ---------- Hero Section ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
  padding-top: 5rem;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(0,212,255,0.08) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 8s ease-in-out infinite;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(124,58,237,0.06) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-40px); }
}

.hero .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-content {
  max-width: 580px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.hero-description {
  font-size: 1.15rem;
  color: var(--color-text-secondary);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 2.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.hero-stat h3 {
  font-size: 1.75rem;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-stat p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

/* Hero Visual */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-graphic {
  width: 100%;
  max-width: 500px;
  aspect-ratio: 1;
  position: relative;
}

.hero-graphic .orbit {
  position: absolute;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  animation: spin 20s linear infinite;
}

.hero-graphic .orbit:nth-child(1) {
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

.hero-graphic .orbit:nth-child(2) {
  width: 75%;
  height: 75%;
  top: 12.5%;
  left: 12.5%;
  animation-duration: 15s;
  animation-direction: reverse;
}

.hero-graphic .orbit:nth-child(3) {
  width: 50%;
  height: 50%;
  top: 25%;
  left: 25%;
  animation-duration: 10s;
}

.hero-graphic .orbit-dot {
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--gradient-accent);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(0,212,255,0.5);
}

.hero-graphic .orbit:nth-child(1) .orbit-dot { top: -6px; left: 50%; }
.hero-graphic .orbit:nth-child(2) .orbit-dot { bottom: -6px; right: 20%; }
.hero-graphic .orbit:nth-child(3) .orbit-dot { top: 50%; left: -6px; }

.hero-graphic .center-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: var(--gradient-accent);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 0 40px rgba(0,212,255,0.3);
}

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

@media (max-width: 768px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
  }

  .hero-visual {
    display: none;
  }
}

/* ---------- Services Section ---------- */
.services {
  background: var(--color-surface);
}

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

.services-header .section-subtitle {
  margin: 0 auto;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 2rem;
  transition: all var(--transition-slow);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-accent);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-glow);
  border-color: rgba(0, 212, 255, 0.2);
}

.service-card:hover::before {
  opacity: 1;
}

.service-icon {
  width: 52px;
  height: 52px;
  background: rgba(0, 212, 255, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  color: var(--color-accent);
}

.service-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
}

.service-card p {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.service-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-accent);
}

.service-link:hover {
  gap: 0.6rem;
}

/* ---------- Why Us / Credibility Section ---------- */
.why-us {
  background: var(--color-primary);
}

[data-theme="light"] .why-us {
  background: #EFF6FF;
}

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

.why-us-header .section-subtitle {
  margin: 0 auto;
}

.why-us-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.why-us-item {
  text-align: center;
  padding: 2rem 1.5rem;
}

.why-us-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.15);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: var(--color-accent);
}

.why-us-item h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.why-us-item p {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* ---------- CTA Section ---------- */
.cta-section {
  background: var(--color-surface);
  text-align: center;
}

.cta-box {
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 4rem 3rem;
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-accent);
}

.cta-box h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  margin-bottom: 1rem;
}

.cta-box p {
  color: var(--color-text-secondary);
  max-width: 500px;
  margin: 0 auto 2rem;
  font-size: 1.05rem;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--color-primary);
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--border-color);
}

[data-theme="light"] .footer {
  background: #1E293B;
  --color-text-primary: #E2E8F0;
  --color-text-secondary: #94A3B8;
  --color-text-muted: #64748B;
  --border-color: rgba(148, 163, 184, 0.15);
}

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

.footer-brand p {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  margin-top: 1rem;
  max-width: 280px;
  line-height: 1.7;
}

.footer-col h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: var(--color-text-primary);
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.6rem;
}

.footer-col ul a {
  color: var(--color-text-secondary);
  font-size: 0.85rem;
  transition: color var(--transition-base);
}

.footer-col ul a:hover {
  color: var(--color-accent);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.footer-socials {
  display: flex;
  gap: 0.75rem;
}

.footer-socials a {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  font-size: 1rem;
  transition: all var(--transition-base);
}

.footer-socials a:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-2px);
}

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

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    justify-content: center;
    text-align: center;
  }
}

/* ---------- Scroll Animations ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.stagger > .fade-in:nth-child(1) { transition-delay: 0s; }
.stagger > .fade-in:nth-child(2) { transition-delay: 0.1s; }
.stagger > .fade-in:nth-child(3) { transition-delay: 0.2s; }
.stagger > .fade-in:nth-child(4) { transition-delay: 0.3s; }
.stagger > .fade-in:nth-child(5) { transition-delay: 0.4s; }
.stagger > .fade-in:nth-child(6) { transition-delay: 0.5s; }
