/* Heed — Design tokens */
:root {
  --bg: #fafaf7;
  --surface: #ffffff;
  --text-primary: #1a1a1a;
  --text-secondary: #5c5c5c;
  --text-muted: #8a8a8a;
  --border: #ebebe7;
  --border-strong: #d4d4d0;

  --accent: #145c4e;
  --accent-dark: #0c3830;
  --accent-tint: #e8f1ee;

  --success: #1a7a4e;
  --warning: #b8860b;
  --danger: #b83232;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --container: 1120px;
  --reading: 640px;

  --font-sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'ss01', 'cv11';
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* Type */
.eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: '';
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

.display {
  font-size: clamp(40px, 6vw, 56px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0;
}
.h1 {
  font-size: clamp(30px, 4vw, 40px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
}
.h2 {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0;
}
.h3 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 0;
}
.body-lg {
  font-size: 18px;
  line-height: 1.55;
  color: var(--text-secondary);
}
.body-sm {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
}
.caption {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: var(--text-muted);
}

.tabular { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-muted); }
.secondary { color: var(--text-secondary); }

/* Layout */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: clamp(72px, 12vw, 128px) 0; }
section + section { padding-top: 0; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.btn-secondary {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text-primary);
  font-weight: 500;
}
.btn-secondary:hover { background: var(--surface); border-color: var(--text-primary); }

.btn-text {
  background: transparent;
  color: var(--text-primary);
  font-weight: 500;
  padding: 6px 0;
  gap: 6px;
}
.btn-text .arrow { transition: transform 160ms ease; }
.btn-text:hover .arrow { transform: translateX(2px); }

/* Card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

/* Demo container */
.demo-shell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* Step circle */
.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  flex-shrink: 0;
}

/* Divider */
.hr {
  height: 1px;
  background: var(--border);
  border: 0;
  margin: 0;
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 250, 247, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}
.nav.scrolled { border-bottom-color: var(--border); }

/* Inline mono / code */
.mono {
  font-family: var(--font-mono);
  font-size: 13px;
}

/* Stars */
.stars { display: inline-flex; gap: 2px; }

/* Subtle entrance */
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.rise { animation: rise 500ms ease-out both; }

/* Focus visibility */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Selection */
::selection { background: var(--accent-tint); color: var(--accent-dark); }
