/* josephcrowepoetry.com, redesigned 2026-11-20 (design 9 of the mockups in
   Dropbox/writing/thebookofweston/redesign-mockups-2026-11/). Replaces
   style.css, which stays on the server untouched for a rollback. */

@font-face { font-family: 'AGP'; src: url('fonts/agp-regular.woff2') format('woff2'), url('fonts/agp-regular.woff') format('woff'); font-weight: 400; font-style: normal; font-display: swap; }
/* The italic is registered under the same family name, so <i> in a poem uses
   the real italic face instead of slanted roman letters. */
@font-face { font-family: 'AGP'; src: url('fonts/agp-italic.woff2') format('woff2'), url('fonts/agp-italic.woff') format('woff'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'AGP'; src: url('fonts/agaramondpro-bold.woff2') format('woff2'), url('fonts/agaramondpro-bold.woff') format('woff'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'IM Fell DW Pica'; src: url('fonts/im-fell-dw-pica-v12-latin-regular.woff2') format('woff2'), url('fonts/im-fell-dw-pica-v12-latin-regular.woff') format('woff'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'IM Fell DW Pica'; src: url('fonts/im-fell-dw-pica-v12-latin-italic.woff2') format('woff2'), url('fonts/im-fell-dw-pica-v12-latin-italic.woff') format('woff'); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --ink: #0b0b0b;
  --paper: #fff;
  --grey: #747474;
  --soft: #b4b4b4;
  --hair: rgba(0, 0, 0, .13);
  --serif: 'AGP', Georgia, serif;
  --fell: 'IM Fell DW Pica', Georgia, serif;
  --sans: 'Inter', -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --pad: clamp(20px, 4vw, 56px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --barh: 66px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 21px/1.6 var(--serif); font-kerning: normal;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
picture { display: block; }
::selection { background: var(--ink); color: var(--paper); }
.lab { font: 500 13px/1.4 var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.u { background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 1px; transition: background-size .5s var(--ease); padding-bottom: 2px; }
a:hover .u, a.u:hover, a:focus-visible .u { background-size: 100% 1px; }

/* ---------- Top bar with search ---------- */
.bar {
  position: sticky; top: 0; z-index: 20; min-height: var(--barh);
  display: grid; grid-template-columns: 1fr minmax(220px, 400px) 1fr; align-items: center; gap: 24px;
  padding: 12px var(--pad); background: rgba(255, 255, 255, .96);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hair); transition: border-color .4s;
}
.bar.anon { border-bottom-color: transparent; }
.mark { justify-self: start; display: flex; align-items: center; gap: 10px; font-family: var(--fell); font-size: 23px; transition: opacity .4s, transform .5s var(--ease); }
.mark img { display: block; width: 26px; height: 26px; filter: grayscale(1); }
.bar.anon .mark { opacity: 0; transform: translateY(-6px); pointer-events: none; }
.searchwrap { position: relative; }
.search {
  width: 100%; text-align: left; font: italic 400 19px var(--serif); color: var(--ink);
  border: 0; border-radius: 999px; padding: 7px 20px 7px 44px; outline: none;
  background: #f1f1f1 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23747474' stroke-width='1.5' stroke-linecap='round'%3E%3Ccircle cx='8.5' cy='8.5' r='6'/%3E%3Cpath d='M13 13l5 5'/%3E%3C/svg%3E") no-repeat 18px 50% / 16px 16px;
  -webkit-appearance: none; appearance: none; transition: background-color .3s, box-shadow .3s;
}
/* A filled field instead of an underline, so the bar's own bottom line is the
   only line across the top (David, 2026-11-21). */
.search:hover { background-color: #ebebeb; }
.search:focus { background-color: var(--paper); box-shadow: 0 0 0 1px var(--hair), 0 6px 20px rgba(0, 0, 0, .07); }
.search::placeholder { color: #8f8f8f; }
.search::-webkit-search-cancel-button { cursor: pointer; }
.bar nav { justify-self: end; display: flex; gap: 30px; }
.bar nav a { position: relative; }
.bar nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease);
}
.bar nav a:hover::after { transform: scaleX(1); transform-origin: left; }

/* Search results under the box, on every page but the homepage, where the
   index itself narrows instead. */
.results {
  position: absolute; left: 50%; top: calc(100% + 10px); transform: translateX(-50%);
  width: min(560px, calc(100vw - 32px)); max-height: min(70vh, 560px); overflow-y: auto;
  background: var(--paper); border: 1px solid var(--hair); box-shadow: 0 18px 40px rgba(0, 0, 0, .1);
  text-align: left; padding: 6px 0;
}
.results[hidden] { display: none; }
.res { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 2px 12px; padding: 12px 20px; }
.res + .res { border-top: 1px solid var(--hair); }
.res .rn { color: var(--soft); font-size: 17px; grid-row: span 2; }
.res .rt { font-family: var(--fell); font-size: 22px; line-height: 1.2; }
.res .ro { font-style: italic; font-size: 16px; line-height: 1.4; color: var(--grey); }
.res:hover .rt, .res.on .rt { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.res .hit, .row .hit { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; color: var(--ink); }
.resmore { display: block; padding: 12px 20px; border-top: 1px solid var(--hair); color: var(--grey); }
.resnone { padding: 14px 20px; font-style: italic; color: var(--grey); }

/* ---------- Homepage top ---------- */
.hc {
  min-height: calc(100vh - var(--barh)); min-height: calc(100svh - var(--barh));
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 40px 24px 70px;
}
.hc .crow img { width: 54px; height: 54px; filter: grayscale(1); }
.hc .crow { margin-bottom: 34px; opacity: 0; animation: fade 1s .1s forwards; }
.name { margin: 0; font-family: var(--fell); font-weight: 400; font-size: clamp(60px, 11.5vw, 178px); line-height: .95; letter-spacing: -.01em; }
.name .gl { display: inline-block; overflow: hidden; padding: 0 .04em .1em; vertical-align: top; }
.name .gl > span { display: inline-block; transform: translateY(105%); animation: rise 1.3s var(--ease) forwards; }
.name .gl + .gl > span { animation-delay: .12s; }
.hc .tag { max-width: 30em; margin: 28px auto 0; font-style: italic; font-size: 23px; line-height: 1.45; color: #444; opacity: 0; animation: fade 1s .6s forwards; }
.hc .newest { margin: 30px 0 0; font-size: 19px; color: var(--grey); opacity: 0; animation: fade 1s .85s forwards; }
.hc .newest a { color: var(--ink); font-family: var(--fell); font-size: 23px; }
@keyframes rise { to { transform: none; } }
@keyframes fade { to { opacity: 1; } }

/* ---------- A poem: number, title between two arrows, the poem ---------- */
.feature { border-top: 1px solid var(--hair); }
.pp { text-align: center; padding: 84px var(--pad) 84px; }
.num { display: block; width: fit-content; margin: 0 auto; font-size: 26px; line-height: 1; color: var(--grey); }
/* On a poem page the number links to the index on the homepage. */
a.num { text-decoration: underline 1px transparent; text-underline-offset: 5px; transition: color .3s, text-decoration-color .3s; }
a.num:hover, a.num:focus-visible { color: var(--ink); text-decoration-color: currentColor; }
.titlerow { display: grid; grid-template-columns: 1fr minmax(0, auto) 1fr; align-items: center; gap: 0 clamp(12px, 2vw, 26px); margin-top: 14px; }
.ptitle { font-family: var(--fell); font-weight: 400; font-size: clamp(30px, 3.6vw, 46px); line-height: 1.05; margin: 14px auto 0; max-width: 13em; }
.titlerow .ptitle { margin: 0; }
.arr { position: relative; display: block; color: #6e6e6e; transition: color .3s; padding: 14px 0; }
.arr.prev { justify-self: end; }
.arr.next { justify-self: start; }
.arr svg { display: block; width: 42px; height: 14px; transition: transform .45s var(--ease); }
.arr .at {
  position: absolute; top: 100%; left: 50%; width: 11em; margin-left: -5.5em; text-align: center;
  font-family: var(--fell); font-size: 17px; line-height: 1.2; color: var(--ink);
  opacity: 0; transform: translateY(-4px); transition: opacity .3s, transform .4s var(--ease); pointer-events: none;
}
.arr:hover, .arr:focus-visible { color: var(--ink); }
.arr:hover .at, .arr:focus-visible .at { opacity: 1; transform: none; }
.arr.prev:hover svg { transform: translateX(-5px); }
.arr.next:hover svg { transform: translateX(5px); }
/* The press: the arrow is pushed down and toward where it points, then the page turns. */
.arr.press, .pg.press { color: var(--ink); }
.arr.prev.press svg, .pg.prev.press svg { transform: translate(-12px, 3px) scaleX(.88); transition: transform .13s ease-out; }
.arr.next.press svg, .pg.next.press svg { transform: translate(12px, 3px) scaleX(.88); transition: transform .13s ease-out; }
/* The underside of a crow's wing under the title (David, 2026-11-21): coverts,
   secondaries and the splayed primaries, drawn by wing_ornament.py in
   Dropbox/writing/thebookofweston/. It opens from the shoulder out to the
   wingtip. */
.rule {
  width: 170px; height: 41px; margin: 28px auto 40px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 48' stroke='%230b0b0b' stroke-width='1.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M133.8 9.7 Q165.3 12.9 193.2 14.4 Q196.6 13.5 197 12 Q196.8 10.5 193.6 9 Q165.7 7.6 134.2 5.3 Z' fill='%23fff'/%3E%3Cpath d='M152.9 8.8 L189.4 11.5' fill='none' stroke-width='.7'/%3E%3Cpath d='M128.6 11.4 Q160.9 18 189.5 22.3 Q193.4 21.6 194 20 Q194 18.3 190.5 16.4 Q161.9 12 129.4 6.6 Z' fill='%23fff'/%3E%3Cpath d='M148.5 12.3 L186.2 18.7' fill='none' stroke-width='.7'/%3E%3Cpath d='M123.3 13 Q154.5 22.9 181.8 30 Q186.2 29.7 187 28 Q187.2 26.2 183.6 23.6 Q156.2 16.6 124.7 8 Z' fill='%23fff'/%3E%3Cpath d='M142.9 15.8 L179.4 25.9' fill='none' stroke-width='.7'/%3E%3Cpath d='M117.9 14.7 Q146.2 27.3 170.7 36.5 Q175.4 36.7 176.5 35 Q176.9 33 173.3 29.9 Q148.9 20.6 120.1 9.3 Z' fill='%23fff'/%3E%3Cpath d='M136.2 18.9 L169.6 32.2' fill='none' stroke-width='.7'/%3E%3Cpath d='M112.5 16.8 Q136.7 31.1 157 41.5 Q162.1 42.2 163.5 40.5 Q164.2 38.4 160.7 34.6 Q140.4 24.3 115.5 11.2 Z' fill='%23fff'/%3E%3Cpath d='M128.8 21.9 L157.6 37.3' fill='none' stroke-width='.7'/%3E%3Cpath d='M106.1 18.8 Q125.9 33.7 142 43.8 Q147.4 45.2 149 43.5 Q149.9 41.3 146.6 36.9 Q130.6 26.7 109.9 13.2 Z' fill='%23fff'/%3E%3Cpath d='M120.3 24.2 L144.1 40.2' fill='none' stroke-width='.7'/%3E%3Cpath d='M103.5 15.5 Q101 28.9 100.3 35.8 Q102.6 42.1 106 43 Q109.5 42.7 112.9 37 Q113.5 30.1 113.5 16.5 Z' fill='%23fff'/%3E%3Cpath d='M92.5 15.5 Q90 28.9 89.3 35.8 Q91.6 42.1 95 43 Q98.5 42.7 101.9 37 Q102.5 30.1 102.5 16.5 Z' fill='%23fff'/%3E%3Cpath d='M81.5 15.5 Q79 29.1 78.3 36.1 Q80.6 42.4 84 43.3 Q87.5 43 90.9 37.3 Q91.5 30.2 91.5 16.5 Z' fill='%23fff'/%3E%3Cpath d='M70.5 15.5 Q68 29.1 67.3 36.2 Q69.6 42.5 73 43.4 Q76.5 43.1 79.9 37.4 Q80.5 30.3 80.5 16.5 Z' fill='%23fff'/%3E%3Cpath d='M59.5 15.5 Q57 29 56.3 36 Q58.6 42.3 62 43.2 Q65.5 42.9 68.9 37.2 Q69.5 30.2 69.5 16.5 Z' fill='%23fff'/%3E%3Cpath d='M48.5 15.5 Q46 28.7 45.3 35.3 Q47.6 41.5 51 42.5 Q54.5 42.2 57.9 36.5 Q58.5 29.8 58.5 16.5 Z' fill='%23fff'/%3E%3Cpath d='M37.5 15.5 Q35 28 34.4 34 Q36.6 40.2 40 41.2 Q43.5 40.9 46.9 35.2 Q47.5 29.2 47.5 16.5 Z' fill='%23fff'/%3E%3Cpath d='M27.1 15.5 Q24.6 26.8 24 31.9 Q26.2 38 29.5 39 Q33 38.8 36.4 33.2 Q36.9 28.2 36.9 16.5 Z' fill='%23fff'/%3E%3Cpath d='M18.8 15.5 Q16.5 25 16 29.2 Q17.7 34.4 20.5 35.3 Q23.4 35.2 26.4 30.5 Q27 26.3 27.2 16.5 Z' fill='%23fff'/%3E%3Cpath d='M12.1 15.4 Q10.1 21.8 9.6 24.4 Q10.5 28.2 12.5 29 Q14.6 29 16.9 25.8 Q17.4 23.2 17.9 16.6 Z' fill='%23fff'/%3E%3Cpath d='M4.5 21.5 C14 10 40 5 80 4.5 C104 4.3 118 4.6 127 6 L127 6  Q126.8 9.8 123 10.5 Q122.2 14.7 118 15.5 Q115.8 19.8 111 20 Q107.3 23.9 102 23.4 Q97.5 26.8 92 25.6 Q86.8 28.7 81 27 Q75.7 29.8 70 27.8 Q64.5 30.3 59 28 Q53.5 30.3 48 27.8 Q42.4 29.9 37 27.2 Q31.3 29.1 26 26.2 Q20.1 27.7 15 24.5 Q9.1 25.3 4.5 21.5 Z' fill='%23fff'/%3E%3Cpath d='M7 16.5 C17 9 40 5 80 4.5 C108 4.2 128 5 142 6.6 L142 6.6  Q138.7 8.6 135 7.4 Q131.8 9.6 128 8.6 Q124.8 10.9 121 10 Q117.8 12.2 114 11.2 Q110.2 13.3 106 12.2 Q101.6 14.1 97 12.8 Q92.6 14.5 88 13.1 Q83.5 14.8 79 13.3 Q74.5 14.9 70 13.4 Q65.5 15 61 13.5 Q56.5 15.1 52 13.6 Q47.5 15.3 43 13.8 Q38.5 15.5 34 14 Q29.6 15.8 25 14.4 Q20.6 16.4 16 15.2 Q11.7 17.4 7 16.5 Z' fill='%23fff'/%3E%3C/svg%3E") center / contain no-repeat;
  clip-path: inset(0 100% 0 0); animation: unfold 1.3s .25s var(--ease) forwards;
}
@keyframes unfold { to { clip-path: inset(0 0 0 0); } }

.poem { width: fit-content; max-width: min(100%, 36em); margin: 0 auto; text-align: left; font-size: 22px; line-height: 1.7; }
.poem .chapter { margin: 0; }
.poem p { margin: 0; padding-left: 1em; text-indent: -1em; }
.poem .break { height: 1.15em; margin: 0; }
.poem pre { margin: 0; font: inherit; white-space: pre-wrap; }
.poem p.indented, .poem p.indent { margin-left: 2rem; }
.poem p.justified { text-align: justify; text-align-last: justify; }
.poem div[style] { max-width: 100%; }

/* Lines settle in from a slight blur as they reach the screen. Without
   JavaScript nothing is hidden. */
.js .poem p, .js .ln, .js .rv { opacity: 0; transform: translateY(.4em); filter: blur(2.5px); transition: opacity 1s var(--ease), transform 1s var(--ease), filter 1s var(--ease); }
.js .rv { filter: none; }
.js .poem p.in, .js .ln.in, .js .rv.in { opacity: 1; transform: none; filter: none; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; border-top: 1px solid var(--hair); margin: 0 var(--pad); padding: 30px 0 46px; }
.pg { display: block; }
.pg.next { text-align: right; }
.pg .lab { display: inline-flex; align-items: center; gap: 12px; color: var(--grey); }
.pg svg { width: 40px; height: 12px; transition: transform .45s var(--ease); }
.pg.prev:hover svg { transform: translateX(-5px); }
.pg.next:hover svg { transform: translateX(5px); }
.pg .pt { display: block; font-family: var(--fell); font-size: 27px; line-height: 1.15; margin-top: 4px; }

/* ---------- Index: one centered column ---------- */
.index { padding: 70px var(--pad) 110px; scroll-margin-top: var(--barh); }
.ix-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; max-width: 820px; margin: 0 auto; border-bottom: 1px solid var(--ink); padding-bottom: 20px; }
.ix-head h2 { font-family: var(--fell); font-weight: 400; font-size: clamp(60px, 8vw, 116px); line-height: .9; margin: 0; }
.hits { color: var(--grey); }
.rows { list-style: none; margin: 0 auto; padding: 0; max-width: 820px; }
.row { display: block; text-align: center; padding: 28px 0 30px; border-bottom: 1px solid var(--hair); }
.row .n, .row .t, .row .o { display: block; }
.row .n { color: var(--soft); font-size: 19px; transition: color .3s; }
.row .t { font-family: var(--fell); font-size: 31px; line-height: 1.12; margin-top: 2px; }
.row .o { font-style: italic; font-size: 19px; line-height: 1.45; color: var(--grey); margin: 8px auto 0; max-width: 34em; transition: color .3s; }
.row:hover .n, .row:hover .o, .row:focus-visible .n, .row:focus-visible .o { color: var(--ink); }
.empty { padding: 40px 0; font-style: italic; color: var(--grey); text-align: center; display: none; }

/* ---------- The complete book and the changelog ---------- */
.pagehead { text-align: center; padding: 84px var(--pad) 0; }
.pagehead .ptitle { margin-top: 0; font-size: clamp(40px, 5.2vw, 68px); }
.pagehead .hits { margin-top: 12px; }
.bookpoem { padding-top: 90px; padding-bottom: 10px; }
.bookpoem + .bookpoem { border-top: 1px solid var(--hair); margin: 60px var(--pad) 0; padding-left: 0; padding-right: 0; }
.bookpoem .ptitle a:hover { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.log { list-style: none; max-width: 820px; margin: 50px auto 110px; padding: 0 var(--pad); }
.log a { display: block; text-align: center; padding: 22px 0 24px; border-top: 1px solid var(--hair); }
.log li:last-child a { border-bottom: 1px solid var(--hair); }
.log .d { display: block; color: var(--grey); }
.log .t { display: block; font-family: var(--fell); font-size: 29px; line-height: 1.15; margin-top: 4px; }

/* ---------- Footer ---------- */
.foot { text-align: center; border-top: 1px solid var(--hair); padding: 90px var(--pad) 120px; }
.foot .sub { display: inline-flex; align-items: baseline; gap: .3em; font-family: var(--fell); font-size: clamp(46px, 5vw, 72px); line-height: 1; }
.foot .sub span { font-family: var(--sans); font-size: .5em; transition: transform .45s var(--ease); }
.foot .sub:hover span { transform: translateX(8px); }
.fcols { display: flex; justify-content: center; gap: clamp(48px, 9vw, 140px); margin-top: 46px; }
.fcols div { display: flex; flex-direction: column; gap: 9px; }
.fcols div:first-child { text-align: right; }
.fcols div:last-child { text-align: left; color: var(--grey); }
.fcols a { transition: color .3s; }
.fcols a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.colophon { margin: 46px 0 0; font-style: italic; font-size: 16px; color: var(--soft); }

@media (max-width: 760px) {
  :root { --barh: 104px; }
  .pp { padding-top: 30px; }
  .bookpoem { padding-top: 50px; }
  .pagehead { padding-top: 34px; }
  .bar { grid-template-columns: auto 1fr; row-gap: 8px; padding-top: 10px; padding-bottom: 10px; }
  .bar nav { gap: 18px; }
  .searchwrap { grid-column: 1 / -1; grid-row: 2; }
  .mark span { display: none; }
  .bar.anon .mark { opacity: 1; transform: none; pointer-events: auto; }
}
@media (max-width: 560px) {
  body { font-size: 19px; }
  .poem { font-size: 19.5px; }
  .arr svg { width: 30px; }
  .rule { width: 132px; height: 32px; margin: 22px auto 32px; }
  .titlerow { gap: 0 10px; }
  .pg .pt { font-size: 21px; }
  .pg svg { width: 26px; }
  .hc .tag { font-size: 20px; }
  .row .t { font-size: 26px; }
  .row .o { font-size: 17px; }
  .fcols { gap: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .name .gl > span { transform: none; }
  .hc .crow, .hc .tag, .hc .newest { opacity: 1; }
  .rule { clip-path: none; }
  .js .poem p, .js .ln, .js .rv { opacity: 1; transform: none; filter: none; }
}
