/* 
   Civil Master Agent — Premium Landing Page Design System
   Vanilla CSS Styling | HSL Tailored Hues | Responsive Grids
*/

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

:root {
  /* Color Tokens */
  --bg-primary: 222, 47%, 6%;       /* #0b0f19 */
  --bg-secondary: 222, 47%, 9%;     /* #0e1424 */
  --bg-tertiary: 222, 47%, 13%;     /* #141d34 */
  
  --accent-primary: 239, 84%, 67%;   /* #6366f1 Indigo */
  --accent-secondary: 172, 66%, 50%; /* #14b8a6 Teal */
  --accent-dark: 243, 75%, 59%;      /* #4f46e5 Deep Indigo */
  
  --text-primary: 210, 40%, 98%;     /* Cool white */
  --text-secondary: 215, 20%, 75%;   /* Muted gray-blue */
  --text-muted: 215, 15%, 55%;      /* Dimmed slate */
  
  --border-glow: 239, 84%, 67%, 0.15;
  --border-mute: 217, 30%, 20%, 0.5;
  
  /* Fonts */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  /* Layout Transitions */
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

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

body {
  overflow-x: hidden;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: hsl(var(--text-primary));
}

p {
  color: hsl(var(--text-secondary));
  font-weight: 400;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-smooth);
}

/* Glowing Background Lights */
.bg-glow-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-glow-one {
  position: absolute;
  top: -20%;
  left: 15%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(0,0,0,0) 70%);
  border-radius: 50%;
  filter: blur(80px);
  animation: pulse 12s infinite alternate;
}

.bg-glow-two {
  position: absolute;
  top: 30%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.12) 0%, rgba(0,0,0,0) 70%);
  border-radius: 50%;
  filter: blur(80px);
  animation: pulse 15s infinite alternate-reverse;
}

/* Header & Navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  backdrop-filter: blur(12px);
  background-color: hsla(var(--bg-primary), 0.7);
  border-bottom: 1px solid hsla(var(--text-primary), 0.05);
}

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

.logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #fff 30%, hsl(var(--accent-primary)) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-dot {
  width: 8px;
  height: 8px;
  background-color: hsl(var(--accent-secondary));
  border-radius: 50%;
  box-shadow: 0 0 10px hsl(var(--accent-secondary));
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2.5rem;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: hsl(var(--text-secondary));
}

.nav-links a:hover {
  color: hsl(var(--accent-secondary));
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-bounce);
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, hsl(var(--accent-dark)) 0%, hsl(var(--accent-primary)) 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
  background: hsla(var(--text-primary), 0.05);
  color: hsl(var(--text-primary));
  border: 1px solid hsla(var(--text-primary), 0.1);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: hsla(var(--text-primary), 0.1);
  transform: translateY(-2px);
}

/* Sections General */
section {
  position: relative;
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  z-index: 1;
}

.section-tag {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  background-color: hsla(var(--accent-primary), 0.1);
  border: 1px solid hsla(var(--accent-primary), 0.2);
  color: hsl(var(--accent-primary));
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
  font-family: var(--font-heading);
}

.section-title {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.section-subtitle {
  max-width: 600px;
  margin-bottom: 3.5rem;
  font-size: 1.1rem;
  color: hsl(var(--text-secondary));
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 8rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-content h1 {
  font-size: 3.8rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #ffffff 30%, #c7d2fe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 1rem;
}

/* Interactive Demo Simulation */
.demo-window {
  background-color: hsl(var(--bg-secondary));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 40px rgba(99, 102, 241, 0.05);
  display: flex;
  flex-direction: column;
  height: 480px;
}

.demo-header {
  background-color: hsl(var(--bg-tertiary));
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.demo-dots {
  display: flex;
  gap: 6px;
}

.demo-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

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

.demo-title {
  font-size: 0.8rem;
  font-family: var(--font-heading);
  color: hsl(var(--text-muted));
  letter-spacing: 0.05em;
  font-weight: 500;
}

.demo-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.demo-selector-bar {
  display: flex;
  background-color: hsla(0, 0%, 0%, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.demo-tab {
  flex: 1;
  padding: 0.85rem 0.5rem;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  color: hsl(var(--text-secondary));
  border-bottom: 2px solid transparent;
  transition: var(--transition-smooth);
}

.demo-tab.active {
  color: hsl(var(--accent-secondary));
  background-color: rgba(255, 255, 255, 0.02);
  border-bottom-color: hsl(var(--accent-secondary));
}

.demo-body {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-family: monospace;
}

.terminal-logs {
  font-size: 0.85rem;
  color: hsl(var(--text-secondary));
  flex-grow: 1;
  overflow-y: auto;
  line-height: 1.6;
}

.log-line {
  margin-bottom: 0.5rem;
  opacity: 0;
  transform: translateY(4px);
  animation: logFadeIn 0.3s forwards;
}

.log-success { color: hsl(var(--accent-secondary)); font-weight: bold;}
.log-info { color: hsl(var(--accent-primary)); }
.log-accent { color: #f59e0b; }

.demo-action-area {
  margin-top: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.demo-inputs {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: hsl(var(--text-muted));
}

.demo-btn {
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
  color: #fff;
  padding: 0.5rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 12px rgba(20, 184, 166, 0.2);
}

.demo-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(20, 184, 166, 0.4);
}

.demo-btn:disabled {
  background: #374151;
  color: #9ca3af;
  cursor: not-allowed;
  box-shadow: none;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.feature-card {
  background-color: hsl(var(--bg-secondary));
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 2.25rem;
  transition: var(--transition-bounce);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, hsl(var(--accent-primary)), hsl(var(--accent-secondary)));
  opacity: 0;
  transition: var(--transition-smooth);
}

.feature-card:hover {
  transform: translateY(-8px);
  border-color: rgba(99, 102, 241, 0.2);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3), 0 0 20px rgba(99, 102, 241, 0.05);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon-wrapper {
  width: 48px;
  height: 48px;
  background-color: hsla(var(--accent-primary), 0.1);
  border: 1px solid hsla(var(--accent-primary), 0.15);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--accent-primary));
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.feature-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

.feature-card p {
  font-size: 0.95rem;
  line-height: 1.6;
}

.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.feature-tag {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  background-color: hsla(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  color: hsl(var(--text-muted));
}

/* Pipeline Flow */
.pipeline-section {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.pipeline-flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  position: relative;
}

.pipeline-step {
  position: relative;
  text-align: center;
  padding: 2rem 1.5rem;
  background-color: hsl(var(--bg-secondary));
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
}

.step-num {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, hsl(var(--accent-primary)) 0%, hsl(var(--accent-dark)) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  margin: 0 auto 1.5rem;
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

.pipeline-step h3 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
}

.pipeline-step p {
  font-size: 0.85rem;
  line-height: 1.5;
}

/* Contact / Call-to-action */
.contact-section {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: start;
}

.contact-info h2 {
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
}

.info-list {
  list-style: none;
  margin-top: 2rem;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.info-icon {
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: hsl(var(--accent-secondary));
}

.info-text strong {
  display: block;
  font-size: 0.8rem;
  color: hsl(var(--text-muted));
  text-transform: uppercase;
}

.info-text span {
  font-size: 1rem;
  color: hsl(var(--text-primary));
}

.contact-form-wrapper {
  background-color: hsl(var(--bg-secondary));
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 3rem;
  border-radius: 14px;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: hsl(var(--text-secondary));
}

.form-input {
  width: 100%;
  background-color: hsl(var(--bg-tertiary));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.form-input:focus {
  outline: none;
  border-color: hsl(var(--accent-primary));
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.3);
}

/* Footer */
footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background-color: hsl(var(--bg-secondary));
  padding: 3rem 2rem;
}

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

.footer-logo {
  font-family: var(--font-heading);
  font-weight: 800;
  background: linear-gradient(135deg, #fff 30%, hsl(var(--accent-primary)) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.copyright {
  font-size: 0.85rem;
  color: hsl(var(--text-muted));
}

/* Animations */
@keyframes pulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.1); opacity: 1; }
}

@keyframes logFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive adjustments */
@media (max-width: 968px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .contact-section {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .pipeline-flow {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
  }
  .hero-content h1 {
    font-size: 2.8rem;
  }
  .pipeline-flow {
    grid-template-columns: 1fr;
  }
  .contact-form-wrapper {
    padding: 1.5rem;
  }
}
