/* ============================================
   TALIMNA ELITE DESIGN SYSTEM v2.0
   Military-grade | S-Class | Performance-optimized
   ============================================ */

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

:root {
  /* Core palette */
  --bg-deep: #05080f;
  --bg-surface: #0a0f1a;
  --bg-card: #0f1625;
  --bg-card-hover: #141c2e;
  --bg-glass: rgba(15, 22, 37, 0.85);
  
  /* Accent gradients */
  --accent-teal: #00f0ff;
  --accent-teal-dim: rgba(0, 240, 255, 0.15);
  --accent-gold: #ffd700;
  --accent-gold-dim: rgba(255, 215, 0, 0.12);
  --accent-emerald: #00ff88;
  --accent-emerald-dim: rgba(0, 255, 136, 0.1);
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #00f0ff, #00ff88);
  --gradient-accent: linear-gradient(135deg, #00f0ff, #ffd700);
  --gradient-gold: linear-gradient(135deg, #ffd700, #ff8c00);
  --gradient-dark: linear-gradient(180deg, #05080f 0%, #0a0f1a 100%);
  
  /* Text */
  --text-primary: #f0f4f8;
  --text-secondary: #8899aa;
  --text-muted: #556677;
  --text-inverse: #05080f;
  
  /* Borders */
  --border-subtle: rgba(0, 240, 255, 0.08);
  --border-active: rgba(0, 240, 255, 0.3);
  --border-card: rgba(255, 255, 255, 0.04);
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-lg: 0 16px 64px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 40px rgba(0, 240, 255, 0.1);
  --shadow-glow-gold: 0 0 40px rgba(255, 215, 0, 0.08);
  
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;
  
  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   RESET + BASE
   ============================================ */
*, *::before, *::after { 
  margin: 0; padding: 0; box-sizing: border-box; 
}

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

body {
  font-family: var(--font-sans);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

::selection {
  background: var(--accent-teal);
  color: var(--bg-deep);
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { 
  background: var(--border-subtle); 
  border-radius: 3px; 
}
::-webkit-scrollbar-thumb:hover { background: var(--accent-teal-dim); }

/* ============================================
   PARTICLE CANVAS
   ============================================ */
#particle-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 0.6;
}

/* ============================================
   NAVIGATION — Glassmorphism
   ============================================ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(5, 8, 15, 0.8);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition-base);
}

nav.scrolled {
  background: rgba(5, 8, 15, 0.95);
  box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -1px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  position: relative;
}

.nav-logo::after {
  content: 'α';
  position: absolute;
  top: -6px; right: -16px;
  font-size: 0.6rem;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 400;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition-fast);
  position: relative;
  padding: 4px 0;
}

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

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

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

.nav-cta {
  background: var(--gradient-primary);
  color: var(--text-inverse) !important;
  padding: 8px 20px !important;
  border-radius: var(--radius-full);
  font-weight: 700 !important;
  font-size: 0.8rem !important;
  transition: var(--transition-base) !important;
  box-shadow: var(--shadow-glow);
}

.nav-cta::after { display: none !important; }
.nav-cta:hover { 
  transform: translateY(-1px);
  box-shadow: 0 0 50px rgba(0, 240, 255, 0.2);
}

/* Mobile menu */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.mobile-toggle span {
  width: 24px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition-base);
}

.mobile-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

@media (max-width: 768px) {
  .mobile-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: 72px; left: 0; right: 0;
    background: rgba(5, 8, 15, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: var(--space-2xl);
    gap: var(--space-lg);
    transform: translateY(-120%);
    opacity: 0;
    transition: var(--transition-base);
    border-bottom: 1px solid var(--border-subtle);
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-teal-dim);
  border: 1px solid var(--border-subtle);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-teal);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: var(--space-xl);
  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
}

.hero-badge .dot {
  width: 6px; height: 6px;
  background: var(--accent-emerald);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.hero h1 {
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 1.05;
  margin-bottom: var(--space-lg);
  opacity: 0;
  animation: fadeUp 0.6s ease 0.15s forwards;
}

.hero h1 .gradient-text {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s ease-in-out infinite;
  background-size: 200% 100%;
}

@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto var(--space-2xl);
  line-height: 1.7;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.3s forwards;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-3xl);
  margin-bottom: var(--space-2xl);
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.45s forwards;
}

.hero-stats .stat { text-align: center; }

.hero-stats .stat .num {
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-variant-numeric: tabular-nums;
}

.hero-stats .stat .label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

.hero-btns {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.6s forwards;
}

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

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  transition: var(--transition-base);
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(255,255,255,0.05);
  transform: translateX(-100%);
  transition: var(--transition-base);
}

.btn:hover::before { transform: translateX(0); }

.btn-primary {
  background: var(--gradient-primary);
  color: var(--text-inverse);
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 60px rgba(0, 240, 255, 0.25);
}

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

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

.btn-gold {
  background: var(--gradient-gold);
  color: var(--text-inverse);
  box-shadow: var(--shadow-glow-gold);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 60px rgba(255, 215, 0, 0.2);
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
  position: relative;
  z-index: 1;
  padding: var(--space-4xl) var(--space-lg);
  max-width: 1280px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: var(--space-md);
}

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

.section-header p {
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
  font-size: 1rem;
}

/* ============================================
   CARDS — Glassmorphism + 3D Hover
   ============================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.card {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: var(--transition-base);
  cursor: default;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
              rgba(0, 240, 255, 0.03), transparent 40%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s;
}

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

.card:hover {
  border-color: var(--border-subtle);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.card-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  background: var(--accent-teal-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: var(--space-md);
  border: 1px solid var(--border-subtle);
}

.card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============================================
   SERVICE CARDS — MCP Grid
   ============================================ */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
}

.service-card {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  transition: var(--transition-base);
  cursor: default;
}

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

.service-card .port {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.service-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.service-card .desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  min-height: 40px;
}

.service-card .meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

.service-card .price {
  font-family: var(--font-mono);
  color: var(--accent-teal);
  font-weight: 600;
}

.service-card .status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent-emerald);
  font-size: 0.75rem;
}

.service-card .status .pulse {
  width: 4px; height: 4px;
  background: var(--accent-emerald);
  border-radius: 50%;
  animation: pulse-dot 2s ease infinite;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-3xl) var(--space-lg) var(--space-xl);
  text-align: center;
}

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

footer .footer-links {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

footer .footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  transition: var(--transition-fast);
}

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

/* ============================================
   UTILITY
   ============================================ */
.text-center { text-align: center; }
.mt-xl { margin-top: var(--space-xl); }
.mb-xl { margin-bottom: var(--space-xl); }

.glass {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: skeleton 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .hero-stats { gap: var(--space-xl); }
  .hero-stats .stat .num { font-size: 1.5rem; }
  .card-grid, .service-grid { grid-template-columns: 1fr; }
  .section { padding: var(--space-2xl) var(--space-md); }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 2rem; }
  .hero-btns { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
}