/* ===================================
   TENEX Website — Complete styles.css
   =================================== */

/* === Google Fonts === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* === CSS Variables === */
:root {
  /* Core Colors */
  --bg: #0a0a0a;
  --bg-elevated: #121212;
  --fg: #e0e0e0;
  --fg-muted: #a0a0a0;
  --border: #2a2a2a;
  
  /* Accent */
  --accent: #8b7fff;
  --accent-dim: #5a4fc2;
  
  /* Status */
  --status-green: #5cff8b;
  --status-red: #ff5c5c;
  --status-amber: #ffaf5c;
  
  /* Code */
  --code-bg: #111111;
  --code-fg: #e0e0e0;
  --code-comment: #6a6a6a;
  --code-keyword: #8b7fff;
  --code-string: #5cff8b;
  
  /* Typography */
  --mono-font: 'JetBrains Mono', 'Fira Code', 'IBM Plex Mono', monospace;
  --sans-font: 'Inter', system-ui, -apple-system, sans-serif;
  
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;
  --text-5xl: 3rem;
  --text-6xl: 4rem;
  
  --leading-tight: 1.2;
  --leading-normal: 1.6;
  --leading-relaxed: 1.8;
  
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  
  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;
  --space-32: 8rem;
  
  /* Layout */
  --nav-height: 64px;
  --container-width: 900px;
  --container-padding: var(--space-8);
  --code-block-radius: 4px;
}

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

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

body {
  font-family: var(--sans-font);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--mono-font);
  font-weight: var(--font-semibold);
  line-height: var(--leading-tight);
  color: var(--fg);
}

h1 { font-size: var(--text-5xl); font-weight: var(--font-bold); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
  margin-bottom: var(--space-4);
}

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

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

code {
  font-family: var(--mono-font);
  font-size: 0.9em;
  background: var(--code-bg);
  padding: 0.1em 0.3em;
  border-radius: 2px;
  color: var(--code-fg);
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

/* === Navigation === */
.navbar {
  height: var(--nav-height);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-8);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--bg);
  z-index: 100;
}

.nav-logo {
  font-family: var(--mono-font);
  font-weight: var(--font-bold);
  font-size: var(--text-lg);
  color: var(--fg);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: var(--space-8);
}

.nav-link {
  font-family: var(--sans-font);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--fg);
  padding: var(--space-2);
  cursor: pointer;
  font-family: var(--mono-font);
  font-size: var(--text-sm);
}

/* === Hero === */
.hero {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: var(--space-24) var(--space-4);
  margin-top: var(--nav-height);
}

.hero-subtitle {
  font-family: var(--mono-font);
  font-size: var(--text-sm);
  color: var(--fg-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-6);
}

.hero-title {
  font-family: var(--mono-font);
  font-size: var(--text-5xl);
  font-weight: var(--font-bold);
  color: var(--fg);
  line-height: var(--leading-tight);
  max-width: 800px;
  margin-bottom: var(--space-4);
}

.hero-description {
  font-family: var(--sans-font);
  font-size: var(--text-lg);
  color: var(--fg-muted);
  max-width: 600px;
  line-height: var(--leading-normal);
  margin-bottom: var(--space-8);
}

.hero-cta {
  display: flex;
  gap: var(--space-6);
  margin-bottom: var(--space-12);
}

.hero-cta a {
  font-family: var(--mono-font);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--fg-muted);
  text-decoration: none;
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--code-block-radius);
  transition: all 0.15s ease;
}

.hero-cta a:hover {
  color: var(--accent);
  border-color: var(--accent-dim);
}

.hero-terminal {
  width: 100%;
  max-width: 700px;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--code-block-radius);
  overflow: hidden;
  text-align: left;
}

.hero-terminal-bar {
  display: flex;
  align-items: center;
  padding: var(--space-2) var(--space-4);
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

.hero-terminal-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: var(--space-2);
  background: var(--border);
}

.hero-terminal-output {
  font-family: var(--mono-font);
  font-size: var(--text-sm);
  color: var(--code-fg);
  padding: var(--space-4);
  line-height: 1.6;
}

.hero-terminal-output .prompt {
  color: var(--accent);
}

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

.hero-terminal-output .meta {
  color: var(--code-comment);
}

.hero-terminal-output .dim {
  color: var(--fg-muted);
}

/* === Section Headers === */
.section-label {
  font-family: var(--mono-font);
  font-size: var(--text-xs);
  color: var(--fg-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

/* === Problem Section === */
.problem-section {
  padding: var(--space-16) 0;
  border-top: 1px solid var(--border);
}

.problem-text {
  font-family: var(--sans-font);
  font-size: var(--text-xl);
  color: var(--fg);
  max-width: 700px;
  line-height: var(--leading-normal);
  margin-bottom: var(--space-4);
}

.problem-detail {
  font-family: var(--sans-font);
  font-size: var(--text-base);
  color: var(--fg-muted);
  max-width: 700px;
  line-height: var(--leading-normal);
}

/* === Pillar Sections === */
.pillar-section {
  padding: var(--space-16) 0;
  border-top: 1px solid var(--border);
}

.pillar-header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.pillar-number {
  font-family: var(--mono-font);
  font-size: var(--text-sm);
  color: var(--accent);
  font-weight: var(--font-semibold);
}

.pillar-title {
  font-family: var(--mono-font);
  font-size: var(--text-2xl);
  font-weight: var(--font-semibold);
  color: var(--fg);
}

.pillar-problem {
  font-family: var(--sans-font);
  font-size: var(--text-lg);
  color: var(--fg-muted);
  max-width: 700px;
  margin-bottom: var(--space-6);
  line-height: var(--leading-normal);
}

.pillar-solution {
  font-family: var(--sans-font);
  font-size: var(--text-base);
  color: var(--fg);
  max-width: 700px;
  margin-bottom: var(--space-6);
  line-height: var(--leading-normal);
}

.pillar-code {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--code-block-radius);
  padding: var(--space-4);
  margin-bottom: var(--space-6);
  overflow-x: auto;
}

.pillar-code pre {
  font-family: var(--mono-font);
  font-size: var(--text-sm);
  color: var(--code-fg);
  line-height: 1.5;
  margin: 0;
}

.pillar-evidence {
  font-family: var(--mono-font);
  font-size: var(--text-sm);
  color: var(--accent);
}

.pillar-evidence a {
  color: var(--accent);
  text-decoration: none;
}

.pillar-evidence a:hover {
  text-decoration: underline;
}

/* === Code Blocks === */
.code-block {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--code-block-radius);
  overflow: hidden;
  margin-bottom: var(--space-6);
}

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

.code-lang {
  font-family: var(--mono-font);
  font-size: var(--text-xs);
  color: var(--fg-muted);
  text-transform: uppercase;
}

.code-content {
  padding: var(--space-4);
  overflow-x: auto;
}

.code-content pre {
  font-family: var(--mono-font);
  font-size: var(--text-sm);
  color: var(--code-fg);
  line-height: 1.6;
  margin: 0;
}

/* Syntax highlighting */
.code-keyword { color: var(--code-keyword); }
.code-string { color: var(--code-string); }
.code-comment { color: var(--code-comment); }
.code-function { color: var(--accent); }
.code-number { color: var(--status-amber); }

/* === Get Started === */
.get-started {
  padding: var(--space-16) 0;
  border-top: 1px solid var(--border);
}

.get-started-header {
  font-family: var(--mono-font);
  font-size: var(--text-sm);
  color: var(--accent);
  font-weight: var(--font-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-8);
}

.get-started-text {
  font-family: var(--sans-font);
  font-size: var(--text-base);
  color: var(--fg-muted);
  max-width: 600px;
  line-height: var(--leading-normal);
  margin-bottom: var(--space-6);
}

.get-started-links {
  display: flex;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.get-started-links a {
  font-family: var(--mono-font);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--fg);
  text-decoration: none;
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--code-block-radius);
  transition: all 0.15s ease;
}

.get-started-links a:hover {
  color: var(--accent);
  border-color: var(--accent-dim);
}

/* === Throughline === */
.throughline {
  padding: var(--space-12) 0;
  border-top: 1px solid var(--border);
}

.throughline-text {
  font-family: var(--mono-font);
  font-size: var(--text-lg);
  color: var(--fg);
  max-width: 700px;
  line-height: var(--leading-normal);
}

/* === Page Hero (subpages) === */
.page-hero {
  min-height: 40vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: var(--space-24) 0 var(--space-12);
  margin-top: var(--nav-height);
}

.page-hero .container {
  width: 100%;
}

.page-hero-title {
  font-family: var(--mono-font);
  font-size: var(--text-5xl);
  font-weight: var(--font-bold);
  color: var(--fg);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-4);
}

.page-hero-description {
  font-family: var(--sans-font);
  font-size: var(--text-lg);
  color: var(--fg-muted);
  max-width: 600px;
  line-height: var(--leading-normal);
}

/* === Content Sections (Why/How pages) === */
.content-section {
  padding: var(--space-16) 0;
  border-top: 1px solid var(--border);
}

.content-section-title {
  font-family: var(--mono-font);
  font-size: var(--text-3xl);
  font-weight: var(--font-semibold);
  color: var(--fg);
  margin-bottom: var(--space-6);
}

.content-text {
  font-family: var(--sans-font);
  font-size: var(--text-base);
  color: var(--fg-muted);
  max-width: 700px;
  line-height: var(--leading-normal);
  margin-bottom: var(--space-4);
}

.content-text strong {
  color: var(--fg);
  font-weight: var(--font-semibold);
}

.content-highlight {
  font-family: var(--sans-font);
  font-size: var(--text-lg);
  color: var(--fg);
  max-width: 700px;
  line-height: var(--leading-normal);
  margin-bottom: var(--space-6);
}

.evidence-link {
  font-family: var(--mono-font);
  font-size: var(--text-sm);
  color: var(--accent);
  display: inline-block;
  margin-top: var(--space-4);
}

.evidence-link:hover {
  text-decoration: underline;
}

/* === Footer === */
.footer {
  padding: var(--space-12) 0;
  border-top: 1px solid var(--border);
  margin-top: var(--space-24);
}

.footer-links {
  display: flex;
  gap: var(--space-6);
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
}

.footer-link {
  font-family: var(--mono-font);
  font-size: var(--text-sm);
  color: var(--fg-muted);
  text-decoration: none;
}

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

.footer-nostr {
  font-family: var(--mono-font);
  font-size: var(--text-xs);
  color: var(--fg-muted);
  letter-spacing: 0.05em;
}

/* === Utilities === */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

.text-accent { color: var(--accent); }
.text-muted { color: var(--fg-muted); }

.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }

/* === Responsive === */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .nav-toggle {
    display: block;
  }
  
  .nav-links.mobile-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg);
    padding: var(--space-4);
    border-bottom: 1px solid var(--border);
    gap: var(--space-4);
  }
  
  .hero-title {
    font-size: var(--text-4xl);
  }
  
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }
  
  .page-hero-title {
    font-size: var(--text-4xl);
  }
  
  .content-section-title {
    font-size: var(--text-2xl);
  }
  
  .footer-links {
    flex-direction: column;
    gap: var(--space-2);
  }
  
  .pillar-problem,
  .content-highlight {
    font-size: var(--text-base);
  }

  .get-started-links {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .hero-title {
    font-size: var(--text-3xl);
  }
  
  .page-hero-title {
    font-size: var(--text-3xl);
  }
  
  :root {
    --container-padding: var(--space-4);
  }
}
