/* anniejrose.com: one stylesheet for every page. Colours live in :root. */

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('/fonts/cormorant-garamond.woff2') format('woff2');
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('/fonts/cormorant-garamond-italic.woff2') format('woff2');
  font-weight: 500 600;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Jost';
  src: url('/fonts/jost.woff2') format('woff2');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #fbf6f2;
  --surface: #ffffff;
  --surface-2: #f6ece7;
  --surface-3: #ecdcd4;
  --line: rgba(90, 30, 55, 0.13);
  --line-strong: rgba(170, 45, 90, 0.38);
  --text: #241418;
  --muted: #5b4750;
  --faint: #806b75;
  --accent: #c8325f;
  --accent-hover: #a8264f;
  --on-accent: #ffffff;
  --accent-text: #c02b59;
  --accent-shadow: 0 8px 20px -10px rgba(200, 50, 95, 0.7);
  --soft: #8f2a52;
  --gold-text: #8a5a14;
  --seal: #e9bd78;
  --seal-ink: #1d1016;
  --leaf: #5f8f6a;
  --header-bg: rgba(251, 246, 242, 0.9);
  --footer-bg: #f3e8e2;
  --glow-strong: rgba(232, 92, 135, 0.22);
  --glow-soft: rgba(232, 92, 135, 0.1);
  --glow-faint: rgba(232, 92, 135, 0.1);
  --hover-tint: rgba(90, 30, 55, 0.04);
  --shadow-color: rgba(70, 20, 40, 0.25);
  --shadow-cover: 0 14px 30px -12px rgba(70, 20, 40, 0.38), 0 3px 8px rgba(70, 20, 40, 0.14);
  --shadow-lg: 0 26px 50px -20px rgba(70, 20, 40, 0.5), 0 8px 18px rgba(70, 20, 40, 0.16);
  --grain-opacity: 0.035;
  --backdrop-opacity: 0.2;
  --backdrop-top: rgba(251, 246, 242, 0.4);
  --radius: 14px;
  --display: 'Cormorant Garamond', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --body: 'Jost', 'Avenir Next', 'Century Gothic', 'Segoe UI', sans-serif;
  --wrap: 1180px;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Fine film grain over everything, for warmth. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  text-wrap: balance;
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.08;
  margin: 0;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
}

em {
  font-style: italic;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

.narrow {
  max-width: 760px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.js-only {
  display: none !important;
}
.js .js-only {
  display: flex !important;
}
.js .result-count.js-only,
.js .store-pick.js-only {
  display: block !important;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  background: var(--text);
  color: var(--bg);
  padding: 8px 14px;
  border-radius: 8px;
}
.skip-link:focus {
  top: 12px;
}

:focus-visible {
  outline: 2px solid var(--soft);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 24px;
  min-height: 64px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--display);
  font-size: 27px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.logo em {
  color: var(--accent-text);
}

.rose-mark {
  width: 30px;
  height: 30px;
  color: var(--accent-text);
  flex: none;
}

.main-nav {
  display: flex;
  gap: 4px;
  order: 3;
  width: 100%;
  margin: 0 -10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.main-nav::-webkit-scrollbar {
  display: none;
}
.main-nav a {
  padding: 6px 10px;
  text-decoration: none;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--muted);
  border-radius: 999px;
  white-space: nowrap;
}
.main-nav a:hover,
.main-nav a[aria-current='page'] {
  color: var(--text);
  background: var(--surface-2);
}

.header-cta {
  margin-left: auto;
}

@media (min-width: 760px) {
  .main-nav {
    order: 0;
    width: auto;
    margin: 0 0 0 auto;
  }
  .header-cta {
    margin-left: 4px;
  }
}

/* ---------- Buttons, chips, links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--body);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, transform 0.15s, border-color 0.15s;
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--accent-shadow);
}
.btn-primary:hover {
  background: var(--accent-hover);
}
.btn-ghost {
  border-color: var(--line-strong);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: var(--text);
  background: var(--hover-tint);
}
.btn-small {
  min-height: 40px;
  padding: 0 18px;
  font-size: 15px;
}
.btn-block {
  width: 100%;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}
.actions-small {
  margin-top: 14px;
  gap: 10px;
}

.text-link {
  color: var(--soft);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}
.text-link:hover {
  color: var(--text);
  border-color: var(--text);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font: 500 15px/1 var(--body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}
.chip:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}
.chip[aria-pressed='true'] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.chip-count {
  font-size: 13px;
  color: var(--gold-text);
}
.chip-row-small {
  gap: 8px;
  margin: 18px 0 4px;
}
.chip-small {
  min-height: 32px;
  padding: 0 12px;
  font-size: 14px;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-text);
}

.tagline {
  margin: 10px 0 0;
  font-family: var(--display);
  font-style: italic;
  font-size: 22px;
  line-height: 1.3;
  color: var(--soft);
}

/* ---------- Covers ---------- */

.cover {
  width: 100%;
  height: auto;
  border-radius: 4px;
  background: var(--surface-2);
  box-shadow: var(--shadow-cover);
}

/* A cover with a little spine and page edge, so it reads as a real book. */
.book3d {
  position: relative;
  display: block;
  border-radius: 3px 6px 6px 3px;
}
.book3d .cover {
  border-radius: 3px 6px 6px 3px;
  box-shadow: var(--shadow-lg);
}
.book3d::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 3px 6px 6px 3px;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.45) 0, rgba(255, 255, 255, 0.18) 1.6%, rgba(0, 0, 0, 0.12) 3.4%, rgba(255, 255, 255, 0.05) 6%, transparent 9%), linear-gradient(180deg, rgba(255, 255, 255, 0.07), transparent 30%);
}

/* ---------- Sections ---------- */

.section {
  padding: 48px 0;
}
.section-tight {
  padding: 28px 0 40px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.section-title {
  font-size: 40px;
  margin-bottom: 14px;
}
.section-title a {
  text-decoration: none;
}
.section-title a:hover {
  color: var(--soft);
}
.section-head .section-title {
  margin-bottom: 0;
}

.sub-title {
  font-size: 30px;
  margin: 36px 0 16px;
}

.page-head {
  padding: 40px 0 4px;
  background: radial-gradient(ellipse 70% 120% at 15% 0%, var(--glow-faint), transparent 60%);
}
.page-title {
  font-size: 54px;
  margin-bottom: 16px;
}
.page-lede {
  max-width: 680px;
  font-size: 19px;
  color: var(--muted);
}
.page-head .chip-row {
  margin-top: 24px;
}

.crumbs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 14px;
  color: var(--faint);
}
.crumbs a {
  color: var(--muted);
  text-decoration: none;
}
.crumbs a:hover {
  color: var(--text);
}

/* ---------- Home: hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 28px 0 40px;
}
.hero-glow {
  position: absolute;
  inset: -20% -10% auto auto;
  width: 900px;
  height: 900px;
  max-width: 140vw;
  background: radial-gradient(circle at 60% 40%, var(--glow-strong), var(--glow-soft) 40%, transparent 68%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  gap: 36px;
  align-items: center;
}
.hero-title {
  font-size: clamp(50px, 15vw, 72px);
  white-space: nowrap;
  line-height: 0.95;
  font-weight: 600;
  margin-bottom: 20px;
}
.hero-title em {
  color: var(--accent-text);
}
.hero-lede {
  font-size: 20px;
  color: var(--muted);
  max-width: 560px;
  text-wrap: balance;
}
.hero-wink {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--display);
  font-style: italic;
  font-size: 25px;
  color: var(--soft);
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin: 26px 0 0;
  padding: 18px 0 0;
  list-style: none;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
}
.stats strong {
  display: block;
  font-family: var(--display);
  font-size: 34px;
  line-height: 1.1;
  color: var(--text);
}

.fan-stage {
  position: relative;
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
}
.fan {
  position: relative;
  height: 0;
  padding-bottom: 76%;
}
.fan-card {
  --spread: 1;
  position: absolute;
  left: 32%;
  top: 4%;
  width: 36%;
  z-index: calc(10 - var(--i) * var(--i));
  transform-origin: 50% 120%;
  transform: translateX(calc(var(--i) * 40% * var(--spread))) rotate(calc(var(--i) * 6deg * var(--spread))) translateY(calc(var(--i) * var(--i) * 3%));
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@media (hover: hover) {
  .fan:hover .fan-card {
    --spread: 1.15;
  }
}
.fan-card:hover {
  z-index: 20;
}
.fan-card .cover {
  box-shadow: var(--shadow-lg);
}
.fan-card:hover .cover {
  outline: 2px solid var(--soft);
  outline-offset: 2px;
}

.hea-seal {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 108px;
  height: 108px;
  z-index: 30;
  transform: rotate(-14deg);
  filter: drop-shadow(0 10px 20px var(--shadow-color));
}
.seal-bg {
  fill: var(--seal);
}
.seal-inner {
  fill: none;
  stroke: var(--seal-ink);
  stroke-width: 1.5;
  stroke-dasharray: 2 3;
}
.seal-text {
  font: 600 11.2px var(--body);
  letter-spacing: 0.16em;
  fill: var(--seal-ink);
}
.seal-hea {
  font: 700 26px var(--display);
  fill: var(--seal-ink);
}

@media (max-width: 599px) {
  .fan-card {
    left: 33%;
    width: 34%;
    transform: translateX(calc(var(--i) * 36%)) rotate(calc(var(--i) * 6deg)) translateY(calc(var(--i) * var(--i) * 3%));
  }
  .fan {
    padding-bottom: 66%;
  }
  .hea-seal {
    width: 88px;
    height: 88px;
  }
}

@media (min-width: 900px) {
  .hero {
    padding: 56px 0 64px;
  }
  .hero-grid {
    grid-template-columns: 1.05fr 1fr;
    gap: 48px;
  }
  .hero-title {
    font-size: 104px;
  }
  .hea-seal {
    width: 124px;
    height: 124px;
    left: -10px;
  }
}

/* ---------- Home: newest release ---------- */

.new-release {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
  border-top: 1px solid var(--line);
}
.release-grid {
  display: grid;
  gap: 36px;
  align-items: center;
}
.release-cover {
  display: block;
  width: 62%;
  max-width: 320px;
  margin: 0 auto;
}
.teaser {
  margin: 22px 0 0;
  padding: 2px 0 2px 20px;
  border-left: 2px solid var(--accent-text);
  font-family: var(--display);
  font-size: 23px;
  line-height: 1.45;
  color: var(--text);
}
.release-meta {
  margin: 18px 0 0;
  color: var(--faint);
  font-size: 15px;
}
@media (min-width: 900px) {
  .release-grid {
    grid-template-columns: 320px 1fr;
    gap: 72px;
  }
  .release-cover {
    width: 100%;
  }
}

.section.tropes-section {
  padding-top: 0;
  padding-bottom: 8px;
}
.section.new-release {
  padding-bottom: 56px;
}
.grid-note {
  margin: 22px 0 0;
  color: var(--muted);
}

/* ---------- Series cards ---------- */

.series-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.series-card a {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 22px 22px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--surface-2), var(--surface) 70%);
  text-decoration: none;
  transition: border-color 0.15s, transform 0.2s;
}
.series-card a:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
}
.series-stack {
  position: relative;
  display: block;
  height: 150px;
  margin-bottom: 18px;
}
.series-stack .cover {
  position: absolute;
  top: 0;
  width: 92px;
  border-radius: 3px;
}
.series-stack .cover:nth-child(1) {
  left: 0;
  z-index: 3;
}
.series-stack .cover:nth-child(2) {
  left: 62px;
  top: 8px;
  z-index: 2;
  transform: rotate(4deg);
}
.series-stack .cover:nth-child(3) {
  left: 124px;
  top: 16px;
  z-index: 1;
  transform: rotate(8deg);
}
.series-card a:hover .series-stack .cover:nth-child(2) {
  transform: rotate(6deg) translateX(6px);
}
.series-card a:hover .series-stack .cover:nth-child(3) {
  transform: rotate(11deg) translateX(14px);
}
.series-stack .cover {
  transition: transform 0.25s;
}
.series-name {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.1;
}
.series-pitch {
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  flex: 1;
}
.series-count {
  margin-top: 14px;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-text);
}

@media (max-width: 639px) {
  .series-card a {
    display: grid;
    grid-template-columns: 112px 1fr;
    grid-template-rows: auto auto 1fr auto;
    column-gap: 18px;
    padding: 16px;
  }
  .series-stack {
    grid-row: 1 / 5;
    height: 128px;
    margin: 0;
  }
  .series-stack .cover {
    width: 76px;
  }
  .series-stack .cover:nth-child(2) {
    left: 18px;
  }
  .series-stack .cover:nth-child(3) {
    left: 36px;
  }
  .series-name {
    font-size: 24px;
  }
  .series-pitch {
    font-size: 14px;
    margin-top: 4px;
  }
  .series-count {
    margin-top: 8px;
    font-size: 12px;
  }
}

/* ---------- Free book band ---------- */

.freebook {
  position: relative;
  overflow: hidden;
  padding: 48px 0;
  background: radial-gradient(ellipse 60% 140% at 85% 50%, var(--glow-strong), transparent 70%), var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.freebook-grid {
  display: grid;
  gap: 32px;
  align-items: center;
}
.freebook-cover {
  width: 160px;
  transform: rotate(-4deg);
}
.freebook .section-title em {
  color: var(--soft);
}
@media (min-width: 760px) {
  .freebook-grid {
    grid-template-columns: 200px 1fr;
    gap: 56px;
  }
  .freebook-cover {
    width: 200px;
  }
}

/* ---------- About ---------- */

.about-grid {
  display: grid;
  gap: 28px;
  align-items: center;
}
.author-photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--surface-3);
  box-shadow: 0 0 0 8px var(--glow-soft), var(--shadow-cover);
}
.author-photo-large {
  width: 220px;
  height: 220px;
}
.about-grid p {
  color: var(--muted);
  max-width: 640px;
}
@media (min-width: 760px) {
  .about-grid {
    grid-template-columns: auto 1fr;
    gap: 56px;
  }
  .author-photo-large {
    width: 260px;
    height: 260px;
  }
}
.about-head {
  padding-bottom: 40px;
}

.contact-grid {
  display: grid;
  gap: 18px;
}
@media (min-width: 760px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.contact-card {
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}
.contact-card .section-title {
  font-size: 32px;
}
.social-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.social-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--muted);
  background: var(--surface-2);
}
.social-list a:hover {
  color: var(--text);
  background: var(--surface-3);
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
}

/* ---------- Book grid (books page, related books) ---------- */

.book-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 640px) {
  .book-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 900px) {
  .book-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 36px 28px;
  }
}
@media (min-width: 1100px) {
  .book-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
.book-grid-small {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px 14px;
}
@media (min-width: 640px) {
  .book-grid-small {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (min-width: 900px) {
  .book-grid-small {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}
@media (min-width: 1100px) {
  .book-grid-small {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
}

.card a {
  display: block;
  text-decoration: none;
}
.card .cover {
  transition: transform 0.2s, box-shadow 0.2s;
}
.card a:hover .cover {
  transform: translateY(-5px) rotate(-1deg);
  box-shadow: var(--shadow-lg), 0 0 0 2px var(--line-strong);
}
.card-title {
  display: block;
  margin-top: 14px;
  font-family: var(--display);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.15;
}
.book-grid-small .card-title {
  font-size: 16px;
  margin-top: 10px;
}
.card-meta {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  color: var(--faint);
}

/* ---------- Books page filters ---------- */

.filters {
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}
.field input,
.field select {
  min-height: 46px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font: 16px var(--body);
}
.field select {
  padding-right: 36px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238a7680' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.field input::placeholder {
  color: var(--faint);
}
.field-search {
  flex: 1 1 260px;
}
.field-search input {
  width: 100%;
}
.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  color: var(--muted);
  cursor: pointer;
}
.toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-text);
}
.result-count {
  margin: 20px 0 22px;
  color: var(--faint);
  font-size: 15px;
}
.empty {
  padding: 40px 0;
  color: var(--muted);
}
.card[hidden] {
  display: none;
}

/* ---------- Book page ---------- */

.book {
  position: relative;
  padding: 28px 0 36px;
}
/* The blurred cover glow is clipped in its own box: overflow on .book would break the sticky cover. */
.book-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.book-backdrop {
  position: absolute;
  inset: -40px;
  background-size: cover;
  background-position: center;
  filter: blur(60px) saturate(1.3);
  opacity: var(--backdrop-opacity);
  transform: scale(1.2);
}
.book-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--backdrop-top), var(--bg) 92%);
}
.book-grid-layout {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 36px;
}
.book-cover-col {
  width: 60%;
  max-width: 340px;
  margin: 0 auto;
}
.buy-box {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}
.book-title {
  font-size: 50px;
}
.blurb {
  margin-top: 26px;
  font-size: 18px;
  line-height: 1.7;
  max-width: 640px;
}
.blurb p {
  margin: 0 0 0.9em;
}
.blurb p:first-child {
  font-family: var(--display);
  font-size: 25px;
  line-height: 1.35;
  font-style: italic;
  color: var(--soft);
}
.blurb .blurb-note {
  margin-top: 1.4em;
  padding-top: 1.1em;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--faint);
}
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 36px;
  margin: 30px 0 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
}
.facts dt {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-text);
}
.facts dd {
  margin: 2px 0 0;
  color: var(--text);
}
@media (min-width: 900px) {
  .book {
    padding: 44px 0 48px;
  }
  .book-grid-layout {
    grid-template-columns: 340px 1fr;
    gap: 72px;
    align-items: start;
  }
  .book-cover-col {
    width: 100%;
    position: -webkit-sticky;
    position: sticky;
    top: 100px;
  }
  .book-title {
    font-size: 66px;
  }
}

.inside-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.inside-list a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  text-decoration: none;
}
.inside-list a:hover {
  border-color: var(--line-strong);
}
.inside-list .cover {
  width: 56px;
  flex: none;
}
.inside-list strong {
  display: block;
  font-family: var(--display);
  font-size: 21px;
}
.inside-list em {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

/* Series shelf on book pages */
.shelf {
  display: flex;
  gap: 18px;
  margin: 0 -20px;
  padding: 6px 20px 18px;
  list-style: none;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}
.shelf li {
  flex: 0 0 132px;
  scroll-snap-align: start;
}
.shelf a {
  display: block;
  text-decoration: none;
}
.shelf .cover {
  transition: transform 0.2s;
}
.shelf a:hover .cover {
  transform: translateY(-4px);
}
.shelf-label {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}
.shelf .is-current .cover {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
}
.shelf .is-current .shelf-label {
  color: var(--accent-text);
}
@media (min-width: 900px) {
  .shelf li {
    flex-basis: 150px;
  }
}

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}
.pager-link {
  display: block;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  text-decoration: none;
  font-family: var(--display);
  font-size: 21px;
  line-height: 1.2;
}
.pager-link span {
  display: block;
  margin-bottom: 4px;
  font-family: var(--body);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-text);
}
.pager-link:hover {
  border-color: var(--line-strong);
}
.pager-next {
  text-align: right;
}

/* ---------- Series page ---------- */

.series-head {
  padding-bottom: 24px;
}
.series-head-grid {
  display: grid;
  gap: 28px;
  align-items: center;
}
.mini-fan {
  position: relative;
  height: 220px;
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
}
.mini-fan span {
  position: absolute;
  left: 50%;
  top: 10px;
  width: 128px;
  margin-left: -64px;
  z-index: calc(10 - var(--i) * var(--i) * 2);
  transform-origin: 50% 130%;
  transform: translateX(calc(var(--i) * 52%)) rotate(calc(var(--i) * 7deg));
}
@media (min-width: 900px) {
  .series-head-grid {
    grid-template-columns: 1.2fr 1fr;
  }
  .mini-fan {
    height: 290px;
  }
  .mini-fan span {
    width: 160px;
    margin-left: -80px;
  }
}

.order-list {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.order-item {
  display: grid;
  grid-template-columns: 30% 1fr;
  gap: 18px;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}
.order-title {
  font-size: 30px;
}
.order-title a {
  text-decoration: none;
}
.order-title a:hover {
  color: var(--soft);
}
.order-teaser {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.order-item .tagline {
  font-size: 19px;
}
@media (min-width: 700px) {
  .order-item {
    grid-template-columns: 160px 1fr;
    gap: 30px;
    padding: 24px;
  }
}

.boxset-callout {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 22px;
  align-items: center;
  margin-top: 36px;
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid rgba(233, 189, 120, 0.4);
  background: linear-gradient(130deg, rgba(233, 189, 120, 0.12), transparent 60%), var(--surface);
}
.boxset-callout p {
  color: var(--muted);
}
@media (min-width: 700px) {
  .boxset-callout {
    grid-template-columns: 160px 1fr;
    gap: 36px;
    padding: 32px;
  }
}

/* ---------- Books in order ---------- */

.order-columns {
  display: grid;
  gap: 22px;
}
@media (min-width: 760px) {
  .order-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1100px) {
  .order-columns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.order-block {
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  scroll-margin-top: 90px;
}
.order-block-title {
  font-size: 28px;
}
.order-block-title a {
  text-decoration: none;
}
.order-block-title a:hover {
  color: var(--soft);
}
.order-block-meta {
  margin: 6px 0 14px;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-text);
}
.mini-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.mini-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px;
  border-radius: 8px;
  text-decoration: none;
}
.mini-list a:hover {
  background: var(--surface-2);
}
.mini-list .cover {
  width: 34px;
  flex: none;
  border-radius: 2px;
}
.mini-list strong {
  display: block;
  font-weight: 500;
  line-height: 1.3;
}
.mini-list em {
  font-style: normal;
  font-size: 13px;
  color: var(--faint);
}
.order-block-set {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--muted);
}
.order-block-set a {
  color: var(--soft);
}
.pub-list {
  columns: 1;
  column-gap: 40px;
  margin: 0;
  padding-left: 1.6em;
  color: var(--faint);
}
@media (min-width: 760px) {
  .pub-list {
    columns: 2;
  }
}
@media (min-width: 1100px) {
  .pub-list {
    columns: 3;
  }
}
.pub-list li {
  break-inside: avoid;
  padding: 3px 0;
}
.pub-list a {
  color: var(--text);
  text-decoration: none;
}
.pub-list a:hover {
  color: var(--soft);
}
.pub-list span {
  font-size: 13px;
}
#publication-order {
  scroll-margin-top: 90px;
}

/* Series facts (questions readers search for) */
.facts-qa {
  max-width: 760px;
  margin-top: 36px;
}
.facts-qa h3 {
  margin: 22px 0 6px;
  font-size: 23px;
}
.facts-qa p {
  margin: 0;
  color: var(--muted);
}

/* ---------- Translations ---------- */

.lang-section + .lang-section {
  border-top: 1px solid var(--line);
}

/* ---------- Prose (privacy) ---------- */

.prose h2 {
  font-size: 30px;
  margin: 34px 0 10px;
}
.prose p {
  color: var(--muted);
}
.prose a {
  color: var(--soft);
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 44px 0 24px;
  background: var(--footer-bg);
  border-top: 1px solid var(--line);
}
.footer-grid {
  display: grid;
  gap: 32px;
}
.footer-brand p {
  margin: 12px 0 18px;
  color: var(--muted);
}
.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.social-row a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
}
.social-row a:hover {
  color: var(--on-accent);
  background: var(--accent);
}
.footer-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 24px;
  align-content: start;
}
.footer-links a {
  color: var(--muted);
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--text);
}
.store-pick label {
  display: block;
  margin-bottom: 8px;
  color: var(--faint);
  font-size: 14px;
}
.store-pick select {
  width: 100%;
  max-width: 300px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font: 15px var(--body);
}
.footer-fine {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--faint);
}
.footer-fine p {
  margin: 0;
}
@media (min-width: 900px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 56px;
  }
}

/* ---------- Big screens get bigger type ---------- */

@media (min-width: 900px) {
  .section {
    padding: 64px 0;
  }
  .section-tight {
    padding: 40px 0 52px;
  }
  .section-title {
    font-size: 50px;
  }
  .page-head {
    padding: 60px 0 8px;
  }
  .page-title {
    font-size: 72px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
