/* =============================================
   Family Office — Command Center
   Design by Kel'Thuzad
   ============================================= */

:root {
  --bg: oklch(0.08 0.005 285);
  --bg-alt: oklch(0.105 0.005 285);
  --surface: oklch(0.13 0.006 285);
  --surface-2: oklch(0.17 0.006 285);
  --border: oklch(0.22 0.005 285);
  --border-light: oklch(0.28 0.005 285);
  --text: oklch(0.93 0.005 285);
  --text-muted: oklch(0.55 0.005 285);
  --text-faint: oklch(0.38 0.005 285);
  --accent: oklch(0.62 0.20 285);
  --accent-2: oklch(0.75 0.18 285);
  --accent-glow: oklch(0.62 0.20 285 / 0.12);
  --accent-border: oklch(0.62 0.20 285 / 0.3);
  --green: oklch(0.65 0.18 145);
  --green-bg: oklch(0.65 0.18 145 / 0.08);
  --green-border: oklch(0.65 0.18 145 / 0.25);
  --yellow: oklch(0.78 0.14 82);
  --yellow-bg: oklch(0.78 0.14 82 / 0.08);
  --yellow-border: oklch(0.78 0.14 82 / 0.25);
  --red: oklch(0.62 0.20 27);
  --red-bg: oklch(0.62 0.20 27 / 0.08);
  --red-border: oklch(0.62 0.20 27 / 0.25);
  --radius: 0.75rem;
  --radius-sm: 0.5rem;
  --radius-full: 9999px;
  --font: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --transition: 150ms ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: var(--mono); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

/* ─── NAVBAR ─── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: oklch(0.08 0.005 285 / 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.navbar-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 56px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.brand-icon {
  width: 30px;
  height: 30px;
  background: var(--accent-glow);
  border: 1px solid var(--accent-border);
  border-radius: 0.4375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.brand-name {
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
}

.brand-sep { color: var(--text-faint); }

.brand-sub {
  color: var(--text-muted);
  font-size: 0.875rem;
}

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

.nav-link {
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition), background var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: var(--surface-2);
}

.live-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  background: var(--green-bg);
  border: 1px solid var(--green-border);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--green);
  flex-shrink: 0;
}

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

.live-dot.small {
  width: 5px;
  height: 5px;
}

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

/* ─── HERO ─── */
.hero {
  position: relative;
  padding: 6rem 0 5rem;
  overflow: hidden;
  text-align: center;
}

.hero-glow {
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, oklch(0.62 0.20 285 / 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.875rem;
  border-radius: var(--radius-full);
  background: var(--accent-glow);
  border: 1px solid var(--accent-border);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 3rem;
  line-height: 1.7;
}

.hero-stats {
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.stat {
  padding: 1rem 2rem;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  font-family: var(--mono);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.125rem;
}

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

/* ─── SECTIONS ─── */
.section {
  padding: 5rem 0;
}

.section.alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-tag {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.875rem;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 520px;
  margin: 0 auto;
}

/* ─── AGENTS GRID ─── */
.agents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.125rem;
}

.agent-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color var(--transition), transform 200ms, box-shadow 200ms;
  position: relative;
  overflow: hidden;
}

.agent-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-light), transparent);
}

.agent-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px oklch(0 0 0 / 0.3);
}

.agent-card.featured {
  border-color: var(--accent-border);
  background: linear-gradient(135deg, var(--surface) 0%, oklch(0.14 0.01 285) 100%);
}

.agent-card.featured::before {
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.agent-card.idle {
  opacity: 0.7;
}

.agent-card.idle:hover {
  opacity: 1;
}

.agent-header {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 0.875rem;
}

.agent-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9375rem;
  flex-shrink: 0;
}

.avatar-silvana { background: oklch(0.55 0.18 320 / 0.2); color: oklch(0.75 0.18 320); border: 1px solid oklch(0.55 0.18 320 / 0.35); }
.avatar-arthas  { background: oklch(0.55 0.12 220 / 0.2); color: oklch(0.75 0.12 220); border: 1px solid oklch(0.55 0.12 220 / 0.35); }
.avatar-kelthuzad { background: var(--accent-glow); color: var(--accent); border: 1px solid var(--accent-border); }
.avatar-thrall  { background: oklch(0.45 0.15 145 / 0.2); color: oklch(0.65 0.15 145); border: 1px solid oklch(0.45 0.15 145 / 0.35); }
.avatar-illidan { background: oklch(0.45 0.20 150 / 0.2); color: oklch(0.65 0.20 150); border: 1px solid oklch(0.45 0.20 150 / 0.35); }
.avatar-kaelthas { background: oklch(0.6 0.18 60 / 0.2); color: oklch(0.78 0.18 60); border: 1px solid oklch(0.6 0.18 60 / 0.35); }
.avatar-batrak  { background: oklch(0.45 0.1 30 / 0.2); color: oklch(0.65 0.1 30); border: 1px solid oklch(0.45 0.1 30 / 0.35); }

.agent-meta { flex: 1; }
.agent-name { font-weight: 600; font-size: 0.9375rem; }
.agent-role { font-size: 0.75rem; color: var(--text-muted); }

.status-badge {
  font-size: 0.6875rem;
  font-weight: 500;
  font-family: var(--mono);
  padding: 0.1875rem 0.5rem;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.status-badge.active {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid var(--green-border);
}

.status-badge.idle {
  background: oklch(0.22 0 0);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.agent-desc {
  font-size: 0.875rem;
  color: oklch(0.72 0.005 285);
  line-height: 1.65;
  margin-bottom: 1rem;
}

.agent-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 1rem;
}

.tag {
  font-size: 0.6875rem;
  padding: 0.1875rem 0.5625rem;
  border-radius: var(--radius-full);
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.agent-model {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.875rem;
  border-top: 1px solid var(--border);
}

.model-label {
  font-size: 0.6875rem;
  color: var(--text-faint);
}

.model-name {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

/* ─── ACTIVITY FEED ─── */
.activity-feed {
  max-width: 780px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.activity-item:last-child { border-bottom: none; }
.activity-item:hover { background: var(--surface-2); }

.activity-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.icon-design  { background: var(--accent-glow); color: var(--accent); border: 1px solid var(--accent-border); }
.icon-image   { background: oklch(0.55 0.18 320 / 0.12); color: oklch(0.75 0.18 320); border: 1px solid oklch(0.55 0.18 320 / 0.25); }
.icon-note    { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-border); }
.icon-edit    { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }
.icon-user    { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }
.icon-config  { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }

.activity-body { flex: 1; min-width: 0; }

.activity-title {
  font-size: 0.875rem;
  font-weight: 400;
  margin-bottom: 0.2rem;
}

.activity-sub {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.activity-time {
  font-size: 0.6875rem;
  color: var(--text-faint);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ─── TASKS ─── */
.tasks-list {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.task-item {
  display: flex;
  gap: 1.125rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: border-color var(--transition);
}

.task-item:hover { border-color: var(--border-light); }

.task-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}

.status-inprogress { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.status-waiting    { background: var(--yellow); }
.status-blocked    { background: var(--red); }
.status-done       { background: var(--border-light); }

.task-body { flex: 1; }

.task-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.task-title { font-weight: 600; font-size: 0.9375rem; }

.task-badge {
  font-size: 0.6875rem;
  font-weight: 500;
  padding: 0.1875rem 0.625rem;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.badge-purple { background: var(--accent-glow); color: var(--accent); border: 1px solid var(--accent-border); }
.badge-yellow { background: var(--yellow-bg); color: var(--yellow); border: 1px solid var(--yellow-border); }
.badge-red    { background: var(--red-bg); color: var(--red); border: 1px solid var(--red-border); }
.badge-green  { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-border); }

.task-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0.875rem;
}

.task-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.task-agents {
  display: flex;
  gap: 0.375rem;
}

.task-agent {
  font-size: 0.6875rem;
  padding: 0.1875rem 0.5rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-muted);
}

.task-priority {
  font-size: 0.6875rem;
  color: var(--text-faint);
  font-family: var(--mono);
}

.task-priority.high { color: var(--red); }
.task-priority.medium { color: var(--text-muted); }
.task-priority.low { color: var(--text-faint); }

/* ─── TECH GRID ─── */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.tech-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  text-align: center;
  transition: border-color var(--transition), transform 200ms;
}

.tech-card:hover {
  border-color: var(--border-light);
  transform: translateY(-3px);
}

.tech-icon {
  font-size: 2rem;
  margin-bottom: 0.875rem;
}

.tech-name {
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 0.5rem;
}

.tech-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ─── FOOTER ─── */
.footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
}

.footer-text {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer-status {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.6875rem;
  color: var(--text-faint);
}

/* ─── ANIMATIONS ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in { opacity: 0; }
.fade-in.visible { animation: fadeUp 0.5s ease-out forwards; }

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero { padding: 4rem 0 3rem; }
  .hero-stats { flex-direction: column; gap: 0; }
  .stat-divider { width: 100%; height: 1px; }
  .agents-grid { grid-template-columns: 1fr; }
  .tech-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-text { display: none; }
  .task-header { flex-direction: column; align-items: flex-start; }
}
