/* ============================================================
   HELIX DESIGN SYSTEM — Living Systems
   Tokens + base styles for the spec sheet
   ============================================================ */

/* ---------- TOKENS ---------- */
:root {
  /* Paper & Ink */
  --paper:        #F1ECE0;  /* canvas */
  --paper-soft:   #F6F2E8;  /* slight lift */
  --bone:         #E4DDCB;  /* hairline / divider */
  --bone-deep:    #CFC6B0;  /* stronger divider */
  --ink:          #0C1721;  /* primary text & buttons */
  --ink-soft:     #1A2530;  /* hover / pressed */
  --carbon:       #28323D;  /* secondary text */
  --slate:        #5E6B77;  /* tertiary text, labels */
  --slate-soft:   #8A95A0;  /* placeholder, disabled */

  /* Signal & Pulse */
  --signal:       #C7F23F;  /* live data, primary accent */
  --signal-deep:  #9CC02A;  /* hover state of signal */
  --signal-wash:  #E9F8B6;  /* tinted background */
  --pulse:        #E85D2F;  /* alerts, activity, notifications */
  --pulse-soft:   #F4B59C;
  --pulse-wash:   #FBE5D9;

  /* Semantic */
  --ok:           #2F7A55;
  --warn:         #B8761D;
  --error:        #C0392F;
  --info:         #2A5B8F;

  /* Type */
  --font-serif:   "Instrument Serif", "Cormorant Garamond", Georgia, serif;
  --font-sans:    "Geist", "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    "Geist Mono", "JetBrains Mono", ui-monospace, monospace;

  /* Spacing — 4pt base */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px;
  --s-12: 48px; --s-16: 64px; --s-20: 80px; --s-24: 96px;
  --s-32: 128px;

  /* Radii — sparse, mostly square */
  --r-0: 0;     --r-1: 2px;   --r-2: 4px;
  --r-3: 8px;   --r-pill: 999px;

  /* Elevation — restrained */
  --shadow-1: 0 1px 0 rgba(12,23,33,0.06);
  --shadow-2: 0 1px 2px rgba(12,23,33,0.06), 0 4px 12px rgba(12,23,33,0.04);
  --shadow-3: 0 2px 4px rgba(12,23,33,0.08), 0 12px 32px rgba(12,23,33,0.08);

  /* Layout */
  --container: 1280px;
  --gutter: 32px;
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }

/* ---------- TYPOGRAPHY UTILITIES ---------- */
.serif   { font-family: var(--font-serif); font-weight: 400; letter-spacing: -0.01em; }
.serif-i { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
.mono    { font-family: var(--font-mono); font-feature-settings: "ss01"; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate);
}
.eyebrow .dot {
  display: inline-block;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--signal);
  margin-right: 8px; vertical-align: middle;
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(199,242,63,0.25);
}

/* ---------- PAGE FRAME ---------- */
.frame {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* The top page meta strip */
.runner {
  border-top: 1px solid var(--bone-deep);
  border-bottom: 1px solid var(--bone-deep);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
  background: rgba(241, 236, 224, 0.92);
}
.runner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate);
}
.runner nav { display: flex; gap: 24px; }
.runner nav a { text-decoration: none; color: var(--slate); transition: color .15s ease; }
.runner nav a:hover { color: var(--ink); }
.runner .live {
  display: inline-flex; align-items: center; gap: 8px;
}
.runner .live::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 3px rgba(199,242,63,0.25);
  animation: livepulse 2s ease-in-out infinite;
}
@keyframes livepulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(199,242,63,0.25); }
  50%      { box-shadow: 0 0 0 6px rgba(199,242,63,0.10); }
}

/* ---------- SECTION SCAFFOLD ---------- */
section.spec {
  border-top: 1px solid var(--bone-deep);
  padding: var(--s-24) 0 var(--s-20);
  position: relative;
}
section.spec:first-of-type { border-top: 0; }

.spec-head {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: var(--s-12);
  margin-bottom: var(--s-12);
  align-items: start;
}
.spec-head .num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--slate);
  text-transform: uppercase;
  border-top: 1px solid var(--ink);
  padding-top: var(--s-3);
}
.spec-head h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0 0 var(--s-4);
}
.spec-head h2 em { font-style: italic; color: var(--carbon); }
.spec-head .lede {
  font-size: 17px;
  line-height: 1.55;
  color: var(--carbon);
  max-width: 64ch;
  margin: 0;
}

/* ---------- CARDS / TILES ---------- */
.tile {
  background: var(--paper-soft);
  border: 1px solid var(--bone-deep);
  padding: var(--s-6);
  position: relative;
}
.tile .label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate);
}

/* ---------- TINY UI BITS ---------- */
.kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--paper);
  border: 1px solid var(--bone-deep);
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--carbon);
}

.divider-thin { height: 1px; background: var(--bone-deep); }
.divider-thick { height: 2px; background: var(--ink); }
