/* Qinematos Website Styles
   Dark theme with Marvel yellow accents (Thunderbolts/Wonder Man style)
*/

/* CSS Variables */
:root {
  --bg-primary: #0a0a0a;
  --bg-surface: #141414;
  --bg-elevated: #1a1a1a;
  --accent-primary: #FFD700;
  --accent-secondary: #FFC107;
  --accent-dim: #b8960b;
  --text-primary: #f5f5f5;
  --text-secondary: #a3a3a3;
  --text-muted: #737373;
  --border-color: #262626;
  --border-light: #333333;
  --code-bg: #1e1e1e;
  --success: #22c55e;
  --error: #ef4444;
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --max-width: 1200px;
  --header-height: 72px;
}

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

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

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--accent-primary);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

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

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

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

section {
  padding: 5rem 0;
}

/* Header / Navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-primary);
  letter-spacing: -0.5px;
}

.logo span {
  color: var(--text-primary);
}

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

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
}

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

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-primary);
  transition: width 0.3s ease;
}

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

/* Mobile Navigation */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-surface);
    padding: 1rem;
    gap: 0;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-links li {
    border-bottom: 1px solid var(--border-color);
  }

  .nav-links a {
    display: block;
    padding: 1rem;
  }
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-height);
  background:
    radial-gradient(ellipse at top right, rgba(255, 215, 0, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse at bottom left, rgba(255, 215, 0, 0.03) 0%, transparent 50%),
    var(--bg-primary);
}

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

.hero-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid var(--accent-dim);
  border-radius: 50px;
  font-size: 0.875rem;
  color: var(--accent-primary);
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .tagline {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 600px;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

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

.btn-primary:hover {
  background: var(--accent-secondary);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
}

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

.btn-secondary:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* Feature Cards */
.features {
  background: var(--bg-surface);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.feature-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.3s ease;
}

.feature-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-4px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: rgba(255, 215, 0, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  color: var(--accent-primary);
}

.feature-icon svg {
  stroke: var(--accent-primary);
  flex-shrink: 0;
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.feature-card p {
  font-size: 0.95rem;
  margin: 0;
}

/* RVP Section */
.rvp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

@media (max-width: 768px) {
  .rvp-grid {
    grid-template-columns: 1fr;
  }
}

.rvp-card {
  text-align: center;
  padding: 2.5rem 2rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.rvp-letter {
  font-size: 4rem;
  font-weight: 800;
  color: var(--accent-primary);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.rvp-word {
  font-size: 1.5rem;
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Performance Table */
.performance-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 2rem;
  background: var(--bg-surface);
  border-radius: 12px;
  overflow: hidden;
}

.performance-table th,
.performance-table td {
  padding: 1rem 1.5rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.performance-table th {
  background: var(--bg-elevated);
  color: var(--accent-primary);
  font-weight: 600;
}

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

.performance-table .highlight {
  color: var(--accent-primary);
  font-weight: 600;
}

.performance-table .dim {
  color: var(--text-muted);
}

/* Code Blocks */
pre {
  background: var(--code-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  position: relative;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.7;
}

pre code {
  color: var(--text-primary);
}

:not(pre) > code {
  background: var(--bg-surface);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  color: var(--accent-primary);
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-elevated);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  border-radius: 8px 8px 0 0;
  margin-bottom: -1px;
}

.code-header span {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.copy-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.copy-btn.copied {
  border-color: var(--success);
  color: var(--success);
}

/* Syntax Highlighting (Basic) */
.token-keyword { color: #c678dd; }
.token-string { color: #98c379; }
.token-comment { color: #5c6370; font-style: italic; }
.token-function { color: #61afef; }
.token-number { color: #d19a66; }
.token-operator { color: #56b6c2; }

/* Architecture Diagram */
.architecture-diagram {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0;
}

.arch-layer {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  text-align: center;
}

.arch-layer h4 {
  color: var(--accent-primary);
  margin-bottom: 0.5rem;
}

.arch-arrow {
  text-align: center;
  font-size: 1.5rem;
  color: var(--accent-dim);
  margin: 0.5rem 0;
}

/* API Endpoint Table */
.api-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.api-table th,
.api-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.api-table th {
  background: var(--bg-surface);
  color: var(--accent-primary);
  font-weight: 600;
}

.api-table .method {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.875rem;
}

.method-get { color: #22c55e; }
.method-post { color: #3b82f6; }
.method-put { color: #f59e0b; }
.method-delete { color: #ef4444; }

/* Quick Start Section */
.quick-start {
  background: var(--bg-surface);
}

.steps {
  counter-reset: step;
  margin-top: 2rem;
}

.step {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.step:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.step-number {
  counter-increment: step;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: rgba(255, 215, 0, 0.1);
  border: 1px solid var(--accent-dim);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  font-weight: 700;
}

.step-number::before {
  content: counter(step);
}

.step-content h4 {
  margin-bottom: 0.5rem;
}

/* Footer */
footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 3rem 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

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

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

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

/* Documentation Layout */
.docs-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 3rem;
  padding-top: calc(var(--header-height) + 2rem);
  min-height: 100vh;
}

@media (max-width: 900px) {
  .docs-layout {
    grid-template-columns: 1fr;
  }
}

.docs-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 2rem);
  height: fit-content;
}

.docs-nav {
  list-style: none;
}

.docs-nav li {
  margin-bottom: 0.5rem;
}

.docs-nav a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--text-secondary);
  border-radius: 6px;
  transition: all 0.2s ease;
}

.docs-nav a:hover,
.docs-nav a.active {
  background: var(--bg-surface);
  color: var(--accent-primary);
}

.docs-content {
  padding-bottom: 4rem;
}

.docs-content h1 {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-yellow { color: var(--accent-primary); }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* Responsive Typography */
@media (max-width: 768px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.25rem; }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero .tagline {
    font-size: 1.1rem;
  }

  section {
    padding: 3rem 0;
  }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-surface);
}

::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-dim);
}

/* Selection */
::selection {
  background: rgba(255, 215, 0, 0.3);
  color: var(--text-primary);
}

/* Roadmap Section */
.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.roadmap-phase {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  position: relative;
  transition: all 0.3s ease;
}

.roadmap-phase:hover {
  border-color: var(--accent-dim);
  transform: translateY(-2px);
}

.roadmap-phase.current {
  border-color: var(--accent-primary);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.1);
}

.roadmap-phase.completed {
  opacity: 0.8;
}

.phase-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.phase-badge {
  background: rgba(255, 215, 0, 0.1);
  color: var(--accent-primary);
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
}

.phase-status {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.phase-status.done {
  color: var(--success);
}

.phase-status.active {
  color: var(--accent-primary);
}

.roadmap-phase h4 {
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.roadmap-phase ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.roadmap-phase li {
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: 0.25rem 0;
  padding-left: 1.25rem;
  position: relative;
}

.roadmap-phase li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6rem;
  width: 6px;
  height: 6px;
  background: var(--border-light);
  border-radius: 50%;
}

.roadmap-phase.completed li::before {
  background: var(--success);
}

.roadmap-phase.current li::before {
  background: var(--accent-primary);
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  border-color: var(--accent-primary);
  background: var(--bg-elevated);
  transform: translateY(-2px);
}

.back-to-top svg {
  stroke: var(--accent-primary);
}
