:root {
  color-scheme: light;
  --ink: #251834;
  --paper: #fff9eb;
  --purple: #573487;
  --lilac: #e9dbff;
  --line: #2b1c3d;
  font-family: "DM Sans", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background: var(--paper);
  scroll-behavior: smooth;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a:focus-visible, button:focus-visible { outline: 3px solid #7335c1; outline-offset: 4px; }
.wrap { width: min(100% - 80px, 1220px); margin-inline: auto; }
.skip { position: fixed; top: 8px; left: 8px; transform: translateY(-150%); z-index: 5; background: white; padding: 10px; }
.skip:focus { transform: translateY(0); }
.site-header { border-bottom: 2px solid var(--line); }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.header-inner { min-height: 78px; }
.brand { display: inline-flex; gap: 10px; align-items: center; text-decoration: none; font: 900 1.25rem/1 Georgia, serif; }
.brand small { display: block; font: 800 .66rem/1.35 "DM Sans", sans-serif; text-transform: uppercase; letter-spacing: .12em; }
nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 36px); }
nav a, footer a { font-weight: 800; text-decoration: none; }
nav a:hover, footer a:hover { text-decoration: underline; text-underline-offset: .26em; }
.hero { background: var(--lilac); border-bottom: 2px solid var(--line); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1fr 1.02fr; align-items: center; gap: clamp(34px, 5.5vw, 84px); padding-block: clamp(48px, 6.8vw, 90px); }
.eyebrow { display: flex; align-items: center; gap: 10px; font-size: .76rem; letter-spacing: .115em; text-transform: uppercase; font-weight: 900; }
.eyebrow span { color: var(--purple); font-size: 1.2rem; }
h1, h2, h3 { font-family: "Gloock", Georgia, serif; font-weight: 700; }
h1 { font-size: clamp(3.6rem, 7.2vw, 7.4rem); letter-spacing: -.075em; line-height: .92; margin: 18px 0 22px; }
h1 em { color: var(--purple); }
.intro { font-size: clamp(1rem, 1.55vw, 1.26rem); line-height: 1.55; max-width: 33ch; }
.button { display: inline-flex; align-items: center; gap: 24px; margin-top: 25px; padding: 13px 19px; border: 2px solid var(--line); border-radius: 7px; background: #ffd65b; box-shadow: 4px 4px var(--line); font-weight: 900; text-decoration: none; }
.button:hover { background: #ffe494; transform: translate(-1px, -1px); box-shadow: 5px 5px var(--line); }
.hero-art { border: 2px solid var(--line); border-radius: 20px; background: #87b944; transform: rotate(2deg); overflow: hidden; box-shadow: 9px 10px var(--line); }
.hero-art img { width: 100%; aspect-ratio: 1.37; height: auto; object-fit: cover; }
.catalogue { padding-block: clamp(48px, 7vw, 88px); scroll-margin-top: 18px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 30px; }
h2 { font-size: clamp(2.5rem, 5.2vw, 4.65rem); line-height: 1; letter-spacing: -.055em; }
.section-head h2 span { color: var(--purple); }
.section-head p { line-height: 1.55; font-weight: 700; }
.section-head p span { font-weight: 400; }
.book-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 30px); }
.book { display: flex; flex-direction: column; border: 2px solid var(--line); background: #fffcf5; border-radius: 14px; overflow: hidden; box-shadow: 3px 4px var(--line); }
.poo { --card: #dcecb2; }
.grub { --card: #ffe3a0; }
.space { --card: #ddd0fd; }
.body-parts { --card: #bfe8f0; }
.cover { display: grid; place-items: center; padding: clamp(16px, 2.3vw, 29px); background: var(--card); border-bottom: 2px solid var(--line); }
.cover:focus-visible { outline-offset: -6px; }
.cover img { width: min(100%, 230px); height: auto; border-radius: 2px 4px 4px 2px; box-shadow: 4px 6px 0 #25183440; transition: transform .18s ease; }
.cover:hover img { transform: translateY(-4px) rotate(-2deg); }
.book-copy { padding: 17px 16px 20px; display: flex; flex: 1; flex-direction: column; align-items: start; }
.category { font-size: .69rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; color: var(--purple); margin-bottom: 9px; }
h3 { font-size: clamp(1.65rem, 2.7vw, 2.4rem); line-height: 1.04; letter-spacing: -.045em; margin-bottom: 12px; }
h3 span { display: block; font: 800 .76rem/1.4 "DM Sans", sans-serif; letter-spacing: .025em; }
.book-copy > p:not(.category) { font-size: .95rem; line-height: 1.55; }
.book-actions { display: grid; gap: 12px; padding-top: 18px; margin-top: auto; }
.sample, .buy { font-size: .91rem; font-weight: 900; text-underline-offset: .22em; }
.sample:hover { color: var(--purple); }
.sample span, .buy span { display: inline-block; margin-left: 3px; }
.buy { background: #ffd65b; border: 2px solid var(--line); border-radius: 6px; text-decoration: none; padding: 8px 10px; }
.buy:hover { background: #ffe494; }
.about { background: #dcecb2; border-block: 2px solid var(--line); padding-block: clamp(38px, 6vw, 70px); }
.about-inner { display: grid; grid-template-columns: auto minmax(0, 680px); gap: clamp(20px, 5vw, 65px); align-items: center; justify-content: center; }
.about-mark { display: grid; place-items: center; width: clamp(68px, 13vw, 145px); aspect-ratio: 1; border-radius: 50%; border: 2px solid var(--line); background: #fff9eb; box-shadow: 4px 5px var(--line); transform: rotate(-10deg); }
.about-mark img { width: 66%; height: auto; }
.about p { margin-top: 16px; font-size: 1.12rem; line-height: 1.65; max-width: 61ch; }
.footer-inner { min-height: 80px; font-size: .9rem; }
.footer-inner span { font-weight: 900; }
dialog { width: min(760px, calc(100% - 24px)); max-height: calc(100% - 24px); padding: 0; border: 2px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--paper); }
dialog::backdrop { background: #241735c9; }
body:has(dialog[open]) { overflow: hidden; }
.preview-bar { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 18px; border-bottom: 2px solid var(--line); background: var(--lilac); }
.preview-bar h2 { font: 900 clamp(1rem, 3vw, 1.3rem)/1.2 "DM Sans", sans-serif; letter-spacing: 0; }
.preview-bar button { white-space: nowrap; cursor: pointer; border: 2px solid var(--line); border-radius: 6px; background: var(--paper); color: inherit; padding: 7px 10px; font: inherit; font-weight: 800; }
.preview-content { padding: 14px; }
.preview-original { display: inline-block; margin-bottom: 12px; font-weight: 800; text-underline-offset: .2em; }
.preview-image { width: 100%; height: auto; }
@media (max-width: 900px) {
  .wrap { width: calc(100% - 50px); }
  .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  .wrap { width: calc(100% - 32px); }
  .header-inner { min-height: 68px; gap: 12px; }
  .brand { font-size: 1.05rem; gap: 6px; }
  .brand img { width: 30px; height: 30px; }
  .brand small { font-size: .58rem; }
  nav { font-size: .78rem; gap: 12px; }
  .hero-grid { grid-template-columns: 1fr; padding-block: 38px 45px; gap: 35px; }
  h1 { font-size: clamp(3.25rem, 12vw, 5.4rem); }
  .hero-art { margin: 0 7px 0 2px; }
  .section-head { align-items: start; flex-direction: column; }
  .book-copy { padding: 13px 11px 16px; }
  .cover { padding: 12px; }
  .about-inner { grid-template-columns: 1fr; }
  .about p { font-size: 1rem; }
}
@media (max-width: 355px) {
  .header-inner { align-items: start; flex-direction: column; justify-content: center; padding-block: 10px; }
  .book-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
