/*
 * Standard Deviation design system — shared component styles.
 *
 * Imported by every internal surface (operator portal, status worker, client
 * portal) so the visual language stays seamless across subdomains. Tokens
 * live in colors_and_type.css; this file builds the shared *components*
 * on top of them: page chrome, hero, stat strip, section headers.
 *
 * Used by:
 *   /index.html             via <link rel="stylesheet">
 *   /clients/index.html     via <link rel="stylesheet">
 *   /[slug]/* (Pages Functions)    via <link rel="stylesheet">
 *   worker-status (src/page.ts)    via wrangler text import
 *
 * Anything page-specific (status .kicker.up/down, portal client-card layout,
 * etc.) stays in the page's own CSS. Only common chrome lives here.
 */

/* ── BODY / GRADIENT BAR ───────────────────────────────────────── */

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: #0D0A14;
  color: #FFFFFF;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  background-image: radial-gradient(circle, rgba(196,184,216,0.06) 1.2px, transparent 1.2px);
  background-size: 20px 20px;
}

.gradient-bar {
  position: fixed; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #EC4899 0%, #A855F7 50%, #F97316 100%);
  z-index: 100;
}

/* ── CONTAINER (page-width wrapper) ────────────────────────────── */

.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 56px 40px 80px;
}

/* ── HEADER STRIP (above title-block) ──────────────────────────── */

header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.wordmark {
  font-size: 17px;
  letter-spacing: -0.01em;
  line-height: 1;
  color: rgba(255,255,255,0.95);
  text-decoration: none;
  transition: opacity 120ms ease;
}
.wordmark:hover { opacity: 0.85; }
.wordmark .b { font-weight: 700; }
.wordmark .l { font-weight: 300; }

.header-meta,
.meta {
  font-size: 11px;
  color: rgba(196,184,216,0.65);
  font-family: "JetBrains Mono", Menlo, Consolas, monospace;
  text-align: right;
  letter-spacing: 0.04em;
}

/* ── TITLE BLOCK (kicker + hero h1 + lede) ─────────────────────── */

.title-block { margin-bottom: 48px; }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #A855F7;
  margin-bottom: 12px;
}

.kicker .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #A855F7;
  box-shadow: 0 0 0 3px rgba(168,85,247,0.18);
  flex-shrink: 0;
}

.title-block h1,
h1.hero-title {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  background: linear-gradient(108deg, #EC4899 0%, #A855F7 48%, #F97316 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 14px;
}

.lede {
  font-size: 14px;
  color: rgba(196,184,216,0.75);
  max-width: 580px;
  line-height: 1.65;
  font-weight: 300;
}

.lede code {
  font-family: "JetBrains Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(196,184,216,0.10);
  border-radius: 4px;
  padding: 1px 6px;
  color: rgba(196,184,216,0.95);
}

/* ── STAT STRIP (4-up metric cards under the hero) ─────────────── */
/* Renamed from status's .metric/.metrics for portal parity — both
   surfaces use the same class set here. */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 48px;
}

.stat {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(196,184,216,0.10);
  border-radius: 12px;
  padding: 16px 18px;
  font-size: 15px;
  line-height: 1.5;
}

.stat .label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(196,184,216,0.7);
  margin-bottom: 8px;
}

.stat .value {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #FFFFFF;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.stat .value .grad {
  background: linear-gradient(108deg, #EC4899 0%, #A855F7 48%, #F97316 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat .value .unit {
  font-size: 14px;
  color: rgba(196,184,216,0.65);
  font-weight: 500;
  letter-spacing: 0;
}

.stat .delta {
  font-size: 11px;
  color: rgba(196,184,216,0.6);
  margin-top: 6px;
}

/* ── SECTION HEADERS ───────────────────────────────────────────── */

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-top: 24px;
}

.section-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(196,184,216,0.7);
}

/* ── RESPONSIVE ────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .container { padding: 36px 16px 60px; }
  .title-block h1, h1.hero-title { font-size: 32px; }
  .lede { font-size: 13px; }
  .stats { grid-template-columns: 1fr; }
}
