:root {
  --bg: #F5EDED;
  --bg-card: #FBF6F5;
  --ink: #372222;
  --muted: #4b3636;
  --accent: #843F47;
  --soft: #D0978B;
  --line: rgba(55, 34, 34, 0.12);
  --line-strong: rgba(132, 63, 71, 0.28);
  --header-h: 4.25rem;
  --measure: 40rem;
  --wide: 68rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Newsreader", "Times New Roman", Georgia, serif;
  font-size: 1.125rem;
  font-weight: 420;
  line-height: 1.65;
  letter-spacing: 0.01em;
  text-wrap: pretty;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--bg);
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip:focus { left: 0.75rem; top: 0.75rem; }

header.site {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 92%, white);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.brand img {
  width: 2.35rem;
  height: auto;
  flex: none;
}
.brand span {
  font-family: "Sansation", "Trebuchet MS", sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
nav.primary { display: flex; align-items: center; }
.nav-toggle {
  display: none;
  font-family: "Sansation", sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: none;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  padding: 0.4rem 0.7rem;
  cursor: pointer;
}
nav.primary ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
nav.primary a {
  font-family: "Sansation", sans-serif;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
}
nav.primary a:hover,
nav.primary a:focus { color: var(--accent); }

@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  nav.primary ul {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 0;
  }
  header.site.is-open nav.primary ul { display: flex; }
  nav.primary a {
    display: block;
    padding: 0.85rem 1.5rem;
  }
}

main { overflow: clip; }

.hero {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 5.5rem 1.5rem 4.5rem;
  text-align: center;
}
.hero-logo {
  width: min(28rem, 86vw);
  margin: 0 auto 1.75rem;
}
.hero h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.lede {
  margin: 0 auto;
  max-width: 28rem;
  font-size: clamp(1.2rem, 2.2vw, 1.45rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.45;
  color: var(--muted);
}
.hero-rule {
  width: 6.5rem;
  height: 2px;
  margin: 2.25rem auto 0;
  border: 0;
  background: linear-gradient(90deg, var(--accent), var(--soft));
}

section {
  scroll-margin-top: calc(var(--header-h) + 1.25rem);
}
.section {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 4rem 1.5rem;
}
.section + .section {
  border-top: 1px solid var(--line);
}
.kicker {
  font-family: "Sansation", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.7rem;
}
.section h2 {
  font-family: "Sansation", sans-serif;
  font-weight: 700;
  font-size: clamp(1.7rem, 3vw, 2.15rem);
  line-height: 1.2;
  letter-spacing: 0.01em;
  margin: 0 0 1.1rem;
}
.section p { margin: 0 0 1rem; color: var(--muted); max-width: var(--measure); }
.section p:last-child { margin-bottom: 0; }

.publishing-grid {
  display: grid;
  grid-template-columns: 15.5rem 1fr;
  gap: 2.75rem;
  align-items: start;
}
@media (max-width: 700px) {
  .publishing-grid { grid-template-columns: 1fr; }
  .book-card { max-width: 16rem; margin-inline: auto; }
}

.book-card {
  background: #7a3940;
  background: linear-gradient(165deg, #9a5558 0%, var(--accent) 48%, #5e2c32 100%);
  color: #F5EDED;
  aspect-ratio: 2 / 3;
  width: 100%;
  padding: 1.15rem 1.05rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 16px 40px rgba(55, 34, 34, 0.16);
  position: relative;
}
.book-card .ph-chip {
  align-self: flex-start;
}
.book-card p {
  color: #F5EDED;
  max-width: none;
}
.book-card .cover-mark {
  width: 4.5rem;
  margin: 0 auto;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}
.book-card .cover-title,
.book-card .cover-author {
  font-family: "Sansation", sans-serif;
  text-align: center;
  color: #F5EDED;
}
.book-card .cover-title {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  margin: 0.85rem 0 0.4rem;
}
.book-card .cover-author {
  font-weight: 400;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0;
  opacity: 0.92;
}
.book-meta { padding-top: 0.15rem; }
.book-meta dl {
  margin: 1.15rem 0 0;
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  row-gap: 0.55rem;
  column-gap: 0.75rem;
  max-width: 28rem;
}
.book-meta dt {
  font-family: "Sansation", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  padding-top: 0.15rem;
}
.book-meta dd {
  margin: 0;
  color: var(--ink);
}
.placeholder-note {
  font-size: 0.98rem;
  font-style: italic;
}

.ph-chip, .ph-text {
  font-family: "Sansation", sans-serif;
}
.ph-chip {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--soft);
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 70%, white);
}
.book-card .ph-chip {
  color: #F5EDED;
  border-color: color-mix(in srgb, #F5EDED 50%, transparent);
  background: transparent;
}
.ph-text {
  background: color-mix(in srgb, var(--soft) 28%, var(--bg));
  border-bottom: 1px dashed var(--accent);
  padding: 0 0.15em;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 0.5rem;
}
.cards.two { grid-template-columns: repeat(2, 1fr); }
.cards.one { grid-template-columns: minmax(0, 36rem); }
@media (max-width: 800px) {
  .cards, .cards.two { grid-template-columns: 1fr; }
}
.resource-list {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  max-width: 48rem;
  border-top: 1px solid var(--line);
}
@media (max-width: 700px) {
  .resource-list { grid-template-columns: 1fr; }
}
.resource-list li {
  border-bottom: 1px solid var(--line);
  padding: 1.15rem 1.25rem 1.15rem 0;
}
.resource-list > li > a {
  font-family: "Sansation", sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
  display: inline-block;
}
.resource-list > li > a:hover,
.resource-list > li > a:focus { color: var(--accent); }
.resource-list span a {
  font-family: inherit;
  font-weight: inherit;
  font-size: inherit;
  color: var(--accent);
}
.resource-list li:last-child { border-bottom: none; }
@media (min-width: 701px) {
  .resource-list li:nth-last-child(2) { border-bottom: none; }
}
.resource-list span {
  display: block;
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 22rem;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  padding: 1.6rem 1.45rem 1.5rem;
}
.card h2 { font-size: 1.45rem; margin-bottom: 0.8rem; }
.card p { max-width: none; }


footer.site {
  border-top: 1px solid var(--line);
  padding: 2rem 1.5rem 2.5rem;
}
.footer-inner {
  max-width: var(--wide);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-family: "Sansation", sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.section p.feature {
  margin-top: 1.5rem;
  padding: 1.1rem 1.25rem;
  background: var(--bg-card);
  border-left: 3px solid var(--accent);
  max-width: 48rem;
}
.feature a {
  display: block;
  font-family: "Sansation", sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
  margin-bottom: 0.2rem;
}
.feature a:hover { color: var(--accent); }

/* Motion: only when JS runs and the visitor allows motion */
@media (prefers-reduced-motion: no-preference) {
  .card, .book-card {
    transition: transform .45s cubic-bezier(.2,.7,.2,1), box-shadow .45s cubic-bezier(.2,.7,.2,1);
  }
  .card:hover, .js .card.reveal.in:hover { transform: translateY(-4px); box-shadow: 0 14px 32px rgba(55, 34, 34, 0.10); }
  .book-card:hover, .js .book-card.reveal.in:hover { transform: translateY(-6px) rotate(-1deg); box-shadow: 0 24px 50px rgba(55, 34, 34, 0.22); }
  .resource-list > li > a { transition: color .25s, transform .3s cubic-bezier(.2,.7,.2,1); }
  .resource-list > li:hover > a { transform: translateX(4px); }

  .js .hero-logo {
    opacity: 0;
    transform: translateY(16px) scale(.97);
    animation: rise 1.1s cubic-bezier(.2,.7,.2,1) .1s forwards;
  }
  .js .lede { opacity: 0; animation: fade 1s ease .55s forwards; }
  .js .hero-rule { transform: scaleX(0); animation: grow 1s cubic-bezier(.2,.7,.2,1) .9s forwards; }

  /* Hidden until scrolled into view, then a one-shot keyframe animation.
     "backwards" fill means hover transforms work normally once it ends. */
  .js .reveal { opacity: 0; }
  .js .reveal.in {
    opacity: 1;
    animation: reveal .8s cubic-bezier(.2,.7,.2,1) var(--d, 0s) backwards;
  }
}
@keyframes reveal { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes fade { to { opacity: 1; } }
@keyframes grow { to { transform: scaleX(1); } }

.section.section-cards { padding-top: 0; padding-bottom: 4.5rem; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.nav-toggle { min-height: 44px; min-width: 44px; }

/* 404 page */
.not-found .hero { padding-bottom: 5rem; }
.not-found .hero-logo { width: min(18rem, 70vw); }
.hero h1.nf-title {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  font-family: "Sansation", sans-serif;
  font-weight: 700;
  font-size: clamp(1.7rem, 3vw, 2.15rem);
  margin: 0 0 1rem;
}
.nf-links {
  margin: 2rem 0 0;
  font-family: "Sansation", sans-serif;
  letter-spacing: .06em;
}
.nf-links a { display: inline-block; min-height: 44px; padding: .6rem .25rem; }
