/* Old Book Reader public website. EB Garamond for headings, Literata for text (the
   app's fonts); the app's warm paper, charcoal and ochre. */

:root {
  --paper: #FDFBF7;
  --card: #FFFFFF;
  --sepia: #F4ECD8;
  --ink: #2A2723;
  --text-2: #4A443D;
  --text-3: #6E665D;
  --rule: #E3DACB;
  --rule-soft: #ECE4D6;
  --accent: #A6623B;
  --accent-dark: #7D4528;
  --display: "EB Garamond", Georgia, serif;
  --body: "Literata", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--body); font-size: 17px; line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}
a { color: #7D4528; }
a:hover { color: #5C3219; }
img { max-width: 100%; }
h1, h2, h3 { margin: 0; }
p { margin: 0; }

.wrap { max-width: 1160px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.narrow { max-width: 860px; }
.section { padding-top: 88px; padding-bottom: 88px; display: flex; flex-direction: column; gap: 40px; }
.band { background: var(--sepia); border-top: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft); }
.dark { background: var(--ink); color: var(--paper); }
.dark a { color: var(--paper); }
.dark .lede { color: #D9D1C4; }

.display { font-family: var(--display); font-weight: 500; font-size: 44px; line-height: 1.15; }
.eyebrow { font-family: var(--display); font-style: italic; font-size: 20px; color: var(--accent-dark); }
.lede { color: var(--text-2); }
.muted { color: var(--text-3); font-size: 15px; }

.button {
  display: inline-block; font: inherit; font-weight: 500; text-decoration: none;
  padding: 12px 26px; min-height: 48px; border: none; border-radius: 999px; cursor: pointer;
  background: var(--accent); color: #FFFFFF; text-align: center;
}
.button:hover { background: var(--accent-dark); color: #FFFFFF; }
.button.ink { background: var(--ink); color: var(--paper); padding: 10px 18px; min-height: 0; }
.button.ink:hover { background: #45403A; color: var(--paper); }
.button.big { font-size: 18px; padding: 14px 26px; }

/* Header and footer */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap { padding-top: 18px; padding-bottom: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex-grow: 1; }
.brand:hover { color: var(--ink); }
.brand svg .pg { fill: #FFFFFF; stroke: var(--ink); stroke-width: 6; stroke-linejoin: round; }
.brand svg .rb { fill: var(--accent); }
.brand span { font-family: var(--display); font-size: 26px; font-weight: 600; letter-spacing: 0.2px; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; font-size: 15px; }
.nav a:not(.button) { color: var(--ink); text-decoration: none; }
.nav a:not(.button):hover { text-decoration: underline; }
.site-footer { border-top: 1px solid var(--rule); }
.site-footer .wrap { padding-top: 28px; padding-bottom: 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; font-size: 14px; color: var(--text-3); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer a { color: var(--text-3); }

/* Home: opening */
.hero { padding-top: 72px; padding-bottom: 88px; display: flex; flex-wrap: wrap; align-items: center; gap: 56px; }
.hero-text { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.hero h1 { font-family: var(--display); font-weight: 500; font-size: 64px; line-height: 1.05; letter-spacing: -0.5px; }
.hero .intro { font-size: 20px; color: var(--text-2); max-width: 560px; }
.hero-art { flex: 1 1 340px; display: flex; justify-content: center; }

/* The waitlist form */
.waitlist { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-top: 8px; scroll-margin-top: 24px; }
.waitlist label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--text-2); flex: 1 1 260px; max-width: 340px; }
.waitlist input[type=email] {
  font: inherit; font-size: 17px; padding: 12px 18px; border: 1px solid #CFC5B4; border-radius: 999px;
  background: var(--card); color: var(--ink); width: 100%;
}
.waitlist input[type=email]:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.waitlist .button { font-size: 17px; min-height: 50px; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-error { color: var(--accent); font-weight: 600; font-size: 15px; }

/* The drawn tablet */
.tablet { width: 340px; max-width: 100%; height: 570px; background: var(--ink); border-radius: 28px; padding: 18px; box-shadow: 0 30px 60px rgba(42, 39, 35, 0.25); }
.screen { position: relative; width: 100%; height: 100%; background: #F8F1E3; border-radius: 10px; overflow: hidden; color: #2B2620; }
.screen .page { padding: 26px 24px 0; font-size: 13.5px; line-height: 1.62; }
.screen .page p { margin-bottom: 8px; }
.screen .chapter { margin-bottom: 10px; font-family: var(--display); font-size: 18px; text-align: center; }
.screen mark { background: rgba(255, 214, 0, 0.55); color: inherit; }
.panel { position: absolute; left: 0; right: 0; bottom: 0; background: #FFFFFF; border-top: 1px solid #E4DDCF; padding: 16px 18px 18px; box-shadow: 0 -10px 24px rgba(0, 0, 0, 0.08); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; font-size: 11px; }
.chips span { border: 1px solid #C9C1B2; padding: 3px 9px; border-radius: 99px; color: var(--text-2); }
.chips .on { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.panel p { font-size: 12.5px; line-height: 1.55; }
.screen .bubble { margin: 0 0 12px auto; max-width: 80%; background: #EDE4D3; padding: 8px 12px; border-radius: 12px; }
.screen .request { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px;
  background: #FFFFFF; border: 1px solid #E4DDCF; border-radius: 10px; padding: 10px 12px; font-size: 12.5px; }
.screen .request p { margin: 0; }
.screen .request span { background: var(--ink); color: #FFFFFF; padding: 4px 10px; border-radius: 99px; font-size: 11px; white-space: nowrap; }
.panel .ready { font-family: var(--display); font-size: 16px; margin-bottom: 4px; }
.pillar .steps { grid-template-columns: 1fr; gap: 18px; margin-top: 8px; }
.panel .ask { margin-top: 10px; font-size: 11.5px; color: var(--text-3); }

/* A literary touch: printer's ornaments, an epigraph, a drop cap */
.ornament { text-align: center; font-size: 30px; color: var(--accent); margin: 8px 0; line-height: 1; }
.epigraph { margin: 0 auto; max-width: 560px; text-align: center; }
.epigraph p { font-family: var(--display); font-style: italic; font-size: 26px; line-height: 1.35; color: var(--text-2); }
.epigraph footer { margin-top: 10px; font-size: 15px; color: var(--text-3); letter-spacing: .5px; }
.epigraph footer::before { content: "— "; }
.dropcap::first-letter { font-family: var(--display); float: left; font-size: 72px; line-height: .8;
                         padding: 8px 10px 0 0; color: var(--accent-dark); }
.problem { align-items: center; text-align: center; }
.problem .display { font-weight: 400; }
.shelf { background: var(--sepia); }
.shelf .lede { color: var(--text-2); }
.numeral { font-style: italic; }
.pillar-text h3, .way h3 { font-style: italic; }
.faq dt { font-family: var(--display); font-weight: 500; font-size: 22px; }

/* Real screenshots of the app, in a simple tablet frame */
.device { margin: 0; width: 340px; max-width: 100%; background: var(--ink); border-radius: 26px; padding: 14px;
          box-shadow: 0 30px 60px rgba(42, 39, 35, 0.22); }
.device img { display: block; width: 100%; height: auto; border-radius: 10px; }
.device.small { width: 300px; }
.device.drawn { height: 470px; }
.device.drawn .screen { background: #FAF4E8; }
.problem .display { font-size: 38px; }
.lede.big { font-size: 20px; max-width: 640px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Home: the three pillars */
.pillar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 40px 64px;
          padding: 24px 0; }
.pillar.flip { flex-direction: row-reverse; }
.pillar-text { flex: 1 1 380px; max-width: 520px; display: flex; flex-direction: column; gap: 12px; }
.pillar-text h3 { font-family: var(--display); font-weight: 500; font-size: 38px; line-height: 1.1; }
.pillar-text .lede { font-size: 18px; }

/* Home: three ways to read */
.ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.way { background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 26px; display: flex;
       flex-direction: column; gap: 10px; }
.way h3 { font-family: var(--display); font-weight: 500; font-size: 26px; line-height: 1.15; }
form.way .button { margin-top: auto; }  /* the plans' buttons line up, whatever is above them */
.soon { margin-top: auto; font-size: 14px; color: var(--text-3); border-top: 1px solid var(--rule-soft); padding-top: 12px; }
.pricing-note { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; max-width: 720px; }
.pricing-note .price { font-family: var(--display); font-size: 34px; line-height: 1.1; }
.about h1 { max-width: 760px; }

/* Home: features and steps */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 40px 48px; }
.feature { display: flex; flex-direction: column; gap: 10px; }
.numeral { font-family: var(--display); font-size: 28px; color: var(--accent); }
.feature h3 { font-size: 20px; font-weight: 600; }
.steps { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 32px; }
.steps li { display: flex; flex-direction: column; gap: 10px; padding-top: 20px; border-top: 2px solid var(--ink); }
.steps h3 { font-size: 22px; font-weight: 600; }

/* Covers */
.row-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 40px; }
.row-head > div { display: flex; flex-direction: column; gap: 12px; max-width: 640px; }
.covers { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 20px; }
.covers.large { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 32px 24px; }
.book-card { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit; }
.book-card:hover { color: inherit; }
.book-card:hover .cover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(42, 39, 35, 0.25); }
.cover { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; background: #5C4033; transition: transform .15s, box-shadow .15s; }
.cover.blank { padding: 16px 14px; display: flex; flex-direction: column; justify-content: space-between; font-family: var(--display); color: #F6F3EC; font-size: 20px; line-height: 1.15; }
.cover.blank small { font-size: 14px; color: #EADCCB; }
.card-title { font-weight: 600; font-size: 15px; line-height: 1.35; }
.card-author { font-size: 14px; color: var(--text-3); }

/* Pricing */
.pricing { display: flex; flex-wrap: wrap; gap: 32px; align-items: stretch; }
.price-card { flex: 1 1 320px; max-width: 520px; background: var(--card); border: 1px solid var(--rule); border-radius: 10px; padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.price-card .price { font-family: var(--display); font-size: 40px; line-height: 1.1; }
.price-card ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.price-card .button { align-self: flex-start; }
.price-aside { flex: 1 1 280px; max-width: 420px; display: flex; flex-direction: column; justify-content: center; gap: 12px; color: var(--text-2); }

/* Questions */
.faq { margin: 0; }
.faq div { padding: 20px 0; border-top: 1px solid var(--rule); }
.faq div:last-child { border-bottom: 1px solid var(--rule); }
.faq dt { font-weight: 600; font-size: 19px; }
.faq dd { margin: 8px 0 0; color: var(--text-2); }

.closing { padding-top: 96px; padding-bottom: 96px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px; }
.closing h2 { font-family: var(--display); font-weight: 500; font-size: 48px; line-height: 1.1; max-width: 720px; }

/* Library */
.page-head { padding-top: 56px; padding-bottom: 24px; display: flex; flex-direction: column; gap: 12px; }
.page-head h1 { font-family: var(--display); font-weight: 500; font-size: 52px; line-height: 1.1; }
.search { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.search label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--text-2); }
.search label.grow { flex: 1 1 280px; max-width: 420px; }
.search input, .search select { font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid #B9B1A2; border-radius: 6px; background: var(--card); color: var(--ink); min-height: 46px; }
.search .button { min-height: 46px; padding: 10px 20px; }
.kinds { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 20px; }
.kinds a { font-size: 14px; text-decoration: none; color: var(--ink); background: var(--card); border: 1px solid var(--rule); border-radius: 99px; padding: 6px 14px; }
.kinds a span { color: var(--text-3); font-variant-numeric: tabular-nums; }
.kinds a:hover { border-color: var(--ink); }
.kinds a.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.kinds a.on span { color: #D9D1C4; }
.kinds { padding-bottom: 24px; border-bottom: 1px solid var(--rule); }
.results { padding-top: 32px; padding-bottom: 88px; display: flex; flex-direction: column; gap: 28px; }

/* A book's page */
.book { padding-top: 56px; padding-bottom: 88px; display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.book-cover { flex: 0 1 300px; }
.book-cover .cover { box-shadow: 0 20px 40px rgba(42, 39, 35, 0.22); }
.book-text { flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.book-text h1 { font-family: var(--display); font-weight: 500; font-size: 52px; line-height: 1.08; }
.book-text .subtitle { font-family: var(--display); font-size: 26px; color: var(--text-2); }
.byline { font-size: 20px; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 20px; color: var(--text-3); font-size: 15px; }
.description { display: flex; flex-direction: column; gap: 14px; max-width: 680px; }
.subjects { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.subjects li { font-size: 13px; color: var(--text-2); border: 1px solid var(--rule); border-radius: 99px; padding: 3px 12px; background: var(--card); }
.callout { margin-top: 12px; padding: 24px; background: var(--card); border: 1px solid var(--rule); border-radius: 10px; display: flex; flex-direction: column; gap: 12px; }
.callout h2 { font-family: var(--display); font-weight: 500; font-size: 26px; }
.back { font-size: 15px; }

/* Thanks, not found, privacy and terms */
.message { padding-top: 88px; padding-bottom: 120px; display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.message h1 { font-family: var(--display); font-weight: 500; font-size: 48px; line-height: 1.1; }
.prose { padding-top: 56px; padding-bottom: 96px; display: flex; flex-direction: column; gap: 16px; }
.prose h1 { font-family: var(--display); font-weight: 500; font-size: 48px; line-height: 1.1; margin-bottom: 8px; }
.prose h2 { font-family: var(--display); font-weight: 500; font-size: 28px; margin-top: 20px; }
.prose ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.draft { background: #FBF0D9; border: 1px solid #E5CD94; border-radius: 8px; padding: 14px 18px; font-size: 15px; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { padding-top: 40px; padding-bottom: 56px; gap: 40px; }
  .hero h1 { font-size: 42px; }
  .hero .intro { font-size: 18px; }
  .display, .page-head h1, .book-text h1, .message h1, .prose h1 { font-size: 34px; }
  .closing h2 { font-size: 34px; }
  .section { padding-top: 56px; padding-bottom: 56px; }
  .covers { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 14px; }
  .covers.large { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 24px 16px; }
  .cover.blank { font-size: 16px; padding: 10px; }
  .book-cover { flex-basis: 220px; }
  .tablet { height: 540px; }
  .problem .display { font-size: 26px; }
  .epigraph p { font-size: 21px; }
  .dropcap::first-letter { font-size: 58px; }
  .pillar-text h3 { font-size: 30px; }
  .pillar.flip { flex-direction: row; }
}

/* Account: book requests and their offers */
.request-item { padding: 16px 0; border-top: 1px solid var(--rule); display: flex; flex-direction: column; gap: 8px; }
.note { background: var(--card); border: 1px solid var(--rule); border-radius: 10px; padding: 14px 16px; }
.request-item.note { border-top: 1px solid var(--accent); }
.choice { border-left: 3px solid var(--rule); padding-left: 14px; display: flex; flex-direction: column; gap: 6px; }
/* Account: the last seven days of reading, as bars */
.reading-bars { display: flex; align-items: flex-end; gap: 10px; height: 160px; margin: 8px 0 4px; }
.reading-bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; font-size: 13px; color: var(--text-2); }
.reading-bar .fill { width: 100%; max-width: 44px; background: var(--accent); border-radius: 6px 6px 2px 2px; min-height: 2px; }
