/* Global Styles */

html {
  font-size: var(--font-size-base);
}

body {
  font-family: var(--font-body);
  font-size: var(--font-size-md);
  line-height: var(--line-height-normal);
  color: var(--color-black);
  background-color: var(--color-bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: var(--line-height-tight);
  color: var(--color-black);
  margin-bottom: var(--space-md);
}

h1 {
  font-size: var(--font-size-4xl);
  margin-bottom: var(--space-lg);
}

h2 {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--space-lg);
}

h3 {
  font-size: var(--font-size-2xl);
}

h4 {
  font-size: var(--font-size-xl);
}

h5 {
  font-size: var(--font-size-lg);
}

h6 {
  font-size: var(--font-size-md);
}

/* Paragraphs */
p {
  margin-bottom: var(--space-md);
  color: var(--color-grey-dark);
}

p:last-child {
  margin-bottom: 0;
}

/* Links */
a {
  color: var(--color-red);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-red-dark);
  text-decoration: underline;
}

a:focus {
  outline: 2px solid var(--color-red);
  outline-offset: 2px;
}

/* Lists */
ul,
ol {
  margin-bottom: var(--space-md);
  padding-left: var(--space-lg);
}

ul {
  list-style-type: disc;
}

ol {
  list-style-type: decimal;
}

li {
  margin-bottom: var(--space-xs);
  color: var(--color-grey-dark);
}

/* Strong */
strong,
b {
  font-weight: 600;
  color: var(--color-black);
}

/* Code */
code {
  background-color: var(--color-bg-secondary);
  padding: 0.125rem 0.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.875em;
}

/* Images */
img {
  height: auto;
  max-width: 100%;
}

/* Horizontal Rule */
hr {
  border: 0;
  height: 1px;
  background-color: var(--color-grey-light);
  margin: var(--space-lg) 0;
}

/* Selection */
::selection {
  background-color: var(--color-red);
  color: var(--color-white);
}

/* Responsive Typography */
@media (max-width: 768px) {
  h1 {
    font-size: var(--font-size-3xl);
  }

  h2 {
    font-size: var(--font-size-2xl);
  }

  h3 {
    font-size: var(--font-size-xl);
  }
}
