/* Heartbeat Kit — global styles */

:root {
  /* Brand */
  --navy: #0A0B10;
  --navy-2: #12121a;
  --navy-3: #1a1b26;
  --border: #232434;
  --border-soft: #1e1e2e;
  --cyan: #00E4A8;
  --cyan-deep: #00b585;
  --coral: #FF6F61;
  --coral-deep: #e0594c;
  --sand: #F5F3EF;
  --sand-2: #ebe8e0;
  --slate: #A3A6AB;
  --teal: #003F3D;
  --rose: #FFC2B0;
  --black: #07080D;

  /* Type */
  --f-sans: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  --f-display: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  --f-serif: 'Instrument Serif', 'Times New Roman', Georgia, serif;
  --f-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Layout */
  --gutter: 24px;
  --margin: 80px;
  --radius-card: 12px;
  --radius-btn: 8px;
  --radius-input: 6px;
  --shadow: 0 8px 24px rgba(0,0,0,0.3);
  --shadow-soft: 0 1px 0 rgba(255,255,255,0.04) inset, 0 12px 40px rgba(0,0,0,0.4);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--f-sans);
  background: var(--navy);
  color: var(--sand);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }

/* Layout */
.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}
@media (min-width: 900px) {
  .wrap { padding: 0 64px; }
}

/* Type */
.eyebrow {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate);
  font-weight: 500;
}
.h-display {
  font-family: var(--f-display);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.0;
  font-size: clamp(40px, 5.4vw, 76px);
  margin: 0;
}
.h-hero {
  font-family: var(--f-display);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 0.96;
  font-size: clamp(44px, 5.2vw, 72px);
  margin: 0;
}
.h-hero em {
  font-style: italic;
  font-family: var(--f-serif);
  font-weight: 400;
  letter-spacing: -0.005em;
  font-size: 1.08em;
}
.h-section {
  font-family: var(--f-display);
  font-weight: 500;
  letter-spacing: -0.024em;
  line-height: 1.04;
  font-size: clamp(36px, 4.4vw, 60px);
  margin: 0;
}
.h-section em {
  font-style: italic;
  font-family: var(--f-serif);
  font-weight: 400;
  font-size: 1.1em;
  letter-spacing: -0.01em;
}
.h-card {
  font-family: var(--f-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  font-size: 22px;
  margin: 0;
}
.lede {
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.45;
  color: #cfd0d6;
  max-width: 60ch;
}
.muted { color: var(--slate); }
.mono { font-family: var(--f-mono); }

/* Status dots */
.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  vertical-align: middle;
}
.dot.active {
  background: var(--cyan);
  box-shadow: 0 0 0 0 rgba(0, 228, 168, 0.5);
  animation: pulse-cyan 2s ease-out infinite;
}
.dot.firing {
  background: var(--coral);
  box-shadow: 0 0 0 0 rgba(255, 111, 97, 0.6);
  animation: pulse-coral 0.9s ease-out infinite;
}
.dot.paused {
  background: transparent;
  border: 1.5px solid var(--slate);
}
.dot.resolved {
  background: rgba(0, 228, 168, 0.5);
}
@keyframes pulse-cyan {
  0% { box-shadow: 0 0 0 0 rgba(0, 228, 168, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(0, 228, 168, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 228, 168, 0); }
}
@keyframes pulse-coral {
  0% { box-shadow: 0 0 0 0 rgba(255, 111, 97, 0.6); }
  70% { box-shadow: 0 0 0 7px rgba(255, 111, 97, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 111, 97, 0); }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: var(--radius-btn);
  border: 1px solid transparent;
  font-family: var(--f-sans);
  font-weight: 600;
  font-size: 15px;
  cursor: default;
  transition: all 160ms ease-out;
  white-space: nowrap;
}
.btn-primary {
  background: var(--cyan);
  color: var(--navy);
}
.btn-primary:hover { background: #1aebb4; transform: translateY(-1px); }
.btn-secondary {
  background: transparent;
  color: var(--sand);
  border-color: rgba(255,255,255,0.16);
}
.btn-secondary:hover { border-color: var(--cyan); color: var(--cyan); }
.btn-ghost {
  background: transparent;
  color: var(--slate);
  padding: 8px 12px;
}
.btn-ghost:hover { color: var(--sand); }
.btn-alert {
  background: var(--coral);
  color: white;
}

/* Code block */
.code {
  font-family: var(--f-mono);
  font-size: 14.5px;
  line-height: 1.7;
  background: #06070b;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 22px 24px;
  overflow-x: auto;
  color: #d6d8e0;
}
.code .kw  { color: #c9a3ff; }      /* keyword */
.code .fn  { color: var(--cyan); }
.code .str { color: #ffd8a0; }
.code .num { color: var(--coral); }
.code .com { color: #5b6076; font-style: italic; }
.code .pun { color: #5b6076; }
.code .var { color: #e8e9ee; }
.code .prop{ color: #9ec3ff; }

/* Editorial / sand inversion */
.editorial {
  background: var(--sand);
  color: var(--navy);
}
.editorial .muted { color: #5b5d63; }
.editorial .eyebrow { color: #5b5d63; }
.editorial .lede { color: #2a2b30; }

/* Section */
section { padding: 96px 0; }
@media (min-width: 900px) { section { padding: 128px 0; } }

/* Grid utility */
.row { display: flex; }
.col { display: flex; flex-direction: column; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.gap-24 { gap: 24px; } .gap-32 { gap: 32px; } .gap-48 { gap: 48px; }
.flex-1 { flex: 1; }

/* Pulse line container */
.pulse-svg {
  width: 100%;
  display: block;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .dot.active, .dot.firing { animation: none; }
}

/* Subtle scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #232434; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #2f3045; }
