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

/* CSS Custom Properties & Design System */
:root {
  /* Light Theme Variables */
  --bg-color: #f8fafc;
  --bg-gradient: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  --surface-color: #ffffff;
  --surface-alt: #f1f5f9;
  --surface-glass: rgba(255, 255, 255, 0.75);
  --border-color: #e2e8f0;
  --border-glass: rgba(226, 232, 240, 0.8);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  
  --primary: #0d9488;
  --primary-rgb: 13, 148, 136;
  --primary-hover: #0f766e;
  --primary-light: #ccfbf1;
  --primary-light-text: #115e59;
  
  --accent: #6366f1;
  --accent-rgb: 99, 102, 241;
  --accent-hover: #4f46e5;
  --accent-light: #e0e7ff;
  
  --success: #10b981;
  --danger: #ef4444;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 25px rgba(13, 148, 136, 0.15);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme Variables */
body.dark-mode {
  --bg-color: #0b0f19;
  --bg-gradient: linear-gradient(135deg, #0b0f19 0%, #080b12 100%);
  --surface-color: #121826;
  --surface-alt: #1b2437;
  --surface-glass: rgba(18, 24, 38, 0.75);
  --border-color: #1f293d;
  --border-glass: rgba(31, 41, 61, 0.8);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --primary: #14b8a6;
  --primary-rgb: 20, 184, 166;
  --primary-hover: #2dd4bf;
  --primary-light: #112d2b;
  --primary-light-text: #2dd4bf;
  
  --accent: #818cf8;
  --accent-rgb: 129, 140, 248;
  --accent-hover: #a5b4fc;
  --accent-light: #1b1e36;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 35px rgba(20, 184, 166, 0.2);
}

/* Reset and Global Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-color);
  background-image: var(--bg-gradient);
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text-primary);
}

a {
  color: inherit;
  text-decoration: none;
  transition: all var(--transition-fast);
}

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

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

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

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

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

@keyframes pulseGlow {
  0% { transform: scale(1); opacity: 0.15; }
  50% { transform: scale(1.05); opacity: 0.25; }
  100% { transform: scale(1); opacity: 0.15; }
}

.animate-fade {
  animation: fadeIn 0.8s ease-out forwards;
}

.animate-slide {
  animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* Sticky Glassmorphism Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-glass);
  z-index: 100;
  display: flex;
  align-items: center;
  transition: background-color var(--transition-normal), border-color var(--transition-normal), height var(--transition-normal);
}

.site-header.scrolled {
  height: 64px;
  box-shadow: var(--shadow-sm);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 22px;
  color: var(--text-primary);
}

.brand img {
  width: 32px;
  height: 32px;
  transition: transform var(--transition-normal);
}

.brand:hover img {
  transform: rotate(-10deg) scale(1.1);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  position: relative;
  padding: 8px 0;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--transition-normal);
}

.nav-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Theme Toggle Button */
.theme-toggle {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.theme-toggle:hover {
  background: var(--surface-alt);
  border-color: var(--text-muted);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

/* Sun/Moon Display */
.theme-toggle .sun-icon {
  display: none;
}
.theme-toggle .moon-icon {
  display: block;
}
body.dark-mode .theme-toggle .sun-icon {
  display: block;
}
body.dark-mode .theme-toggle .moon-icon {
  display: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 15px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-normal);
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.25);
}

.btn-secondary {
  background: var(--surface-color);
  color: var(--text-primary);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: var(--surface-alt);
  border-color: var(--text-muted);
  transform: translateY(-2px);
}

.btn-glow {
  position: relative;
  overflow: hidden;
}

.btn-glow::after {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
  z-index: -1;
  border-radius: inherit;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.btn-glow:hover::after {
  opacity: 1;
}

/* Hero Section */
.hero {
  padding-top: 160px;
  padding-bottom: 100px;
  position: relative;
  overflow: hidden;
}

.hero-bg-blobs {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: var(--radius-full);
  filter: blur(100px);
  opacity: 0.15;
  mix-blend-mode: multiply;
  animation: pulseGlow 10s infinite alternate;
}

body.dark-mode .blob {
  opacity: 0.25;
  mix-blend-mode: screen;
}

.blob-1 {
  top: 10%;
  left: 5%;
  width: 400px;
  height: 400px;
  background: var(--primary);
}

.blob-2 {
  bottom: 15%;
  right: 5%;
  width: 500px;
  height: 500px;
  background: var(--accent);
  animation-delay: -3s;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-light);
  color: var(--primary-light-text);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 24px;
  border: 1px solid rgba(var(--primary-rgb), 0.15);
}

.hero-badge svg {
  width: 14px;
  height: 14px;
}

.hero-title {
  font-size: clamp(38px, 5vw, 60px);
  line-height: 1.1;
  margin-bottom: 24px;
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 36px;
  max-width: 580px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* Hero Showcase Panel */
.hero-showcase {
  position: relative;
  z-index: 2;
}

.showcase-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-xl);
  backdrop-filter: blur(20px);
  animation: float 6s ease-in-out infinite;
}

body.dark-mode .showcase-wrapper {
  background: linear-gradient(135deg, rgba(31, 41, 61, 0.5), rgba(17, 24, 39, 0.5));
  border-color: rgba(31, 41, 61, 0.5);
  box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.showcase-image {
  border-radius: calc(var(--radius-lg) - 4px);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.showcase-glow-back {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  height: 90%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  filter: blur(40px);
  opacity: 0.15;
  z-index: -1;
  border-radius: var(--radius-lg);
}

body.dark-mode .showcase-glow-back {
  opacity: 0.3;
}

/* Feature Section */
.section {
  padding: 100px 0;
  position: relative;
}

.section-alt {
  background: var(--surface-alt);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

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

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

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

.section-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
}

/* Features Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(var(--primary-rgb), 0.3);
}

.feature-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary-light-text);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  transition: transform var(--transition-normal);
}

.feature-card:hover .feature-icon-wrapper {
  transform: scale(1.1) rotate(5deg);
}

.feature-icon-wrapper svg {
  width: 24px;
  height: 24px;
  stroke-width: 2;
}

.feature-card h3 {
  font-size: 20px;
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 15px;
  flex-grow: 1;
}

/* Interactive Routing Demo */
.demo-showcase {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.demo-tabs {
  display: flex;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
}

.demo-tab-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 15px;
  padding: 18px 24px;
  cursor: pointer;
  transition: all var(--transition-fast);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

.demo-tab-btn svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.demo-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(var(--primary-rgb), 0.05);
}

.demo-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: var(--surface-color);
}

.demo-content-pane {
  display: none;
  padding: 40px;
  animation: fadeIn var(--transition-normal);
}

.demo-content-pane.active {
  display: block;
}

.demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.demo-form-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.demo-form-panel label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.demo-form-panel input, .demo-form-panel select, .demo-form-panel textarea {
  background: var(--surface-alt);
  border: 1px solid var(--border-color);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 15px;
  outline: none;
  width: 100%;
}

.demo-form-panel input:focus, .demo-form-panel select:focus, .demo-form-panel textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

/* Terminal & Code Block Styles */
.terminal-window {
  background: #0d1117;
  color: #c9d1d9;
  border-radius: var(--radius-md);
  overflow: hidden;
  font-family: 'Fira Code', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  border: 1px solid #21262d;
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 280px;
}

.terminal-header {
  background: #161b22;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #21262d;
}

.terminal-buttons {
  display: flex;
  gap: 8px;
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
}

.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.terminal-title {
  color: #8b949e;
  font-size: 12px;
  font-weight: 600;
}

.terminal-body {
  padding: 20px;
  overflow-y: auto;
  flex-grow: 1;
  line-height: 1.5;
}

.terminal-line {
  margin-bottom: 8px;
}

.terminal-prompt {
  color: #58a6ff;
  user-select: none;
}

.terminal-success { color: #57ab5a; }
.terminal-warning { color: #c69026; }
.terminal-info { color: #388bfd; }

.json-key { color: #79c0ff; }
.json-string { color: #a5d6ff; }
.json-number { color: #ff7b72; }
.json-boolean { color: #ff7b72; }

/* Interactive Flow Visualizer */
.flow-diagram {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 300px;
}

.flow-node {
  background: var(--surface-alt);
  border: 1px solid var(--border-color);
  padding: 16px 24px;
  border-radius: var(--radius-md);
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.flow-node.active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary-light-text);
  box-shadow: var(--shadow-glow);
}

.flow-node span {
  font-size: 12px;
  font-weight: 500;
  opacity: 0.8;
}

.flow-arrow {
  width: 2px;
  height: 40px;
  background: var(--border-color);
  position: relative;
  z-index: 1;
}

.flow-arrow::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid var(--border-color);
}

.flow-arrow.pulse {
  background: var(--primary);
}

.flow-arrow.pulse::after {
  border-top-color: var(--primary);
}

.flow-arrow.pulse-active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, var(--primary), var(--accent));
  animation: scrollFlow 1.5s linear infinite;
}

@keyframes scrollFlow {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

/* Architecture Diagram */
.architecture-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.arch-visual {
  position: relative;
  padding: 30px;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-height: 420px;
  display: grid;
  grid-template-areas:
    "traffic traffic"
    "api plane"
    "db storage";
  gap: 24px;
}

.arch-box {
  background: var(--surface-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  text-align: center;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.arch-box:hover {
  border-color: var(--primary);
  background: var(--surface-glass);
}

.arch-box svg {
  width: 28px;
  height: 28px;
  color: var(--primary);
}

.arch-box h4 {
  font-size: 15px;
  margin-bottom: 2px;
}

.arch-box p {
  font-size: 12px;
  color: var(--text-secondary);
}

.arch-box.traffic { grid-area: traffic; background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.05), rgba(var(--accent-rgb), 0.05)); }
.arch-box.api { grid-area: api; }
.arch-box.plane { grid-area: plane; }
.arch-box.db { grid-area: db; }
.arch-box.storage { grid-area: storage; }

/* Operational Workflow / Timeline */
.workflow-timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 0;
}

.workflow-timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 31px;
  width: 2px;
  background: var(--border-color);
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
  padding-left: 80px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-icon {
  position: absolute;
  left: 12px;
  top: 0;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--surface-color);
  border: 2px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  color: var(--primary);
  font-weight: 800;
  font-size: 14px;
  transition: all var(--transition-normal);
}

.timeline-item:hover .timeline-icon {
  background: var(--primary);
  color: #ffffff;
  transform: scale(1.1);
  box-shadow: var(--shadow-glow);
}

.timeline-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.timeline-card:hover {
  transform: translateX(8px);
  border-color: rgba(var(--primary-rgb), 0.3);
  box-shadow: var(--shadow-md);
}

.timeline-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.timeline-step-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--surface-alt);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
}

.timeline-card p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* Security Table Section */
.security-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.security-table th {
  background: var(--surface-alt);
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  text-align: left;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
}

.security-table td {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  background: var(--surface-color);
  color: var(--text-secondary);
  font-size: 15px;
}

.security-table tr:last-child td {
  border-bottom: none;
}

.security-table strong {
  color: var(--text-primary);
}

/* Developer Playground Code Showcase */
.code-showcase {
  background: #0d1117;
  border: 1px solid #21262d;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.code-tabs {
  display: flex;
  background: #161b22;
  border-bottom: 1px solid #21262d;
}

.code-tab-btn {
  background: none;
  border: none;
  color: #8b949e;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 14px;
  padding: 14px 20px;
  cursor: pointer;
  transition: all var(--transition-fast);
  border-bottom: 2px solid transparent;
}

.code-tab-btn:hover {
  color: #c9d1d9;
}

.code-tab-btn.active {
  color: #58a6ff;
  border-bottom-color: #58a6ff;
  background: #0d1117;
}

.code-body {
  padding: 24px;
  position: relative;
}

.code-pre {
  margin: 0;
  overflow-x: auto;
  font-family: 'Fira Code', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 14px;
  line-height: 1.6;
}

.code-block {
  display: none;
}

.code-block.active {
  display: block;
}

.copy-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(240, 246, 252, 0.1);
  border: 1px solid rgba(240, 246, 252, 0.15);
  color: #c9d1d9;
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.copy-btn:hover {
  background: rgba(240, 246, 252, 0.2);
  border-color: #8b949e;
}

/* API Docs Page */
.docs-hero {
  padding: 144px 0 64px;
  background: var(--surface-color);
  border-bottom: 1px solid var(--border-color);
}

.docs-hero-copy {
  max-width: 840px;
}

.docs-hero h1 {
  font-size: clamp(36px, 5vw, 58px);
  margin-bottom: 18px;
}

.docs-hero p {
  color: var(--text-secondary);
  font-size: 18px;
  max-width: 680px;
}

.docs-base-url {
  display: grid;
  gap: 6px;
  margin-top: 28px;
  padding: 16px;
  background: var(--surface-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  max-width: 640px;
}

.docs-base-url span {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
}

.docs-base-url code,
.docs-code-line code,
.docs-section code,
.scope-grid code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.docs-base-url code {
  color: var(--text-primary);
  font-size: 15px;
  overflow-wrap: anywhere;
}

.docs-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.docs-sidebar {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 4px;
  padding: 12px;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.docs-sidebar a {
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 700;
}

.docs-sidebar a:hover {
  color: var(--primary);
  background: var(--surface-alt);
}

.docs-content {
  display: grid;
  gap: 18px;
}

.docs-section {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.docs-section h2 {
  font-size: 24px;
  margin-bottom: 12px;
}

.docs-section h3 {
  font-size: 17px;
  margin: 22px 0 8px;
  color: var(--text-primary);
}

.docs-section p {
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.docs-code-line {
  padding: 12px 14px;
  background: #0d1117;
  border: 1px solid #21262d;
  border-radius: var(--radius-sm);
  color: #c9d1d9;
  margin: 12px 0;
  overflow-x: auto;
}

.docs-code-block {
  margin: 12px 0 18px;
  padding: 16px;
  background: #0d1117;
  border: 1px solid #21262d;
  border-radius: var(--radius-sm);
  color: #c9d1d9;
  overflow-x: auto;
  font-family: 'Fira Code', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  line-height: 1.65;
}

.docs-code-block code {
  color: inherit;
  background: transparent;
  border: 0;
  padding: 0;
  white-space: pre;
}

.docs-callout {
  margin: 14px 0 18px;
  padding: 14px;
  background: var(--surface-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

.docs-callout strong {
  display: block;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.docs-callout p {
  margin: 0;
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  font-size: 14px;
}

.docs-table th {
  background: var(--surface-alt);
  color: var(--text-primary);
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
}

.docs-table td {
  background: var(--surface-color);
  color: var(--text-secondary);
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: top;
}

.docs-table tr:last-child td {
  border-bottom: none;
}

.docs-table code {
  color: var(--text-primary);
  background: var(--surface-alt);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  padding: 1px 5px;
  white-space: nowrap;
}

.scope-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.scope-grid code {
  display: block;
  background: var(--surface-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 10px 12px;
  font-size: 14px;
}

.api-docs-page .code-showcase {
  box-shadow: none;
}

.endpoint-detail {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border-color);
}

/* FAQ Section */
.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition-normal);
}

.faq-item:hover {
  border-color: rgba(var(--primary-rgb), 0.3);
}

.faq-trigger {
  width: 100%;
  background: none;
  border: none;
  padding: 24px;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  color: var(--text-primary);
}

.faq-question {
  font-size: 17px;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
}

.faq-icon {
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
  transition: transform var(--transition-normal);
}

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

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal);
}

.faq-answer {
  padding: 0 24px 24px;
  color: var(--text-secondary);
  font-size: 15px;
}

/* Account Access Box */
.access-box {
  background: linear-gradient(135deg, var(--bg-color) 0%, var(--surface-color) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 48px;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.access-box h2 {
  font-size: 32px;
  margin-bottom: 16px;
}

.access-box p {
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}

/* Site Footer */
.site-footer {
  border-top: 1px solid var(--border-color);
  padding: 60px 0 30px;
  background: var(--surface-alt);
  color: var(--text-secondary);
  font-size: 14px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 320px;
}

.footer-brand .brand {
  font-size: 20px;
}

.footer-brand-desc {
  font-size: 13px;
  color: var(--text-muted);
}

.footer-links-group {
  display: flex;
  gap: 60px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links h4 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.footer-link {
  color: var(--text-secondary);
  font-size: 13px;
}

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

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

.footer-copy {
  font-size: 13px;
  color: var(--text-muted);
}

.footer-version {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  background: var(--border-color);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 56px;
  }
  
  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .hero-showcase {
    max-width: 600px;
    margin: 0 auto;
  }
  
  .architecture-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .demo-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: static;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
}

@media (max-width: 768px) {
  .site-header {
    height: 72px;
  }
  
  .site-nav {
    display: none; /* Hide standard nav on mobile */
  }
  
  .site-header .btn-secondary {
    display: none; /* Hide desktop specific header button */
  }
  
  .section {
    padding: 70px 0;
  }
  
  .security-table {
    display: block;
    overflow-x: auto;
  }

  .docs-hero {
    padding: 112px 0 44px;
  }

  .docs-section {
    padding: 20px;
  }

  .docs-table {
    display: block;
    overflow-x: auto;
  }
  
  .footer-top {
    flex-direction: column;
    gap: 30px;
  }
  
  .footer-links-group {
    width: 100%;
    justify-content: space-between;
    gap: 30px;
  }
  
  .access-box {
    padding: 32px 20px;
  }
  
  .access-box h2 {
    font-size: 26px;
  }
}

@media (max-width: 480px) {
  .hero-actions .btn {
    width: 100%;
  }
}
