/* AIPM Security — aipmsec.com */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a2e;
  --bg-card-hover: #222240;
  --accent: #00d4aa;
  --accent-dim: #00a88a;
  --accent-glow: rgba(0, 212, 170, 0.15);
  --accent-secondary: #7c5cfc;
  --accent-secondary-dim: #6348d4;
  --text-primary: #e8e8f0;
  --text-secondary: #9898b0;
  --text-muted: #5a5a78;
  --border: #2a2a40;
  --danger: #ff4466;
  --warning: #ffaa22;
  --success: #00d4aa;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-dim); }

/* ====== NAVBAR ====== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.nav-brand .logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.85rem;
  color: #0a0a0f;
}

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

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--text-primary); }

.nav-cta {
  background: var(--accent);
  color: var(--bg-primary) !important;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: background 0.2s, transform 0.2s;
}

.nav-cta:hover {
  background: var(--accent-dim);
  transform: translateY(-1px);
}

/* ====== HERO ====== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 2rem 6rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 900px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content { max-width: 800px; position: relative; z-index: 1; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.4rem 1rem;
  border-radius: 100px;
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 2rem;
}

.hero-badge .pulse {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(0, 212, 170, 0.4); }
  50% { opacity: 0.8; box-shadow: 0 0 0 8px rgba(0, 212, 170, 0); }
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero h1 .gradient {
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
  padding: 0.85rem 2rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary:hover {
  background: var(--accent-dim);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 212, 170, 0.25);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  padding: 0.85rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: var(--bg-card);
  border-color: var(--text-muted);
}

/* ====== STATS BAR ====== */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 4rem;
  padding: 3rem 2rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
}

.stat { text-align: center; }
.stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  font-family: var(--font-mono);
}
.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ====== SECTIONS ====== */
section {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

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

/* ====== PROBLEM/SOLUTION ====== */
.problem-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 3rem;
}

.problem-card, .solution-card {
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.problem-card {
  background: linear-gradient(135deg, rgba(255, 68, 102, 0.05), var(--bg-card));
  border-color: rgba(255, 68, 102, 0.2);
}

.solution-card {
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.05), var(--bg-card));
  border-color: rgba(0, 212, 170, 0.2);
}

.card-icon {
  width: 48px; height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.problem-card .card-icon { background: rgba(255, 68, 102, 0.1); }
.solution-card .card-icon { background: rgba(0, 212, 170, 0.1); }

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.card-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ====== FEATURES ====== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.3s;
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  transform: translateY(-4px);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.feature-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.feature-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ====== SCORING ====== */
.score-breakdown {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  margin-top: 3rem;
}

.score-visual {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem;
}

.score-ring {
  width: 200px;
  height: 200px;
  margin: 0 auto 2rem;
  position: relative;
}

.score-ring svg {
  width: 100%; height: 100%;
  transform: rotate(-90deg);
}

.score-ring .bg { stroke: var(--border); }
.score-ring .fill { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset 1s ease; }

.score-ring .value {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--accent);
}

.score-ring .label {
  position: absolute;
  top: 62%; left: 50%;
  transform: translateX(-50%);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.score-bars { display: flex; flex-direction: column; gap: 1rem; }

.score-bar-item label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
  color: var(--text-secondary);
}

.score-bar-item label span { color: var(--accent); font-weight: 600; font-family: var(--font-mono); }

.score-bar {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary));
  border-radius: 4px;
  transition: width 1s ease;
}

.score-explanation {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.score-factor {
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.2s;
}

.score-factor:hover { border-color: var(--accent); }

.score-factor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.score-factor-name { font-weight: 700; font-size: 0.95rem; }
.score-factor-weight {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

.score-factor-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ====== AUDIT FORM ====== */
.audit-section {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.audit-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.audit-container::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-secondary), var(--accent));
}

.audit-form {
  display: flex;
  gap: 0.75rem;
  max-width: 600px;
  margin: 2rem auto 0;
}

.audit-input {
  flex: 1;
  padding: 1rem 1.25rem;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 1rem;
  font-family: var(--font-mono);
  outline: none;
  transition: border-color 0.2s;
}

.audit-input:focus { border-color: var(--accent); }
.audit-input::placeholder { color: var(--text-muted); }

.audit-submit {
  padding: 1rem 2rem;
  background: var(--accent);
  color: var(--bg-primary);
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.audit-submit:hover {
  background: var(--accent-dim);
  transform: translateY(-1px);
}

.audit-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ====== RESULTS ====== */
.results-container {
  max-width: 900px;
  margin: 3rem auto 0;
  display: none;
}

.results-container.active { display: block; }

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.result-domain {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--font-mono);
}

.result-score-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.result-score-number {
  font-size: 2.5rem;
  font-weight: 800;
  font-family: var(--font-mono);
}

.result-score-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.score-good { color: var(--success); }
.score-mid { color: var(--warning); }
.score-bad { color: var(--danger); }

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.result-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
}

.result-card-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.result-card-value {
  font-size: 1.75rem;
  font-weight: 800;
  font-family: var(--font-mono);
}

.result-models {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.model-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

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

.model-name { font-weight: 600; font-size: 0.9rem; }

.model-sentiment {
  font-size: 0.8rem;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-weight: 500;
}

.sentiment-positive { background: rgba(0, 212, 170, 0.1); color: var(--success); }
.sentiment-neutral { background: rgba(152, 152, 176, 0.1); color: var(--text-secondary); }
.sentiment-negative { background: rgba(255, 68, 102, 0.1); color: var(--danger); }

.model-rec {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.9rem;
}

.result-structure {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.structure-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0;
}

.structure-name { font-size: 0.9rem; color: var(--text-secondary); }
.structure-score { font-family: var(--font-mono); font-weight: 700; }

.result-recommendations {
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 170, 34, 0.2);
  border-radius: 10px;
  padding: 1.5rem;
}

.rec-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.rec-item:last-child { border-bottom: none; }
.rec-priority {
  display: inline-block;
  background: rgba(255, 170, 34, 0.1);
  color: var(--warning);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  margin-right: 0.5rem;
}

/* ====== LOADING ====== */
.loading-spinner {
  display: none;
  text-align: center;
  padding: 3rem;
}

.loading-spinner.active { display: block; }

.spinner {
  width: 48px; height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.loading-subtext {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

/* ====== LEADERBOARD ====== */
.leaderboard {
  margin-top: 4rem;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.leaderboard-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}

.leaderboard-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.leaderboard-table tr:hover td { background: var(--bg-card); }

.rank-cell {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-muted);
  width: 50px;
}

.rank-1 { color: #ffd700; }
.rank-2 { color: #c0c0c0; }
.rank-3 { color: #cd7f32; }

.domain-cell {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-primary);
}

.score-cell {
  font-family: var(--font-mono);
  font-weight: 700;
}

.nps-cell {
  font-family: var(--font-mono);
}

.nps-positive { color: var(--success); }
.nps-negative { color: var(--danger); }
.nps-neutral { color: var(--text-muted); }

/* ====== HOW IT WORKS ====== */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.step {
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  position: relative;
}

.step-number {
  font-family: var(--font-mono);
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent);
  opacity: 0.3;
  line-height: 1;
  margin-bottom: 1rem;
}

.step-title {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.step-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ====== QUOTE ====== */
.quote-section {
  text-align: center;
  padding: 5rem 2rem;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.quote-text {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 600;
  font-style: italic;
  max-width: 800px;
  margin: 0 auto 1.5rem;
  line-height: 1.5;
  color: var(--text-primary);
}

.quote-source {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.quote-source a { color: var(--accent); }

/* ====== FOOTER ====== */
footer {
  padding: 3rem 2rem;
  text-align: center;
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

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

.footer-powered a { color: var(--accent); }

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1rem;
  font-size: 0.85rem;
}

.footer-legal {
  margin-top: 1.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ====== ERROR ====== */
.error-msg {
  display: none;
  background: rgba(255, 68, 102, 0.1);
  border: 1px solid rgba(255, 68, 102, 0.3);
  color: var(--danger);
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.error-msg.active { display: block; }

/* ====== RESPONSIVE ====== */
@media (max-width: 900px) {
  .problem-grid,
  .score-breakdown,
  .result-grid { grid-template-columns: 1fr; }

  .features-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .stats-bar { flex-wrap: wrap; gap: 2rem; }
  .nav-links { display: none; }
}

@media (max-width: 600px) {
  .audit-form { flex-direction: column; }
  .steps { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2rem; }
}
