/* Bionic Editor Landing Page — Styled to match rightbionic.com */
:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-subtle: #f4f4f5;
  --border: #e4e4e7;
  --border-strong: #d4d4d8;
  --text: #27272a;
  --text-muted: #52525b;
  --text-faint: #71717a;
  --brand: #195e9e;
  --brand-hover: #144b80;
  --brand-soft: rgba(25, 94, 158, 0.08);
  --brand-border: rgba(25, 94, 158, 0.22);
  --code-bg: #f4f4f5;
  --code-text: #18181b;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 28px -12px rgba(0, 0, 0, 0.14), 0 2px 6px rgba(0, 0, 0, 0.05);
  --font-sans: "Manrope", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.dark {
  --bg: #121212;
  --surface: #18181b;
  --surface-subtle: rgba(24, 24, 27, 0.6);
  --border: #27272a;
  --border-strong: #3f3f46;
  --text: #d4d4d8;
  --text-muted: #a1a1aa;
  --text-faint: #71717a;
  --brand: #60a5fa;
  --brand-hover: #93c5fd;
  --brand-soft: rgba(96, 165, 250, 0.1);
  --brand-border: rgba(96, 165, 250, 0.25);
  --code-bg: #27272a;
  --code-text: #f4f4f5;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 14px 36px -12px rgba(0, 0, 0, 0.65);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.25s ease, color 0.25s ease;
}

a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
  transition: color 0.15s ease;
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  font-weight: 600;
  background-color: var(--code-bg);
  color: var(--code-text);
  padding: 0.12em 0.4em;
  border-radius: 5px;
  border: 1px solid var(--border);
}

/* Container matching rightbionic.com (max-w-5xl) */
.page-shell {
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

@media (min-width: 640px) {
  .page-shell {
    padding: 4rem 1.5rem 3rem;
  }
}

/* Header */
.site-header {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 3rem;
}

@media (min-width: 640px) {
  .site-header {
    flex-direction: row;
    align-items: center;
  }
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.brand-logo-link {
  flex-shrink: 0;
  text-decoration: none;
}

.brand-logo {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.5rem;
  object-fit: contain;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--brand);
}

.brand-title a {
  text-decoration: none;
  font-weight: 700;
}

.brand-subtitle {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-faint);
  margin-top: 0.1rem;
}

.header-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

@media (min-width: 640px) {
  .header-controls {
    width: auto;
    justify-content: flex-end;
  }
}

.main-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.15rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.main-nav a {
  color: var(--text-muted);
  font-weight: 500;
  text-decoration: none;
}

.main-nav a:hover,
.main-nav a.nav-accent {
  color: var(--brand);
  text-decoration: none;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: 0.5rem;
  border: none;
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.theme-toggle:hover {
  background-color: var(--border);
  color: var(--text);
}

.theme-toggle svg {
  width: 1.25rem;
  height: 1.25rem;
}

.hidden {
  display: none !important;
}

/* Two-column editorial layout (content + sticky TOC sidebar) */
.layout-grid {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
  align-items: flex-start;
  flex: 1 0 auto;
}

@media (min-width: 1024px) {
  .layout-grid {
    flex-direction: row;
    gap: 4rem;
  }
}

.content-column {
  width: 100%;
  max-width: 48rem;
  flex: 1;
  min-width: 0;
}

/* Sticky Right Sidebar ("On this page") */
.toc-sidebar {
  display: none;
}

@media (min-width: 1024px) {
  .toc-sidebar {
    display: block;
    width: 13.5rem;
    flex-shrink: 0;
    position: sticky;
    top: 3rem;
    padding-top: 0.35rem;
  }
}

.toc-heading {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 1rem;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.875rem;
}

.toc-list a {
  color: var(--text-faint);
  font-weight: 500;
  text-decoration: none;
  display: block;
  line-height: 1.35;
}

.toc-list a:hover,
.toc-list a.active {
  color: var(--brand);
  text-decoration: none;
}

.toc-sublist {
  list-style: none;
  margin-top: 0.5rem;
  padding-left: 0.85rem;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.8125rem;
}

/* Editorial Typography */
.section-block {
  padding: 0.75rem 0 1.75rem;
  scroll-margin-top: 2rem;
}

.section-block + .section-block {
  border-top: 1px solid var(--border);
  padding-top: 2.25rem;
}

.beta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--brand);
  background-color: var(--brand-soft);
  border: 1px solid var(--brand-border);
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 1.1rem;
}

.beta-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background-color: var(--brand);
}

h1.hero-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--brand);
  margin-bottom: 1.1rem;
}

@media (min-width: 640px) {
  h1.hero-title {
    font-size: 2.35rem;
  }
}

.hero-lead {
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.3;
  color: var(--brand);
  margin-bottom: 1rem;
  scroll-margin-top: 2rem;
}

h3 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: var(--text);
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
  scroll-margin-top: 2rem;
}

.dark h3 {
  color: #f4f4f5;
}

h2 + h3,
.first-sub {
  margin-top: 0.75rem;
}

p {
  margin-bottom: 1.05rem;
  color: var(--text);
}

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

strong {
  font-weight: 700;
  color: var(--text);
}

.dark strong {
  color: #f4f4f5;
}

/* Primary & Secondary Buttons */
.action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  background-color: var(--brand);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.6rem 1.15rem;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.dark .btn-primary {
  color: #121212;
}

.btn-primary:hover {
  background-color: var(--brand-hover);
  color: #ffffff;
  text-decoration: none;
}

.dark .btn-primary:hover {
  color: #121212;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.58rem 1.05rem;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.btn-secondary:hover {
  border-color: var(--brand);
  color: var(--brand);
  text-decoration: none;
}

/* Callout / Access Card */
.access-card {
  margin-top: 1.5rem;
  padding: 1.5rem;
  border-radius: 1rem;
  background-color: var(--surface-subtle);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .access-card {
    padding: 1.75rem 2rem;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.access-card-body {
  flex: 1;
}

.access-card-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 0.35rem;
}

.access-card p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

.access-card-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .access-card-cta {
    align-items: flex-end;
    text-align: right;
  }
}

.access-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-faint);
}

/* Feature Screenshot Figures */
.feature-block {
  margin-top: 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}

.feature-block:first-of-type {
  margin-top: 0.5rem;
  padding-top: 0;
  border-top: none;
}

.feature-block h3 {
  margin-top: 0;
}

.screenshot-figure {
  margin: 1.5rem 0 0.5rem;
}

.screenshot-frame {
  position: relative;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--border);
  background-color: var(--surface);
  box-shadow: var(--shadow-md);
  cursor: zoom-in;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.screenshot-frame:hover {
  border-color: var(--brand);
}

.screenshot-frame img {
  width: 100%;
  height: auto;
}

.screenshot-caption {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-muted);
}

/* Audience Cards */
.audience-block {
  margin-top: 1.5rem;
  padding: 1.5rem 1.75rem;
  border-radius: 0.875rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.audience-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 0.35rem;
}

.audience-block h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

/* Lightbox modal for inspecting screenshots full-size */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background-color: rgba(12, 12, 14, 0.88);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  cursor: zoom-out;
}

.lightbox-inner {
  max-width: 78rem;
  width: 100%;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.lightbox img {
  max-height: 78vh;
  width: auto;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

.lightbox-caption {
  color: #e4e4e7;
  font-size: 0.875rem;
  text-align: center;
  max-width: 46rem;
}

.lightbox-close {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  background: rgba(24, 24, 27, 0.85);
  color: #fafafa;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.5rem;
  padding: 0.35rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  cursor: pointer;
}

/* Footer matching rightbionic.com */
.site-footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-faint);
}

@media (min-width: 640px) {
  .site-footer {
    flex-direction: row;
  }
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer-links a {
  color: var(--text-faint);
  font-weight: 500;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--brand);
}
