/* SpartanX Design System Tokens & Base Styles */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --bg-warm-light: #F9F9F6;
  --bg-subtle: #F4F4EE;
  --bg-card: #FFFFFF;
  --bg-card-hover: #FAFAF8;
  --bg-dark: #0D0D10;
  --bg-dark-card: #15151A;
  --bg-dark-border: rgba(255, 255, 255, 0.08);
  --bg-dark-elevated: #1A1A22;
  
  --text-primary: #0C0C0D;
  --text-secondary: #555558;
  --text-muted: #8E8E93;
  --text-dark-primary: #F4F4F6;
  --text-dark-secondary: #9E9EA4;
  --text-dark-muted: #64646B;

  --accent-red: #E53935;
  --accent-red-glow: rgba(229, 57, 53, 0.15);
  --accent-emerald: #10B981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.15);
  --accent-amber: #F59E0B;
  
  --border-light: rgba(12, 12, 13, 0.08);
  --border-light-strong: rgba(12, 12, 13, 0.14);
  --border-focus: #0C0C0D;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.07), 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-dark: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 1px rgba(255, 255, 255, 0.15);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background-color: var(--bg-warm-light);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background-color: var(--bg-warm-light);
  line-height: 1.55;
  letter-spacing: -0.015em;
}

/* Typography Headings */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  letter-spacing: -0.035em;
  font-weight: 700;
  line-height: 1.1;
}

h1 {
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

h2 {
  font-size: clamp(1.85rem, 3.2vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

h3 {
  font-size: clamp(1.25rem, 1.8vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.025em;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* SpartanX Badges & Pills */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  border-radius: var(--radius-full);
  background: #0C0C0D;
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.12);
  width: fit-content;
}

.badge-pill.light {
  background: rgba(12, 12, 13, 0.05);
  color: #0C0C0D;
  border: 1px solid var(--border-light);
}

.badge-pill.dark-mode {
  background: rgba(255, 255, 255, 0.08);
  color: #F4F4F6;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.badge-pill .pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-red);
  box-shadow: 0 0 0 2px rgba(229, 57, 53, 0.25);
  animation: pulse-dot 2s infinite ease-in-out;
}

.badge-pill.live .pulse-dot {
  background: var(--accent-emerald);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Button System */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.35rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  background: #0C0C0D;
  color: #FFFFFF;
  border: 1px solid #0C0C0D;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  transition: transform 0.15s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  background: #232326;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.35rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  background: #FFFFFF;
  color: #0C0C0D;
  border: 1px solid var(--border-light-strong);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-secondary:hover {
  background: #FAFAF7;
  border-color: #0C0C0D;
  transform: translateY(-1px);
}

.btn-dark {
  background: #FFFFFF;
  color: #0C0C0D;
  border: 1px solid #FFFFFF;
}
.btn-dark:hover {
  background: #EAEAEA;
  color: #000;
}

.btn-dark-outline {
  background: transparent;
  color: #F4F4F6;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.btn-dark-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #FFFFFF;
}

/* Layout Utilities */
.container-custom {
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

@media (min-width: 1400px) {
  .container-custom {
    max-width: 1280px;
  }
}

.section-padding {
  padding-top: 5.5rem;
  padding-bottom: 5.5rem;
}

@media (max-width: 768px) {
  .section-padding {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }
}

/* Subtle Grid Background Pattern */
.bg-grid-pattern {
  background-image: radial-gradient(rgba(12, 12, 13, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
}

.bg-dark-grid-pattern {
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Sticky Header */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(249, 249, 246, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  transition: all 0.25s ease;
}

.site-nav.scrolled {
  background: rgba(249, 249, 246, 0.96);
  border-bottom-color: rgba(12, 12, 13, 0.12);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

/* Terminal / Code Window */
.terminal-window {
  background: #0B0B0E;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.5), 0 0 1px 1px rgba(255, 255, 255, 0.1);
  overflow: hidden;
  font-family: var(--font-mono);
}

.terminal-header {
  background: #141418;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-dot.red { background: #EF4444; }
.terminal-dot.yellow { background: #F59E0B; }
.terminal-dot.green { background: #10B981; }

.terminal-body {
  padding: 1.25rem;
  font-size: 0.8125rem;
  line-height: 1.65;
  color: #E2E2E6;
  height: 380px;
  overflow-y: auto;
}

/* Custom Scrollbar for Terminal */
.terminal-body::-webkit-scrollbar {
  width: 6px;
}
.terminal-body::-webkit-scrollbar-track {
  background: transparent;
}
.terminal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

/* Tab Card Styling */
.surface-tab-btn {
  padding: 0.625rem 1.125rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  color: var(--text-secondary);
  background: transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.surface-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(12, 12, 13, 0.04);
}

.surface-tab-btn.active {
  color: #FFFFFF;
  background: #0C0C0D;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

/* Card Glow Effect */
.card-hover-border {
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-hover-border:hover {
  border-color: rgba(12, 12, 13, 0.22);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* Dark Section Cards */
.dark-card {
  background: var(--bg-dark-card);
  border: 1px solid var(--bg-dark-border);
  border-radius: var(--radius-lg);
  transition: all 0.25s ease;
}

.dark-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

/* Modal Window */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 12, 13, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light-strong);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  max-width: 540px;
  width: 100%;
  padding: 2rem;
  transform: translateY(20px) scale(0.98);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-overlay.active .modal-box {
  transform: translateY(0) scale(1);
}

/* Accordion FAQ */
.faq-item {
  border-bottom: 1px solid var(--border-light);
  padding: 1.25rem 0;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem 0;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  opacity: 0;
}

.faq-item.active .faq-answer {
  max-height: 300px;
  opacity: 1;
  margin-top: 0.75rem;
}

.faq-icon {
  transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

/* Input Fields */
.spartanx-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  font-family: inherit;
  color: var(--text-primary);
  background: #FFFFFF;
  border: 1px solid var(--border-light-strong);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.spartanx-input:focus {
  border-color: #0C0C0D;
  box-shadow: 0 0 0 3px rgba(12, 12, 13, 0.08);
}

.spartanx-input-dark {
  background: #121217;
  color: #F4F4F6;
  border-color: rgba(255, 255, 255, 0.12);
}

.spartanx-input-dark:focus {
  border-color: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}
