/* ==========================================================
   PIXBOB FONT STUDIO — DOCUMENTATION STYLESHEET
   ----------------------------------------------------------
   Token values below are pulled directly from PixBob Font
   Studio's own app stylesheet, so the docs feel related to
   the app without imitating its editor UI.

   Design note: the three callout types (Tip / Note / Warning)
   are tinted with the exact same colors as the app's own
   canvas guides — Baseline (orange), Max Height (cyan), and
   Left Side Bearing (magenta). In the editor those lines guide
   your drawing; here they guide your reading.
   ========================================================== */

/* ==========================================================
   CUSTOM PIXBOB SANS FONTS
   Two faces registered with distinct family names so weight
   matching is deterministic (the woff files are static faces):
     • 'PixBob Sans'      → Regular, used for body text
     • 'PixBob Sans Bold' → Bold,    used for titles & subtitles
   ========================================================== */
@font-face {
  font-family: 'PixBob Sans';
  src: url('assets/Pixbob_Sans-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'PixBob Sans Bold';
  src: url('assets/Pixbob_Sans-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================
   PIXBOB ICON FONT
   Icon glyphs (menu / shortcuts) rendered via the PixBob
   icon font instead of system symbol characters.
   ========================================================== */
@font-face {
  font-family: 'PixBob Icons';
  src: url('assets/PixBob_Icons.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

:root {
  /* Fonts */
  --font-mono: 'IBM Plex Mono', 'Courier New', Courier, monospace;
  --font-sans: 'PixBob Sans', 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'PixBob Sans Bold', 'PixBob Sans', 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Surfaces (from PixBob app: --bg-app / --bg-panel / --bg-dark) */
  --bg-app: #18181c;
  --bg-elevated: #1e1e23;
  --bg-panel: #222228;
  --bg-inset: #101012;
  --bg-code: #0c0c0e;

  --border-color: #303038;
  --border-soft: #26262c;

  --text-bright: #ffffff;
  --text-main: #a0a0ac;
  --text-muted: #63636e;

  /* Brand accent (from PixBob app: --accent-primary) */
  --accent: #d47028;
  --accent-hover: #ff9e3b;

  /* Canvas guide colors, reused as callout accents */
  --guide-baseline: #ff9e3b;   /* orange — Tip */
  --guide-maxheight: #00e5ff;  /* cyan — Note */
  --guide-lsb: #ff55cd;        /* magenta — reserved */
  --guide-warning: #e5793a;    /* warm orange-red — Warning */

  --shadow-card: 0 4px 0px #08080a;
  --radius: 6px;

  --topbar-h: 56px;
  --sidebar-w: 260px;
}

/* ==========================================================
   RESET & BASE
   ========================================================== */
* { box-sizing: border-box; margin: 0; padding: 0; }

/* Custom scrollbars — consistent look across the page (content)
   and the sidebar, instead of the browser's default style. */
html {
  scrollbar-width: thin;
  scrollbar-color: #3a3a44 #101012;
}
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: #101012;
}
::-webkit-scrollbar-thumb {
  background: #3a3a44;
  border-radius: 5px;
  border: 2px solid #101012;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-hover);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-h) + 16px);
}

body {
  background: var(--bg-app);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

code, kbd, pre {
  font-family: var(--font-mono);
}

/* Inline emphasis — lighter & brighter so it stands out against the muted body text */
strong, b {
  color: var(--text-bright);
  font-weight: 700;
}

code {
  background: var(--bg-inset);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.75rem;
  color: var(--accent-hover);
}

kbd {
  background: var(--bg-inset);
  border: 1px solid var(--border-color);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 1px 7px;
  font-size: 0.6875rem;
  color: var(--text-bright);
}

:focus-visible {
  outline: 2px solid var(--accent-hover);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* ==========================================================
   TOP BAR
   ========================================================== */
.icon-font {
  font-family: 'PixBob Icons', 'Font Awesome 6 Free', 'Font Awesome 5 Free', sans-serif;
  speak: never;
  font-style: normal;
  font-weight: 400;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  color: var(--text-bright);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
}

.btn-nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-bright);
  width: 36px; height: 36px;
  border-radius: var(--radius);
  font-size: 1.125rem;
  cursor: pointer;
}
.btn-nav-toggle:hover { border-color: var(--border-strong, #4a4a56); }

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-bright);
  font-family: var(--font-mono);
  font-weight: 600;
  white-space: nowrap;
}
.topbar-brand:hover { text-decoration: none; }

.topbar-logo {
  display: block;
  height: 22px;
  width: auto;
}

.topbar-brand-text {
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 0.75rem;
}

.topbar-search-wrap {
  margin-left: auto;
  position: relative;
  width: 100%;
  max-width: 340px;
}

.topbar-search {
  width: 100%;
  background: var(--bg-inset);
  border: 1px solid var(--border-color);
  color: var(--text-bright);
  border-radius: var(--radius);
  padding: 7px 34px 7px 12px;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  outline: none;
}
.topbar-search:focus { border-color: var(--accent); }
.topbar-search::placeholder { color: var(--text-muted); }

.topbar-search-hint {
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0 6px;
  font-size: 0.6875rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  pointer-events: none;
}

.topbar-version {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}
.topbar-version:hover { color: var(--accent-hover); text-decoration: none; border-color: var(--accent); }

/* ==========================================================
   LAYOUT
   ========================================================== */
.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  max-width: 1440px;
  margin: 0 auto;
  padding-top: var(--topbar-h);
}

/* ==========================================================
   SIDEBAR
   ========================================================== */
.sidebar {
  position: sticky;
  top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  overflow-y: auto;
  border-right: 1px solid var(--border-color);
  padding: 20px 10px 60px;
}

.nav-group { margin-bottom: 22px; }

.nav-group-title {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 10px;
  margin-bottom: 6px;
}

.nav-list { list-style: none; }

.nav-link {
  display: block;
  padding: 6px 10px;
  border-radius: var(--radius);
  color: var(--text-main);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.8125rem;
  border-left: 2px solid transparent;
}
.nav-link:hover {
  background: var(--bg-panel);
  color: var(--text-bright);
  text-decoration: none;
}
.nav-link.active {
  background: var(--bg-panel);
  color: var(--accent-hover);
  border-left-color: var(--accent);
  font-weight: 700;
}

.nav-scrim {
  display: none;
}

/* ==========================================================
   MAIN CONTENT
   ========================================================== */
.content {
  width: 100%;
  padding: 48px 40px 120px;
}

.content-section { scroll-margin-top: calc(var(--topbar-h) + 16px); }
.content-section + .content-section { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--border-soft); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-hover);
  margin-bottom: 10px;
}

h1 {
  font-family: var(--font-heading);
  font-size: 1.875rem;
  color: var(--text-bright);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}

h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--text-bright);
  font-weight: 600;
  margin: 34px 0 14px;
  letter-spacing: -0.005em;
}
.content-section > h2:first-child { margin-top: 0; }

h3 {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  color: var(--text-bright);
  font-weight: 600;
  margin: 26px 0 10px;
}

.lede {
  font-size: 0.875rem;
  color: var(--text-main);
  line-height: 1.7;
  margin-bottom: 24px;
}

p { margin-bottom: 14px; }
p:last-child { margin-bottom: 0; }

.feature-list, .steps-list {
  margin: 0 0 18px 0;
  padding-left: 22px;
}
.feature-list li, .steps-list li {
  margin-bottom: 9px;
  padding-left: 4px;
}
.steps-list { counter-reset: step; }

/* ==========================================================
   SCREENSHOT PLACEHOLDER
   ========================================================== */
.screenshot-placeholder {
  border: 1.5px dashed var(--border-color);
  border-radius: var(--radius);
  background: repeating-linear-gradient(
    135deg, var(--bg-inset), var(--bg-inset) 10px,
    var(--bg-elevated) 10px, var(--bg-elevated) 20px
  );
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 18px 0 24px;
  padding: 20px;
  text-align: center;
}

/* Real screenshot once a placeholder has been replaced */
.app-screenshot {
  display: block;
  height: 360px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--bg-inset);
  margin: 18px auto 24px;
}

.screenshot-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 6px 12px;
}

/* ==========================================================
   CALLOUTS (Tip / Note / Warning)
   ========================================================== */
.callout {
  border: 1px solid var(--border-color);
  border-left-width: 3px;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  padding: 14px 16px;
  margin: 18px 0;
}

.callout-title {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.callout p:not(.callout-title) { color: var(--text-main); font-size: 0.75rem; margin-bottom: 0; }

.callout-tip     { border-left-color: var(--guide-baseline); }
.callout-tip .callout-title     { color: var(--guide-baseline); }

.callout-note     { border-left-color: var(--guide-maxheight); }
.callout-note .callout-title     { color: var(--guide-maxheight); }

.callout-warning  { border-left-color: var(--guide-warning); }
.callout-warning .callout-title  { color: var(--guide-warning); }

/* ==========================================================
   TABLES
   ========================================================== */
.reference-table, .compare-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 0.8125rem;
}

.reference-table th, .compare-table th {
  text-align: left;
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color);
}

.reference-table td, .compare-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-main);
  vertical-align: top;
  font-size: 0.75rem;
}

.reference-table tr:last-child td, .compare-table tr:last-child td { border-bottom: none; }
.reference-table td:first-child, .compare-table td:first-child {
  color: var(--text-bright);
  white-space: nowrap;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.875rem;
}

.color-chip {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 2px;
  margin-right: 4px;
  vertical-align: middle;
}

/* ==========================================================
   CODE BLOCKS
   ========================================================== */
.code-block {
  background: var(--bg-code);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  margin: 16px 0 24px;
  overflow: hidden;
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-inset);
  border-bottom: 1px solid var(--border-color);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.btn-copy {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  padding: 3px 9px;
  cursor: pointer;
}
.btn-copy:hover { color: var(--text-bright); border-color: var(--accent); }
.btn-copy.copied { color: var(--guide-maxheight); border-color: var(--guide-maxheight); }

.code-block pre {
  padding: 14px 16px;
  overflow-x: auto;
}

.code-block code {
  background: none;
  border: none;
  padding: 0;
  color: var(--text-main);
  font-size: 0.8125rem;
  line-height: 1.6;
}

/* ==========================================================
   WORKFLOW DIAGRAM (simple horizontal chain)
   ========================================================== */
.workflow-diagram {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 20px 0 24px;
  padding: 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}

.workflow-step {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-bright);
  background: var(--bg-inset);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 6px 13px;
  white-space: nowrap;
}

.workflow-arrow { color: var(--text-muted); font-size: 0.875rem; }

/* ==========================================================
   FAQ
   ========================================================== */
.faq-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--border-soft);
}
.faq-item:last-child { border-bottom: none; }

.faq-q {
  color: var(--text-bright);
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 6px;
}

.faq-a { color: var(--text-main); font-size: 0.875rem; margin-bottom: 0; }

/* ==========================================================
   RESPONSIVE — TABLET & MOBILE
   ========================================================== */
@media (max-width: 860px) {
  .btn-nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .topbar-search-wrap { display: none; }

  .layout { grid-template-columns: 1fr; }

  .sidebar {
    position: fixed;
    top: var(--topbar-h);
    left: 0;
    height: calc(100vh - var(--topbar-h));
    width: min(84vw, 300px);
    background: var(--bg-app);
    border-right: 1px solid var(--border-color);
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    z-index: 90;
  }
  .sidebar.open { transform: translateX(0); }

  .nav-scrim {
    display: block;
    position: fixed;
    inset: var(--topbar-h) 0 0 0;
    background: rgba(0,0,0,0.5);
    z-index: 80;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }
  .nav-scrim.show { opacity: 1; pointer-events: auto; }

  .content { padding: 32px 20px 100px; }
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }

  .app-screenshot { height: 280px; }

  .workflow-diagram { padding: 14px; }
}

@media (max-width: 480px) {
  .topbar { padding: 0 12px; gap: 10px; }
  .topbar-brand-text { display: none; }
  .content { padding: 24px 16px 90px; }
  .reference-table, .compare-table { font-size: 0.8125rem; }
  .app-screenshot { height: 220px; }
}
