/* BIANG — maison de haute disponibilité — and lucalivolsi.eu, set like magazine covers. The mastheads are Bodoni Moda (a
   high-contrast Didone, OFL) at a large optical size, letters tight, ".eu" small in the italic and tilted against the last
   letter, turned into SVG outlines by tools/wordmark.py. The cover picture is cover.webp over arcade.svg (tools/arcade.py: a
   Renaissance gallery with server racks in its bays); lucalivolsi.eu shows the drawing only. Fonts are served by this site
   only (the CSP allows nothing else): Bodoni Moda (tools/fonts/OFL.txt) subset by tools/webfonts.py, and Latin Modern Mono
   renamed "Biang Mono" for the colophon (GUST Font License, site/GUST-FONT-LICENSE.txt). */
@font-face { font-family: "Bodoni Moda"; src: url("/bodoni-moda.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Bodoni Moda"; src: url("/bodoni-moda-italic.woff") format("woff"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Biang Mono"; src: url("/biang-mono.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --paper: #f3eee5;
  --ink: #12110f;
  --muted: #8b8376;
  --gold: #a98a55;
  --serif: "Bodoni Moda", Didot, "Bodoni 72", "Bodoni MT", Georgia, serif;
  --sans: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --mono: "Biang Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #0e0d0b; --ink: #f1ebe0; --muted: #8f877a; --gold: #c2a46e; }
}

* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  padding: clamp(1.25rem, 3vw, 2.5rem) clamp(1rem, 4vw, 3rem);
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.5 var(--serif);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---- the cover: ivory type on the picture, whatever the visitor's light or dark setting */
body.cover {
  --ink: #f4eee3;
  --muted: #c9bfae;
  --gold: #c9a96a;
  color: var(--ink);
  /* the cover picture: cover.webp over arcade.svg. cover.webp is a 1-pixel transparent stand-in until a photograph replaces
     it (same name, about 1800 px wide, under 500 KB: Part 22 §22.11), so the drawing shows through; nothing else changes. */
  background:
    linear-gradient(180deg, rgba(8, 7, 6, .55) 0%, rgba(8, 7, 6, 0) 38%, rgba(8, 7, 6, 0) 60%, rgba(8, 7, 6, .75) 100%),
    url("/cover.webp") center 30% / cover no-repeat,
    url("/arcade.svg") center / cover no-repeat,
    #0b0a08;
}
/* lucalivolsi.eu: the same cover with the drawn gallery only -- never BIANG's photograph (its bag carries the BIANG logo) */
body.cover.gallery {
  background:
    linear-gradient(180deg, rgba(8, 7, 6, .55) 0%, rgba(8, 7, 6, 0) 38%, rgba(8, 7, 6, 0) 60%, rgba(8, 7, 6, .75) 100%),
    url("/arcade.svg") center / cover no-repeat,
    #0b0a08;
}

/* the running head, like a magazine's top line */
.bar {
  display: flex;
  justify-content: space-between;
  font: 500 .66rem/1 var(--sans);
  letter-spacing: .42em;
  text-transform: uppercase;
  color: var(--muted);
}

/* the masthead: as wide as the cover allows, a little under the running head, as on a newsstand */
.masthead { margin: clamp(.75rem, 2vw, 1.5rem) auto 0; width: min(100%, 78rem); line-height: 0; }
.masthead svg { width: 100%; height: auto; display: block; }

/* the cover lines, bottom left */
.lines { align-self: end; max-width: 34rem; padding-bottom: clamp(1.5rem, 4vw, 3rem); }
.claim {
  font: 500 clamp(.62rem, 1.3vw, .78rem)/1 var(--sans);
  letter-spacing: .55em;
  text-transform: uppercase;
}
.claim a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--gold); padding-bottom: .35em; }
.claim a:hover, .claim a:focus-visible { color: var(--gold); outline: none; }
/* lucalivolsi.eu's two links, set like the cover lines */
.contact { display: flex; flex-wrap: wrap; gap: 1.25rem 3rem; }
.contact a {
  font: 500 clamp(.7rem, 1.4vw, .85rem)/1 var(--sans);
  letter-spacing: .5em;
  text-transform: uppercase;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
  padding-bottom: .55em;
}
.contact a:hover, .contact a:focus-visible { color: var(--gold); outline: none; }
hr { width: 3.5rem; margin: 1.4rem 0; border: 0; border-top: 1px solid var(--gold); }
.collection { font-size: clamp(1.2rem, 2.6vw, 1.7rem); line-height: 1.25; }
.collection em { font-style: italic; }
.nb { white-space: nowrap; }

/* the colophon: three facts of the house, set like a care label */
.colophon {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 2.5rem;
  font: 400 .7rem/1.4 var(--mono);
  letter-spacing: .12em;
  color: var(--muted);
}

/* the 404 page: the same masthead, centred, on paper */
body.page { grid-template-rows: auto 1fr auto; text-align: center; }
body.page main { align-self: center; }
body.page .masthead { width: min(70vw, 26rem); }
body.page hr { margin: 2rem auto; }
body.page .claim { margin-top: 1.5rem; }
body.page .colophon { justify-content: center; }

/* the masthead and the cover lines arrive slowly, once; nothing moves for those who asked for less motion */
@media (prefers-reduced-motion: no-preference) {
  .masthead { animation: arrive 1.8s cubic-bezier(.2, .7, .1, 1) both; }
  .lines { animation: arrive 1.8s .4s cubic-bezier(.2, .7, .1, 1) both; }
  @keyframes arrive { from { opacity: 0; transform: translateY(.6rem); } to { opacity: 1; transform: none; } }
}
