/* ==========================================================================
   ZIAD TAHA - PRINCIPAL EDGE & DISTRIBUTED SYSTEMS ARCHITECT
   Design System: Obsidian Slate / High-Density Technical Craft
   ========================================================================== */

:root {
  --bg-primary: #07090e;
  --bg-secondary: #0d1117;
  --bg-card: #111622;
  --bg-card-hover: #161d2d;
  --bg-glass: rgba(17, 22, 34, 0.75);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(0, 242, 254, 0.4);
  --border-emerald: rgba(16, 185, 129, 0.3);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --cyan-bright: #00f2fe;
  --cyan-glow: rgba(0, 242, 254, 0.15);
  --emerald-bright: #10b981;
  --amber-bright: #f59e0b;
  --rose-bright: #f43f5e;
  --purple-bright: #a855f7;
  
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 25px -5px rgba(0, 242, 254, 0.2);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-primary);
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ==========================================================================
   NAVIGATION
   ========================================================================== */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(7, 9, 14, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 1000;
  transition: all 0.25s ease;
}

.nav-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #07090e;
  font-size: 1rem;
  letter-spacing: -0.5px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.3px;
  color: #fff;
}

.brand-role {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--cyan-bright);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.2s ease;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--cyan-bright);
  border-radius: 2px;
}

.edge-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid var(--border-emerald);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #34d399;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--emerald-bright);
  border-radius: 50%;
  animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.15); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: transparent;
  border: none;
}

.hamburger .bar {
  width: 24px;
  height: 2px;
  background: #fff;
  transition: all 0.3s ease;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.hero {
  padding: 140px 0 80px 0;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 50% 10%, rgba(0, 242, 254, 0.08) 0%, transparent 60%);
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: rgba(13, 17, 23, 0.8);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--cyan-bright);
  margin-bottom: 24px;
}

.hero-title {
  font-size: 3.4rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
  max-width: 980px;
  background: linear-gradient(180deg, #ffffff 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 820px;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 60px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  color: #07090e;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 10px 25px -5px rgba(0, 242, 254, 0.3);
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px -5px rgba(0, 242, 254, 0.45);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: #fff;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  border: 1px solid var(--border-subtle);
  transition: all 0.25s ease;
  cursor: pointer;
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.metrics-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.metric-item {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-subtle);
  padding: 0 12px;
}

.metric-item:last-child {
  border-right: none;
}

.metric-number {
  font-family: var(--font-mono);
  font-size: 1.85rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}

.metric-number.cyan { color: var(--cyan-bright); }
.metric-number.emerald { color: var(--emerald-bright); }
.metric-number.amber { color: var(--amber-bright); }

.metric-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
  font-weight: 600;
}

/* ==========================================================================
   SECTION HEADERS
   ========================================================================== */

.section-head {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 50px auto;
}

.section-pill {
  display: inline-block;
  padding: 4px 14px;
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.2);
  color: var(--cyan-bright);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -1px;
  color: #fff;
  margin-bottom: 12px;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ==========================================================================
   BENTO GRID (8 DOMAIN ENGINES)
   ========================================================================== */

.engines-section {
  padding: 90px 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

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

.bento-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.bento-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  transition: background 0.3s ease;
}

.bento-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.8);
}

.bento-card.col-6 { grid-column: span 6; }
.bento-card.col-4 { grid-column: span 4; }
.bento-card.col-8 { grid-column: span 8; }
.bento-card.col-12 { grid-column: span 12; }

.bento-card:hover::before {
  background: linear-gradient(90deg, var(--cyan-bright), var(--emerald-bright));
}

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

.card-category {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--cyan-bright);
}

.card-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: #34d399;
  background: rgba(16, 185, 129, 0.1);
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.card-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.card-body-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 20px;
}

.card-invariants {
  background: rgba(7, 9, 14, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 20px;
  font-size: 0.82rem;
}

.invariant-label {
  font-family: var(--font-mono);
  color: var(--text-dim);
  font-size: 0.7rem;
  text-transform: uppercase;
  margin-bottom: 4px;
  display: block;
}

.invariant-val {
  color: #e2e8f0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  word-break: break-word;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.card-metric {
  display: flex;
  flex-direction: column;
}

.metric-val {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.metric-sub {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  background: rgba(0, 242, 254, 0.08);
  color: var(--cyan-bright);
  border: 1px solid rgba(0, 242, 254, 0.2);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.card-link:hover {
  background: var(--cyan-bright);
  color: #07090e;
}

/* ==========================================================================
   DUAL-LENS CONSOLE
   ========================================================================== */

#ddd-console {
  padding: 90px 0;
  background: var(--bg-primary);
  position: relative;
}

.lens-toggle-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
}

#dual-lens-toggle {
  display: inline-flex;
  background: var(--bg-secondary);
  padding: 6px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
}

.lens-btn {
  padding: 10px 24px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.lens-btn.active-commercial {
  background: #0284c7;
  color: #fff;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
}

.lens-btn.active-engineering {
  background: #dc2626;
  color: #fff;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.4);
}

/* Commercial View */
.sla-banner {
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.6) 0%, rgba(13, 17, 23, 0.9) 100%);
  border: 1px solid var(--emerald-bright);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  box-shadow: var(--shadow-card);
}

.sla-badge {
  display: inline-block;
  background: #25D366;
  color: #020617;
  font-weight: 800;
  font-size: 0.72rem;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.sla-title {
  color: #fff;
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.sla-desc {
  color: #cbd5e1;
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 680px;
}

.btn-whatsapp-sla {
  background: #25D366;
  color: #020617;
  font-weight: 800;
  font-size: 0.92rem;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 20px rgba(37, 211, 102, 0.25);
  transition: all 0.2s ease;
}

.btn-whatsapp-sla:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(37, 211, 102, 0.4);
}

/* Engineering Terminal */
.terminal-window {
  background: #020617;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  max-width: 1040px;
  margin: 0 auto;
}

.terminal-header {
  background: #0b1120;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.terminal-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.terminal-dot.red { background: #ef4444; }
.terminal-dot.yellow { background: #f59e0b; }
.terminal-dot.green { background: #10b981; }

.terminal-meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-left: 10px;
}

.terminal-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 10px;
  border-radius: var(--radius-sm);
  font-weight: 700;
}

.terminal-body {
  padding: 24px;
}

.terminal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.btn-term {
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-term-danger {
  background: #dc2626;
  color: #fff;
}
.btn-term-danger:hover {
  background: #ef4444;
}

.btn-term-primary {
  background: #0284c7;
  color: #fff;
}
.btn-term-primary:hover {
  background: #0ea5e9;
}

.btn-term-success {
  background: #059669;
  color: #fff;
}
.btn-term-success:hover {
  background: #10b981;
}

.btn-term-purple {
  background: #7c3aed;
  color: #fff;
}
.btn-term-purple:hover {
  background: #8b5cf6;
}

.terminal-screen {
  background: #010409;
  color: var(--cyan-bright);
  padding: 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--border-subtle);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ==========================================================================
   ARCHITECTURE SECTION
   ========================================================================== */

.arch-section {
  padding: 90px 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.arch-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.arch-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.arch-num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--cyan-bright);
  margin-bottom: 12px;
}

.arch-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.arch-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ==========================================================================
   ONBOARDING & FOOTER
   ========================================================================== */

.onboarding-section {
  padding: 90px 0;
  background: radial-gradient(circle at 50% 90%, rgba(16, 185, 129, 0.08) 0%, transparent 60%);
  text-align: center;
}

.onboarding-box {
  max-width: 860px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-emerald);
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: var(--shadow-card);
}

.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-primary);
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer a:hover {
  color: #fff;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 1024px) {
  .hero-title { font-size: 2.8rem; }
  .metrics-bar { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .metric-item:nth-child(2) { border-right: none; }
  .bento-card.col-6, .bento-card.col-4, .bento-card.col-8 { grid-column: span 12; }
  .arch-grid { grid-template-columns: repeat(2, 1fr); }
  .sla-banner { flex-direction: column; text-align: center; }
}

@media (max-width: 768px) {
  .nav-menu { display: none; }
  .hamburger { display: flex; }
  .hero-title { font-size: 2.1rem; }
  .hero-subtitle { font-size: 1rem; }
  .metrics-bar { grid-template-columns: 1fr; }
  .metric-item { border-right: none; border-bottom: 1px solid var(--border-subtle); padding-bottom: 12px; margin-bottom: 12px; }
  .metric-item:last-child { border-bottom: none; }
  .arch-grid { grid-template-columns: 1fr; }
  .onboarding-box { padding: 24px; }
}
