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

:root {
  --bg:        #ffffff;
  --bg-raised: #f8f9fb;
  --bg-card:   #ffffff;
  --border:    #e4e7ed;
  --border-strong: #d0d5de;
  --text:      #1a1f2e;
  --text-muted:#6b7280;
  --accent:    #2563eb;
  --accent-light: #eff6ff;
  --blue:      #2563eb;
  --violet:    #7c3aed;
  --teal:      #0d9488;
  --green:     #16a34a;
  --red:       #dc2626;
  --orange:    #ea580c;
  --font:      'Inter', system-ui, sans-serif;
  --mono:      'JetBrains Mono', 'Fira Code', monospace;
  --radius:    10px;
  --max-w:     1100px;
}

html, body {
  height: 100%;
  overflow: hidden;
}

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

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

/* ─── Slides container ─────────────────────────────────────────── */
.slides {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  /* padding-top matches navbar height */
  padding-top: 60px;
  box-sizing: border-box;
}

/* ─── Utility ───────────────────────────────────────────────────────────── */
.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.section-header {
  text-align: left;
  margin-bottom: 48px;
  max-width: 720px;
}
.section-header h2 {
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -.015em;
  margin-bottom: 8px;
}
.section-header p {
  color: var(--text-muted);
  font-size: .98rem;
}

.kicker {
  display: inline-block;
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .05em;
  color: var(--accent);
  margin-bottom: 14px;
}
.kicker::before { content: '# '; opacity: .6; }

.section-label {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.dot { color: var(--accent); }
.accent { color: var(--accent); }

/* ─── Highlight ─────────────────────────────────────────────────────────── */
mark {
  background: #fef9c3;
  color: inherit;
  border-radius: 3px;
  padding: 0 2px;
}

/* ─── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .18s, color .18s, border-color .18s, opacity .18s;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: #1d4ed8; }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border-strong);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover { color: var(--text); }

/* ─── Navbar ────────────────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-logo {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -.01em;
  white-space: nowrap;
}
.nav-links {
  display: flex;
  gap: 28px;
  flex: 1;
}
.nav-links a {
  font-size: .9rem;
  color: var(--text-muted);
  transition: color .15s;
}
.nav-links a:hover { color: var(--accent); }

.nav-actions { margin-left: auto; }

/* ─── Hero ──────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  height: 100dvh;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
}
.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 40% at 80% 30%, rgba(37,99,235,.05) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding: 60px 24px;
}
@media (max-width: 860px) {
  .hero-inner { padding: 40px 24px; }
}
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.eyebrow-tag {
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid #bfdbfe;
  padding: 1px 8px;
  border-radius: 4px;
  font-weight: 600;
}
.eyebrow-sep { opacity: .4; }

.hero-title {
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.03em;
  margin-bottom: 28px;
  max-width: 900px;
}
.hero-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 36px;
  max-width: 680px;
  line-height: 1.65;
}
.hero-meta {
  display: flex;
  gap: 24px;
  font-family: var(--mono);
  font-size: .85rem;
}
.hero-meta a {
  color: var(--accent);
  border-bottom: 1px dashed transparent;
  padding-bottom: 2px;
  transition: border-color .15s;
}
.hero-meta a:hover { border-bottom-color: var(--accent); }

/* code window */
.code-window {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(15,23,42,.12), 0 2px 6px rgba(15,23,42,.06);
}
.cw-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #1e293b;
  border-bottom: 1px solid #334155;
}
.cw-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #475569;
}
.cw-title {
  margin-left: 12px;
  font-family: var(--mono);
  font-size: .76rem;
  color: #94a3b8;
}
.cw-body {
  padding: 22px 24px;
  margin: 0;
  overflow-x: auto;
}
.cw-body code {
  font-family: var(--mono);
  font-size: .88rem;
  line-height: 1.7;
  color: #e2e8f0;
  white-space: pre;
}
.cw-body .k { color: #94a3b8; }
.cw-body .s { color: #93c5fd; }

/* ─── Concepts ──────────────────────────────────────────────────────────── */
.concepts {
  height: 100dvh;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  padding: 60px 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
  overflow: hidden;
}
.concepts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (max-width: 1000px) {
  .concepts-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .concepts-grid { grid-template-columns: 1fr; }
}
.concept-card {
  background: var(--bg);
  padding: 28px 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.concept-num {
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--accent);
  margin-bottom: 4px;
}
.concept-num::before { content: '/ '; opacity: .5; }
.concept-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: -.005em;
}
.concept-lead {
  font-size: .9rem;
  font-weight: 500;
  color: var(--text);
  margin: 0;
}
.concept-card p {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}
.concept-example {
  margin-top: auto;
  padding-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.concept-example code {
  font-family: var(--mono);
  font-size: .76rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ce-label {
  font-size: .68rem;
  color: var(--text-muted);
  font-family: var(--mono);
  white-space: nowrap;
  flex-shrink: 0;
  opacity: .7;
}

/* ─── Features ──────────────────────────────────────────────────────────── */
.features {
  height: 100dvh;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  padding: 60px 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (max-width: 900px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .features-grid { grid-template-columns: 1fr; }
}
.feature-card {
  background: var(--bg);
  padding: 28px;
  transition: background .2s;
}
.feature-card:hover { background: var(--bg-raised); }

.fc-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  background: var(--accent-light);
  color: var(--accent);
}
.fc-icon svg { width: 18px; height: 18px; }
.fc-blue, .fc-violet, .fc-teal, .fc-orange, .fc-green, .fc-red {
  background: var(--accent-light);
  color: var(--accent);
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -.005em;
}
.feature-card p {
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ─── Screenshots ───────────────────────────────────────────────────────── */
.screenshots {
  height: 100dvh;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  padding: 60px 0 40px;
  background: var(--bg-raised);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.shots-primary {
  margin-bottom: 16px;
}
.shot {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg);
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.shot:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37,99,235,.1);
}
.shot img {
  width: 100%;
  display: block;
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
}
.shot-main img {
  max-height: 36dvh;
  object-fit: cover;
}
.shots-secondary .shot img {
  max-height: 22dvh;
  object-fit: cover;
}
.shot figcaption {
  padding: 16px 20px;
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.shot-label {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid #bfdbfe;
  border-radius: 4px;
  padding: 2px 8px;
  white-space: nowrap;
  flex-shrink: 0;
}
.shots-secondary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 700px) {
  .shots-secondary { grid-template-columns: 1fr; }
}

/* ─── Install ───────────────────────────────────────────────────────────── */
.install {
  height: 100dvh;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 0 0;
  background: var(--bg-raised);
  border-top: 1px solid var(--border);
  overflow: hidden;
}
.install-inner .code-block,
.install-inner .install-cta { max-width: 760px; }

.code-block {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 32px;
}
.code-title {
  padding: 10px 20px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #94a3b8;
  border-bottom: 1px solid #334155;
  background: #0f172a;
}
.code-block pre {
  padding: 24px;
  overflow-x: auto;
}
.code-block code {
  font-family: var(--mono);
  font-size: .88rem;
  line-height: 1.8;
  color: #e2e8f0;
}
.cm { color: #64748b; }

.install-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ─── Footer ────────────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  background: var(--bg);
  margin-top: auto;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-links {
  display: flex;
  gap: 20px;
  margin-left: auto;
}
.footer-links a {
  font-size: .88rem;
  color: var(--text-muted);
  transition: color .15s;
}
.footer-links a:hover { color: var(--text); }
.footer-copy {
  font-size: .82rem;
  color: var(--text-muted);
}

/* ─── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 800px) {

  .nav-links { display: none; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .footer-links { margin-left: 0; }
}

/* ─── Active nav link ───────────────────────────────────────────────────── */
.nav-active {
  color: var(--accent) !important;
  font-weight: 600;
}

/* ─── Doc page (manual.html) ────────────────────────────────────────────── */
body.doc-page {
  overflow: auto;
}

.doc-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  max-width: calc(var(--max-w) + 220px + 40px);
  margin: 0 auto;
  padding: 80px 24px 0;
  gap: 48px;
  align-items: start;
  min-height: 100dvh;
}

@media (max-width: 800px) {
  .doc-layout {
    grid-template-columns: 1fr;
    padding: 72px 16px 0;
    gap: 0;
  }
}

/* Sidebar / TOC */
.doc-sidebar {
  position: sticky;
  top: 80px;
  padding-bottom: 40px;
}

@media (max-width: 800px) {
  .doc-sidebar { display: none; }
}

.doc-toc {
  padding: 20px 0;
}

.toc-label {
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.doc-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.doc-toc a {
  display: block;
  font-size: .875rem;
  color: var(--text-muted);
  padding: 5px 10px;
  border-radius: 6px;
  transition: background .15s, color .15s;
}
.doc-toc a:hover {
  background: var(--bg-raised);
  color: var(--text);
}

/* Main content */
.doc-main {
  padding: 20px 0 80px;
  min-width: 0;
}

.doc-hero {
  margin-bottom: 56px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}

.doc-hero h1 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -.02em;
  margin: 10px 0 14px;
}

.doc-hero-sub {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 600px;
  line-height: 1.65;
}

/* Sections */
.doc-section {
  margin-bottom: 56px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--border);
}
.doc-section:last-child {
  border-bottom: none;
}

.doc-section h2 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -.015em;
  margin-bottom: 18px;
}

.doc-section h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 28px 0 10px;
  color: var(--text);
}

.doc-section p {
  font-size: .94rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 14px;
}

.doc-section ul,
.doc-section ol {
  padding-left: 20px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.doc-section li {
  font-size: .94rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.doc-section li strong {
  color: var(--text);
}

.doc-section p strong {
  color: var(--text);
}

.doc-section kbd {
  display: inline-block;
  font-family: var(--mono);
  font-size: .78rem;
  font-weight: 500;
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 1px 7px;
  line-height: 1.5;
  color: var(--text);
  vertical-align: baseline;
}

.doc-section code {
  font-family: var(--mono);
  font-size: .83rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--text);
}

/* Tip callout */
.doc-tip {
  background: var(--accent-light);
  border: 1px solid #bfdbfe;
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 14px 18px;
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 20px 0;
}
.doc-tip strong { color: var(--text); }

/* Tables */
.doc-table-wrap {
  overflow-x: auto;
  margin: 16px 0 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}

.doc-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-raised);
  border-bottom: 1px solid var(--border);
}

.doc-table td {
  padding: 12px 16px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.6;
}
.doc-table tr:last-child td { border-bottom: none; }
.doc-table td strong { color: var(--text); }
.doc-table td kbd {
  font-family: var(--mono);
  font-size: .78rem;
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 1px 7px;
  color: var(--text);
}

.badge-accent {
  display: inline-block;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .05em;
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid #bfdbfe;
  border-radius: 4px;
  padding: 1px 6px;
  margin-left: 6px;
  vertical-align: middle;
}

/* Footer on doc page */
.doc-footer {
  margin-top: 0;
}

/* Screenshots inside manual sections */
.doc-shot {
  margin: 28px 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-raised);
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  transition: border-color .2s, box-shadow .2s;
}
.doc-shot:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(37,99,235,.1);
}
.doc-shot img {
  width: 100%;
  display: block;
  border-bottom: 1px solid var(--border);
}
.doc-shot figcaption {
  padding: 12px 18px;
  font-size: .83rem;
  color: var(--text-muted);
  line-height: 1.55;
}
