/* 
   Aegis OS Showcase Landing Page Stylesheet
   Vanilla CSS - Premium Dark Mode / Glassmorphism Design
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@400;500;600;700;800&family=Fira+Code:wght@400;500&display=swap');

:root {
  /* Color Palette */
  --bg-deep: hsl(230, 25%, 5%);
  --bg-dark: hsl(230, 20%, 9%);
  --bg-card: rgba(20, 20, 35, 0.55);
  --border-glow: rgba(138, 43, 226, 0.15);
  
  --accent-purple: hsl(270, 85%, 60%);
  --accent-cyan: hsl(190, 90%, 50%);
  --accent-pink: hsl(340, 85%, 60%);
  
  --text-primary: hsl(210, 25%, 98%);
  --text-secondary: hsl(215, 15%, 75%);
  --text-muted: hsl(215, 10%, 55%);
  
  --success: hsl(145, 80%, 45%);
  
  /* Fonts */
  --font-headings: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'Fira Code', monospace;
  
  /* Layout */
  --max-width: 1200px;
  --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base resets & scrollbar */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-purple);
}

body {
  background-color: var(--bg-deep);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(236, 72, 153, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.03) 0%, transparent 50%);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Header & Navbar */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(20, 20, 35, 0.4);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.25rem 2rem;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  font-family: var(--font-headings);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--text-primary);
}

.logo-icon {
  width: 2.25rem;
  height: 2.25rem;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-deep);
  font-weight: 800;
  box-shadow: 0 0 15px rgba(138, 43, 226, 0.4);
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

nav a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition-smooth);
}

nav a:hover {
  color: var(--accent-cyan);
}

.btn-github {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.5rem 1rem;
  border-radius: 99px;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.btn-github:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-purple);
  box-shadow: 0 0 15px var(--border-glow);
}

/* Hero Section */
.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 6rem 2rem 4rem 2rem;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: center;
}

.hero-content h1 {
  font-family: var(--font-headings);
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--text-primary) 30%, hsl(215, 25%, 85%) 60%, var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}

.hero-content p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 580px;
}

.hero-ctas {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, var(--accent-purple), hsl(270, 75%, 50%));
  color: white;
  font-family: var(--font-headings);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.85rem 1.75rem;
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(138, 43, 226, 0.35);
  transition: var(--transition-smooth);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(138, 43, 226, 0.5);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  font-family: var(--font-headings);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.85rem 1.75rem;
  border-radius: 12px;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Glassmorphism Product Mockups */
.hero-visual {
  position: relative;
}

.mock-window {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
  width: 100%;
}

.mock-header {
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mock-dots {
  display: flex;
  gap: 0.5rem;
}

.mock-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
}
.dot-red { background-color: hsl(0, 80%, 60%); }
.dot-yellow { background-color: hsl(40, 80%, 60%); }
.dot-green { background-color: hsl(120, 70%, 55%); }

.mock-title {
  font-family: var(--font-headings);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.mock-body {
  padding: 1.5rem;
  min-height: 320px;
}

/* Philosophy Section */
.philosophy {
  max-width: var(--max-width);
  margin: 6rem auto;
  padding: 0 2rem;
}

.section-tag {
  color: var(--accent-cyan);
  font-family: var(--font-headings);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  margin-bottom: 0.75rem;
  display: block;
}

.section-title {
  font-family: var(--font-headings);
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 3rem;
  background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.philosophy-card {
  background: rgba(20, 20, 35, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  padding: 2.25rem;
  transition: var(--transition-smooth);
}

.philosophy-card:hover {
  transform: translateY(-5px);
  background: rgba(20, 20, 35, 0.5);
  border-color: rgba(138, 43, 226, 0.2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.card-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 12px;
  background: rgba(138, 43, 226, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--accent-purple);
  font-size: 1.5rem;
}

.philosophy-card:nth-child(2) .card-icon {
  background: rgba(6, 182, 212, 0.1);
  color: var(--accent-cyan);
}

.philosophy-card:nth-child(3) .card-icon {
  background: rgba(236, 72, 153, 0.1);
  color: var(--accent-pink);
}

.philosophy-card h3 {
  font-family: var(--font-headings);
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.philosophy-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Interactive Demo Showcase */
.interactive-demo {
  max-width: var(--max-width);
  margin: 6rem auto;
  padding: 0 2rem;
}

.demo-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: stretch;
}

.demo-controls {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.demo-controls p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

.demo-buttons {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.demo-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 1.25rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: var(--transition-smooth);
}

.demo-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.demo-btn.active {
  background: rgba(138, 43, 226, 0.06);
  border-color: var(--accent-purple);
  box-shadow: 0 0 20px rgba(138, 43, 226, 0.1);
}

.demo-btn-number {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-headings);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--accent-cyan);
}

.demo-btn.active .demo-btn-number {
  background: var(--accent-purple);
  color: white;
}

.demo-btn-text h4 {
  font-family: var(--font-headings);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.demo-btn-text p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Chat & Board Mockup Layouts */
.demo-window {
  min-height: 480px;
  display: flex;
  flex-direction: column;
}

.demo-interface-split {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

/* Chat view inside mock */
.chat-container {
  display: flex;
  flex-direction: column;
  flex: 1.2;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 1.25rem;
  gap: 1rem;
  overflow-y: auto;
  font-size: 0.9rem;
}

.message {
  display: flex;
  gap: 0.75rem;
  max-width: 85%;
}

.message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.avatar {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--accent-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.75rem;
  color: white;
}

.message.user .avatar {
  background: var(--accent-cyan);
  color: var(--bg-deep);
}

.bubble {
  background: rgba(255, 255, 255, 0.03);
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.message.user .bubble {
  background: rgba(6, 182, 212, 0.1);
  border-color: rgba(6, 182, 212, 0.15);
}

.agent-logs-inline {
  background: rgba(0, 0, 0, 0.25);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border-left: 2px solid var(--accent-purple);
  margin-top: 0.5rem;
  color: var(--text-muted);
}

/* Kanban / Expense board inside mock */
.board-container {
  flex: 1;
  background: rgba(0, 0, 0, 0.1);
  padding: 1.25rem;
  display: flex;
  gap: 1rem;
  overflow-x: auto;
}

.board-column {
  flex: 1;
  min-width: 140px;
  background: rgba(255, 255, 255, 0.01);
  border-radius: 8px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.column-title {
  font-family: var(--font-headings);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  display: flex;
  justify-content: space-between;
}

.board-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  animation: cardFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.card-tag {
  align-self: flex-start;
  font-size: 0.65rem;
  font-weight: 500;
  padding: 1px 4px;
  border-radius: 3px;
  text-transform: uppercase;
}

.tag-kernel { background: rgba(138, 43, 226, 0.15); color: var(--accent-purple); }
.tag-finances { background: rgba(236, 72, 153, 0.15); color: var(--accent-pink); }
.tag-ops { background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan); }


/* Features Section */
.features-section {
  max-width: var(--max-width);
  margin: 6rem auto;
  padding: 0 2rem;
}

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

.feature-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, transparent 60%);
  z-index: 0;
  pointer-events: none;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(6, 182, 212, 0.25);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  background: rgba(20, 20, 35, 0.65);
}

.feature-card:hover::before {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.05) 0%, transparent 50%);
}

.feature-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  z-index: 1;
}

.feature-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: bold;
}

.cmr-icon { background: rgba(138, 43, 226, 0.1); color: var(--accent-purple); }
.siren-icon { background: rgba(6, 182, 212, 0.1); color: var(--accent-cyan); }
.citadel-icon { background: rgba(236, 72, 153, 0.1); color: var(--accent-pink); }
.continuity-icon { background: rgba(99, 102, 241, 0.1); color: hsl(230, 80%, 65%); }
.kanban-icon { background: rgba(234, 179, 8, 0.1); color: hsl(45, 90%, 55%); }
.maker-icon { background: rgba(34, 197, 94, 0.1); color: var(--success); }

.feature-card h3 {
  font-family: var(--font-headings);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

.feature-tech {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: lowercase;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 0.75rem;
  display: block;
  position: relative;
  z-index: 1;
}

@media (max-width: 968px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}

/* Installation / Instructions */
.install-section {
  max-width: var(--max-width);
  margin: 6rem auto;
  padding: 0 2rem;
}

.install-wrapper {
  background: linear-gradient(135deg, rgba(20, 20, 35, 0.4), rgba(10, 10, 20, 0.4));
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.install-info h3 {
  font-family: var(--font-headings);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.install-info p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.tabs {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.tab-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 0.5rem 1rem;
  color: var(--text-secondary);
  font-family: var(--font-headings);
  font-weight: 500;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.tab-btn.active {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

.terminal-box {
  background: hsl(230, 25%, 3%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  position: relative;
}

.terminal-line {
  color: var(--accent-cyan);
  margin-bottom: 0.5rem;
  white-space: pre-wrap;
}

.terminal-line.cmd {
  color: var(--text-primary);
}

.btn-copy {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition-smooth);
}

.btn-copy:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

/* Sub-agents visualization wrapper */
.sub-agents-network {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  background: rgba(0, 0, 0, 0.2);
  padding: 1.25rem;
  border-radius: 8px;
}

.agent-node {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  text-align: center;
  font-size: 0.75rem;
}

.agent-node.master {
  border-color: var(--accent-purple);
  background: rgba(138, 43, 226, 0.08);
  box-shadow: 0 0 10px rgba(138, 43, 226, 0.2);
}

.agent-connector {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-cyan));
  position: relative;
  min-width: 40px;
}

.agent-connector::after {
  content: '';
  position: absolute;
  top: -3px;
  right: 0;
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid var(--accent-cyan);
}

/* Footer */
footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 4rem 2rem 3rem 2rem;
  background: hsl(230, 25%, 3%);
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-left p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition-smooth);
}

.footer-links a:hover {
  color: var(--accent-cyan);
}

/* Responsiveness */
@media (max-width: 968px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 4rem;
  }
  .hero-content h1 {
    font-size: 2.75rem;
  }
  .hero-content p {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-ctas {
    justify-content: center;
  }
  .philosophy-grid {
    grid-template-columns: 1fr;
  }
  .demo-container {
    grid-template-columns: 1fr;
  }
  .install-wrapper {
    grid-template-columns: 1fr;
    padding: 2.5rem;
  }
}
