/* ========================================
   Tempo Design System - Typography
   macOS Type Scale
======================================== */

/* ========================================
   FONT FAMILY
======================================== */
:root {
  --font-primary: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Monaco', 'Menlo', monospace;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Border Radius */
  --rounded-none: 0px;
  --rounded-sm: 4px;
  --rounded-macos: 6px;
  --rounded-base: 8px;
  --rounded-lg: 10px;
  --rounded-xl: 12px;
  --rounded-2xl: 16px;
  --rounded-3xl: 20px;
  --rounded-full: 9999px;
}

/* ========================================
   TYPE SCALE
   macOS-style sizing
======================================== */

/* Caption 2 - 10px */
.text-caption-2 {
  font-size: 0.625rem;      /* 10px */
  line-height: 1.4;
  font-weight: var(--font-weight-regular);
  letter-spacing: 0.02em;
}

/* Caption 1 - 11px */
.text-caption-1 {
  font-size: 0.6875rem;     /* 11px */
  line-height: 1.4;
  font-weight: var(--font-weight-regular);
  letter-spacing: 0.01em;
}

/* Footnote - 12px */
.text-footnote {
  font-size: 0.75rem;       /* 12px */
  line-height: 1.4;
  font-weight: var(--font-weight-regular);
  letter-spacing: 0.01em;
}

/* Body - 13px (macOS standard) */
.text-body {
  font-size: 0.8125rem;     /* 13px */
  line-height: 1.45;
  font-weight: var(--font-weight-regular);
  letter-spacing: -0.01em;
}

/* Callout - 14px */
.text-callout {
  font-size: 0.875rem;      /* 14px */
  line-height: 1.4;
  font-weight: var(--font-weight-regular);
  letter-spacing: -0.01em;
}

/* Subheadline - 15px */
.text-subhead {
  font-size: 0.9375rem;     /* 15px */
  line-height: 1.35;
  font-weight: var(--font-weight-medium);
}

/* Headline - 17px */
.text-headline {
  font-size: 1.0625rem;     /* 17px */
  line-height: 1.3;
  font-weight: var(--font-weight-semibold);
}

/* Title 3 - 20px */
.text-title-3 {
  font-size: 1.25rem;       /* 20px */
  line-height: 1.3;
  font-weight: var(--font-weight-semibold);
}

/* Title 2 - 22px */
.text-title-2 {
  font-size: 1.375rem;      /* 22px */
  line-height: 1.25;
  font-weight: var(--font-weight-semibold);
}

/* Title 1 - 24px */
.text-title-1 {
  font-size: 1.5rem;        /* 24px */
  line-height: 1.2;
  font-weight: var(--font-weight-bold);
}

/* Large Title - 32px */
.text-large-title {
  font-size: 2rem;          /* 32px */
  line-height: 1.15;
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.02em;
}

/* Window Title - 40px */
.text-window-title {
  font-size: 2.5rem;        /* 40px */
  line-height: 1.1;
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.02em;
}

/* Header / H1 - 48px */
.text-header {
  font-size: 3rem;          /* 48px */
  line-height: 1.05;
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.03em;
}

/* ========================================
   TEXT UTILITIES
======================================== */

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.text-disabled { color: var(--text-disabled); }
.text-error { color: var(--error); }
.text-warning { color: var(--warning); }
.text-success { color: var(--success); }

/* Text alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Text transforms */
.text-uppercase { text-transform: uppercase; letter-spacing: 0.05em; }
.text-lowercase { text-transform: lowercase; }
.text-capitalize { text-transform: capitalize; }

/* Font weights */
.font-regular { font-weight: var(--font-weight-regular); }
.font-medium { font-weight: var(--font-weight-medium); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-bold { font-weight: var(--font-weight-bold); }

/* Font families */
.font-primary { font-family: var(--font-primary); }
.font-mono { font-family: var(--font-mono); }

/* Line height utilities */
.leading-tight { line-height: 1.2; }
.leading-normal { line-height: 1.5; }
.leading-relaxed { line-height: 1.75; }

/* Truncation */
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ========================================
   MARKDOWN STYLES (for PRD editor)
======================================== */

.markdown h1 {
  font-size: 1.5rem;
  font-weight: var(--font-weight-bold);
  margin-bottom: 0.5em;
  color: var(--text-primary);
}

.markdown h2 {
  font-size: 1.25rem;
  font-weight: var(--font-weight-semibold);
  margin-top: 1em;
  margin-bottom: 0.5em;
  color: var(--text-primary);
}

.markdown h3 {
  font-size: 1.0625rem;
  font-weight: var(--font-weight-semibold);
  margin-top: 0.75em;
  margin-bottom: 0.5em;
  color: var(--text-primary);
}

.markdown p {
  margin-bottom: 0.75em;
  color: var(--text-primary);
}

.markdown ul, .markdown ol {
  margin-bottom: 0.75em;
  padding-left: 1.5em;
  color: var(--text-primary);
}

.markdown li {
  margin-bottom: 0.25em;
}

.markdown code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background-color: var(--surf-container-high);
  padding: 0.125em 0.375em;
  border-radius: 4px;
}

.markdown pre {
  background-color: var(--surf-container-high);
  padding: 0.75em;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 0.75em;
}

.markdown pre code {
  background-color: transparent;
  padding: 0;
}

.markdown blockquote {
  border-left: 3px solid var(--outline);
  padding-left: 1em;
  margin-left: 0;
  margin-bottom: 0.75em;
  color: var(--text-secondary);
  font-style: italic;
}

.markdown a {
  color: var(--brand-purple);
  text-decoration: underline;
}

.markdown hr {
  border: none;
  border-top: 1px solid var(--outline-variant);
  margin: 1em 0;
}
