/* ========================================
   OpenSPM - Professional Style System
   ======================================== */

/* === Color Variables === */
:root {
  /* Primary Colors */
  --primary-color: #0066ff;
  --primary-hover: #0052cc;
  --primary-light: #3385ff;
  --primary-dark: #004099;
  
  /* Secondary Colors */
  --secondary-color: #6c757d;
  --secondary-hover: #5a6268;
  --secondary-light: #868e96;
  
  /* Accent Colors */
  --accent-color: #10b981;
  --accent-hover: #059669;
  --warning-color: #f59e0b;
  --error-color: #ef4444;
  --success-color: #10b981;
  
  /* Dark Theme Colors */
  --bg-primary: #0a0e27;
  --bg-secondary: #0f1420;
  --bg-tertiary: #151a2d;
  --bg-hover: #1a1f35;
  --bg-card: #13182b;
  --bg-gray: #0d1117;
  
  /* Text Colors */
  --text-primary: #ffffff;
  --text-secondary: #b0b8c8;
  --text-tertiary: #8891a8;
  --text-muted: #6b7280;
  
  /* Border Colors */
  --border-color: #1e2537;
  --border-light: #252d42;
  --border-hover: #2d3548;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;
  
  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* === Base Styles === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
  color: var(--text-secondary);
  line-height: 1.7;
}

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

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

/* === Text Utilities === */
.text-primary { color: var(--primary-color) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-white { color: var(--text-primary) !important; }

/* === Navbar === */
.navbar {
  background: rgba(10, 14, 39, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
  transition: var(--transition-base);
  z-index: 1000;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary) !important;
  letter-spacing: -0.01em;
}

.brand-icon-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.brand-text {
  letter-spacing: -0.5px;
}

.nav-link {
  color: var(--text-secondary) !important;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  transition: var(--transition-base);
  position: relative;
  font-size: 0.95rem;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary) !important;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 60%;
  height: 2px;
  background: var(--primary-color);
  transition: var(--transition-base);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: translateX(-50%) scaleX(1);
}

/* === Buttons === */
.btn {
  border: none;
  border-radius: var(--radius-md);
  padding: 0.625rem 1.5rem;
  font-weight: 500;
  transition: var(--transition-base);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

.btn-primary-custom {
  background: var(--primary-color);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.btn-primary-custom:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  color: var(--text-primary);
}

.btn-secondary-custom {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.btn-secondary-custom:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

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

.btn-outline-custom:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.btn-lg {
  padding: 0.875rem 2rem;
  font-size: 1rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* === Hero Section === */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 30%, rgba(0, 102, 255, 0.06) 0%, transparent 60%),
    radial-gradient(circle at 80% 70%, rgba(0, 102, 255, 0.04) 0%, transparent 60%);
  z-index: -1;
}

.hero-content {
  animation: fadeInUp 0.8s ease;
}

.hero-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.hero-title {
  font-size: 3rem;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.7;
  max-width: 90%;
}

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

.hero-stats {
  display: flex;
  gap: 2rem;
  align-items: center;
  flex-wrap: wrap;
}

.stat-item {
  text-align: left;
}

.stat-number {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  margin-top: 0.25rem;
  font-weight: 500;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border-color);
}

/* === Terminal === */
.hero-terminal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  animation: fadeIn 0.8s ease 0.2s both;
}

.terminal-header {
  background: var(--bg-tertiary);
  padding: 0.875rem 1rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text-muted);
}

.terminal-dot:nth-child(1) { background: #ef4444; }
.terminal-dot:nth-child(2) { background: #f59e0b; }
.terminal-dot:nth-child(3) { background: #10b981; }

.terminal-title {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

.terminal-body {
  padding: 1.5rem;
  font-family: 'Courier New', 'Consolas', monospace;
  font-size: 0.9rem;
  line-height: 1.8;
}

.terminal-line {
  margin-bottom: 0.5rem;
  animation: typewriter 0.5s steps(40) forwards;
  opacity: 0;
}

.terminal-line:nth-child(1) { animation-delay: 0.5s; }
.terminal-line:nth-child(2) { animation-delay: 1s; }
.terminal-line:nth-child(3) { animation-delay: 1.5s; }
.terminal-line:nth-child(4) { animation-delay: 2s; }
.terminal-line:nth-child(5) { animation-delay: 2.5s; }
.terminal-line:nth-child(6) { animation-delay: 3s; }
.terminal-line:nth-child(7) { animation-delay: 3.5s; }
.terminal-line:nth-child(8) { animation-delay: 4s; }

.terminal-prompt {
  color: var(--primary-color);
  margin-right: 0.5rem;
}

.terminal-output {
  color: var(--text-secondary);
  padding-left: 1.5rem;
}

.terminal-output.success {
  color: var(--success-color);
}

/* === Sections === */
.section-padding {
  padding: 6rem 0;
}

.section-gray {
  background: var(--bg-secondary);
}

.section-header {
  margin-bottom: 4rem;
}

.section-label {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-weight: 500;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.7;
}

/* === Feature Cards === */
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  height: 100%;
  transition: var(--transition-base);
  cursor: pointer;
}

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

.feature-icon-wrapper {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.feature-icon {
  width: 28px;
  height: 28px;
  color: var(--primary-color);
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.feature-description {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.95rem;
}

/* === Statistics Cards === */
.stats-card {
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: var(--transition-base);
}

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

.stats-number {
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.stats-label {
  font-size: 0.95rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

/* === Card Variants === */
.card-primary {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.card-hover {
  transition: var(--transition-base);
}

.card-hover:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.card-bordered {
  border: 1px solid var(--border-light);
}

/* === CTA Section === */
.cta-section {
  padding: 6rem 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.cta-title {
  font-size: 2.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.cta-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.footer-description {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 0.95rem;
  line-height: 1.7;
}

.footer-heading {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.footer-links li {
  margin-bottom: 0.625rem;
}

.footer-links a {
  color: var(--text-secondary);
  transition: var(--transition-base);
  font-size: 0.95rem;
}

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

.footer-bottom {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.875rem;
}

/* === Animations === */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes typewriter {
  to { opacity: 1; }
}

/* === Utility Classes === */
.container-fluid-custom {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }
.mt-5 { margin-top: var(--spacing-xl); }

.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }
.mb-5 { margin-bottom: var(--spacing-xl); }

.p-1 { padding: var(--spacing-xs); }
.p-2 { padding: var(--spacing-sm); }
.p-3 { padding: var(--spacing-md); }
.p-4 { padding: var(--spacing-lg); }
.p-5 { padding: var(--spacing-xl); }

/* === Grid System Utilities === */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

/* === Flex Utilities === */
.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

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

.flex-column {
  display: flex;
  flex-direction: column;
}

.gap-1 { gap: var(--spacing-xs); }
.gap-2 { gap: var(--spacing-sm); }
.gap-3 { gap: var(--spacing-md); }
.gap-4 { gap: var(--spacing-lg); }

/* === Background Utilities === */
.bg-primary { background-color: var(--bg-primary); }
.bg-secondary { background-color: var(--bg-secondary); }
.bg-tertiary { background-color: var(--bg-tertiary); }
.bg-card { background-color: var(--bg-card); }

/* === Border Utilities === */
.border-primary { border: 1px solid var(--border-color); }
.border-light { border: 1px solid var(--border-light); }
.border-none { border: none; }

.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-full { border-radius: var(--radius-full); }
.rounded-circle { border-radius: 50%; }

/* === Shadow Utilities === */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }

/* === Image Utilities === */
.img-circle {
  border-radius: 50%;
  object-fit: cover;
}

.img-rounded {
  border-radius: var(--radius-lg);
  object-fit: cover;
}

/* === Responsive Utilities === */
@media (max-width: 1200px) {
  h1 { font-size: 2.5rem; }
  .hero-title { font-size: 2.5rem; }
  .section-title { font-size: 2rem; }
}

@media (max-width: 992px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.875rem; }
  .hero-title { font-size: 2.25rem; }
  .section-padding { padding: 4rem 0; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .hero-subtitle { max-width: 100%; }
}

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  .hero-title { font-size: 2rem; }
  .hero-subtitle { font-size: 1rem; }
  .hero-buttons { flex-direction: column; width: 100%; }
  .hero-buttons .btn { width: 100%; }
  .hero-stats { gap: 1.5rem; }
  .section-padding { padding: 3rem 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .terminal-body { font-size: 0.85rem; padding: 1rem; }
  .stat-divider { display: none; }
  .cta-buttons { flex-direction: column; width: 100%; }
  .cta-buttons .btn { width: 100%; }
}

@media (max-width: 576px) {
  h1 { font-size: 1.75rem; }
  .hero-title { font-size: 1.75rem; }
  .section-title { font-size: 1.5rem; }
  .btn-lg { padding: 0.75rem 1.5rem; font-size: 0.95rem; }
  .feature-card { padding: 1.5rem; }
  .stats-number { font-size: 2rem; }
}