:root {
  --cream: #f4eedf;
  --paper: #fffaf0;
  --ink: #183b33;
  --forest: #163e34;
  --forest-soft: #235348;
  --moss: #849f68;
  --orange: #d96e3c;
  --gold: #e0ad56;
  --muted: #746f62;
  --line: rgba(24, 59, 51, 0.16);
  --serif: "Newsreader", Georgia, serif;
  --sans: "DM Sans", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 80% 10%, rgba(224, 173, 86, 0.12), transparent 22rem),
    var(--cream);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

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

.page-shell {
  min-height: 100vh;
  overflow: hidden;
}

.site-header {
  width: min(1180px, calc(100% - 64px));
  height: 92px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 29px;
  height: 31px;
  display: block;
  object-fit: contain;
}

nav {
  display: flex;
  align-items: center;
  gap: 34px;
  font-size: 14px;
  font-weight: 600;
}

nav a {
  transition: opacity 180ms ease;
}

nav a:hover {
  opacity: 0.65;
}

.nav-docs {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 18px;
}

.nav-docs span {
  margin-left: 7px;
}

.hero {
  width: min(1180px, calc(100% - 64px));
  min-height: 640px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  align-items: center;
  gap: clamp(55px, 7vw, 100px);
}

.hero-identity {
  min-height: 470px;
  padding: 52px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  flex-direction: column;
}

.hero-logo-mark {
  width: 220px;
  height: 245px;
  margin: 0 0 28px 10px;
  display: block;
  object-fit: contain;
}

.hero-brand-name {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(48px, 5vw, 66px);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.hero-brand-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--orange);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.eyebrow span {
  width: 22px;
  height: 1px;
  background: currentColor;
}

h1,
h2,
h3,
blockquote {
  font-family: var(--serif);
}

h1 {
  margin: 0;
  font-size: clamp(62px, 6vw, 88px);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: -0.055em;
}

h1 span,
h1 em {
  display: block;
}

h1 em,
blockquote em {
  color: var(--orange);
  font-weight: 500;
}

.hero-intro {
  max-width: 540px;
  margin: 34px 0 33px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.primary-action {
  min-width: 195px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  padding: 15px 18px 15px 22px;
  border-radius: 6px;
  color: #fffaf0;
  background: var(--forest);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(22, 62, 52, 0.14);
  transition: transform 180ms ease, background 180ms ease;
}

.primary-action:hover {
  background: var(--forest-soft);
  transform: translateY(-2px);
}

.tools-section {
  padding: 110px max(32px, calc((100vw - 1180px) / 2)) 120px;
  color: var(--cream);
  background: var(--forest);
}

.section-heading {
  margin-bottom: 54px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 60px;
}

.eyebrow.light {
  color: #d7a35c;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(45px, 5.1vw, 70px);
  font-weight: 500;
  line-height: 0.96;
  letter-spacing: -0.035em;
}

.section-heading > p {
  max-width: 400px;
  margin: 0 0 6px;
  color: rgba(244, 238, 223, 0.67);
  font-size: 15px;
  line-height: 1.7;
}

.tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.tool-card {
  min-height: 510px;
  position: relative;
  padding: 34px;
  overflow: hidden;
  border: 1px solid rgba(244, 238, 223, 0.17);
  border-radius: 9px;
}

.lendery-card {
  color: var(--ink);
  background: var(--gold);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.lendery-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.2);
}

.bookclub-card {
  color: var(--cream);
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    var(--forest-soft);
  background-size: 30px 30px;
}

.storytime-card {
  min-height: 430px;
  grid-column: 1 / -1;
  color: var(--ink);
  background:
    radial-gradient(circle at 86% 25%, rgba(217, 110, 60, 0.13), transparent 18rem),
    var(--cream);
}

.storytime-card .availability.soon {
  color: rgba(24, 59, 51, 0.72);
  border-color: rgba(24, 59, 51, 0.25);
}

.card-topline {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.availability {
  padding: 7px 11px;
  border: 1px solid rgba(24, 59, 51, 0.35);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.availability i {
  width: 6px;
  height: 6px;
  margin-right: 6px;
  display: inline-block;
  border-radius: 50%;
  background: var(--forest);
  box-shadow: 0 0 0 4px rgba(24, 59, 51, 0.1);
}

.availability.soon {
  color: rgba(244, 238, 223, 0.73);
  border-color: rgba(244, 238, 223, 0.24);
}

.card-arrow {
  font-size: 24px;
  transition: transform 180ms ease;
}

.lendery-card:hover .card-arrow {
  transform: translate(3px, -3px);
}

.card-icon {
  width: 200px;
  height: 200px;
  position: absolute;
  right: 42px;
  top: 92px;
  opacity: 0.92;
  transform: rotate(9deg);
}

.lendery-icon {
  border: 1px solid rgba(24, 59, 51, 0.16);
  border-radius: 18px;
  background-color: var(--paper);
  box-shadow: 0 12px 28px rgba(24, 59, 51, 0.12);
  transform: none;
}

.lendery-icon img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  object-fit: cover;
}

.book-icon,
.storytime-icon {
  right: 32px;
  overflow: hidden;
  border-radius: 18px;
  background-color: var(--paper);
  transform: none;
}

.book-icon {
  border: 1px solid rgba(244, 238, 223, 0.22);
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(9, 31, 25, 0.22);
}

.storytime-icon {
  width: 250px;
  height: 250px;
  top: 84px;
  right: 70px;
  border: 1px solid rgba(24, 59, 51, 0.14);
  box-shadow: 0 12px 28px rgba(24, 59, 51, 0.12);
}

.book-icon img,
.storytime-icon img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  object-fit: cover;
}

.storytime-card .card-copy {
  max-width: min(650px, calc(100% - 330px));
}

.storytime-card .card-copy h3 {
  font-size: clamp(40px, 5vw, 58px);
}

.storytime-features {
  margin: -7px 0 22px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}

.storytime-features li {
  padding: 7px 11px;
  border: 1px solid rgba(24, 59, 51, 0.2);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.card-copy {
  max-width: 390px;
  position: absolute;
  z-index: 3;
  left: 34px;
  right: 34px;
  bottom: 33px;
}

.card-number {
  margin: 0 0 8px;
  opacity: 0.65;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.card-copy h3 {
  margin: 0;
  font-size: 47px;
  font-weight: 500;
  letter-spacing: -0.035em;
}

.card-copy > p:not(.card-number) {
  margin: 10px 0 23px;
  opacity: 0.78;
  font-size: 14px;
  line-height: 1.55;
}

.card-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 700;
}

.card-cta b {
  font-size: 18px;
}

.card-cta.muted {
  opacity: 0.48;
}

.manifesto {
  padding: 120px 30px 130px;
  position: relative;
  text-align: center;
}

.quote-mark {
  display: block;
  height: 60px;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 100px;
  line-height: 1;
  opacity: 0.65;
}

.manifesto figure {
  margin: 0;
}

blockquote {
  max-width: 1050px;
  margin: 18px auto 0;
  font-size: clamp(33px, 4.4vw, 58px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.quote-attribution {
  margin-top: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.quote-attribution cite {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
}

.compass-easter-egg {
  width: 27px;
  height: 27px;
  margin: 24px auto 0;
  display: block;
  opacity: 0.64;
  cursor: help;
}

footer {
  width: min(1180px, calc(100% - 64px));
  min-height: 120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 30px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.footer-brand {
  color: var(--ink);
  font-size: 17px;
}

.footer-brand .brand-mark {
  transform: scale(0.78);
  transform-origin: left center;
}

footer p {
  max-width: 520px;
  text-align: center;
  line-height: 1.55;
}

footer > a:last-child {
  justify-self: end;
  font-weight: 600;
}

@keyframes drift {
  0%,
  100% {
    transform: translate(0, 0) scaleY(0.9);
    opacity: 0.25;
  }
  50% {
    transform: translate(5px, -9px) scaleY(1.05);
    opacity: 0.55;
  }
}

@keyframes twinkle {
  0%,
  100% {
    transform: scale(0.8) rotate(0);
    opacity: 0.45;
  }
  50% {
    transform: scale(1.15) rotate(25deg);
    opacity: 1;
  }
}

@media (max-width: 900px) {
  .hero {
    min-height: auto;
    padding: 75px 0 90px;
    grid-template-columns: 1fr;
    gap: 46px;
  }

  .hero-copy {
    position: relative;
    z-index: 2;
  }

  .hero-identity {
    min-height: 390px;
    padding: 42px;
  }

  .hero-logo-mark {
    width: 170px;
    height: 190px;
    margin-bottom: 22px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
    gap: 28px;
  }

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

  .storytime-card {
    min-height: 590px;
    grid-column: auto;
  }

  .storytime-card .card-copy {
    max-width: calc(100% - 68px);
  }

  .storytime-icon {
    width: 190px;
    height: 190px;
    top: 70px;
  }

  footer {
    grid-template-columns: 1fr 1fr;
  }

  footer p {
    display: none;
  }
}

@media (max-width: 600px) {
  .site-header,
  .hero,
  footer {
    width: min(100% - 36px, 1180px);
  }

  .site-header {
    height: 76px;
  }

  nav > a:first-child {
    display: none;
  }

  .nav-docs {
    padding: 9px 13px;
  }

  .hero {
    padding-top: 58px;
    gap: 38px;
  }

  h1 {
    font-size: clamp(52px, 16vw, 76px);
  }

  .hero-intro {
    font-size: 16px;
  }

  .hero-identity {
    min-height: 350px;
    padding: 32px;
  }

  .hero-logo-mark {
    width: 142px;
    height: 158px;
    margin: 0 0 20px 4px;
  }

  .hero-brand-name {
    font-size: 50px;
  }

  .hero-brand-note {
    max-width: 230px;
    line-height: 1.5;
  }

  .tools-section {
    padding: 82px 18px 90px;
  }

  .tool-card {
    min-height: 490px;
    padding: 25px;
  }

  .card-icon {
    right: 20px;
    transform: scale(0.85) rotate(9deg);
    transform-origin: right top;
  }

  .lendery-icon,
  .book-icon,
  .storytime-icon {
    transform: scale(0.85);
  }

  .storytime-icon {
    right: 20px;
  }

  .storytime-card {
    min-height: 610px;
  }

  .storytime-card .card-copy {
    max-width: none;
  }

  .card-copy {
    left: 25px;
    right: 25px;
    bottom: 25px;
  }

  .card-copy h3 {
    font-size: 40px;
  }

  .manifesto {
    padding: 90px 20px 100px;
  }

  footer {
    min-height: 100px;
  }

  .footer-brand > span:last-child {
    display: none;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
