@font-face {
  font-family: "Alegreya";
  src: url("../fonts/alegreya-400.7cbcf38a.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Alegreya";
  src: url("../fonts/alegreya-500-italic.654e31db.woff2") format("woff2");
  font-style: italic;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Alegreya";
  src: url("../fonts/alegreya-700.1c582501.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-3-400.0f73f35e.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-3-600.14527d19.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-3-700.ae35266f.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --manuscript: #e9d5ac;
  --paper: #f6ebd3;
  --carbon: #17130f;
  --burnt-edge: #702d1f;
  --gold: #a87332;
  --stone: #766b5e;
  --white: #fffaf0;
  --page-gutter: clamp(1.25rem, 5vw, 5.5rem);
  --content-width: 75rem;
  color-scheme: light;
  font-synthesis: none;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--carbon);
  font-family: "Source Sans 3", Arial, sans-serif;
  font-size: 1.125rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.22em;
}

a:hover {
  text-decoration-color: var(--gold);
}

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

::selection {
  background: var(--burnt-edge);
  color: var(--white);
}

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

h1,
h2,
h3 {
  font-family: "Alegreya", Georgia, serif;
  font-weight: 700;
  line-height: 0.98;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.75rem 1rem;
  transform: translateY(-150%);
  background: var(--paper);
  color: var(--carbon);
  font-weight: 700;
}

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

.site-header {
  display: flex;
  position: absolute;
  z-index: 10;
  top: 0;
  left: 0;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: calc(var(--content-width) + (2 * var(--page-gutter)));
  margin-inline: auto;
  padding: 1.5rem var(--page-gutter);
  color: var(--paper);
}

.wordmark {
  font-family: "Alegreya", Georgia, serif;
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2.5rem);
  font-size: 0.95rem;
  font-weight: 600;
}

.site-nav a {
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--manuscript);
}

.hero {
  min-height: min(57rem, 100svh);
  padding: 7rem var(--page-gutter) 4.5rem;
  background: var(--carbon);
  color: var(--paper);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(15rem, 0.78fr) minmax(20rem, 1.22fr);
  gap: clamp(3.5rem, 8vw, 8rem);
  align-items: center;
  max-width: var(--content-width);
  min-height: calc(min(57rem, 100svh) - 11.5rem);
  margin-inline: auto;
}

.cover-wrap {
  position: relative;
  width: min(100%, 27rem);
  margin: 0 auto;
}

.cover-wrap::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 1.25rem -1.25rem -1.25rem 1.25rem;
  border: 1px solid rgba(168, 115, 50, 0.58);
  transform: scaleY(0);
  transform-origin: top;
  animation: frame-draw 700ms 500ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.book-cover {
  position: relative;
  z-index: 1;
  width: 100%;
  box-shadow: 0 1.7rem 4rem rgba(0, 0, 0, 0.38);
  clip-path: inset(0 0 100% 0);
  transform: translateY(-0.75rem);
  animation: artifact-reveal 900ms 120ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.cover-wrap figcaption {
  position: relative;
  z-index: 1;
  margin-top: 1.3rem;
  color: var(--manuscript);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
}

.hero-copy {
  max-width: 45rem;
}

.opening-lines {
  margin-bottom: clamp(2rem, 5vw, 4.25rem);
  color: var(--manuscript);
  font-family: "Alegreya", Georgia, serif;
  font-size: clamp(1.45rem, 2.4vw, 2.15rem);
  font-style: italic;
  line-height: 1.3;
}

.opening-lines span {
  display: block;
  clip-path: inset(0 100% 0 0);
  animation: line-reveal 620ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.opening-lines span:nth-child(1) {
  animation-delay: 420ms;
}

.opening-lines span:nth-child(2) {
  animation-delay: 600ms;
}

.opening-lines span:nth-child(3) {
  animation-delay: 780ms;
}

.hero h1 {
  max-width: 11ch;
  margin-bottom: 1.6rem;
  font-size: clamp(3.25rem, 6.2vw, 5.9rem);
  letter-spacing: -0.035em;
}

.hero h1 span {
  display: block;
  color: var(--manuscript);
  font-size: 0.68em;
  letter-spacing: -0.015em;
}

.hero-summary {
  max-width: 35rem;
  color: #d8c7a8;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
}

.hero-route {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  max-width: 32rem;
  margin: 1.4rem 0 0;
  color: var(--manuscript);
  font-family: "Alegreya", Georgia, serif;
  font-size: 0.98rem;
}

.hero-route i {
  flex: 1 1 2rem;
  height: 1px;
  background: rgba(168, 115, 50, 0.7);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.6rem;
  align-items: center;
  margin-top: 2.25rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.75rem 1.45rem;
  border: 2px solid transparent;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
}

.button-primary {
  background: var(--gold);
  color: var(--carbon);
}

.button-primary:hover {
  border-color: var(--paper);
  background: var(--manuscript);
}

.button[data-pending="true"] {
  cursor: not-allowed;
}

.text-link {
  color: var(--paper);
  font-weight: 600;
}

.availability {
  margin: 0.65rem 0 0;
  color: #bdab8e;
  font-size: 0.875rem;
}

.book-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 1.8rem max(var(--page-gutter), calc((100vw - var(--content-width)) / 2 + var(--page-gutter)));
  background: #292119;
  color: var(--paper);
}

.book-facts div {
  padding: 0 clamp(1rem, 3vw, 2.5rem);
  border-left: 1px solid rgba(168, 115, 50, 0.45);
}

.book-facts div:first-child {
  padding-left: 0;
  border-left: 0;
}

.book-facts dt {
  color: #c7924d;
  font-size: 0.8rem;
  font-weight: 700;
}

.book-facts dd {
  margin: 0.2rem 0 0;
  font-family: "Alegreya", Georgia, serif;
  font-size: clamp(1rem, 1.8vw, 1.3rem);
  line-height: 1.2;
}

@keyframes artifact-reveal {
  from {
    clip-path: inset(0 0 100% 0);
    transform: translateY(-0.75rem);
  }

  to {
    clip-path: inset(0);
    transform: translateY(0);
  }
}

@keyframes frame-draw {
  to {
    transform: scaleY(1);
  }
}

@keyframes line-reveal {
  to {
    clip-path: inset(0);
  }
}

.journey,
.works {
  max-width: var(--content-width);
  margin-inline: auto;
  padding: clamp(5rem, 10vw, 9rem) var(--page-gutter);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(15rem, 0.9fr) minmax(17rem, 0.65fr);
  gap: 2rem clamp(3rem, 10vw, 9rem);
  align-items: end;
  max-width: 67rem;
}

.section-heading .section-kicker,
.section-heading h2 {
  grid-column: 1;
}

.section-heading > p:last-child {
  grid-column: 2;
  grid-row: 1 / span 2;
  margin-bottom: 0.4rem;
  color: #4e463d;
  font-family: "Alegreya", Georgia, serif;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  line-height: 1.45;
}

.section-kicker {
  margin-bottom: 0.8rem;
  color: var(--burnt-edge);
  font-size: 0.92rem;
  font-weight: 700;
}

.journey h2,
.works h2,
.author h2 {
  margin-bottom: 0;
  font-size: clamp(3rem, 6vw, 5.8rem);
  letter-spacing: -0.035em;
}

.route {
  display: grid;
  position: relative;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  margin: clamp(4rem, 8vw, 7rem) 0 0;
  padding: 2.4rem 0 0;
  list-style: none;
}

.route::before {
  content: "";
  position: absolute;
  top: 0.32rem;
  right: 0;
  left: 0;
  height: 1px;
  background: var(--gold);
}

.route li {
  position: relative;
}

.route li::before {
  content: "";
  position: absolute;
  top: -2.38rem;
  left: 0;
  width: 0.68rem;
  height: 0.68rem;
  border: 2px solid var(--gold);
  border-radius: 50%;
  background: var(--paper);
}

.route .place {
  margin-bottom: 1.2rem;
  color: var(--burnt-edge);
  font-weight: 700;
}

.route h3 {
  margin-bottom: 0.85rem;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.route li p:last-child {
  margin-bottom: 0;
  color: #51483e;
  font-size: 1.02rem;
}

.story-detail {
  padding: 0 var(--page-gutter) clamp(5rem, 10vw, 9rem);
}

.story-panel {
  display: grid;
  grid-template-columns: minmax(10rem, 0.5fr) minmax(18rem, 1.5fr);
  gap: clamp(2rem, 8vw, 8rem);
  max-width: 67rem;
  margin-inline: auto;
  padding: clamp(2.5rem, 7vw, 6rem);
  border-top: 8px solid var(--burnt-edge);
  background: var(--manuscript);
}

.margin-note {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 18rem;
  padding-right: 2rem;
  border-right: 1px solid rgba(112, 45, 31, 0.45);
  color: var(--burnt-edge);
  font-family: "Alegreya", Georgia, serif;
  font-size: 1rem;
  font-style: italic;
}

.story-copy h2 {
  max-width: 18ch;
  margin-bottom: 2rem;
  font-size: clamp(2.6rem, 5vw, 4.6rem);
}

.story-copy > p:not(.section-kicker) {
  max-width: 43rem;
}

.excerpt {
  display: grid;
  grid-template-columns: minmax(15rem, 0.72fr) minmax(20rem, 1.28fr);
  gap: clamp(3rem, 9vw, 8rem);
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--page-gutter) clamp(5rem, 11vw, 9rem);
}

.excerpt-heading {
  padding-top: 0.5rem;
  border-top: 1px solid rgba(112, 45, 31, 0.55);
}

.excerpt h2 {
  margin: 0;
  font-size: clamp(2.8rem, 5vw, 4.8rem);
  line-height: 1;
}

.excerpt h2 span {
  color: var(--burnt-edge);
  font-size: 0.48em;
}

.excerpt blockquote {
  margin: 0;
  padding: clamp(2rem, 5vw, 4rem);
  border-left: 7px solid var(--burnt-edge);
  background: var(--manuscript);
}

.excerpt blockquote p {
  margin-bottom: 1.15rem;
  font-family: "Alegreya", Georgia, serif;
  font-size: clamp(1.35rem, 2.3vw, 1.75rem);
  line-height: 1.4;
}

.excerpt blockquote p:last-child {
  margin-bottom: 0;
  color: var(--burnt-edge);
  font-style: italic;
}

.fact-fiction {
  padding: clamp(5rem, 11vw, 9rem) var(--page-gutter);
  background: var(--carbon);
  color: var(--paper);
}

.fact-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem clamp(3rem, 9vw, 8rem);
  max-width: var(--content-width);
  margin-inline: auto;
}

.fact-fiction .section-kicker,
.fact-fiction h2 {
  grid-column: 1;
}

.fact-fiction .section-kicker {
  color: var(--gold);
}

.fact-fiction h2 {
  margin: 0;
  font-size: clamp(3.2rem, 7vw, 6.4rem);
  letter-spacing: -0.035em;
}

.fact-fiction p:last-child {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: end;
  margin: 0;
  color: #d8c7a8;
  font-family: "Alegreya", Georgia, serif;
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  line-height: 1.5;
}

.author {
  display: grid;
  grid-template-columns: minmax(17rem, 0.85fr) minmax(20rem, 1.15fr);
  gap: clamp(3rem, 10vw, 9rem);
  max-width: var(--content-width);
  margin-inline: auto;
  padding: clamp(5rem, 11vw, 10rem) var(--page-gutter);
}

.author-heading {
  position: relative;
}

.author-mark {
  margin: clamp(3rem, 7vw, 6rem) 0 0;
  color: #966c52;
  font-family: "Alegreya", Georgia, serif;
  font-size: clamp(8rem, 18vw, 15rem);
  font-weight: 700;
  line-height: 0.62;
}

.author-copy {
  align-self: center;
  max-width: 39rem;
}

.author-copy p {
  color: #463f37;
}

.author-copy .author-lead {
  color: var(--carbon);
  font-family: "Alegreya", Georgia, serif;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  line-height: 1.42;
}

.author-award {
  display: flex;
  flex-direction: column;
  margin-top: 2.25rem;
  padding: 1.1rem 0 1.1rem 1.25rem;
  border-left: 5px solid var(--gold);
}

.author-award strong {
  color: var(--burnt-edge);
  font-family: "Alegreya", Georgia, serif;
  font-size: 1.3rem;
}

.author-award span {
  color: #685f54;
  font-size: 0.92rem;
}

.works {
  padding-top: 0;
}

.works-heading {
  margin-bottom: 3rem;
}

.book-list {
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(112, 45, 31, 0.55);
  list-style: none;
}

.book-list li {
  display: flex;
  gap: 2rem;
  align-items: baseline;
  justify-content: space-between;
  padding: 1.15rem 0;
  border-bottom: 1px solid rgba(112, 45, 31, 0.3);
}

.book-list cite {
  font-family: "Alegreya", Georgia, serif;
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  font-style: normal;
  line-height: 1.15;
}

.book-list time {
  flex: 0 0 auto;
  color: #685f54;
  font-size: 0.95rem;
}

.closing {
  display: flex;
  gap: 3rem;
  align-items: flex-end;
  justify-content: space-between;
  padding: clamp(4rem, 8vw, 7rem) max(var(--page-gutter), calc((100vw - var(--content-width)) / 2 + var(--page-gutter)));
  background: var(--burnt-edge);
  color: var(--paper);
}

.closing .section-kicker {
  color: var(--manuscript);
}

.closing h2 {
  margin: 0;
  font-size: clamp(2.8rem, 6vw, 5.6rem);
}

.closing-action {
  flex: 0 0 auto;
  text-align: center;
}

.button-light {
  background: var(--paper);
  color: var(--burnt-edge);
}

.button-light:hover {
  border-color: var(--paper);
  background: transparent;
  color: var(--paper);
}

.closing-action p {
  margin: 0.65rem 0 0;
  color: var(--manuscript);
  font-size: 0.82rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  padding: 1.5rem var(--page-gutter);
  background: var(--carbon);
  color: #c7b99f;
  font-size: 0.88rem;
}

.site-footer p {
  margin: 0;
}

.error-page {
  min-height: 100svh;
  background: var(--carbon);
  color: var(--paper);
}

.error-main {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: clamp(2rem, 8vw, 8rem);
  align-items: center;
  max-width: var(--content-width);
  min-height: 100svh;
  margin-inline: auto;
  padding: 7rem var(--page-gutter) 4rem;
}

.error-code {
  margin: 0;
  color: rgba(168, 115, 50, 0.25);
  font-family: "Alegreya", Georgia, serif;
  font-size: clamp(9rem, 25vw, 20rem);
  font-weight: 700;
  line-height: 0.7;
}

.error-copy {
  max-width: 38rem;
}

.error-copy .section-kicker {
  color: var(--gold);
}

.error-copy h1 {
  margin-bottom: 1.5rem;
  font-size: clamp(3.2rem, 7vw, 6rem);
}

.error-copy > p:not(.section-kicker) {
  margin-bottom: 2rem;
  color: var(--manuscript);
}

@media (max-width: 54.99rem) {
  .hero {
    min-height: 0;
    padding-top: 7.5rem;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .cover-wrap {
    width: min(76vw, 23rem);
  }

  .hero-copy {
    max-width: 40rem;
  }

  .opening-lines {
    margin-bottom: 2.5rem;
  }

  .section-heading,
  .fact-inner,
  .author,
  .excerpt {
    grid-template-columns: minmax(0, 1fr);
  }

  .book-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem 0;
  }

  .book-facts div:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .section-heading > p:last-child,
  .fact-fiction p:last-child {
    grid-column: 1;
    grid-row: auto;
    max-width: 39rem;
  }

  .route {
    grid-template-columns: minmax(0, 1fr);
    gap: 3rem;
    padding: 0 0 0 2rem;
  }

  .route::before {
    top: 0;
    bottom: 0;
    left: 0.31rem;
    width: 1px;
    height: auto;
  }

  .route li::before {
    top: 0.3rem;
    left: -2rem;
  }

  .author-mark {
    position: absolute;
    right: 0;
    bottom: -1rem;
    margin: 0;
    font-size: 10rem;
  }

  .author-copy {
    position: relative;
  }

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

  .closing-action {
    text-align: left;
  }

  .error-main {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }
}

@media (max-width: 39.99rem) {
  body {
    font-size: 1.0625rem;
  }

  .site-header {
    align-items: flex-start;
  }

  .site-nav {
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 12rem;
    gap: 0.25rem 1rem;
    font-size: 0.86rem;
  }

  .hero {
    padding-top: 8.5rem;
  }

  .hero-inner {
    gap: 3.5rem;
  }

  .hero-route {
    gap: 0.35rem;
    font-size: 0.84rem;
  }

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

  .book-facts div,
  .book-facts div:nth-child(3) {
    padding: 0 0 0.8rem;
    border-bottom: 1px solid rgba(168, 115, 50, 0.35);
    border-left: 0;
  }

  .book-facts div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .cover-wrap::before {
    inset: 0.75rem -0.75rem -0.75rem 0.75rem;
  }

  .story-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .margin-note {
    min-height: 0;
    padding: 0 0 1.2rem;
    border-right: 0;
    border-bottom: 1px solid rgba(112, 45, 31, 0.45);
  }

  .margin-note span:last-child {
    margin-top: 0.3rem;
  }

  .book-list li,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.25rem;
  }

  .site-footer {
    gap: 0.75rem;
  }
}

@media (max-width: 23.99rem) {
  .site-nav {
    display: block;
    max-width: none;
  }

  .site-nav a:not(:first-child) {
    display: none;
  }
}

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

  .book-cover,
  .cover-wrap::before,
  .opening-lines span {
    animation: none;
    clip-path: none;
    transform: none;
  }
}
