/* pqc-spotter documentation site.
   Design tokens taken from the qcomply.tech Tailwind theme so the two sites
   read as one product family. */

@font-face {
  font-family: 'Sora';
  src: url('/assets/sora.woff2') format('woff2-variations');
  font-weight: 100 800;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/assets/inter.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --navy-950: #040810;
  --navy-900: #0a0f1e;
  --navy-800: #0f1829;
  --navy-700: #162136;

  --blue: #2563eb;
  --blue-light: #3b82f6;
  --blue-glow: #60a5fa;
  --blue-pale: #dbeafe;

  --text: #ffffff;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --border: #1e293b;

  --red: #f87171;
  --green: #4ade80;
  --yellow: #fbbf24;
  --magenta: #c084fc;
  --cyan: #38bdf8;

  --radius: 0.75rem;
  --maxw: 1120px;

  --font-heading: 'Sora', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'Cascadia Code', 'JetBrains Mono',
               Menlo, Consolas, monospace;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }

body {
  margin: 0;
  background: var(--navy-900);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; line-height: 1.15; }
h1 { font-size: clamp(2.25rem, 6vw, 3.5rem); letter-spacing: -0.02em; margin: 0 0 1rem; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.15rem); letter-spacing: -0.02em; margin: 0 0 0.75rem; }
h3 { font-size: 1.15rem; margin: 0 0 0.5rem; }

p { margin: 0 0 1rem; color: var(--text-muted); }

a { color: var(--blue-glow); text-decoration: none; }
a:hover { color: var(--text); }

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 4px;
  padding: 0.1em 0.38em;
  color: var(--blue-pale);
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }

/* ---------- header ---------- */

header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(4, 8, 16, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 4.25rem;
}
.brand { display: flex; align-items: center; gap: 0.75rem; }
.brand img { height: 1.9rem; width: auto; display: block; }
.brand .sep { color: var(--border); font-size: 1.25rem; font-weight: 300; }
.brand .tool {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--text);
  letter-spacing: -0.01em;
}
.nav-links { display: flex; align-items: center; gap: 1.75rem; }
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--text); }
@media (max-width: 820px) { .nav-links { display: none; } }

/* ---------- hero ---------- */

.hero {
  background:
    radial-gradient(ellipse 70% 60% at 50% -10%, rgba(37, 99, 235, 0.16), transparent 70%),
    linear-gradient(180deg, var(--navy-950) 0%, var(--navy-900) 100%);
  border-bottom: 1px solid var(--border);
  padding: 5rem 0 4rem;
}
.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue-glow);
  margin-bottom: 1rem;
}
.hero p.lead {
  font-size: 1.15rem;
  max-width: 46rem;
  color: var(--text-muted);
}
.hero .lead strong { color: var(--text); font-weight: 600; }

/* ---------- install command ---------- */

.install-box { margin: 2rem 0 1rem; max-width: 44rem; }
.install-label {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
  font-weight: 500;
}
.cmd {
  display: flex;
  align-items: stretch;
  background: var(--navy-950);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s;
}
.cmd:hover { border-color: rgba(37, 99, 235, 0.5); }
.cmd pre {
  margin: 0;
  padding: 0.9rem 1rem;
  overflow-x: auto;
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--blue-pale);
}
.cmd pre .prompt { color: var(--text-dim); user-select: none; }
.copy {
  flex-shrink: 0;
  border: none;
  border-left: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0 1.1rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.copy:hover { background: rgba(37, 99, 235, 0.15); color: var(--text); }
.copy.done { color: var(--green); }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.92rem;
  transition: all 0.2s;
}
.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.15);
}
.btn-primary:hover { background: var(--blue-light); color: #fff; box-shadow: 0 0 40px rgba(37, 99, 235, 0.25); }
.btn-outline { border: 1px solid var(--blue); color: var(--blue-glow); }
.btn-outline:hover { background: var(--blue); color: #fff; }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 2rem;
  font-size: 0.82rem;
  color: var(--text-dim);
}
.hero-meta span { display: inline-flex; align-items: center; gap: 0.4rem; }
.hero-meta .tick { color: var(--green); font-weight: 700; }

/* ---------- sections ---------- */

section { padding: 4.5rem 0; border-bottom: 1px solid var(--border); }
section.alt { background: var(--navy-950); }
.section-head { max-width: 44rem; margin-bottom: 2.5rem; }

/* ---------- terminal ---------- */

.terminal {
  background: var(--navy-950);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  background: var(--navy-800);
  border-bottom: 1px solid var(--border);
}
.terminal-bar .dot { width: 0.7rem; height: 0.7rem; border-radius: 50%; }
.terminal-bar .dot:nth-child(1) { background: #ff5f57; }
.terminal-bar .dot:nth-child(2) { background: #febc2e; }
.terminal-bar .dot:nth-child(3) { background: #28c840; }
.terminal-bar .title {
  margin-left: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-dim);
}
.terminal pre {
  margin: 0;
  padding: 1.1rem 1.25rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.775rem;
  line-height: 1.5;
  color: #cbd5e1;
  max-height: 30rem;
  overflow-y: auto;
}

/* ANSI classes emitted by the report renderer */
.c-red { color: var(--red); }
.c-green { color: var(--green); }
.c-yellow { color: var(--yellow); }
.c-magenta { color: var(--magenta); }
.c-cyan { color: var(--cyan); }
.c-grey { color: var(--text-dim); }
.c-bold { font-weight: 700; }
.c-dim { opacity: 0.65; }

/* ---------- steps ---------- */

.steps { display: grid; gap: 1.5rem; counter-reset: step; }
.step {
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  gap: 1.1rem;
  align-items: start;
}
.step-num {
  counter-increment: step;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(37, 99, 235, 0.4);
  color: var(--blue-glow);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-num::before { content: counter(step); }
.step-body { min-width: 0; }
.step-body h3 { margin-bottom: 0.35rem; }
.step-body p { margin-bottom: 0.75rem; }

/* ---------- cards ---------- */

.grid { display: grid; gap: 1.25rem; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr)); }

.card {
  background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.3s;
}
.card:hover { border-color: rgba(37, 99, 235, 0.4); }
.card p:last-child { margin-bottom: 0; }
.card .glyph {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.75rem;
  display: block;
}

/* ---------- tables ---------- */

.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; min-width: 34rem; }
th, td { text-align: left; padding: 0.8rem 1rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th {
  background: var(--navy-800);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(37, 99, 235, 0.04); }
td code { white-space: nowrap; }
td.verdict { white-space: nowrap; font-weight: 600; }

/* ---------- code blocks ---------- */

.code {
  background: var(--navy-950);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 1rem;
  background: var(--navy-800);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-dim);
}
.code pre {
  margin: 0;
  padding: 1rem 1.15rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.6;
  color: #cbd5e1;
}
.code pre .k { color: var(--blue-glow); }
.code pre .s { color: var(--green); }
.code pre .c { color: var(--text-dim); }

/* ---------- callout ---------- */

.callout {
  border-left: 3px solid var(--blue);
  background: rgba(37, 99, 235, 0.07);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.1rem 1.35rem;
  margin: 1.5rem 0;
}
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--text); }

/* ---------- footer ---------- */

footer.site {
  background: var(--navy-950);
  border-top: 1px solid var(--border);
  padding: 3.5rem 0 2rem;
}
.foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
}
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-grid img { height: 2.2rem; width: auto; margin-bottom: 1rem; display: block; }
.foot-grid h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.9rem;
}
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { margin-bottom: 0.5rem; }
.foot-grid li a { font-size: 0.87rem; color: var(--text-muted); }
.foot-grid li a:hover { color: var(--text); }
.foot-note { font-size: 0.87rem; color: var(--text-muted); max-width: 20rem; }
.foot-addr { font-size: 0.78rem; color: var(--text-dim); margin-top: 1rem; }
.foot-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.76rem;
  color: var(--text-dim);
}
.foot-bottom .links { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; }
.foot-bottom .links a { color: var(--text-dim); }
.foot-bottom .links a:hover { color: var(--text-muted); }
.foot-bottom .contact { color: var(--text-dim); }

/* ---------- misc ---------- */

.anchor { scroll-margin-top: 5.5rem; }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li {
  padding-left: 1.35rem;
  position: relative;
  margin-bottom: 0.6rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}
ul.plain li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--blue);
}
.muted { color: var(--text-dim); font-size: 0.85rem; }
