/* ============================================================
   Dendrite — dendrite.sh
   Light corporate theme. Brand gradient: #01F4FB → #3076F6 → #555CE7
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-alt: #f7f8fb;
  --bg-tint: #eef1f9;
  --border: #e4e7ef;
  --border-strong: #d3d8e4;
  --text: #0b0f1e;
  --text-dim: #4d5568;
  --text-faint: #7a8194;
  --cyan: #01b9d8;
  --blue: #3076f6;
  --indigo: #555ce7;
  --link: #2a5fd9;
  --grad: linear-gradient(90deg, #01f4fb 0%, #3076f6 55%, #555ce7 100%);
  --grad-btn: linear-gradient(135deg, #3076f6 0%, #555ce7 100%);
  --shadow-sm: 0 1px 2px rgba(11, 15, 30, 0.05);
  --shadow-md: 0 4px 16px rgba(11, 15, 30, 0.07);
  --shadow-lg: 0 16px 48px rgba(11, 15, 30, 0.12);
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

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

.container { max-width: 1120px; margin: 0 auto; padding: 0 28px; }

h1, h2, h3, h4 { letter-spacing: -0.022em; line-height: 1.15; color: var(--text); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; gap: 32px; height: 68px; }
.nav .logo img { height: 32px; display: block; }
.nav-links { display: flex; gap: 28px; margin-left: auto; align-items: center; }
.nav-links > a {
  color: var(--text-dim); font-size: 14.5px; font-weight: 500;
  transition: color .15s ease;
}
.nav-links > a:hover { color: var(--text); text-decoration: none; }
.nav-links a.cta {
  background: var(--grad-btn); color: #fff;
  padding: 9px 20px; border-radius: 8px; font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: filter .15s ease, transform .15s ease;
}
.nav-links a.cta:hover { filter: brightness(1.08); text-decoration: none; transform: translateY(-1px); }
.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero { padding: 88px 0 72px; text-align: center; }
.hero .logo-mark { height: 44px; margin-bottom: 28px; }
.hero h1 {
  font-size: clamp(38px, 5.6vw, 60px);
  font-weight: 800;
  max-width: 820px;
  margin: 0 auto 22px;
}
.hero h1 .grad {
  background: linear-gradient(90deg, #3076f6, #555ce7);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.tagline {
  font-size: clamp(17px, 2.1vw, 20px);
  color: var(--text-dim);
  max-width: 680px;
  margin: 0 auto 36px;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 20px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px;
  border-radius: 9px;
  font-weight: 600; font-size: 15.5px;
  transition: transform .15s ease, filter .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--grad-btn); color: #fff; box-shadow: 0 4px 14px rgba(48, 118, 246, .30); }
.btn-primary:hover { filter: brightness(1.07); }
.btn-secondary {
  border: 1px solid var(--border-strong); color: var(--text);
  background: #fff;
}
.btn-secondary:hover { border-color: var(--indigo); color: var(--indigo); }
.hero .version-note { font-family: var(--mono); font-size: 12.5px; color: var(--text-faint); }

/* ---------- Browser frame (product screenshots) ---------- */
.frame {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.frame .frame-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 16px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
.frame .frame-bar .dots { display: flex; gap: 6px; }
.frame .frame-bar .dots span { width: 10px; height: 10px; border-radius: 50%; background: #d9dde7; }
.frame .frame-bar .url {
  flex: 1; text-align: center;
  font-family: var(--mono); font-size: 12px; color: var(--text-faint);
  background: #fff; border: 1px solid var(--border);
  border-radius: 6px; padding: 3px 12px;
  margin: 0 40px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.frame img { display: block; width: 100%; height: auto; }
.frame.pad img { padding: 18px 18px 0; }
.hero-shot { max-width: 940px; margin: 44px auto 0; }

/* ---------- Trust bar ---------- */
.trust {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 34px 0;
}
.trust-row {
  display: flex; flex-wrap: wrap;
  justify-content: space-between; align-items: center; gap: 22px 36px;
}
.trust-item { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--text-dim); }
.trust-item svg { color: var(--blue); flex: none; }
.trust-item small { display: block; font-weight: 500; color: var(--text-faint); }

/* ---------- Sections ---------- */
section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.kicker {
  display: inline-block;
  font-size: 13px; font-weight: 700;
  letter-spacing: .10em; text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 14px;
}
.section-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section-head h2 { font-size: clamp(30px, 4vw, 42px); font-weight: 800; margin-bottom: 16px; }
.section-head p { color: var(--text-dim); font-size: 17.5px; }

/* ---------- Features ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 30px 28px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.feature-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--border-strong); }
.feature-card .f-icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(1,185,216,.10), rgba(85,92,231,.12));
  color: var(--blue);
  margin-bottom: 20px;
}
.feature-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.feature-card p { color: var(--text-dim); font-size: 14.5px; }

/* ---------- Install ---------- */
.install { text-align: center; }
.install .cmd-wrap {
  max-width: 640px; margin: 0 auto 18px;
  position: relative;
  background: #0b0f1e;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
}
.install pre {
  font-family: var(--mono); font-size: 14.5px;
  color: #e8eaf6;
  padding: 22px 60px 22px 24px;
  overflow-x: auto;
  text-align: left;
}
.install pre .p { color: #6fe3ef; }
.install .copy-btn {
  position: absolute; top: 50%; right: 14px; transform: translateY(-50%);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  color: #cfd6ea;
  font-size: 12.5px; font-weight: 600;
  border-radius: 7px; padding: 7px 13px; cursor: pointer;
  transition: background .15s ease;
}
.install .copy-btn:hover { background: rgba(255,255,255,.16); }
.install .copy-btn.copied { color: #7ef0c2; }
.install .alt-install { font-size: 14px; color: var(--text-faint); }
.install .alt-install code { font-family: var(--mono); font-size: 12.5px; background: var(--bg-tint); border: 1px solid var(--border); border-radius: 5px; padding: 2px 7px; }

/* ---------- Screenshots ---------- */
.shot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.shot { display: grid; gap: 14px; }
.shot.wide { grid-column: span 2; }
.shot figure { margin: 0; }
.shot .frame { transition: box-shadow .2s ease; }
.shot .frame:hover { box-shadow: var(--shadow-md); }
.shot figcaption strong { display: block; font-size: 15.5px; font-weight: 700; margin-bottom: 2px; }
.shot figcaption span { color: var(--text-dim); font-size: 14.5px; }

/* ---------- Pricing ---------- */
.tier-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
.tier {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 34px 30px;
  display: flex; flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.tier.featured {
  border: 2px solid transparent;
  background:
    linear-gradient(#fff, #fff) padding-box,
    var(--grad) border-box;
  box-shadow: var(--shadow-md);
}
.tier .badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--grad-btn); color: #fff;
  font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  padding: 5px 15px; border-radius: 999px; white-space: nowrap;
  box-shadow: 0 4px 12px rgba(48,118,246,.35);
}
.tier h3 { font-size: 19px; font-weight: 700; }
.tier .for { color: var(--text-faint); font-size: 14px; margin: 4px 0 22px; }
.tier .price { font-size: 44px; font-weight: 800; letter-spacing: -0.03em; }
.tier .price small { font-size: 15px; font-weight: 500; color: var(--text-faint); letter-spacing: 0; }
.tier .price-note { color: var(--text-faint); font-size: 13px; margin: 4px 0 26px; min-height: 20px; }
.tier ul { list-style: none; margin-bottom: 30px; flex: 1; }
.tier ul li { padding: 6px 0 6px 28px; position: relative; color: var(--text-dim); font-size: 14.5px; }
.tier ul li svg { position: absolute; left: 0; top: 11px; color: var(--blue); }
.tier ul li.na { color: #b4b9c6; }
.tier ul li.na svg { color: #c6cbd6; }
.tier .btn { justify-content: center; }
.tier .btn-secondary { background: transparent; }

/* ---------- FAQ ---------- */
.faq { max-width: 780px; margin: 0 auto; }
.faq details {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.faq details[open] { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.faq summary {
  cursor: pointer; font-weight: 600; font-size: 15.5px;
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--blue); font-weight: 700; font-size: 18px; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--text-dim); font-size: 14.5px; margin-top: 12px; }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; padding: 96px 0; }
.cta-band h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; margin-bottom: 16px; }
.cta-band p { color: var(--text-dim); margin-bottom: 34px; font-size: 17.5px; max-width: 560px; margin-left: auto; margin-right: auto; }

/* ---------- Docs ---------- */
.docs-layout { display: grid; grid-template-columns: 240px 1fr; gap: 56px; align-items: start; }
.docs-nav { position: sticky; top: 96px; border-right: 1px solid var(--border); padding-right: 24px; }
.docs-nav a { display: block; padding: 6px 0; color: var(--text-dim); font-size: 14.5px; }
.docs-nav a:hover { color: var(--text); text-decoration: none; }
.docs-nav .docs-nav-label {
  font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-faint); margin: 20px 0 6px;
}
.docs-nav .docs-nav-label:first-child { margin-top: 0; }
.doc-section { margin-bottom: 56px; }
.doc-section h2 { font-size: 27px; font-weight: 800; margin-bottom: 16px; padding-top: 10px; }
.doc-section h3 { font-size: 17px; font-weight: 700; margin: 26px 0 8px; }
.doc-section p, .doc-section li { color: var(--text-dim); font-size: 15px; }
.doc-section ul, .doc-section ol { padding-left: 22px; margin: 10px 0; }
.doc-section code {
  font-family: var(--mono); font-size: 13px;
  background: var(--bg-tint);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1.5px 6px;
  color: #27408f;
}
.doc-section pre {
  font-family: var(--mono); font-size: 13.5px;
  background: #0b0f1e; color: #e8eaf6;
  border-radius: 10px;
  padding: 18px 20px;
  overflow-x: auto;
  margin: 16px 0;
  line-height: 1.7;
  box-shadow: var(--shadow-md);
}
.doc-section pre code { background: none; border: none; padding: 0; color: inherit; }
.callout {
  border: 1px solid var(--border);
  border-left: 3px solid var(--blue);
  background: var(--bg-alt);
  border-radius: 0 10px 10px 0;
  padding: 14px 18px;
  margin: 18px 0;
  font-size: 14.5px;
  color: var(--text-dim);
}
.callout strong { color: var(--text); }

/* ---------- Legal ---------- */
.legal { max-width: 780px; }
.legal .page-head { margin-bottom: 8px; }
.legal h1 { font-size: 36px; font-weight: 800; margin: 10px 0 10px; }
.legal .updated { color: var(--text-faint); font-size: 13.5px; margin-bottom: 44px; font-family: var(--mono); }
.legal h2 { font-size: 20px; font-weight: 700; margin: 40px 0 14px; }
.legal p, .legal li { color: var(--text-dim); font-size: 15px; margin-bottom: 11px; }
.legal ul, .legal ol { padding-left: 22px; margin-bottom: 16px; }
.legal strong { color: var(--text); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-alt); padding: 56px 0 40px; }
.footer-grid { display: flex; flex-wrap: wrap; gap: 48px; justify-content: space-between; }
.footer-brand { max-width: 280px; }
.footer-brand img { height: 30px; margin-bottom: 14px; }
.footer-brand p { font-size: 13.5px; color: var(--text-faint); }
.footer-col h4 { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--text-faint); margin-bottom: 14px; }
.footer-col a { display: block; color: var(--text-dim); font-size: 14px; padding: 4px 0; }
.footer-col a:hover { color: var(--text); text-decoration: none; }
.footer-bottom {
  margin-top: 44px; padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center;
  color: var(--text-faint); font-size: 13px;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .feature-grid, .tier-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .docs-layout { grid-template-columns: 1fr; }
  .docs-nav { position: static; border-right: none; border-bottom: 1px solid var(--border); padding: 0 0 18px; margin-bottom: 32px; }
  .docs-nav a { display: inline-block; margin-right: 18px; }
  .docs-nav .docs-nav-label { display: none; }
}
@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-toggle {
    display: block; margin-left: auto;
    background: #fff; border: 1px solid var(--border-strong); color: var(--text);
    border-radius: 8px; padding: 8px 16px; font-size: 14px; font-weight: 600; cursor: pointer;
    font-family: var(--sans);
  }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: flex-start;
    position: absolute; top: 68px; left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 22px 28px; gap: 18px;
    box-shadow: var(--shadow-lg);
  }
  .shot-grid { grid-template-columns: 1fr; }
  .shot.wide { grid-column: span 1; }
  .feature-grid, .tier-grid { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 48px; }
  section { padding: 64px 0; }
}
