/* Slate Point Press: classic small press.
   Paper-white page, slate-ink line art, Libre Caslon, one pine-green accent.
   The book covers (and the hero coloring page) bring the color. */

@font-face { font-family: "Caslon Display"; src: url("fonts/libre-caslon-display-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Caslon"; src: url("fonts/libre-caslon-text-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Caslon"; src: url("fonts/libre-caslon-text-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Caslon"; src: url("fonts/libre-caslon-text-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --paper: #FBFBF9;    /* page */
  --sheet: #FFFFFF;    /* coloring page and covers */
  --ink: #24313F;      /* slate ink: text and line art */
  --graphite: #5A6472; /* secondary text */
  --rule: #D9DDE2;     /* hairlines */
  --pine: #2E6B50;     /* the one accent: buttons, links, focus */
  --display: "Caslon Display", "Libre Caslon Display", Georgia, serif;
  --text: "Caslon", "Libre Caslon Text", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.7 var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
h1, h2, h3, p { margin: 0; }
a { color: var(--pine); text-underline-offset: 0.18em; }
:focus-visible { outline: 2px solid var(--pine); outline-offset: 3px; border-radius: 2px; }
[hidden] { display: none !important; }

.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--sheet); padding: .5rem .75rem; z-index: 10; }

/* Masthead */
.masthead { display: flex; align-items: center; justify-content: space-between; padding-block: 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--ink); text-decoration: none; font-size: 1.125rem; letter-spacing: .01em; }
.masthead nav a { color: var(--ink); text-decoration: none; padding: .25rem 0; border-bottom: 1px solid transparent; }
.masthead nav a:hover { border-bottom-color: currentColor; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding-block: clamp(2rem, 6vw, 5rem) clamp(3rem, 8vw, 7rem);
}
.hero h1 {
  font: 400 clamp(3.25rem, 7.4vw, 6.25rem)/0.94 var(--display);
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.lede { margin-top: 1.5rem; max-width: 30ch; font-size: 1.25rem; line-height: 1.55; color: var(--graphite); }
.hero .btn { margin-top: 2rem; }
.soon-note { margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); max-width: 34ch; font-style: italic; color: var(--ink); }

.btn {
  display: inline-block;
  background: var(--pine);
  color: #fff;
  text-decoration: none;
  font: 400 1rem/1 var(--text);
  padding: .95rem 1.4rem .85rem;
  border-radius: 2px;
}
.btn:hover { background: #245841; }
.btn-small { font-size: .9375rem; padding: .75rem 1.1rem .68rem; }

/* Coloring page: a single sheet laid on the page */
.coloring { margin: 0; }
.coloring svg {
  display: block;
  width: 100%;
  height: auto;
  background: var(--sheet);
  border: 1px solid var(--rule);
  box-shadow: 0 1px 0 var(--rule), 0 18px 40px -28px rgba(36, 49, 63, .45);
}
.shape { fill: #FFFFFF; stroke: var(--ink); stroke-width: 1.8; stroke-linejoin: round; cursor: pointer; transition: fill .35s ease; }
.shape:focus { outline: none; }
.shape:focus-visible { stroke: var(--pine); stroke-width: 3.5; }
.linework path { fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; }

.coloring figcaption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; margin-top: 1rem; }
.crayons { display: flex; gap: .5rem; }
.crayon {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--c);
  border: 1.5px solid var(--ink);
  padding: 0; cursor: pointer;
  transition: transform .15s ease;
}
.crayon[aria-checked="true"] { transform: translateY(-4px); box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--ink); }
.hint { font-style: italic; color: var(--graphite); }
.text-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--pine); text-decoration: underline; text-underline-offset: .18em; cursor: pointer; }

/* Books */
.books { border-top: 1px solid var(--rule); padding-block: clamp(3rem, 6vw, 5rem) clamp(4rem, 9vw, 8rem); }
.books h2 { font: 400 clamp(2.25rem, 4.5vw, 3.25rem)/1.05 var(--display); letter-spacing: -0.01em; margin-bottom: clamp(2rem, 4vw, 3rem); }
.shelf { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 3rem 2.5rem; }
.book h3 { font: 400 1.5rem/1.2 var(--display); margin-top: 1.25rem; }
.book p { margin-top: .4rem; color: var(--graphite); max-width: 36ch; }
.book .btn, .soon { margin-top: 1rem; }
.soon { display: inline-block; font-style: italic; color: var(--graphite); }

.cover { display: block; width: 100%; aspect-ratio: 8.5 / 11; object-fit: cover; border: 1px solid var(--rule); background: var(--sheet); box-shadow: 0 14px 30px -24px rgba(36, 49, 63, .5); }
.cover-stand-in {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.25rem;
  outline: 1px solid var(--ink); outline-offset: -14px;
  color: var(--ink); padding: 2rem; text-align: center;
}
.cover-stand-in span { font: 400 1.75rem/1.15 var(--display); }

/* Footer */
.footer { border-top: 1px solid var(--rule); padding-block: 2rem 3rem; color: var(--graphite); font-size: .9375rem; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; }
  .lede { max-width: 34ch; }
}
@media (max-width: 560px) {
  .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.25rem 1.25rem; }
  .cover-stand-in { outline-offset: -8px; padding: 1rem; gap: .75rem; }
  .cover-stand-in span { font-size: 1.25rem; }
  .book h3 { font-size: 1.25rem; }
  .book p, .soon { font-size: .9375rem; }
}
@media (max-width: 420px) {
  .crayon { width: 28px; height: 28px; }
  .crayons { gap: .4rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .shape, .crayon { transition: none; }
}
