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

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

:root {
  --glass-bg: rgba(255,255,255,0.04);
  --glass-border: rgba(255,255,255,0.08);
  --glass-hover: rgba(255,255,255,0.07);
  --glass-strong: rgba(255,255,255,0.1);
  --text-primary: #ffffff;
  --text-secondary: rgba(255,255,255,0.7);
  --text-muted: rgba(255,255,255,0.4);
  --overlay: rgba(0,0,0,0.55);
  --radius: 14px;
  --radius-sm: 8px;
}

html { height: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #000;
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Background ── */
#bg-portrait {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: url('/api/background-image') no-repeat center center / cover;
  transition: transform 0.1s ease-out;
  will-change: transform;
}

#bg-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: var(--overlay);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

/* ── Glass utility ── */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
}

.glass-strong {
  background: var(--glass-strong);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
}

/* ── Layout ── */
.page-wrap { position: relative; z-index: 2; min-height: 100vh; display: flex; flex-direction: column; }

/* ── Nav ── */
.glass-nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 2rem;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--glass-border);
}

.glass-nav .brand { font-weight: 600; font-size: 1.1rem; color: var(--text-primary); text-decoration: none; letter-spacing: -0.3px; }
.glass-nav .nav-links { display: flex; align-items: center; gap: 1.5rem; list-style: none; }
.glass-nav .nav-links a { color: var(--text-secondary); text-decoration: none; font-size: 0.88rem; transition: color 0.2s; }
.glass-nav .nav-links a:hover { color: var(--text-primary); }

/* ── Container ── */
.container { max-width: 1200px; margin: 0 auto; padding: 2rem; width: 100%; }

/* ── Cards ── */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: background 0.2s;
}
.glass-card:hover { background: var(--glass-hover); }
.glass-card .card-header { font-weight: 600; margin-bottom: 1rem; color: var(--text-primary); }
.glass-card .card-footer { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--glass-border); color: var(--text-muted); font-size: 0.82rem; }

/* ── Stat grid ── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card {
  text-align: center;
  padding: 1.2rem 1rem;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
}
.stat-number { font-size: 2rem; font-weight: 700; line-height: 1.2; }
.stat-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; margin-top: 0.3rem; }

/* ── Project grid ── */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.2rem; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem; font-weight: 500; font-family: inherit;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text-primary);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.btn:hover { background: var(--glass-hover); border-color: rgba(255,255,255,0.2); }
.btn-primary { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.2); }
.btn-primary:hover { background: rgba(255,255,255,0.18); }
.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.8rem; }

/* ── Forms ── */
.form-group { margin-bottom: 1.2rem; }
.form-label { display: block; font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 0.4rem; font-weight: 500; }
.form-input, .form-input[type="text"], .form-input[type="email"], .form-input[type="password"], .form-input[type="url"], textarea.form-input, select.form-input {
  width: 100%;
  padding: 0.6rem 0.9rem;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem; font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.form-input:focus { border-color: rgba(255,255,255,0.3); }
.form-input::placeholder { color: var(--text-muted); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ── Tables ── */
.glass-table-wrap {
  overflow-x: auto;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
}
.glass-table-wrap table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.glass-table-wrap th { text-align: left; padding: 0.75rem 1rem; color: var(--text-muted); font-weight: 500; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--glass-border); }
.glass-table-wrap td { padding: 0.65rem 1rem; border-bottom: 1px solid rgba(255,255,255,0.03); color: var(--text-secondary); }
.glass-table-wrap tr:last-child td { border-bottom: none; }
.glass-table-wrap tr:hover td { background: rgba(255,255,255,0.03); }

.glass-table-wrap a { color: #7ec8f0; text-decoration: none; }
.glass-table-wrap a:hover { text-decoration: underline; }
.glass-table-wrap code { font-size: 0.82rem; color: var(--text-secondary); }

/* ── Badges ── */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-critical { background: rgba(211,47,47,0.7); color: #fff; }
.badge-high { background: rgba(245,124,0,0.7); color: #fff; }
.badge-medium { background: rgba(251,192,45,0.7); color: #000; }
.badge-low { background: rgba(56,142,60,0.7); color: #fff; }
.badge-unknown { background: rgba(158,158,158,0.5); color: #fff; }

/* ── Misc ── */
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.3px; }
h1 { font-size: 1.8rem; margin-bottom: 1.5rem; }
h2 { font-size: 1.3rem; margin-bottom: 1rem; }
h3 { font-size: 1.1rem; margin-bottom: 0.8rem; }
p { color: var(--text-secondary); margin-bottom: 0.8rem; }
a { color: #7ec8f0; text-decoration: none; }
a:hover { text-decoration: underline; }

code, pre {
  font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  font-size: 0.82rem;
}
pre {
  background: rgba(0,0,0,0.4);
  padding: 1rem;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  max-height: 300px;
  overflow-y: auto;
  color: #d4d4d4;
  border: 1px solid var(--glass-border);
}
code { background: rgba(255,255,255,0.06); padding: 1px 5px; border-radius: 3px; }

.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-muted); }
.empty-state h3 { color: var(--text-secondary); }

details.glass-card { cursor: pointer; }
details.glass-card summary { font-weight: 500; cursor: pointer; }
details.glass-card[open] summary { margin-bottom: 1rem; padding-bottom: 0.8rem; border-bottom: 1px solid var(--glass-border); }

hr { border: none; border-top: 1px solid var(--glass-border); margin: 1.5rem 0; }

footer.page-footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-top: auto;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.text-center { text-align: center; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

/* ── Filter pills ── */
.filter-pills { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.filter-pill {
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}
.filter-pill:hover { background: var(--glass-hover); border-color: rgba(255,255,255,0.2); }

/* ── Pricing grid ── */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.pricing-card {
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  transition: background 0.2s;
}
.pricing-card:hover { background: var(--glass-hover); }
.pricing-card.highlight { border-color: rgba(255,255,255,0.2); background: var(--glass-strong); }
.pricing-card .price { font-size: 2.5rem; font-weight: 700; margin: 0.5rem 0; }
.pricing-card .price-label { font-size: 0.82rem; color: var(--text-muted); }
.pricing-card .features { list-style: none; margin: 1.2rem 0; text-align: left; }
.pricing-card .features li { padding: 0.3rem 0; font-size: 0.85rem; color: var(--text-secondary); }
.pricing-card .features li::before { content: '\203A'; color: rgba(255,255,255,0.3); margin-right: 0.5rem; font-size: 1.2rem; font-weight: 700; }

/* ── Details ── */
.details-panel summary { cursor: pointer; font-weight: 500; color: var(--text-secondary); }
.details-panel[open] summary { margin-bottom: 1rem; }

/* ── Benchmark bar charts ── */
.benchmark-group { margin-bottom: 2rem; }
.benchmark-title { font-size: 0.9rem; font-weight: 600; margin-bottom: 0.8rem; color: var(--text-primary); }
.benchmark-row { display: flex; align-items: center; margin-bottom: 0.6rem; gap: 0.8rem; }
.benchmark-label { width: 130px; font-size: 0.82rem; color: var(--text-secondary); flex-shrink: 0; text-align: right; }
.benchmark-bar-wrap { flex: 1; height: 28px; background: rgba(255,255,255,0.05); border-radius: 6px; overflow: hidden; position: relative; }
.benchmark-bar { height: 100%; border-radius: 6px; display: flex; align-items: center; padding-left: 10px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.3px; white-space: nowrap; transition: width 1.5s ease; }
.benchmark-bar.vulnledger { background: linear-gradient(90deg, #6366f1, #8b5cf6); color: #fff; }
.benchmark-bar.snyk { background: linear-gradient(90deg, #4f46e5, #7c3aed); color: #fff; }
.benchmark-bar.anchore { background: rgba(255,255,255,0.15); color: var(--text-secondary); }
.benchmark-bar.dtrack { background: rgba(255,255,255,0.1); color: var(--text-secondary); }
.benchmark-bar.other { background: rgba(255,255,255,0.08); color: var(--text-muted); }
.benchmark-value { margin-left: auto; padding-right: 10px; font-size: 0.75rem; font-weight: 600; color: var(--text-muted); flex-shrink: 0; width: 50px; text-align: right; }

/* ── Feature hero ── */
.feature-hero { text-align: center; padding: 3rem 0 2rem; }
.feature-hero h1 { font-size: 2.2rem; margin-bottom: 0.8rem; }
.feature-hero p { font-size: 1.05rem; max-width: 600px; margin: 0 auto 1.5rem; }

/* ── Feature detail grid ── */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.2rem; margin: 2rem 0; }

/* ── Glass icon circle ── */
.glass-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 14px;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  margin-bottom: 0.8rem;
  flex-shrink: 0;
}
.glass-icon svg { width: 24px; height: 24px; stroke: var(--text-secondary); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.glass-icon-lg { width: 64px; height: 64px; }
.glass-icon-lg svg { width: 32px; height: 32px; stroke-width: 1.5; }

/* ── Inline icon utility ── */
.icon-inline { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; }
.icon-inline svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-inline.check svg { stroke: #4caf50; }
.icon-inline.cross svg { stroke: #666; }
.icon-inline.running svg { stroke: #f57c00; }
.icon-inline.completed svg { stroke: #4caf50; }
.icon-inline.failed svg { stroke: #d32f2f; }

/* ── Comparison table ── */
.compare-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.compare-table th { text-align: left; padding: 0.75rem 1rem; color: var(--text-muted); font-weight: 500; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 2px solid var(--glass-border); }
.compare-table td { padding: 0.7rem 1rem; border-bottom: 1px solid var(--glass-border); color: var(--text-secondary); }
.compare-table tr:hover td { background: rgba(255,255,255,0.03); }
.compare-table .check { color: #4caf50; }
.compare-table .cross { color: #666; }
.compare-table .highlight-col { background: rgba(99,102,241,0.06); }

/* ── FAQ ── */
.faq-item { margin-bottom: 1rem; }
.faq-question { font-weight: 600; cursor: pointer; padding: 0.8rem 0; color: var(--text-primary); }
.faq-answer { padding: 0 0 0.8rem; color: var(--text-secondary); font-size: 0.92rem; line-height: 1.7; }

/* ── Breakdown bar chart ── */
.chart-breakdown { display: flex; flex-direction: column; gap: 0.6rem; }
.chart-row { display: flex; align-items: center; gap: 0.6rem; }
.chart-label { width: 60px; font-size: 0.78rem; color: var(--text-muted); text-align: right; flex-shrink: 0; }
.chart-track { flex: 1; height: 22px; background: rgba(255,255,255,0.04); border-radius: 4px; overflow: hidden; }
.chart-bar { height: 100%; border-radius: 4px; display: flex; align-items: center; padding-left: 8px; font-size: 0.72rem; font-weight: 700; color: #fff; min-width: 24px; transition: width 0.8s ease; }
.chart-critical { background: linear-gradient(90deg, #b71c1c, #d32f2f); }
.chart-high { background: linear-gradient(90deg, #e65100, #f57c00); }
.chart-medium { background: linear-gradient(90deg, #f9a825, #fbc02d); color: #000; }
.chart-low { background: linear-gradient(90deg, #2e7d32, #388e3c); }

/* ── Trend bar chart ── */
.chart-trend { overflow-x: auto; }
.trend-bars { display: flex; gap: 4px; align-items: flex-end; min-height: 100px; padding-top: 10px; }
.trend-col { flex: 1; min-width: 28px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.trend-bar-wrap { width: 100%; max-width: 32px; display: flex; align-items: flex-end; justify-content: center; }
.trend-stack { width: 20px; border-radius: 3px 3px 0 0; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; min-height: 2px; background: rgba(255,255,255,0.05); }
.trend-seg { width: 100%; }
.trend-critical { background: #d32f2f; }
.trend-high { background: #f57c00; }
.trend-medium { background: #fbc02d; }
.trend-low { background: #388e3c; }
.trend-label { font-size: 0.6rem; color: var(--text-muted); white-space: nowrap; }

/* ── Health badges ── */
.badge-green { background: rgba(56,142,60,0.6); color: #fff; }
.badge-yellow { background: rgba(245,124,0,0.6); color: #fff; }
.badge-red { background: rgba(211,47,47,0.6); color: #fff; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .glass-nav { padding: 0.6rem 1rem; }
  .glass-nav .nav-links { gap: 0.8rem; }
  .container { padding: 1rem; }
  .project-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
}
