/* ============================================================
   SpamAnalyst — Static Site Stylesheet
   Dark security/tech aesthetic
   ============================================================ */

/* ── Variables ── */
:root {
  --bg:           #080c10;
  --bg-card:      #0d1117;
  --bg-card-2:    #111820;
  --border:       #1e2d3d;
  --border-glow:  #00ff8820;
  --green:        #00e676;
  --green-dim:    #00c85380;
  --green-text:   #39ff8e;
  --red:          #ff4d4d;
  --amber:        #ffb347;
  --blue:         #4fc3f7;
  --text:         #e0e8f0;
  --text-muted:   #7a8fa6;
  --text-dim:     #3d5166;
  --font-mono:    'Courier New', 'SF Mono', Consolas, monospace;
  --font-sans:    'Inter', 'Segoe UI', system-ui, sans-serif;
  --max-w:        1140px;
  --radius:       4px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}
a { color: var(--green-text); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* ── Utility ── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  border: 1px solid var(--green-dim);
  padding: 0.2rem 0.65rem;
  border-radius: 2px;
  margin-bottom: 1.2rem;
}
.section-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.divider { height: 1px; background: var(--border); margin: 0; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}
.btn-primary {
  background: var(--green);
  color: #000;
}
.btn-primary:hover { background: #00c85a; text-decoration: none; color: #000; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--green-dim); color: var(--green-text); text-decoration: none; }

/* ── Header / Nav ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(8, 12, 16, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.05em;
}
.nav-logo span { color: var(--green); }
.nav-actions { display: flex; align-items: center; gap: 1rem; }
.nav-login {
  font-size: 0.85rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.4rem 1rem;
  border-radius: var(--radius);
  transition: all 0.2s;
}
.nav-login:hover { color: var(--text); border-color: var(--green-dim); text-decoration: none; }

/* ── Hero ── */
.hero {
  padding: 6rem 0 5rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, #00e67610 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 80% 50%, #4fc3f708 0%, transparent 50%);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.hero-version {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
  letter-spacing: 0.1em;
}
.hero h1 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}
.hero h2 {
  font-size: 1rem;
  font-weight: 500;
  color: var(--green-text);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  margin-bottom: 1.5rem;
}
.hero-desc {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 480px;
  margin-bottom: 2rem;
  line-height: 1.7;
}
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* ── Telemetry Widget ── */
.telemetry-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  box-shadow: 0 0 40px #00e67608, 0 20px 60px #00000060;
}
.telemetry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  background: #0a1018;
}
.telemetry-status { display: flex; align-items: center; gap: 0.5rem; }
.pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 #00e67650; }
  50% { opacity: 0.7; box-shadow: 0 0 0 6px #00e67600; }
}
.telemetry-status-text { color: var(--green); font-size: 0.7rem; letter-spacing: 0.1em; }
.telemetry-badges { display: flex; gap: 0.5rem; }
.badge {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  padding: 0.15rem 0.45rem;
  border-radius: 2px;
  border: 1px solid;
}
.badge-on  { color: var(--green); border-color: var(--green-dim); }
.badge-label { color: var(--text-dim); }
.telemetry-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border-bottom: 1px solid var(--border);
}
.stat-cell {
  padding: 0.6rem 0.75rem;
  border-right: 1px solid var(--border);
  text-align: center;
}
.stat-cell:last-child { border-right: none; }
.stat-label { font-size: 0.6rem; color: var(--text-dim); letter-spacing: 0.1em; text-transform: uppercase; }
.stat-value { font-size: 1.1rem; font-weight: 700; color: var(--green); margin-top: 0.1rem; }
.stat-value.amber { color: var(--amber); }
.telemetry-table-wrap {
  height: 200px;
  overflow: hidden;
  position: relative;
}
.telemetry-table-wrap::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 48px;
  background: linear-gradient(transparent, var(--bg-card));
  pointer-events: none;
}
.telemetry-table {
  width: 100%;
  border-collapse: collapse;
}
.telemetry-table thead th {
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 0.4rem 0.75rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.telemetry-table tbody tr { border-bottom: 1px solid #12192200; }
.telemetry-table td {
  padding: 0.35rem 0.75rem;
  font-size: 0.71rem;
  color: var(--text-muted);
}
.telemetry-table td:first-child { color: var(--text-dim); }
.td-blocked { color: var(--red) !important; font-weight: 600; }
.td-verified { color: var(--green) !important; font-weight: 600; }

/* ── Threat Landscape ── */
.section { padding: 5rem 0; }
.section-header { margin-bottom: 3rem; }
.section-header h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.section-header h2 em { font-style: normal; color: var(--green-text); }
.section-header p { color: var(--text-muted); max-width: 600px; margin-top: 0.75rem; line-height: 1.7; }

.threat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
.threat-cards { display: flex; flex-direction: column; gap: 1rem; }
.threat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  transition: border-color 0.2s;
}
.threat-card:hover { border-color: var(--green-dim); }
.threat-card h4 { font-size: 0.9rem; color: #fff; margin-bottom: 0.4rem; }
.threat-card p { font-size: 0.85rem; color: var(--text-muted); }
.threat-schematic {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  font-family: var(--font-mono);
}
.schematic-label {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
  background: #0a1018;
}
.schematic-row {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--border);
}
.schematic-row:last-child { border-bottom: none; }
.schematic-cell {
  flex: 1;
  padding: 1.25rem 1rem;
  border-right: 1px solid var(--border);
  text-align: center;
}
.schematic-cell:last-child { border-right: none; }
.sc-title { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.5rem; }
.sc-badge-green {
  display: inline-block;
  font-size: 0.65rem;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--green-dim);
  color: var(--green);
  border-radius: 2px;
  letter-spacing: 0.1em;
  margin-bottom: 0.4rem;
}
.sc-badge-red {
  display: inline-block;
  font-size: 0.65rem;
  padding: 0.2rem 0.6rem;
  border: 1px solid #ff4d4d50;
  color: var(--red);
  border-radius: 2px;
  letter-spacing: 0.1em;
  margin-bottom: 0.4rem;
}
.sc-entropy { font-size: 0.68rem; color: var(--text-dim); }

/* ── 7-Layer Architecture ── */
.layers-section { background: var(--bg-card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.layers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0;
}
.layer-item {
  padding: 1.75rem 1.5rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}
.layer-item:hover { background: #111c28; }
.layer-num {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--green);
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}
.layer-item h3 { font-size: 0.9rem; color: #fff; margin-bottom: 0.4rem; font-weight: 600; }
.layer-item p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.6; }
.layers-footer {
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.layers-footer p { color: var(--text-muted); font-size: 0.9rem; }
.layers-footer strong { color: var(--text); }

/* ── Intelligence ── */
.intel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 4rem;
}
.intel-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.5rem;
}
.intel-card-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 0.75rem;
}
.intel-card h3 { font-size: 1rem; color: #fff; margin-bottom: 0.5rem; }
.intel-card p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.65; }

/* ── Why SpamAnalyst ── */
.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 4rem;
}
.why-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.75rem;
  background: var(--bg-card);
}
.why-num {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--border);
  margin-bottom: 0.75rem;
  line-height: 1;
}
.why-card h3 { font-size: 0.95rem; color: #fff; margin-bottom: 0.5rem; }
.why-card p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.65; }

/* ── Use Cases ── */
.usecases-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1rem;
}
.usecase-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.75rem;
  background: var(--bg-card);
}
.usecase-card h3 { font-size: 0.95rem; color: var(--green-text); margin-bottom: 0.6rem; font-family: var(--font-mono); }
.usecase-card p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.65; }

/* ── Mission ── */
.mission-section {
  background: linear-gradient(135deg, #0d1117 0%, #0a1520 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.mission-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.mission-text h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 1rem;
}
.mission-text h2 em { font-style: normal; color: var(--green-text); }
.mission-text p { color: var(--text-muted); line-height: 1.75; margin-bottom: 1rem; font-size: 0.95rem; }
.directive-list { list-style: none; margin: 1.5rem 0 2rem; }
.directive-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.75rem;
}
.directive-list li strong { color: var(--green-text); }
.mission-stats {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.mstat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
}
.mstat-num {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--green);
  line-height: 1;
  margin-bottom: 0.3rem;
}
.mstat-label { font-size: 0.8rem; color: var(--text-muted); }

/* ── Developer / Deploy ── */
.deploy-section { }
.code-block {
  background: #0a1018;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  overflow-x: auto;
  line-height: 1.8;
  margin-top: 1.5rem;
}
.code-comment { color: var(--text-dim); }
.code-key { color: var(--blue); }
.code-val { color: var(--green-text); }
.code-str { color: #f9a825; }

/* ── Contact ── */
.contact-section { background: var(--bg-card); border-top: 1px solid var(--border); }
.contact-inner { text-align: center; max-width: 520px; margin: 0 auto; }
.contact-inner h2 { font-size: 1.75rem; font-weight: 700; color: #fff; margin-bottom: 0.75rem; }
.contact-inner p { color: var(--text-muted); margin-bottom: 2rem; }

/* ── Footer ── */
.site-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.footer-logo { font-family: var(--font-mono); font-size: 0.9rem; color: var(--text-muted); }
.footer-logo span { color: var(--green); }
.footer-copy { font-size: 0.8rem; color: var(--text-dim); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero-grid, .threat-grid, .mission-inner { grid-template-columns: 1fr; }
  .intel-grid, .why-grid, .usecases-grid { grid-template-columns: 1fr 1fr; }
  .telemetry-widget { display: none; }
}
@media (max-width: 640px) {
  .intel-grid, .why-grid, .usecases-grid { grid-template-columns: 1fr; }
  .nav-actions .btn-ghost { display: none; }
  .footer-inner { flex-direction: column; text-align: center; }
}
