:root {
  --paper: #f4efe6;
  --paper-strong: #e9dfd0;
  --ink: #142127;
  --ink-soft: #52626b;
  --line: rgba(20, 33, 39, 0.12);
  --panel: rgba(255, 251, 244, 0.72);
  --accent: #bb5a36;
  --accent-deep: #8e3f25;
  --shadow: 0 24px 60px rgba(17, 25, 30, 0.18);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --site-width: min(1180px, calc(100vw - 40px));
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(46, 143, 118, 0.15), transparent 36%),
    radial-gradient(circle at top right, rgba(187, 90, 54, 0.16), transparent 30%),
    linear-gradient(180deg, #f8f4ed 0%, var(--paper) 54%, #ede4d8 100%);
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 20;
  padding: 12px 16px;
  border-radius: 999px;
  color: #fff;
  background: var(--ink);
  transition: top 160ms ease;
}

.skip-link:focus {
  top: 16px;
}

.page-shell {
  width: var(--site-width);
  margin: 0 auto;
  padding: 24px 0 72px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-deep);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 28px;
  align-items: stretch;
  padding: 28px 0 38px;
}

.hero__copy,
.hero__stage,
.stats,
.filters,
.collection {
  position: relative;
}

.hero__copy,
.hero__stage > .stage-card,
.stats,
.filters,
.collection {
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: var(--panel);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.hero__copy {
  padding: clamp(28px, 4vw, 56px);
  border-radius: 36px;
}

.hero__copy h1,
.filters h2,
.collection h2 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.hero__copy h1 {
  max-width: 10ch;
  font-size: clamp(3.3rem, 7vw, 6.8rem);
}

.hero__lede {
  max-width: 58ch;
  margin: 24px 0 0;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  line-height: 1.72;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.96rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button--primary {
  color: #fff9f3;
  background: linear-gradient(135deg, var(--accent) 0%, #d0823a 100%);
  box-shadow: 0 18px 30px rgba(187, 90, 54, 0.26);
}

.button--ghost {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.58);
}

.hero__stage > .stage-card {
  height: 100%;
  min-height: 420px;
  padding: 28px;
  border-radius: 36px;
  overflow: hidden;
}

.stage-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(248, 239, 226, 0.86)),
    radial-gradient(circle at 20% 10%, rgba(46, 143, 118, 0.22), transparent 35%);
}

.stage-card__label,
.stage-card__caption {
  position: relative;
  z-index: 1;
}

.stage-card__label {
  display: inline-flex;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--accent-deep);
  background: rgba(255, 255, 255, 0.7);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stage-books {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  min-height: 220px;
  padding: 16px 12px 8px;
}

.stage-book {
  flex: 1;
  border-radius: 18px 18px 10px 10px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    18px 22px 34px rgba(25, 36, 42, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 36%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.14) 0 1px, transparent 1px 8px),
    linear-gradient(160deg, #21585d 0%, #112f36 100%);
}

.stage-book--tall {
  height: 220px;
}

.stage-book--warm {
  height: 176px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.15), transparent 36%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 10px),
    linear-gradient(155deg, #d3a56b 0%, #8b4e2e 100%);
}

.stage-book--dark {
  height: 204px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.11), transparent 40%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0 1px, transparent 1px 12px),
    linear-gradient(155deg, #27374b 0%, #11161d 100%);
}

.stage-book--slim {
  max-width: 64px;
  height: 148px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent 40%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0 1px, transparent 1px 7px),
    linear-gradient(160deg, #3e8d73 0%, #20463f 100%);
}

.stage-card__caption {
  max-width: 26ch;
  margin: 0;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.6;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
  padding: 18px;
  border-radius: 28px;
}

.stats article {
  padding: 18px 18px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(20, 33, 39, 0.08);
}

.stats strong {
  display: block;
  margin-bottom: 8px;
  font-family: "Fraunces", serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
}

.stats span {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.filters,
.collection {
  margin-top: 18px;
  padding: 26px;
  border-radius: 30px;
}

.filters {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.filters h2,
.collection h2 {
  font-size: clamp(2rem, 4vw, 3.25rem);
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip {
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.62);
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.filter-chip:hover,
.filter-chip.is-active {
  transform: translateY(-1px);
  border-color: transparent;
  color: #fff6ef;
  background: linear-gradient(135deg, var(--accent) 0%, #cf7b38 100%);
}

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

.collection__hint {
  max-width: 26ch;
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.6;
}

.shelf-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.book-link {
  display: block;
  min-width: 0;
}

.book {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: stretch;
  min-height: 290px;
  border-radius: 24px;
  transform-style: preserve-3d;
  perspective: 1400px;
  transition: transform 240ms cubic-bezier(0.16, 1, 0.3, 1);
}

.book-link:hover .book,
.book-link:focus-visible .book {
  transform: translateY(-4px);
}

.book__spine,
.book__cover {
  position: relative;
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 20px 32px rgba(18, 30, 35, 0.2);
}

.book__spine {
  border-radius: 18px 0 0 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 34%),
    linear-gradient(180deg, var(--spine) 0%, color-mix(in srgb, var(--spine) 48%, black) 100%);
}

.book__spine::after {
  content: "";
  position: absolute;
  inset: 10px 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
}

.book__spine-text {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%) rotate(180deg);
  writing-mode: vertical-rl;
  color: rgba(255, 247, 238, 0.92);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.book__cover {
  padding: 22px;
  border-radius: 0 18px 18px 0;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.28), transparent 34%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 12px),
    linear-gradient(145deg, var(--cover-start) 0%, var(--cover-end) 100%);
}

.book__cover::before,
.book__cover::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.book__cover::before {
  inset: 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.book__cover::after {
  inset: auto 16px 16px auto;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22) 0%, transparent 68%);
}

.book__tag {
  display: inline-flex;
  width: fit-content;
  padding: 7px 11px;
  border-radius: 999px;
  color: rgba(255, 250, 246, 0.95);
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.book__title {
  margin: 16px 0 0;
  color: #fff7f0;
  font-family: "Fraunces", serif;
  font-size: clamp(1.8rem, 2vw, 2.35rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.book__note {
  max-width: 30ch;
  margin: 16px 0 0;
  color: rgba(255, 247, 241, 0.78);
  line-height: 1.65;
}

.book__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 248, 241, 0.92);
  font-size: 0.92rem;
  font-weight: 700;
}

.book__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.book.is-hidden {
  display: none;
}

.book-link:focus-visible {
  outline: none;
}

.book-link:focus-visible .book__cover,
.book-link:focus-visible .book__spine {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 0 0 4px rgba(187, 90, 54, 0.22),
    0 20px 32px rgba(18, 30, 35, 0.2);
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .stats,
  .shelf-grid {
    grid-template-columns: 1fr;
  }

  .filters,
  .collection__header {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100vw - 24px, 100%);
    padding-top: 12px;
  }

  .hero__copy,
  .hero__stage > .stage-card,
  .stats,
  .filters,
  .collection {
    border-radius: 24px;
  }

  .hero__copy h1 {
    font-size: clamp(2.7rem, 13vw, 4.3rem);
  }

  .book {
    grid-template-columns: 30px minmax(0, 1fr);
    min-height: 248px;
  }

  .book__cover {
    padding: 18px;
  }

  .book__title {
    font-size: 1.65rem;
  }
}

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