/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Koren brand color palette */
  --color-primary: #E61E25;
  --color-primary-dark: #b91c1c;
  --color-primary-light: #ef4444;
  --color-secondary: #5D5A88;
  --color-secondary-dark: #1D1D40;
  --color-accent: #E61E25;
  --color-accent-light: #f87171;
  
  --color-bg: #ffffff;
  --color-bg-alt: #f8fafc;
  --color-bg-dark: #232324;
  --color-text: #232324;
  --color-text-muted: #5D5A88;
  --color-text-light: #9795B5;
  
  --color-border: #D4D2E3;
  --color-code-bg: #1D1D40;
  --color-code-text: #D4D2E3;
  --color-code-bg-light: #f8fafc;
  
  --font-sans: 'Brockmann', Arial, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --font-mono: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
  
  --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 -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Brockmann', Arial, sans-serif;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  color: var(--color-text);
}

h1 { 
  font-size: 2.5rem; 
  font-weight: 700;
  letter-spacing: -0.025em;
}
h2 { 
  font-size: 1.875rem;
  letter-spacing: -0.015em;
  font-weight: 700;
}
h3 { 
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  font-weight: 700;
}
h4 { 
  font-size: 1.25rem;
  font-weight: 700;
}

p {
  margin-bottom: 1rem;
}

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

a:hover {
  color: var(--color-primary-dark);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Navbar */
.navbar {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Brockmann', Arial, sans-serif;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--color-text);
  letter-spacing: -0.015em;
}

.brand-icon {
  font-size: 1.25rem;
}

.navbar-menu {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.navbar-link {
  font-weight: 400;
  color: var(--color-text-muted);
  transition: color 0.2s;
  font-size: 0.9375rem;
}

.navbar-link:hover,
.navbar-link.active {
  color: var(--color-primary);
}

.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
}

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

/* Hero Section */
.hero {
  padding: 4rem 0 5rem;
  background: var(--color-bg);
}

.hero-title {
  font-family: 'Brockmann', Arial, sans-serif;
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--color-text);
  letter-spacing: -0.04em;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  max-width: 640px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 3rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.625rem 1.25rem;
  font-weight: 500;
  border-radius: 0.375rem;
  transition: all 0.15s;
  cursor: pointer;
  border: none;
  text-decoration: none;
  font-size: 0.9375rem;
}

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

.btn-primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
}

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

.btn-secondary:hover {
  border-color: var(--color-text-muted);
  background: var(--color-bg-alt);
}

.btn-large {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

/* Code Examples */
.hero-demo {
  margin-top: 3rem;
}

.code-example {
  background: var(--color-code-bg);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  overflow: hidden;
}

.code-header {
  background: #334155;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid #475569;
}

.code-title {
  color: #cbd5e1;
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.code-example pre {
  margin: 0;
  padding: 1.25rem;
  overflow-x: auto;
  background: var(--color-code-bg);
}

.code-example code {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--color-code-text);
}

.prompt {
  color: #10b981;
  font-weight: 500;
}

.comment {
  color: #94a3b8;
  font-style: italic;
}

/* Features Section */
.features {
  padding: 4rem 0;
  background: var(--color-bg-alt);
}

.section-title {
  font-family: 'Brockmann', Arial, sans-serif;
  text-align: center;
  margin-bottom: 3rem;
  font-size: 2rem;
  font-weight: 700;
}

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

.feature-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  padding: 1.75rem;
  transition: all 0.15s;
}

.feature-card:hover {
  border-color: var(--color-border);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  opacity: 0.8;
}

.feature-card h3 {
  font-family: 'Brockmann', Arial, sans-serif;
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.feature-card p {
  color: var(--color-text-muted);
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* Workflow Example */
.workflow-example {
  padding: 4rem 0;
  background: var(--color-bg-alt);
}

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

.workflow-demo {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.workflow-step {
  flex: 1;
  min-width: 280px;
  max-width: 320px;
}

.workflow-step h3 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-family: 'Brockmann', Arial, sans-serif;
  font-size: 1rem;
  font-weight: 700;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  background: var(--color-primary);
  color: white;
  border-radius: 50%;
  font-size: 0.875rem;
  font-weight: 600;
}

.workflow-arrow {
  font-size: 1.5rem;
  color: var(--color-primary);
  font-weight: 400;
  margin-top: 2rem;
}

.workflow-step pre {
  background: var(--color-code-bg);
  border-radius: 0.5rem;
  padding: 1rem;
  overflow-x: auto;
}

.workflow-step code {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--color-code-text);
}


/* Testimonial */
.testimonial {
  padding: 4rem 0;
  background: var(--color-bg);
}

.testimonial-quote {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  font-size: 1.25rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.testimonial-quote cite {
  display: block;
  margin-top: 1rem;
  font-size: 0.9375rem;
  font-style: normal;
  color: var(--color-text);
  font-weight: 500;
}

/* CTA Section */
.cta {
  padding: 4rem 0;
  background: var(--color-primary);
  color: white;
  text-align: center;
}

.cta h2 {
  font-family: 'Brockmann', Arial, sans-serif;
  color: white;
  margin-bottom: 1rem;
  font-size: 1.75rem;
  font-weight: 700;
}

.cta p {
  font-size: 1.125rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.cta-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

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

.cta .btn-primary:hover {
  background: var(--color-bg-alt);
}

.cta .btn-secondary {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.5);
  color: white;
}

.cta .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: white;
}

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

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  font-family: 'Brockmann', Arial, sans-serif;
  color: var(--color-text);
  font-size: 0.9375rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

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

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

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

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

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

/* Page Layout */
.page-layout {
  padding: 3rem 0;
  min-height: calc(100vh - 4rem);
}

.page-content {
  max-width: 800px;
  margin: 0 auto;
}

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

.page-header h1 {
  font-family: 'Brockmann', Arial, sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--color-text);
}

.page-description {
  font-size: 1.25rem;
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.6;
}

.page-body {
  line-height: 1.7;
}

.page-body h1 {
  display: none; /* Hide duplicate h1 from markdown */
}

.page-body h2 {
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
  font-size: 1.75rem;
}

.page-body h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 1.375rem;
}

.page-body h4 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.125rem;
}

.page-body pre {
  background: var(--color-code-bg);
  color: var(--color-code-text);
  padding: 1.25rem;
  border-radius: 0.375rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--color-border);
}

.page-body ul,
.page-body ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
}

.page-body li {
  margin-bottom: 0.5rem;
}

.page-body blockquote {
  border-left: 4px solid var(--color-primary);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  color: var(--color-text-muted);
  font-style: italic;
}

.page-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

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

.page-body th {
  font-weight: 600;
  color: var(--color-text);
  background: var(--color-bg-alt);
}

/* Guide Layout */
.guide-layout {
  padding: 3rem 0;
  min-height: calc(100vh - 4rem);
}

.guide-content {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
}

.guide-sidebar {
  position: sticky;
  top: 5rem;
  height: fit-content;
}

.guide-sidebar h3 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

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

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

.guide-nav a {
  color: var(--color-text-muted);
  display: block;
  padding: 0.5rem 0;
  border-left: 3px solid transparent;
  padding-left: 1rem;
  transition: all 0.2s;
}

.guide-nav a:hover,
.guide-nav a.active {
  color: var(--color-text);
  border-left-color: var(--color-primary);
  background: var(--color-bg-alt);
}

.guide-main {
  max-width: 800px;
}

.guide-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--color-border);
}

.guide-header h1 {
  font-family: 'Brockmann', Arial, sans-serif;
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--color-text);
}

.guide-description {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.6;
}

.guide-body {
  line-height: 1.7;
}

.guide-body h1 {
  display: none; /* Hide duplicate h1 from markdown */
}

.guide-body h2 {
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
  font-size: 1.75rem;
}

.guide-body h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 1.375rem;
}

.guide-body h4 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.125rem;
}

.guide-body pre {
  background: var(--color-code-bg);
  color: var(--color-code-text);
  padding: 1.25rem;
  border-radius: 0.375rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--color-border);
}

.guide-body ul,
.guide-body ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
}

.guide-body li {
  margin-bottom: 0.5rem;
}

.guide-body blockquote {
  border-left: 4px solid var(--color-primary);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  color: var(--color-text-muted);
  font-style: italic;
}

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

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

  .navbar-toggle {
    display: flex;
  }

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

  .hero-subtitle {
    font-size: 1.25rem;
  }

  .hero-actions {
    flex-direction: column;
    width: fit-content;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .guide-content {
    grid-template-columns: 1fr;
  }

  .guide-sidebar {
    position: static;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 2rem;
  }

  .page-header h1 {
    font-size: 2rem;
  }

  .guide-header h1 {
    font-size: 1.875rem;
  }

  .workflow-arrow {
    transform: rotate(90deg);
  }
}

/* Grid pattern overlay for visual brand consistency */
.grid-overlay {
  background-image: 
    linear-gradient(to right, rgba(230, 30, 37, 0.1) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(230, 30, 37, 0.1) 1px, transparent 1px);
  background-size: 10px 10px;
}

/* 3D effect for key elements */
.elevated {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.elevated:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Koren brand visual elements */
.brand-squares {
  display: inline-flex;
  gap: 2px;
  align-items: center;
}

.brand-square {
  width: 8px;
  height: 8px;
  background: var(--color-primary);
}

/* Inline code */
code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--color-code-bg-light);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  color: var(--color-primary);
  border: 1px solid var(--color-border);
}

pre code {
  background: none;
  padding: 0;
  border: none;
  font-size: 0.8125rem;
}

