/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans, system-ui, -apple-system, 'Segoe UI', sans-serif);
  background: var(--bg-deep, #07070B);
  color: var(--text-secondary, rgba(240,236,227,0.65));
  font-weight: 300;
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  position: relative;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--text-body, #D8D9E2); }

/* ── Colors ── */
/* Colors are defined in clajama-app.css :root variables.
   This file references them via var() — the single source of truth.
   To change the entire design, edit clajama-app.css. */

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--border-medium); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Gradient System ── */
.brand-gradient {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-mid) 55%, var(--accent-glow) 100%);
}
.glow-bg {
  background: radial-gradient(circle, var(--accent-tint) 0%, transparent 70%);
}
.dark-surface-gradient {
  background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-deep) 100%);
}

/* ── Neon Glow Utility ── */
.glow-purple {
  box-shadow: 0 0 40px rgba(196, 169, 110, 0.25);
}
.glow-purple-sm {
  box-shadow: 0 0 20px rgba(196, 169, 110, 0.15);
}
.glow-purple-lg {
  box-shadow: 0 0 60px rgba(196, 169, 110, 0.30);
}

/* ── Thin Grid System ── */
.grid-overlay {
  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: 40px 40px;
}
.grid-overlay-subtle {
  background-image: 
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ── Floating Panel ── */
.panel-floating {
  background: rgba(14,16,24,0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(166,169,184,0.08);
  border-radius: 24px;
}
.panel-elevated {
  background: rgba(20,22,36,0.92);
  border: 1px solid rgba(166,169,184,0.06);
  border-radius: 24px;
}

/* ── Edge Glow ── */
.edge-glow {
  position: relative;
}
.edge-glow::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--accent-tint), transparent 50%);
  z-index: -1;
  pointer-events: none;
}

/* ── Motion Defaults ── */
.motion-fade {
  transition: all 240ms ease;
}
.motion-lift {
  transition: transform 240ms ease, box-shadow 240ms ease;
}
.motion-lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--glow-subtle);
}

/* ── Utility Colors (all reference CSS variables — edit clajama-app.css to change) ── */
.electric-purple { color: var(--accent); }
.neon-violet { color: var(--accent-mid); }
.soft-glow-purple { color: var(--accent-glow); }
.cool-gray { color: var(--text-secondary); }
.light-gray { color: var(--text-body); }
.deep-black { color: var(--bg-deep); }
.soft-black { color: var(--bg-soft); }
.dark-indigo { color: var(--bg-surface); }
.bg-electric-purple { background: var(--accent); }
.bg-neon-violet { background: var(--accent-mid); }
.bg-soft-glow-purple { background: var(--accent-glow); }
.bg-deep-black { background: var(--bg-deep); }
.bg-soft-black { background: var(--bg-soft); }
.bg-dark-indigo { background: var(--bg-surface); }
.border-purple { border-color: var(--accent-border); }

/* ── Label weight fix (500-600 uppercase) ── */
.label,
.section-label,
.form-group label,
.badge {
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* ── Body text fix (400-500 neutral) ── */
body, p, .chat-bubble, .task-desc, .demo-msg-user, .hero-sub {
  font-weight: 400;
}



/* ── Navigation (public / marketing) ── */
.nav-public {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
  height: 64px;
  background: rgba(7, 7, 11, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(166,169,184,0.08);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
}
.nav-logo-mark {
  width: 28px;
  height: 28px;
  background: var(--accent);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  color: var(--accent-text);
}
.nav-logo-text {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.5px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}
.nav-link {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
  cursor: pointer;
}
.nav-link:hover { color: var(--text-primary); }
.nav-cta {
  background: var(--accent);
  color: var(--accent-text) !important;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 13px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  border: none;
  cursor: pointer;
}
.nav-cta:hover {
  background: var(--accent-hover) !important;
  transform: translateY(-1px);
  box-shadow: var(--glow-subtle);
  color: #fff !important;
}

/* ── Navigation (signed-in sidebar) ── */
.app-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* But on public pages (no sidebar), allow natural page scrolling */
.app-shell:not(:has(.sidebar)) {
  height: auto;
  min-height: 100vh;
  overflow: visible;
}
.sidebar {
  width: fit-content;
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--base);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  box-sizing: border-box;
  white-space: nowrap;
}
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-primary);
  padding-bottom: 24px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  transition: all 0.15s;
  cursor: pointer;
  text-decoration: none;
}
.sidebar-item:hover {
  background: var(--accent-tint);
  color: var(--accent);
}
.sidebar-item.active {
  background: var(--accent-tint);
  color: var(--accent);
}
.sidebar-spacer { flex: 1; }
.sidebar-footer {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 8px;
}

.main-content {
  flex: 1;
  padding: 32px 36px;
  min-width: 0;
}

/* When sidebar exists, main content scrolls independently */
.app-shell:has(.sidebar) .main-content {
  overflow-y: auto;
  height: 100vh;
}

/* ── Mobile Bottom Tab Bar (replaces sidebar on small screens) ── */
.bottom-tabs {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--surface);
  border-top: 0.5px solid var(--border);
  z-index: 100;
  padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  box-sizing: border-box;
}
.tab-bar {
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  height: 100%;
  max-width: 639px;
  margin: 0 auto;
}
.tab-bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 2px 6px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: color 0.12s;
  flex: 1;
  max-width: 80px;
  -webkit-tap-highlight-color: transparent;
  min-height: 0;
}
.tab-bar-item.active {
  color: var(--accent);
}
.tab-bar-item:active {
  opacity: 0.5;
}

/* ── Mobile More-Overlay (opens from More tab) ── */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 200;
  align-items: flex-end;
  justify-content: center;
}
.mobile-overlay.open {
  display: flex;
}
.mobile-panel {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 12px 12px 0 0;
  width: 100%;
  max-width: 500px;
  max-height: 70vh;
  overflow-y: auto;
  padding: 16px 20px;
  padding-bottom: max(20px, env(safe-area-inset-bottom));
  animation: mobSlideUp 0.2s ease-out;
}
@keyframes mobSlideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.mobile-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 0.5px solid var(--border);
}
.mobile-panel-title {
  font-size: 13px;
  font-weight: 300;
  color: var(--text-primary);
  letter-spacing: 0.04em;
}
.mobile-panel-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--raised);
  border: 0.5px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13px;
  transition: all 0.12s;
  font-family: inherit;
}
.mobile-panel-close:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}
.mobile-items {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.mobile-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 300;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.1s;
}
.mobile-item:hover {
  background: var(--accent-tint);
  color: var(--accent);
}
.mobile-item .mi-icon {
  font-size: 17px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}
.mobile-divider {
  height: 0.5px;
  background: var(--border);
  margin: 6px 10px;
}
.mobile-section-label {
  font-size: 9px;
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 10px 10px 4px;
}

/* ── Section label (ALL CAPS) ── */
.section-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* ── Buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 14px;
  font-weight: 600;
  padding: 13px 26px;
  border-radius: var(--radius-md);
  border: none;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--glow-subtle);
  color: var(--text-primary);
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  padding: 13px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-ghost:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
  background: var(--surface);
}
.btn-danger {
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}
.btn-danger:hover { border-color: rgba(231,76,60,0.4); color: rgba(231,76,60,0.7); }

/* ── Badge / Pill ── */
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
  letter-spacing: 0.04em;
}
.badge-accent {
  background: var(--accent-tint);
  color: var(--accent);
  border: 1px solid var(--accent-border);
}
.badge-muted {
  background: rgba(166,169,184,0.06);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.badge-green {
  background: rgba(52,211,153,0.1);
  color: var(--status-green);
  border: 1px solid rgba(52,211,153,0.2);
}

/* ── Tags ── */
.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 400;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  letter-spacing: 0.03em;
}
.tag-highlighted {
  border-color: var(--accent-border);
  color: var(--accent);
  background: var(--accent-tint);
}

/* ── Inputs ── */
.input {
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
  font-family: inherit;
}
.input:focus { border-color: var(--accent); }
.input::placeholder { color: var(--text-muted); }

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 24px;
  transition: border-color 0.2s;
}
.card:hover {
  border-color: var(--border-hover);
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ── Task items ── */
.task-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(166,169,184,0.08);
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
}
.task-check {
  width: 18px; height: 18px;
  border-radius: 4px;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
  background: transparent;
  font-size: 11px;
  transition: all 0.15s;
}
.task-check.completed {
  border-color: var(--accent);
  background: var(--accent-tint);
  color: var(--accent);
}
.task-check:hover {
  border-color: var(--accent);
}
.task-desc { flex: 1; }
.task-desc.completed { color: var(--accent); text-decoration: line-through; }
.task-delete {
  opacity: 0;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 2px 4px;
  border-radius: 4px;
  transition: opacity 0.15s;
}
.task-item:hover .task-delete { opacity: 1; }
.task-delete:hover { color: var(--status-red, #e74c3c); }

/* ── Chat message ── */
.chat-msg {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}
.chat-avatar {
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}
.chat-avatar.ai {
  background: var(--accent-tint);
  color: var(--accent);
}
.chat-avatar.user {
  background: rgba(166,169,184,0.08);
  color: var(--text-secondary);
}
.chat-bubble {
  flex: 1;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-secondary);
}
.chat-bubble.ai { color: var(--text-secondary); }
.chat-bubble.user { color: var(--text-primary); }
.chat-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── Grid helpers ── */
.flex-row { display: flex; gap: 12px; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
.gap-lg { gap: 24px; }
.mt-sm { margin-top: 8px; }
.mt-md { margin-top: 16px; }
.mt-lg { margin-top: 24px; }
.mb-sm { margin-bottom: 8px; }
.mb-md { margin-bottom: 16px; }
.mb-lg { margin-bottom: 24px; }

/* ── Headings ── */
.h1 {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 16px;
}

/* Large hero-style heading — for blog headlines & hero text */
.heading-xl {
  font-size: clamp(36px, 5.5vw, 72px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--text-primary);
}
.heading-xl .accent {
  color: var(--accent);
}
.heading-xl .muted {
  color: var(--text-muted);
}

@media (max-width: 639px) {
  .h1 { font-size: 34px; }
  .heading-xl { font-size: clamp(30px, 7vw, 48px); }
}
.h2 {
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.h3 {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 8px;
}

/* ── Project grid ── */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: block;
}
.project-card:hover {
  border-color: var(--accent-border);
  transform: translateY(-2px);
}
.project-card-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.project-card-meta {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
}

/* ── Tabs ── */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.tab {
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s;
  background: transparent;
  border-top: none;
  border-left: none;
  border-right: none;
}
.tab:hover { color: var(--text-secondary); }
.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── Modal ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  align-items: center;
  justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 400px;
  max-width: 90vw;
}
.modal-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

/* ── Quick Chat ── */
.quick-chat-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}
.quick-chat-input-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.quick-chat-input-row input { flex: 1; }
.quick-chat-input-row button { flex-shrink: 0; }

/* ── Footer ── */
.footer {
  border-top: 1px solid rgba(166,169,184,0.08);
  padding: 24px 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-top: 40px;
}
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--text-muted); transition: color 0.15s; }
.footer-links a:hover { color: var(--text-secondary); }

/* ── Build Grid (3 columns) ── */
.build-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

/* ── Stats grid (4-col counter bar) ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--border);
}

/* ── Steps grid (3-col how-it-works) ── */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

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

/* ── Section margins ── */
.section { padding: 60px 36px; }
.section-sm { padding: 40px 36px; }

/* ── Bento ── */
.bento {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}
.bento-cell {
  background: var(--surface);
  padding: 32px 28px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.bento-cell:nth-child(3n) { border-right: none; }
.bento-cell:nth-last-child(-n+3) { border-bottom: none; }
.bento-cell-accent {
  background: var(--accent);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.bento-cell-accent .h3 {
  color: var(--accent-text);
}
.bento-cell-accent .btn-primary {
  background: var(--accent-text);
  color: var(--accent);
}
.bento-cell-accent .section-label {
  color: rgba(7,7,11,0.4);
}

/* ── Proof stats ── */
.proof-row {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 24px;
}
.proof-stat { display: flex; flex-direction: column; }
.proof-number {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.proof-label {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-top: 2px;
}
.proof-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
}

/* ── Demo Card ── */
.demo-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.demo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}
.demo-header-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}
.demo-body {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.demo-msg-user {
  font-style: italic;
  font-size: 13px;
  color: var(--text-muted);
  padding: 10px 12px;
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--text-muted);
}
.demo-msg-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 4px;
}
.demo-task {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(166,169,184,0.08);
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
}
.demo-task-check {
  width: 16px; height: 16px;
  border-radius: 4px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.demo-input {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
}

/* ── Hero ── */
.hero {
  display: flex;
  flex-direction: row;
  min-height: 100vh;
  padding-top: 64px;
}
.hero-left {
  flex: 1;
  max-width: 680px;
  padding: 144px 60px 60px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-right {
  width: 420px;
  max-width: 100%;
  flex-shrink: 0;
  padding: 144px 32px 32px;
  display: flex;
  flex-direction: column;
}
.hero-headline {
  font-size: 64px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin-bottom: 24px;
}
.hero-headline > span {
  display: inline-block;
}
.hero-sub {
  font-size: 15px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 480px;
}
.hero-ctas {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* ── Inline Preview (build preview in iframe) ── */
.preview-container {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
  margin-bottom: 12px;
}
.preview-container iframe {
  width: 100%;
  height: 400px;
  border: none;
  display: block;
}
.preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.preview-bar-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.preview-bar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.preview-toggle-btn {
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  padding: 4px 12px;
  font-size: 11px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.preview-toggle-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Thinking dots ── */
.thinking-dots {
  display: flex;
  gap: 4px;
  align-items: center;
}
.thinking-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: think-bounce 1.2s infinite ease-in-out;
}
.thinking-dots span:nth-child(1) { animation-delay: 0s; }
.thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
.thinking-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes think-bounce {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1.2); }
}

/* ── Build Preview ── */
.build-preview-container {
  background: var(--text-primary, #ffffff);
  position: relative;
}
.build-preview-iframe {
  width: 100%;
  border: none;
  display: block;
  min-height: 400px;
}
.preview-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  background: var(--text-primary, #ffffff);
  color: var(--text-muted);
  font-size: 13px;
  font-family: system-ui, sans-serif;
}
.build-page-btn.active {
  border-color: var(--accent) !important;
  color: var(--accent) !important;
  background: var(--accent-tint) !important;
}
.build-page-btn:hover {
  border-color: var(--text-muted) !important;
  color: var(--text-primary) !important;
}

/* ── Responsive ── */
@media (max-width: 639px) {
  .hero { flex-direction: column; min-height: auto; }
  .hero-left { padding: 104px 24px 40px; border-right: none; }
  .hero-right { width: 100%; max-width: 100%; padding: 104px 24px 24px; }
  .bento { grid-template-columns: 1fr; border-radius: 0; border: none; }
  .bento-cell { border-right: none; border-bottom: 1px solid var(--border); }
  .bento-cell:nth-last-child(-n+3) { border-bottom: 1px solid var(--border); }
  .bento-cell:last-child { border-bottom: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .build-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .features-grid .card.featured { grid-column: span 1 !important; }
  .section { padding: 40px 24px; }
  .nav-public { padding: 0 24px; }
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .sidebar { display: none; }
  .bottom-tabs { display: block; }
  .main-content { padding: 24px 20px; padding-bottom: 100px; }
  .proof-row { flex-wrap: wrap; gap: 16px; }
  .proof-divider { display: none; }
  .project-grid { grid-template-columns: 1fr; }
}

@media (min-width: 640px) and (max-width: 1023px) {
  .build-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Admin mobile: stack sidebar on top, compact */
@media (max-width: 639px) {
  .app-layout { flex-direction: column !important; }
  .admin-sidebar { width: 100% !important; flex-direction: row !important; flex-wrap: wrap !important; padding: 8px 12px !important; border-right: none !important; border-bottom: 0.5px solid rgba(166,169,184,0.08); gap: 2px; align-items: center; }
  .admin-sidebar-header { display: none !important; }
  .admin-sidebar-item { padding: 4px 10px !important; font-size: 11px !important; white-space: nowrap; }
  .admin-sidebar-item span { display: none; }
  .admin-sidebar-footer { display: none !important; }
  .admin-content { padding: 16px !important; }
}
    @keyframes pulse-dot { 0%,100%{opacity:1} 50%{opacity:0.4} }
.fade-in { opacity:0; transform:translateY(24px); transition:opacity 0.6s ease-out,transform 0.6s ease-out; }
.fade-in.visible { opacity:1; transform:translateY(0); }
.card:hover .card-lift { transform:translateY(-4px); }
@media (max-width: 639px) { .landing-nav { display:none !important; } }
.auth-card {
  max-width:440px;margin:0 auto;text-align:center;background:var(--surface);
  border:1px solid var(--border);border-radius:24px;
  padding:56px 40px;position:relative;overflow:hidden;
}
@media (max-width: 639px) {
  .auth-card { padding:32px 16px; }
}
#hm-btn {
display: none;
}
@media (max-width: 639px) {
#hm-btn {
  display: flex !important;
}
}
/* Chat page full-height layout */
.app-main-chat {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 0px);
  overflow: hidden;
}

@media (max-width: 639px) {
  .app-main-chat {
    height: calc(100vh - 60px - env(safe-area-inset-bottom, 0px));
    padding-bottom: 0 !important;
  }
}

/* Active mobile item highlight */
.mobile-item.active {
background: var(--accent-tint);
color: var(--accent);
}

/* ── Chat Page Layout (full-height, IM-style) ── */
.chat-page-layout {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 180px);
  max-height: calc(100vh - 180px);
}

/* Mobile: full viewport height minus header and input bar */
@media (max-width: 639px) {
  .chat-page-layout {
    height: calc(100vh - 56px - 80px);
    max-height: calc(100vh - 56px - 80px);
  }
}

/* Tablet: header (56px) + comfortable padding */
@media (min-width: 640px) and (max-width: 1023px) {
  .chat-page-layout {
    height: calc(100vh - 80px);
    max-height: calc(100vh - 80px);
  }
}

/* ── Adaptive Grid System (ML-inspired) ── */
/* Use auto-fill + minmax so grid naturally adapts columns to available width */
.adaptive-grid {
  display: grid;
  gap: var(--grid-gap, 12px);
  grid-template-columns: repeat(auto-fill, minmax(var(--grid-min, 260px), 1fr));
}

/* Desktop: prefer 3+ columns */
@media (min-width: 1024px) {
  .adaptive-grid[data-cols="4"] {
    --grid-min: 240px;
  }
  .adaptive-grid[data-cols="3"] {
    --grid-min: 300px;
  }
  .adaptive-grid[data-cols="2"] {
    --grid-min: 400px;
  }
  /* Force 3 equal columns for How it Works steps */
  .adaptive-grid[data-steps="3"] {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

/* Tablet: 2-3 columns */
@media (min-width: 640px) and (max-width: 1023px) {
  .adaptive-grid[data-cols] {
    --grid-min: 220px;
  }
}

/* Mobile: always single column for small screens */
@media (max-width: 639px) {
  .adaptive-grid {
    --grid-min: 100%;
    gap: 12px;
  }
}

/* ── Step card styles (reusable) ── */
.step-card {
  padding: 36px 28px;
  transition: all 0.3s ease;
}
.step-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--glow-modal);
}
.step-number {
  font-size: 48px;
  font-weight: 800;
  color: rgba(245,158,11,0.08);
  line-height: 1;
  margin-bottom: 20px;
  letter-spacing: -2px;
}
.step-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
}
.step-desc {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Dashboard Layout ── */
.dashboard-layout {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px 0;
}

/* Jama Greeting */
.jama-greeting {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  padding: 20px 24px;
  background: var(--surface);
  border: 0.5px solid var(--accent-border);
  border-radius: var(--radius-md);
}
.jama-avatar-greeting { flex-shrink: 0; }
.greeting-text {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.greeting-sub {
  font-size: 13px;
  font-weight: 300;
  color: var(--text-secondary);
}
.dash-section { margin-bottom: 28px; }

/* ── New Project Modal (Jama-driven) ── */
.modal-create {
  width: min(520px, 92vw);
  max-height: min(90vh, 680px);
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 16px;
}
.modal-grip {
  display: none;
  width: 40px;
  height: 4px;
  background: var(--border);
  border-radius: 4px;
  margin: 8px auto 0;
}
.modal-jama-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px 16px;
  border-bottom: 0.5px solid var(--border);
  flex-shrink: 0;
}
.jama-avatar-modal { flex-shrink: 0; }
.modal-jama-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}
.modal-jama-sub {
  font-size: 12px;
  font-weight: 300;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Scrollable form body — only scrolls the form, not the header/actions */
.modal-form-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.form-group { margin-bottom: 16px; }
.form-label {
  font-size: 10px;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 5px;
  text-transform: uppercase;
}
.form-hint {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  padding: 6px 10px;
  background: var(--raised);
  border-radius: 4px;
  margin-top: 6px;
}
.form-row-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 16px 24px;
  border-top: 0.5px solid var(--border);
  flex-shrink: 0;
}

/* ── Device-aware Tour ── */
.tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: tourFadeIn 0.3s ease;
}
@keyframes tourFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.tour-card {
  background: var(--surface);
  border: 0.5px solid var(--accent-border);
  border-radius: 20px;
  padding: 40px 32px 28px;
  width: min(420px, 90vw);
  text-align: center;
  animation: tourSlideUp 0.35s ease;
}
@keyframes tourSlideUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.tour-jama-icon { margin-bottom: 20px; }
.tour-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}
.tour-desc {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}
.tour-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}
.tour-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.2s, transform 0.2s;
}
.tour-dot.active {
  background: var(--accent);
  transform: scale(1.3);
}
.tour-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* ── Mobile responsive overrides ── */
@media (max-width: 639px) {
  .dashboard-layout { padding: 16px 0; }
  .jama-greeting { padding: 14px 16px; flex-direction: column; text-align: center; }
  .greeting-text { font-size: 18px; }
  .greeting-sub { font-size: 12px; }

  .modal-create {
    width: 100vw;
    max-height: 100dvh;
    border-radius: 0;
    max-width: none;
  }
  .modal-grip { display: block; }
  .modal-jama-header { padding: 12px 16px 10px; }
  .modal-form-body { padding: 14px 16px; }
  .form-row-duo { grid-template-columns: 1fr; gap: 0; }
  .modal-actions { padding: 12px 16px; }

  .tour-card { border-radius: 16px; padding: 32px 20px 24px; margin: 0 16px; }
}

/* Tablet tweaks */
@media (min-width: 640px) and (max-width: 1023px) {
  .modal-create { width: min(520px, 80vw); }
}

/* ── Project Chat (IM/DM style within tabs) ── */
.jama-welcome-card {
  border: 0.5px solid var(--accent-border);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}
.jama-welcome-msg {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.jama-welcome-avatar {
  flex-shrink: 0;
}
.jama-avatar-tiny {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-mid));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}
.jama-welcome-text {
  flex: 1;
}
.project-chat-messages {
  margin-bottom: 16px;
  max-height: 400px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 0;
}
.project-chat-messages .chat-msg {
  display: flex;
  gap: 8px;
  animation: msg-slide-in 0.2s ease-out;
}
.project-chat-messages .chat-msg.user {
  flex-direction: row-reverse;
}
.project-chat-messages .chat-msg-avatar {
  align-self: flex-end;
  flex-shrink: 0;
}
.project-chat-messages .chat-msg.user .chat-msg-avatar {
  display: none;
}
.project-chat-messages .chat-msg-content {
  max-width: 85%;
  display: flex;
  flex-direction: column;
}
.project-chat-messages .chat-msg.user .chat-msg-content {
  align-items: flex-end;
}
.project-chat-messages .chat-bubble {
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
}
.project-chat-messages .chat-bubble.user {
  background: var(--accent);
  color: #fff;
  border-radius: 16px 4px 16px 16px;
}
.project-chat-messages .chat-bubble.jama,
.project-chat-messages .chat-bubble.ai,
.project-chat-messages .chat-bubble.assistant {
  background: var(--raised);
  color: var(--text-primary);
  border: 0.5px solid var(--border);
  border-radius: 4px 16px 16px 16px;
}
.project-chat-messages .chat-time {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 3px;
  padding: 0 4px;
}
.project-thinking {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
  background: var(--raised);
  border-radius: 8px;
}
.project-chat-form {
  display: flex;
  gap: 8px;
  align-items: center;
}
.project-chat-input {
  flex: 1;
  border-radius: 24px !important;
  padding: 11px 16px !important;
}
.project-chat-form .chat-send-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}
.project-chat-form .chat-send-btn:hover {
  background: var(--accent-hover);
  transform: scale(1.05);
}

@media (max-width: 639px) {
  .project-chat-messages .chat-msg-content {
    max-width: 90%;
  }
  .project-chat-messages .chat-bubble {
    font-size: 15px;
    padding: 9px 12px;
  }
  .project-chat-input {
    font-size: 15px !important;
  }
}