@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* EggPdf — GitHub Pages stylesheet (Eggspot brand) */

/* ── Variables ───────────────────────────────────────────────── */
:root {
  --brand: #FAB400;
  --accent: #5956E9;
  --dark: #000000;
  --dark-card: #111111;
  --text: #292930;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --radius: 10px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", "Cascadia Code", Consolas, "Courier New", monospace;
  --max-width: 1120px;
  --nav-height: 64px;
}

/* ── Reset ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: #fff;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { padding-left: 1.5rem; }

/* ── Layout helpers ──────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.section { padding: 80px 0; }
.section-alt { background: #f9fafb; }
.install-section { padding: 80px 0; background: #f9fafb; }

/* ── Nav ─────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: #fff;
  box-shadow: 0 1px 0 var(--border);
}
.nav .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  white-space: nowrap;
}
.nav-logo:hover { text-decoration: none; }
.nav-logo .logo-text {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
}
.nav-logo .logo-accent { color: var(--brand); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}
.nav-links a {
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color .15s, background .15s;
}
.nav-links a:hover {
  color: var(--text);
  background: #f3f4f6;
  text-decoration: none;
}
.nav-links a.nav-github {
  background: var(--brand);
  color: #fff;
  padding: 6px 14px;
  border-radius: var(--radius);
  font-weight: 600;
}
.nav-links a.nav-github:hover { background: #e6a200; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: background .15s, transform .1s;
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: var(--brand);
  color: #fff;
}
.btn-primary:hover { background: #e6a200; }
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--text);
}
.btn-outline:hover { background: var(--text); color: #fff; }
.btn-accent {
  background: var(--accent);
  color: #fff;
}
.btn-accent:hover { background: #4744d4; }

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
  padding: 120px 0 80px;
  background: #fff;
}
.hero-badge {
  display: inline-block;
  padding: 4px 14px;
  background: #FEF3C7;
  color: #92400E;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}
.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 1.25rem;
  letter-spacing: -0.03em;
}
.accent { color: var(--brand); }
.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 2.5rem;
}
.hero-cta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ── Benchmark strip ─────────────────────────────────────────── */
.benchmarks { padding: 48px 0; background: #000; color: #fff; }
.benchmark-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.benchmark-card {
  background: #111;
  border: 1px solid #333;
  border-radius: var(--radius);
  text-align: center;
  padding: 28px 24px;
}
.benchmark-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--brand);
  line-height: 1;
  letter-spacing: -0.03em;
}
.benchmark-label {
  color: #9ca3af;
  font-size: 0.85rem;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

/* ── Features grid ───────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #fff;
  transition: box-shadow .2s, transform .2s;
}
.feature-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); transform: translateY(-2px); }
.feature-icon {
  width: 40px;
  height: 40px;
  background: #FEF3C7;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 12px;
}
.feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: var(--text);
}
.feature-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ── Code blocks ─────────────────────────────────────────────── */
.code-block {
  background: #1a1a2e;
  color: #e2e8f0;
  border-radius: var(--radius);
  padding: 20px 24px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.7;
}
.code-block pre { margin: 0; }
.code-block code { font-family: inherit; white-space: pre; }
/* Inline code */
code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: #f3f4f6;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1em 0.4em;
}
.code-block code { background: none; border: none; padding: 0; border-radius: 0; font-size: inherit; }

/* Syntax colours */
.kw  { color: #FAB400; }
.kw2 { color: #93c5fd; }
.str { color: #86efac; }
.cmt { color: #6b7280; font-style: italic; }
.typ { color: #c084fc; }
.num { color: #f78c6c; }
.fn  { color: #93c5fd; }
.var { color: #93c5fd; }
.pun { color: #89ddff; }

/* Code block header */
.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #111827;
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 0.6rem 1.25rem;
  font-size: 0.8rem;
  color: #6b7280;
  font-family: var(--font-mono);
  border-bottom: 1px solid #374151;
}
.code-header + .code-block { border-radius: 0 0 var(--radius) var(--radius); }

/* ── Tabs ────────────────────────────────────────────────────── */
.tabs { margin-bottom: 0; }
.tab-list {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 0;
  flex-wrap: wrap;
}
.tab-btn {
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}
.tab-content { }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.tab-panel .code-block { border-radius: 0 var(--radius) var(--radius) var(--radius); }

/* ── Page header (inner pages) ───────────────────────────────── */
.page-header {
  padding: 60px 0 40px;
  background: #000;
  color: #fff;
}
.page-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}
.page-header p { color: #9ca3af; }

/* ── Docs content ────────────────────────────────────────────── */
.docs-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3rem;
  align-items: start;
  padding: 60px 0 80px;
}
.docs-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 1.5rem);
}
.docs-sidebar nav { display: flex; flex-direction: column; gap: 0.25rem; }
.docs-sidebar a {
  display: block;
  padding: 6px 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color .15s;
}
.docs-sidebar a:hover, .docs-sidebar a.active {
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
}
.docs-sidebar .sidebar-section {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0.75rem 0 0.25rem;
}
.docs-content { min-width: 0; }
.docs-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-top: 48px;
  margin-bottom: 1rem;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--brand);
  color: var(--text);
}
.docs-content h2:first-child { margin-top: 0; }
.docs-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 0.75rem;
  color: var(--text);
}
.docs-content p {
  margin-bottom: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
}
.docs-content ul, .docs-content ol {
  margin-bottom: 1rem;
  color: var(--text-muted);
  line-height: 1.8;
}
.docs-content .code-block { margin: 1.25rem 0; }
.docs-content .code-header + .code-block { margin-top: 0; }

/* ── Tables ──────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; margin: 1.25rem 0; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
th {
  background: #000;
  color: #fff;
  text-align: left;
  padding: 10px 16px;
  font-weight: 700;
  white-space: nowrap;
}
td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text-muted);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f9fafb; }
td a.dl-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.82rem;
  font-weight: 600;
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FDE68A;
  transition: background .15s;
}
td a.dl-link:hover { background: #FDE68A; text-decoration: none; }

/* ── Callouts ────────────────────────────────────────────────── */
.callout {
  display: flex;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin: 1.25rem 0;
  font-size: 0.9rem;
  line-height: 1.6;
}
.callout-icon { font-size: 1.25rem; flex-shrink: 0; }
.callout-info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e3a8a; }
.callout-warning { background: #fffbeb; border: 1px solid #fde68a; color: #78350f; }
.callout-success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #064e3b; }

/* ── Alert ───────────────────────────────────────────────────── */
.alert {
  border-left: 4px solid var(--brand);
  background: #FFFBEB;
  padding: 12px 16px;
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text);
}

/* ── Quick-install / install-grid ────────────────────────────── */
.install-section h2 {
  text-align: center;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}
.install-section .section-sub {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

/* ── Section headings ────────────────────────────────────────── */
.section-heading {
  text-align: center;
  margin-bottom: 3rem;
}
.section-heading h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  margin-bottom: 0.5rem;
}
.section-heading p {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto;
}

/* ── Code example section ────────────────────────────────────── */
.code-example {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.code-example-text h2 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}
.code-example-text p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

/* ── Footer ──────────────────────────────────────────────────── */
.footer {
  background: #000;
  color: #9ca3af;
  text-align: center;
  padding: 40px 20px;
}
.footer .footer-logo {
  margin-bottom: 12px;
  display: flex;
  justify-content: center;
}
.footer a { color: var(--brand); text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer p { font-size: 0.9rem; }

/* ── Hamburger button (hidden on desktop) ────────────────────── */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--text);
  border-radius: 6px;
  transition: background .15s;
  flex-shrink: 0;
}
.nav-hamburger:hover { background: #f3f4f6; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav { position: relative; }
  .nav-hamburger { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    z-index: 200;
    background: #fff;
    border-top: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
    flex-direction: column;
    padding: 0.5rem 1.5rem 1rem;
    gap: 0;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    padding: 0.75rem 0;
    font-size: 1rem;
    border-bottom: 1px solid #f3f4f6;
    border-radius: 0;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .nav-links a:last-child { border-bottom: none; }
  .nav-links a.nav-github { margin-top: 0.25rem; justify-content: center; }

  .hero { padding: 60px 0 44px; }
  .benchmark-cards { grid-template-columns: 1fr; gap: 1rem; }
  .features-grid { grid-template-columns: 1fr; }
  .code-example { grid-template-columns: 1fr; gap: 2rem; }
  .section { padding: 48px 0; }
  .install-section { padding: 48px 0; }
  .page-header { padding: 40px 0 28px; }

  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar {
    display: block;
    position: static;
    background: #f9fafb;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 1.25rem;
    margin-bottom: 2rem;
  }
  .docs-sidebar nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
  }
  .docs-sidebar a { padding: 2px 0; }
}

/* ── Extra-small screens (iPhone SE: 375px) ──────────────────── */
@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .tab-btn { padding: 8px 10px; font-size: 0.82rem; }
  .btn { padding: 12px 20px; font-size: 0.9rem; }
  .hero h1 { font-size: 2rem; }
  .hero-subtitle { font-size: 1rem; }
  .benchmark-value { font-size: 1.75rem; }
  .section-heading h2 { font-size: 1.5rem; }
  .install-section h2 { font-size: 1.5rem; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .benchmark-cards { grid-template-columns: repeat(3, 1fr); }
}
