:root {
  /* Palette taken from the Love in the Times of Covid cover */
  --bg: #fbf7f1;
  --bg-alt: #f1e7da;
  --ink: #1d3439;
  --muted: #5d6a6b;
  --accent: #c8453d;        /* coral, deepened for text contrast */
  --accent-bright: #ef6a5e; /* cover coral */
  --accent-soft: #f2a49b;
  --teal: #12505c;
  --pink: #d63f86;
  --card: #ffffff;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hand: "Caveat", "Bradley Hand", cursive;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); }
.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--bg-alt);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-block: 14px;
}
.logo {
  font-family: var(--serif); font-size: 1.5rem; font-weight: 600; font-style: italic;
  color: var(--ink); text-decoration: none; letter-spacing: .01em;
}
.logo::after { content: "."; color: var(--accent-bright); font-style: normal; }
.nav { display: flex; gap: 22px; flex-wrap: wrap; }
.nav a {
  color: var(--muted); text-decoration: none; font-size: .82rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .14em;
}
.nav a:hover { color: var(--accent); }

/* Hero */
.hero {
  text-align: center;
  padding: clamp(72px, 14vw, 150px) 0 clamp(64px, 10vw, 110px);
  background:
    radial-gradient(ellipse at 15% 0%, rgba(239,106,94,.20), transparent 55%),
    radial-gradient(ellipse at 90% 20%, rgba(18,80,92,.12), transparent 50%),
    var(--bg);
}
.eyebrow {
  font-size: .8rem; font-weight: 500; letter-spacing: .3em; text-transform: uppercase;
  color: var(--teal); margin: 0 0 18px;
}
.hero h1 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(3rem, 10vw, 6.5rem); line-height: 1; margin: 0;
}
.hero h1 em { color: var(--accent-bright); }
.hero .tagline {
  font-family: var(--hand); font-size: clamp(1.6rem, 4vw, 2.2rem); line-height: 1.3;
  color: var(--muted); max-width: 30ch; margin: 24px auto 36px;
}
.flourish { color: var(--pink); font-size: 1.4rem; letter-spacing: .5em; }

.btn {
  display: inline-block; padding: 13px 30px;
  border: 1px solid var(--accent); border-radius: 999px;
  color: var(--accent); text-decoration: none; font-weight: 500;
  font-size: .82rem; letter-spacing: .16em; text-transform: uppercase;
  transition: background .2s, color .2s;
}
.btn:hover, .btn.solid { background: var(--accent); color: #fff; }
.btn.solid:hover { background: #a9362f; }

/* Sections */
section { padding: clamp(64px, 10vw, 110px) 0; }
.section-title {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2.2rem, 5vw, 3rem); text-align: center; margin: 0 0 8px;
}
.section-sub { text-align: center; color: var(--muted); margin: 0 0 48px; }

/* About */
.about { background: var(--bg-alt); }
.about-body { max-width: 680px; margin-inline: auto; }
.about-body p:first-of-type::first-letter {
  font-family: var(--serif); float: left; font-size: 4.2rem; font-style: italic;
  line-height: .85; padding: 6px 10px 0 0; color: var(--accent-bright);
}
.about-body em { font-family: var(--serif); }

/* Books */
.books-grid {
  display: grid; gap: 40px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.book {
  background: var(--card); border-radius: 10px; padding: 32px;
  box-shadow: 0 1px 2px rgba(29,52,57,.05), 0 12px 32px rgba(29,52,57,.07);
  display: flex; flex-direction: column; gap: 22px;
}
.author-photo {
  width: 220px; height: 220px; border-radius: 50%; object-fit: cover;
  margin: 0 auto 36px; border: 6px solid var(--bg);
  box-shadow: 0 12px 30px rgba(29,52,57,.18);
}
.cover-link { display: block; width: min(240px, 75%); margin-inline: auto; text-decoration: none; }
.cover-img {
  width: 100%; height: auto; border-radius: 2px 5px 5px 2px;
  box-shadow: 0 14px 30px rgba(29,52,57,.28);
  transition: transform .25s ease, box-shadow .25s ease;
}
.cover-link:hover .cover-img { transform: translateY(-4px) rotate(-1deg); box-shadow: 0 20px 38px rgba(29,52,57,.32); }
.cover-mystery {
  aspect-ratio: 2 / 3; width: 100%;
  border-radius: 2px 5px 5px 2px;
  display: grid; place-items: center;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(239,106,94,.30), transparent 60%),
    linear-gradient(180deg, #e3d6c3 0 22%, #2f8f9a 22%, #12505c 78%, #0d3f48);
  box-shadow: inset 0 0 0 10px rgba(255,255,255,.18), 0 14px 30px rgba(29,52,57,.28);
  transition: transform .25s ease;
}
.cover-mystery span {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(7rem, 22vw, 10rem); line-height: 1; color: #fff;
  text-shadow: 0 6px 20px rgba(13,63,72,.45);
}
.cover-link:hover .cover-mystery { transform: translateY(-4px) rotate(1deg); }
.book .hook { font-family: var(--hand); font-size: 1.55rem; line-height: 1.25; color: var(--accent); }
.book h3 { font-family: var(--serif); font-weight: 600; font-size: 1.7rem; line-height: 1.2; margin: 0; }
.book .series { color: var(--teal); font-size: .78rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; margin: 0; }
.book p { margin: 0; color: var(--muted); }
.book .actions { margin-top: auto; }
.book h3 a { color: inherit; text-decoration: none; }
.book h3 a:hover { color: var(--accent); }

/* Coming soon / 404 */
.coming {
  min-height: calc(100vh - 140px);
  display: grid; place-items: center; text-align: center;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(239,106,94,.22), transparent 60%),
    var(--bg);
}
.coming h1 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2.8rem, 9vw, 5.5rem); margin: 0; line-height: 1.05;
}
.coming .wrap { padding-block: 56px; }
.coming p { max-width: 52ch; margin: 18px auto; color: var(--muted); }
.coming p:last-of-type { margin-bottom: 34px; }

/* Newsletter signup (Kit inline form) */
.signup { background: var(--bg-alt); }
.signup .section-sub { margin-bottom: 28px; }
.signup-form { max-width: 520px; margin: 0 auto; }
.signup .formkit-form { max-width: none !important; margin: 0 auto; font-family: var(--sans) !important; }
.signup .formkit-form .formkit-input {
  border-color: var(--accent-soft) !important; border-radius: 999px !important;
  background: var(--card) !important; color: var(--ink) !important; font-family: var(--sans) !important;
}
.signup .formkit-form .formkit-input:focus { border-color: var(--accent) !important; }
.signup .formkit-form .formkit-submit {
  background-color: var(--accent) !important; border-radius: 999px !important;
  font-family: var(--sans) !important; letter-spacing: .04em;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--bg-alt); padding: 32px 0;
  text-align: center; color: var(--muted); font-size: .85rem;
}
.site-footer .logo { font-size: 1.2rem; display: block; margin-bottom: 4px; }

@media (max-width: 560px) {
  .site-header .wrap { flex-direction: column; gap: 6px; }
  .nav { gap: 16px; }
}

/* Book pages */
.book-page { padding: clamp(48px, 8vw, 90px) 0; }
.book-layout {
  display: grid; gap: clamp(36px, 6vw, 72px);
  grid-template-columns: minmax(220px, 340px) 1fr; align-items: start;
}
.book-layout .cover-img, .book-layout .cover-mystery { width: 100%; }
.book-info h1 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2.4rem, 6vw, 3.8rem); line-height: 1.05; margin: 6px 0 14px;
}
.book-info .hook { font-family: var(--hand); font-size: 1.75rem; line-height: 1.25; color: var(--accent); margin: 0 0 20px; }
.book-info .meta { color: var(--muted); font-size: .9rem; margin: 0 0 24px; }
.book-info .meta span + span::before { content: "·"; margin: 0 10px; color: var(--accent-bright); }
.book-info .desc p { margin: 0 0 16px; }
.buy { margin-top: 40px; padding: 0; }
.buy h2 {
  font-family: var(--serif); font-weight: 600; font-size: 1.7rem; margin: 0 0 6px;
}
.buy .note { color: var(--muted); font-size: .9rem; margin: 0 0 20px; }
.stores {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  grid-auto-rows: 1fr;
}
.stores li { display: flex; }
.stores a {
  flex: 1; min-height: 64px; line-height: 1.3;
  display: flex; align-items: center; gap: 14px;
  padding: 10px 14px; background: var(--card);
  border: 1px solid var(--bg-alt); border-radius: 12px;
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.stores a:hover { border-color: var(--accent-soft); box-shadow: 0 6px 18px rgba(29,52,57,.08); transform: translateY(-1px); }
.slogo {
  flex: none; width: 40px; height: 40px; border-radius: 10px; overflow: hidden;
  display: grid; place-items: center;
  background: #fff; box-shadow: inset 0 0 0 1px #ece3da;
}
.slogo img { width: 76%; height: 76%; object-fit: contain; }
.slogo.wide img { width: 90%; height: 90%; }
.slogo.zoom-sm img { transform: scale(1.3); }
.slogo.fill { box-shadow: none; }
.slogo.fill img { width: 100%; height: 100%; object-fit: cover; }
.slogo.zoom img { transform: scale(1.42); }
.stores small { display: block; color: var(--muted); font-weight: 400; font-size: .75rem; margin-top: 2px; }
.more-stores { margin-top: 18px; font-size: .9rem; }
.page-nav {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid var(--bg-alt); margin-top: clamp(48px, 8vw, 80px); padding-top: 28px;
}
.page-nav a { color: var(--muted); text-decoration: none; font-size: .9rem; }
.page-nav a strong { display: block; font-family: var(--serif); font-size: 1.25rem; color: var(--ink); font-weight: 600; }
.page-nav a:hover strong { color: var(--accent); }
.page-nav .next { text-align: right; margin-left: auto; }

@media (max-width: 720px) {
  .book-layout { grid-template-columns: 1fr; }
  .book-layout .cover-col { width: min(280px, 80%); margin-inline: auto; }
}
