/* bemono ag's site, in the look of the product's site: ink on a ground, lines
   instead of shadows, square corners, two typefaces. No script: the scheme is
   the one the visitor's system is in. */

:root {
  color-scheme: light dark;

  --bm-ground: #F3F2EE;
  --bm-ink: #0A0A0A;
  --bm-ink-soft: rgba(10, 10, 10, 0.68);
  --bm-ink-faint: rgba(10, 10, 10, 0.46);
  --bm-line: rgba(10, 10, 10, 0.14);
  --bm-line-strong: rgba(10, 10, 10, 0.36);
  --bm-on-ink: #F3F2EE;

  --font: "Roboto Flex", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* The bar on top, and the page's side margins. */
  --bar: 64px;
  --pad: 20px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bm-ground: #000000;
    --bm-ink: #F4F4F0;
    --bm-ink-soft: rgba(244, 244, 240, 0.66);
    --bm-ink-faint: rgba(244, 244, 240, 0.42);
    --bm-line: rgba(255, 255, 255, 0.14);
    --bm-line-strong: rgba(255, 255, 255, 0.34);
    --bm-on-ink: #000000;
  }
}

@media (min-width: 600px) { :root { --pad: 32px; } }
@media (min-width: 1200px) { :root { --pad: 48px; } }

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--bar);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bm-ground);
  color: var(--bm-ink-soft);
  font-family: var(--font);
  font-stretch: 106%;
  font-size: 1rem;
  line-height: 1.6;
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; }
h1, h2, h3, p, dl, dd, ul, figure, blockquote { margin: 0; }
ul { padding: 0; list-style: none; }
address { font-style: normal; }
a { color: inherit; }
svg { display: block; }
::selection { background: var(--bm-ink); color: var(--bm-on-ink); }
:focus-visible { outline: 2px solid var(--bm-ink); outline-offset: 3px; }

/* --- text ------------------------------------------------------------------ */

/* A headline: the family's widest cut, light. */
.display {
  font-stretch: 151%;
  font-weight: 300;
  line-height: 1.04;
  letter-spacing: -0.035em;
  color: var(--bm-ink);
  text-wrap: balance;
}

/* The small line in capitals: over a headline, in the rail, on the bar. */
.label {
  display: block;
  font-family: var(--mono);
  font-stretch: normal;
  font-weight: 500;
  font-size: 0.6875rem;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bm-ink-faint);
}
.label.ink { color: var(--bm-ink); }

/* The paragraph under a headline. */
.lead {
  font-size: clamp(1.0625rem, 0.6vw + 0.95rem, 1.3125rem);
  line-height: 1.5;
  letter-spacing: -0.01em;
}

.small { font-size: 0.875rem; line-height: 1.55; }

/* --- layout ---------------------------------------------------------------- */

/* The page's measure: everything hangs on it. */
.frame {
  width: 100%;
  max-width: 1360px;
  margin-inline: auto;
  padding-inline: var(--pad);
}

.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bm-ground);
  border-bottom: 1px solid var(--bm-line);
}
.bar .frame {
  height: var(--bar);
  display: flex;
  align-items: center;
  gap: 12px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  height: 44px;
  margin-right: auto;
  color: var(--bm-ink);
}
.wordmark svg { height: 17px; width: auto; fill: currentColor; }

.bar nav { display: flex; }
.bar nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: var(--bar);
  padding-inline: 14px;
  text-decoration: none;
  color: var(--bm-ink-soft);
  transition: color 0.2s var(--ease-out);
}
/* The line that grows under a place of the bar, on the bar's own lower edge. */
.bar nav a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -1px;
  height: 1px;
  background: var(--bm-ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out);
}
.bar nav a:hover { color: var(--bm-ink); }
.bar nav a:hover::after { transform: scaleX(1); }
/* On a phone the bar has the name and the other language; the page is short
   enough to scroll. */
.bar nav a.place { display: none; }
@media (min-width: 900px) { .bar nav a.place { display: inline-flex; } }
.bar nav a.language { color: var(--bm-ink); margin-right: -14px; }

/* --- the first screen ------------------------------------------------------ */

.hero { position: relative; overflow: hidden; }
.hero .frame {
  position: relative;
  padding-block: clamp(72px, 14vh, 168px) clamp(64px, 12vh, 144px);
}
.hero h1 {
  font-size: clamp(2.25rem, 5.6vw, 4.5rem);
  max-width: 20ch;
  margin-top: clamp(20px, 3vh, 28px);
}
.hero .lead { max-width: 52ch; margin-top: clamp(20px, 4vh, 32px); }
.hero .actions { margin-top: clamp(28px, 5vh, 44px); }

/* The rings of the product's tunnel, standing still behind the words. Drawn
   in the ink through a mask, so they follow the scheme; a browser without
   masks shows none. */
.rings { display: none; }
@supports (mask-image: url("")) or (-webkit-mask-image: url("")) {
  .rings {
    display: block;
    position: absolute;
    top: 50%;
    right: -55%;
    width: min(150%, 1100px);
    aspect-ratio: 5 / 4;
    transform: translateY(-50%);
    background: var(--bm-ink);
    opacity: 0.45;
    -webkit-mask: url(/rings.svg) center / contain no-repeat;
    mask: url(/rings.svg) center / contain no-repeat;
    pointer-events: none;
  }
  @media (min-width: 900px) { .rings { right: -16%; width: min(78%, 1100px); opacity: 1; } }
}

/* --- things to press ------------------------------------------------------- */

.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 46px;
  padding-inline: 22px;
  border: 1px solid var(--bm-line-strong);
  font-stretch: 125%;
  font-weight: 500;
  font-size: 0.9375rem;
  line-height: 1.15;
  letter-spacing: -0.005em;
  white-space: nowrap;
  text-decoration: none;
  color: var(--bm-ink);
  background: transparent;
  transition: background-color 0.22s var(--ease-out), color 0.22s var(--ease-out),
    border-color 0.22s var(--ease-out);
}
.action:hover { background: var(--bm-ink); border-color: var(--bm-ink); color: var(--bm-on-ink); }
/* The one thing a screen is there for. */
.action.solid { background: var(--bm-ink); border-color: var(--bm-ink); color: var(--bm-on-ink); }
.action.solid:hover { background: transparent; color: var(--bm-ink); }
.action.sm { min-height: 44px; padding-inline: 14px; font-size: 0.8125rem; }
.action svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  transition: transform 0.3s var(--ease-out);
}
.action:hover svg { transform: translate(2px, -2px); }

/* --- a section ------------------------------------------------------------- */

/* Opened by a line across the page. On a wide screen its number and name
   stand in a rail on the left and stay in view while its matter scrolls by;
   on a phone they are a line above it. */
.section { border-top: 1px solid var(--bm-line); }
.section > .frame {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  padding-block: 56px;
}
.rail { display: flex; align-items: baseline; gap: 16px; }
.matter { min-width: 0; }
.matter > .display { font-size: clamp(2rem, 4.6vw, 3.75rem); max-width: 18ch; }
.matter > .lead { max-width: 56ch; margin-top: 20px; }
.matter > .actions { margin-top: 32px; }

@media (min-width: 900px) {
  .section > .frame {
    grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
    gap: 48px;
    padding-block: 104px;
  }
  .rail {
    position: sticky;
    top: calc(var(--bar) + 32px);
    align-self: start;
    flex-direction: column;
    gap: 8px;
  }
  .matter > .lead { margin-top: 28px; }
}

/* Three things said about something, side by side. */
.points {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin-top: 40px;
  border-top: 1px solid var(--bm-line);
}
.points li { padding-block: 24px; border-bottom: 1px solid var(--bm-line); }
.points h3 { font-size: 1.375rem; line-height: 1.15; margin-top: 14px; }
.points p { max-width: 40ch; margin-top: 10px; }
@media (min-width: 900px) {
  .points { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 72px; }
  .points li { padding: 32px 32px 32px 0; }
  .points li + li { padding-left: 32px; border-left: 1px solid var(--bm-line); }
}

/* A sheet of entries: each has its name on the left and its matter beside it. */
.sheet > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: 12px;
  padding-block: 28px;
}
.sheet > div:first-child { padding-top: 0; }
.sheet > div + div { border-top: 1px solid var(--bm-line); }
.sheet dd {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 40px;
}
.sheet .value {
  font-size: clamp(1.375rem, 2.6vw, 2rem);
  line-height: 1.22;
  overflow-wrap: anywhere;
}
.sheet .name { font-size: clamp(2.125rem, 5.4vw, 4rem); }
.sheet a.value {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}
.sheet .small { max-width: 44ch; margin-top: 4px; }
.sheet .company { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
@media (min-width: 900px) {
  .sheet > div { grid-template-columns: minmax(0, 3fr) minmax(0, 6fr); column-gap: 48px; padding-block: 44px; }
}

/* A word that says a state, in a line of its own. */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 24px;
  padding-inline: 8px;
  border: 1px solid var(--bm-line);
  color: var(--bm-ink);
  white-space: nowrap;
}
.tag::before { content: ""; width: 6px; height: 6px; flex-shrink: 0; background: var(--bm-ink); }

/* Running text with a link in it. */
.prose { max-width: 62ch; }
.prose + .prose { margin-top: 1em; }
.prose a { color: var(--bm-ink); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }

/* --- the foot -------------------------------------------------------------- */

.foot { border-top: 1px solid var(--bm-line); }
.foot .frame {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  padding-block: 20px;
}
.foot .row + .row { border-top: 1px solid var(--bm-line); }
.foot .made { display: inline-flex; align-items: center; gap: 10px; }
.foot .made::before { content: ""; width: 7px; height: 7px; background: var(--bm-ink); }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.foot nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.foot nav a:hover { color: var(--bm-ink); }
.foot .fine { font-size: 0.8125rem; line-height: 1.55; color: var(--bm-ink-faint); }
.foot address { display: flex; flex-wrap: wrap; gap: 0 0.75em; }
.foot address span + span::before { content: "/"; margin-right: 0.75em; opacity: 0.6; }

/* --- a page that is one message (404) -------------------------------------- */

.message .frame { padding-block: clamp(72px, 16vh, 200px); }
.message .display { font-size: clamp(2.25rem, 6vw, 4.5rem); max-width: 16ch; margin-top: 24px; }
.message .display + .display { color: var(--bm-ink-faint); margin-top: 0.35em; }
.message .actions { margin-top: 44px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

@media print {
  .bar nav, .rings, .actions { display: none; }
  .bar { position: static; }
}
