/* HelloBot Design System */
:root {
  --bg-0: #07090F;
  --bg-1: #0B1020;
  --bg-2: #131A2A;
  --bg-3: #1A2236;
  --bg-paper: #F5EFE3;
  --bg-paper-2: #ECE3D0;

  --ink-0: #F5F7FB;
  --ink-1: #C9D0E0;
  --ink-2: #A8B0C3;
  --ink-3: #7F8799;
  --ink-paper: #1A1812;
  --ink-paper-2: #4A4538;

  --brand: #FF8A3D;
  --brand-hot: #FF9B59;
  --brand-soft: #3A2417;
  --brand-ink: #1A0E05;

  --ok: #3BCB7A;
  --warn: #F2C94C;
  --bad: #FF5C5C;
  --info: #4DA3FF;
  --plum: #B58CFF;

  --line: #27314A;
  --line-soft: #1F2738;
  --line-paper: #C8BFA8;

  --r-card: 20px;
  --r-btn: 12px;
  --r-pill: 999px;

  --shadow-card: 0 10px 30px rgba(0,0,0,.18);
  --shadow-hover: 0 16px 40px rgba(0,0,0,.32);
  --shadow-paper: 0 1px 0 rgba(0,0,0,.04), 0 8px 24px rgba(40,30,10,.08);

  --font-sans: "Inter", "PingFang SC", "Noto Sans SC", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--bg-1);
  color: var(--ink-0);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* ---------- TYPE UTILITIES ---------- */
.t-mono { font-family: var(--font-mono); letter-spacing: .02em; }
.t-serif { font-family: var(--font-serif); }
.t-stamp {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 600;
}
.t-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-2);
  font-weight: 500;
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 22px; border-radius: var(--r-btn);
  font-weight: 600; font-size: 15px;
  border: 1px solid transparent;
  transition: transform .12s ease, background .12s ease, border-color .12s ease, box-shadow .2s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-hot); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(255,138,61,.32); }
.btn-ghost { background: transparent; color: var(--ink-0); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink-2); background: rgba(255,255,255,.03); }
.btn-paper { background: var(--ink-paper); color: var(--bg-paper); }
.btn-paper:hover { background: #2a2520; }
.btn-sm { padding: 9px 14px; font-size: 13px; }

/* ---------- CARDS / OFFICE PAPER ---------- */
.paper {
  background: var(--bg-paper);
  color: var(--ink-paper);
  border-radius: 8px;
  position: relative;
  box-shadow: var(--shadow-paper);
}
.paper::before {
  content: "";
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(0deg, transparent 0 23px, rgba(40,30,10,.06) 23px 24px);
  pointer-events: none; border-radius: inherit;
  mix-blend-mode: multiply;
}

.card-dark {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
}

.dotted {
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,.12) 1px, transparent 0);
  background-size: 14px 14px;
}
.dotted-paper {
  background-image: radial-gradient(circle at 1px 1px, rgba(40,30,10,.18) 1px, transparent 0);
  background-size: 14px 14px;
}

/* ---------- STAMP / BADGE ---------- */
.stamp {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 9px;
  border: 1.5px solid currentColor;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1;
}
.stamp-rotate { transform: rotate(-4deg); }
.stamp-orange { color: var(--brand); }
.stamp-green { color: var(--ok); }
.stamp-red { color: var(--bad); }
.stamp-purple { color: var(--plum); }
.stamp-blue { color: var(--info); }
.stamp-paper { color: var(--ink-paper); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: 12px;
  color: var(--ink-1);
}
.chip-paper {
  background: rgba(40,30,10,.06);
  border-color: var(--line-paper);
  color: var(--ink-paper);
}

/* ---------- NAV ---------- */
.nav-link {
  font-size: 14px; color: var(--ink-1);
  padding: 8px 12px; border-radius: 8px;
  transition: color .12s, background .12s;
}
.nav-link:hover { color: var(--ink-0); background: rgba(255,255,255,.04); }
.nav-link.active { color: var(--brand); }

/* ---------- ENERGY BAR ---------- */
.energy {
  height: 6px; border-radius: 3px;
  background: rgba(255,255,255,.08);
  overflow: hidden; position: relative;
}
.energy > span { display: block; height: 100%; border-radius: inherit; }
.energy.green > span { background: linear-gradient(90deg, #2faa5f, #3BCB7A); }
.energy.yellow > span { background: linear-gradient(90deg, #d4a82e, #F2C94C); }
.energy.red > span { background: linear-gradient(90deg, #d44545, #FF5C5C); }

/* ---------- SCAN LINES (subtle) ---------- */
.scanlines {
  position: relative;
}
.scanlines::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(255,255,255,.012) 3px 4px);
  border-radius: inherit;
}

/* ---------- AVATAR (geometric) ---------- */
.av {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: grid; place-items: center;
  font-size: 28px;
  position: relative;
  flex-shrink: 0;
}
.av-sm { width: 40px; height: 40px; border-radius: 10px; font-size: 20px; }
.av-lg { width: 88px; height: 88px; border-radius: 20px; font-size: 44px; }

/* ---------- PERFORATED EDGE (top of ID card) ---------- */
.perf-top {
  background-image: radial-gradient(circle, rgba(0,0,0,.25) 35%, transparent 36%);
  background-size: 12px 12px;
  background-position: 0 4px;
  background-repeat: repeat-x;
  height: 12px;
}
.perf-paper-top {
  background-image: radial-gradient(circle, var(--bg-1) 38%, transparent 40%);
  background-size: 14px 14px;
  background-position: 0 6px;
  background-repeat: repeat-x;
  height: 14px;
}

/* ---------- ORG GRID BG ---------- */
.grid-bg {
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* ---------- LAYOUT HELPERS ---------- */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}
.container-narrow { max-width: 980px; margin: 0 auto; padding: 0 32px; }

.section { padding: 96px 0; }
.section-sm { padding: 64px 0; }

.divider {
  height: 1px; background: var(--line);
  position: relative;
}
.divider::before {
  content: "////////";
  position: absolute; left: 50%; top: -8px; transform: translateX(-50%);
  background: var(--bg-1); padding: 0 12px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .18em;
  color: var(--ink-3);
}

/* ---------- TICKER ---------- */
@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.ticker-track {
  display: inline-flex; gap: 48px;
  animation: ticker 40s linear infinite;
  white-space: nowrap;
}
.ticker-wrap {
  overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

/* ---------- MOBILE ---------- */
@media (max-width: 720px) {
  .container, .container-narrow { padding: 0 20px; }
  .section { padding: 64px 0; }
  .section-sm { padding: 40px 0; }
}

/* ---------- BLINKER ---------- */
@keyframes blink { 50% { opacity: 0; } }
.blink { animation: blink 1.2s steps(2, start) infinite; }

/* ---------- PUNCH CARD HOLES ---------- */
.holes {
  display: flex; gap: 14px;
  padding: 8px 12px;
}
.holes > i {
  display: block; width: 8px; height: 12px;
  background: rgba(0,0,0,.35); border-radius: 2px;
}

/* ---------- FOCUS RINGS ---------- */
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

/* ---------- HOVER LIFT ---------- */
.lift { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.lift:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }

/* ---------- SECTION HEADER ---------- */
.h-display {
  font-size: 64px; line-height: 1.05; letter-spacing: -0.02em;
  font-weight: 800;
}
.h-section {
  font-size: 44px; line-height: 1.1; letter-spacing: -0.015em;
  font-weight: 700;
}
.h-card { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }

@media (max-width: 720px) {
  .h-display { font-size: 38px; }
  .h-section { font-size: 30px; }
  .h-card { font-size: 19px; }
}

/* slight noise on paper */
.paper-noise::after {
  content:""; position:absolute; inset:0; pointer-events:none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.08 0 0 0 0 0.04 0 0 0 0.06 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity:.4; mix-blend-mode: multiply; border-radius: inherit;
}
