/*
  J. D. Landis — Website Mock-up Styles
  Notes:
  - Typography: elegant serif for headings, clean sans for body
  - Palette: ink #111318, paper #f7f7f9, accent #55555d

  Table of Contents (documentation only; no behavior changes)
  1) Reset & Base
  2) Layout: Containers, Pillar
  3) Header & Navigation
  4) Hero
  5) Buttons
  6) Global Sections & Typography
  7) Featured Work
  8) Cards & Utilities
  9) Newsletter (Home)
  10) Books (Index & Detail)
  11) Footer
  12) Media Queries
*/

/* CSS Reset (modern, minimal) */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }

/* Base */
:root {
  --ink: #111318;
  --paper: #f7f7f9;
  --muted-ink: #3a3d46;
  --accent: #55555d; /* per spec for newsletter button */
  --accent-ink: #ffffff;
  --border: rgba(17, 19, 24, 0.12);
  --shadow: 0 10px 30px rgba(17, 19, 24, 0.12);
  --radius: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0c0d11;
    --ink: #e8eaf0;
    --muted-ink: #b6bccb;
    --border: rgba(232, 234, 240, 0.14);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}

body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  letter-spacing: 0.2px;
}
/* Prevent top-margin collapsing and create a new block formatting context */
main { display: flow-root; }

h1, h2, h3, h4 {
  font-family: "Merriweather", Georgia, "Times New Roman", serif;
  line-height: 1.25;
  margin: 0 0 0.5em;
  letter-spacing: 0.2px;
}
/* Improve heading line breaks on narrow widths */
h1, h2, h3 { text-wrap: balance; }

p { margin: 0 0 1em; }

.container {
  width: min(1200px, 92%);
  margin-inline: auto;
}

/* Homepage: cap overall content width to 900px on large viewports */
@media (min-width: 981px) {
  .home .container { max-width: 900px; }
  .bio .container, .contact .container { max-width: 900px; }
  /* Book pages: match header/footer container width to book layout container */
  .book .site-header .container,
  .book .site-footer .container {
    max-width: 1100px;
    width: min(1100px, 92%);
  }
}

/* Homepage newsletter: keep large-viewport sizing across all widths (no 980px snap) */
.home .newsletter { max-width: 780px; width: min(780px, 92%); margin-inline: auto; }

/* Homepage spacing: zero vertical padding; 30px vertical margins */
.home .hero { padding-top: 0; padding-bottom: 0; margin-top: 40px; margin-bottom: 40px; }
.home main > section { padding-top: 0; padding-bottom: 0; margin-top: 40px; margin-bottom: 40px; }
.home .newsletter {
  position: relative;
  padding-top: 0;
  padding-bottom: 0;
  margin-top: 40px;
  margin-bottom: 40px;
  background: #eaebed;
  border-radius: var(--radius);
}

/* Keep the inner newsletter content tightly centered without extra side padding */
.home .newsletter .jd-newsletter { width: min(780px, 92%); margin-left: auto; margin-right: auto; }

/* Homepage About section alignment */
.home .about .container { text-align: center; }
.home .about .lead { text-align: left; }

/* Header / Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  background: color-mix(in srgb, var(--paper) 85%, white 15%);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(160%) blur(8px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand .name { font-family: "Merriweather", Georgia, serif; font-weight: 900; font-size: 1.25rem; }
.brand .role { font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial; font-weight: 600; }

.brand .role {
  color: var(--muted-ink);
  font-size: 0.9rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  transform: translateY(1px);
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.primary-nav a {
  color: var(--muted-ink);
  font-weight: 600;
}

.primary-nav a[aria-current="page"] {
  color: var(--ink);
}

.nav-divider {
  width: 1px;
  height: 22px;
  background: var(--border);
}

.social {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted-ink);
}

.social a {
  display: inline-grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.social a:hover {
  background: rgba(17, 19, 24, 0.04);
  background: color-mix(in srgb, var(--ink) 4%, transparent);
}

.pillar-shell { background: #eaebed; min-height: 100vh; min-height: 100dvh; }
.pillar {
  background: #f8f8fa;
  border: 1px solid #E6E8EB;
  border-radius: 12px;
  max-width: var(--pillar-max-width, 900px);
  margin: 0 auto;
  min-height: 100dvh;
  padding: 0 0;
}
.pillar .site-header { background: #f8f8fa; border-bottom: 1px solid rgba(0,0,0,0.06); backdrop-filter: none; }
.pillar .nav { padding-left: 24px; padding-right: 24px; }
.pillar .content-wrap { padding: 0 24px; }

@media (max-width: 720px) {
  .pillar .nav { padding-left: 16px; padding-right: 16px; }
  .pillar .content-wrap { padding: 0 16px; }
}

/* Page pillar widths */
.home .pillar { --pillar-max-width: 900px; }
.bio .pillar, .contact .pillar { --pillar-max-width: 900px; }
.books .pillar, .book .pillar { --pillar-max-width: 1100px; }

.visually-hidden {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden; clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* Skip link for keyboard users */
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: max(10px, calc(env(safe-area-inset-top) + 10px)); z-index: 100; background: #ffffff; color: var(--ink); padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; }

/* Hero */
.hero {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  max-width: 820px;
  margin: clamp(20px, 4vw, 36px) auto;
  padding: 0; /* remove vertical padding on hero section */
}

/* Slight dark tint over hero graphic */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2); /* 20% black overlay */
  pointer-events: none;
  z-index: 1;
}

.hero img {
  width: 100%;
  height: auto; /* do not zoom/crop hero */
  filter: saturate(94%);
}

.hero-overlay {
  position: absolute;
  top: 50%;
  left: 70%; /* center the block 70% across the hero */
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center; /* center the three lines relative to each other */
  gap: 4px; /* tighten space between title and subtitle */
  width: min(520px, 60vw); /* finite width to allow precise centering */
  text-align: center;
  color: white;
  text-shadow: 0 2px 18px rgba(0,0,0,0.55);
  z-index: 2; /* above the tint overlay */
}

.hero-title {
  font-size: clamp(1.6rem, 1.0rem + 2.0vw, 2.3rem); /* keep slightly larger than others */
  font-weight: 900;
  margin: 0; /* remove default h1 bottom margin to kill extra whitespace */
}

.hero-subtitle {
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 1.25rem; /* larger for better balance */
  transform: translateY(-4px);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}

.btn:active { transform: translateY(1px); }

.btn-accent {
  background: rgb(85, 85, 93); /* given */
  color: white;
  box-shadow: 0 6px 20px rgba(85,85,93,0.35);
}

/* Make the hero CTA a bit bigger without affecting other buttons */
.hero .btn { padding: 11px 18px; font-size: 1.02rem; }

.btn-accent:hover { filter: brightness(1.05); }

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Sections: use margins for inter-block spacing; individual components add their own inner padding */
section { margin: clamp(32px, 4.5vw, 56px) 0; padding: 0; }

/* Book pages: reduce the top whitespace between sections */
.book .section { margin-top: clamp(16px, 2.25vw, 28px); }

.lead {
  font-size: 1.05rem;
  color: var(--muted-ink);
}

/* Homepage: justify lead paragraph text */
.home .lead { text-align: left; }
/* Improve readability of justified paragraphs */
/* Make text links in content visibly distinct without affecting nav/buttons */
main p a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
main p a:hover { filter: brightness(1.05); }
/* Visible focus for keyboard users */
a:focus-visible,
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }



/* Eyebrow for section headings (used by Featured Work) */
.h1-eyebrow {
  display: block;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted-ink);
  margin-bottom: 8px;
}

/* Featured Work (boxed card layout) */
.featured-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(16px, 2vw, 24px);
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 24px;
  align-items: center;
  box-shadow: var(--shadow);
}
/* A11: enable container query and soften spacing at mid component widths */
.featured-card { container-type: inline-size; }
@container (min-width: 42rem) and (max-width: 56rem) {
  .featured-card { gap: 1.25rem; }
}

@media (max-width: 720px) {
  .featured-card { grid-template-columns: 1fr; justify-items: center; }
}

/* Restore desktop Featured Work cover sizing to avoid massive image widths */
@media (min-width: 721px) {
  .featured-card { grid-template-columns: 220px 1fr; }
  .featured-card .cover { display: block; }
  .featured-card .cover img { width: 100%; height: auto; }
}

.featured-card .cover { border-radius: 0; overflow: hidden; border: 0px solid var(--border); display: inline-block; }
.featured-card h3 { margin: 0 0 8px 0; }
.featured-card .meta { color: var(--muted-ink); margin-bottom: 8px; }
.featured-card .actions { margin-top: 12px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* Primary button variant (used in Featured Work) */
.btn.primary { background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); }
.btn.primary:hover { filter: brightness(1.06); }

/* =============================
   Newsletter (Mailchimp)
   - Center pair within stripe
   - Fixed 390px input at all widths except ≤320px (stack)
   - Hide MC boilerplate
   ============================= */
.jd-newsletter {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: none;
  border: 0;
  border-radius: 0;
  padding: clamp(18px, 3vw, 26px);
  box-shadow: none;
}

/* Newsletter stripe aesthetics */
.home .newsletter .jd-newsletter .cta-text { color: var(--muted-ink); }

.jd-newsletter .cta-text {
  margin-bottom: 18px;
  font-size: 1.1rem;
  line-height: 1.4;
}

/* CTA text width clamp */
/* Home newsletter: keep Row 2 narrower than Row 1 using a clamp */
.home .newsletter .jd-newsletter .cta-text { max-width: clamp(360px, 90%, 620px); margin-left: auto; margin-right: auto; }


/* Mailchimp embed layout (pair) */
#mc_embed_signup .mc-field-group {
  display: inline-grid;
  grid-template-columns: minmax(130px, 390px) max-content; /* allow graceful shrink, cap at 390px */
  gap: 10px;
  align-items: stretch;
  width: auto; /* shrink-wrap to content */
  max-width: 100%; /* never exceed stripe width */
}
/* Full-width parent; center child pair */
#mc_embed_signup #mc_embed_signup_scroll { display: flex; justify-content: center; width: 100%; }
/* Ensure the whole embed wrapper and form span stripe width so centering is relative to stripe */
#mc_embed_signup,
#mc_embed_signup form,
#mc_embed_signup #mc_embed_signup_scroll { width: 100%; }
/* Center the pair within the full-width form */
#mc_embed_signup .mc-field-group { margin-left: auto; margin-right: auto; }
/* Override earlier clamp so the Mailchimp form uses full stripe width */
.home .newsletter .jd-newsletter #mc-embedded-subscribe-form { width: 100%; max-width: none; }
#mc_embed_signup .mc-field-group input[type="email"] { grid-column: 1 / 2; }
#mc_embed_signup .mc-field-group input[type="submit"],
#mc_embed_signup .mc-field-group .button { grid-column: 2 / 3; }
/* Removed 980px snap: keep 390px input width at all widths (except ≤320px where it stacks) */

/* Mailchimp extras hidden */
#mc_embed_signup .indicates-required,
#mc_embed_signup #mce-responses,
#mc_embed_signup .foot .refferal_badge,
#mc_embed_signup p[style*="margin: 0px auto"] {
  display: none !important;
}

#mc_embed_signup input[type="email"] {
  padding: 14px 16px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #ffffff;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

#mc_embed_signup input[type="submit"],
#mc_embed_signup .button {
  padding: 12px 18px;
  align-self: center;
  border-radius: 6px;
  border: 1px solid transparent;
  background: rgb(85,85,93);
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

@media (max-width: 320px) {
  #mc_embed_signup .mc-field-group { grid-template-columns: 1fr; width: 100%; }
  #mc_embed_signup input[type="submit"] { width: 100%; }
}

/* Books index page */
.books-index { padding-top: 36px; }
.books-index h2 { margin-top: 0; }
.books-index .books-section:first-of-type { margin-top: 20px; }
@media (max-width: 720px) { .books-index .books-section:first-of-type { margin-top: 16px; } }

.book-list {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 720px) { .book-list { grid-template-columns: 1fr; } }

.book-list a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px;
  background: white; font-weight: 600; color: var(--muted-ink);
}

.book-list a:hover { background: #fefefe; background: color-mix(in srgb, white 88%, var(--paper) 12%); }

/* Book detail pages */

@media (max-width: 980px) {
  .book-cover { position: static; top: auto; }
  .book-cover img {
    width: 100%;
    height: auto;
    max-height: 55vh; /* cap relative to viewport height to avoid overly tall covers */
    display: block;
    margin: 0 auto;
    object-fit: contain;
  }
}

@media (max-width: 980px) {
  .book-cover { position: static !important; top: auto !important; }
}

/* Homepage Featured Work cover: prevent oversized image on small viewports */
@media (max-width: 720px) {
  .featured-card .cover img {
    max-height: 50vh;
    width: auto;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    object-fit: contain;
  }
}

/* Featured Work mobile alignments and cover sizing */
@media (max-width: 720px) {
  .featured-card .cover { width: fit-content; justify-self: center; }
  .featured-card .h1-eyebrow, .featured-card h3, .featured-card .meta { text-align: center; }
  .featured-card .actions { justify-content: center; }
  /* Justify description text and add side padding */
  .home .featured-card > div > p { text-align: left; padding-left: 15px; padding-right: 15px; }
  /* Increase padding when one-column layout */
  .featured-card { padding: 20px; }
}

/* Phones: reclaim horizontal space in Featured section */
@media (max-width: 560px) {
  .home .featured .container { width: min(1200px, 96%); }
  .home .featured .featured-card { padding: 10px; }
  .home .featured .cover { padding-left: 15px; padding-right: 15px; padding-top: 15px; padding-bottom: 10px; }
}

/* Mobile tweaks: square hero corners */
@media (max-width: 720px) { .hero { border-radius: 0; } }

/* Mobile newsletter: keep content within stripe and reduce side padding */
@media (max-width: 720px) {
  /* Keep tasteful side whitespace inside the pillar */
  .jd-newsletter { padding: 18px 16px; }
  .home .newsletter .jd-newsletter .cta-text { max-width: 100%; }
  .jd-newsletter input[type="submit"] { white-space: nowrap; }
}

/* F1: Clear focus styles for newsletter form controls (keyboard users) */
#mc_embed_signup input[type="email"]:focus-visible,
#mc_embed_signup .button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* (Informational) Newsletter stripe uses same sizing at all widths */

/* Navigation on largest screens */
@media (min-width: 721px) {
  .primary-nav a { font-size: 1.10rem; }
}

/* Mobile nav (<=720px): brand left, social right, two-column nav buttons */
@media (max-width: 720px) {
  .site-header { position: static; backdrop-filter: none; }
  .nav { position: relative; display: block; padding: 12px 16px 0 16px; }

  .brand a { justify-content: flex-start; width: auto; }
  .brand .name { font-size: 1.4rem; }
  .brand .role { font-size: 1.02rem; }
  /* Nudge social icons up so they align vertically with brand text */
  .site-header .social { position: absolute; top: 9px; right: 9px; display: inline-flex; gap: 8px; }
  .site-header .social a { width: 42px; height: 42px; min-height: 0; padding: 0 !important; line-height: 0; border-radius: 999px; display: inline-grid; place-items: center; aspect-ratio: 1 / 1; }

  .primary-nav { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; align-items: stretch; margin-top: 12px; margin-bottom: 12px; }
  .primary-nav a { display: block; text-align: center; padding: 10px; min-height: 44px; border: 1px solid var(--border); border-radius: 10px; }
  .nav-divider { display: none; }

  .home .hero,
  .books .books-index,
  .book .book-hero { margin-top: 20px; }
}

/* Mobile book pages: keep smaller spacing below header for "All Books" link */
@media (max-width: 720px) {
  .book .book-hero { margin-top: 5px; }
}

@media (max-width: 360px) {
  .primary-nav { grid-template-columns: 1fr; }
  .primary-nav a { padding: 10px; }
  /* Tiny phones: center brand and hide header social icons to prevent overlap */
  .site-header .brand { display: flex; justify-content: center; }
  .site-header .brand a { justify-content: center; }
  .site-header .social { display: none !important; }
  /* Home newsletter email field: slightly smaller placeholder text on tiny phones */
  .home #mc_embed_signup input.required.email::placeholder { font-size: 0.95rem; }
  .home #mc_embed_signup input.required.email::-webkit-input-placeholder { font-size: 0.95rem; }
}

/* M1: Improve measure on tiny phones for Bio and Contact */
@media (max-width: 360px) {
  .pillar .content-wrap { padding-left: 8px; padding-right: 8px; }
  .bio .container { width: min(1200px, 98%); }
  .contact .container { width: min(1200px, 98%); }
}


/* Guard against later generic .nav rules overriding mobile layout */
@media (max-width: 720px) {
  .site-header .nav { display: block !important; position: relative; padding: 12px 16px 0 16px; }
  .site-header .primary-nav { display: grid !important; grid-template-columns: repeat(2, 1fr); gap: 10px; align-items: stretch; margin-top: 12px; margin-bottom: 12px; }
  .site-header .nav-divider { display: none !important; }
}

/* Between 720px and 460px: force nav buttons into a single row of four */
@media (max-width: 720px) and (min-width: 461px) {
  .site-header .primary-nav,
  .primary-nav { grid-template-columns: repeat(4, 1fr); }
}

/* Bio page mobile refinements */
@media (max-width: 720px) {
  .bio .container { padding-left: 10px; padding-right: 10px; }
  .bio main.container { padding-bottom: 38px !important; }
  .bio p { text-align: left; }
}

/* Align Bio h1 centering breakpoint with h2s */
@media (max-width: 980px) { .bio .detail-title { text-align: left; } }
@media (max-width: 720px) { .bio .detail-title { text-align: center; } }
@media (min-width: 721px) { .bio main.container { padding-bottom: 38px !important; } }

/* Book pages: mobile presentation tweaks */
@media (max-width: 720px) {
  .book .accolades { justify-content: flex-start; }
  .book .book-content p { text-align: left; }
  .book .book-praise li { text-align: left; }
}

/* Bio & Book pages: reduce side whitespace on small viewports */
@media (max-width: 720px) {
  /* Slightly wider containers (from 92% to 96%) */
  .bio .container,
  .book .container,
  .container.book-hero,
  .container.book-layout { width: min(1200px, 96%); }

  /* Reduce inner padding on key containers */
  .book .container { padding-left: 10px; padding-right: 10px; }
  .container.book-hero,
  .container.book-layout { padding-left: 12px; padding-right: 12px; }

  /* Reduce page content wrapper padding within the pillar on these pages */
  .bio .pillar .content-wrap,
  .book .pillar .content-wrap { padding-left: 10px; padding-right: 10px; }
}

/* Contact page: desktop center alignment */
@media (min-width: 981px) { .contact main.container { text-align: center; } }

/* Contact page: center paragraphs when h1 centers */
@media (max-width: 980px) { .contact main.container p { text-align: center; } }

/* .book-cover base styles defined later in the file (4a-aligned block) */

.book-content .detail-title { margin-bottom: 8px; }

/* */

.buy-btn { margin-top: 12px; }

.quote-list { margin: 10px 0 0 0; padding-left: 20px; }

.quote-list li { margin: 6px 0; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted-ink);
  padding: 15px 0;
}

.foot-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; }

@media (max-width: 640px) { .foot-inner { flex-direction: row; justify-content: space-between; text-align: left; } }

.small { font-size: 0.92rem; }



/* Books page (from Mock-up 5) */
.books-section { margin-top: 12px; }
.books-section h2 { font-family: "Merriweather", Georgia, "Times New Roman", serif; }
.books-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.books-grid .book { display: flex; flex-direction: column; gap: 8px; }
.books-grid .book img { border-radius: 10px; border: 1px solid var(--border); box-shadow: 0 6px 16px rgba(0,0,0,0.08); aspect-ratio: 2 / 3; height: auto; object-fit: cover; }
.books-grid .book a.title { font-weight: 600; color: var(--ink); }
/* A08: improve multi-line wrapping and spacing for long titles */
.books-grid .book a.title { text-wrap: balance; margin-top: 2px; }
@media (max-width: 1100px) { .books-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 860px) { .books-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .books-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 560px) and (max-width: 680px) { .books-grid { gap: 24px; } }

/* Books page spacing tweaks to match Mock-up 5 more closely */
main.section { padding: 56px 0; }
main.section h1 { margin: 0 0 16px 0; }
main.section .books-section { margin-top: 16px; }

/* Books page typography */
main.section h2 { font-size: 28px; }

/* Remove global section padding inside Books page sections */
section.books-section { margin: 16px 0; padding: 8px 0; }

/* Support styles for Mock-up 4a book detail structure (preserve M1 fonts/colors) */
.section-title { display: flex; align-items: center; gap: 12px; margin-top: 24px; margin-bottom: 10px; }
/* Praise label (align closer to 4a) */
.section-title .title {
  font-weight: 700;         /* restore stronger weight like 4a */
  font-size: 1.1rem;        /* restore slightly larger size like 4a */
  letter-spacing: 0.01em;   /* subtle */
  color: var(--ink);
}
.section-title .rule { height: 1px; background: #e1dbcf; flex: 1; }

/* Accolades chips */
.accolades { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
/* Accolade chip: visible chip with M1 scheme and slightly increased thickness */
.accolade-chip {
  background: #ffffff;                 /* revert to white */
  border: 1px solid var(--border);     /* revert to M1 grey border */
  color: var(--ink);
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 600;                    /* base weight */
  font-variation-settings: 'wght' 650; /* slight increase when variable fonts available */
  font-size: 1rem;
}

/* Praise lists */
.praise-list { margin: 0; padding-left: 1.1em; }
.more-praise { margin-top: 10px; }
.more-praise.is-collapsed { display: none; }
.praise-toggle-link { background: none; border: 0; padding: 0; color: var(--muted-ink); text-decoration: underline; cursor: pointer; font: inherit; margin-top: 8px; }
.praise-toggle-link:hover { opacity: 0.85; }

/* Subtle reader ratings line inside the collapsed block */
.reader-ratings {
  color: var(--muted-ink);
  font-size: 0.95rem;
  margin: 6px 0 10px 0;
}

/* Center purchase button if wrapped in .purchase or using .buy-btn */
.book-content .purchase { text-align: center; }
.buy-btn { display: inline-flex; align-items: center; justify-content: center; }

/* Small alignment touch on single column book layout */
@media (max-width: 980px) { .book-hero h1, .detail-title { text-align: center; } }

/* Book detail: align margins to 4a on large viewports */
.container.book-hero,
.container.book-layout { max-width: 1100px; padding-left: 24px; padding-right: 24px; }

/* Book detail: layout and cover size like 4a */
.book-layout { display: grid; grid-template-columns: 360px 1fr; gap: 36px; align-items: start; }
@media (max-width: 980px) { .book-layout { grid-template-columns: 1fr; } }

/* Book cover enclosed box like 4a */
.book-cover { position: sticky; top: 88px; border: 0; background: transparent; padding: 0; border-radius: 0; }
.book-cover img { border: none; box-shadow: none; border-radius: 6px; width: 100%; height: auto; }

/* On large viewports, gently cap cover image width to restore prior visual size
   (previously ~332px inside a 360px box) and make it a touch smaller */
@media (min-width: 981px) {
  .book-cover a { display: inline-block; }
  .book-cover img { width: auto; max-width: 320px; height: auto; }
}

/* Praise spacing and seamless expansion */
.book-praise ul { margin: 0; padding-left: 1.1em; }
.book-praise li { margin-bottom: 10px; }
.more-praise { margin-top: 0; }
.book-praise .more-praise ul { margin: 0; padding-left: 1.1em; }

/* Map primary button class from 4a to Mock-up 1 accent style */
.btn.btn-primary { background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); }

/* Global subtle rendering improvements */
html { text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* Book page typography (scoped so rest of site stays consistent) */
.book-hero { padding-top: 18px; }
.book-hero h1 { letter-spacing: 0.2px; margin-top: 12px; font-size: clamp(1.8rem, 2.8vw, 2.4rem); }
/* Book pages: add a bit more space after the "All Books" link */
.book .book-hero > a { display: inline-block; margin-bottom: 10px; }
/* Ensure the inner book layout doesn't add extra space at the top */
.book .container.book-layout { padding-top: 0; margin-top: 0; }
/* Tighten space after the title into the content columns */
.book .book-hero + section { margin-top: 24px; }

/* Praise label (tune thickness for M1’s font to match 4a’s perceived weight) */
.section-title .title {
  font-weight: 600;       /* slightly lighter than 700 to avoid “too thick” on Merriweather */
  font-size: 1.1rem;
  letter-spacing: 0.01em;
  color: var(--ink);
}

/* Book page body text: closer to 4a (subtle adjustments) */
.book-content {
  font-size: 1rem;        /* match 4a */
  line-height: 1.6;       /* match 4a */
  letter-spacing: normal; /* match 4a */
}
.book-content p { margin: 0 0 1em; }

/* Use Playfair Display headings only within book content to mirror 4a */
.book-content h1,
.book-content h2,
.book-content h3,
.book-content h4 {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
}

/* Praise list readability */
.book-praise li { line-height: 1.6; }

/* Keep headings crisp but balanced */
.book-content h2 { letter-spacing: 0.1px; }

/* Ensure consistent paragraph width feels comfortable on large viewports */
@media (min-width: 981px) {
  .book-content { max-width: none; }
  /* Make the cover column fit its content rather than a fixed 360px */
  .book-layout { grid-template-columns: max-content 1fr; }
  /* Add side padding and center the image within the cover column */
  .book-cover { padding: 0 20px; display: flex; justify-content: center; }
}

/* Align book-hero and layout margins/width to 4a */
.container.book-hero, .container.book-layout { width: min(1100px, 92%); }


/* Mobile: bias hero overlay right until very narrow, then center */
@media (max-width: 720px) {
  .hero-overlay { left: 70%; width: min(92%, 520px); }
}

/* Very small phones: single-column books grid (moved to ~300px) */
@media (max-width: 300px) {
  .books-grid { grid-template-columns: 1fr; }
  .books-grid .book img { max-width: 240px; margin: 0 auto; }
  /* Center titles only when one-per-row */
  .books-grid .book a.title { text-align: center; display: block; }
  /* Center page headers when one-per-row */
  .books .books-section h1,
  .books .books-section h2 { text-align: left; }
}

@media (max-width: 720px) {
  .book .buy-btn .btn { width: 100%; max-width: 420px; }
}

@media (max-width: 720px) {
  /* Book pages: tighter mobile sides to match Bio */
  .container.book-hero,
  .container.book-layout {
    width: min(1200px, 96%);
    padding-left: 10px;
    padding-right: 10px;
  }
}

/* -------------------- */

/* Anchor jump offset so sticky header doesn’t obscure targets */
html { scroll-padding-top: 72px; }

/* Hero: stabilize image, prevent CLS on load */
.hero img {
  inline-size: 100%;
  block-size: auto;
  aspect-ratio: 16 / 9; /* functional containment; actual file is close to 16:9 */
  object-fit: cover;
}

/* Respect iOS safe areas for sticky bars */
.site-header, .site-footer {
  padding-inline: max(0.75rem, env(safe-area-inset-left)) max(0.75rem, env(safe-area-inset-right));
}

/* Long-form book content: constrain measure for readability on desktops */
@media (min-width: 981px) {
  .book-content {
    max-width: 70ch;   /* ~65–75ch sweet spot */
    margin-inline: auto;
  }
}

/* Hyphenation and modern wrapping in primary reading blocks */
main p,
.lead,
.book-content p {
  hyphens: auto;
  text-wrap: pretty;
}
 

/* Scoped fluid copy: safe bounds and only in reading blocks */
:root {
  --copy-min: 16px;
  --copy-max: 17.5px;
  --copy-fluid: clamp(var(--copy-min), 0.6vw + 0.35rem, var(--copy-max));
}
main p,
.lead,
.book-content p {
  font-size: var(--copy-fluid);
  line-height: 1.6;
}

/* Opt-out to keep Featured Work description stable by default */
.home .featured-card > div > p { font-size: 1rem; line-height: 1.6; }

/* Stronger focus ring for nav links on light backgrounds */
.primary-nav a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px color-mix(in srgb, white 80%, transparent);
}

/* Footer: allow wrapping on small screens to avoid squeeze/overflow */
@media (max-width: 480px) {
  .foot-inner { flex-wrap: wrap; row-gap: 8px; justify-content: center; text-align: center; }
  .foot-inner .small { width: 100%; text-align: center; }
  .foot-inner .social { width: 100%; justify-content: center; }
}

/* Newsletter CTA copy: keep measure comfortable on tablets */
.home .newsletter .jd-newsletter .cta-text {
  max-width: clamp(36ch, 90vw, 62ch);
  margin-inline: auto;
}

/* Optional: adjust hero CTA visibility near small-phone cutoff (consolidated with <=400 rule) */
@media (max-width: 428px) {
  .hero .btn { display: none; }
}

/* A10: clearer keyboard focus on book tiles */
.books-grid .book a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  box-shadow: 0 0 0 2px color-mix(in srgb, white 80%, transparent);
}

/* Minimal print stylesheet: hide decorative elements and simplify */
@media print {
  .site-header, .site-footer, .hero, .featured, .newsletter { display: none !important; }
  body { background: #fff; color: #000; }
  a { text-decoration: underline; }
  .container, main, .book-content { max-width: none !important; width: 100% !important; }
}

/* Desktop-only paragraph size bump for easier reading without changing layout */
@media (min-width: 981px){
  /* Bio page paragraphs */
  .bio main.container p,
  .bio .lead { font-size: 1.0625rem; line-height: 1.65; }

  /* Home About the Author lead paragraph */
  .home .about .lead { font-size: 1.125rem; line-height: 1.6; }

  /* Contact page paragraphs */
  .contact main.container p,
  .contact .lead { font-size: 1.0625rem; line-height: 1.65; }
}

/* Tablet range bump to cover medium widths without affecting small phones */
@media (min-width: 480px) and (max-width: 980px){
  .bio main.container p,
  .bio .lead { font-size: 1.03125rem; line-height: 1.65; } /* ~16.5px */

  .contact main.container p,
  .contact .lead { font-size: 1.03125rem; line-height: 1.65; }

  .home .about .lead { font-size: 1.075rem; line-height: 1.6; }
}

/* Small-phone comfort: gentle +2% bump at 390–428px only */
@media (min-width: 390px) and (max-width: 428px){
  .bio main.container p,
  .bio .lead { font-size: calc(var(--copy-fluid) * 1.02); }

  .contact main.container p,
  .contact .lead { font-size: calc(var(--copy-fluid) * 1.02); }

  .home .about .lead { font-size: calc(var(--copy-fluid) * 1.02); }
}
