:root {
  --paper: #f2f4f0;
  --paper-deep: #dfe5dd;
  --ink: #1c1b18;
  --muted: #606663;
  --rule: #cfd7cf;
  --accent: #315440;
  --accent-dark: #20372c;
  --white: #ffffff;
  --shadow: 0 16px 38px rgb(28 27 24 / 12%);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 46%), rgb(255 255 255 / 0) 340px),
    var(--paper);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.5;
}

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

a {
  color: inherit;
}

.wrap {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--white);
}

.header-grid {
  display: grid;
  gap: 12px;
  padding: 54px 0 42px;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-block: 0;
}

h1 {
  max-width: 840px;
  font-size: clamp(3.3rem, 9vw, 7.4rem);
  font-weight: 400;
  line-height: 0.92;
}

.intro {
  max-width: 580px;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.02rem;
}

.books {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  padding: 46px 0 64px;
}

.book {
  display: grid;
  grid-template-columns: minmax(126px, 36%) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  min-height: 100%;
  padding: 18px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: rgb(255 255 255 / 88%);
  box-shadow: var(--shadow);
}

.cover-link {
  align-self: start;
  border-radius: 4px;
  background: var(--paper-deep);
  box-shadow: 0 10px 22px rgb(28 27 24 / 20%);
  overflow: hidden;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.cover-link:focus-visible,
.cover-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgb(28 27 24 / 24%);
  outline: none;
}

.cover-link:focus-visible {
  box-shadow:
    0 0 0 3px var(--white),
    0 0 0 6px var(--accent),
    0 14px 28px rgb(28 27 24 / 24%);
}

.cover-link img {
  width: 100%;
  height: auto;
}

.book-copy {
  display: grid;
  gap: 18px;
  min-width: 0;
  padding-top: 2px;
}

h2 {
  font-size: clamp(1.7rem, 4vw, 2.45rem);
  font-weight: 400;
  line-height: 1.05;
}

.marketplaces {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.marketplaces a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid rgb(49 84 64 / 34%);
  border-radius: 4px;
  background: rgb(255 255 255 / 86%);
  color: var(--accent-dark);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.marketplaces a:focus-visible,
.marketplaces a:hover {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
  color: var(--white);
  outline: none;
}

.site-footer {
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.9rem;
  background: var(--white);
}

.site-footer .wrap {
  padding: 22px 0;
}

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

  .book {
    grid-template-columns: minmax(118px, 180px) minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .wrap {
    width: min(100% - 28px, 1120px);
  }

  .header-grid {
    padding: 38px 0 32px;
  }

  .books {
    gap: 18px;
    padding: 28px 0 44px;
  }

  .book {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 16px;
    padding: 14px;
  }

  h1 {
    font-size: clamp(3.1rem, 18vw, 4.8rem);
  }

  h2 {
    font-size: 1.55rem;
  }

  .marketplaces {
    gap: 6px;
  }

  .marketplaces a {
    min-width: 34px;
    min-height: 32px;
    padding: 5px 8px;
  }
}

@media (max-width: 400px) {
  .book {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  h2 {
    font-size: 1.34rem;
  }

  .marketplaces a {
    min-width: 31px;
    min-height: 30px;
    font-size: 0.7rem;
  }
}
