/* Wugga Workbench public pages: /workbench/workbench.css */

@font-face {
  font-family: "DM Sans";
  src: url("/dm-sans-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
}

:root {
  --cream: #eae7dd;
  --ink: #24261f;
  --yellow: #ffd044;
  --muted: #4e5047;
  --rule: rgb(36 38 31 / 0.2);
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --page: 70rem;
  --measure: 36em;
  color-scheme: light;
}

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

html {
  background-color: var(--cream);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  border-top: 0.375rem solid var(--yellow);
  background-color: var(--cream);
  color: var(--ink);
  font-family: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  overflow-wrap: break-word;
}

::selection {
  background-color: var(--yellow);
  color: var(--ink);
}

img {
  display: block;
  max-width: 100%;
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--page));
  margin-inline: auto;
}

/* Links and focus */

a {
  color: var(--ink);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a[href^="tel:"] {
  white-space: nowrap;
}

a:focus-visible {
  outline: 3px solid transparent;
  background-color: var(--yellow);
  box-shadow: 0 -2px var(--yellow), 0 4px var(--ink);
  color: var(--ink);
  text-decoration: none;
}

.brand:focus-visible,
.site-nav a:focus-visible,
.doc-links a:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
  box-shadow: none;
}

@media (hover: hover) {
  a:hover {
    text-decoration-thickness: 2px;
  }

  .brand:hover span {
    text-decoration-line: underline;
    text-decoration-thickness: 2px;
  }

  .site-nav a:hover,
  .doc-links a:hover {
    background-color: var(--yellow);
  }
}

.skip-link {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 1;
  padding: 0.625rem 1rem;
  background-color: var(--yellow);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:not(:focus) {
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Header */

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

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.75rem;
  margin-inline: -0.375rem;
  padding: 0.25rem 0.375rem;
  border-radius: 0.375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-decoration: none;
}

.brand img {
  flex: none;
  width: auto;
  height: 2.25rem;
  max-width: 4.5rem;
  object-fit: contain;
}

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

.site-nav a {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.375rem 0.625rem;
  border-radius: 0.375rem;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  font-weight: 600;
  text-decoration-line: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.45em;
}

/* Document */

main {
  flex: 1 0 auto;
}

.doc-header {
  padding-block: clamp(3rem, 9vw, 6rem) clamp(2.5rem, 6vw, 4rem);
}

h1,
h2 {
  margin: 0;
  text-wrap: balance;
}

h1 {
  max-width: 18ch;
  font-size: clamp(2.375rem, 1.6rem + 3.6vw, 4.25rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.04;
}

.intro {
  max-width: 30em;
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: clamp(1.1875rem, 1.06rem + 0.55vw, 1.4375rem);
  line-height: 1.45;
  text-wrap: pretty;
}

.doc-links {
  display: grid;
  gap: 0.75rem;
  max-width: 46rem;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
}

.doc-links li {
  display: flex;
}

.doc-links a {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.5rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--ink);
  border-radius: 0.5rem;
  font-weight: 500;
  line-height: 1.35;
  text-decoration: none;
}

.doc-links a::after {
  content: "";
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.125rem;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

.doc-body {
  padding-bottom: clamp(3rem, 8vw, 5rem);
  border-top: 2px solid var(--ink);
}

.doc-body section {
  display: grid;
  gap: 0.625rem clamp(2rem, 5vw, 4rem);
  padding-block: clamp(1.75rem, 4vw, 2.75rem);
  border-bottom: 1px solid var(--rule);
}

.doc-body section:last-child {
  border-bottom: 0;
}

h2 {
  max-width: 22ch;
  font-size: clamp(1.1875rem, 1.1rem + 0.35vw, 1.375rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.doc-body p {
  max-width: var(--measure);
  margin: 0;
  line-height: 1.7;
  text-wrap: pretty;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--rule);
  font-size: 0.9375rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2.5rem;
  padding-block: 2rem 2.5rem;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.125rem;
  font-style: normal;
}

.footer-company,
.footer-nav a[aria-current="page"] {
  font-weight: 600;
}

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

.site-footer a {
  display: inline-block;
  padding-block: 0.25rem;
}

/* Wider screens */

@media (min-width: 40em) {
  .doc-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-contact {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 1.5rem;
  }
}

@media (min-width: 52em) {
  .doc-body section {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    align-items: start;
  }
}

@media print {
  body {
    border-top: 0;
  }

  .skip-link,
  .site-nav,
  .doc-links,
  .footer-nav {
    display: none;
  }

  .doc-body section {
    break-inside: avoid;
  }
}
