/* Body text uses Open Sans; headings keep the serif (EB Garamond). */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700&display=swap');

/*
 * Content font sizes: selectors use `body .text-*` so they win over Tailwind CDN
 * utilities (injected after this file in the cascade). Sizes are set a touch
 * below standard for a compact reading size, with slightly tightened tracking.
 */

html {
  scroll-padding-top: 6rem;
}

html body {
  font-size: 0.9375rem;
  line-height: 1.5;
  letter-spacing: -0.011em;
  /* Offset for fixed site header so content is not hidden under the bar */
  padding-top: 6rem;
}

/*
 * Font families. Each page sets a serif `font-family` inline on <body>; the
 * `!important` here overrides that so body copy is sans-serif, while headings
 * (including any with their own inline serif) stay on the serif.
 */
html body {
  font-family: 'Open Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'EB Garamond', Georgia, serif !important;
  letter-spacing: -0.02em;
}

body .text-xs {
  font-size: 0.7rem;
  line-height: 0.95rem;
}

body .text-sm {
  font-size: 0.8125rem;
  line-height: 1.2rem;
}

body .text-base {
  font-size: 0.9375rem;
  line-height: 1.45rem;
}

body .text-lg {
  font-size: 1.0625rem;
  line-height: 1.65rem;
}

/* Footer (#footer): slightly smaller than main content */
#footer .text-xs {
  font-size: 0.8rem;
  line-height: 1.05rem;
}

#footer .text-sm {
  font-size: 0.9rem;
  line-height: 1.3rem;
}

#footer .text-xl {
  font-size: 1.2rem;
  line-height: 1.65rem;
}

.text-xl {
  font-size: 1.15rem;
  line-height: 1.6rem;
}

.text-2xl {
  font-size: 1.375rem;
  line-height: 1.85rem;
}

.text-3xl {
  font-size: 1.75rem;
  line-height: 2.1rem;
}

.text-4xl {
  font-size: 2rem;
  line-height: 2.3rem;
}

.text-5xl {
  font-size: 2.65rem;
  line-height: 1.05;
}

@media (min-width: 640px) {
  .sm\:text-4xl {
    font-size: 2rem;
    line-height: 2.3rem;
  }

  .sm\:text-5xl {
    font-size: 2.65rem;
    line-height: 1.05;
  }
}

@media (min-width: 768px) {
  .md\:text-xl {
    font-size: 1.15rem;
    line-height: 1.6rem;
  }

  .md\:text-2xl {
    font-size: 1.375rem;
    line-height: 1.85rem;
  }

  .md\:text-3xl {
    font-size: 1.75rem;
    line-height: 2.1rem;
  }

  .md\:text-4xl {
    font-size: 2rem;
    line-height: 2.3rem;
  }

  .md\:text-5xl {
    font-size: 2.65rem;
    line-height: 1.05;
  }
}
