/* CocoPlus Documentation — GitHub Pages Stylesheet */

:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --muted: #555;
  --accent: #0052cc;
  --accent-light: #e8f0fe;
  --border: #e4e4e7;
  --code-bg: #f6f7f9;
  --nav-bg: #0f172a;
  --nav-text: #cbd5e1;
  --nav-active: #ffffff;
  --nav-hover: #94a3b8;
  --quote-border: #0052cc;
  --tag-bg: #f1f5f9;
  --tag-text: #475569;
  --crit-bg: #fff1f2;
  --crit-text: #881337;
  --warn-bg: #fffbeb;
  --warn-text: #92400e;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
  font-size: 17px;
}

/* ── Navigation ─────────────────────────────────────────── */

nav {
  background: var(--nav-bg);
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
  min-height: 52px;
}

nav .brand {
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  margin-right: 2rem;
  white-space: nowrap;
  text-decoration: none;
}

nav a {
  color: var(--nav-text);
  text-decoration: none;
  font-size: 0.82rem;
  padding: 0.9rem 0.75rem;
  display: inline-block;
  transition: color 0.15s;
  white-space: nowrap;
}

nav a:hover { color: var(--nav-hover); }
nav a.active { color: var(--nav-active); font-weight: 600; }

/* ── Layout ──────────────────────────────────────────────── */

.page-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
  color: #fff;
  padding: 4rem 2rem 3rem;
  text-align: center;
}

.page-header .label {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 1rem;
}

.page-header h1 {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.page-header .subtitle {
  font-size: 1.1rem;
  color: #94a3b8;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.content {
  max-width: 780px;
  margin: 0 auto;
  padding: 3.5rem 2rem 5rem;
}

/* ── Typography ──────────────────────────────────────────── */

h1, h2, h3 {
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

h2 {
  font-size: 1.65rem;
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

h2:first-child { margin-top: 0; }

h3 {
  font-size: 1.2rem;
  margin-top: 2rem;
  margin-bottom: 0.6rem;
  color: #1e293b;
}

p { margin-bottom: 1.25rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

strong { font-weight: 600; }

em { font-style: italic; }

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* ── Blockquotes ─────────────────────────────────────────── */

blockquote {
  border-left: 3px solid var(--quote-border);
  margin: 2rem 0;
  padding: 1rem 1.5rem;
  background: var(--accent-light);
  border-radius: 0 6px 6px 0;
  font-style: italic;
  color: #1e3a5f;
}

blockquote p { margin-bottom: 0; }

/* ── Code ────────────────────────────────────────────────── */

code {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace;
  font-size: 0.85em;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1em 0.4em;
}

pre {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.85rem;
  line-height: 1.6;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

/* ── Tables ──────────────────────────────────────────────── */

.table-wrap { overflow-x: auto; margin: 1.5rem 0; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th {
  background: #f8fafc;
  text-align: left;
  padding: 0.65rem 1rem;
  border-bottom: 2px solid var(--border);
  font-weight: 600;
  color: #334155;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: #f8fafc; }

/* ── Feature cards / callouts ────────────────────────────── */

.feature {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem 0;
}

.feature-name {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: #0f172a;
}

.feature-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 1rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.tag {
  display: inline-block;
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.tag.new {
  background: #dcfce7;
  color: #166534;
}

.cmd {
  font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
  font-size: 0.82rem;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1em 0.5em;
  color: #0052cc;
}

/* ── Index / doc cards ───────────────────────────────────── */

.doc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin: 2rem 0;
}

@media (max-width: 600px) {
  .doc-grid { grid-template-columns: 1fr; }
}

.doc-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  display: block;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.doc-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(0,82,204,0.08);
  text-decoration: none;
}

.doc-card .card-label {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.doc-card .card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.4rem;
}

.doc-card .card-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

.doc-card.featured {
  grid-column: span 2;
  border-color: var(--accent);
  background: var(--accent-light);
}

@media (max-width: 600px) {
  .doc-card.featured { grid-column: span 1; }
}

/* ── Quick summary box ───────────────────────────────────── */

.summary-box {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 10px;
  padding: 1.75rem 2rem;
  margin: 2.5rem 0;
}

.summary-box h3 {
  color: #fff;
  margin-top: 0;
  font-size: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.summary-box p {
  color: #94a3b8;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.summary-box p strong {
  color: #e2e8f0;
}

/* ── SecondEye lens pills ────────────────────────────────── */

.lens-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}

@media (max-width: 600px) { .lens-grid { grid-template-columns: 1fr; } }

.lens {
  border-radius: 8px;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--border);
}

.lens.haiku { background: #fffbeb; border-color: #fde68a; }
.lens.sonnet { background: #f0fdf4; border-color: #86efac; }
.lens.opus  { background: #f0f4ff; border-color: #a5b4fc; }

.lens .lens-model {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.lens.haiku .lens-model  { color: #92400e; }
.lens.sonnet .lens-model { color: #166534; }
.lens.opus .lens-model   { color: #3730a3; }

.lens .lens-name {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}

.lens p { font-size: 0.85rem; color: var(--muted); margin: 0; }

/* ── Footer ──────────────────────────────────────────────── */

footer {
  text-align: center;
  padding: 2.5rem 1rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.82rem;
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 700px) {
  .page-header h1 { font-size: 1.8rem; }
  .content { padding: 2rem 1.25rem 4rem; }
  nav { padding: 0 1rem; }
  nav .brand { margin-right: 1rem; }
}
