/* SWMS Link public website. Tokens from DESIGN.md. Text sizes in rem so phone text settings apply. */

@font-face {
  font-family: "Overpass";
  src: url("/fonts/overpass-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/fonts/atkinson-next-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Mono";
  src: url("/fonts/atkinson-mono-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --teal: #0bb5b0;
  --teal-hover: #09a29e;
  --deep: #04302f;
  --deep-hover: #0a4644;
  --pale: #e7f8f7;
  --teal-text: #077370;
  --muted: #3d5c5b;
  --hivis: #dfff00;
  --white: #ffffff;
  --rule: #9fb3b2;
  --display: "Overpass", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --sans: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Atkinson Hyperlegible Mono", ui-monospace, Menlo, Consolas, monospace;
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;
  --gutter: clamp(1rem, 4.5vw, 4rem);
  color-scheme: light;
}

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

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

/* The page is a column at least the screen's height, so on short pages (thank-you, unsubscribe) the footer sits at the
   bottom of the screen instead of halfway up. */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--white);
  color: var(--deep);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
}

table,
.doc,
.receipt-log {
  font-variant-numeric: tabular-nums;
}

::selection {
  background: var(--hivis);
  color: var(--deep);
}

img,
svg {
  max-width: 100%;
}

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

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

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 800;
  text-wrap: balance;
  letter-spacing: -0.01em;
}

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

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 10;
  background: var(--deep);
  color: var(--white);
  padding: 0.75rem 1rem;
  border-radius: var(--r-md);
  font-weight: 700;
}
.skip-link:focus {
  top: 0.75rem;
}

/* Logo: the wordmark is the only place the name is one word. */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--deep);
  text-decoration: none;
}
.logo-icon {
  flex: none;
}
.wordmark {
  font-family: var(--display);
  font-size: 1.375rem;
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.wm-swms {
  font-weight: 900;
}
.wm-link {
  position: relative;
  z-index: 0;
  display: inline-block;
  font-weight: 400;
}
.wm-link::before {
  content: "";
  position: absolute;
  left: -0.08em;
  right: -0.12em;
  bottom: 0.02em;
  height: 0.42em;
  border-radius: 0.08em;
  background: var(--hivis);
  transform: skew(-12deg) rotate(-2deg);
  z-index: -1;
}
.wordmark-two .wm-link::before {
  background: var(--pale);
}
.wm-l {
  font-family: var(--sans);
  font-weight: 500;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.6875rem 1.125rem;
  border: 2px solid transparent;
  border-radius: var(--r-md);
  font: 700 1rem/1.375 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 120ms ease-out;
}
.btn-primary {
  background: var(--deep);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--deep-hover);
}
.btn-teal {
  background: var(--teal);
  border-color: var(--deep);
  color: var(--deep);
}
.btn-teal:hover {
  background: var(--teal-hover);
}
.btn-small {
  padding-block: 0.5rem;
  font-size: 0.9375rem;
}
.btn-wide {
  width: 100%;
}

.text-link {
  font-weight: 700;
}

/* Header: white, with a pale rule, so each page's first section sets its own ground. */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--pale);
}
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}
.site-nav {
  display: none;
}
.site-nav a {
  color: var(--deep);
  font-weight: 700;
  text-decoration: none;
}
.site-nav a:hover {
  text-decoration: underline;
}

/* Board: a white card under a teal band (the thank-you page). */
.board {
  background: var(--white);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.board-band {
  height: 0.875rem;
  background: var(--teal);
}
.board-body {
  padding: 1.25rem 1.25rem 1.5rem;
}
/* Sections */
.section {
  padding-block: 3rem;
}
.section-pale {
  background: var(--pale);
}
.section h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 4.5vw, 2.375rem);
  line-height: 1.12;
}
.lede {
  max-width: 40rem;
  margin: 0 0 2rem;
  font-size: 1.125rem;
}

.ticks,
.price-notes {
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}
.ticks li,
.price-notes li {
  position: relative;
  padding: 0.3rem 0 0.3rem 1.75rem;
}
.ticks li::before,
.price-notes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 1.125rem;
  height: 1.125rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 8.5l3.5 3.5 7.5-8' fill='none' stroke='%23077370' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

/* Early-access form: a board on the deep-teal ground. */
.section-signup {
  background: var(--deep);
}
.board-form {
  max-width: 40rem;
  margin-inline: auto;
}
.board-form h2 {
  margin: 0 0 0.5rem;
}
.board-form .board-body > p {
  margin: 0 0 1.25rem;
}
.form-summary {
  margin: 0 0 1.25rem;
  padding: 0.75rem 1rem;
  border: 2px solid var(--deep);
  border-radius: var(--r-md);
  background: var(--pale);
  font-weight: 700;
}
.signup {
  display: grid;
  gap: 1.125rem;
}
.field {
  display: grid;
  gap: 0.375rem;
}
.field label {
  font-weight: 700;
}
.optional {
  color: var(--muted);
  font-weight: 400;
}
.field input,
.field select {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.5625rem 0.75rem;
  border: 1px solid var(--muted);
  border-radius: var(--r-md);
  background: var(--white);
  color: var(--deep);
  font: 400 1rem/1.5 var(--sans);
}
.field [aria-invalid="true"] {
  border: 2px solid var(--deep);
}
.field-error {
  margin: 0;
  font-weight: 700;
}
.field-row {
  display: grid;
  gap: 1.125rem;
}
.form-check {
  display: grid;
  grid-template-columns: 1.5rem 1fr;
  gap: 0.625rem;
  align-items: start;
}
.form-check input {
  width: 1.375rem;
  height: 1.375rem;
  margin: 0.1rem 0 0;
  accent-color: var(--deep);
}
.form-notice {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
}

/* Footer */
.site-footer {
  background: var(--deep);
  color: var(--white);
  padding-block: 2.5rem;
}
.site-footer a {
  color: var(--white);
}
.site-footer .logo,
.site-footer .wordmark {
  color: var(--white);
}
.site-footer-inner {
  display: grid;
  gap: 1.25rem;
}
.footer-brand p {
  margin: 0.75rem 0 0;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}
.footer-contact,
.footer-legal {
  margin: 0;
}
.footer-legal {
  color: var(--pale);
  font-size: 0.875rem;
}

/* Legal pages */
.prose {
  max-width: 46rem;
}
.prose h1 {
  margin: 0 0 0.25rem;
  font-size: clamp(2rem, 5vw, 2.5rem);
  line-height: 1.1;
}
.prose-updated {
  margin: 0 0 1.5rem;
  color: var(--muted);
}
.prose h2 {
  margin: 2.25rem 0 0.75rem;
  font-size: 1.375rem;
}
.prose h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.125rem;
}
.prose ul {
  padding-left: 1.25rem;
}
.prose li {
  margin: 0.375rem 0;
}
.prose code {
  font-family: var(--mono);
  font-size: 0.9375rem;
}

@media (min-width: 40rem) {
  .field-row {
    grid-template-columns: 1fr 1fr;
  }
  .btn-wide {
    width: auto;
  }
}

@media (min-width: 64rem) {
  .site-nav {
    display: flex;
    gap: 1.75rem;
  }
  .section {
    padding-block: 5rem;
  }
  .site-footer-inner {
    grid-template-columns: 1.5fr 1fr 1fr;
    align-items: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: none;
  }
}

/* Sample SWMS page: the real rendered document on a white page. Wide tables scroll inside the frame on phones. */
.sample-intro .ticks {
  max-width: 46rem;
}
.sample-intro p {
  max-width: 46rem;
}
.doc-frame {
  max-width: 56rem;
  margin-inline: auto;
  padding: 1.25rem;
  overflow-x: auto;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
}
.doc-frame .swms-doc {
  min-width: 40rem;
}
.sample-doc {
  padding-block: 3rem;
}
/* The print banner is fixed to each PDF page; on the website it sits at the top of the document instead. */
.doc-frame .swms-doc.has-banner {
  padding-top: 0;
}
.doc-frame .swms-doc .draft-banner {
  position: static;
  margin-bottom: 1rem;
}
/* The rendered document keeps its own type: stop the site's heading rules reaching inside it. */
.swms-doc h1,
.swms-doc h2,
.swms-doc h3 {
  font-family: inherit;
  letter-spacing: normal;
  text-wrap: wrap;
}
@media (min-width: 64rem) {
  .doc-frame {
    padding: 2.5rem 3rem;
  }
}

main {
  flex: 1 0 auto;
}
