/* Typography + body + global helpers */

body {
  margin: 0;
  background-color: var(--color-bg);
  background-image: var(--noise);
  background-repeat: repeat;
  background-size: 120px 120px;
  color: var(--color-text-primary);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.font-display {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-optical-sizing: auto;
  letter-spacing: -0.01em;
}

.font-mono, code, pre, kbd {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-feature-settings: "ss02", "cv02";
}

h1 { font-size: 1.875rem; font-weight: 600; letter-spacing: -0.02em; }
h2 { font-size: 1.5rem;   font-weight: 600; letter-spacing: -0.015em; }
h3 { font-size: 1.25rem;  font-weight: 600; }
h4 { font-size: 1rem;     font-weight: 600; }

.text-secondary { color: var(--color-text-secondary); }
.text-muted     { color: var(--color-text-muted); }
.text-primary-fg{ color: var(--color-primary-fg); }
.text-primary-c { color: var(--color-primary); }

.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Animations */
@keyframes thinking-dot {
  0%, 80%, 100% { opacity: 0.3; transform: translateY(0); }
  40%           { opacity: 1;   transform: translateY(-2px); }
}
@keyframes press {
  0%   { transform: scale(1); }
  50%  { transform: scale(0.97); }
  100% { transform: scale(1); }
}
@keyframes voiceWave {
  from { transform: scaleY(0.35); opacity: 0.45; }
  to   { transform: scaleY(1);    opacity: 1; }
}
@keyframes voicePulse {
  0%   { transform: scale(1);   opacity: 0.7; }
  100% { transform: scale(1.5); opacity: 0; }
}
@keyframes fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.thinking-dot { animation: thinking-dot 1.2s ease-in-out infinite; }
.fade-in      { animation: fade-in 240ms cubic-bezier(0.22, 1, 0.36, 1) both; }
