/* OnderHetMos · shared styles for every page */
@font-face { font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/inter.woff2) format("woff2"); }
@font-face { font-family: "Young Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/young-serif.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/jetbrains-mono.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: italic; font-weight: 400; font-display: swap; src: url(/fonts/jetbrains-mono-italic.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/jetbrains-mono-bold.woff2) format("woff2"); }
:root { --soil: #1a1914; --text: #e4dcc4; --muted: #a39c86; --moss: #93c14f; --deep: #5a9440; --blue: #0047ab; --red: #ef4444; }
html { background: var(--soil); scroll-behavior: smooth; }
/* Body text in JetBrains Mono, 16 px with line height 1.35 (chosen on the font test page). The web files
   hold the same characters as before and leave out the font's code ligatures, which don't belong in prose.
   The 34rem column keeps lines at about 55 characters. */
body { margin: 0; padding: 3.5rem 0 0; color: var(--text);
  font: 1rem/1.35 "JetBrains Mono", ui-monospace, Consolas, monospace; }
main { max-width: 34rem; margin: 0 auto; padding: 0 1rem; }
.home { padding-top: 2rem; }   /* less room above the logo on the home page */
@media (max-width: 59.99rem) { .home { padding-top: 1.25rem; } }
.pixel { image-rendering: pixelated; }
h1 { margin: 0; text-align: center; font: 400 2.148rem/1.15 "Young Serif", Georgia, serif; letter-spacing: 0; color: var(--moss); }
.sub { margin: .55rem 0 0; text-align: center; font: 500 .75rem/1 Inter, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted); opacity: .7; }
.rule { width: 2.5rem; height: 1px; margin: 1.75rem auto 3rem; background: var(--muted); opacity: .35; }
p { margin: 0 0 1.2rem; }
/* Lead sentence in cream on a soft low highlighter: the site blue at about half strength behind the lower
   half of each line (52 to 92 % of the line), like a marker pen. */
/* Left-aligned like the text below it (several centred lines read worse); 36 px on wide screens,
   about 28 px on a phone so it doesn't break into short lines. */
.lead { position: relative; margin-bottom: 1.8rem; text-align: left; font: 400 clamp(1.75rem, 1.2rem + 2.5vw, 2.25rem)/1.5 "Young Serif", Georgia, serif; color: var(--text); }
.lead .line { padding: 0 .12em; -webkit-box-decoration-break: clone; box-decoration-break: clone;
  background: linear-gradient(transparent 52%, #0047ab 52%, #0047ab 92%, transparent 92%); }   /* the band under the lower half, in full cobalt blue */
strong { color: var(--red); font-weight: 700; }
.end { margin-top: 1.6rem; font-style: italic; color: var(--muted); }
hr { width: 5rem; height: 1px; margin: 3rem auto; border: 0; background: linear-gradient(90deg, transparent, var(--moss) 30%, var(--moss) 70%, transparent); opacity: .8; }
@media (min-width: 60rem) {
  main { max-width: 70rem; padding: 0 2.75rem; }
  /* one shared row per paragraph (and for the blue button and the small heading between them), so every Dutch paragraph lines up with its English twin */
  .cols { display: grid; grid-template-columns: 1fr auto 1fr; grid-template-rows: repeat(12, auto); gap: 0 3.5rem; }
  .cols section { display: grid; grid-row: span 12; grid-template-rows: subgrid; }
  .cols .body { display: contents; }
  .cols .lead { align-self: start; }
  .cols hr { grid-row: span 12; width: 1px; height: auto; margin: 0; background: linear-gradient(180deg, transparent, var(--moss) 18%, var(--moss) 82%, transparent); }
}
footer { position: relative; margin-top: 4.5rem; padding: 2.75rem 1rem calc(2rem + env(safe-area-inset-bottom)); background: var(--blue); color: #fff; text-align: center; }
footer .msg { max-width: 46rem; margin: 0 auto .6rem; font: 400 1.05rem/1.6 "JetBrains Mono", ui-monospace, Consolas, monospace; }
footer .msg[lang="en"] { margin-bottom: 0; opacity: .8; font-size: .95rem; }
.foot-link { display: inline-block; margin-top: 2rem; font: 500 .72rem/1 Inter, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: .08em; color: #fff; opacity: .75; text-decoration: underline; text-underline-offset: 3px; }
.foot-link:hover { opacity: 1; }
@media (min-width: 40rem) { footer { padding-bottom: calc(3.25rem + env(safe-area-inset-bottom)); } .foot-link { position: absolute; left: 1.25rem; bottom: calc(1rem + env(safe-area-inset-bottom)); margin: 0; } }
.nw { white-space: nowrap; }

/* 404 and privacy pages */
.page { max-width: 34rem; margin: 0 auto; padding: 0 1rem; }
.center { text-align: center; }
.fire { display: block; width: 7rem; height: auto; margin: 0 auto 1.5rem; }
.big { margin: 0; text-align: center; font: 400 4.5rem/1 "Young Serif", Georgia, serif; color: var(--moss); }
h2 { margin: 2.5rem 0 1rem; font: 400 1.5rem/1.35 "Young Serif", Georgia, serif; color: var(--blue); }
.back { font: 500 .75rem/1 Inter, "Helvetica Neue", Arial, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

  /* language flags in front of the blue headings */
  .flag { display: inline-block; width: 1.05em; height: .7em; margin-right: .45em; vertical-align: .02em; border-radius: 2px; box-shadow: 0 0 0 1px #00000040; }

  footer .msg { margin-bottom: 0; }

  /* N.B. warning: yellow label in a box with a straight yellow border of 3 px (a little thinner than the arrows in the footer) */
  .nb { color: #ffbb29; font-weight: 700; }
  /* the text as far in as it was inside the wavy border (13.81 px of border, now 3 px of line and the rest padding) */
  .warnbox { margin: 0 0 1.2rem; padding: calc(10.81px + .05rem) calc(10.81px + .15rem); border: 3px solid #ffbb29; background: #ffbb290f; }

/* Language switch under the logo: two flags with a pointer. Pure CSS: each flag is the label of a hidden
   radio button; the chosen language stays sharp, the other one is blurred (still there, just out of focus). */
.langs { display: flex; justify-content: center; gap: 1.6rem; margin: 1.1rem 0 0; }
.lang-pick { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.lang { position: relative; display: block; padding: .3rem .35rem .45rem; border-radius: 6px; cursor: pointer; }
.lang .flag { display: block; width: 1.75rem; height: 1.15rem; margin: 0; border-radius: 2px; box-shadow: 0 0 0 1px #00000040; }
/* The pointer is the Bibata Modern arrow (see /pointer-LICENSE.txt) in cream; a soft shadow keeps it visible on the flags. */
.lang .pointer { position: absolute; right: -.5rem; bottom: -.6rem; width: auto; height: 1.05rem; filter: drop-shadow(0 1px 1.5px #000a); transition: opacity .2s; }
/* Before a choice both flags show the pointer (they can be clicked); after it, only the chosen one. */
.langs:has(.lang-pick:checked) .lang-pick:not(:checked) + .lang .pointer { opacity: 0; }
.lang::after { content: ""; position: absolute; left: .35rem; right: .35rem; bottom: 0; height: 2px; border-radius: 1px; background: var(--moss); opacity: 0; transition: opacity .2s; }
.lang-pick:checked + .lang::after { opacity: 1; }
.lang-pick:focus-visible + .lang { outline: 2px solid var(--moss); outline-offset: 2px; }
.langs { margin-bottom: 2.6rem; }
.cols section { transition: filter .3s, opacity .3s; }
html:has(#lang-en:checked) .cols section[lang="nl"],
html:has(#lang-nl:checked) .cols section[lang="en"] { filter: blur(3px); opacity: .45; user-select: none; }
/* The blue Sticker info buttons: one before the technical paragraphs (Klein, Stil, Redundantie), spaced like a
   paragraph, and one after the poem. On a phone both full width; on a wide screen the first one full width too, the
   lower one small, on the right next to the poem, its top level with the poem's (the same margin above both). */
@media (min-width: 60rem) { .cols .body .end, .cols .body .sticker-btn:not(.mid) { grid-area: 12 / 1; }
  .cols .body .sticker-btn { justify-self: end; align-self: start; width: auto; margin: 1.6rem 0 0; padding: 0 .9rem; font-size: .78rem; }
  .cols .body .sticker-btn.mid { justify-self: stretch; margin: 0 0 1.2rem; padding: 0 calc(13.81px + .15rem); font-size: .86rem; } }   /* the first one as wide as the text */
@media (max-width: 59.99rem) { .cols .body .sticker-btn { margin: 1.6rem 0 0; } .cols .body .sticker-btn.mid { margin: 0 0 1.2rem; } }   /* full width */
/* the red heading over the technical paragraphs, in the body font and size, bold like the red words */
.tech-head { margin: .4rem 0 .6rem; color: var(--red); font-weight: 700; }

/* the blue button, the most important one: filled blue with a hard straight edge, tall, big letters,
   cream text and arrow as far in as the text in the wavy N.B. box */
.sticker-btn { display: flex; justify-content: flex-start; align-items: center; gap: .6rem; box-sizing: border-box; height: 60px; margin: 0;
  padding: 0 calc(13.81px + .15rem); background: #0047ab; border: 0; border-radius: 0;
  color: var(--text); font: 700 .86rem/1 Inter, "Helvetica Neue", Arial, sans-serif; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
  text-decoration: none; -webkit-tap-highlight-color: transparent; }
/* the same small hard shadow as the white labels in the footer */
.sticker-btn { box-shadow: 2px 2px 0 #002a66; }
.sticker-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.more-down { width: 15px; height: 18px; flex: none; color: var(--text); }
/* a cream hand (the Bibata Modern link cursor, see /pointer-LICENSE.txt) right after the words: tap here */
.btn-hand { display: block; width: 21px; height: 22px; flex: none; }
.sticker-btn .more-down { margin-left: auto; }

/* On a phone the columns would be one below the other: only the chosen language is shown, the other one not at all. */
@media (max-width: 59.99rem) {
  body { font-size: .9375rem; }   /* 15 px on a phone (line height stays 1.35): a few more characters per line, a calmer page */
  .cols { display: flex; flex-direction: column; }
  .lead { text-align: center; }
  .cols { margin-bottom: 2.5rem; }
  footer { margin-top: 2.2rem; }
  .cols hr { display: none; }
  html:has(#lang-en:checked) .cols section[lang="nl"],
  html:has(#lang-nl:checked) .cols section[lang="en"] { display: none; }
}

/* Footer: the shelf of objects with stickers (drawn by tools/footer_shelf.py), centred. */
.shelf-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.shelf { display: block; width: 100%; height: auto; margin: 0 auto; }
.shelf-wide { max-width: 52rem; }
.shelf-narrow { display: none; max-width: 24.69rem; }   /* 395 px: its blocks then 8 px, like the logo's, where it fits */
@media (max-width: 40rem) { .shelf-wide { display: none; } .shelf-narrow { display: block; } }
.shelf .say { fill: #fff; font-family: "Young Serif", Georgia, serif; }
.shelf .say-en { display: none; }
html:has(#lang-en:checked) .shelf .say-nl { display: none; }
html:has(#lang-en:checked) .shelf .say-en { display: inline; }


/* The header, as chosen in the mockup: no box around it. The moss tile on the left (the left 24 blocks of the
   logo, plus the yellow flap in its 25th), the conveyor belt with its stickers up to the right edge, and the
   name with the flags behind it and a line of grey info. All of it in blocks of --b (8 px; on a phone the
   footer drawing's block, so both are equally big). The header is a whole number of blocks wide, centred, so
   the belt always ends on a whole block. The belt is two repeating pieces from tools/header_band.py: its rows
   and wheels (static/band.svg), and the stickers (static/band-stickers.svg) in a layer that ends after the last
   sticker that fits whole, at least 2 blocks before the belt's end block. */
.kop { --b: 8px; --t: 8px; position: relative; width: round(down, 100%, var(--b)); height: calc(26 * var(--b)); margin: 0 auto 1.75rem; container-type: inline-size; }
.kop-tegel { position: absolute; z-index: 1; left: 0; top: 0; width: calc(25 * var(--b)); height: calc(26 * var(--b)); overflow: hidden; }
.kop-tegel img { display: block; width: calc(55 * var(--b)); height: calc(26 * var(--b)); max-width: none; }
.kop-band { position: absolute; left: calc(24 * var(--b)); right: 0; top: 0; height: calc(26 * var(--b));
  background: url(/band.svg?v=3) left top / calc(4 * var(--b)) calc(26 * var(--b)) repeat-x; }
.kop-band::before { content: ""; position: absolute; left: 0; top: 0; height: 100%; width: calc(round(down, 100% - 13 * var(--b), 10 * var(--b)) + 11 * var(--b));
  background: url(/band-stickers.svg?v=2) left top / calc(30 * var(--b)) calc(26 * var(--b)) repeat-x; }
.kop-band::after { content: ""; position: absolute; right: 0; top: calc(23 * var(--b)); width: calc(2 * var(--b)); height: calc(2 * var(--b)); background: #3a372c; }   /* the belt's end block */
/* the name 26 blocks in, 6 blocks tall, the bottom of its letters 7.5 blocks down; the flags 18 px after it, level
   with its middle; the info line 9.25 blocks down, 2.3 blocks big */
.kop-rij { position: absolute; left: calc(26 * var(--b) + 6px); top: calc(16.2 * var(--b) - 18px - 6 * .78 * var(--t)); display: grid; grid-template-columns: auto auto; column-gap: 18px; align-items: center; }
.kop-rij h1 { grid-area: 1 / 1; font-size: calc(6 * var(--t)); line-height: 1; text-align: left; white-space: nowrap; }
.kop-rij .langs { grid-area: 1 / 2; margin: 0; gap: .8rem; }
.kop-info { display: none; grid-area: 2 / 1 / 3 / 3; justify-self: start; margin: calc(.43 * var(--t)) 0 0;
  font: 600 calc(2.3 * var(--t) * .8)/1 Inter, "Helvetica Neue", Arial, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
/* both languages share one box (the wider decides), so " · 2026" after it stays put when you switch language */
.yr-swap { display: inline-grid; }
.yr-swap > span { grid-area: 1 / 1; display: inline !important; }
html:not(:has(#lang-en:checked)) .yr-swap > [lang="en"], html:has(#lang-en:checked) .yr-swap > [lang="nl"] { visibility: hidden; }
/* Narrower than the two columns: the name under the belt, centred, as big as fits (at most 58 px), the info under
   it, and the flags in the empty room above the belt's stickers, centred over the belt. The blocks are as big as
   the footer drawing's (at most 8 px; the drawing is 47.375 blocks wide and as wide as the footer allows). */
@media (max-width: 59.99rem) {
  .kop { --b: min(6px, round(down, (100vw - 2rem) / 47.375 + .01px, 1px)); --t: min(8px, round(down, (100vw - 2rem) / 47.375 + .01px, 1px)); height: auto; }   /* (+ .01 px: 379 / 47.375 is exactly 8, but not always in floating point) */
  .kop-rij { position: static; display: flex; flex-direction: column; align-items: center; margin-top: calc(26 * var(--b)); }
  .kop-rij h1 { margin-top: 36px; font-size: min(58px, round(down, (min(34rem, 100vw) - 2rem) / 7.05, 1px)); text-align: center; }   /* "OnderHetMos" is about 7 times its size wide */
  .kop-info { display: none; }   /* no info line under the name on a phone */
  .kop-rij .langs { position: absolute; left: calc(24 * var(--b)); right: 0; top: round(calc(16.2 * var(--b) - 30.4px - 28px), 1px); justify-content: center; }
}
@media (min-width: 60rem) {
  /* the line between the columns: thin and grey, fading in at the top and out at the bottom */
  .cols hr { width: 1.5px; background: linear-gradient(180deg, transparent, #4a473d 12%, #4a473d 82%, transparent); }
}

/* The maker's portrait, on the right in the footer: level with the shelf where there is room beside it,
   otherwise under it, always on the right edge of the text area. */
.foot-portrait { display: block; width: 5.5rem; height: 5.5rem; margin: 1.75rem 0 0 auto; }
@media (min-width: 60rem) { .foot-portrait { margin-right: 1.75rem; } }
@media (min-width: 72rem) {
  .foot-portrait { position: absolute; top: calc(50% - .25rem); right: max(2.75rem, (100% - 70rem) / 2); margin: 0; transform: translateY(-50%); }
}
}
