/* 2 Minds legal site: the app's neutral paper, ink and accent (ui/theme/Color.kt), Fraunces for display. */

@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-semibold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --paper: #fbfbfc;
  --ink: #1b1d21;
  --accent: #8c6e4a;
  --muted: rgba(27, 29, 33, 0.64);
  --rule: rgba(27, 29, 33, 0.12);
  --pane: rgba(27, 29, 33, 0.035);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --measure: 40rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f1114;
    --ink: #e9ecf0;
    --accent: #b08d5f;
    --muted: rgba(233, 236, 240, 0.64);
    --rule: rgba(233, 236, 240, 0.14);
    --pane: rgba(233, 236, 240, 0.05);
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
  text-decoration-thickness: 2px;
}

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

.wrap {
  max-width: var(--measure);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* The lockup: the scales mark in three tinted layers (chassis, brains, pans, in that order), then the wordmark. */

.site-header {
  padding-top: 1.75rem;
}

.lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
  text-decoration: none;
}

.lockup:hover {
  text-decoration: none;
}

.mark {
  position: relative;
  display: inline-block;
  width: 1.7rem;
  aspect-ratio: 282 / 230;
  flex: none;
}

.mark i {
  position: absolute;
  inset: 0;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.mark .chassis {
  background: var(--ink);
  -webkit-mask-image: url("/mark/chassis.svg");
  mask-image: url("/mark/chassis.svg");
}

.mark .brains {
  background: var(--accent);
  -webkit-mask-image: url("/mark/brains.svg");
  mask-image: url("/mark/brains.svg");
}

.mark .pans {
  background: var(--ink);
  -webkit-mask-image: url("/mark/pans.svg");
  mask-image: url("/mark/pans.svg");
}

.wordmark {
  font: 600 1.75rem/1 var(--serif);
  letter-spacing: -0.01em;
}

.stop {
  color: var(--accent);
}

/* The page. */

main {
  padding-top: 3rem;
  padding-bottom: 4rem;
}

.overline {
  margin: 0 0 0.9rem;
  font: 500 0.75rem/1.4 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

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

h1 {
  margin: 0;
  font-size: clamp(2.1rem, 7vw, 2.9rem);
  line-height: 1.1;
}

h2 {
  margin: 3rem 0 0.75rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
  font-size: 1.45rem;
  line-height: 1.25;
}

h3 {
  margin: 1.75rem 0 0.4rem;
  font: 600 1.0625rem/1.4 var(--sans);
}

.lede {
  margin: 1rem 0 0;
  font: italic 400 1.3rem/1.45 var(--serif);
  color: var(--muted);
  text-wrap: pretty;
}

p,
ul,
ol,
dl {
  margin: 0.75rem 0 0;
}

ul,
ol {
  padding-left: 1.25rem;
}

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

li::marker {
  color: var(--accent);
}

ol > li::marker {
  font: 600 1rem var(--serif);
}

strong {
  font-weight: 600;
}

/* A frosted pane, after the app's glass: the short version, and the one thing to do first. */

.pane {
  margin: 2.25rem 0 0;
  padding: 1.25rem 1.35rem 1.35rem;
  background: var(--pane);
  border: 1px solid var(--rule);
  border-radius: 14px;
}

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

.pane h2 {
  margin: 0 0 0.5rem;
  padding: 0;
  border: 0;
  font: 500 0.75rem/1.4 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Providers: a definition list reads better than a table on a phone. */

.providers {
  padding: 0;
}

.providers dt {
  margin-top: 1.1rem;
  font-weight: 600;
}

.providers dd {
  margin: 0.15rem 0 0;
}

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

/* Home. */

.home main {
  padding-top: 18vh;
}

.home .lockup {
  gap: 0.85rem;
}

.home .mark {
  width: 3.4rem;
}

.home .wordmark {
  font-size: clamp(2.6rem, 11vw, 3.6rem);
}

.home .pitch {
  margin-top: 1.5rem;
  font: italic 400 clamp(1.3rem, 4.6vw, 1.6rem)/1.4 var(--serif);
  text-wrap: pretty;
}

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

.links li + li {
  margin-top: 0;
}

/* Footer. */

.site-footer {
  padding-top: 1.75rem;
  padding-bottom: 2.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.875rem;
  color: var(--muted);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
}

.site-footer a {
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--ink);
}

.site-footer p {
  margin-top: 0.75rem;
}
