/* ABOUTME: Styles for inner pages: book pages (hero, praise wall, features, stores), text pages, and the blog. */
/* ABOUTME: Builds on the tokens and shared components in base.css. */

.section-title { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; margin-bottom: 40px; }

/* Prose */
.prose { max-width: 720px; font-size: 18px; line-height: 1.7; }
.prose h2 { font-size: 26px; font-weight: 800; margin: 1.8em 0 0.6em; }
.prose h3 { font-size: 21px; font-weight: 700; margin: 1.6em 0 0.5em; }
.prose a { color: var(--money); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.4em; }
.prose blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--sun); font-family: var(--serif); font-style: italic; font-size: 20px; }
.prose blockquote em { font-style: normal; }
.prose img { border-radius: 10px; margin: 1.6em auto; }
.prose picture { margin: 1.6em auto; }
.prose picture img { margin: 0 auto; }
.prose > :first-child { margin-top: 0; }

/* Book hero */
.book-hero { background: radial-gradient(1100px 520px at 20% 40%, #2c3833 0%, var(--ink) 62%); overflow: hidden; }
.book-hero__inner { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 64px; align-items: center; padding-top: 64px; padding-bottom: 72px; }
.book-hero__cover { position: relative; justify-self: center; }
.book-hero__cover::before { content: ""; position: absolute; inset: -14% -22%; background: radial-gradient(circle, rgb(255 214 10 / 0.25) 0%, rgb(255 214 10 / 0) 62%); }
.book-hero__cover img { position: relative; width: min(320px, 70vw); transform: rotate(-2deg); }
.book-hero h1 { font-size: clamp(36px, 4.6vw, 56px); font-weight: 800; }
.book-hero__subtitle { display: block; font-size: 0.42em; font-weight: 600; letter-spacing: 0; color: var(--sun); margin-top: 12px; }
.book-hero__headline { font-size: 20px; color: var(--on-ink-muted); max-width: 32em; }
.book-hero__quote { margin: 0 0 32px; padding-left: 18px; border-left: 3px solid var(--sun); max-width: 36em; }
.book-hero__quote blockquote { font-size: 20px; }
.format-tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 22px 0 0; padding: 0; }
.format-tags li { font-size: 13px; font-weight: 700; padding: 5px 12px; border-radius: 999px; border: 1px solid rgb(255 255 255 / 0.25); color: var(--on-ink-muted); }

/* Praise wall */
.praise-wall { padding: 88px 0 72px; background: var(--paper-deep); }
.praise-wall__grid { columns: 3 280px; column-gap: 24px; }
.praise-wall__card { break-inside: avoid; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; margin-bottom: 24px; }
.praise-wall__card blockquote { font-size: 18px; }
.praise-wall__card figcaption::before { content: "— "; }

/* Blurb */
.book-blurb { padding: 88px 0 24px; }
.prose--book ul { list-style: none; padding: 0; display: grid; gap: 12px; margin: 0 0 1.4em; }
.prose--book ul li { padding-left: 36px; position: relative; margin: 0; }
.prose--book ul li::before { content: ""; position: absolute; left: 0; top: 4px; width: 22px; height: 22px; border-radius: 50%; background: var(--money) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 22px no-repeat; }

/* Features */
.features { padding: 88px 0 24px; }
.features__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.feature__number { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--sun); font-weight: 800; margin-bottom: 18px; }
.feature h3 { font-size: 20px; font-weight: 800; }
.feature p { color: var(--muted); margin: 0; }

/* Buy */
.buy { padding: 88px 0 0; }
.buy .section-title { margin-bottom: 32px; }
.buy__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.buy-card { background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--sun); border-radius: var(--radius); padding: 28px; }
.buy-card h3 { font-size: 22px; font-weight: 800; }
.buy-card p { color: var(--muted); font-size: 15px; }
.stores { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.stores .btn { width: 100%; padding: 13px 20px; font-size: 15px; }
.stores .btn--ghost { border-color: var(--line); }
.stores .btn--ghost:hover { border-color: var(--ink); }
.buy__french { margin: 24px 0 0; padding: 16px 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); font-size: 15px; }
.buy__french cite { font-style: italic; font-weight: 600; }
.buy__french a { color: var(--money); font-weight: 700; }
.buy__note { margin-top: 20px; font-size: 14px; color: var(--muted); }

/* More books */
.more-books { padding: 88px 0 0; }
.book-grid--compact { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.book-grid--compact .book-card { padding: 24px 20px 20px; }
.book-grid--compact .book-card__cover { height: 200px; margin-bottom: 18px; }
.book-grid--compact .book-card__cover img { max-height: 200px; }
.book-grid--compact .book-card h3 { font-size: 17px; flex: 1; }

/* Text pages */
.text-page { padding-top: 72px; }
.text-page h1 { font-size: clamp(34px, 4.4vw, 48px); font-weight: 800; max-width: 18em; }
.text-page__updated { margin-top: 40px; font-size: 14px; color: var(--muted); }
.reasons .reason { display: none; }
.reasons .reason:target, .reasons .reason--general { display: block; }
.reasons:has(.reason:target) .reason--general { display: none; }

/* Free book downloads */
.download { display: grid; grid-template-columns: 260px 1fr; gap: 56px; align-items: start; padding-top: 72px; }
.download h1 { font-size: clamp(32px, 4vw, 44px); font-weight: 800; }
.download__options { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 28px; }
.download__option { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--sun); border-radius: var(--radius); padding: 24px; }
.download__option h2 { font-size: 22px; font-weight: 800; }
.download__option p { flex: 1; color: var(--muted); font-size: 15px; }
.download__option .btn { width: 100%; }
.download__note { margin-top: 20px; font-size: 14px; color: var(--muted); }

/* Resources pages */
.resource-note { background: var(--paper-deep); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; font-size: 16px; }

/* Blog */
.archive { padding-top: 72px; max-width: 860px; }
.archive__header h1 { font-size: clamp(34px, 4.4vw, 48px); font-weight: 800; }
.archive__filters ul { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; padding: 0; }
.archive__filters a { display: inline-block; text-decoration: none; font-weight: 700; font-size: 14px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); }
.archive__filters a[aria-current="page"] { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.post-list { list-style: none; margin: 48px 0 0; padding: 0; }
.post-list__item { padding: 28px 0; border-top: 1px solid var(--line); }
.post-list__date { font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.post-list h2 { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.post-list h2 a { text-decoration: none; }
.post-list h2 a:hover { color: var(--money); }
.post-list__excerpt { color: var(--muted); margin: 0; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-top: 1px solid var(--line); padding-top: 28px; font-weight: 700; }
.pager a { color: var(--money); text-decoration: none; }
.pager__count { font-weight: 500; color: var(--muted); font-size: 14px; }

.post { padding-top: 64px; }
.post__header { max-width: 720px; margin-bottom: 36px; }
.post__header h1 { font-size: clamp(32px, 4.2vw, 46px); font-weight: 800; }
.breadcrumb { font-size: 14px; font-weight: 700; margin-bottom: 14px; color: var(--muted); }
.breadcrumb a { color: var(--money); text-decoration: none; }
.post__meta { color: var(--muted); font-size: 15px; margin: 0; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 56px; max-width: calc(720px + 2 * var(--gutter)); margin-left: auto; margin-right: auto; }
.post-nav a { display: block; text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; font-weight: 700; }
.post-nav a:hover { border-color: var(--ink); }
.post-nav span { display: block; font-size: 13px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; }
.post-nav__newer { text-align: right; grid-column: 2; }
.post-book { display: flex; gap: 24px; align-items: center; margin-top: 40px; max-width: calc(720px + 2 * var(--gutter)); margin-left: auto; margin-right: auto; }
.post-book > img, .post-book > picture { flex: 0 0 96px; }
.post-book .eyebrow { margin-bottom: 6px; }
.post-book__title { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.post-book__title a { text-decoration: none; }
.post-book p:last-child { color: var(--muted); font-size: 15px; margin: 0; }

@media (max-width: 899px) {
  .book-hero__inner { grid-template-columns: 1fr; gap: 40px; padding-top: 48px; padding-bottom: 56px; }
  .book-hero__cover img { width: min(220px, 60vw); }
  .praise-wall, .book-blurb, .features, .buy, .more-books { padding-top: 64px; }
  .features__grid { grid-template-columns: 1fr; }
  .text-page, .archive, .post, .download { padding-top: 48px; }
  .download { grid-template-columns: 1fr; gap: 32px; }
  .download__cover { max-width: 180px; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav__newer { grid-column: 1; text-align: left; }
}
