/* arcanum-nce.com
   The desk's typeface and the desk's ink, so the two read as one company.
   Everything is served from this domain. Nothing is fetched from anyone else,
   and _headers makes the browser hold the site to that. */

@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* The desk's tokens, unchanged. */
:root {
  --ground: #FFFFFF;
  --ink: #16181B;
  --ink-2: #3E4247;
  --muted: #6C7076;
  --line: #DDDDE0;
  --line-2: #C7C9CC;
  --accent: #A9691A;
  --accent-line: #E3C28C;

  --gutter: clamp(1.25rem, 5vw, 3rem);
  --content: 60rem;
  --label: 12rem;
  --gap: 3rem;
  --lede: clamp(1.125rem, 1.03rem + .42vw, 1.3125rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0E0F11;
    --ink: #EAEBEC;
    --ink-2: #C3C6CA;
    --muted: #8D9197;
    --line: #26292E;
    --line-2: #383C42;
    --accent: #E4A84C;
    --accent-line: #5C4522;
  }
}

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

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  font-kerning: normal;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* One column that holds everything, with room for the notch in landscape. */
.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  max-width: calc(var(--content) + 2 * var(--gutter));
  margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .24em;
  text-decoration-color: var(--accent-line);
  transition: text-decoration-color .15s ease;
}
a:hover { text-decoration-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--accent-line); color: var(--ink); }

/* ---------- header ---------- */

.top {
  padding-top: calc(1.5rem + env(safe-area-inset-top, 0px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* The way in, for somebody who already has an account. Quiet on purpose: this
   page is for people deciding, and the people signing in know where they are
   going. An outline rather than a filled button, so it reads as a door rather
   than as the thing the page is asking you to do. */
.signin {
  flex: none;
  display: inline-flex;
  align-items: center;
  padding: .4rem .85rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: .9375rem;
  font-weight: 500;
  letter-spacing: -.008em;
  color: var(--ink-2);
  text-decoration: none;
  white-space: nowrap;
  transition: border-color .15s, color .15s;
}
.signin:hover { border-color: var(--accent); color: var(--ink); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: .625rem;
  padding-block: .25rem;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -.012em;
  text-decoration: none;
}

/* The mark is a mask filled with the current ink, so it turns over with the
   theme instead of needing a second file. 240 × 179, kept in proportion. */
.mark {
  display: block;
  width: 2rem;
  height: 1.5rem;
  background: currentColor;
  -webkit-mask: url("/assets/logo.png") center / contain no-repeat;
  mask: url("/assets/logo.png") center / contain no-repeat;
}

/* ---------- the statement ---------- */

.hero { padding-top: clamp(4.5rem, 17vh, 10rem); }

h1 {
  margin: 0;
  max-width: 12em;
  font-size: clamp(2.5rem, 1.35rem + 4.9vw, 4.75rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -.038em;
  text-wrap: balance;
}
/* Light type on a dark ground looks heavier than it is; take a little back. */
@media (prefers-color-scheme: dark) {
  h1 { font-weight: 560; }
}

/* Human words: larger, regular weight. The description is the second ink,
   the promise is the first. */
.lede {
  max-width: 30em;
  margin-top: clamp(1.75rem, 4.5vh, 2.75rem);
  font-size: var(--lede);
  line-height: 1.5;
  color: var(--ink-2);
}
.lede p { margin: 0; text-wrap: pretty; }
.lede p + p { margin-top: .85em; }
.lede .promise { color: var(--ink); }

/* ---------- the first product ---------- */

/* A second title under the first: the same grammar one size down, so the
   engine and the product read as two parts of one page, not two pages. */
.chapter {
  margin-top: clamp(4.5rem, 14vh, 8.5rem);
  padding-top: clamp(1.5rem, 3.5vh, 2.25rem);
  border-top: 1px solid var(--line);
}

.kicker {
  margin: 0 0 .75rem;
  font-size: .6875rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* The second size of title: the product on the home page, and the title of
   each legal page. */
.chapter h2,
.page-head h1 {
  margin: 0;
  font-size: clamp(2rem, 1.3rem + 2.6vw, 3.125rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -.034em;
}
@media (prefers-color-scheme: dark) {
  .chapter h2,
  .page-head h1 { font-weight: 560; }
}

.chapter .lede { margin-top: clamp(1.25rem, 3.5vh, 2.25rem); }

/* ---------- the particulars ---------- */

.rows {
  margin-top: clamp(3rem, 8vh, 5rem);
  border-bottom: 1px solid var(--line);
}

.row {
  padding: 1.25rem 0 1.5rem;
  border-top: 1px solid var(--line);
}

/* The interface voice: small, heavy, spaced, the same as the desk's labels. */
.row h2,
.row h3 {
  margin: 0 0 .625rem;
  font-size: .6875rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* No text-wrap: pretty here: it pulled one paragraph narrower than its
   neighbour, and two measures in one block read as a mistake. */
.text { max-width: 36rem; color: var(--ink-2); }
.text p { margin: 0; }
.text p + p { margin-top: .7em; }

.email { font-size: var(--lede); color: var(--ink); }

/* ---------- legal pages ---------- */

.page-head { padding-top: clamp(3.5rem, 11vh, 6.5rem); }

.langs {
  display: flex;
  gap: .5rem;
  margin: .875rem 0 0;
  font-size: .875rem;
  color: var(--muted);
}

/* German runs to words like Auftragsverarbeitungsvertrag, which do not fit a
   narrow phone column whole. Hyphenate, but only long words, so the rag on a
   wide screen is left alone. */
[lang="de"] .text p,
[lang="de"] .lede p {
  -webkit-hyphens: auto;
  hyphens: auto;
  hyphenate-limit-chars: 12 5 5;
}
.langs a { text-decoration-color: var(--line-2); }
.langs a:hover { text-decoration-color: var(--accent); }

.block { margin-top: clamp(3rem, 8vh, 4.5rem); scroll-margin-top: 1.5rem; }
.block + .block { margin-top: clamp(4.5rem, 12vh, 7rem); }

.block-title {
  margin: 0;
  font-size: clamp(1.25rem, 1.1rem + .6vw, 1.5rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.018em;
}
.block-sub { margin: .375rem 0 0; color: var(--muted); }
.block .lede { margin-top: clamp(1.25rem, 3vh, 1.75rem); }
.block .rows { margin-top: clamp(1.75rem, 4.5vh, 2.5rem); }

address { font-style: normal; }

/* Label and value on one line each: Telefon, E-Mail. */
.pairs {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .25rem 1rem;
  margin: 0;
}
.pairs dt { color: var(--muted); }
.pairs dd { margin: 0; }

/* What is not known yet, shown as a gap rather than papered over. */
.gap {
  margin: 0;
  padding: .625rem .875rem;
  border: 1px dashed var(--line-2);
  border-radius: 4px;
  color: var(--muted);
}

/* ---------- footer ---------- */

.foot {
  margin-top: auto;
  padding: clamp(3.5rem, 10vh, 6rem) 0 calc(2rem + env(safe-area-inset-bottom, 0px));
  font-size: .8125rem;
  line-height: 1.6;
  color: var(--muted);
}
.foot p { margin: 0; text-wrap: pretty; }
.foot p + p { margin-top: .35em; }
.foot nav { display: flex; gap: 1.25rem; margin-bottom: .75rem; }
.foot a { text-decoration-color: var(--line-2); }
.foot a:hover { text-decoration-color: var(--accent); }

/* ---------- wide screens: labels in their own column ---------- */

@media (min-width: 50rem) {
  .lede { margin-left: calc(var(--label) + var(--gap)); }

  .row,
  .foot {
    display: grid;
    grid-template-columns: var(--label) minmax(0, 1fr);
    column-gap: var(--gap);
    align-items: baseline;
  }
  .row { padding: 1.5rem 0 1.75rem; }
  .row h2,
  .row h3 { margin: 0; }
  .foot nav { margin: 0; }
}

/* Printed, it is always ink on paper, whatever the screen was set to. */
@media print {
  :root {
    --ground: #FFFFFF; --ink: #000000; --ink-2: #222222; --muted: #555555;
    --line: #BBBBBB; --line-2: #BBBBBB; --accent: #000000; --accent-line: #888888;
  }
  .page { min-height: 0; }
  .hero { padding-top: 2.5rem; }
}

/* The line under the address that ties the brand to the company. */
.text address + p{margin-top:10px}
