/* systemd-sentry site stylesheet
 * Inspired by glances-rs aesthetic: cream background, crimson accent, refined typography
 */

:root {
  --bg: #fbf8f3;
  --bg-soft: #f3eee5;
  --fg: #1a1612;
  --fg-muted: #6b6359;
  --border: #e5dfd2;
  --accent: #ce422b;
  --accent-soft: #f4d9d3;
  --code-bg: #1a1612;
  --code-fg: #f3eee5;
  --link: var(--accent);
  --max-width: 760px;
  --font-serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

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

html { font-size: 17px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ---------- Hero ---------- */
.hero {
  border-bottom: 1px solid var(--border);
  padding-bottom: 2.5rem;
  margin-bottom: 3rem;
}
.hero .eyebrow {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.8rem;
  font-weight: 600;
}
.hero h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.3rem, 5.8vw, 3.4rem);
  line-height: 1.15;
  margin: 0 0 1.2rem;
  letter-spacing: -0.01em;
  color: var(--fg);
}
.hero h1 .accent { color: var(--accent); }
.hero .lede {
  font-size: 1.12rem;
  color: var(--fg-muted);
  max-width: 40em;
  margin: 0;
}
.hero .lede strong { color: var(--fg); font-weight: 600; }

/* ---------- Badges Bar ---------- */
.badge-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0 0;
}
.badge-bar span {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.2rem 0.6rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--fg-muted);
}
.badge-bar span.highlight {
  border-color: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

/* ---------- Sections ---------- */
section { margin-bottom: 3rem; }
section h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.6rem;
  letter-spacing: -0.005em;
  margin: 0 0 1.2rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}
section h2 .num {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  margin-right: 0.6rem;
  vertical-align: 0.15em;
}

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}
a:hover { border-bottom-color: var(--accent); }

/* ---------- Benefits / Feature Grid ---------- */
.benefits {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
}
.benefits li {
  padding: 0.9rem 1rem 0.9rem 1.2rem;
  background: var(--bg-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 4px 4px 0;
}
.benefits li strong {
  display: block;
  font-weight: 600;
  margin-bottom: 0.15rem;
}
.benefits li span {
  color: var(--fg-muted);
  font-size: 0.96rem;
}

/* ---------- Code blocks ---------- */
pre {
  background: var(--code-bg);
  color: var(--code-fg);
  padding: 1rem 1.2rem;
  border-radius: 6px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.55;
  margin: 0 0 1rem;
}
pre code { background: transparent; padding: 0; color: inherit; }
code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--bg-soft);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
}

/* ---------- Status & Metric Cards ---------- */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.8rem;
  margin: 1.2rem 0;
}
.metric-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  padding: 0.8rem 1rem;
  border-radius: 6px;
}
.metric-card .val {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}
.metric-card .lbl {
  font-size: 0.82rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---------- Header & Navigation (about) ---------- */
.page-head {
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.5rem;
  margin-bottom: 2.5rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.page-head .back a {
  color: var(--accent);
  border-bottom: none;
  font-size: 0.88rem;
}
.page-head .back a:hover { border-bottom: 1px solid var(--accent); }
.page-head .tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--fg-muted);
}

h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.1rem, 5.5vw, 3rem);
  line-height: 1.15;
  margin: 0 0 0.8rem;
}
h1 .accent { color: var(--accent); }

h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.25rem;
  margin: 1.8rem 0 0.8rem;
}

ul { padding-left: 1.4rem; }
li { margin-bottom: 0.4rem; }
li:last-child { margin-bottom: 0; }

/* ---------- Footer ---------- */
footer.site {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--fg-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
}
footer.site a { color: var(--fg-muted); }
footer.site a:hover { color: var(--accent); border-bottom-color: var(--accent); }

@media (max-width: 540px) {
  html { font-size: 16px; }
  .wrap { padding: 2.5rem 1.1rem 3.5rem; }
  .hero h1 { font-size: 2.1rem; }
}
