/* Cursor marketing design tokens — see Cursor-design-analysis.md */
/* Inter + JetBrains Mono: open substitutes per design doc */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400&display=swap");

:root {
  --primary: #f54e00;
  --primary-active: #d04200;
  --ink: #26251e;
  --body: #5a5852;
  --body-strong: #26251e;
  --muted: #807d72;
  --muted-soft: #a09c92;
  --hairline: #e6e5e0;
  --hairline-soft: #efeee8;
  --hairline-strong: #cfcdc4;
  --canvas: #f7f7f4;
  --canvas-soft: #fafaf7;
  --surface-card: #ffffff;
  --surface-strong: #e6e5e0;
  --on-primary: #ffffff;
  --semantic-error: #cf2d56;
  --semantic-success: #1f8a65;
  --timeline-thinking: #dfa88f;
  --timeline-grep: #9fc9a2;
  --timeline-read: #9fbbe0;
  --timeline-edit: #c0a8dd;
  --timeline-done: #c08532;

  --font-sans: Inter, system-ui, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Fira Code", monospace;

  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 9999px;

  --space-xxs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-base: 16px;
  --space-md: 20px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-xxl: 48px;
  --section: 80px;

  --max-width: 1200px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
  background: var(--canvas);
  color: var(--body);
}

/* Default in-body links: ink, underline on hover — orange reserved for primary CTAs */
a {
  color: var(--ink);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code,
kbd,
pre {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
}

.container {
  width: min(var(--max-width), calc(100% - 2 * var(--space-base)));
  margin: 0 auto;
}

@media (min-width: 900px) {
  .container {
    width: min(var(--max-width), calc(100% - 96px));
  }
}

/* Top nav — height 64px, canvas floor, hairline bottom */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 64px;
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline);
}

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-base);
  min-height: 64px;
  padding: 0;
}

.brand {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0;
  color: var(--ink);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-lg);
}

.nav a {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink);
}

.nav a:hover {
  color: var(--body);
}

/* Hero — display mega: weight 400, negative tracking, magazine voice */
.hero {
  padding: clamp(var(--space-xxl), 8vw, var(--section)) 0
    clamp(var(--space-xl), 5vw, calc(var(--section) * 0.75));
}

.hero h1 {
  margin: 0;
  max-width: min(100%, 20em);
  font-size: clamp(2.25rem, 5.2vw, 4.5rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.hero p {
  max-width: 52ch;
  margin-top: var(--space-lg);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--body);
}

/* Section label / badge — caption-uppercase + surface-strong (not brand orange) */
.pill {
  display: inline-block;
  margin-bottom: var(--space-md);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--surface-strong);
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.88px;
  text-transform: uppercase;
}

/* Section rhythm — 80px vertical bands */
.section {
  padding: 0 0 clamp(var(--space-xxl), 6vw, var(--section));
}

.section-title {
  margin: 0 0 var(--space-lg);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.11px;
  color: var(--ink);
}

.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* Feature card — white on cream, hairline only, no shadow */
.card {
  background: var(--surface-card);
  color: var(--ink);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.card h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
  color: var(--ink);
}

.card p {
  margin: var(--space-sm) 0 var(--space-base);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--body);
}

.card a:not(.btn) {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}

.meta {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--muted);
}

/* Inner page titles — display-lg */
.list-page-intro {
  padding: clamp(var(--space-xl), 5vw, var(--space-xxl)) 0 var(--space-base);
}

.list-page-intro .meta:first-child {
  margin-bottom: var(--space-sm);
}

.list-page-intro h1 + .meta {
  margin-top: var(--space-sm);
}

.list-page-intro h1 + p {
  margin-top: var(--space-md);
  max-width: 52ch;
  font-size: 16px;
  line-height: 1.5;
  color: var(--body);
}

.list-page-intro h1 {
  margin: 0;
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.72px;
  color: var(--ink);
}

/* Primary CTA — Cursor Orange, 8px radius, scarcely used */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  border-radius: var(--radius-md);
  padding: 10px 18px;
  min-height: 40px;
  box-sizing: border-box;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  border: 1px solid transparent;
}

.btn-primary:hover {
  background: var(--primary-active);
  color: var(--on-primary);
}

.btn-secondary {
  background: var(--surface-card);
  color: var(--ink);
  border: 1px solid var(--hairline);
  padding: 9px 17px;
}

.btn-secondary:hover {
  border-color: var(--hairline-strong);
  background: var(--canvas-soft);
}

/* Footer — body text color, generous padding */
.site-footer {
  margin-top: clamp(var(--space-xl), 4vw, var(--space-xxl));
  padding: clamp(40px, 6vw, 64px) 0;
  border-top: 1px solid var(--hairline);
  background: var(--canvas);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--body);
}

.site-footer a {
  color: var(--body);
}

.site-footer a:hover {
  color: var(--ink);
}

@media (max-width: 700px) {
  .site-header .inner {
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-sm) 0;
    min-height: unset;
  }

  .nav {
    gap: var(--space-base);
  }
}
