/* mechli.ch: the tokens of DESIGN.md, without the app's Tailwind. */
@font-face {
  font-family: 'Barlow';
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/barlow-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow';
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/barlow-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow';
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/barlow-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow';
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/barlow-latin-700-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow Semi Condensed';
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/barlow-semi-condensed-latin-700-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow Semi Condensed';
  font-weight: 800;
  font-display: swap;
  src: url('/fonts/barlow-semi-condensed-latin-800-normal.woff2') format('woff2');
}

:root {
  --ink: #16181d;
  --ink-soft: #3f4652;
  --muted: #5a606b;
  --ground: #f2f2ef;
  --surface: #ffffff;
  --subtle: #f7f7f5;
  --line: #e2e2dd;
  --accent: #ffc400;
  --accent-hover: #f2b600;
  --field-border: #c8c8c1;
  --sidebar: #1b1f24;
  --sidebar-text: #c9ccd2;
  --page: min(1360px, 100% - 32px);
}

* {
  box-sizing: border-box;
}

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

body {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font:
    400 16px/1.5 'Barlow',
    system-ui,
    sans-serif;
}

a {
  color: inherit;
}

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

h1,
h2,
h3 {
  margin: 0;
  font-family: 'Barlow Semi Condensed', 'Barlow', sans-serif;
  line-height: 1.12;
}

.page {
  width: var(--page);
  margin-inline: auto;
}

/* The bar on top */
.bar {
  border-bottom: 1px solid var(--line);
}
.bar .page {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font:
    800 25px/1 'Barlow Semi Condensed',
    sans-serif;
  letter-spacing: -0.015em;
}
.brand img {
  width: 36px;
  height: 36px;
}
.brand .domain {
  color: var(--muted);
}
.nav {
  display: flex;
  gap: 24px;
}
.nav a,
.signin {
  color: var(--ink-soft);
  font-weight: 600;
  text-decoration: none;
}
.nav a:hover,
.signin:hover {
  color: var(--ink);
}
.actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.button.primary {
  background: var(--accent);
  color: var(--ink);
}
.button.primary:hover {
  background: var(--accent-hover);
}
.button.secondary {
  padding: 0 16px;
  border-color: var(--field-border);
  background: var(--surface);
  font-weight: 600;
}
.button.secondary:hover {
  background: var(--subtle);
}
.button svg {
  width: 18px;
  height: 18px;
}

/* The top: the website's own roles display and lead (DESIGN.md › Website) */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 390px);
  gap: 48px;
  align-items: center;
  padding: 48px 0 32px;
}
.hero h1 {
  font-size: clamp(36px, 5vw, 54px);
  font-weight: 800;
  letter-spacing: -0.015em;
}
.hero p {
  max-width: 62ch;
  margin: 20px 0 28px;
  color: var(--ink-soft);
  font-size: 19px;
}
.hero .buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.hero small {
  display: block;
  margin-top: 20px;
  color: var(--muted);
  font-size: 14px;
}
.figure {
  display: grid;
  place-items: center;
  min-height: 310px;
  border-radius: 12px;
  background: var(--subtle);
}
.figure img {
  width: 190px;
}

/* Sections, each titled in the website's role section-title */
section {
  padding: 40px 0;
}
section h2 {
  margin-bottom: 24px;
  font-size: clamp(26px, 3vw, 30px);
  font-weight: 800;
}
.functions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}
.functions img {
  aspect-ratio: 16 / 10;
  width: 100%;
  object-fit: cover;
  object-position: top left;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--subtle);
}
.functions h3,
.steps h3 {
  margin: 18px 0 6px;
  font-size: 20px;
  font-weight: 700;
}
.functions p,
.steps p {
  margin: 0;
  color: var(--muted);
}
.band {
  background: var(--ground);
}
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}
.steps li {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.steps .number {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--surface);
  font-weight: 700;
}
.steps h3 {
  margin-top: 14px;
}
.swiss {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.swiss svg {
  flex: none;
  width: 40px;
  height: 40px;
}
.swiss h2 {
  margin-bottom: 8px;
}
.swiss p {
  margin: 0;
  color: var(--ink-soft);
}
.contact {
  border-top: 1px solid var(--line);
}
.contact .page {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 48px;
  justify-content: space-between;
}
.contact h2 {
  margin-bottom: 6px;
}
.contact p {
  margin: 0;
  color: var(--muted);
}
.contact ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-weight: 600;
}

/* The foot, at the bottom of the window on a short page */
main {
  flex: 1;
}
footer {
  background: var(--sidebar);
  color: var(--sidebar-text);
}
footer .page {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  min-height: 68px;
  padding: 12px 0;
  font-size: 14px;
}
footer img {
  width: 28px;
  height: 28px;
}
footer nav {
  display: flex;
  gap: 24px;
  margin-left: auto;
}

/* A page of text: the legal pages and the 404 */
.text {
  max-width: 760px;
  padding: 40px 0 64px;
}
.text h1 {
  margin-bottom: 8px;
  font-size: 30px;
  font-weight: 800;
}
.text .version {
  margin: 0 0 24px;
  color: var(--muted);
}
.text h2 {
  margin: 32px 0 8px;
  font-size: 22px;
  font-weight: 700;
}
.text p,
.text li {
  color: var(--ink-soft);
}
.text table {
  width: 100%;
  margin: 12px 0;
  border-collapse: collapse;
  font-size: 15px;
}
.text th,
.text td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.text th {
  color: var(--ink);
}

@media (max-width: 900px) {
  .nav,
  .signin {
    display: none;
  }
  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 32px;
  }
  .figure {
    min-height: 220px;
  }
  .functions,
  .steps {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .bar .actions .secondary {
    display: none;
  }
  .functions,
  .steps {
    grid-template-columns: 1fr;
  }
  .swiss {
    flex-direction: column;
    gap: 12px;
  }
  footer nav {
    margin-left: 0;
  }
}
