/* Whitman's home as a broadside of 1860: one sheet, one axis, one measure; every display line its own face, set to fill the
   measure as a jobbing compositor justified a poster; two inks, black and red. The faces: Abril Fatface (a fat face), Diplomata SC
   (an extended Didone), Pinyon Script (a copperplate script), Vast Shadow (a shaded letter), in fonts/ with their licences; Libre
   Caslon, Besley (a Clarendon) and Old Standard from stanza's kit. The ornaments are the 1860's own (/img/), the butterfly is
   Stanza Fleurons' U+E912. */

@font-face { font-family: "Abril Fatface"; src: url(fonts/AbrilFatface-Regular.woff2) format("woff2"); font-display: block; }
@font-face { font-family: "Diplomata SC"; src: url(fonts/DiplomataSC-Regular.woff2) format("woff2"); font-display: block; }
@font-face { font-family: "Pinyon Script"; src: url(fonts/PinyonScript-Regular.woff2) format("woff2"); font-display: block; }
@font-face { font-family: "Vast Shadow"; src: url(fonts/VastShadow-Regular.woff2) format("woff2"); font-display: block; }
@font-face { font-family: "WB"; src: url(/whitman/views/fonts/butterfly.woff2) format("woff2"); font-display: block; }   /* the views' one-glyph face of the butterfly, at U+E912 */

:root {
  --paper: #f5f0e5;
  --ink: #1b1814;
  --red: #b0301c;
  --soft: #6a5f50;
  --rule: var(--ink);
}

html { background: var(--paper); }
body {
  margin: 0; color: var(--ink);
  font: 400 18px/1.45 "Libre Caslon Text", Georgia, serif;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
cite { font-style: inherit; }

/* the sheet: a thick-and-thin border, as a jobbing printer framed a bill */
.sheet {
  box-sizing: border-box; width: min(1000px, calc(100% - 48px)); margin: 22px auto 0;
  border: 3px solid var(--ink); padding: 5px;
}
.bill {
  border: 1px solid var(--ink); padding: 34px 62px 40px; text-align: center;
}
.bill p, .bill h1, .bill h2, .bill blockquote, .bill figure { margin: 0; }

/* every display line: one line, its size set so it fills the measure (script.js); the sizes here are close for a page without it */
.l { display: block; white-space: normal; overflow-wrap: anywhere; line-height: 1; font-weight: 400; }
.fit .l { white-space: nowrap; overflow-wrap: normal; }   /* sized to the measure by script.js; with no script a line turns over */
.l > .fi { display: inline-block; }
.l.wrap { white-space: normal; }
.l.wrap > .fi { display: inline; }
.bill i { font-style: normal; color: var(--red); }

/* the head: sun, name, title */
.cut-sun { width: 34%; margin: 0 auto 24px !important; }
@font-face { font-family: "W1860"; src: url(/m/fonts/room/fleurons-1860.woff2) format("woff2"); font-display: block; }
/* the main sunrise, as the 1860 pages print it (U+EB0A, 1.54 em wide), filling the figure's width, in his red */
.cut-sun { container-type: inline-size; }
.cut-sun .sun { display: block; text-align: center; font: 400 calc(100cqw / 1.54)/1.1 "W1860"; color: var(--red); }
.cut-sun .field { fill: var(--red); }
.cut-sun .cut { stroke: var(--paper); }

.name { margin: 0; }
.walt { font-family: "Pinyon Script", cursive; font-size: 96px; line-height: .9; margin-bottom: -.06em; }
.whitman { font-family: "Abril Fatface", serif; font-size: 190px; text-transform: uppercase; line-height: .86; letter-spacing: .005em; }

.flank { display: flex; align-items: center; gap: 18px; margin: 18px 0 10px; }
.flank::before, .flank::after { content: ""; flex: 1; height: 0; border-top: 1px solid var(--rule); }
.flank > span { font: 400 15px/1 "Old Standard TT", serif; letter-spacing: .32em; text-transform: uppercase; padding-left: .32em; }

.title { font-family: "Diplomata SC", serif; font-size: 54px; color: var(--red); line-height: 1.05; }
.star {
  width: 44%; aspect-ratio: 1036 / 146; margin: 10px auto 6px; background: var(--ink);
  -webkit-mask: url(img/rule-star.webp) center / contain no-repeat; mask: url(img/rule-star.webp) center / contain no-repeat;
}
.dates { font: 400 15px/1.3 "Old Standard TT", serif; letter-spacing: .3em; text-transform: uppercase; padding-left: .3em; }

/* thick over thin, a bill's parting rule */
hr.oxford { border: 0; height: 2px; border-top: 3px solid var(--rule); border-bottom: 1px solid var(--rule); margin: 34px 0; }

/* his words */
.words { margin: 0; }
.head-piece {
  width: 36%; aspect-ratio: 760 / 204; margin: 0 auto 14px; background: var(--ink);
  -webkit-mask: url(img/head-proto.webp) center / contain no-repeat; mask: url(img/head-proto.webp) center / contain no-repeat;
}
.w1 { font-family: "Libre Caslon Text", serif; font-style: italic; font-size: 96px; line-height: 1.12; }
.w2 { font-family: "Libre Caslon Text", serif; font-style: italic; font-size: 32px; line-height: 1.3; margin-top: 2px; }
.l.w2.wrap { text-align: left; padding-left: 1.6em; text-indent: -1.6em; }
.words footer { font: italic 400 16px/1.4 "Libre Caslon Text", serif; color: var(--soft); margin-top: 16px; }
.words footer cite { font-style: normal; }

/* the rooms */
.rooms-h { font-family: "Vast Shadow", serif; font-size: 88px; text-transform: uppercase; color: var(--red); line-height: 1.05; }
.rooms .flank { margin-top: 12px; margin-bottom: 26px; }
.rooms .flank > span { letter-spacing: .14em; text-transform: none; font-style: italic; font-family: "Libre Caslon Text", serif; font-size: 17px; padding-left: .14em; }
.row { text-transform: uppercase; line-height: 1.02; }
.row a { transition: color .15s; }
.row a:hover, .row a:focus-visible { color: var(--red); outline: none; }
.row a:focus-visible { text-decoration: underline; text-decoration-thickness: .04em; text-underline-offset: .12em; }
.r1 { font-family: Besley, serif; font-weight: 900; font-size: 76px; }
.r2 { font-family: "Bodoni Moda", serif; font-weight: 500; font-style: italic; text-transform: none; font-size: 80px; }
.r3 { font-family: "Abril Fatface", serif; font-size: 84px; }
.poems { font: italic 400 16px/1.4 "Libre Caslon Text", serif; color: var(--soft); margin: 8px 0 24px !important; }
.poems i { color: var(--red); }
.poems span { transition: color .15s; }
.poems span.on { color: var(--ink); }

.fly { font: 190px/1 "WB"; margin: 18px auto -12px; height: 1em; }

/* coming up */
.coming .flank { margin-top: 0; }
.event { font-family: Besley, serif; font-weight: 900; font-size: 60px; text-transform: uppercase; margin-top: 10px; }
.event a:hover { color: var(--red); }
.perf { font: italic 400 30px/1.3 "Libre Caslon Text", serif; margin-top: 6px !important; }
.when { font: 400 17px/1.4 "Old Standard TT", serif; letter-spacing: .26em; text-transform: uppercase; margin-top: 14px !important; padding-left: .26em; }
.where { font: italic 400 18px/1.4 "Libre Caslon Text", serif; margin-top: 4px !important; }

.imprint { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--rule); font: 400 14px/1.8 "Old Standard TT", serif; letter-spacing: .22em; text-transform: uppercase; }
.imprint a:hover { color: var(--red); }

/* the museum's label, under the sheet: the die photographed beside a few plain words */
.label {
  box-sizing: border-box; width: min(820px, calc(100% - 48px)); margin: 30px auto 64px; color: var(--soft);
  display: grid; grid-template-columns: 200px 1fr; gap: 28px; align-items: start;
  font: 400 14.5px/1.55 "Libre Caslon Text", serif; text-align: left;
}
.label p { margin: 0; }
.label cite { font-style: italic; }
.die { margin: 3px 0 0; }
.die img { display: block; width: 100%; height: auto; }
.die figcaption { font: italic 400 12.5px/1.45 "Libre Caslon Text", serif; margin-top: 8px; }

/* the sun rises: its disc comes up out of the sea, then its rays run out, the centre first */
@media (prefers-reduced-motion: no-preference) {
  .cut-sun .disc { animation: rise 2.4s cubic-bezier(.22, .7, .24, 1) .25s both; }
  .cut-sun .ray { stroke-dasharray: 1 1; animation: ray 1s cubic-bezier(.3, .6, .3, 1) both; animation-delay: calc(1.5s + var(--o) * 110ms); }
}
@keyframes rise { from { transform: translateY(200px); } to { transform: none; } }
@keyframes ray { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

/* a phone: the same sheet, narrower; long lines may turn over */
@media (max-width: 640px) {
  .sheet { width: calc(100% - 20px); margin-top: 10px; border-width: 2px; padding: 3px; }
  .bill { padding: 26px 16px 24px; }
  .cut-sun { width: 56%; margin-bottom: 10px !important; }
  .flank { gap: 10px; margin: 12px 0 8px; }
  .flank > span { font-size: 12px; letter-spacing: .24em; }
  .dates, .when { font-size: 12px; letter-spacing: .18em; }
  hr.oxford { margin: 24px 0; }
  .head-piece { width: 60%; }
  .dates span, .when span { display: block; }
  .dates i, .when i { display: none; }
  .when span + i + span { margin-top: 2px; }
  .rooms .flank > span { font-size: 15px; letter-spacing: .04em; white-space: nowrap; }
  .poems { font-size: 14px; }
  .poems span { display: block; }
  .poems i { display: none; }
  .fly { font-size: 120px; }
  .perf { font-size: 21px; }
  .where { font-size: 16px; }
  .imprint { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 16px; letter-spacing: .14em; font-size: 12px; }
  .imprint i { display: none; }
  .label { width: calc(100% - 36px); font-size: 14px; grid-template-columns: 1fr; gap: 18px; }
  .die { width: 62%; }
}
