/* OpenEyes Website - Minimal Black/White/Gray Design */

/* ===== CSS Variables ===== */
:root {
  /* Colors - Pure Monochrome */
  --bg-primary: #000000;
  --bg-secondary: #0a0a0a;
  --bg-tertiary: #111111;
  --bg-card: #171717;
  --bg-card-hover: #1f1f1f;
  
  /* Text Colors */
  --text-primary: #ffffff;
  --text-secondary: #a1a1a1;
  --text-muted: #525252;
  --text-inverse: #000000;
  
  /* Borders */
  --border-subtle: #262626;
  --border-medium: #404040;
  --border-accent: #ffffff;
  
  /* Accent - Just white for contrast */
  --accent: #ffffff;
  --accent-subtle: rgba(255, 255, 255, 0.1);
  
  /* Typography */
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-secondary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Subtle grid background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(var(--border-subtle) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.3;
  z-index: -1;
}

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

h1 { font-size: clamp(2.5rem, 6vw, 4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 1rem; }
h3 { font-size: 1.125rem; margin-bottom: 0.5rem; }

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

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

a:hover {
  opacity: 0.7;
}

/* ===== Navigation ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-subtle);
}

.navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 2rem;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.navbar-logo img {
  width: 28px;
  height: 28px;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.navbar-links a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
}

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

.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.5rem;
}

.navbar-toggle span {
  width: 20px;
  height: 1px;
  background: var(--text-primary);
}

/* ===== Hero Section ===== */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 2rem 60px;
  position: relative;
}

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

.hero-logo {
  width: 60px;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.hero h1 {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  letter-spacing: -0.04em;
}

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

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

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

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

.btn-primary:hover {
  background: transparent;
  color: var(--text-primary);
}

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

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

/* ===== Sections ===== */
.section {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid var(--border-subtle);
}

.section:first-of-type {
  border-top: none;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  display: inline-block;
}

/* ===== Grid Layout ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;
  background: var(--border-subtle);
  border: 1px solid var(--border-subtle);
}

.grid-item {
  background: var(--bg-secondary);
  padding: 2rem;
  transition: background 0.2s ease;
}

.grid-item:hover {
  background: var(--bg-tertiary);
}

.grid-item .icon {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  display: block;
}

.grid-item h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.grid-item p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

/* ===== Tables ===== */
.table-container {
  overflow-x: auto;
  margin: 2rem 0;
  border: 1px solid var(--border-subtle);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-subtle);
}

td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.875rem;
}

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

tr:hover td {
  background: var(--bg-tertiary);
}

/* Badge */
.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* Code Block */
.code-block {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  margin: 1.5rem 0;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-subtle);
}

.code-lang {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.copy-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 4px;
}

.copy-btn:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

pre {
  padding: 1rem;
  overflow-x: auto;
  margin: 0;
}

code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ===== Hardware Grid ===== */
.hw-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border-subtle);
  border: 1px solid var(--border-subtle);
}

.hw-item {
  background: var(--bg-secondary);
  padding: 1.5rem;
  text-align: center;
}

.hw-item h3 {
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.hw-item p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0;
}

/* ===== Page Header ===== */
.page-header {
  padding: 120px 2rem 60px;
  text-align: center;
  border-bottom: 1px solid var(--border-subtle);
}

.page-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.page-header p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* ===== Content ===== */
.content {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.content h2 {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
}

.content h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.content h3 {
  margin-top: 1.5rem;
}

.content ul, .content ol {
  margin: 1rem 0 1.5rem 1.5rem;
}

.content li {
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

/* ===== Footer ===== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 2rem;
  text-align: center;
}

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

.footer-links {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin-top: 1rem;
}

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

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .navbar-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    flex-direction: column;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border-subtle);
    gap: 0;
  }

  .navbar-links.active {
    display: flex;
  }

  .navbar-links a {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-subtle);
  }

  .navbar-toggle {
    display: flex;
  }

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

  .hw-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== Utility ===== */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* ===== Safety Page Styles ===== */
.safety-hero {
  text-align: center;
  padding: 4rem 2rem;
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.safety-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 1rem;
}

.safety-hero p {
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto;
}

.safety-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.safety-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

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

.safety-card h3 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.safety-card h3 img {
  width: 24px;
  height: 24px;
}

.safety-card ul {
  list-style: none;
  padding: 0;
}

.safety-card li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
}

.safety-card li:last-child {
  border-bottom: none;
}

.safety-card code {
  background: var(--bg-tertiary);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.85rem;
}

.diagram-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 2rem;
  margin: 2rem 0;
  text-align: center;
}

.diagram-container svg {
  max-width: 100%;
  height: auto;
}

.config-example {
  background: var(--bg-tertiary);
  border-radius: 8px;
  overflow: hidden;
  margin: 1rem 0;
}

.config-example .code-header {
  background: var(--bg-secondary);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.config-example code {
  display: block;
  padding: 1rem;
  overflow-x: auto;
}

/* ===== Feature Card Enhancements ===== */
.grid-item.new-feature {
  border-color: var(--accent);
  position: relative;
}

.grid-item.new-feature::before {
  content: 'v1.0.0';
  position: absolute;
  top: -8px;
  right: 12px;
  background: var(--accent);
  color: var(--bg-primary);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}

/* ===== Badge Variations ===== */
.badge-int8 {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: white;
}

.badge-dla {
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
  color: white;
}

.badge-safety {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

/* ===== Process Flow Diagram ===== */
.flow-diagram {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 2rem 0;
}

.flow-diagram .flow-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1rem 1.5rem;
  text-align: center;
  min-width: 120px;
}

.flow-diagram .flow-arrow {
  color: var(--text-muted);
  font-size: 1.5rem;
}

/* ===== Stats Grid ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.stat-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
}

.stat-item .value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-item .label {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}