@font-face {
  font-family: "Noto Serif Local";
  src: url("assets/noto-serif-regular.woff") format("woff");
  font-display: swap;
}
@font-face {
  font-family: "Noto Serif Local";
  src: url("assets/noto-serif-italic.woff") format("woff");
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #fbf8f2;
  --ink: #332531;
  --muted: #62525b;
  --wine: #603548;
  --wine-dark: #4b2538;
  --stroke: #e9ded7;
  --serif: "Noto Serif Local", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.65 var(--sans); }
body:has(dialog[open]) { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3 { margin: 0; }
button { font: inherit; }
:focus-visible { outline: 3px solid #965969; outline-offset: 4px; }
.container { width: min(100% - 96px, 1160px); margin-inline: auto; }
.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 2; padding: 8px 14px;
  background: var(--wine-dark); color: white; transform: translateY(-180%);
}
.skip-link:focus { transform: translateY(0); }

.header { border-bottom: 1px solid var(--stroke); }
.header-inner, .footer-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.wordmark span { font: 1.55rem/1 var(--serif); letter-spacing: -.065em; }
nav { display: flex; gap: clamp(16px, 4vw, 42px); align-items: center; }
nav a, .back-link { font-size: .88rem; font-weight: 650; white-space: nowrap; }
nav a, .back-link { display: inline-flex; gap: 6px; align-items: center; min-height: 44px; }
nav a:hover, .back-link:hover { color: var(--wine); text-decoration: underline; text-underline-offset: 5px; }

.hero {
  display: grid; grid-template-columns: .94fr 1.06fr; gap: 54px; align-items: center;
  padding-block: clamp(44px, 6.5vw, 93px);
}
.hero-copy { padding-bottom: 5px; }
.eyebrow {
  display: flex; align-items: center; gap: 9px; color: var(--wine);
  font-size: .73rem; line-height: 1.35; text-transform: uppercase; letter-spacing: .16em; font-weight: 750;
}
.eyebrow span { width: 16px; height: 1px; flex: none; background: currentColor; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; }
h1 { margin-top: 16px; font-size: clamp(3.15rem, 5.5vw, 5.4rem); line-height: 1.02; letter-spacing: -.077em; }
h1 em { color: var(--wine); }
.hero-summary { margin-block: 23px 27px; max-width: 36ch; color: var(--muted); font-size: clamp(.98rem, 1.5vw, 1.115rem); }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 11px; min-height: 47px;
  padding: 9px 18px; border-radius: 9px; border: 1px solid transparent;
  font-size: .9rem; line-height: 1.35; font-weight: 680; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.button svg, .dialog-close svg, .back-link svg {
  width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.button-primary { background: var(--wine); color: #fffaf6; }
.button-primary:hover { background: var(--wine-dark); }
.hero-art {
  position: relative; isolation: isolate; overflow: hidden;
  aspect-ratio: 1.24; border: 1px solid #e9d9d8; border-radius: 24px;
  background: radial-gradient(ellipse at 73% 38%, #f9e9e6, transparent 62%),
    linear-gradient(128deg, #f1e4e0, #efdbdf);
}
.trail { position: absolute; inset: 0; width: 100%; height: 100%; color: #996f7d; fill: currentColor; }
.trail path { fill: none; stroke: currentColor; stroke-linecap: round; }
.trail-dash { stroke-width: 1.25; stroke-dasharray: 3 7; opacity: .56; }
.trail .spark { stroke-width: 1.3; }
.trail .faint, .trail circle { opacity: .58; }
.hero-book {
  position: absolute; width: 50%; border-radius: 3px 9px 9px 3px;
  box-shadow: 0 13px 25px #48283a36, 0 2px 5px #48283a40;
}
.hero-dino { left: 13%; top: 15%; transform: rotate(-12deg); }
.hero-cozy { left: 41%; top: 30%; transform: rotate(10deg); }

.collection { border-block: 1px solid var(--stroke); background: #fffdf9; padding-block: 58px 69px; }
.section-heading { margin-bottom: 28px; }
h2 { margin-top: 10px; font-size: clamp(1.95rem, 3.5vw, 3rem); line-height: 1.16; letter-spacing: -.055em; }
.book-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.book-card {
  min-width: 0; display: flex; flex-direction: column; overflow: hidden;
  background: #fffdfa; border: 1px solid var(--stroke); border-radius: 18px;
}
.cover-stage { display: grid; place-items: center; padding: 25px 16px; }
.cover-stage-dino { background: radial-gradient(ellipse at 45% 30%, #eff3dd, #e7eedf); }
.cover-stage-cozy { background: radial-gradient(ellipse at 45% 30%, #fff2e5, #f4e3e7); }
.cover { width: min(64%, 246px); border-radius: 4px 8px 8px 4px; box-shadow: 0 9px 19px #42343d31, 0 2px 4px #42343d3d; }
.book-copy { padding: 24px 25px 25px; display: flex; flex: 1; flex-direction: column; align-items: flex-start; }
.book-category { font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 750; color: var(--wine); }
.book-copy h3 { margin-top: 4px; font-size: clamp(1.5rem, 2.6vw, 2.12rem); letter-spacing: -.048em; line-height: 1.22; }
.book-copy h3 + p { margin-block: 9px 20px; color: var(--muted); max-width: 48ch; }
.book-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px 16px; margin-top: auto; }
.button-outline { background: transparent; color: var(--wine-dark); border-color: #d9c7cd; }
.button-outline:hover { background: #f6edef; border-color: #af8796; }
.availability { font-size: .82rem; color: var(--muted); }

.author { padding-block: 59px; }
.author-panel {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 28px;
  border-radius: 19px; background: #f2e6e7; padding: 36px clamp(24px, 5vw, 58px);
}
.author-copy { position: relative; z-index: 1; }
.author-copy > p:not(.eyebrow) { max-width: 51ch; margin-block: 12px 18px; color: var(--muted); }
.author-art { width: clamp(140px, 22vw, 245px); flex: none; color: #82546a; }
.footer { border-top: 1px solid var(--stroke); }
.footer-inner { min-height: 70px; }
.footer .wordmark span { font-size: 1.27rem; }
.back-link { color: var(--wine); }

.cover-dialog {
  margin: auto; width: min(calc(100% - 28px), 640px, calc(100dvh - 95px)); max-height: calc(100dvh - 24px);
  padding: 0; border: 1px solid var(--stroke); border-radius: 14px; background: var(--paper); color: var(--ink);
  box-shadow: 0 20px 55px #1f111b59;
}
.cover-dialog::backdrop { background: #211420bc; }
.dialog-bar { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 7px 9px 7px 15px; }
.dialog-bar h2 { margin: 0; font-size: clamp(1.08rem, 3vw, 1.55rem); }
.dialog-close {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 1px solid #e7d6d9; border-radius: 8px; background: #f7edef; color: var(--wine-dark); cursor: pointer;
}
.dialog-close:hover { background: #ecdbdf; }
.dialog-cover { width: 100%; aspect-ratio: 1; }

@media (max-width: 900px) {
  .container { width: min(100% - 64px, 1160px); }
  .hero { gap: 32px; }
}
@media (max-width: 700px) {
  .container { width: calc(100% - 40px); }
  .header-inner { min-height: 64px; }
  .hero { grid-template-columns: 1fr; padding-block: 38px; gap: 26px; }
  h1 { font-size: clamp(2.95rem, 10.8vw, 4.5rem); margin-top: 12px; }
  .hero-summary { margin-block: 16px 20px; }
  .hero-art { width: min(100%, 525px); justify-self: center; }
  .collection { padding-block: 40px 45px; }
  .section-heading { margin-bottom: 21px; }
  .book-grid { grid-template-columns: 1fr; gap: 17px; }
  .cover-stage { padding-block: 22px; }
  .book-copy { padding: 20px 19px 21px; }
  .author { padding-block: 38px; }
  .author-panel { padding: 29px 24px; }
  .author-art { display: none; }
}
@media (max-width: 355px) {
  .container { width: calc(100% - 32px); }
  .header-inner { gap: 8px; }
  .wordmark { gap: 6px; }
  .header .wordmark img { width: 30px; }
  .header .wordmark span { font-size: 1.33rem; }
  nav { gap: 10px; }
  nav a { font-size: .79rem; }
  .book-actions { gap: 9px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
}
