/* ═══════════════════════════════════════════════════════════
   Intelligent Platform Orchestration — Design System
   ═══════════════════════════════════════════════════════════ */

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

:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-tertiary: #141e30;
  --bg-card: #111827;
  --border: #1e2a3a;
  --border-hover: #334155;

  --text-primary: #ffffff;
  --text-secondary: #e0e0e0;
  --text-muted: #888888;
  --text-dim: #555555;
  --text-faint: #333333;

  --strategy: #3b82f6;
  --strategy-dark: #172554;
  --strategy-light: #60a5fa;

  --execution: #4ade80;
  --execution-dark: #14532d;
  --execution-light: #4ade80;

  --insights: #fb923c;
  --insights-dark: #431407;
  --insights-light: #fb923c;

  --implementation: #a78bfa;
  --implementation-dark: #1e1b4b;
  --implementation-light: #a78bfa;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-secondary);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--strategy-light); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--strategy); }

/* ── Navigation ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  padding: 16px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  background: rgba(10, 14, 23, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}
.nav-brand span { color: var(--strategy-light); }

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s;
  padding: 6px 0;
}
.nav-links a:hover,
.nav-links a.active { color: var(--text-primary); }

.nav-login {
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.nav-login:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

/* ── Page Container ── */
.page {
  padding-top: 80px;
  min-height: 100vh;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 48px;
}

/* ── Section ── */
.section {
  padding: 80px 0;
}
.section-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--strategy-light);
  margin-bottom: 12px;
}
.section-title {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}
.section-desc {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 720px;
  line-height: 1.7;
}

/* ── Layer Badge ── */
.layer-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.layer-badge.strategy { background: var(--strategy-dark); color: var(--strategy-light); }
.layer-badge.execution { background: var(--execution-dark); color: var(--execution-light); }
.layer-badge.insights { background: var(--insights-dark); color: var(--insights-light); }
.layer-badge.implementation { background: var(--implementation-dark); color: var(--implementation-light); }

/* ── Adobe Badge ── */
.adobe-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  background: #1e1b4b;
  color: #a78bfa;
}

/* ── Agent Card ── */
.agent-card {
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.agent-card:hover {
  background: var(--bg-tertiary);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.agent-card.strategy:hover { border-color: var(--strategy); }
.agent-card.execution:hover { border-color: var(--execution); }
.agent-card.insights:hover { border-color: var(--insights); }
.agent-card.implementation:hover { border-color: var(--implementation); }

.agent-card .card-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
}
.agent-card .card-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}
.agent-card .card-badges {
  display: flex;
  gap: 8px;
  margin-top: auto;
  flex-wrap: wrap;
}

/* ── Stat Box ── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.stat-box {
  padding: 28px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  text-align: center;
}
.stat-box .stat-number {
  font-size: 42px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 8px;
}
.stat-box .stat-label {
  font-size: 14px;
  color: var(--text-muted);
}

/* ── Filter Tabs ── */
.filter-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 32px;
}
.filter-tab {
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: none;
  transition: all 0.15s;
}
.filter-tab:hover { color: var(--text-secondary); }
.filter-tab.active { background: var(--bg-tertiary); color: var(--text-primary); }

/* ── Agent Grid ── */
.agents-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* ── Detail Section ── */
.detail-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 40px;
}
.detail-header .dh-info { flex: 1; }
.detail-header .dh-name {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 8px;
}
.detail-header .dh-desc {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-top: 12px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.detail-section {
  margin-bottom: 36px;
}
.detail-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.capability-list {
  list-style: none;
}
.capability-list li {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.8;
  padding-left: 20px;
  position: relative;
  margin-bottom: 8px;
}
.capability-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
}
.capability-list li.strategy::before { background: var(--strategy); }
.capability-list li.execution::before { background: var(--execution); }
.capability-list li.insights::before { background: var(--insights); }
.capability-list li.implementation::before { background: var(--implementation); }

.connection-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.connection-card {
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.15s;
}
.connection-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-tertiary);
}
.connection-card .cc-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}
.connection-card .cc-arrow {
  color: var(--text-dim);
  font-size: 18px;
}

.io-box {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  margin-bottom: 12px;
}
.io-box .io-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.io-box .io-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.io-box .io-item {
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}

/* ── Architecture Diagram ── */
.arch-container {
  position: relative;
  padding: 40px;
}

.arch-layer {
  margin-bottom: 24px;
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-secondary);
}
.arch-layer-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.arch-layer-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.arch-layer-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.arch-nodes {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.arch-node {
  padding: 14px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-primary);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  min-width: 160px;
}
.arch-node:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.3);
}
.arch-node.strategy:hover { border-color: var(--strategy); }
.arch-node.execution:hover { border-color: var(--execution); }
.arch-node.insights:hover { border-color: var(--insights); }
.arch-node.implementation:hover { border-color: var(--implementation); }

.arch-node .node-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.arch-node .node-adobe {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* ── Architecture Popup ── */
.arch-popup {
  display: none;
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 200;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 480px;
  width: 90%;
  animation: popIn 0.15s ease;
}
.arch-popup.visible { display: block; }
.arch-popup-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 199;
}
.arch-popup-overlay.visible { display: block; }

@keyframes popIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.95); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.arch-popup .popup-close {
  position: absolute;
  top: 14px; right: 14px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  width: 30px; height: 30px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.arch-popup .popup-close:hover { border-color: var(--border-hover); color: var(--text-primary); }

.arch-popup .popup-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.arch-popup .popup-desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 16px;
}
.arch-popup .popup-link {
  display: inline-block;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  background: var(--strategy);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s;
}
.arch-popup .popup-link:hover { background: var(--strategy-light); color: #fff; }

/* ── Connection Lines (SVG) ── */
.arch-svg {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
.arch-svg line {
  stroke: var(--border);
  stroke-width: 1;
  stroke-dasharray: 4 4;
}

/* ── Simulation ── */
.sim-layout {
  display: grid;
  grid-template-columns: 260px 1fr 320px;
  gap: 24px;
  min-height: 600px;
}

.sim-timeline {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
  padding: 20px;
  overflow-y: auto;
}
.sim-timeline-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.sim-step {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  margin-bottom: 6px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sim-step:hover { background: var(--bg-tertiary); }
.sim-step.active {
  border-color: var(--strategy);
  background: var(--bg-tertiary);
}
.sim-step.completed {
  opacity: 0.6;
}
.sim-step .step-num {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
}
.sim-step.active .step-num {
  background: var(--strategy);
  border-color: var(--strategy);
  color: #fff;
}
.sim-step.completed .step-num {
  background: var(--execution-dark);
  border-color: var(--execution);
  color: var(--execution);
}
.sim-step .step-name {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.3;
}
.sim-step.active .step-name { color: var(--text-primary); }

.sim-center {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
  padding: 32px;
  display: flex;
  flex-direction: column;
}
.sim-agent-name {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.sim-agent-action {
  font-size: 16px;
  color: var(--strategy-light);
  margin-bottom: 16px;
}
.sim-agent-detail {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.8;
  flex: 1;
}

.sim-data {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.sim-data-section {
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  border: 1px solid var(--border);
}
.sim-data-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.sim-data-label.input { color: var(--insights-light); }
.sim-data-label.output { color: var(--execution-light); }
.sim-data-text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.sim-controls {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}
.sim-btn {
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.sim-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}
.sim-btn.primary {
  background: var(--strategy);
  border-color: var(--strategy);
  color: #fff;
}
.sim-btn.primary:hover {
  background: var(--strategy-light);
}

.scenario-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}
.scenario-tab {
  padding: 12px 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  flex: 1;
  text-align: center;
}
.scenario-tab:hover { border-color: var(--border-hover); color: var(--text-secondary); }
.scenario-tab.active {
  border-color: var(--strategy);
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

/* ── Mini Architecture in Simulation ── */
.sim-mini-arch {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.sim-mini-arch .mini-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.mini-nodes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.mini-node {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  color: var(--text-dim);
  transition: all 0.15s;
}
.mini-node.active {
  color: var(--text-primary);
}
.mini-node.active.strategy { border-color: var(--strategy); background: var(--strategy-dark); color: var(--strategy-light); }
.mini-node.active.execution { border-color: var(--execution); background: var(--execution-dark); color: var(--execution-light); }
.mini-node.active.insights { border-color: var(--insights); background: var(--insights-dark); color: var(--insights-light); }
.mini-node.active.implementation { border-color: var(--implementation); background: var(--implementation-dark); color: var(--implementation-light); }

/* ── Hero ── */
.hero {
  padding: 100px 0 60px;
  text-align: center;
}
.hero-title {
  font-size: 52px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -1px;
  line-height: 1.15;
  margin-bottom: 20px;
}
.hero-title span { color: var(--strategy-light); }
.hero-desc {
  font-size: 20px;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 40px;
  line-height: 1.6;
}
.hero-cta {
  display: inline-block;
  padding: 14px 36px;
  border-radius: var(--radius-sm);
  background: var(--strategy);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  transition: background 0.15s;
}
.hero-cta:hover { background: var(--strategy-light); color: #fff; }

/* ── Layer Visual ── */
.layer-visual {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 60px auto;
  max-width: 800px;
}
.layer-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  transition: all 0.2s;
}
.layer-row:hover {
  background: var(--bg-tertiary);
}
.layer-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.layer-row .lr-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}
.layer-row .lr-count {
  font-size: 14px;
  color: var(--text-muted);
}
.layer-row .lr-arrow {
  font-size: 20px;
  color: var(--text-dim);
}

/* ── Use Case Cards ── */
.usecase-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 40px;
}
.usecase-card {
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-secondary);
}
.usecase-card .uc-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--strategy-light);
  margin-bottom: 8px;
}
.usecase-card .uc-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
}
.usecase-card .uc-desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Flow Diagram ── */
.flow-diagram-container {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 32px;
  overflow-x: auto;
}
.flow-diagram-container .mermaid {
  display: flex;
  justify-content: center;
}
.flow-diagram-container .mermaid svg {
  max-width: 100%;
  height: auto;
}

.flow-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 20px 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}
.flow-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}
.flow-legend-swatch {
  width: 32px;
  height: 4px;
  border-radius: 2px;
}
.flow-legend-swatch.thick {
  height: 6px;
}
.flow-legend-icon {
  font-size: 16px;
  line-height: 1;
}

.flow-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.flow-stat {
  padding: 16px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-align: center;
}
.flow-stat-number {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
}
.flow-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .sim-layout { grid-template-columns: 1fr; }
  .agents-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .usecase-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .nav { padding: 12px 20px; }
  .agents-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 32px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}
