/* CSS VARIABLES & RESET */
:root {
  --bg-dark: #090d1a;
  --bg-card: #111827;
  --bg-card-hover: #1f2937;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-hover: rgba(129, 140, 248, 0.4);
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --accent-primary: #818cf8; /* Light Indigo */
  --accent-secondary: #4f46e5; /* Deep Indigo */
  --accent-green: #34d399; /* Emerald */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'SFMono-Regular', Consolas, Menlo, monospace;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-sans);
  overflow-x: hidden;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* BACKGROUND GLOW ORBS */
.glow-orb {
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(140px);
  z-index: -1;
  opacity: 0.15;
  pointer-events: none;
}
.glow-1 {
  background: radial-gradient(circle, var(--accent-primary) 0%, transparent 70%);
  top: -100px;
  left: -100px;
}
.glow-2 {
  background: radial-gradient(circle, var(--accent-secondary) 0%, transparent 70%);
  bottom: -150px;
  right: -100px;
}

/* NAVIGATION NAVBAR */
.navbar {
  background: rgba(9, 13, 26, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1000;
  transition: all 0.3s;
}

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

.nav-logo {
  font-size: 19px;
  font-weight: 800;
  text-decoration: none;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.5px;
}
.logo-icon {
  font-size: 21px;
  filter: drop-shadow(0 0 6px rgba(129, 140, 248, 0.6));
}
.logo-dot {
  color: var(--accent-primary);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-item {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.2s ease-in-out;
}
.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}
.nav-item.active {
  color: #fff;
  background: rgba(129, 140, 248, 0.12);
  border: 1px solid rgba(129, 140, 248, 0.2);
}

.nav-btn {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #fff !important;
  font-weight: 700 !important;
  padding: 8px 16px !important;
  box-shadow: 0 4px 12px rgba(129, 140, 248, 0.3);
}
.nav-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(129, 140, 248, 0.5);
}

/* MOBILE TOGGLE */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
}
.menu-toggle span {
  width: 20px;
  height: 2px;
  background-color: #fff;
  border-radius: 1px;
  transition: all 0.3s;
}

/* MAIN CONTENT WORKSPACE */
.main-content {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 24px;
}

/* VIEW SWITCHING MECHANISM */
.view-section {
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.view-section.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* VIEW 1: LANDING HERO */
.hero-section {
  text-align: center;
  padding: 60px 0 40px 0;
  max-width: 800px;
  margin: 0 auto;
}

.badge-pill {
  display: inline-block;
  background: rgba(129, 140, 248, 0.12);
  border: 1px solid rgba(129, 140, 248, 0.3);
  color: var(--accent-primary);
  font-size: 10px;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 100px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 24px;
  animation: pulse-border 2s infinite;
}

.hero-title {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #fff 40%, var(--accent-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  margin-bottom: 36px;
  line-height: 1.6;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 14.5px;
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #fff;
  box-shadow: 0 4px 14px rgba(129, 140, 248, 0.3);
}
.btn-primary:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 6px 20px rgba(129, 140, 248, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(129, 140, 248, 0.3);
  transform: translateY(-1.5px);
}

/* FEATURES GRID */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 60px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 32px 24px;
  transition: all 0.3s;
}
.feature-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-color-hover);
  box-shadow: 0 8px 30px rgba(129, 140, 248, 0.08);
}
.feature-icon {
  font-size: 28px;
  margin-bottom: 20px;
}
.feature-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #fff;
}
.feature-card p {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* SECTION HEADER MODULES */
.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 40px auto;
}
.section-header h2 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #fff, #9ca3af);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.section-header p {
  color: var(--text-secondary);
  font-size: 14.5px;
}

/* VIEW 2: AI CHATBOT SIMULATOR */
.chatbot-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  height: 480px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.chat-header {
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
}
.chat-mode {
  font-size: 11px;
  background: rgba(129, 140, 248, 0.15);
  color: var(--accent-primary);
  padding: 2px 8px;
  border-radius: 100px;
  font-weight: 700;
}

.chat-box {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: rgba(9, 13, 26, 0.3);
}

.msg {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.55;
}
.bot-msg {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-top-left-radius: 4px;
  color: #fff;
}
.user-msg {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #fff;
  border-top-right-radius: 4px;
  box-shadow: 0 4px 10px rgba(129, 140, 248, 0.2);
}

.chat-footer-form {
  border-top: 1px solid var(--border-color);
  padding: 12px 16px;
  display: flex;
  gap: 10px;
  background: rgba(255, 255, 255, 0.01);
}
.chat-footer-form input {
  flex: 1;
  background: #090d1a;
  border: 1px solid var(--border-color);
  color: #fff;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
  outline: none;
  font-family: var(--font-sans);
  transition: border-color 0.2s;
}
.chat-footer-form input:focus {
  border-color: var(--accent-primary);
}
.chat-footer-form button {
  background: var(--accent-secondary);
  color: #fff;
  border: none;
  font-size: 12.5px;
  font-weight: 700;
  padding: 0 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}
.chat-footer-form button:hover {
  background: var(--accent-primary);
}

/* VIEW 3: SYSTEM TOPOLOGY MAP */
.canvas-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  width: 100%;
  height: 500px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

#topology-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.canvas-legend {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: rgba(9, 13, 26, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  padding: 12px 16px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 10;
}
.legend-item {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.legend-color {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* VIEW 4: ABOUT GRID & LISTS */
.about-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 36px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.about-card h3 {
  font-size: 21px;
  font-weight: 800;
  margin-bottom: 24px;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 12px;
}

.dev-pitch {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.about-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.about-list li {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.55;
  position: relative;
  padding-left: 20px;
}
.about-list li::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: var(--accent-primary);
  font-weight: bold;
}

/* CORE LEGAL FOOTER */
.footer-hub {
  border-top: 1px solid var(--border-color);
  background: rgba(9, 13, 26, 0.9);
  padding: 24px;
  width: 100%;
  margin-top: auto;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-hub p {
  font-size: 12px;
  color: var(--text-muted);
}
.footer-links {
  display: flex;
  gap: 20px;
}
.footer-link {
  color: var(--text-muted);
  font-size: 12px;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}
.footer-link:hover {
  color: var(--accent-primary);
}

/* KEYFRAMES & ANIMATIONS */
@keyframes pulse-border {
  0% {
    box-shadow: 0 0 0 0 rgba(129, 140, 248, 0.4);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(129, 140, 248, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(129, 140, 248, 0);
  }
}

/* RESPONSIVE LAYOUTS */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 8px 0;
  }
  .menu-toggle {
    display: flex;
  }
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--bg-dark);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    padding: 20px;
    gap: 16px;
  }
  .nav-menu.active {
    display: flex;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .hero-title {
    font-size: 34px;
  }
  .hero-subtitle {
    font-size: 15px;
  }
  .footer-container {
    flex-direction: column;
    text-align: center;
  }
}
