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

:root {
  --bg:       #f9f9f7;
  --surface:  #ffffff;
  --border:   #e0deda;
  --text:     #1a1a18;
  --muted:    #6b6b65;
  --accent:   #1a4fd6;
  --accent-h: #1240b0;
  --mono:     "SFMono-Regular", "Consolas", "Liberation Mono", monospace;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

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

/* ── Nav ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0 2rem;
  height: 52px;
}
nav .brand {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -.01em;
  color: var(--text);
  white-space: nowrap;
}
nav .links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  font-size: .875rem;
  flex-wrap: wrap;
}
nav .links a { color: var(--muted); padding: .2rem .1rem; }
nav .links a:hover { color: var(--text); text-decoration: none; }
nav .links a.active { color: var(--text); font-weight: 600; }
nav .cta {
  margin-left: auto;
  background: var(--accent);
  color: #fff !important;
  padding: .35rem .85rem;
  border-radius: 4px;
  font-size: .8rem;
  font-weight: 600;
  white-space: nowrap;
}
nav .cta:hover { background: var(--accent-h); text-decoration: none; }

/* ── Tab panels ── */
.tab-panel { display: none; padding: 5rem 2rem; }
.tab-panel.active { display: block; }

/* ── Layout ── */
.inner { max-width: 860px; margin: 0 auto; }

h1, h2, h3 { line-height: 1.25; font-weight: 700; }
h2 { font-size: 1.6rem; margin-bottom: 1rem; }
h3 { font-size: 1.1rem; margin-bottom: .4rem; }
p { color: var(--muted); margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

.label {
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
  margin-bottom: .5rem;
}

/* ── Hero ── */
#tab-home {
  padding-top: 7rem;
}
#tab-home .inner { text-align: center; }
#tab-home h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: -.02em;
  margin-bottom: 1.25rem;
}
#tab-home h1 span { color: var(--text); }
#tab-home .sub {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 2rem;
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: .6rem 1.4rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: .9rem;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-h); text-decoration: none; }
.btn-outline { border: 1.5px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* ── Features ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
}
.feature-card h3 { color: var(--text); margin-bottom: .4rem; }
.feature-card p { font-size: .875rem; margin: 0; }

/* ── Feature thumbnails ── */
.thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .75rem;
}
.thumbs img {
  width: 56px;
  height: 42px;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: 3px;
  cursor: zoom-in;
  background: #111;
  transition: transform .15s, border-color .15s;
}
.thumbs img:hover {
  transform: scale(1.08);
  border-color: var(--accent);
}

/* ── Lightbox ── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.88);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 2rem;
  cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: 4px;
  box-shadow: 0 10px 40px rgba(0,0,0,.6);
}
#lightbox-caption {
  color: rgba(255,255,255,.85);
  font-size: .9rem;
  margin-top: 1rem;
  text-align: center;
}
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.1);
  color: #fff;
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.lightbox-nav:hover { background: rgba(255,255,255,.25); }
.lightbox-nav.prev { left: 1.5rem; }
.lightbox-nav.next { right: 1.5rem; }

/* ── Videos ── */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.video-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface);
}
.video-thumb {
  background: #1a1a1a;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2.5rem;
  position: relative;
}
.video-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.35);
  transition: background .2s;
}
.video-card:hover .video-thumb::after { background: rgba(0,0,0,.15); }
.video-info { padding: .75rem 1rem; }
.video-info h3 { font-size: .9rem; margin-bottom: .2rem; }
.video-info p { font-size: .8rem; }

/* ── Team ── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}
.member {
  text-align: center;
}
.member .avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--border);
  margin: 0 auto .75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--muted);
}
.member h3 { font-size: .95rem; margin-bottom: .2rem; }
.member p { font-size: .8rem; }

/* ── Docs ── */
#docs .inner { text-align: left; }
.docs-list {
  list-style: none;
  margin-top: 2rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface);
}
.docs-list li {
  border-bottom: 1px solid var(--border);
}
.docs-list li:last-child { border-bottom: none; }
.docs-list a {
  display: block;
  padding: .85rem 1.25rem;
  font-size: .9rem;
  color: var(--text);
  transition: background .15s;
}
.docs-list a:hover { background: var(--bg); text-decoration: none; color: var(--accent); }
.docs-list .sub { padding-left: 2.5rem; font-size: .85rem; color: var(--muted); }
.docs-list .sub a { color: var(--muted); }
.docs-list .sub a:hover { color: var(--accent); }

/* ── Footer ── */
footer {
  background: var(--text);
  color: rgba(255,255,255,.5);
  text-align: center;
  padding: 2rem;
  font-size: .8rem;
}
footer a { color: rgba(255,255,255,.7); }
footer a:hover { color: #fff; }

/* ── Docs page ── */
.docs-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0;
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1rem;
}
.docs-sidebar {
  border-right: 1px solid var(--border);
  padding-right: 1.5rem;
  position: sticky;
  top: 68px;
  align-self: start;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
}
.docs-sidebar h4 {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--muted);
  margin-bottom: .75rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--border);
}
.docs-sidebar ul { list-style: none; }
.docs-sidebar li { margin-bottom: .1rem; }
.docs-sidebar a {
  display: block;
  padding: .3rem .6rem;
  border-radius: 4px;
  font-size: .85rem;
  color: var(--muted);
}
.docs-sidebar a:hover, .docs-sidebar a.active {
  background: var(--bg);
  color: var(--accent);
  text-decoration: none;
}
.docs-sidebar .level2 { padding-left: 1.5rem; font-size: .8rem; }

.docs-content {
  padding: 0 0 4rem 1.25rem;
  min-width: 0;
}
.docs-content h1 { font-size: 1.6rem; margin-bottom: 1rem; }
.docs-content h2 { font-size: 1.25rem; margin: 2rem 0 .75rem; padding-top: .5rem; border-top: 1px solid var(--border); }
.docs-content h3 { font-size: 1rem; margin: 1.5rem 0 .5rem; color: var(--text); }
.docs-content p { color: var(--muted); margin-bottom: .85rem; }
.docs-content ul, .docs-content ol { padding-left: 1.5rem; color: var(--muted); margin-bottom: .85rem; }
.docs-content li { margin-bottom: .3rem; }
.docs-content code {
  font-family: var(--mono);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: .1em .35em;
  border-radius: 3px;
  font-size: .85em;
  color: var(--text);
}
.docs-content pre {
  background: #1e1e1e;
  color: #d4d4d4;
  border-radius: 6px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin-bottom: 1rem;
}
.docs-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: .85rem;
  color: inherit;
}
.docs-content img {
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: 4px;
  margin: .75rem 0;
}
.docs-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: .9rem;
}
.docs-content th, .docs-content td {
  border: 1px solid var(--border);
  padding: .5rem .75rem;
  text-align: left;
}
.docs-content th { background: var(--bg); font-weight: 600; color: var(--text); }
.docs-content td { color: var(--muted); }
.docs-content blockquote {
  border-left: 3px solid var(--accent);
  padding: .5rem 1rem;
  margin-bottom: 1rem;
  background: var(--bg);
  border-radius: 0 4px 4px 0;
}
.docs-content blockquote p { margin: 0; font-size: .9rem; }
.docs-content a { color: var(--accent); }
.docs-content hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }

.doc-loading { color: var(--muted); padding: 2rem 0; }
