/* Uncertain Books - styles. Colours and type follow the LIFE cover. */
@font-face { font-family: "Libre Baskerville"; src: url("fonts/librebaskerville.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Libre Baskerville"; src: url("fonts/librebaskerville-italic.woff2") format("woff2"); font-weight: 400 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Charis"; src: url("fonts/charis-regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Charis"; src: url("fonts/charis-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Charis"; src: url("fonts/charis-bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --paper: #f8f4ec;
  --paper-2: #ede7da;
  --card: #fcfbf8;
  --ink: #1b1b1b;
  --ink-soft: #55524b;
  --line: #d8d0bf;
  --red: #b3261e;
  --red-dark: #8e1d17;
  --green: #4f7d3f;
  --green-dark: #3c6130;
  --slate: #8d9aa6;
  --ph: #fff1a8;
  --display: "Libre Baskerville", Baskerville, Georgia, serif;
  --text: "Charis", "Charis SIL", Georgia, "Times New Roman", serif;
  --wrap: 1120px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--text); font-size: 18px; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red-dark); text-underline-offset: 2px; }
a:hover { color: var(--red); }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); margin: 0 0 .4em; }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); margin: 1.6em 0 .5em; }
h3 { font-size: 1.2rem; margin: .2em 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 740px; }
.center { text-align: center; }
.small { font-size: .88rem; }
.big { font-size: 1.2rem; }
.muted { color: var(--ink-soft); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 10px; top: 10px; background: #fff; padding: 8px; z-index: 10; }

/* Placeholders - highlighted until real content replaces them */
.ph { background: var(--ph); outline: 1px dashed #c9a92a; padding: 0 3px; }
.draft-note { background: var(--ph); border: 1px dashed #c9a92a; padding: 8px 12px; font-size: .9rem; }

/* Header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 70px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { width: 26px; height: auto; }
.brand-name { font-family: var(--text); text-transform: uppercase; letter-spacing: .22em; font-size: .95rem; margin: 0; color: var(--ink); }
.site-nav { display: flex; gap: 24px; }
.site-nav a { text-decoration: none; color: var(--ink); font-size: 1rem; padding: 6px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--red); color: var(--ink); }
.nav-toggle { display: none; background: none; border: 1px solid var(--ink); border-radius: 4px; padding: 6px 12px; font: inherit; font-size: .95rem; color: var(--ink); cursor: pointer; }
@media (max-width: 800px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 70px; background: var(--paper); border-bottom: 1px solid var(--line); flex-direction: column; gap: 0; padding: 6px 20px 14px; }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 10px 0; border-bottom: 1px solid var(--line); }
}

/* Buttons */
.btn { display: inline-block; padding: 12px 22px; border-radius: 3px; text-decoration: none; font-family: var(--text); font-weight: 700; font-size: 1rem; border: 2px solid transparent; transition: background .15s, color .15s; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); color: #fff; }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: var(--paper); }
.btn-light { background: var(--paper); color: var(--ink); }
.btn-light:hover { background: #fff; color: var(--ink); }
.buy { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.5em 0 .5em; }
.buy-note { margin: 0 0 1em; }
.store-picker { margin-bottom: 1em; }
.store-picker select { font: inherit; font-size: .9rem; padding: 3px 6px; margin-left: 6px; }
.text-link { font-weight: 700; text-decoration: none; }

/* Book title typography, as on the cover */
.book-title { margin: 0 0 .5em; }
.bt-main { display: block; font-size: clamp(3rem, 8vw, 5.2rem); letter-spacing: .12em; line-height: 1; }
.bt-sub { display: block; font-style: italic; font-weight: 400; font-size: clamp(1.5rem, 3.4vw, 2.2rem); margin-top: .15em; }
.subtitle { font-size: 1.2rem; margin: 0 0 .6em; text-wrap: balance; }
.tagline { font-family: var(--display); font-style: italic; color: var(--red); font-size: 1.15rem; margin: 0 0 1em; }
.author-caps { text-transform: uppercase; letter-spacing: .3em; font-size: 1rem; margin: 0; }
.eyebrow, .tag { text-transform: uppercase; letter-spacing: .16em; font-size: .78rem; font-weight: 700; color: var(--green-dark); margin: 0 0 .8em; }
.by { font-style: italic; color: var(--ink-soft); margin: 0 0 .6em; }

/* Crowd of walking figures (from the cover artwork) */
.crowd { width: 100%; background-repeat: repeat-x; background-position: center bottom; }
.crowd-wide { height: 52px; background-image: url("crowd-wide.svg"); background-size: 1600px 52px; background-position: right bottom; }
.crowd-thin { height: 30px; background-image: url("crowd-thin.svg"); background-size: 1600px 30px; opacity: .9; }

/* Hero */
.hero { padding: 56px 0 0; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; padding-bottom: 40px; }
.hero-cover img { max-width: 380px; margin: 0 auto; box-shadow: 0 18px 40px rgba(27,27,27,.28), 0 0 0 1px rgba(27,27,27,.08); }
@media (max-width: 800px) {
  .hero { padding-top: 28px; }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-cover { order: -1; }
  .hero-cover img { max-width: 230px; }
}

/* Sections */
.section { padding: 56px 0; }
.band { padding: 56px 0; background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band h2 { margin-top: 0; }
.band-ink { background: var(--ink); color: #e9e4d8; border: 0; }
.band-ink h2 { color: #fff; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.section-head h2 { margin: 0; }
h2.sub { border-bottom: 1px solid var(--line); padding-bottom: 8px; }

/* Blurb (back cover text) */
.blurb p { margin: 0 0 1em; }
.blurb .lead-in, .blurb .closer { font-weight: 700; }
.blurb .lead-in { font-family: var(--display); font-size: 1.35rem; }

/* Book cards with typographic placeholder covers */
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; }
.book-card { display: grid; grid-template-columns: 110px 1fr; gap: 18px; background: var(--card); border: 1px solid var(--line); padding: 18px; }
.book-card p { margin: 0 0 .4em; font-size: .95rem; }
.book-card h3 { font-size: 1.05rem; }
.type-cover { aspect-ratio: 2 / 3; background: #f3eee2; border: 1px solid var(--line); box-shadow: 0 6px 14px rgba(27,27,27,.14); padding: 10px 7px 8px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.tc-title { font-family: var(--display); font-weight: 700; font-size: .66rem; line-height: 1.2; }
.tc-sub { font-family: var(--display); font-style: italic; font-size: .56rem; line-height: 1.2; margin-top: 2px; }
.tc-flask { width: 22px; margin: auto 0 6px; opacity: .85; }
.tc-author { font-size: .46rem; letter-spacing: .15em; }
.book-feature { display: grid; grid-template-columns: 200px 1fr; gap: 32px; align-items: start; margin-bottom: 24px; }
.book-feature img { box-shadow: 0 12px 24px rgba(27,27,27,.24), 0 0 0 1px rgba(27,27,27,.08); }
.book-feature h3 { font-size: 1.5rem; }
.book-feature h3 a { color: var(--ink); text-decoration: none; }
@media (max-width: 600px) { .book-feature { grid-template-columns: 1fr; } .book-feature img { max-width: 170px; } .book-grid { grid-template-columns: 1fr; } }

/* Book detail */
.book-detail { display: grid; grid-template-columns: 420px 1fr; gap: 56px; align-items: start; }
.book-media { position: sticky; top: 90px; }
.book-media > img { background: var(--slate); }
.thumbs { display: flex; gap: 10px; margin-top: 12px; }
.thumb { width: 76px; height: 76px; padding: 0; border: 2px solid transparent; background: var(--paper-2); cursor: pointer; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.is-active { border-color: var(--red); }
.details { display: grid; grid-template-columns: max-content 1fr; gap: 6px 22px; margin: 0; }
.details dt { font-weight: 700; }
.details dd { margin: 0; }
blockquote { margin: 1em 0; padding: 12px 20px; border-left: 3px solid var(--red); font-family: var(--display); font-style: italic; background: var(--card); }
blockquote cite { display: block; font-style: normal; font-family: var(--text); font-size: .9rem; margin-top: 8px; color: var(--ink-soft); }
@media (max-width: 900px) { .book-detail { grid-template-columns: 1fr; gap: 28px; } .book-media { position: static; max-width: 420px; } }

/* Hexagon bullets */
ul.hex { list-style: none; padding-left: 1.5em; }
ul.hex li { position: relative; margin: .35em 0; }
ul.hex li::before { content: "\2B22"; position: absolute; left: -1.5em; color: var(--green); font-size: .75em; top: .2em; }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { margin: .3em 0; }

/* Authors */
.author { display: grid; grid-template-columns: 130px 1fr; gap: 28px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.author h2 { margin-top: 0; }
.portrait { width: 130px; height: 160px; background: var(--paper-2); border: 1px solid var(--line); display: grid; place-items: center; font-size: .85rem; }
@media (max-width: 600px) { .author { grid-template-columns: 1fr; } }
.prose h2 { font-size: 1.35rem; }

/* Footer */
.site-footer { background: var(--paper-2); border-top: 1px solid var(--line); padding: 0 0 24px; font-size: .95rem; }
.site-footer .crowd { margin-bottom: 36px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand img { width: 20px; }
.footer-head { font-weight: 700; margin: 0 0 .5em; text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; }
.legal { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 16px; font-size: .82rem; color: var(--ink-soft); }
.legal p { margin: .3em 0; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; gap: 18px; } }

.book-info .blurb { margin-top: 1.8em; }
.band p, .hero-text p { text-wrap: pretty; }
.phases { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 10px; margin: 1.2em 0; padding: 0; }
.phases span { font-family: var(--display); font-style: italic; font-size: 1.05rem; padding: 6px 16px; border: 1px solid var(--green); color: var(--green-dark); background: var(--card); border-radius: 999px; }
.blurb ul.hex { margin: 0 0 1em; }

/* Phones: smaller cover so both buy buttons show on the first screen */
@media (max-width: 800px) {
  .hero { padding-top: 20px; }
  .hero-grid { gap: 18px; }
  .hero-cover img { max-width: 150px; }
  .bt-main { font-size: 2.6rem; }
  .bt-sub { font-size: 1.35rem; }
  .subtitle { font-size: 1.05rem; }
  .tagline { font-size: 1.02rem; margin-bottom: .6em; }
  .buy { margin-top: 1em; }
}
.figure { margin: 1em 0 1.5em; }
.figure img { background: #fff; border: 1px solid var(--line); padding: 12px; max-width: 560px; width: 100%; }
.figure figcaption { font-size: .88rem; color: var(--ink-soft); margin-top: 6px; }
.steps { margin: 1em 0 1.5em; border-top: 1px solid var(--line); }
.phase-group { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.phase-name { margin: 0; font-family: var(--display); font-style: italic; color: var(--green-dark); padding-top: 2px; }
.phase-group ol { margin: 0; padding-left: 1.6em; }
.phase-group li { margin: .15em 0; padding-left: .2em; }
.phase-group li::marker { font-weight: 700; color: var(--red); }
@media (max-width: 480px) { .phase-group { grid-template-columns: 1fr; gap: 4px; } }
.btn-disabled { background: transparent; color: var(--ink-soft); border: 2px dashed var(--line); cursor: default; font-weight: 400; font-style: italic; }
.author { grid-template-columns: 1fr; }
.btn-soon { background: transparent; color: var(--red-dark); border: 2px dashed var(--red); cursor: default; }
.title-link { color: inherit; text-decoration: none; }
.title-link:hover { color: var(--red-dark); }
.pub-lead { font-family: var(--display); font-weight: 400; font-size: clamp(1.3rem, 2.2vw, 1.7rem); line-height: 1.38; margin: 0 0 .6em; }
.pub-intro ul.hex { font-size: 1.1rem; margin: 0 0 1.2em; }
.pub-intro p { font-size: 1.08rem; }
.pub-close { font-family: var(--display); font-style: italic; color: var(--red-dark); }
.cover-caption { text-align: center; margin: 14px 0 0; font-size: .95rem; line-height: 1.5; color: var(--ink-soft); }
.cover-caption a { color: var(--ink); text-decoration: none; }
.cover-caption a:hover { color: var(--red-dark); }
@media (max-width: 800px) { .hero-cover { order: 0; } .cover-caption { margin-top: 10px; } }
/* Home: the hero's crowd already marks the edge, so hide the footer's second strip */
.home .site-footer .crowd-thin { display: none; }
.home .site-footer { padding-top: 36px; border-top: 0; }
.company-note { margin-top: 3em; padding-top: 1em; border-top: 1px solid var(--line); font-size: .8rem; color: var(--ink-soft); }
