/* Company website. Text first, system fonts only, no external requests. */

:root {
  color-scheme: light dark;
  --bg: #fbfaf8;
  --text: #16181d;
  --muted: #5a606b;
  --rule: #e3e0d9;
  --accent: #c2410c;
  --accent-hover: #9a3412;
  --wrap: 62rem;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
  --label: 11rem;
  --measure: 40rem;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111317;
    --text: #eceef2;
    --muted: #a4aab5;
    --rule: #2b3039;
    --accent: #ff9566;
    --accent-hover: #ffb791;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
}

/* On wider screens, no word left alone on a paragraph's last line. (On a phone WebKit's
   "pretty" evens out whole paragraphs and leaves lines short, so phones keep the default.) */
@media (min-width: 48rem) {
  body {
    text-wrap: pretty;
  }
}

main {
  flex: 1 0 auto;
}

main:focus {
  outline: none;
}

svg {
  display: block;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-hover);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

h1,
h2,
h3 {
  margin: 0 0 0.5em;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p,
ul,
dl {
  margin: 0 0 1em;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.muted {
  color: var(--muted);
}

.nowrap {
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -4rem;
  left: 1rem;
  z-index: 10;
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
  color: var(--bg);
}

/* Header and footer */

.site-header {
  border-bottom: 1px solid var(--rule);
}

.site-header__inner,
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}

.site-header__inner {
  padding-block: 1.125rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  /* A 44 px tall tap target; the negative margin keeps the header's height. */
  padding-block: 0.5rem;
  margin-block: -0.5rem;
  color: var(--text);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand:hover {
  color: var(--text);
}

.logo-mark {
  /* The width follows the logo's viewBox. build.py's HEADER_MARK_HEIGHT is this height in px. */
  width: auto;
  height: 1.875rem;
  flex: none;
}

.site-nav ul,
.site-footer__links,
.link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a,
.site-footer a {
  display: inline-block;
  /* A 44 px tall tap target (24 px of text and 10 px above and below). */
  padding-block: 0.625rem;
  color: var(--muted);
  text-decoration: none;
}

.site-nav a {
  margin-block: -0.375rem; /* laid out 32 px tall, as before */
  font-size: 0.9375rem;
}

.site-footer a {
  margin-block: -0.625rem; /* laid out one line tall, as before */
}

.site-nav a:hover,
.site-footer a:hover {
  color: var(--text);
  text-decoration: underline;
}

.site-nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.35em;
}

.site-footer {
  margin-top: clamp(2rem, 5vw, 3rem);
  padding-block: 1.75rem 2rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9375rem;
}

.site-footer__copy {
  margin: 0;
}

/* Home: who we are */

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.25rem;
  padding-block: clamp(3rem, 9vw, 6rem) clamp(2.5rem, 6vw, 4rem);
}

.intro h1 {
  max-width: 22ch;
  margin-bottom: 0.5em;
  font-size: clamp(2.125rem, 1.5rem + 2.2vw, 2.875rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.lede {
  max-width: 34rem;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.125rem, 1.02rem + 0.45vw, 1.3125rem);
  line-height: 1.55;
  text-wrap: balance;
}

.facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  align-self: start;
  margin: 0;
  padding-left: 1.25rem;
  border-left: 2px solid var(--accent);
}

.facts dt,
.band__label,
.toc__title,
.page-head__meta {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.5;
  text-transform: uppercase;
}

.facts dd {
  margin: 0.15rem 0 0;
  font-weight: 500;
  text-wrap: balance;
}

@media (min-width: 56rem) {
  .intro {
    grid-template-columns: minmax(0, 1fr) 18rem;
    column-gap: 4rem;
  }

  .facts {
    margin-top: 0.5rem;
  }
}

/* Sections: a small label beside the text on wide screens, above it on narrow ones */

.band {
  padding-block: clamp(2.25rem, 5vw, 3.25rem);
  border-top: 1px solid var(--rule);
}

.band__label {
  margin: 0 0 1rem;
}

.band__body {
  max-width: var(--measure);
}

.band__body > :last-child,
.prose > :last-child {
  margin-bottom: 0;
}

@media (min-width: 48rem) {
  .band {
    display: grid;
    grid-template-columns: var(--label) minmax(0, var(--measure));
    column-gap: 3rem;
  }

  .band__label {
    margin: 0;
    padding-top: 0.3rem;
  }
}

/* Products */

.products {
  margin: 0;
  padding: 0;
  list-style: none;
}

.product + .product {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}

.product__name {
  margin-bottom: 0.2rem;
  font-size: 1.1875rem;
}

.product__meta {
  margin-bottom: 0.75rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.product__note {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Inner pages */

.page-head {
  padding-block: clamp(2.5rem, 7vw, 4.5rem) clamp(1.75rem, 4vw, 2.5rem);
}

.page-head h1 {
  margin-bottom: 0.35em;
  font-size: clamp(2rem, 1.45rem + 2.6vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.page-head__meta {
  margin: 0;
}

.page-head--404 {
  padding-bottom: 0;
}

.page-head--404 .page-head__meta {
  margin-bottom: 0.75rem;
}

.page-head--404 .lede {
  margin-bottom: 1.75rem;
}

.band--first {
  padding-top: clamp(1.75rem, 4vw, 2.5rem);
}

.contact-email {
  margin-bottom: 0.25rem;
  font-size: 1.1875rem;
  font-weight: 600;
}

/* Privacy policy: the contents above the text on narrow screens, beside it on wide ones */

.doc {
  padding-top: clamp(1.75rem, 4vw, 2.5rem);
  border-top: 1px solid var(--rule);
}

.doc__toc {
  margin-bottom: 2rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--rule);
}

.doc__body {
  max-width: var(--measure);
}

@media (min-width: 56rem) {
  .doc {
    display: grid;
    grid-template-columns: var(--label) minmax(0, var(--measure));
    column-gap: 3rem;
    align-items: start;
  }

  .doc__toc {
    position: sticky;
    top: 1.5rem;
    margin-bottom: 0;
    padding-top: 0.2rem;
    padding-bottom: 0;
    border-bottom: 0;
  }
}

.toc__title {
  margin-bottom: 0.6rem;
}

.toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
  line-height: 1.4;
}

.toc li + li {
  margin-top: 0.55rem;
}

.toc a {
  display: inline-block;
  /* Tap targets that meet their neighbours; the negative margin keeps the spacing. */
  padding-block: 0.275rem;
  margin-block: -0.275rem;
  color: var(--muted);
  text-decoration: none;
  text-wrap: balance;
}

.toc a:hover {
  color: var(--text);
  text-decoration: underline;
}

.prose h2 {
  margin-top: 2.5rem;
  font-size: 1.375rem;
  scroll-margin-top: 1.25rem;
}

.prose h3 {
  margin-top: 1.75rem;
  font-size: 1.125rem;
  scroll-margin-top: 1.25rem;
}

.prose h2:first-child,
.prose h3:first-child {
  margin-top: 0;
}

.prose ul {
  padding-left: 1.25rem;
}

.prose li + li {
  margin-top: 0.4rem;
}

/* Support: questions and answers */

.faq__intro {
  margin-bottom: 1.5rem;
  color: var(--muted);
}

.faq__item + .faq__item {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.faq__item h3 {
  margin-bottom: 0.4rem;
  font-size: 1.0625rem;
  line-height: 1.35;
  scroll-margin-top: 1.25rem;
}

.faq__item > :last-child {
  margin-bottom: 0;
}

@media print {
  .site-nav,
  .doc__toc,
  .skip-link {
    display: none;
  }

  a {
    color: inherit;
  }
}
