:root {
  --primary-color: #355c4d;
  --primary-dark: #274438;
  --secondary-color: #f8f5f0;
  --accent-color: #c89b3c;
  --text-color: #222222;
  --muted-color: #666666;
  --background-color: #ffffff;
  --border-color: rgba(53, 92, 77, 0.16);
  --shadow: 0 18px 40px rgba(34, 34, 34, 0.08);
  --max-width: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--text-color);
  background: linear-gradient(180deg, #fcfaf7 0%, #fff 55%);
  line-height: 1.75;
}
img { display: block; max-width: 100%; }
a { color: var(--primary-color); }
a:hover { color: var(--accent-color); }
a, button { transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, transform 180ms ease; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent-color); outline-offset: 3px; }

.skip-link { position: absolute; left: 1rem; top: -5rem; z-index: 10; padding: .7rem 1rem; background: var(--primary-dark); color: #fff; }
.skip-link:focus { top: 1rem; color: #fff; }
.site-header { max-width: var(--max-width); margin: 0 auto; padding: 1.25rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { color: var(--primary-color); text-decoration: none; font-size: 1.1rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.brand span { font-weight: 400; text-transform: none; letter-spacing: 0; }
.site-nav { display: flex; flex-wrap: wrap; gap: .35rem; }
.site-nav a { padding: .45rem .7rem; border-radius: 999px; color: var(--text-color); text-decoration: none; }
.site-nav a:hover, .site-nav a:focus-visible, .site-nav a[aria-current="page"] { color: var(--primary-color); background: rgba(53, 92, 77, .08); }
.nav-toggle { display: none; padding: .6rem .8rem; border: 1px solid var(--border-color); border-radius: 999px; background: var(--secondary-color); color: var(--primary-color); font: inherit; cursor: pointer; }

.book-main { max-width: var(--max-width); margin: 0 auto; padding: 2.5rem 1rem 4rem; }
.book-hero { display: grid; grid-template-columns: minmax(240px, 390px) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5.5rem); align-items: center; }
.cover-wrap { padding: clamp(1rem, 3vw, 1.6rem); background: #fff; border: 1px solid var(--border-color); border-radius: 1.25rem; box-shadow: var(--shadow); }
.book-cover { width: 100%; height: auto; border-radius: .45rem; box-shadow: 0 12px 24px rgba(34, 34, 34, .14); }
.eyebrow { margin: 0 0 .55rem; color: var(--accent-color); text-transform: uppercase; letter-spacing: .16em; font-size: .8rem; font-weight: 700; }
.book-copy h1 { margin: 0 0 .65rem; color: var(--primary-dark); font-size: clamp(2.35rem, 6vw, 4.6rem); line-height: 1.04; }
.tagline { margin: 0 0 1.35rem; color: var(--muted-color); font-size: clamp(1.15rem, 2vw, 1.45rem); font-style: italic; }
.description { max-width: 65ch; }
.description p { margin: 0 0 1rem; }
.availability { margin: 1.4rem 0 0; padding: 1rem 1.1rem; background: var(--secondary-color); border-left: 4px solid var(--accent-color); border-radius: 0 .65rem .65rem 0; }
.book-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.4rem; }
.button { display: inline-flex; justify-content: center; align-items: center; padding: .8rem 1.05rem; border: 1px solid transparent; border-radius: 999px; text-decoration: none; font-weight: 700; }
.button:hover, .button:focus-visible { transform: translateY(-1px); }
.button-primary { color: #fff; background: var(--primary-color); }
.button-primary:hover, .button-primary:focus-visible { color: #fff; background: var(--primary-dark); }
.button-secondary { color: var(--primary-color); background: #fff; border-color: var(--border-color); }
.story-atmosphere {
  position: relative;
  min-height: clamp(220px, 30vw, 340px);
  margin: 4rem 0 0;
  overflow: hidden;
  border-radius: 1.25rem;
  background: var(--primary-dark);
  box-shadow: var(--shadow);
}
.story-atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(20, 28, 25, .76) 0%, rgba(20, 28, 25, .28) 62%, rgba(20, 28, 25, .12) 100%);
}
.story-atmosphere img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.story-atmosphere figcaption { position: absolute; z-index: 1; left: clamp(1.25rem, 5vw, 3.5rem); bottom: clamp(1.25rem, 4vw, 2.75rem); max-width: 28ch; color: #fff; font-size: clamp(1.35rem, 3vw, 2.15rem); font-style: italic; line-height: 1.3; text-shadow: 0 2px 14px rgba(0, 0, 0, .4); }
.story-atmosphere--subway img { object-position: center 58%; }
.story-atmosphere--cloak img { object-position: center 55%; }
.series-nav { margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--border-color); }
.series-nav h2 { margin: 0 0 1rem; color: var(--primary-dark); font-size: 1.35rem; }
.series-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; }
.series-links a { padding: .85rem 1rem; border: 1px solid var(--border-color); border-radius: .7rem; background: #fff; text-decoration: none; text-align: center; }
.series-links a[aria-current="page"] { color: var(--text-color); background: var(--secondary-color); font-weight: 700; }
.site-footer { padding: 1.5rem 1rem 2rem; color: var(--muted-color); text-align: center; border-top: 1px solid var(--border-color); }

@media (max-width: 768px) {
  .site-header { position: relative; }
  .nav-toggle { display: inline-flex; }
  .site-nav { display: none; position: absolute; z-index: 5; top: 4.6rem; left: 1rem; right: 1rem; padding: .75rem; flex-direction: column; background: #fff; border: 1px solid var(--border-color); border-radius: .85rem; box-shadow: var(--shadow); }
  .site-nav.is-open { display: flex; }
  .book-main { padding-top: 1.25rem; }
  .book-hero { grid-template-columns: 1fr; gap: 2rem; }
  .cover-wrap { width: min(100%, 360px); margin: 0 auto; }
  .story-atmosphere { margin-top: 3rem; }
  .story-atmosphere::after { background: linear-gradient(0deg, rgba(20, 28, 25, .78), rgba(20, 28, 25, .15) 78%); }
  .series-links { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .brand span { display: none; }
  .book-actions { flex-direction: column; }
  .series-links { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
