/* Chester A. Hicks author site, v2
   Layout idea: a quiet neutral frame; every book carries its own cover colors (bookshelf bands on Home, a full-color header on its page). */
:root {
  --ink: #15161a;
  --paper: #ffffff;
  --tint: #f5f4f0;
  --line: #dedbd3;
  --muted: #4c4f57;
  --accent: #b3121b;
  --ui: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;
  --body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --display: "Oswald", "Arial Narrow", Arial, sans-serif;
  --measure: 66ch;
  color-scheme: light;

  /* per-book theme tokens (overridden by .theme-* below) */
  --hero-bg: var(--ink);
  --hero-fg: #ffffff;
  --hero-head: #ffffff;
  --hero-accent: #ff6b70;
  --page-tint: var(--tint);
  --page-head: var(--ink);
  --btn-bg: var(--accent);
  --btn-fg: #ffffff;
  --book-display: var(--display);
}

/* Book palettes, sampled from each cover */
.theme-fq     { --hero-bg: #0f1f3d; --hero-fg: #ffffff; --hero-head: #d8b45a; --hero-accent: #d8b45a; --page-tint: #f4f1e8; --page-head: #0f1f3d; --btn-bg: #0f1f3d; --btn-fg: #ffffff; --accent: #7a5c14; --book-display: "Cinzel", Georgia, serif; }
.theme-sunday { --hero-bg: #111111; --hero-fg: #ffffff; --hero-head: #ffffff; --hero-accent: #c8101b; --page-tint: #f7f7f4; --page-head: #111111; --btn-bg: #c8101b; --btn-fg: #ffffff; --accent: #c8101b; --book-display: "Anton", Impact, sans-serif; }
.theme-why    { --hero-bg: #ffffff; --hero-fg: #2c3a86; --hero-head: #c8202b; --hero-accent: #2c3a86; --page-tint: #f3f5fb; --page-head: #2c3a86; --btn-bg: #2c3a86; --btn-fg: #ffffff; --accent: #c8202b; --book-display: "Oswald", "Arial Narrow", sans-serif; }
.theme-sweet  { --hero-bg: #a81e17; --hero-fg: #ffffff; --hero-head: #f5c518; --hero-accent: #fbe68a; --page-tint: #fdf6e0; --page-head: #a81e17; --btn-bg: #a81e17; --btn-fg: #ffffff; --accent: #a81e17; --book-display: "Abril Fatface", Georgia, serif; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 1.1875rem; line-height: 1.65; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.12; text-wrap: balance; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); text-transform: uppercase; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: #fff; padding: 8px 12px; z-index: 10; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.prose { max-width: var(--measure); }
.kicker { font-family: var(--ui); font-weight: 600; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--accent); margin-bottom: 10px; }

/* Header: light and quiet so the books carry the color */
.site-head { background: #fff; border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; padding-block: 20px; }
.brand { font-family: var(--display); font-size: 1.55rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.nav { display: flex; flex-wrap: wrap; gap: 6px 26px; list-style: none; margin: 0; padding: 0; }
.nav a { font-family: var(--ui); font-weight: 600; font-size: 1rem; color: var(--ink); text-decoration: none; padding-block: 4px; border-bottom: 3px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: #b3121b; color: var(--ink); }

main > .wrap { padding-block: 56px 72px; }

/* Buttons */
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.btn { display: inline-block; font-family: var(--ui); font-weight: 600; font-size: 1.05rem; text-decoration: none; padding: 13px 24px; border: 2px solid var(--btn-bg); background: var(--btn-bg); color: var(--btn-fg); border-radius: 2px; }
.btn:hover { filter: brightness(1.15); color: var(--btn-fg); }
.btn.ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn.ghost:hover { filter: none; background: rgb(0 0 0 / 0.06); color: inherit; }

/* Home intro */
.intro { display: grid; grid-template-columns: 1.3fr 1fr; gap: 56px; align-items: center; padding-block: 56px; }
.intro .lede { font-size: 1.3rem; color: var(--muted); max-width: 36ch; }
.portrait-img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; box-shadow: 0 12px 28px rgb(0 0 0 / 0.18); }

/* Covers */
.cover-img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; box-shadow: 0 14px 30px rgb(0 0 0 / 0.35); }
.type-cover { aspect-ratio: 2 / 3; background: #0f1f3d; color: #fff; display: flex; flex-direction: column; justify-content: space-between; padding: 14% 11%; border: 3px solid #d8b45a; outline: 1px solid #d8b45a; outline-offset: -10px; box-shadow: 0 14px 30px rgb(0 0 0 / 0.35); text-align: center; }
.type-cover .t { font-family: "Cinzel", Georgia, serif; font-weight: 700; color: #d8b45a; font-size: clamp(1.4rem, 3.6vw, 2.4rem); line-height: 1.15; }
.type-cover .a { font-family: "Cinzel", Georgia, serif; letter-spacing: 0.08em; font-size: 0.95rem; }
.type-cover .n { font-family: var(--body); font-size: 0.8rem; opacity: 0.7; font-style: italic; margin-top: 6px; }
.grid4 .type-cover .t { font-size: clamp(1.1rem, 2vw, 1.6rem); }

/* Home bookshelf bands */
.shelf-title { padding-block: 8px 28px; }
.band { padding-block: 64px; position: relative; }
.band .wrap { display: grid; grid-template-columns: minmax(200px, 300px) 1fr; gap: 56px; align-items: center; }
.band.flip .wrap { grid-template-columns: 1fr minmax(200px, 300px); }
.band.flip .band-cover { order: 2; }
.band h2 { font-family: var(--book-display); font-weight: 400; font-size: clamp(2rem, 4.4vw, 3.2rem); line-height: 1.05; margin-bottom: 14px; }
.band .tag { font-size: 1.25rem; max-width: 46ch; }
.band-fq { background: #0f1f3d; color: #fff; }
.band-fq h2 { color: #d8b45a; font-weight: 700; }
.band-fq .btn { --btn-bg: #d8b45a; --btn-fg: #0f1f3d; }
.band-sunday { background: linear-gradient(90deg, #111 0 max(calc(50% - 232px), 344px), #f7f7f4 0); color: #111; }
.band-sunday h2 { text-transform: uppercase; color: #111; }
.band-sunday h2 .x { color: #c8101b; }
.band-sunday .btn { --btn-bg: #c8101b; }
.band-why { background: #fff; color: #2c3a86; border-top: 22px solid #c8202b; border-bottom: 22px solid #2c3a86; }
.band-why h2 { color: #c8202b; text-transform: uppercase; }
.band-why .btn { --btn-bg: #2c3a86; }
.band-sweet { background: #a81e17; color: #fff; }
.band-sweet h2 { color: #f5c518; }
.band-sweet .btn { --btn-bg: #f5c518; --btn-fg: #5a0f0b; }

/* Book page hero */
.book-hero { background: var(--hero-bg); color: var(--hero-fg); padding-block: 56px; }
.book-hero .wrap { display: grid; grid-template-columns: minmax(220px, 320px) 1fr; gap: 56px; align-items: center; }
.book-hero .crumb { font-family: var(--ui); font-weight: 600; font-size: 0.9rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--hero-accent); text-decoration: none; }
.book-hero h1 { font-family: var(--book-display); font-weight: 400; text-transform: none; color: var(--hero-head); font-size: clamp(2.3rem, 5vw, 3.8rem); line-height: 1.05; margin: 10px 0 18px; }
.book-hero .pull { font-size: 1.3rem; line-height: 1.5; border-left: 4px solid var(--hero-accent); padding-left: 18px; margin: 0 0 14px; max-width: 46ch; }
.theme-fq .book-hero h1 { font-weight: 700; }
.theme-sunday .book-hero { background: linear-gradient(90deg, #111 0 max(calc(50% - 212px), 364px), #f7f7f4 0); color: #111; }
.theme-sunday .book-hero h1 { color: #111; text-transform: uppercase; }
.theme-sunday .book-hero .crumb { color: #c8101b; }
.theme-why .book-hero { border-top: 26px solid #c8202b; border-bottom: 26px solid #2c3a86; }
.theme-why .book-hero h1 { text-transform: uppercase; font-weight: 600; }
.buy { margin-top: 22px; display: inline-grid; gap: 4px; padding: 16px 20px; background: rgb(255 255 255 / 0.96); color: #15161a; border-top: 5px solid var(--btn-bg); min-width: 260px; }
.buy h2 { font-family: var(--ui); font-size: 1rem; text-transform: uppercase; letter-spacing: 0.1em; margin: 0 0 4px; }
.buy p { margin: 0; font-size: 1rem; }
.buy a { color: var(--accent); font-weight: 600; }
.buy .det { font-size: 0.9rem; color: #4c4f57; }
.buy .dets { margin-top: 8px; padding-top: 8px; border-top: 1px solid #dedbd3; }
.theme-sunday .buy, .theme-why .buy { border: 2px solid currentColor; border-top-width: 5px; }

/* Book page body */
.book-body { background: var(--page-tint); }
.book-body .wrap { padding-block: 56px 72px; }
.book-body h2 { color: var(--page-head); font-family: var(--book-display); font-weight: 400; font-size: clamp(1.7rem, 3vw, 2.2rem); }
.theme-fq .book-body h2, .theme-why .book-body h2 { font-weight: 600; }
.questions { counter-reset: q; list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 8px; }
.questions li { counter-increment: q; display: flex; gap: 14px; align-items: baseline; font-size: 1.25rem; }
.questions li::before { content: counter(q); font-family: var(--display); font-weight: 600; color: var(--hero-accent); font-size: 1.5rem; min-width: 1ch; }
.book-body .questions li::before { color: var(--accent); }
.excerpt { background: #fff; padding: 32px 36px; border-left: 5px solid var(--accent); }
.excerpt h3 { font-family: var(--ui); font-size: 1rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.toc { columns: 2 280px; column-gap: 40px; padding-left: 1.4em; font-size: 1rem; }
.toc li { break-inside: avoid; margin-bottom: 6px; }
.note { font-size: 1rem; color: var(--muted); font-style: italic; }

/* Books grid */
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.book-card { display: grid; gap: 14px; text-decoration: none; color: var(--ink); align-content: start; }
.book-card h3 { margin: 0; font-size: 1.15rem; font-family: var(--ui); font-weight: 700; }
.book-card .more { font-family: var(--ui); font-weight: 600; font-size: 0.95rem; color: #b3121b; }
.book-card .swatch { height: 8px; }
.book-card:hover h3 { text-decoration: underline; }

/* Quote */
.quote-band { background: var(--tint); padding: 56px 0; border-block: 1px solid var(--line); }
.quote-band blockquote { margin: 0 auto; max-width: 46ch; font-size: 1.45rem; line-height: 1.5; text-align: center; font-style: italic; }
.quote-band cite { display: block; margin-top: 14px; font-style: normal; font-family: var(--ui); font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.95rem; color: #b3121b; }

/* Panels and forms */
.panel { background: var(--tint); padding: 36px 40px; border-left: 5px solid #b3121b; }
form { display: grid; gap: 18px; max-width: 640px; }
label { display: block; font-family: var(--ui); font-weight: 600; font-size: 1rem; margin-bottom: 6px; }
input, select, textarea { width: 100%; font: inherit; font-size: 1.1rem; padding: 12px 14px; border: 2px solid var(--line); background: #fff; color: var(--ink); border-radius: 2px; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); outline: none; }
textarea { min-height: 170px; }
.form-msg { padding: 14px 18px; background: var(--tint); border-left: 4px solid #b3121b; }
.signup { display: grid; grid-template-columns: 1fr auto; gap: 12px; max-width: 560px; }

.site-foot { border-top: 1px solid var(--line); padding-block: 40px; color: var(--muted); font-size: 1rem; font-family: var(--ui); }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }

@media (max-width: 900px) {
  .intro, .band .wrap, .band.flip .wrap, .book-hero .wrap { grid-template-columns: 1fr; gap: 32px; }
  .band.flip .band-cover { order: 0; }
  .band-cover, .book-hero .cover-col { max-width: 260px; }
  .intro .portrait-img { max-width: 320px; }
  .grid4 { grid-template-columns: repeat(2, 1fr); }
  .band-sunday, .theme-sunday .book-hero { background: #f7f7f4; }
  .band-sunday .band-cover, .theme-sunday .book-hero .cover-col { background: #111; padding: 20px; }
  .panel { padding: 28px 22px; }
}
@media (max-width: 440px) {
  .grid4 { grid-template-columns: 1fr; }
  .signup { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
