/* ==============================================================================
   CHAKRAVYUH (AI-KAVACH) — Public Website Stylesheet
   Domain: chakravyuhai.in | Optimized for Cloudflare Pages Global CDN
   ============================================================================== */

:root {
  --bg-primary: #030712;
  --bg-secondary: #0b1120;
  --bg-card: #111c33;
  --bg-card-hover: #162444;
  --bg-card-border: #1e2e4f;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent-cyan: #38bdf8;
  --accent-cyan-glow: rgba(56, 189, 248, 0.25);
  --accent-indigo: #6366f1;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;
  --accent-amber: #f59e0b;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
  background: 
    radial-gradient(circle at 15% 15%, rgba(56, 189, 248, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 30%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 50% 80%, rgba(244, 63, 94, 0.05) 0%, transparent 50%),
    var(--bg-primary);
}

/* Background grid pattern */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: #7dd3fc;
}

/* Container */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ==============================================================================
   NAVIGATION HEADER
   ============================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--bg-card-border);
  padding: 14px 0;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0284c7, #4f46e5);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.brand-text h1 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #ffffff;
  margin: 0;
  line-height: 1.2;
}

.brand-text h1 span {
  color: var(--accent-cyan);
  font-weight: 400;
}

.brand-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

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

.nav-links a {
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  transition: var(--transition);
}

.nav-links a:hover {
  color: #ffffff;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-primary {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #ffffff;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0369a1, #1d4ed8);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
  transform: translateY(-1px);
  color: #ffffff;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid var(--bg-card-border);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* ==============================================================================
   HERO SECTION
   ============================================================================== */
.hero-section {
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 24px;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.15);
}

.badge-pulse {
  width: 8px;
  height: 8px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-emerald);
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.hero-title {
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 960px;
  margin: 0 auto 20px;
  color: #ffffff;
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 50%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 780px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 60px;
}

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 22px 18px;
  text-align: left;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.metric-card:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.metric-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
  opacity: 0;
  transition: var(--transition);
}

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

.metric-value {
  font-size: 2rem;
  font-weight: 800;
  color: #ffffff;
  font-family: var(--font-mono);
  margin-bottom: 4px;
}

.metric-card.accent-emerald .metric-value { color: #34d399; }
.metric-card.accent-amber .metric-value { color: #fbbf24; }
.metric-card.accent-rose .metric-value { color: #fb7185; }
.metric-card.accent-cyan .metric-value { color: #38bdf8; }

.metric-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.4;
}

/* ==============================================================================
   4-LAYER DEFENSE GRID
   ============================================================================== */
.section {
  padding: 90px 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 54px;
}

.section-tag {
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
  margin-bottom: 14px;
}

.section-desc {
  font-size: 1rem;
  color: var(--text-muted);
}

.layers-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.layer-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  transition: var(--transition);
}

.layer-card:hover {
  border-color: rgba(56, 189, 248, 0.4);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.layer-number {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 4px 10px;
  border-radius: 9999px;
  display: inline-block;
  margin-bottom: 16px;
}

.layer-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 12px;
}

.layer-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.65;
  margin-bottom: 20px;
}

.layer-features {
  list-style: none;
  border-top: 1px solid var(--bg-card-border);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.layer-features li {
  font-size: 0.82rem;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
}

.layer-features li svg {
  color: var(--accent-cyan);
  flex-shrink: 0;
}

/* ==============================================================================
   LIVE INTERACTIVE SIMULATOR (ARENA)
   ============================================================================== */
.simulator-box {
  background: #080e1e;
  border: 1px solid #1e293b;
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75);
  overflow: hidden;
}

.sim-topbar {
  background: #0b1329;
  border-bottom: 1px solid #1e293b;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sim-topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.sim-topbar-title {
  font-size: 0.85rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: #ffffff;
}

.sim-latency-badge {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 4px 10px;
  border-radius: 6px;
}

.sim-body {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  min-height: 520px;
}

.sim-left {
  padding: 24px;
  border-right: 1px solid #1e293b;
  display: flex;
  flex-direction: column;
}

.sim-controls-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.sim-select {
  background: #0f172a;
  color: #f1f5f9;
  border: 1px solid #334155;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.82rem;
  font-family: var(--font-mono);
  outline: none;
  cursor: pointer;
  flex: 1;
}

.sim-select:focus {
  border-color: var(--accent-cyan);
}

/* Oscilloscope */
.waveform-box {
  background: #020617;
  border: 1px solid #1e293b;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 18px;
  position: relative;
}

.waveform-canvas {
  width: 100%;
  height: 90px;
  display: block;
}

.waveform-legend {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 0.68rem;
  font-family: var(--font-mono);
}

.legend-inbound { color: var(--accent-rose); }
.legend-outbound { color: var(--accent-cyan); }

/* Chat dialogue */
.sim-dialogue-window {
  flex: 1;
  overflow-y: auto;
  max-height: 260px;
  padding-right: 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.chat-bubble {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  line-height: 1.55;
  position: relative;
  font-family: var(--font-sans);
}

.bubble-scammer {
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #fecdd3;
  align-self: flex-start;
  max-width: 90%;
}

.bubble-persona {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #bae6fd;
  align-self: flex-end;
  max-width: 90%;
}

.bubble-label {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  font-weight: 700;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.bubble-scammer .bubble-label { color: #f87171; }
.bubble-persona .bubble-label { color: #38bdf8; }

.sim-input-row {
  display: flex;
  gap: 10px;
}

.sim-input {
  flex: 1;
  background: #020617;
  border: 1px solid #334155;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: #ffffff;
  font-size: 0.82rem;
  font-family: var(--font-sans);
  outline: none;
}

.sim-input:focus {
  border-color: var(--accent-cyan);
}

.sim-right {
  background: #070d1c;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.intel-box-title {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent-amber);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.extracted-card {
  background: #0b1428;
  border: 1px solid #1e2e4f;
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 12px;
}

.extracted-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.extracted-type {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  background: rgba(37, 99, 235, 0.2);
  color: #93c5fd;
  border: 1px solid rgba(37, 99, 235, 0.4);
  padding: 2px 8px;
  border-radius: 4px;
}

.extracted-val {
  font-size: 0.95rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.03em;
}

.extracted-details {
  border-top: 1px dashed #1e293b;
  padding-top: 8px;
  margin-top: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
}

.extracted-label {
  color: var(--text-dim);
  display: block;
  font-size: 0.65rem;
}

.extracted-name {
  color: #34d399;
  font-weight: 700;
}

/* Radar ping display */
.radar-box {
  background: #020617;
  border: 1px solid #1e293b;
  border-radius: var(--radius-md);
  padding: 14px;
  position: relative;
}

.radar-data-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid #0f172a;
  font-size: 0.75rem;
  font-family: var(--font-mono);
}

.radar-data-row:last-child {
  border-bottom: none;
}

.radar-label { color: var(--text-muted); }
.radar-val { color: #f87171; font-weight: 700; }

/* ==============================================================================
   PERSONAS SECTION
   ============================================================================== */
.personas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.persona-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}

.persona-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.persona-badge {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.35);
  padding: 4px 10px;
  border-radius: 9999px;
  align-self: flex-start;
  margin-bottom: 16px;
}

.persona-name {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
}

.persona-role {
  font-size: 0.82rem;
  color: var(--accent-cyan);
  font-weight: 600;
  margin-bottom: 14px;
}

.persona-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
  flex: 1;
}

.persona-stats {
  border-top: 1px solid var(--bg-card-border);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.78rem;
  font-family: var(--font-mono);
}

.stat-row {
  display: flex;
  justify-content: space-between;
}

.stat-label { color: var(--text-dim); }
.stat-val { color: #f1f5f9; font-weight: 600; }

/* ==============================================================================
   BSA SECTION 63 LEGAL PROOF
   ============================================================================== */
.bsa-box {
  background: linear-gradient(135deg, #091224 0%, #0c1731 100%);
  border: 1px solid #1e3a8a;
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.bsa-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(59, 130, 246, 0.3);
  padding-bottom: 20px;
  margin-bottom: 28px;
}

.bsa-title h3 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
}

.bsa-title p {
  font-size: 0.8rem;
  color: #93c5fd;
  font-family: var(--font-mono);
}

.bsa-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.bsa-card {
  background: #020617;
  border: 1px solid #1e293b;
  border-radius: var(--radius-md);
  padding: 20px;
}

.bsa-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
}

.bsa-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ==============================================================================
   FOOTER
   ============================================================================== */
.site-footer {
  background: #020617;
  border-top: 1px solid #1e293b;
  padding: 60px 0 30px;
  margin-top: auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
  margin-top: 14px;
  max-width: 320px;
}

.footer-col h4 {
  font-size: 0.85rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.footer-links a:hover {
  color: #ffffff;
}

.footer-bottom {
  border-top: 1px solid #0f172a;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

/* ==============================================================================
   RESPONSIVE DESIGN
   ============================================================================== */
@media (max-width: 1024px) {
  .hero-title { font-size: 2.6rem; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .layers-grid { grid-template-columns: 1fr; }
  .sim-body { grid-template-columns: 1fr; }
  .sim-left { border-right: none; border-bottom: 1px solid #1e293b; }
  .personas-grid { grid-template-columns: 1fr; }
  .bsa-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .hero-title { font-size: 2.1rem; }
  .hero-subtitle { font-size: 0.95rem; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions a { width: 100%; justify-content: center; }
  .metrics-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}

