/*
 * Lumefront's public site, in the Big Type look: black ink on off-white, heavy type, square edges, and one orange accent kept for small marks (it is
 * 3.0 to 1 on the background, so it is never the colour of text). System fonts only, so the pages load nothing from anywhere else. There is no
 * inline style in the pages: the site's policy (deploy/Caddyfile.site.tmpl) allows this one stylesheet and nothing more.
 *
 * Type is sized in rem, so that a reader's own default text size counts. The two giant names are the exception: they follow the window's width, in px
 * at both ends, because in rem a larger default size would push "LumefrontBot" past the width of a small phone.
 */

:root {
  color-scheme: light;
  --bg: #f4f4f1;
  --ink: #0f0f0f;
  --accent: #ff4d12;
  --muted: #6e6e6a; /* 4.6 to 1 on --bg */
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --gutter: clamp(16px, 5vw, 64px);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.55;
  overflow-wrap: break-word;
}

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-color: var(--accent);
}

a:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

/* A link inside a line of text keeps its ring close, so that the ring does not cover the words beside it. */
.text a:focus-visible,
.foot a:focus-visible {
  outline-width: 2px;
  outline-offset: 1px;
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
}

/* Uppercase labels are tracked out, as everywhere in the Big Type look. */
.label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* The square accent mark that ends the name, as a full stop would. */
.display::after,
.wordmark::after {
  content: "";
  display: inline-block;
  width: 0.16em;
  height: 0.16em;
  margin-left: 0.05em;
  background: var(--accent);
}

/* ---------------------------------------------------------------------------
 * The LumefrontBot page
 * ------------------------------------------------------------------------- */

.bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 24px;
  padding: 14px var(--gutter);
  border-bottom: 2px solid var(--ink);
}

.bar .name {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.bar .name:hover {
  text-decoration-line: underline;
}

.page {
  padding: 0 var(--gutter) clamp(64px, 10vw, 128px);
}

.display {
  margin: clamp(40px, 9vw, 112px) 0 0;
  font-size: clamp(36px, 11.5vw, 136px);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.04em;
}

.lede {
  margin: 28px 0 0;
  max-width: 34ch;
  font-size: clamp(1.25rem, 2.8vw, 1.875rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.ua {
  margin: 40px 0 0;
}

.ua dd {
  margin: 8px 0 0;
}

/* Small enough on a phone that the address after the space fits on one line, so the string breaks only at its space. */
.ua code {
  font-size: min(1rem, 4.5vw);
  overflow-wrap: anywhere;
}

.part {
  margin-top: clamp(56px, 8vw, 96px);
  padding-top: 18px;
  border-top: 2px solid var(--ink);
}

.part h2 {
  margin: 0;
  font-size: clamp(1.375rem, 2.6vw, 1.875rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.part .no {
  display: block;
  margin-bottom: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.text {
  max-width: 62ch;
}

.text p {
  margin: 14px 0 0;
}

pre {
  margin: 18px 0 4px;
  padding: 16px 18px;
  border: 2px solid var(--ink);
  overflow-x: auto;
  /* Capped by the window too, so that its two lines fit a small phone at a larger default text size. */
  font-size: min(1rem, 5vw);
  line-height: 1.5;
}

pre code {
  font-size: inherit;
}

@media (min-width: 760px) {
  .part {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 24px;
  }

  .part h2 {
    grid-column: 1 / span 4;
  }

  .part .text {
    grid-column: 5 / span 8;
  }

  .part .text > :first-child {
    margin-top: 22px;
  }
}

/* ---------------------------------------------------------------------------
 * The holding page
 * ------------------------------------------------------------------------- */

.home {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  min-height: 100svh;
}

.poster {
  padding: clamp(48px, 14vh, 176px) var(--gutter) 56px;
}

.wordmark {
  margin: 0;
  font-size: clamp(48px, 16vw, 208px);
  font-weight: 800;
  line-height: 0.88;
  letter-spacing: -0.045em;
}

.line {
  margin: 32px 0 0;
  max-width: 24ch;
  font-size: clamp(1.375rem, 3.4vw, 2.5rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
  padding: 18px var(--gutter) 28px;
  border-top: 2px solid var(--ink);
}

.foot p {
  margin: 0;
}

.foot .label {
  display: inline;
  margin-right: 10px;
}
