/* ========================================
   Kanbai — Redesigned Landing Page
   Inspired by geminicli.com aesthetic
   ======================================== */

/* --- Design Tokens --- */
:root {
  --bg-base: #0a0a0f;
  --bg-primary: #0f0f17;
  --bg-secondary: #12121c;
  --bg-tertiary: #080810;
  --bg-surface: #1a1a28;
  --bg-surface-hover: #22223a;
  --text-primary: #e8eaf0;
  --text-secondary: #9ca3b8;
  --text-muted: #5c6478;
  --accent: #6e9fff;
  --accent-hover: #8bb4ff;
  --accent-dim: rgba(110, 159, 255, 0.08);
  --accent-glow: rgba(110, 159, 255, 0.15);
  --claude-color: #a78bfa;
  --claude-dim: rgba(167, 139, 250, 0.1);
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --danger: #f87171;
  --success: #6ee7b7;
  --warning: #fbbf24;
  --purple: #c084fc;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --max-width: 1140px;
  --header-height: 60px;
  --font-sans: "Inter", -apple-system, "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", "Fira Code", "Cascadia Code", monospace;
}

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

/* --- Bilingual System --- */
[data-lang] {
  display: none;
}
.lang-fr [data-lang="fr"],
.lang-en [data-lang="en"] {
  display: inline;
}

/* --- Base --- */
html {
  scroll-padding-top: calc(var(--header-height) + 24px);
}

@media (prefers-reduced-motion: reduce) {
  .animate-in { opacity: 1 !important; transform: none !important; }
  .tab-ready [data-panel].panel-active { animation: none; }
  .hero-rotate { transition: none !important; }
}

/* --- Tab Panels --- */
[data-panel] {
  display: none;
}
[data-panel].panel-active {
  display: block;
}
.tab-ready [data-panel].panel-active {
  animation: panelFadeIn 0.3s ease;
}
@keyframes panelFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

body {
  font-family: var(--font-sans);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }

/* --- Utilities --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--accent);
  color: var(--bg-base);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  z-index: 1000;
  font-weight: 600;
}
.skip-link:focus {
  top: 8px;
  color: var(--bg-base);
}

/* --- Animations --- */
.animate-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Header --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 100;
  background: rgba(10, 10, 15, 0.6);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.header.scrolled {
  border-bottom-color: var(--border);
  background: rgba(10, 10, 15, 0.85);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.logo:hover { color: var(--text-primary); }
.logo img { border-radius: 8px; }

.nav {
  display: flex;
  gap: 8px;
}
.nav a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-xs);
  transition: color 0.2s, background 0.2s;
}
.nav a:hover {
  color: var(--text-primary);
  background: var(--accent-dim);
}
.nav a.nav-current {
  color: var(--accent);
  background: var(--accent-dim);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 5px 12px;
  border-radius: var(--radius-xs);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  letter-spacing: 0.04em;
}
.lang-toggle:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background: var(--accent-dim);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
  position: relative;
  padding: 160px 0 100px;
  text-align: center;
  overflow: hidden;
}

/* Hero background glow */
.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(110, 159, 255, 0.08) 0%, rgba(167, 139, 250, 0.04) 40%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 720px;
  margin: 0 auto 56px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-dim);
  color: var(--text-muted);
  padding: 5px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border);
  margin-bottom: 28px;
}

.hero h1 {
  font-size: 56px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.035em;
  margin-bottom: 20px;
  background: linear-gradient(to bottom, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero h1 em {
  font-style: normal;
  -webkit-text-fill-color: var(--accent);
}
.hero h1 em.hero-claudez {
  -webkit-text-fill-color: #C15F3C;
}
.hero h1 em.hero-codex {
  -webkit-text-fill-color: #10A37F;
}
.hero h1 em.hero-copilot {
  -webkit-text-fill-color: #e2538a;
}

/* Punchline rotation */
.hero-rotate {
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.hero-rotate.fade-out {
  opacity: 0;
  transform: translateY(8px);
}

.hero-subtitle {
  font-size: 19px;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.hero-description {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 16px;
  line-height: 1.7;
}

.hero-also {
  font-size: 15px;
  color: var(--text-secondary);
  opacity: 0.7;
  margin: 0 auto 36px;
}
.hero-also em {
  font-style: normal;
  font-weight: 600;
}
.hero-also em.hero-claudez {
  color: #C15F3C;
}
.hero-also em.hero-codex {
  color: #10A37F;
}
.hero-also em.hero-copilot {
  color: #e2538a;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

/* Terminal install block */
.hero-install {
  max-width: 480px;
  margin: 0 auto;
}

.install-block {
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 14px;
  gap: 12px;
  transition: border-color 0.2s;
}
.install-block:hover {
  border-color: var(--border-hover);
}

.install-prompt {
  color: var(--text-muted);
  user-select: none;
  flex-shrink: 0;
}

.install-cmd {
  color: var(--text-primary);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.install-copy {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-xs);
  transition: color 0.2s, background 0.2s;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.install-copy:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}
.install-copy.copied {
  color: var(--success);
}

.install-hint {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-muted);
}
.install-hint a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.install-hint a:hover {
  color: var(--accent);
}

/* Hero screenshot */
.hero-screenshot {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
}

.hero-screenshot-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: 80%;
  background: radial-gradient(ellipse, rgba(110, 159, 255, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-screenshot img {
  position: relative;
  z-index: 1;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow:
    0 32px 100px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(110, 159, 255, 0.04);
}

/* ========================================
   Buttons
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  letter-spacing: -0.01em;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent);
  color: var(--bg-base);
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--bg-base);
  box-shadow: 0 0 32px rgba(110, 159, 255, 0.2);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--border-hover);
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 15px;
  border-radius: var(--radius-sm);
}

/* ========================================
   Sections
   ======================================== */
.section {
  padding: 120px 0;
  position: relative;
}
.section--dark {
  background: var(--bg-secondary);
}

.section-title {
  text-align: center;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
  line-height: 1.15;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 17px;
  margin-bottom: 64px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* ========================================
   Feature Highlights (big cards)
   ======================================== */
.features-highlight {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 32px;
}

.feature-highlight-card {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 40px;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  transition: border-color 0.3s;
}
.feature-highlight-card:hover {
  border-color: var(--border-hover);
}

.feature-highlight-card--reverse {
  direction: rtl;
}
.feature-highlight-card--reverse > * {
  direction: ltr;
}

.feature-highlight-text h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}
.feature-highlight-text p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.feature-highlight-img img {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

/* ========================================
   Features Grid
   ======================================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: border-color 0.3s, transform 0.3s;
  cursor: default;
}
.feature-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.feature-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  border-radius: var(--radius-xs);
  color: var(--accent);
  margin-bottom: 16px;
}
.feature-icon--claude {
  background: var(--claude-dim);
  color: var(--claude-color);
}
.feature-icon--warning {
  background: rgba(251, 191, 36, 0.08);
  color: var(--warning);
}
.feature-icon--success {
  background: rgba(110, 231, 183, 0.08);
  color: var(--success);
}
.feature-icon--purple {
  background: rgba(192, 132, 252, 0.08);
  color: var(--purple);
}

.feature-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- Inline code --- */
.feature-card code {
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--accent);
}

/* ========================================
   Screenshots
   ======================================== */
.screenshot-tabs {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 7px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-sans);
}
.tab:hover {
  color: var(--text-primary);
  background: var(--accent-dim);
}
.tab.active {
  background: var(--accent);
  color: var(--bg-base);
  border-color: var(--accent);
}

.screenshot-viewer {
  max-width: 960px;
  margin: 0 auto;
}

.screenshot-panel {
  display: none;
}
.screenshot-panel.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.screenshot-panel img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  width: 100%;
}

.screenshot-caption {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* ========================================
   Stats Bar
   ======================================== */
.stats-bar {
  padding: 56px 0;
  position: relative;
}
.stats-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border), transparent);
}
.stats-bar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border), transparent);
}

.stats-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 56px;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.stat-number {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  line-height: 1;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-divider {
  width: 1px;
  height: 48px;
  background: var(--border);
}

/* ========================================
   Workspace Section
   ======================================== */
.workspace-block {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 56px;
  align-items: center;
}

.workspace-text h2 {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  line-height: 1.15;
}
.workspace-text p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 28px;
}

.workspace-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.workspace-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-primary);
}
.workspace-features svg {
  color: var(--success);
  flex-shrink: 0;
}

.workspace-img img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
}

/* ========================================
   Built for Devs
   ======================================== */
.dev-block {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

.dev-block h2 {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  line-height: 1.15;
}

.dev-block > p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 40px;
}

.dev-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  text-align: left;
}

.dev-feature {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 20px;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: border-color 0.3s;
}
.dev-feature:hover {
  border-color: var(--border-hover);
}

.dev-feature svg {
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
}

.dev-feature div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dev-feature strong {
  font-size: 14px;
  font-weight: 700;
}

.dev-feature span {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ========================================
   Download
   ======================================== */
.download-block {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}
.download-icon {
  border-radius: 24px;
  margin-bottom: 28px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}
.download-block h2 {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
  line-height: 1.15;
}
.download-block p {
  color: var(--text-secondary);
  font-size: 16px;
  margin-bottom: 28px;
  line-height: 1.7;
}
.download-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* OS-aware download buttons */
body.os-win #download-mac { order: 2; }
body.os-win #download-win {
  order: 1;
  background: var(--accent);
  color: var(--bg-base);
  border: none;
}
body.os-win #download-win:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 32px rgba(110, 159, 255, 0.2);
}
body.os-win #download-mac {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
body.os-win #download-mac:hover {
  border-color: var(--border-hover);
}

/* Download meta */
.download-meta-mac,
.download-meta-win {
  display: inline;
}
.download-meta-mac::after {
  content: ' \00B7 ';
  color: var(--text-muted);
}
body.os-win .download-meta-win { font-weight: 600; }
body.os-mac .download-meta-mac { font-weight: 600; }
body:not(.os-win):not(.os-mac) .download-meta-mac { font-weight: 600; }
.download-version {
  font-size: 12px;
  opacity: 0.7;
  font-weight: 500;
}
.download-meta {
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.download-links {
  margin-top: 16px;
  font-size: 13px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}
.download-links a {
  color: var(--text-muted);
  transition: color 0.2s;
}
.download-links a:hover {
  color: var(--accent);
}
.sep { color: var(--text-muted); opacity: 0.4; }

/* --- Version Badge --- */
.badge-version {
  color: var(--accent);
  font-weight: 600;
}

/* ========================================
   Footer
   ======================================== */
.footer {
  position: relative;
  padding: 28px 0;
}
.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border), transparent);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
}
.footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-right a {
  color: var(--text-muted);
  transition: color 0.2s;
}
.footer-right a:hover { color: var(--text-primary); }

/* --- Focus Styles --- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-highlight-card { grid-template-columns: 1fr; gap: 24px; }
  .feature-highlight-card--reverse { direction: ltr; }
  .workspace-block { grid-template-columns: 1fr; gap: 32px; }
  .dev-features { grid-template-columns: 1fr; max-width: 500px; margin: 0 auto; }
}

@media (max-width: 768px) {
  :root { --header-height: 56px; }

  .nav {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px 24px;
    gap: 4px;
  }
  .nav.open { display: flex; }
  .nav a {
    font-size: 15px;
    padding: 10px 14px;
  }

  .menu-toggle { display: block; }

  .hero { padding: 120px 0 60px; }
  .hero h1 { font-size: 36px; }
  .hero-subtitle { font-size: 16px; }
  .hero-description { font-size: 15px; }
  .hero-content { margin-bottom: 40px; }

  .section { padding: 80px 0; }
  .section-title { font-size: 30px; }
  .section-subtitle { font-size: 15px; margin-bottom: 40px; }

  .features-grid { grid-template-columns: repeat(2, 1fr); }

  .feature-highlight-card {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 24px;
  }
  .feature-highlight-card--reverse { direction: ltr; }
  .feature-highlight-text h3 { font-size: 20px; }

  .screenshot-tabs { gap: 4px; }
  .tab { padding: 6px 14px; font-size: 12px; }

  .workspace-block { grid-template-columns: 1fr; gap: 24px; }
  .workspace-text h2 { font-size: 28px; }

  .download-block h2 { font-size: 28px; }

  .stats-row { gap: 32px; }
  .stat-number { font-size: 36px; }
  .stat-divider { display: none; }

  .dev-block h2 { font-size: 28px; }
  .dev-features { grid-template-columns: 1fr; max-width: 500px; margin: 0 auto; }
}

@media (max-width: 480px) {
  .features-grid { grid-template-columns: 1fr; }

  .hero h1 { font-size: 30px; }
  .hero-actions { flex-direction: column; align-items: center; }

  .btn-lg { width: 100%; justify-content: center; }

  .footer-inner { flex-direction: column; gap: 12px; text-align: center; }
  .footer-left { flex-wrap: wrap; justify-content: center; }

  .download-meta { flex-direction: column; gap: 4px; }
  .download-meta .sep { display: none; }

  .screenshot-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
  }
  .tab { text-align: center; padding: 8px 6px; }

  .stats-row { gap: 24px; }
  .stat-number { font-size: 30px; }

  .install-block {
    font-size: 12px;
    padding: 12px 14px;
  }
}

/* ========================================
   Documentation Page
   ======================================== */

/* --- Docs Layout --- */
.docs-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - var(--header-height));
  padding-top: var(--header-height);
}

/* --- Docs Sidebar --- */
.docs-sidebar {
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
  border-right: 1px solid var(--border);
  background: var(--bg-primary);
  padding: 32px 0;
}

.docs-sidebar-inner {
  padding: 0 20px;
}

.docs-sidebar-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 20px;
  padding-left: 12px;
}

.docs-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.docs-nav-link {
  display: block;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-xs);
  transition: background 0.15s, color 0.15s;
}
.docs-nav-link:hover {
  background: var(--accent-dim);
  color: var(--text-primary);
}
.docs-nav-link.active {
  background: var(--accent-dim);
  color: var(--accent);
}

/* --- Docs Sidebar Toggle (mobile) --- */
.docs-sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 90;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg-base);
  border: none;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* --- Docs Content --- */
.docs-content {
  max-width: 860px;
  padding: 48px 56px 80px;
}

/* --- Docs Hero --- */
.docs-hero {
  margin-bottom: 56px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.docs-hero h1 {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.docs-hero p {
  font-size: 17px;
  color: var(--text-secondary);
}

/* --- Docs Section --- */
.docs-section {
  margin-bottom: 64px;
  scroll-margin-top: calc(var(--header-height) + 24px);
}

.docs-section h2 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.docs-section h3 {
  font-size: 18px;
  font-weight: 700;
  margin-top: 28px;
  margin-bottom: 12px;
}

/* --- Docs Text --- */
.docs-text {
  margin-bottom: 24px;
}

.docs-text p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

.docs-text ul,
.docs-text ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

.docs-text li {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 6px;
}

.docs-text code {
  background: var(--bg-surface);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--accent);
}

.docs-text kbd {
  display: inline-block;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-primary);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.docs-section > p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
}

/* --- Docs Screenshot --- */
.docs-screenshot {
  position: relative;
  margin: 24px 0 32px;
}

.docs-screenshot img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
  width: 100%;
}

.docs-screenshot-caption {
  text-align: center;
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --- Legacy badge --- */
.docs-legacy-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  background: rgba(251, 191, 36, 0.1);
  color: var(--warning);
  border: 1px solid rgba(251, 191, 36, 0.2);
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* --- Docs Shortcuts Table --- */
.docs-shortcuts-table {
  margin: 16px 0 28px;
  overflow-x: auto;
}

.docs-shortcuts-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.docs-shortcuts-table thead th {
  text-align: left;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}

.docs-shortcuts-table tbody td {
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
}

.docs-shortcuts-table tbody tr:hover {
  background: var(--accent-dim);
}

.docs-shortcuts-table kbd {
  display: inline-block;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-primary);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
}

/* --- Docs Callout Boxes --- */
.docs-callout {
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  margin: 20px 0;
  font-size: 14px;
  line-height: 1.6;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.docs-callout-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 1px;
}
.docs-callout-content {
  flex: 1;
}
.docs-callout-content p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}
.docs-callout-content p + p {
  margin-top: 8px;
}
.docs-callout--tip {
  background: rgba(110, 231, 183, 0.06);
  border: 1px solid rgba(110, 231, 183, 0.12);
  color: var(--success);
}
.docs-callout--tip .docs-callout-content { color: var(--text-secondary); }
.docs-callout--note {
  background: var(--accent-dim);
  border: 1px solid rgba(110, 159, 255, 0.12);
  color: var(--accent);
}
.docs-callout--note .docs-callout-content { color: var(--text-secondary); }
.docs-callout--warning {
  background: rgba(251, 191, 36, 0.06);
  border: 1px solid rgba(251, 191, 36, 0.12);
  color: var(--warning);
}
.docs-callout--warning .docs-callout-content { color: var(--text-secondary); }
.docs-callout--info {
  background: rgba(192, 132, 252, 0.06);
  border: 1px solid rgba(192, 132, 252, 0.12);
  color: var(--purple);
}
.docs-callout--info .docs-callout-content { color: var(--text-secondary); }

/* --- Docs Steps --- */
.docs-steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 20px 0;
}
.docs-steps li {
  counter-increment: step;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.docs-steps li:last-child {
  border-bottom: none;
}
.docs-steps li::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 50%;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* --- Docs Feature Overview Grid --- */
.docs-feature-overview {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 20px 0;
}
.docs-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.docs-feature-item strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: 2px;
}
.docs-feature-item-icon {
  flex-shrink: 0;
  color: var(--accent);
  margin-top: 2px;
}

@media (max-width: 768px) {
  .docs-feature-overview {
    grid-template-columns: 1fr;
  }
}

/* --- Docs h4 styling --- */
.docs-section h4,
.docs-text h4 {
  font-size: 15px;
  font-weight: 700;
  margin-top: 20px;
  margin-bottom: 8px;
  color: var(--text-primary);
}

/* --- Docs Sub-Nav --- */
.docs-nav-group {
  margin-bottom: 4px;
}
.docs-nav-group-title {
  display: block;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-xs);
  transition: background 0.15s, color 0.15s;
}
.docs-nav-group-title:hover {
  background: var(--accent-dim);
  color: var(--text-primary);
}
.docs-nav-group-title.active {
  background: var(--accent-dim);
  color: var(--accent);
}

/* --- Docs Code Block --- */
.docs-code-block {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 16px 0;
  overflow-x: auto;
}
.docs-code-block code {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-primary);
  background: none;
  padding: 0;
  line-height: 1.6;
}

/* --- Docs Separator --- */
.docs-separator {
  height: 1px;
  background: var(--border);
  margin: 32px 0;
  border: none;
}

/* --- Docs Badge --- */
.docs-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.docs-badge--new {
  background: rgba(110, 231, 183, 0.1);
  color: var(--success);
}
.docs-badge--pro {
  background: rgba(192, 132, 252, 0.1);
  color: var(--purple);
}

/* --- Docs Back --- */
.docs-back {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

/* --- Docs Responsive --- */
@media (max-width: 1024px) {
  .docs-content {
    padding: 40px 40px 64px;
  }
}

@media (max-width: 768px) {
  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    bottom: 0;
    width: 280px;
    z-index: 95;
    box-shadow: 4px 0 32px rgba(0, 0, 0, 0.5);
  }
  .docs-sidebar.open {
    display: block;
  }

  .docs-sidebar-toggle {
    display: flex;
  }

  .docs-content {
    padding: 32px 24px 64px;
  }

  .docs-hero h1 {
    font-size: 28px;
  }

  .docs-section h2 {
    font-size: 24px;
  }

  .docs-legacy-badge {
    position: relative;
    top: auto;
    right: auto;
    display: inline-block;
    margin-bottom: 8px;
  }
}
