/*
 * Type scale. Heading elements get their size from their level; the classes give any element
 * that size, so a section heading can be an h2 that looks like an h3.
 * Headings are Raleway at the regular weight with a little letter spacing, as on the old site.
 */

@layer type {
  /* h1 is every page's title (hero, shop, product, basket, checkout, account, showroom): one style, with
     capitals only on photo heroes (sections.css) */
  h1, .h1 { font-size: var(--text-h1); line-height: var(--leading-heading); font-weight: var(--weight-normal); letter-spacing: var(--tracking-heading); }
  h2, .h2 { font-size: var(--text-h2); line-height: var(--leading-heading); font-weight: var(--weight-normal); letter-spacing: var(--tracking-heading); }
  h3, h4, .h3 { font-size: var(--text-h3); line-height: var(--leading-heading); font-weight: var(--weight-normal); letter-spacing: normal; }

  .lead { font-size: var(--text-lead); line-height: var(--leading-snug); }
  .small { font-size: var(--text-small); line-height: var(--leading-snug); }

  /* Text from the editor */
  .prose {
    max-width: var(--measure);

    & > * + * { margin-top: var(--flow-space); }
    & > :is(h2, h3, h4) { margin-top: var(--space-xl); }
    & > :is(h2, h3, h4) + * { margin-top: var(--space-s); }
    & :is(ul, ol) { padding-left: var(--list-indent); }
    & li + li { margin-top: var(--space-2xs); }
    & table { width: 100%; }
    & :is(th, td) { border-bottom: 1px solid var(--color-line); padding: var(--space-2xs) var(--space-xs) var(--space-2xs) 0; text-align: left; vertical-align: top; }
    & th { font-weight: var(--weight-bold); }
  }

  /* Links in text look like links: dark and underlined, with a thicker line on hover. The showroom details
     (sections.css) use it too; WooCommerce's links in text copy it (plugins/woocommerce.css). */
  :is(.prose, .showroom-info) a {
    color: var(--color-ink); text-decoration: underline; text-decoration-thickness: 1px;
    &:hover { text-decoration-thickness: 2px; }
  }
}
