:root {
  --bg-deep: #090d16;
  --bg-surface: #0e1526;
  --bg-panel: rgba(14, 21, 35, 0.94);
  --bg-card: rgba(15, 23, 42, 0.88);
  --bg-card-hover: rgba(22, 33, 56, 0.96);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.16);
  --border-active: #0284c7;
  --border-glow: rgba(56, 189, 248, 0.22);
  --cyan: #38bdf8;
  --blue: #0284c7;
  --violet: #8b5cf6;
  --emerald: #10b981;
  --orange: #f59e0b;
  --red: #f43f5e;
  --text-main: #f8fafc;
  --text-body: #cbd5e1;
  --text-muted: #94a3b8;
  --font-sans: 'Assistant', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background: transparent;
  color: var(--text-body);
}

#ambient-webgl {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  display: block;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  right: 1rem;
  background: var(--blue);
  color: #ffffff;
  font-weight: 700;
  padding: 0.6rem 1.1rem;
  border-radius: 0.5rem;
  z-index: 9999;
  text-decoration: none;
}
.skip-link:focus {
  top: 1rem;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 13, 22, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 1rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-main);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #0284c7;
  border: 1px solid rgba(56, 189, 248, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #ffffff;
  font-size: 1rem;
}

.brand-text-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
}
.brand-name span {
  color: var(--cyan);
}

.brand-sub {
  font-size: 0.62rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.nav-links a {
  color: var(--text-body);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  transition: color 0.18s ease;
}
.nav-links a:hover {
  color: var(--text-main);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.btn-cmd, .btn-lang {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-subtle);
  color: #e2e8f0;
  padding: 0.42rem 0.8rem;
  border-radius: 0.55rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.18s ease;
}
.btn-cmd:hover, .btn-lang:hover {
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.kbd-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  background: rgba(255, 255, 255, 0.08);
  color: var(--cyan);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.btn-primary-sm {
  background: #0284c7;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.48rem 1rem;
  border-radius: 0.55rem;
  text-decoration: none;
  border: 1px solid rgba(56, 189, 248, 0.35);
  transition: background 0.18s ease, transform 0.18s ease;
}
.btn-primary-sm:hover {
  background: #0369a1;
  transform: translateY(-1px);
}

.mobile-menu-btn {
  display: none;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.45rem 0.7rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 1.1rem;
}

.mobile-drawer {
  background: rgba(9, 13, 22, 0.98);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.mobile-drawer[hidden] {
  display: none !important;
}
.mobile-drawer a {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 600;
  padding: 0.35rem 0;
}

/* Hero Section */
.hero-section {
  padding: 4.2rem 0 3.2rem;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  gap: 2.8rem;
  align-items: center;
}

.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-medium);
  color: var(--cyan);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 0.5rem;
  margin-bottom: 1.25rem;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  display: inline-block;
  flex-shrink: 0;
}

.hero-title {
  font-size: clamp(2.2rem, 4.4vw, 3.8rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin-bottom: 1.2rem;
  color: var(--text-main);
}

.hero-title-accent {
  display: block;
  color: var(--cyan);
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.08rem;
  color: var(--text-body);
  max-width: 640px;
  margin-bottom: 1.85rem;
  line-height: 1.65;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 2.2rem;
}

.btn-hero-primary {
  background: #0284c7;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.98rem;
  padding: 0.82rem 1.6rem;
  border-radius: 0.65rem;
  text-decoration: none;
  border: 1px solid rgba(56, 189, 248, 0.4);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  transition: background 0.18s ease, transform 0.18s ease;
}
.btn-hero-primary:hover {
  background: #0369a1;
  transform: translateY(-1px);
}

.btn-hero-secondary {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.82rem 1.55rem;
  border-radius: 0.65rem;
  text-decoration: none;
  transition: all 0.18s ease;
}
.btn-hero-secondary:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(30, 41, 59, 0.9);
}

.hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 0.75rem;
  padding: 0.9rem 0.95rem;
}
.stat-val {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.15;
}
.stat-lbl {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 0.2rem;
}
.stat-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* Hero Right: 3D Topology Sphere Card */
.hero-sphere-card {
  background: rgba(12, 18, 30, 0.88);
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  padding: 1.1rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sphere-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border-subtle);
}

#hero-sphere-canvas {
  width: 100%;
  height: 350px;
  cursor: grab;
  display: block;
  touch-action: none;
  user-select: none;
}
#hero-sphere-canvas:active {
  cursor: grabbing;
}

.hero-hub-readout {
  width: 100%;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid var(--border-subtle);
  border-radius: 0.6rem;
  padding: 0.5rem 0.85rem;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.4rem;
  color: var(--text-body);
}
.hero-hub-readout strong {
  color: var(--text-main);
}
.hub-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.sphere-caption {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  text-align: center;
}

/* Section Headings */
.section-block {
  padding: 4.2rem 0;
  position: relative;
}

.section-head {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 2.6rem;
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 0.55rem;
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 0.8rem;
  color: var(--text-main);
}

.section-subtitle {
  color: var(--text-body);
  font-size: 1.02rem;
  line-height: 1.65;
}

/* Pain Points & Transformation Switch */
.pain-mode-switch {
  display: inline-flex;
  background: rgba(10, 16, 28, 0.95);
  border: 1px solid var(--border-subtle);
  border-radius: 0.65rem;
  padding: 0.25rem;
  margin: 1.2rem auto 0;
  gap: 0.3rem;
}

.pain-mode-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.86rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.18s ease;
}
.pain-mode-btn.active[data-pain-mode="before"] {
  background: rgba(244, 63, 94, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(244, 63, 94, 0.35);
}
.pain-mode-btn.active[data-pain-mode="after"] {
  background: rgba(16, 185, 129, 0.16);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.pain-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.35rem;
}

.pain-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 0.85rem;
  padding: 1.55rem;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  position: relative;
  overflow: hidden;
}
.pain-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
}
.resolved-mode .pain-card {
  border-color: rgba(16, 185, 129, 0.35);
}

.pain-status-badge {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  background: rgba(244, 63, 94, 0.14);
  color: #fca5a5;
}
.resolved-mode .pain-status-badge {
  background: rgba(16, 185, 129, 0.16);
  color: #6ee7b7;
}

.pain-card-title {
  font-size: 1.18rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text-main);
}

.pain-card-desc {
  font-size: 0.92rem;
  color: var(--text-body);
  flex-grow: 1;
  line-height: 1.6;
}

.pain-metric-footer {
  padding-top: 0.95rem;
  border-top: 1px solid var(--border-subtle);
}
.pain-metric-val {
  font-size: 2rem;
  font-weight: 900;
  color: var(--red);
  line-height: 1.1;
}
.resolved-mode .pain-metric-val {
  color: var(--emerald);
}
.pain-metric-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Workbench Section */
.workbench-shell {
  background: rgba(11, 17, 28, 0.94);
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.workbench-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(7, 11, 20, 0.98);
  border-bottom: 1px solid var(--border-subtle);
}

.workbench-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  padding: 0.95rem 0.85rem;
  cursor: pointer;
  text-align: start;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  transition: all 0.18s ease;
}
.workbench-tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.02);
}
.workbench-tab-btn.active {
  border-bottom-color: var(--blue);
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}
.tab-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
}
.tab-badge {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--text-muted);
}
.workbench-tab-btn.active .tab-badge {
  color: var(--cyan);
}

.workbench-panel {
  display: none;
  padding: 1.5rem;
}
.workbench-panel.active {
  display: block;
}

/* Lab 01: Pipeline Canvas */
.lab-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.95rem;
}

.preset-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chip-btn {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-subtle);
  color: var(--text-body);
  padding: 0.42rem 0.8rem;
  border-radius: 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}
.chip-btn:hover, .chip-btn.active {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(30, 41, 59, 0.95);
  color: #ffffff;
}

.chip-btn.warn {
  border-color: rgba(245, 158, 11, 0.35);
  color: #fcd34d;
}
.chip-btn.warn:hover {
  background: rgba(245, 158, 11, 0.15);
}

#pipeline-canvas {
  width: 100%;
  height: 330px;
  background: rgba(6, 10, 18, 0.92);
  border: 1px solid var(--border-subtle);
  border-radius: 0.75rem;
  cursor: grab;
  display: block;
  touch-action: none;
  user-select: none;
}
#pipeline-canvas:active {
  cursor: grabbing;
}

.pipeline-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  margin-top: 0.95rem;
  align-items: center;
}

.telemetry-box {
  background: rgba(6, 10, 18, 0.95);
  border: 1px solid var(--border-subtle);
  border-radius: 0.6rem;
  padding: 0.6rem 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--cyan);
  max-height: 90px;
  overflow-y: auto;
}
.telemetry-line {
  padding: 0.1rem 0;
}

.pipeline-metrics {
  display: flex;
  gap: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.metric-pill {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-subtle);
  padding: 0.45rem 0.8rem;
  border-radius: 0.55rem;
}

/* Lab 02: RAG Inspector */
.rag-split {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 1.35rem;
}

#rag-vector-canvas {
  width: 100%;
  height: 290px;
  background: rgba(6, 10, 18, 0.92);
  border: 1px solid var(--border-subtle);
  border-radius: 0.75rem;
  cursor: pointer;
  display: block;
}

.rag-search-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}
.rag-search-bar input {
  flex: 1;
  background: rgba(6, 10, 18, 0.92);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.55rem 0.85rem;
  border-radius: 0.55rem;
  font-family: var(--font-sans);
}

.rag-result-card {
  background: rgba(14, 21, 35, 0.92);
  border: 1px solid var(--border-subtle);
  border-radius: 0.75rem;
  padding: 1.05rem;
  margin-top: 0.75rem;
}
.rag-score-badge {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--cyan);
  margin-bottom: 0.4rem;
}
.rag-doc-box {
  background: rgba(6, 10, 18, 0.8);
  border-inline-start: 3px solid var(--blue);
  padding: 0.6rem 0.8rem;
  border-radius: 0.35rem;
  margin: 0.55rem 0;
  font-size: 0.85rem;
  color: var(--text-body);
}

/* Lab 03: Financial Intelligence */
.fin-split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.4rem;
}

.fin-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
  margin-bottom: 0.95rem;
}
.fin-kpi-box {
  background: rgba(14, 21, 35, 0.92);
  border: 1px solid var(--border-subtle);
  padding: 0.75rem;
  border-radius: 0.65rem;
}
.fin-kpi-val {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-main);
}

.fin-chart-bars {
  height: 195px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.6rem;
  align-items: end;
  background: rgba(6, 10, 18, 0.92);
  border: 1px solid var(--border-subtle);
  border-radius: 0.75rem;
  padding: 1rem 0.8rem 0.6rem;
}
.fin-bar-col {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  cursor: pointer;
  padding: 0.2rem;
  border-radius: 0.45rem;
  transition: background 0.18s ease;
}
.fin-bar-col.highlighted {
  background: rgba(255, 255, 255, 0.06);
}
.fin-bar-values {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.fin-bar-pair {
  width: 100%;
  height: 120px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
}
.fin-bar {
  width: 14px;
  border-radius: 3px 3px 0 0;
  transition: height 0.3s ease;
}
.fin-bar.rev {
  background: #0284c7;
}
.fin-bar.exp {
  background: #7c3aed;
}
.fin-bar-col.anomaly .fin-bar.exp {
  background: #f43f5e;
}
.fin-bar-label {
  font-size: 0.74rem;
  font-weight: 600;
  margin-top: 0.35rem;
  color: var(--text-body);
}

.sql-trace-box {
  background: #060a12;
  border: 1px solid var(--border-subtle);
  color: #c4b5fd;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.55rem;
  margin: 0.7rem 0;
  direction: ltr;
  text-align: left;
  overflow-x: auto;
}

/* Lab 04: Omnichannel WhatsApp & Voice AI */
.omni-split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.35rem;
}

.wa-phone-frame {
  background: #0b1319;
  border: 1px solid var(--border-subtle);
  border-radius: 0.85rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.wa-header {
  background: #182229;
  padding: 0.65rem 0.95rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}
.wa-thread {
  padding: 0.85rem;
  max-height: 240px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.wa-bubble {
  max-width: 86%;
  padding: 0.55rem 0.75rem;
  border-radius: 0.65rem;
  font-size: 0.85rem;
  line-height: 1.45;
}
.wa-user {
  align-self: flex-start;
  background: #202c33;
  color: #e9edef;
}
.wa-agent {
  align-self: flex-end;
  background: #005c4b;
  color: #e9edef;
}
.wa-tool-trace {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  background: rgba(0, 0, 0, 0.3);
  color: #6ee7b7;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  margin-top: 0.3rem;
  direction: ltr;
  text-align: left;
}
.wa-meta {
  font-size: 0.64rem;
  opacity: 0.72;
  margin-top: 0.25rem;
  text-align: end;
}
.wa-input-row {
  display: flex;
  gap: 0.45rem;
  padding: 0.55rem;
  background: #182229;
}
.wa-input-row input {
  flex: 1;
  background: #202c33;
  border: none;
  color: #fff;
  padding: 0.48rem 0.75rem;
  border-radius: 0.45rem;
}

.voice-dsp-card {
  background: rgba(14, 21, 35, 0.92);
  border: 1px solid var(--border-subtle);
  border-radius: 0.85rem;
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.85rem;
}
#omni-voice-canvas {
  width: 100%;
  height: 110px;
  background: rgba(6, 10, 18, 0.92);
  border-radius: 0.65rem;
  display: block;
}
.btn-voice-sim {
  background: #0284c7;
  color: #fff;
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 0.65rem 1.1rem;
  border-radius: 0.55rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease;
}
.btn-voice-sim:hover {
  background: #0369a1;
}
.btn-voice-sim.calling {
  background: #dc2626;
  border-color: rgba(239, 68, 68, 0.4);
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 1.35rem;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 0.85rem;
  padding: 1.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  transition: border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}
.service-card:hover {
  border-color: rgba(255, 255, 255, 0.22);
}

.srv-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.srv-code {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  padding: 0.18rem 0.55rem;
  border-radius: 4px;
}
.srv-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
}
.srv-sub {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--cyan);
}
.srv-desc {
  font-size: 0.92rem;
  color: var(--text-body);
  line-height: 1.6;
}
.srv-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 0.3rem 0 0.7rem;
  font-size: 0.86rem;
  color: var(--text-body);
}
.srv-bullets li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.bullet-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.srv-jump-btn {
  margin-top: auto;
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-weight: 600;
  padding: 0.62rem 1rem;
  border-radius: 0.55rem;
  cursor: pointer;
  transition: all 0.18s ease;
}
.srv-jump-btn:hover {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
}

/* ROI Calculator */
.roi-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  padding: 2rem;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2rem;
  align-items: center;
}
.roi-sliders {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}
.slider-row label {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  color: var(--text-main);
}
.slider-row input[type="range"] {
  width: 100%;
  accent-color: var(--blue);
  cursor: pointer;
}
.roi-results-card {
  background: rgba(8, 12, 22, 0.92);
  border: 1px solid var(--border-subtle);
  border-radius: 0.85rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}
.roi-big-num {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--emerald);
  line-height: 1.1;
}

/* About & Stack */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.4rem;
  align-items: start;
}
.profile-bio-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 0.85rem;
  padding: 1.15rem 1.25rem;
  margin-top: 1.15rem;
}
.profile-bio-head {
  display: flex;
  align-items: center;
  gap: 0.95rem;
}
.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.16);
  flex-shrink: 0;
}
.pillar-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-top: 1.15rem;
}
.pillar-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 0.75rem;
  padding: 1.1rem 1.2rem;
}
.stack-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
}
.stack-tile {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 0.75rem;
  padding: 0.85rem 0.95rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
}
.stack-tile strong,
.stack-name {
  display: block;
  color: var(--text-main);
  font-size: 0.92rem;
  direction: ltr;
  unicode-bidi: isolate;
}
.stack-tile span,
.stack-cat {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--cyan);
  direction: ltr;
  unicode-bidi: isolate;
}

/* Contact Section */
.contact-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
}
.contact-form {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  padding: 1.85rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.95rem;
}
.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.field-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-body);
}
.field-group input, .field-group textarea {
  background: rgba(6, 10, 18, 0.9);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.7rem 0.9rem;
  border-radius: 0.55rem;
  font-family: var(--font-sans);
  font-size: 0.92rem;
}
.field-group input:focus, .field-group textarea:focus {
  outline: none;
  border-color: var(--blue);
}
.contact-feedback {
  padding: 0.8rem 0.95rem;
  border-radius: 0.55rem;
  font-size: 0.88rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.contact-feedback.success {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
}
.contact-feedback.error {
  background: rgba(244, 63, 94, 0.14);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #fca5a5;
}

/* Command Palette Modal */
.cmd-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 14, 0.82);
  backdrop-filter: blur(8px);
  z-index: 900;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
}
.cmd-backdrop[hidden] {
  display: none !important;
}
.cmd-dialog {
  width: min(560px, 92vw);
  background: #0d1424;
  border: 1px solid var(--border-medium);
  border-radius: 0.85rem;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}
.cmd-header {
  display: flex;
  padding: 0.8rem 0.95rem;
  border-bottom: 1px solid var(--border-subtle);
  gap: 0.6rem;
  align-items: center;
}
.cmd-header input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 0.95rem;
}
.cmd-header input:focus {
  outline: none;
}
.cmd-list {
  padding: 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.cmd-item {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-body);
  padding: 0.6rem 0.8rem;
  border-radius: 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
  text-align: start;
}
.cmd-item:hover, .cmd-item.cmd-active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 2.2rem 0;
  background: rgba(6, 10, 18, 0.95);
  font-size: 0.86rem;
  color: var(--text-muted);
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.footer-links {
  display: flex;
  gap: 1.25rem;
}
.footer-links a {
  color: var(--text-body);
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--text-main);
}

/* Responsive */
@media (max-width: 980px) {
  .hero-grid, .pain-grid, .rag-split, .fin-split, .omni-split, .roi-panel, .about-grid, .contact-grid {
    grid-template-columns: 1fr;
  }
  .workbench-tabs {
    grid-template-columns: repeat(2, 1fr);
  }
  .nav-links {
    display: none;
  }
  .mobile-menu-btn {
    display: inline-flex;
  }
  .hero-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .workbench-tabs, .form-row-2, .stack-grid {
    grid-template-columns: 1fr;
  }
  .btn-primary-sm {
    display: none;
  }
  .btn-cmd span:first-child {
    display: none;
  }
  .container {
    padding: 0 1rem;
  }
}
