/* A9 Sightglass Website Styles - Matching Forge App Design */

/* CSS Variables matching the app's design system */
:root {
  /* Colors from globals.css */
  --background: oklch(0.0627 0.0157 285.82);
  --foreground: oklch(0.9804 0.0078 285.82);
  --card: oklch(0.0941 0.0196 285.82);
  --card-foreground: oklch(0.9804 0.0078 285.82);
  --primary: oklch(0.702 0.1411 142.5);
  --primary-foreground: oklch(0.0627 0.0157 285.82);
  --secondary: oklch(0.1569 0.0235 285.82);
  --secondary-foreground: oklch(0.8431 0.0118 285.82);
  --muted: oklch(0.1255 0.0196 285.82);
  --muted-foreground: oklch(0.6275 0.0118 285.82);
  --accent: oklch(0.6863 0.1765 204.97);
  --accent-foreground: oklch(0.0627 0.0157 285.82);
  --border: oklch(0.2157 0.0235 285.82);
  --radius: 0.75rem;

  /* Typography */
  --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Courier New", monospace;
}

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

body {
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  /* Subtle grid pattern background */
  background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 20px 20px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Navigation */
.navbar {
  background: var(--card);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  display: flex;
  flex-direction: column;
}

.nav-brand h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.nav-brand .tagline {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-top: -0.25rem;
}

/* Navigation Updates */
.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.nav-links a {
  text-decoration: none;
  color: var(--foreground);
  transition: color 0.2s;
  font-weight: 500;
}

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

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--foreground);
  transition: all 0.3s;
  border-radius: 2px;
}

.cta-button {
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  transition: all 0.2s;
}

.cta-button:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.nav-menu {
  display: none;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-menu a {
  text-decoration: none;
  color: var(--foreground);
  transition: color 0.2s;
}

.nav-menu a:hover {
  color: var(--primary);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--foreground);
  transition: all 0.3s;
}

/* Hero Section */
.hero {
  padding: 6rem 0;
  text-align: center;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero-description {
  font-size: 1.25rem;
  color: var(--muted-foreground);
  max-width: 700px;
  margin: 0 auto 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 4rem;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  max-width: 600px;
  margin: 0 auto;
}

.stat {
  text-align: center;
}

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

.stat-label {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

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

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--secondary-foreground);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--muted);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn-block {
  display: block;
  width: 100%;
  text-align: center;
}

/* Features Section */
.features {
  padding: 6rem 0;
  background: var(--card);
}

.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 1rem;
}

.section-subtitle {
  text-align: center;
  color: var(--muted-foreground);
  font-size: 1.125rem;
  margin-bottom: 4rem;
}

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

.feature-card {
  background: var(--background);
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: transform 0.2s, border-color 0.2s;
}

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

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

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

.feature-card p {
  color: var(--muted-foreground);
}

/* How It Works Section */
.how-it-works {
  padding: 6rem 0;
}

.timeline {
  max-width: 800px;
  margin: 0 auto 4rem;
}

.timeline-item {
  display: flex;
  gap: 2rem;
  margin-bottom: 3rem;
}

.timeline-number {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  background: var(--primary);
  color: var(--primary-foreground);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
}

.timeline-content h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.timeline-content p {
  color: var(--muted-foreground);
}

.callout {
  padding: 2rem;
  border-radius: var(--radius);
  border-left: 4px solid var(--accent);
  background: var(--card);
}

.callout-info {
  border-left-color: var(--accent);
}

.callout h4 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.callout p {
  color: var(--muted-foreground);
  margin-bottom: 1rem;
}

/* Documentation Section */
.documentation {
  padding: 6rem 0;
  background: var(--card);
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.doc-card {
  background: var(--background);
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--foreground);
  transition: transform 0.2s, border-color 0.2s;
}

.doc-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}

.doc-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.doc-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.doc-card p {
  color: var(--muted-foreground);
}

/* Pricing Section */
.pricing {
  padding: 6rem 0;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  position: relative;
}

.pricing-card-featured {
  border-color: var(--primary);
  transform: scale(1.05);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  right: 20px;
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.pricing-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.pricing-header h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.25rem;
}

.price-amount {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary);
}

.price-period {
  color: var(--muted-foreground);
}

.pricing-features {
  list-style: none;
  margin-bottom: 2rem;
}

.pricing-features li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--muted-foreground);
}

.pricing-features li:last-child {
  border-bottom: none;
}

/* Footer */
.footer {
  background: var(--card);
  padding: 3rem 0 1rem;
  border-top: 1px solid var(--border);
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  font-size: 1.125rem;
  margin-bottom: 1rem;
  color: var(--foreground);
}

.footer-section p {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  line-height: 1.6;
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: var(--muted-foreground);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}

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

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

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

/* Responsive Design */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

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

  .hero-description {
    font-size: 1rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-stats {
    flex-direction: column;
    gap: 2rem;
  }

  .timeline-item {
    flex-direction: column;
  }

  .pricing-card-featured {
    transform: none;
  }
}

/* Documentation Pages */
.docs-page {
  padding: 2rem 0 4rem;
  min-height: 100vh;
}

.docs-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 3rem;
  margin-top: 2rem;
}

.docs-sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
  background: var(--card);
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.docs-sidebar h3 {
  font-size: 1.125rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.docs-sidebar ul {
  list-style: none;
}

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

.docs-sidebar a {
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.2s;
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
}

.docs-sidebar a:hover {
  color: var(--foreground);
  background: var(--muted);
}

.docs-sidebar a.active {
  color: var(--primary);
  background: var(--secondary);
  font-weight: 500;
}

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

.docs-content h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.docs-content .lead {
  font-size: 1.25rem;
  color: var(--muted-foreground);
  margin-bottom: 3rem;
  line-height: 1.6;
}

.docs-section {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.docs-section:last-child {
  border-bottom: none;
}

.docs-section h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--foreground);
}

.docs-section h3 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
  color: var(--foreground);
}

.docs-section h4 {
  font-size: 1.25rem;
  margin: 1.5rem 0 0.75rem;
  color: var(--foreground);
}

.docs-section ol,
.docs-section ul {
  margin: 1rem 0 1rem 1.5rem;
  line-height: 1.8;
}

.docs-section li {
  margin-bottom: 0.5rem;
  color: var(--muted-foreground);
}

.docs-section p {
  margin-bottom: 1rem;
  line-height: 1.8;
  color: var(--muted-foreground);
}

.docs-section a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.docs-section a:hover {
  border-bottom-color: var(--primary);
}

.docs-section code {
  background: var(--muted);
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.875em;
  color: var(--accent);
}

.docs-section pre {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  overflow-x: auto;
  margin: 1rem 0;
}

.docs-section pre code {
  background: none;
  padding: 0;
  color: var(--foreground);
}

/* Note Boxes */
.note {
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  margin: 1.5rem 0;
  border-left: 4px solid;
}

.note strong {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.note ul {
  margin-top: 0.5rem;
  margin-left: 1rem;
}

.note-info {
  background: rgba(99, 179, 237, 0.1);
  border-left-color: var(--accent);
  color: var(--foreground);
}

.note-warning {
  background: rgba(251, 191, 36, 0.1);
  border-left-color: #fbbf24;
  color: var(--foreground);
}

.note-success {
  background: rgba(34, 197, 94, 0.1);
  border-left-color: var(--primary);
  color: var(--foreground);
}

/* Comparison Table */
.comparison-table {
  overflow-x: auto;
  margin: 2rem 0;
}

.comparison-table table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
}

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

.comparison-table th {
  background: var(--secondary);
  font-weight: 600;
  color: var(--foreground);
}

.comparison-table td {
  color: var(--muted-foreground);
}

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

/* Architecture Diagram */
.architecture-diagram {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 2rem;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin: 2rem 0;
}

.diagram-box {
  background: var(--secondary);
  padding: 1.5rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  text-align: center;
}

.diagram-box h4 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.diagram-box p {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  margin: 0;
}

.diagram-arrow {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent);
  padding: 0.5rem 0;
}

/* Logo Updates */
.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  transition: opacity 0.2s;
}

.logo:hover {
  opacity: 0.8;
}

/* Responsive Updates for Documentation */
@media (max-width: 968px) {
  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: static;
    order: 2;
    margin-top: 2rem;
  }

  .docs-content {
    order: 1;
  }

  .architecture-diagram {
    padding: 1rem;
  }

  .comparison-table {
    font-size: 0.875rem;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 0.75rem 0.5rem;
  }
}

/* API Reference Page Styles */
.docs-header {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--border);
}

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

.docs-subtitle {
  font-size: 1.125rem;
  color: var(--muted-foreground);
}

.doc-section {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.doc-section:last-child {
  border-bottom: none;
}

/* Architecture Diagram Enhancements */
.architecture-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 2rem;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin: 2rem 0;
  flex-wrap: wrap;
}

.diagram-box {
  flex: 1;
  min-width: 250px;
  background: var(--secondary);
  padding: 1.5rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
}

.forge-box {
  border-left: 4px solid var(--accent);
}

.enumerator-box {
  border-left: 4px solid var(--primary);
}

.diagram-box h4 {
  font-size: 1.125rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.diagram-box ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.diagram-box li {
  padding: 0.5rem 0;
  color: var(--muted-foreground);
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border);
}

.diagram-box li:last-child {
  border-bottom: none;
}

.diagram-arrow {
  font-size: 2rem;
  color: var(--primary);
  font-weight: 700;
}

/* Feature Comparison */
.feature-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 2rem 0;
}

.comparison-column {
  background: var(--card);
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.comparison-column.highlight {
  border-color: var(--primary);
  border-width: 2px;
}

.comparison-column h4 {
  font-size: 1.125rem;
  margin-bottom: 1rem;
  color: var(--foreground);
}

.comparison-column ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.comparison-column li {
  padding: 0.75rem 0;
  color: var(--muted-foreground);
  border-bottom: 1px solid var(--border);
}

.comparison-column li:last-child {
  border-bottom: none;
}

/* Code Blocks with Copy Button */
.code-block {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 1.5rem 0;
  overflow: hidden;
}

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

.code-header span {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  font-family: var(--font-mono);
}

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

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

.code-block pre {
  margin: 0;
  padding: 1rem;
  overflow-x: auto;
  background: var(--background);
}

.code-block code {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--foreground);
}

/* API Tables */
.api-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.api-table thead {
  background: var(--secondary);
}

.api-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--foreground);
  border-bottom: 2px solid var(--border);
}

.api-table td {
  padding: 1rem;
  color: var(--muted-foreground);
  border-bottom: 1px solid var(--border);
}

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

.api-table code {
  background: var(--muted);
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  font-family: var(--font-mono);
}
