/* the quotes' medium italic, self-hosted under its own name (SIL Open Font License, fonts/OFL.txt) */
@font-face { font-family: "Cormorant Garamond Quotes"; font-style: italic; font-weight: 500; font-display: swap;
  src: url(fonts/cormorant-garamond-latin-500-italic.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant Garamond Quotes"; font-style: italic; font-weight: 500; font-display: swap;
  src: url(fonts/cormorant-garamond-latin-ext-500-italic.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* The Books section of simonferdinand.com.
   Each entry is one fixed scene: the book, its title and publication details, its reviews and endorsements, and its summary,
   always in the same places relative to one another. A book with several quotes is held still, turning, while its quotes take
   turns in one place; then the whole scene moves on together. A book with one quote or none scrolls past.
   Uses the site's tokens (--ink, --text, --muted, --brass, --rule, --paper, --display, --body). Needs books.js and book3d. */

.entry { --bw: min(46vw, 184px); position: relative; }
.entry + .entry { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--rule); }
.pin { position: relative; }
.lead { position: relative; display: flow-root; }
.held .lead { position: sticky; top: var(--lead-top, 64px); }   /* sticky only while held: Chrome misplaces 3D books in idle sticky boxes */
.cycle { height: 0; }
.plate { display: flex; justify-content: center; padding: 4px 0 22px; }

/* type, as on the site's book cards */
.head { margin: 0 0 26px; }
.entry h3 { font-family: var(--display); font-weight: 500; font-size: 28px; line-height: 1.1; margin: 0 0 4px; color: var(--ink); }
.entry h3 a { text-decoration: none; }
.entry h3 a:hover { text-decoration: underline; }
.sub { font-family: var(--display); font-style: italic; font-size: 20px; line-height: 1.3; margin: 0 0 6px; color: var(--text); }
.eds { font-size: 14px; color: var(--text); margin: 0 0 6px; }
.eds .lbl { color: var(--muted); }
.eds a { text-decoration: none; }
.eds a:hover { text-decoration: underline; }
.pub { font-size: 14px; color: var(--muted); margin: 0; }
.label { font-family: var(--body); font-weight: 400; font-size: 14px; letter-spacing: .02em; color: var(--brass); margin: 0 0 10px; }

/* reviews and endorsements: with the script, one at a time, all in the same place, in a space the size of the longest;
   without it, one after another */
.voices { margin: 0 0 36px; max-width: 62ch; }
.voice { margin: 0; }
.voice + .voice { margin-top: 26px; }
.voice blockquote { margin: 0 0 6px; font-family: "Cormorant Garamond Quotes", var(--display); font-size: 18px; font-weight: 500; line-height: 1.38; font-style: italic; color: var(--ink); text-indent: -.36em; }
.voice blockquote::before { content: "\201C"; }
.voice blockquote::after { content: "\201D"; }
.voice cite { display: block; font-style: normal; font-size: 13px; color: var(--brass); padding-left: clamp(20px, 4vw, 48px); margin-top: 4px; }
.js .voices { display: grid; }
.js .voice { grid-area: 1 / 1; align-self: start; margin: 0; opacity: 0; pointer-events: none; transition: opacity .55s ease; }
.js .voice.on { opacity: 1; pointer-events: auto; }
.nopin .voices { display: block; }
.nopin .voice { opacity: 1; pointer-events: auto; }
.nopin .voice + .voice { margin-top: 26px; }
/* how far through the quotes: a small open ring for each, the current one filled */
.ticks { display: none; }
.held .voices { margin-bottom: 16px; }
.held .ticks { display: flex; gap: 8px; margin: 0 0 34px; }
.ticks i { width: 6px; height: 6px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--brass); opacity: .6; transition: background-color .45s ease, opacity .45s ease; }
.ticks i.on { background: var(--brass); opacity: 1; }

.summary { margin: 0; max-width: 62ch; font-size: 16px; }

/* the "Cover forthcoming" label, as on the site, printed on the cover */
.badge { position: absolute; left: 50%; bottom: 7%; transform: translateX(-50%); white-space: nowrap; background: rgba(21,23,30,.9); color: var(--brass);
  font-family: var(--body); font-size: clamp(9.5px, calc(var(--w, 200px) * .046), 12px); letter-spacing: .08em; line-height: 1.3; padding: .45em .9em; border: 1px solid rgba(169,138,76,.5); }

@media (max-width: 899px) {
  .lead .plate { padding-top: 2px; padding-bottom: 16px; }
  .head { margin-bottom: 20px; }
  .voices { margin-bottom: 30px; }
  .held .voices { margin-bottom: 14px; }
  .held .ticks { margin-bottom: 28px; }
}
@media (max-width: 699px) {
  .entry h3 { font-size: 26px; }
  .sub { font-size: 18.5px; }
  .voice blockquote { font-size: 17px; }
}
/* a short screen: the book beside its title, so the book, title and longest quote fit on the screen together */
@media (max-width: 899px) {
  .compact .lead { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 18px; align-items: center; }
  .compact .words { display: contents; }
  .compact .lead .plate { padding: 4px 0 20px 10px; justify-content: flex-start; }
  .compact .lead .head { margin-bottom: 20px; }
  .compact .lead .voices, .compact .lead .part { grid-column: 1 / -1; }
  .compact h3 { font-size: 23px; }
  .compact .sub { font-size: 17px; }
}
/* laptop: the book on the left, its words on the right, held together as one scene */
@media (min-width: 900px) {
  .entry { --bw: clamp(220px, 20vw, 264px); }
  .entry + .entry { margin-top: 112px; padding-top: 0; border-top: 0; }
  .lead { display: grid; grid-template-columns: calc(var(--bw) * 1.5) minmax(0, 37rem); column-gap: clamp(40px, 5vw, 72px); align-items: start; }
  .plate { display: block; padding: 6px 0 0 calc(var(--bw) * .25); }
  .words { padding-top: 6px; }
  .head { margin-bottom: 30px; }
  .entry h3 { font-size: 30px; }
  .voice blockquote { font-size: 19.5px; }
  .summary { font-size: 16.5px; line-height: 1.65; }
}

/* the two book sections: on phones one list of books; on laptops "Monographs" and "Edited volumes", each full width */
.section.books .wide-only { display: none; }
@media (max-width: 899px) {
  #books.books { padding-bottom: 48px; }
  #edited.books { border-top: 0; padding-top: 0; }
  #edited.books > h2 { display: none; }
  #edited.books .entry:first-child { border-top: 1px solid var(--rule); padding-top: 40px; }
}
@media (min-width: 900px) {
  .section.books { grid-template-columns: 1fr; }
  .section.books > h2 { position: static; margin-bottom: 64px; }
  .section.books .wide-only { display: inline; }
  .section.books .narrow-only { display: none; }
  #books.books { padding-bottom: 40px; }
  #edited.books { border-top: 0; padding-top: 72px; }
}
