/* Trutt website. One file, no imports, no web fonts: the pages make no
   request to any other host, which the privacy notice promises. */

:root {
  --paper: #FAFAF8;
  --ink: #1B1B1A;
  --accent: #3557A0;
  --muted: #5E5E5A;
  --hairline: #E3E2DC;
  --wash: #F1F0EA;
  --accent-wash: #E9EDF7;
  --on-accent: #FAFAF8;
  --measure: 68ch;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #161615;
    --ink: #ECEBE6;
    --accent: #9FB6EC;
    --muted: #A5A49D;
    --hairline: #30302D;
    --wash: #1F1F1D;
    --accent-wash: #1E2535;
    --on-accent: #161615;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 1.5rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  text-decoration-thickness: 0.12em;
}

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

.skip {
  position: absolute;
  left: -999rem;
  top: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 8px;
}

.skip:focus {
  left: 0.5rem;
  z-index: 1;
}

/* Header and footer share the page gutter with the content. */

.site-header,
main,
.site-footer {
  width: min(100% - 2.5rem, 62rem);
  margin-inline: auto;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding-block: 1.25rem;
  border-bottom: 1px solid var(--hairline);
}

.brand {
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
}

/* 44px tall targets, as on the phone. */
.site-header nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--muted);
  font-size: 0.9375rem;
  text-decoration: none;
}

.site-header nav a:hover,
.site-header nav a[aria-current="page"] {
  color: var(--ink);
}

.site-header nav a[aria-current="page"] {
  font-weight: 600;
}

.site-header nav .lang {
  color: var(--accent);
}

main {
  padding-block: 2.5rem 4rem;
}

h1,
h2,
h3,
h4 {
  line-height: 1.2;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

/* Landing page */

/* A phone: the screenshot in a thin dark bezel. The screenshots are
   1320 x 2868, so the corner radii are given per axis to stay round. */
.phone {
  width: min(100%, 18rem);
  margin: 0;
  padding: 2.4%;
  border-radius: 15% / 6.9%;
  background: #121211;
  box-shadow:
    0 0 0 1px rgb(0 0 0 / 0.06),
    0 1.5rem 3rem -1.25rem rgb(27 27 26 / 0.35);
}

.phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12.6% / 5.8%;
}

@media (prefers-color-scheme: dark) {
  .phone {
    box-shadow:
      0 0 0 1px #3A3A37,
      0 1.5rem 3rem -1.25rem rgb(0 0 0 / 0.7);
  }
}

.hero {
  display: grid;
  gap: 3rem;
  align-items: center;
  justify-items: center;
  padding-block: 2rem 4rem;
  text-align: center;
}

.hero-mark {
  display: block;
  width: 4.5rem;
  height: auto;
  margin: 0 auto 1rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(3.25rem, 11vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.tagline {
  margin: 0.75rem 0 0;
  font-size: clamp(1.375rem, 4vw, 1.875rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
  text-wrap: balance;
}

.lead {
  max-width: 30rem;
  margin: 1rem auto 0;
  color: var(--muted);
  font-size: 1.1875rem;
  text-wrap: balance;
}

.cta {
  margin: 2rem 0 0;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: 0 1.5rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
}

a.button:hover {
  filter: brightness(1.08);
}

.button.is-soon {
  border: 1.5px solid var(--hairline);
  background: transparent;
  color: var(--muted);
}

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

.hero-phone {
  width: min(100%, 17rem);
}

@media (min-width: 48rem) {
  .hero {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 4rem;
    padding-block: 3.5rem 5rem;
    text-align: start;
  }

  .hero-mark {
    margin-inline: 0;
  }

  .lead {
    margin-inline: 0;
  }

  .hero-phone {
    width: min(100%, 19rem);
    justify-self: end;
  }
}

/* Section labels: small, quiet, the same everywhere. */
.features > h2,
.reminders > h2,
.plain > h2 {
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.features,
.reminders,
.plain {
  padding-block: 3rem;
  border-top: 1px solid var(--hairline);
}

/* One feature: words and a phone, side by side on wide screens, the phone
   switching sides from one feature to the next. Hairlines, not cards. */
.feature {
  display: grid;
  gap: 2rem;
  align-items: center;
  justify-items: center;
  padding-block: 2.5rem;
  text-align: center;
}

.feature + .feature {
  border-top: 1px solid var(--hairline);
}

.feature-text {
  max-width: 28rem;
}

.feature h3 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 1.125rem;
}

.feature .phone {
  width: min(100%, 16rem);
}

@media (min-width: 48rem) {
  .feature {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    padding-block: 3rem;
    text-align: start;
  }

  .feature .phone {
    width: min(100%, 17rem);
  }

  .feature:nth-of-type(even) .feature-text {
    order: 2;
  }
}

.reminders ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 2rem 2.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.reminders h3 {
  margin: 0 0 0.375rem;
  font-size: 1.1875rem;
}

.reminders p {
  margin: 0;
  color: var(--muted);
}

.plain p {
  max-width: var(--measure);
  margin: 0 0 1.25rem;
}

.plain ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.plain li a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

/* Documents */

.doc {
  max-width: var(--measure);
  margin-inline: auto;
}

.doc h1 {
  margin: 0.5rem 0 0.5rem;
  font-size: clamp(2rem, 6vw, 2.75rem);
  letter-spacing: -0.025em;
}

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

.doc h2 {
  margin: 2.75rem 0 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hairline);
  font-size: 1.4375rem;
}

.doc h3 {
  margin: 2rem 0 0.5rem;
  font-size: 1.125rem;
}

.doc h4 {
  margin: 1.5rem 0 0.25rem;
  font-size: 1rem;
}

.doc p,
.doc ul,
.doc ol {
  margin: 0 0 1rem;
}

.doc ul,
.doc ol {
  padding-left: 1.375rem;
}

.doc li {
  margin-bottom: 0.375rem;
}

.doc li > ul,
.doc li > ol {
  margin: 0.375rem 0 0;
}

.doc strong {
  font-weight: 650;
}

.doc code {
  padding: 0.1em 0.3em;
  border-radius: 4px;
  background: var(--wash);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

.doc hr {
  margin: 2.5rem 0;
  border: 0;
  border-top: 1px solid var(--hairline);
}

/* The "in brief" box at the top of a document. */
.doc blockquote {
  margin: 0 0 2rem;
  padding: 1.25rem 1.5rem;
  border-radius: 14px;
  background: var(--accent-wash);
}

.doc blockquote > :first-child {
  margin-top: 0;
}

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

.doc blockquote h2,
.doc blockquote h3 {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
  font-size: 1.125rem;
}

.toc {
  margin: 0 0 2rem;
  padding: 1rem 1.5rem;
  border: 1px solid var(--hairline);
  border-radius: 14px;
}

.toc h2 {
  margin: 0 0 0.5rem;
  padding: 0;
  border: 0;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2 14rem;
  column-gap: 2rem;
}

.toc li {
  margin: 0;
  break-inside: avoid;
}

.toc a {
  display: inline-block;
  padding-block: 0.25rem;
  text-decoration: none;
}

.toc a:hover {
  text-decoration: underline;
}

/* Tables are wider than the text column on a desktop and turn into stacked,
   labelled rows on a phone. */

.table-wrap {
  margin: 0 0 1.5rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.45;
}

th,
td {
  padding: 0.625rem 0.75rem 0.625rem 0;
  border-bottom: 1px solid var(--hairline);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

td:first-child {
  font-weight: 600;
}

@media (min-width: 60rem) {
  .table-wrap {
    width: calc(100% + 12rem);
    margin-inline: -6rem;
  }
}

@media (max-width: 44rem) {
  table,
  tbody,
  tr,
  td {
    display: block;
  }

  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  tr {
    padding-block: 0.875rem;
    border-bottom: 1px solid var(--hairline);
  }

  td {
    padding: 0.125rem 0;
    border: 0;
  }

  td:not(:first-child)::before {
    content: attr(data-label) ": ";
    color: var(--muted);
    font-weight: 600;
  }
}

/* Footer */

.site-footer {
  padding-block: 2rem 3rem;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 0.875rem;
}

.site-footer p {
  margin: 0.5rem 0 0;
}

.site-footer a {
  color: inherit;
}

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

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

@media print {
  .site-header nav,
  .skip,
  .toc,
  .footer-links {
    display: none;
  }

  body {
    font-size: 11pt;
  }

  a {
    color: inherit;
  }
}
