/* ==========================================================================
   PDFbull GitHub Pages — Modern Dark Theme Design System (NO GLASSMORPHISM)
   ========================================================================== */

:root {
  /* Color Tokens */
  --bg-dark: #0a0c10;
  --bg-card: #12151f;
  --bg-card-hover: #181d2c;
  --bg-section-dark: #07080c;
  --bg-terminal: #0b0d13;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.4);
  --border-active: #6366f1;

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --accent-primary: #6366f1;
  --accent-cyan: #38bdf8;
  --accent-emerald: #10b981;
  --accent-purple: #a855f7;

  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #38bdf8 100%);
  --gradient-glow: radial-gradient(circle at 50% -20%, rgba(99, 102, 241, 0.25), transparent 70%);

  /* Typography Scale */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-code: 'JetBrains Mono', monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.3);
}

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

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

code {
  font-family: var(--font-code);
  font-size: 0.9em;
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent-cyan);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

/* Layout Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Typography Utilities */
.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1.05rem;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.6);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border-color: var(--border-subtle);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-focus);
  transform: translateY(-2px);
}

.btn-block {
  width: 100%;
}

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

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
}

.brand-icon {
  width: 28px;
  height: 28px;
}

.version-tag {
  font-size: 0.75rem;
  font-family: var(--font-code);
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 2px 8px;
  border-radius: 12px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
}

.nav-links a:hover {
  color: var(--text-main);
}

.nav-cta {
  color: var(--accent-cyan) !important;
  font-weight: 600;
}

.github-star-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.github-star-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-focus);
}

/* Hero Section */
.hero-section {
  position: relative;
  padding: 100px 0 80px;
  text-align: center;
}

.hero-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1000px;
  height: 500px;
  background: var(--gradient-glow);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: var(--accent-cyan);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-emerald);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 760px;
  margin: 0 auto 36px;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

/* Terminal Widget */
.terminal-widget {
  max-width: 520px;
  margin: 0 auto 60px;
  background: var(--bg-terminal);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  text-align: left;
  overflow: hidden;
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #10121a;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.terminal-title {
  font-size: 0.75rem;
  font-family: var(--font-code);
  color: var(--text-dim);
}

.terminal-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  font-family: var(--font-code);
  font-size: 0.95rem;
}

.prompt {
  color: var(--accent-cyan);
  margin-right: 8px;
}

.copy-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  background: rgba(99, 102, 241, 0.2);
  color: var(--text-main);
  border-color: var(--border-focus);
}

/* App Interface Frame */
.app-frame-wrapper {
  max-width: 1000px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.app-frame-header {
  background: #0d0f16;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
}

.frame-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  padding: 6px 14px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-main);
  border-top: 2px solid var(--accent-primary);
}

.app-screenshot {
  width: 100%;
  height: auto;
  display: block;
}

/* Sections */
.section {
  padding: 90px 0;
}

.section-dark {
  background-color: var(--bg-section-dark);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 60px;
}

.section-tag {
  font-family: var(--font-code);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-cyan);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: block;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
}

/* Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.bento-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.bento-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-focus);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-featured {
  grid-column: span 2;
  background: linear-gradient(145deg, #131726 0%, #0e111a 100%);
  border-color: rgba(99, 102, 241, 0.3);
}

.card-icon {
  font-size: 2.2rem;
  margin-bottom: 20px;
}

.bento-card h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.bento-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 24px;
  flex-grow: 1;
}

.card-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  font-size: 0.75rem;
  font-family: var(--font-code);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--accent-cyan);
  padding: 4px 10px;
  border-radius: 12px;
}

/* OCR Demo Section */
.ocr-demo-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.ocr-tabs {
  display: flex;
  background: #0d0f16;
  border-bottom: 1px solid var(--border-subtle);
}

.ocr-tab-btn {
  flex: 1;
  padding: 16px 20px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ocr-tab-btn.active {
  color: var(--text-main);
  border-bottom-color: var(--accent-primary);
  background: var(--bg-card);
}

.ocr-demo-content {
  padding: 36px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}

.ocr-preview-box {
  position: relative;
  background: #090a0f;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ocr-scan-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gradient-primary);
  box-shadow: 0 0 15px var(--accent-cyan);
  animation: scanAnim 3s ease-in-out infinite alternate;
}

@keyframes scanAnim {
  0% { top: 0%; }
  100% { top: 98%; }
}

.ocr-sample-text {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.ocr-word-box {
  background: rgba(99, 102, 241, 0.15);
  border: 1px dashed var(--accent-primary);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 1.1rem;
  font-weight: 500;
}

.ocr-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ocr-detail-item {
  display: flex;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.95rem;
}

.detail-label {
  color: var(--text-muted);
}

.detail-val.highlight {
  color: var(--accent-emerald);
  font-weight: 600;
}

/* Benchmark Table */
.table-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 40px;
}

.benchmark-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.benchmark-table th, .benchmark-table td {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.95rem;
}

.benchmark-table th {
  background: #0d0f16;
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text-muted);
}

.highlight-col {
  background: rgba(99, 102, 241, 0.06);
}

.text-success {
  color: var(--accent-emerald);
}

.benchmark-img-card {
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.scorecard-img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}

/* Download Section */
.download-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.download-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  text-align: center;
  transition: all 0.3s ease;
}

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

.download-os-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.download-card h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.download-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.download-sub {
  display: block;
  font-size: 0.75rem;
  font-family: var(--font-code);
  color: var(--text-dim);
  margin-top: 16px;
}

/* Footer */
.footer {
  background: #050608;
  border-top: 1px solid var(--border-subtle);
  padding: 60px 0 40px;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  gap: 40px;
}

.footer-brand {
  max-width: 320px;
}

.footer-logo {
  width: 32px;
  height: 32px;
  margin-bottom: 12px;
}

.footer-name {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  display: block;
  margin-bottom: 8px;
}

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

.footer-links {
  display: flex;
  gap: 60px;
}

.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-main);
}

.footer-col a {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--accent-cyan);
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
  .bento-grid, .download-grid {
    grid-template-columns: 1fr;
  }
  .card-featured {
    grid-column: span 1;
  }
  .hero-title {
    font-size: 2.6rem;
  }
  .ocr-demo-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .footer-container {
    flex-direction: column;
  }
}
