:root {
  color-scheme: dark;
  --page: #0b0f14;
  --surface: #121923;
  --surface-strong: #182331;
  --line: #334150;
  --line-soft: #25313d;
  --text: #f7f4ee;
  --muted: #b9c3cf;
  --accent: #c51d4a;
  --accent-strong: #a5143c;
  --accent-text: #ff7895;
  --cyan: #55d6d0;
  --gold: #f4c760;
  --ink: #121318;
  --header-height: 74px;
  --content-width: 1240px;
  font-family: "Space Grotesk", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background: var(--page);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
}

body[data-theme="light"] {
  color-scheme: light;
  --page: #f3f5f6;
  --surface: #ffffff;
  --surface-strong: #e8edf0;
  --line: #a9b4bf;
  --line-soft: #d4dce2;
  --text: #171c22;
  --muted: #4f5c68;
  --accent: #a91d42;
  --accent-strong: #871431;
  --accent-text: #9f173b;
  --cyan: #087c7a;
  --gold: #8a6310;
  --ink: #ffffff;
}

body,
button,
a {
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: "Bodoni Moda", Georgia, serif;
  letter-spacing: 0;
  line-height: 1.02;
}

h2 {
  max-width: 900px;
  margin-bottom: 18px;
  font-size: 48px;
}

h3 {
  font-size: 29px;
}

[id] {
  scroll-margin-top: calc(var(--header-height) + 24px);
}

.books-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.books-skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  color: #10131a;
  background: #ffffff;
  border: 2px solid #10131a;
  border-radius: 4px;
  transform: translateY(-140%);
}

.books-skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 4px;
}

.books-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(250px, 1fr) auto minmax(250px, 1fr);
  align-items: center;
  min-height: var(--header-height);
  padding: 10px max(24px, calc((100% - var(--content-width)) / 2));
  background: rgba(11, 15, 20, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

body[data-theme="light"] .books-header {
  background: rgba(243, 245, 246, 0.96);
  border-color: rgba(23, 28, 34, 0.18);
}

.books-brand {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 48px;
  gap: 11px;
  text-decoration: none;
}

.books-brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.books-brand span {
  display: grid;
  min-width: 0;
  line-height: 1.15;
}

.books-brand strong {
  font-size: 15px;
}

.books-brand small {
  margin-top: 4px;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
}

.books-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.books-nav a {
  display: inline-grid;
  place-items: center;
  min-height: 44px;
  padding: 8px 13px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.books-nav a:hover {
  color: var(--text);
  border-color: var(--accent);
}

.books-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.books-control,
.books-theme,
.books-filter {
  min-width: 44px;
  min-height: 44px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  cursor: pointer;
}

.books-control {
  border-radius: 50%;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-weight: 600;
}

.books-control[aria-pressed="true"] {
  color: #ffffff;
  background: var(--accent);
  border-color: var(--accent);
}

.books-theme {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 92px;
  padding: 0 12px;
  border-radius: 22px;
  font-size: 13px;
  font-weight: 600;
}

.books-theme-indicator {
  width: 12px;
  height: 12px;
  background: var(--gold);
  border: 2px solid currentColor;
  border-radius: 50%;
}

.books-hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 690px;
  isolation: isolate;
  overflow: hidden;
  background-color: #111821;
  background-image: url("../assets/fundraiser/eden-infranto.jpg");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
}

.books-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(4, 7, 11, 0.62);
}

.books-hero-content {
  width: min(100% - 48px, var(--content-width));
  margin: 0 auto;
  padding: 92px 0 80px 52%;
}

.books-kicker {
  display: block;
  margin-bottom: 13px;
  color: var(--accent-text);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.books-hero h1 {
  max-width: 700px;
  margin-bottom: 20px;
  color: #ffffff;
  font-size: 72px;
  text-wrap: balance;
}

.books-hero-question {
  margin-bottom: 18px;
  color: #f4c760;
  font-family: "Bodoni Moda", Georgia, serif;
  font-size: 27px;
  font-weight: 700;
}

.books-hero-copy {
  max-width: 650px;
  margin-bottom: 28px;
  color: #e6ebef;
  font-size: 18px;
  line-height: 1.65;
}

.books-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.books-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 17px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 6px;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

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

.books-button-primary {
  color: #ffffff;
  background: var(--accent);
  border-color: var(--accent);
}

.books-button-primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.books-button-secondary {
  color: var(--text);
  background: var(--surface);
  border-color: var(--line);
}

.books-hero .books-button-secondary {
  color: #ffffff;
  background: rgba(10, 15, 21, 0.8);
  border-color: rgba(255, 255, 255, 0.55);
}

.books-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin-top: 26px;
  margin-bottom: 0;
  list-style: none;
}

.books-hero-tags li {
  padding: 7px 10px;
  color: #f4f6f8;
  background: rgba(9, 13, 18, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
}

.books-release {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  width: min(100% - 48px, var(--content-width));
  margin: -34px auto 0;
  padding: 21px 24px;
  position: relative;
  z-index: 3;
  color: var(--text);
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-left: 4px solid var(--cyan);
  border-radius: 6px;
}

.books-release-dot {
  width: 12px;
  height: 12px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 0 6px rgba(85, 214, 208, 0.13);
}

.books-release .books-kicker {
  margin-bottom: 4px;
  color: var(--cyan);
}

.books-release strong {
  display: block;
  font-family: "Bodoni Moda", Georgia, serif;
  font-size: 22px;
  line-height: 1.25;
}

.books-release p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.books-section {
  width: min(100% - 48px, var(--content-width));
  margin: 0 auto;
  padding: 112px 0;
}

.books-section-head {
  max-width: 860px;
  margin-bottom: 44px;
}

.books-section-head p {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
}

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

.books-path-card {
  display: grid;
  grid-template-columns: minmax(170px, 220px) minmax(0, 1fr);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.books-path-cover {
  width: 100%;
  height: auto;
  aspect-ratio: 938 / 1500;
  object-fit: cover;
  object-position: center;
  background: var(--surface-strong);
}

.books-path-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 30px;
}

.books-path-copy h3 {
  margin-bottom: 13px;
}

.books-path-copy p {
  margin-bottom: 24px;
  color: var(--muted);
}

.books-path-copy .books-button {
  margin-top: auto;
}

.books-saga {
  width: 100%;
  padding-right: max(24px, calc((100% - var(--content-width)) / 2));
  padding-left: max(24px, calc((100% - var(--content-width)) / 2));
  background: var(--surface);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.books-section-head-wide {
  max-width: 1020px;
}

.books-saga-shelf {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
  gap: 16px;
}

.books-saga-item {
  position: relative;
  display: block;
  color: var(--text);
  text-decoration: none;
}

.books-saga-item::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 42px;
  left: 0;
  height: 3px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 160ms ease;
}

.books-saga-item:hover::after,
.books-saga-item:focus-visible::after {
  opacity: 1;
}

.books-saga-item img {
  width: 100%;
  aspect-ratio: 938 / 1500;
  object-fit: cover;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 5px 5px 0 0;
}

.books-saga-item span {
  display: block;
  min-height: 42px;
  padding-top: 12px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  text-transform: uppercase;
}

.books-process {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: start;
  gap: 72px;
  width: min(100% - 48px, var(--content-width));
  margin: 0 auto;
  padding: 92px 0;
  border-bottom: 1px solid var(--line-soft);
}

.books-process h2 {
  margin-bottom: 0;
  font-size: 39px;
}

.books-process > p {
  margin: 31px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.books-catalog-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  max-width: none;
  gap: 48px;
}

.books-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(105px, 1fr));
  gap: 8px;
}

.books-metric {
  min-width: 118px;
  padding: 15px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
}

.books-metric strong {
  display: block;
  font-family: "Bodoni Moda", Georgia, serif;
  font-size: 28px;
  line-height: 1;
}

.books-metric span {
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
}

.books-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 58px;
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-soft);
}

.books-catalog-status {
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
}

.books-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.books-filter {
  min-width: auto;
  padding: 8px 15px;
  border-radius: 22px;
  font-size: 13px;
  font-weight: 700;
}

.books-filter[aria-pressed="true"] {
  color: var(--ink);
  background: var(--text);
  border-color: var(--text);
}

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

.books-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.books-card-media {
  position: relative;
  overflow: hidden;
  background: var(--surface-strong);
  border-bottom: 1px solid var(--line-soft);
}

.books-card-media img {
  width: 100%;
  height: auto;
  aspect-ratio: 938 / 1500;
  object-fit: cover;
  object-position: top center;
  transition: transform 220ms ease;
}

.books-card:hover .books-card-media img {
  transform: scale(1.025);
}

.books-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 9px;
  color: #ffffff;
  background: #c51d4a;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.books-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: 23px;
}

.books-card-meta {
  margin-bottom: 9px;
  color: var(--cyan);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.books-card h3 {
  width: 100%;
  margin-bottom: 8px;
  overflow-wrap: anywhere;
  font-size: 27px;
}

.books-card-credit {
  margin-bottom: 16px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 600;
}

.books-card-description {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 15px;
}

.books-editions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  margin-top: auto;
}

.books-edition-link {
  flex: 1 1 138px;
  min-height: 44px;
  padding: 9px 11px;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
}

.books-edition-link:hover {
  color: #ffffff;
  background: var(--accent);
  border-color: var(--accent);
}

.books-review-note {
  width: 100%;
  margin: 12px 0 0;
  padding: 10px 12px;
  color: var(--muted);
  background: var(--surface-strong);
  border-left: 3px solid var(--gold);
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
}

.books-empty {
  grid-column: 1 / -1;
  padding: 50px 20px;
  color: var(--muted);
  text-align: center;
  border: 1px solid var(--line);
}

.books-author {
  display: grid;
  grid-template-columns: minmax(280px, 430px) minmax(0, 1fr);
  align-items: center;
  gap: 72px;
  width: min(100% - 48px, var(--content-width));
  margin: 0 auto;
  padding: 28px 0 112px;
}

.books-author img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center top;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.books-author h2 {
  margin-bottom: 18px;
  font-size: 55px;
}

.books-author p {
  max-width: 650px;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 18px;
}

.books-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 100px;
  padding: 24px max(24px, calc((100% - var(--content-width)) / 2));
  color: var(--muted);
  background: var(--surface);
  border-top: 1px solid var(--line-soft);
  font-size: 13px;
}

.books-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 22px;
}

.books-footer a:hover {
  color: var(--text);
}

@media (max-width: 1100px) {
  .books-header {
    grid-template-columns: 1fr auto;
  }

  .books-nav {
    display: none;
  }

  .books-hero-content {
    padding-left: 44%;
  }

  .books-hero h1 {
    font-size: 58px;
  }

  .books-path-card {
    grid-template-columns: minmax(140px, 185px) minmax(0, 1fr);
  }

  .books-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  :root {
    --header-height: 66px;
  }

  .books-header {
    min-height: var(--header-height);
    padding-right: 16px;
    padding-left: 16px;
  }

  .books-brand small,
  .books-theme-label,
  #books-theme-label {
    display: none;
  }

  .books-theme {
    min-width: 44px;
    width: 44px;
    padding: 0;
    border-radius: 50%;
  }

  .books-hero {
    align-items: end;
    min-height: 650px;
    background-position: 35% center;
  }

  .books-hero-overlay {
    background: rgba(4, 7, 11, 0.7);
  }

  .books-hero-content {
    width: min(100% - 32px, var(--content-width));
    padding: 210px 0 74px;
  }

  .books-hero h1 {
    max-width: 620px;
    font-size: 50px;
  }

  .books-release {
    grid-template-columns: auto minmax(0, 1fr);
    width: min(100% - 32px, var(--content-width));
    margin-top: -26px;
  }

  .books-release .books-button {
    grid-column: 2;
    justify-self: start;
  }

  .books-section,
  .books-process,
  .books-author {
    width: min(100% - 32px, var(--content-width));
  }

  .books-section {
    padding: 86px 0;
  }

  .books-saga {
    width: 100%;
    padding-right: 16px;
    padding-left: 16px;
  }

  h2 {
    font-size: 41px;
  }

  .books-path-grid {
    grid-template-columns: 1fr;
  }

  .books-saga-shelf {
    grid-template-columns: repeat(5, 170px);
    padding-bottom: 16px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-color: var(--accent) var(--surface-strong);
  }

  .books-process {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 76px 0;
  }

  .books-process > p {
    margin-top: 0;
  }

  .books-catalog-head {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .books-metrics {
    width: fit-content;
  }

  .books-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .books-filters {
    justify-content: flex-start;
  }

  .books-author {
    grid-template-columns: minmax(220px, 330px) minmax(0, 1fr);
    gap: 38px;
    padding-bottom: 86px;
  }

  .books-author h2 {
    font-size: 44px;
  }
}

@media (max-width: 560px) {
  .books-brand strong {
    max-width: 104px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .books-control,
  .books-theme {
    min-width: 42px;
    width: 42px;
    min-height: 42px;
  }

  .books-hero {
    min-height: 610px;
    background-position: 28% center;
  }

  .books-hero-content {
    padding-top: 180px;
    padding-bottom: 62px;
  }

  .books-hero h1 {
    font-size: 38px;
  }

  .books-hero-question {
    font-size: 22px;
  }

  .books-hero-copy {
    font-size: 16px;
    line-height: 1.5;
  }

  .books-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .books-button {
    width: 100%;
  }

  .books-hero-tags {
    gap: 6px;
  }

  .books-hero-tags li {
    font-size: 9px;
  }

  .books-release {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 19px;
  }

  .books-release-dot {
    display: none;
  }

  .books-release .books-button {
    grid-column: 1;
    justify-self: stretch;
  }

  .books-section {
    padding: 70px 0;
  }

  h2 {
    font-size: 35px;
  }

  .books-section-head p {
    font-size: 16px;
  }

  .books-path-card {
    grid-template-columns: minmax(116px, 38%) minmax(0, 1fr);
  }

  .books-path-copy {
    padding: 22px 17px;
  }

  .books-path-copy h3 {
    font-size: 23px;
  }

  .books-path-copy p {
    font-size: 14px;
  }

  .books-process h2 {
    font-size: 32px;
  }

  .books-grid {
    grid-template-columns: 1fr;
  }

  .books-metric {
    min-width: 105px;
  }

  .books-author {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .books-author img {
    max-width: 320px;
  }

  .books-author h2 {
    font-size: 41px;
  }

  .books-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .books-footer nav {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  .books-hero-overlay {
    background: Canvas;
    opacity: 0.78;
  }

  .books-release,
  .books-card,
  .books-path-card,
  .books-edition-link,
  .books-button,
  .books-filter,
  .books-control,
  .books-theme {
    border: 1px solid CanvasText;
  }
}
