/* Base typography and body */

@font-face {
  font-family: 'Fraunces';
  src: url('/static/fonts/fraunces-latin-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('/static/fonts/inter-latin-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('/static/fonts/inter-latin-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('/static/fonts/jetbrains-mono-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('/static/fonts/jetbrains-mono-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

body {
  font-family: var(--font-sans);
  font-weight: 400;
  color: var(--text-primary);
  background-color: var(--bg-base);
}

/* Typographic scale */

.display-2xl {
  font-family: var(--font-display);
  font-size: 88px;
  line-height: 0.95;
  letter-spacing: -0.035em;
  font-weight: 400;
}

.display-xl {
  font-family: var(--font-display);
  font-size: 72px;
  line-height: 1.0;
  letter-spacing: -0.030em;
  font-weight: 400;
}

.display-lg {
  font-family: var(--font-display);
  font-size: 56px;
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 400;
}

.display-md {
  font-family: var(--font-display);
  font-size: 40px;
  line-height: 1.10;
  letter-spacing: -0.020em;
  font-weight: 400;
}

.display-sm {
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -0.015em;
  font-weight: 400;
}

.display-xs {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.20;
  letter-spacing: -0.010em;
  font-weight: 400;
}

.body-xl {
  font-size: 20px;
  line-height: 1.55;
}

.body-lg {
  font-size: 18px;
  line-height: 1.60;
}

.body-md {
  font-size: 16px;
  line-height: 1.60;
}

.body-sm {
  font-size: 14px;
  line-height: 1.55;
}

.caption {
  font-size: 13px;
  line-height: 1.50;
}

.micro {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.40;
  letter-spacing: 0.080em;
  text-transform: uppercase;
}

.data-lg {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.20;
  letter-spacing: -0.010em;
}

.data-md {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.30;
}

.code {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
}

/* Links */

a {
  transition: color var(--duration-default) var(--ease-default);
}

a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}

/* Selection */

::selection {
  background: var(--accent-soft);
  color: var(--text-primary);
}

/* Mobile typography overrides */

@media (max-width: 768px) {
  .display-2xl {
    font-size: 48px;
    line-height: 1.0;
    letter-spacing: -0.025em;
  }

  .display-xl {
    font-size: 40px;
    line-height: 1.05;
    letter-spacing: -0.020em;
  }

  .display-lg {
    font-size: 36px;
    line-height: 1.10;
    letter-spacing: -0.020em;
  }

  .display-md {
    font-size: 32px;
    line-height: 1.15;
    letter-spacing: -0.015em;
  }

  .display-sm {
    font-size: 28px;
    line-height: 1.20;
    letter-spacing: -0.010em;
  }
}
