/* ============================================================
   SLEK AI — Design system (landing + dashboard)
   ============================================================ */

:root {
  --bg: #000000;
  --bg-elevated: #0a0a0a;
  --bg-surface: #111111;
  --bg-card: rgba(17, 17, 17, 0.8);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.14);
  --text: #ededed;
  --text-secondary: #a1a1aa;
  --text-tertiary: #71717a;
  --accent: #5e6ad2;
  --accent-subtle: rgba(94, 106, 210, 0.15);
  --success: #3ecf8e;
  --error: #ef4444;
  --warning: #f59e0b;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --max-width: 1120px;
  --nav-height: 56px;

  /* Legacy aliases for dashboard */
  --bg-dark: var(--bg);
  --text-main: var(--text);
  --text-muted: var(--text-secondary);
  --accent-purple: var(--accent);
  --accent-cyan: #3ecf8e;
  --accent-glow: rgba(94, 106, 210, 0.35);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ============================================================
   LANDING PAGE
   ============================================================ */

.landing-page {
  display: block;
}

.site-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 20%, transparent 70%);
}

.site-glow {
  position: fixed;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(94, 106, 210, 0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.landing-page main,
.landing-page .nav-glass,
.landing-page .footer-landing {
  position: relative;
  z-index: 1;
}

/* --- Glass nav --- */
.nav-glass {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 200;
  border-bottom: 1px solid transparent;
  transition: background 0.25s, border-color 0.25s, backdrop-filter 0.25s;
}

.nav-glass.nav-scrolled {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(16px) saturate(180%);
  border-bottom-color: var(--border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  color: var(--text);
  opacity: 0.9;
}

.brand-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-menu a {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-menu a:hover {
  color: var(--text);
}

.nav-cli {
  font-family: var(--font-mono);
  font-size: 12px !important;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-ghost {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.btn-ghost:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.btn-nav-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--text);
  color: #000;
  border: none;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
}

.btn-nav-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-primary-lg,
.btn-secondary-lg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-primary-lg {
  background: var(--text);
  color: #000;
}

.btn-primary-lg:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.08);
}

.btn-secondary-lg {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary-lg:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-hover);
}

/* --- Hero --- */
.hero-split {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: calc(var(--nav-height) + 72px) 24px 64px;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 48px;
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 20px;
  padding: 6px 12px 6px 8px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.02);
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.hero-headline {
  font-size: clamp(36px, 4.5vw, 52px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin-bottom: 20px;
}

.headline-accent {
  display: block;
  color: var(--text-secondary);
  font-weight: 500;
}

.hero-lead {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 440px;
  margin-bottom: 28px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.hero-trust {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 20px;
}

.hero-trust li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-tertiary);
}

.hero-trust svg {
  color: var(--success);
  flex-shrink: 0;
}

/* --- Preview windows --- */
.hero-visual {
  position: relative;
}

.preview-stack {
  position: relative;
  min-height: 380px;
}

.window {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 24px 48px rgba(0, 0, 0, 0.5);
}

.window-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border);
}

.wc-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.wc-red { background: #ff5f57; }
.wc-yellow { background: #febc2e; }
.wc-green { background: #28c840; }

.wc-title {
  margin-left: 8px;
  font-size: 11px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

.window-body {
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
}

.window-terminal {
  position: relative;
  z-index: 2;
  width: 100%;
}

.term-body {
  min-height: 160px;
  max-height: 200px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.term-line {
  margin-bottom: 4px;
  word-break: break-all;
}

.term-prompt {
  color: var(--text-tertiary);
}

.term-input,
.term-cmd span:last-child {
  color: var(--text);
}

.term-out {
  color: var(--text-secondary);
  padding-left: 0;
}

.term-out.accent,
.term-static .accent {
  color: var(--success);
}

.term-static .dim {
  opacity: 0.6;
}

.term-static .err {
  color: #f87171;
}

.window-editor {
  position: absolute;
  top: 120px;
  right: -12px;
  width: 92%;
  z-index: 1;
  opacity: 0.95;
  transform: perspective(800px) rotateY(-4deg) rotateX(2deg);
  transition: transform 0.4s ease;
}

.hero-visual:hover .window-editor {
  transform: perspective(800px) rotateY(-2deg) rotateX(1deg) translateY(-4px);
}

.code-body {
  padding: 8px 0;
  min-height: 140px;
}

.code-row {
  display: flex;
  padding: 0 12px;
}

.code-gutter {
  width: 28px;
  flex-shrink: 0;
  color: var(--text-tertiary);
  text-align: right;
  padding-right: 12px;
  user-select: none;
  opacity: 0.5;
}

.code-line {
  flex: 1;
  white-space: pre;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tok-kw { color: #c792ea; }
.tok-fn { color: #82aaff; }
.tok-str { color: #c3e88d; }
.tok-num { color: #f78c6c; }

.editor-status {
  display: flex;
  gap: 16px;
  padding: 6px 14px;
  font-size: 10px;
  color: var(--text-tertiary);
  border-top: 1px solid var(--border);
  font-family: var(--font-sans);
}

.status-ai {
  color: var(--accent);
}

.visual-glow {
  position: absolute;
  inset: 20% -10% -10%;
  background: radial-gradient(ellipse at center, rgba(94, 106, 210, 0.08), transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* --- Trust bar --- */
.trust-bar {
  max-width: var(--max-width);
  margin: 0 auto 80px;
  padding: 0 24px;
}

.trust-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px 32px;
  padding: 20px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.02);
}

.trust-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.trust-value {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.trust-label {
  font-size: 12px;
  color: var(--text-tertiary);
}

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

.trust-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-left: auto;
}

.trust-logo {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-tertiary);
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* --- Sections --- */
.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 96px;
}

.section-intro {
  margin-bottom: 40px;
}

.section-intro.center {
  text-align: center;
}

.section-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(28px, 3.5vw, 36px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.section-desc {
  margin-top: 12px;
  color: var(--text-secondary);
  font-size: 15px;
  max-width: 480px;
}

.section-desc.narrow {
  margin-left: auto;
  margin-right: auto;
}

/* --- Bento --- */
.bento {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.bento-cell {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  transition: border-color 0.2s;
}

.bento-cell:hover {
  border-color: var(--border-hover);
}

.bento-wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}

.bento-cell h3 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.bento-cell p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.model-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.model-pills span {
  font-size: 11px;
  font-family: var(--font-mono);
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.routing-viz {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px;
}

.route-node {
  font-size: 11px;
  font-weight: 500;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
}

.route-src {
  border-color: rgba(94, 106, 210, 0.4);
  color: var(--accent);
}

.route-lines {
  width: 2px;
  height: 24px;
  background: linear-gradient(var(--border), transparent);
}

.route-targets {
  display: flex;
  gap: 8px;
}

.mini-term {
  margin-top: 16px;
  padding: 14px;
  background: #000;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mini-term .err { color: #f87171; }
.mini-term .fix { color: var(--text-secondary); }
.mini-term .ok { color: var(--success); }

.ui-mock {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ui-frame {
  width: 48px;
  height: 36px;
  border: 1px dashed var(--border-hover);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.03);
}

.ui-arrow {
  color: var(--text-tertiary);
  font-size: 12px;
}

.ui-code {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--success);
}

/* --- CLI section --- */
.cli-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
  align-items: center;
}

.cli-commands {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cmd-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: #000;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 13px;
}

.cmd-row code {
  color: var(--text);
}

.cmd-row.muted code {
  color: var(--text-tertiary);
}

.btn-copy-sm {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-copy-sm:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.window-cli-full .term-body {
  min-height: 220px;
  max-height: none;
}

.cursor-blink {
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* --- Dashboard preview --- */
.dash-preview-wrap {
  margin-top: 8px;
}

.preview-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
}

.preview-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-tertiary);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.preview-tab:hover {
  color: var(--text-secondary);
}

.preview-tab.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border);
}

.dash-mock {
  display: grid;
  grid-template-columns: 180px 1fr;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--bg-elevated);
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.4);
}

.dash-mock-sidebar {
  padding: 20px 16px;
  border-right: 1px solid var(--border);
  background: #050505;
}

.dash-mock-brand {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 24px;
}

.dash-mock-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dash-mock-nav span {
  font-size: 13px;
  color: var(--text-tertiary);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
}

.dash-mock-nav span.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.dash-mock-main {
  padding: 28px 32px;
  min-height: 320px;
  position: relative;
}

.preview-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}

.preview-panel.is-active {
  display: block;
}

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

.dash-mock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.dash-mock-header h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.dash-mock-user {
  font-size: 12px;
  color: var(--text-tertiary);
}

.dash-mock-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.dash-stat-card {
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
}

.dash-stat-label {
  display: block;
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 6px;
}

.dash-stat-val {
  display: block;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.dash-stat-meta {
  display: block;
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

.dash-mock-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 80px;
  padding-top: 12px;
}

.chart-bar {
  flex: 1;
  height: var(--h);
  background: linear-gradient(180deg, var(--accent) 0%, rgba(94, 106, 210, 0.3) 100%);
  border-radius: 4px 4px 0 0;
  opacity: 0.7;
}

.dash-badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent);
  padding: 4px 8px;
  border: 1px solid var(--accent-subtle);
  border-radius: 4px;
  background: var(--accent-subtle);
}

.dash-key-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #000;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
}

.dash-key-box code {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--success);
}

.dash-copy-btn {
  background: var(--text);
  color: #000;
  border: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: default;
}

.dash-key-note {
  font-size: 13px;
  color: var(--text-secondary);
}

/* --- CTA --- */
.cta-section {
  padding-bottom: 80px;
}

.cta-card {
  text-align: center;
  padding: 56px 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(ellipse 60% 80% at 50% 100%, rgba(94, 106, 210, 0.08), transparent),
    var(--bg-elevated);
}

.cta-card h2 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.cta-card p {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.cta-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

/* --- Footer landing --- */
.footer-landing {
  border-top: 1px solid var(--border);
  padding: 24px;
}

.footer-landing-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-tertiary);
}

.footer-landing-links {
  display: flex;
  gap: 20px;
}

.footer-landing-links a {
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-landing-links a:hover {
  color: var(--text-secondary);
}

/* --- Scroll reveal --- */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-copy[data-reveal] { transition-delay: 0.05s; }
.hero-visual[data-reveal] { transition-delay: 0.12s; }

/* --- CLI Modal --- */
.cli-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}

.cli-modal-overlay.hidden {
  display: none !important;
}

.cli-modal-content {
  width: 100%;
  max-width: 480px;
  padding: 28px;
  border-radius: var(--radius-xl);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.5);
  animation: modalIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.cli-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.cli-modal-header h2 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.cli-modal-close {
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}

.cli-modal-close:hover {
  color: var(--text);
}

.cli-modal-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.cli-steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cli-step {
  display: flex;
  gap: 14px;
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--text);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.step-info h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.terminal-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #000;
  border: 1px solid var(--border);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 12px;
}

.terminal-block code {
  color: var(--text);
  word-break: break-all;
}

.btn-copy {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-copy:hover {
  background: var(--text);
  color: #000;
  border-color: var(--text);
}

/* --- Auth toast --- */
.auth-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  backdrop-filter: blur(12px);
  z-index: 9999;
  animation: toastIn 0.3s ease;
  max-width: 400px;
  text-align: center;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.hidden {
  display: none !important;
}

/* --- Landing responsive --- */
@media (max-width: 960px) {
  .hero-split {
    grid-template-columns: 1fr;
    padding-top: calc(var(--nav-height) + 48px);
    gap: 40px;
  }

  .hero-visual {
    order: -1;
  }

  .preview-stack {
    min-height: 340px;
  }

  .window-editor {
    position: relative;
    top: -24px;
    right: 0;
    width: 100%;
    transform: none;
  }

  .bento-wide {
    grid-template-columns: 1fr;
  }

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

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

  .trust-divider {
    display: none;
  }

  .trust-logos {
    margin-left: 0;
    width: 100%;
  }

  .dash-mock {
    grid-template-columns: 1fr;
  }

  .dash-mock-sidebar {
    display: none;
  }

  .nav-menu {
    display: none;
  }
}

@media (max-width: 520px) {
  .nav-actions .btn-ghost {
    display: none;
  }

  .hero-ctas {
    flex-direction: column;
  }

  .hero-ctas button {
    width: 100%;
  }

  .dash-mock-stats {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   DASHBOARD APP
   ============================================================ */

.dashboard-app {
  min-height: 100vh;
}

.dashboard-app .site-grid {
  mask-image: none;
  opacity: 0.6;
}

.dash-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* Sidebar */
.dash-sidebar {
  display: flex;
  flex-direction: column;
  padding: 20px 12px;
  border-right: 1px solid var(--border);
  background: rgba(5, 5, 5, 0.9);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  height: 100vh;
}

.dash-brand {
  padding: 4px 10px 20px;
  margin-bottom: 8px;
}

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

.dash-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-tertiary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}

.dash-nav-item svg {
  opacity: 0.7;
  flex-shrink: 0;
}

.dash-nav-item:hover {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
}

.dash-nav-item.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.dash-nav-item.is-active svg {
  opacity: 1;
}

.dash-sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.dash-nav-link {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-tertiary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.dash-nav-link:hover {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
}

.dash-logout:hover {
  color: #f87171;
}

/* Main area */
.dash-main-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dash-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 32px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.dash-greeting {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}

.dash-page-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.dash-user-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px 8px 8px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.02);
}

.dash-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.dash-user-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.dash-user-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-user-plan {
  font-size: 11px;
  color: var(--text-tertiary);
}

.dash-main {
  padding: 28px 32px 48px;
  max-width: 880px;
}

.dash-panel {
  display: none;
  flex-direction: column;
  gap: 16px;
  animation: fadeIn 0.25s ease;
}

.dash-panel.is-active {
  display: flex;
}

/* Stats */
.dash-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.dash-stat {
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  transition: border-color 0.2s;
}

.dash-stat:hover {
  border-color: var(--border-hover);
}

.dash-stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.dash-stat-label {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
}

.dash-stat-icon {
  color: var(--text-tertiary);
  opacity: 0.6;
}

.dash-stat-value {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.dash-stat-value-sm {
  font-size: 20px;
}

.dash-stat-meta {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 6px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-active {
  background: var(--success);
  box-shadow: 0 0 8px rgba(62, 207, 142, 0.5);
}

/* Cards */
.dash-card {
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
}

.dash-card h2 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.dash-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.dash-card-header h2 {
  margin-bottom: 0;
}

.dash-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 6px;
  line-height: 1.5;
}

.dash-card-foot {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 10px;
}

.dash-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 4px 8px;
  border: 1px solid var(--accent-subtle);
  border-radius: 4px;
  background: var(--accent-subtle);
  margin-bottom: 10px;
}

/* Usage bar */
.dash-usage-card .dash-card-header {
  margin-bottom: 12px;
}

.dash-usage-pct {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.dash-usage-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 100px;
  overflow: hidden;
}

.dash-usage-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), rgba(94, 106, 210, 0.5));
  border-radius: 100px;
  transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Quick actions */
.dash-quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.dash-quick-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s;
}

.dash-quick-btn:hover {
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.04);
}

.dash-quick-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.dash-quick-desc {
  font-size: 11px;
  color: var(--text-tertiary);
  line-height: 1.4;
}

/* API key panel */
.dash-key-card .dash-card-header {
  margin-bottom: 20px;
}

.dash-key-card h2 {
  font-size: 18px;
  margin-top: 4px;
}

.dash-key-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: 32px 24px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.3);
}

.dash-key-empty-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  color: var(--text-tertiary);
}

.dash-key-empty p {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 320px;
}

.dash-key-active {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.key-display-wrapper {
  display: flex;
  gap: 10px;
  background: #000;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  align-items: center;
}

.key-display-wrapper code {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--success);
  word-break: break-all;
  flex: 1;
}

.key-success {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--success);
  font-size: 13px;
}

/* Setup */
.dash-setup-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.dash-setup-step {
  display: flex;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.dash-setup-step:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.dash-setup-step:first-child {
  padding-top: 0;
}

.dash-setup-num {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  border-radius: 50%;
  background: var(--text);
  color: #000;
}

.dash-setup-step h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.dash-setup-step p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.dash-setup-step code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
}

.dash-cli-card {
  margin-top: 16px;
}

.dash-cli-cmds {
  margin-top: 14px;
}

/* Shared buttons (dashboard + modals) */
.btn-primary,
.btn-secondary,
.btn-submit {
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  background: var(--text);
  color: #000;
  border: none;
  padding: 10px 18px;
}

.btn-primary:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 10px 18px;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-hover);
}

.btn-small {
  padding: 6px 12px !important;
  font-size: 12px !important;
  width: fit-content;
}

.btn-copy {
  flex-shrink: 0;
  background: var(--text);
  color: #000;
  border: none;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-copy:hover {
  opacity: 0.9;
}

.btn-copy.is-copied {
  background: var(--success);
  color: #000;
}

.btn-google {
  display: inline-flex;
  align-items: center;
  background: var(--text);
  color: #000;
  border: none;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* Dashboard responsive */
@media (max-width: 900px) {
  .dash-layout {
    grid-template-columns: 1fr;
  }

  .dash-sidebar {
    position: relative;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 12px 16px;
    gap: 8px;
  }

  .dash-brand {
    padding: 0;
    margin: 0;
  }

  .dash-nav {
    flex-direction: row;
    flex: none;
    order: 3;
    width: 100%;
    overflow-x: auto;
  }

  .dash-sidebar-footer {
    flex-direction: row;
    margin-left: auto;
    border: none;
    padding: 0;
    gap: 8px;
  }

  .dash-nav-link {
    padding: 8px 10px;
    font-size: 12px;
  }

  .dash-topbar {
    padding: 16px 20px;
  }

  .dash-main {
    padding: 20px;
  }

  .dash-stats-row {
    grid-template-columns: 1fr;
  }

  .dash-quick-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .dash-user-meta {
    display: none;
  }

  .dash-user-chip {
    padding: 4px;
    border-radius: 50%;
  }
}

/* ============================================================
   CLI GUIDE PAGE (cli.html)
   ============================================================ */

.guide-page .nav-cli.is-active {
  color: var(--text);
}

.guide-lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-tertiary);
  margin-right: 4px;
}

.guide-lang-switch a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}

.guide-lang-switch a:hover {
  color: var(--text);
}

.guide-lang-switch a.is-active {
  color: var(--text);
  background: var(--accent-subtle);
}

.guide-lang-switch span {
  opacity: 0.4;
  user-select: none;
}

.guide-main {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: calc(var(--nav-height) + 48px) 24px 80px;
}

.guide-hero {
  margin-bottom: 48px;
}

.guide-hero-title {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 12px 0 16px;
}

.guide-hero-lead {
  color: var(--text-secondary);
  max-width: 640px;
  margin-bottom: 24px;
}

.guide-hero-ctas .cmd-row {
  max-width: 520px;
}

.guide-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 48px;
  align-items: start;
}

.guide-toc {
  position: sticky;
  top: calc(var(--nav-height) + 24px);
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.guide-toc-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}

.guide-toc nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.guide-toc a {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}

.guide-toc a:hover {
  color: var(--text);
  background: var(--accent-subtle);
}

.guide-content {
  min-width: 0;
}

.guide-section {
  margin-bottom: 48px;
  scroll-margin-top: calc(var(--nav-height) + 20px);
}

.guide-section h2 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.guide-section h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 24px 0 12px;
  color: var(--text);
}

.guide-section p {
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.guide-list {
  color: var(--text-secondary);
  margin: 0 0 16px 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.guide-steps {
  color: var(--text-secondary);
  margin: 0 0 12px 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.guide-note {
  font-size: 13px;
  color: var(--text-tertiary);
  padding: 12px 14px;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.guide-section .cmd-row {
  margin-bottom: 12px;
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 16px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.guide-table th,
.guide-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.guide-table th {
  background: var(--bg-surface);
  color: var(--text);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.guide-table td {
  color: var(--text-secondary);
}

.guide-table td code,
.guide-table th code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
}

.guide-table tr:last-child td {
  border-bottom: none;
}

.guide-callout {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  margin: 20px 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.guide-callout code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
}

.guide-callout-info {
  background: rgba(94, 106, 210, 0.1);
  border: 1px solid rgba(94, 106, 210, 0.25);
}

.guide-callout-warn {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.guide-callout strong {
  color: var(--text);
}

.guide-quick-flow {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.guide-quick-step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.guide-quick-step .step-num {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-subtle);
  color: var(--accent);
  font-weight: 600;
  font-size: 13px;
  border-radius: 50%;
  flex-shrink: 0;
}

.guide-quick-step code {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
}

.guide-section-cta .guide-hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

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

  .guide-toc {
    position: static;
  }

  .guide-toc nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
}
