:root {
  color-scheme: light;
  --cream: #fff9ec;
  --ink: #1f3a40;
  --muted: #4a6168;
  --teal: #00687c;
  --coral: #d74431;
  --orange: #dd6632;
  --yellow: #f0b03d;
  --link: #b5321f;
  --primary: #c93a27;
  font-family: "Nunito", sans-serif;
  color: var(--ink);
  background: var(--cream);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-width: 320px; margin: 0; background: var(--cream); font-size: 1rem; line-height: 1.6; }
img { display: block; max-width: 100%; }
a { color: var(--link); text-underline-offset: .2em; }
a:hover { color: #842719; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
h1, h2, h3 { margin-top: 0; color: var(--teal); font-family: "Fredoka", sans-serif; font-weight: 600; line-height: 1.2; }
h1 { margin-bottom: .75rem; font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { margin-bottom: 1rem; font-size: clamp(1.8rem, 3.5vw, 2.5rem); }
h3 { margin-bottom: .6rem; font-size: 1.35rem; }
p { margin-top: 0; }
.content-wrap { width: min(calc(100% - 2rem), 1080px); margin-inline: auto; }
.top-stripe { height: 8px; background: linear-gradient(90deg, var(--coral) 0 25%, var(--orange) 25% 50%, var(--yellow) 50% 75%, var(--teal) 75% 100%); }
.site-header { display: flex; width: min(calc(100% - 2rem), 1080px); min-height: 84px; align-items: center; justify-content: space-between; gap: 1.5rem; margin-inline: auto; }
.brand { display: inline-flex; flex: 0 0 auto; align-items: center; color: var(--teal); text-decoration: none; }
.site-logo { width: 130px; height: auto; mix-blend-mode: multiply; }
.image-placeholder { display: grid; place-items: center; background: #f1eee5; color: var(--muted); font-size: .82rem; font-weight: 700; text-align: center; }
.image-placeholder--logo { width: 130px; min-height: 44px; padding: .35rem; }
.menu-toggle { display: none; width: 44px; height: 44px; place-items: center; padding: 9px; border: 2px solid var(--teal); border-radius: 50%; background: transparent; color: var(--teal); cursor: pointer; }
.menu-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 2; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .75rem 1.5rem; }
.site-nav a { color: var(--teal); font-weight: 800; text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--link); text-decoration: underline; }

.home-hero { display: grid; justify-items: center; padding: 1.25rem 0 .75rem; }
.hero-image { width: min(560px, 92vw); height: auto; mix-blend-mode: multiply; }
.hero-image-placeholder { width: min(560px, 92vw); aspect-ratio: 4 / 3; }
.series-intro { padding-block: 1.5rem 3rem; text-align: center; }
.series-intro h1 { max-width: 880px; margin-inline: auto; }
.tagline { margin-bottom: .75rem; color: var(--coral); font-size: clamp(1.2rem, 2.4vw, 1.55rem); font-weight: 800; }
.series-intro__pitch { max-width: 680px; margin: 0 auto 1.5rem; color: var(--muted); }
.button-row { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; }
.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: .65rem 1.3rem; border: 2px solid var(--primary); border-radius: 999px; background: var(--primary); color: #fff; font-weight: 800; line-height: 1.2; text-align: center; text-decoration: none; }
.button:hover { border-color: #9f2d1e; background: #9f2d1e; color: #fff; }
.button--secondary { border-color: var(--teal); background: transparent; color: var(--teal); }
.button--secondary:hover { background: var(--teal); color: #fff; }
.series-books { padding-block: 1rem 3rem; }
.series-books > h2 { text-align: center; }
.series-book-grid, .product-grid { display: grid; gap: 1rem; }
.series-book-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card, .content-card {
  border: 0;
  border-top: 8px solid var(--coral);
  border-radius: 20px;
  padding: 22px;
  background: #fff;
}
.series-book-grid .card:nth-child(4n+2), .product-grid .card:nth-child(4n+2), .content-card:nth-child(4n+2) { border-top-color: var(--orange); }
.series-book-grid .card:nth-child(4n+3), .product-grid .card:nth-child(4n+3), .content-card:nth-child(4n+3) { border-top-color: var(--yellow); }
.series-book-grid .card:nth-child(4n), .product-grid .card:nth-child(4n), .content-card:nth-child(4n) { border-top-color: var(--teal); }
.book-card__label, .eyebrow { margin-bottom: .55rem; color: var(--muted); font-size: .82rem; font-weight: 800; }
.section-more { margin: 1.5rem 0 0; text-align: center; }
.text-link { font-weight: 800; }

.home-latest { padding-block: 2.5rem; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.section-heading h2 { margin-bottom: 0; }
.latest-grid, .listing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 1rem; }
.content-card { display: flex; min-height: 200px; flex-direction: column; }
.content-card h2, .content-card h3 { margin-bottom: .65rem; }
.content-card h2 a, .content-card h3 a { color: var(--teal); text-decoration: none; }
.content-card h2 a:hover, .content-card h3 a:hover { color: var(--link); text-decoration: underline; }
.content-card p:last-child { margin-bottom: 0; }
.content-card > .text-link { margin-top: auto; }
.home-contact { padding-block: 2.5rem; }
.social-list { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; padding-left: 1.2rem; }

.page-intro { padding-block: 3rem 1.5rem; }
.page-intro h1 { margin-bottom: .5rem; }
.product-section { padding-bottom: 4rem; }
.product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: stretch; }
.product-card { display: flex; min-height: 390px; flex-direction: column; }
.cover-placeholder { display: grid; width: 100%; aspect-ratio: 4 / 3; place-items: center; margin-bottom: 1.1rem; background: #f1eee5; color: var(--muted); font-size: .82rem; font-weight: 700; text-align: center; }
.product-card .button { width: 100%; margin-top: auto; }
.listing-grid { padding-bottom: 2.5rem; }
.listing-grid .content-card { min-height: 220px; }

.newsletter { margin-block: 2rem; padding: 1.5rem; border-radius: 20px; background: var(--teal); color: #fff; }
.newsletter h2 { margin-bottom: .5rem; color: #fff; }
.newsletter p { margin-bottom: 1rem; color: #fff; }
.newsletter__button { min-height: 44px; padding: .55rem 1.15rem; border: 0; border-radius: 999px; background: var(--yellow); color: var(--ink); font: inherit; font-weight: 800; }
.newsletter__button:disabled { opacity: 1; cursor: not-allowed; }
.article { max-width: 820px; padding-block: 2.5rem 4rem; }
.article > h1 { margin-bottom: .5rem; }
.article__date { display: block; margin-bottom: 1.5rem; color: var(--muted); }
.article__body { font-size: 1.05rem; }
.article__body > :last-child { margin-bottom: 0; }
.share-links { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem 1rem; margin-block: 1.75rem; padding-block: 1rem; border-block: 1px solid #d5d9d4; }
.share-links > span:first-child { font-weight: 800; }
.share-links button { padding: .45rem .8rem; border: 1px solid var(--teal); border-radius: 999px; background: transparent; color: var(--teal); font: inherit; font-weight: 800; cursor: pointer; }
.share-links__status { flex-basis: 100%; color: var(--muted); font-size: .9rem; }
.placeholder-box { margin-block: 1.5rem; padding: 1.25rem; border: 1px solid #d5d9d4; border-radius: 16px; }
.placeholder-box h2 { margin-bottom: .5rem; }
.placeholder-box p:last-child { margin-bottom: 0; }
.contact-card { margin-bottom: 4rem; }
.contact-card h2 { font-size: 1.5rem; }

.site-footer { margin-top: 2rem; padding: 1.5rem 1rem; border-top: 1px solid #d5d9d4; text-align: center; }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem 1.5rem; }
.site-footer__inner a { font-weight: 800; }
.site-footer__credit { margin: .9rem 0 0; color: var(--muted); font-size: .9rem; }
.back-to-top { position: fixed; z-index: 5; right: 1rem; bottom: 1rem; display: grid; width: 48px; height: 48px; place-items: center; border: 0; border-radius: 50%; background: var(--teal); color: #fff; }
.back-to-top svg { width: 22px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
@supports (animation-timeline: scroll()) {
  .back-to-top { animation: reveal-back-to-top linear both; animation-timeline: scroll(root block); animation-range: 350px 360px; }
  @keyframes reveal-back-to-top {
    from { opacity: 0; pointer-events: none; visibility: hidden; }
    to { opacity: 1; pointer-events: auto; visibility: visible; }
  }
}

@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-header { position: relative; }
  .menu-enhanced .menu-toggle { display: grid; }
  .menu-enhanced .site-nav { display: none; }
  .menu-enhanced .site-header.menu-open .site-nav {
    position: absolute;
    z-index: 10;
    top: calc(100% - 1px);
    right: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .5rem 0;
    border: 1px solid #d5d9d4;
    background: var(--cream);
  }
  .menu-enhanced .site-header.menu-open .site-nav a { padding: .7rem 1rem; }
}
@media (max-width: 760px) {
  .section-heading { align-items: start; flex-direction: column; }
  .series-book-grid { grid-template-columns: 1fr; }
  .series-book-grid .card { min-height: 0; }
}
@media (max-width: 560px) {
  .product-grid { grid-template-columns: 1fr; }
  .product-card { min-height: 0; }
  .cover-placeholder { max-width: 320px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
