/* base.css - Base typography and elements for Halvest Design System */
.hv-app, .hv-app * {
  box-sizing: border-box;
}

.hv-app {
  margin: 0;
  background-color: var(--hv-bg);
  color: var(--hv-text);
  font-family: var(--hv-font);
  font-size: 1rem;
  line-height: 1.3;
  -webkit-font-smoothing: antialiased;
}

/* Typography Classes */
.hv-display {
  font-family: var(--hv-font);
  font-size: clamp(2rem, 4vw, 3.375rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--hv-text);
}

.hv-page-title {
  font-family: var(--hv-font);
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--hv-text);
}

.hv-section-title {
  font-family: var(--hv-font);
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--hv-text);
}

.hv-card-title {
  font-family: var(--hv-font);
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.25;
  color: var(--hv-text);
}

.hv-body {
  font-family: var(--hv-font);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--hv-text);
}

.hv-body-sm {
  font-family: var(--hv-font);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--hv-text-secondary);
}

.hv-caption {
  font-family: var(--hv-font);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--hv-text-secondary);
}

.hv-amount {
  font-family: var(--hv-font);
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--hv-text);
}

.hv-numeric {
  font-variant-numeric: tabular-nums;
}

/* Accessible Focus Ring */
:where(.hv-app a, .hv-app button, .hv-app input, .hv-app select, .hv-app textarea, .hv-app summary, .hv-app [tabindex]):focus-visible {
  outline: 2px solid var(--hv-action) !important;
  outline-offset: 3px !important;
}

.hv-card--purple :focus-visible,
.hv-card--navy :focus-visible {
  outline-color: var(--hv-white) !important;
}

/* Screen-reader utility */
.hv-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Reduced Motion Override */
@media (prefers-reduced-motion: reduce) {
  .hv-app *,
  .hv-app *::before,
  .hv-app *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
