:root {
  --bread: #fbf4e6;
  --crust: #e9d6b0;
  --pb: #b7792f;
  --pb-deep: #8a5620;
  --jelly: #7b2d5b;
  --jelly-deep: #5c1f43;
  --ink: #2b211a;
  --muted: #6b5d50;
  --card: #fffdf8;
  --line: #e7dcc7;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(43, 33, 26, .06), 0 8px 24px rgba(43, 33, 26, .08);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bread);
  color: var(--ink);
  font: 400 1.0625rem/1.65 "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
}
h2 { font-size: clamp(1.75rem, 3.5vw, 2.25rem); }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0 0 1em; }

a { color: var(--jelly); text-underline-offset: 3px; }
a:hover { color: var(--jelly-deep); }
:focus-visible { outline: 3px solid var(--pb); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(1100px, 100% - 32px); margin-inline: auto; }

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--jelly); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 10;
}
.skip:focus { left: 16px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: rgba(251, 244, 230, .92);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: "Fraunces", Georgia, serif; font-weight: 800; font-size: 1.3rem;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.brand .amp { color: var(--jelly); }
nav { display: flex; gap: 4px; }
nav a {
  color: var(--ink); text-decoration: none; font-weight: 700;
  padding: 8px 12px; border-radius: 999px;
}
nav a:hover { background: var(--crust); color: var(--ink); }

/* Hero */
.hero {
  background:
    radial-gradient(600px 300px at 90% 10%, rgba(123, 45, 91, .12), transparent 70%),
    radial-gradient(500px 280px at 0% 100%, rgba(183, 121, 47, .16), transparent 70%);
  padding: clamp(56px, 10vw, 112px) 0 clamp(48px, 8vw, 88px);
}
.hero-inner { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; }
.hero-logo { width: 100%; height: auto; max-width: 440px; justify-self: center; }
@media (max-width: 760px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-logo { max-width: 300px; grid-row: 1; }
}
.eyebrow {
  display: inline-block; font-weight: 700; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--pb-deep); background: var(--crust); padding: 4px 12px; border-radius: 999px; margin-bottom: 20px;
}
.hero h1 { font-size: clamp(2.2rem, 5.5vw, 3.75rem); }
.hero .pb { color: var(--pb); }
.hero .j { color: var(--jelly); }
.lede { font-size: clamp(1.1rem, 2vw, 1.25rem); color: var(--muted); max-width: 640px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; text-decoration: none; border-radius: 999px;
  padding: 12px 22px; border: 2px solid transparent; transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--jelly); color: #fff; }
.btn-primary:hover { background: var(--jelly-deep); color: #fff; }
.btn-ghost { border-color: var(--pb); color: var(--pb-deep); }
.btn-ghost:hover { background: var(--crust); color: var(--pb-deep); }
.btn-small { padding: 8px 16px; font-size: .95rem; }
.btn-amazon { background: var(--pb); color: #fff; }
.btn-amazon:hover { background: var(--pb-deep); color: #fff; }
.btn-disabled { background: var(--line); color: var(--muted); cursor: default; }
.btn-disabled:hover { transform: none; }

/* Sections */
.section { padding: clamp(56px, 8vw, 96px) 0; scroll-margin-top: 48px; }
.section-alt { background: var(--card); border-block: 1px solid var(--line); }
.section-lede { color: var(--muted); margin-bottom: 32px; }

/* Books */
.book-grid {
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}
.book {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column;
}
.cover, .cover-placeholder { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; display: block; }
.cover-placeholder {
  display: grid; place-items: center; text-align: center;
  background: repeating-linear-gradient(135deg, var(--crust) 0 14px, #f1e3c6 14px 28px);
  color: var(--pb-deep); font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 1.3rem;
}
.book-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.book-status {
  font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--jelly); margin-bottom: 6px;
}
.book-blurb { color: var(--muted); flex: 1; }
.book .btn { align-self: flex-start; }

/* About */
.about { display: grid; gap: 40px; grid-template-columns: 1.5fr 1fr; align-items: center; }
.about p { color: var(--muted); }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.facts li {
  display: flex; flex-direction: column; padding: 16px 20px;
  background: var(--bread); border: 1px solid var(--line); border-radius: var(--radius);
  border-left: 5px solid var(--jelly);
}
.facts li:nth-child(2) { border-left-color: var(--pb); }
.facts strong { font-family: "Fraunces", Georgia, serif; font-size: 1.15rem; }
.facts span { color: var(--muted); }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; } }

/* Contact */
.contact { text-align: center; max-width: 640px; }
.contact p { color: var(--muted); }
.email { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: clamp(1.3rem, 3vw, 1.6rem); }

/* Prose pages */
.prose { max-width: 720px; padding: clamp(40px, 6vw, 72px) 0; }
.prose h1 { font-size: clamp(2rem, 4vw, 2.6rem); }
.prose h2 { font-size: 1.35rem; margin-top: 1.6em; }
.prose p, .prose li { color: var(--muted); }

/* Footer */
.site-footer { background: var(--jelly-deep); color: #f5e6ee; padding: 32px 0; }
.site-footer p { margin: 0 0 6px; }
.site-footer .small { font-size: .875rem; opacity: .8; }
.site-footer a { color: #fff; }

@media (max-width: 520px) {
  .brand { font-size: 1.1rem; gap: 8px; }
  .brand img { width: 28px; height: 28px; }
  nav a { padding: 8px 6px; font-size: .9rem; }
}
