@font-face {
  font-family: "Instrument Serif";
  src: url("./assets/instrument-serif.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("./assets/instrument-serif-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("./assets/dm-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --dark: #141714;
  --deep: #191d19;
  --green: #222821;
  --card: #20251f;
  --text: #f2ece0;
  --soft: #d2cabc;
  --muted: #bfb6a6;
  --gold: #d4ae7c;
  --line: #48473a;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 0; background: var(--dark); color: var(--text); font: 400 1rem/1.65 var(--sans); }
a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
h1, h2, h3 { font: 400 1em/.98 var(--serif); }
h2 { font-size: clamp(3.25rem, 6vw, 5.7rem); }
h3 { font-size: clamp(3rem, 5vw, 4.75rem); }
h1 em, h2 em { font-weight: inherit; color: var(--gold); }
section[id] { scroll-margin-top: 1rem; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #f5c887; outline-offset: 4px; }
#main:focus { outline: none; }

.frame { width: min(100% - 6rem, 74rem); margin-inline: auto; }
.eyebrow {
  color: var(--gold);
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .19em;
  text-transform: uppercase;
}
.eyebrow span { margin-inline: .25em; }
.skip-link { position: fixed; z-index: 10; top: .75rem; left: .75rem; padding: .5rem .9rem; transform: translateY(-150%); background: var(--text); color: var(--dark); }
.skip-link:focus { transform: translateY(0); }

.site-header { position: relative; z-index: 1; background: #151915; border-bottom: 1px solid #3b3c30; }
.site-header-inner {
  width: min(100% - 6rem, 84rem);
  min-height: 4.75rem;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  text-decoration: none;
  white-space: nowrap;
  font: 400 1.9rem/1.1 var(--serif);
  letter-spacing: .015em;
}
.brand-mark { color: var(--gold); font: 400 1.55rem/1 Georgia, serif; }
.site-nav { display: flex; align-items: center; gap: clamp(.7rem, 3vw, 2.65rem); }
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--soft);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  line-height: 1.2;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--gold); }
.site-nav .nav-updates { gap: .5rem; padding-inline: .9rem; color: var(--gold); border: 1px solid #76654d; }

.hero { position: relative; isolation: isolate; display: grid; align-items: center; min-height: clamp(38rem, 49vw, 47rem); overflow: hidden; border-bottom: 1px solid var(--line); background: #181d18; }
.hero-art, .hero::before { position: absolute; inset: 0; }
.hero-art { z-index: -2; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: center 58%; }
.hero::before {
  z-index: -1;
  content: "";
  background: linear-gradient(90deg, rgba(14, 18, 15, .80) 0%, rgba(17, 21, 17, .66) 27%, rgba(18, 22, 18, .20) 57%, rgba(18, 22, 18, 0) 84%),
    linear-gradient(0deg, rgba(15, 18, 15, .60), transparent 38%);
}
.hero-inner { padding-block: 5.25rem 5.7rem; }
.hero-kicker { display: flex; align-items: center; gap: .65rem; letter-spacing: .19em; }
.hero-kicker span { width: .28rem; height: .28rem; margin: 0; background: var(--gold); transform: rotate(45deg); }
.hero h1 { margin-top: 1.2rem; font-size: clamp(6.3rem, 9.4vw, 9.2rem); line-height: .86; letter-spacing: -.028em; }
.hero-description { max-width: 29rem; margin-top: 1.8rem; color: #e5dbcb; font-size: clamp(1rem, 1.25vw, 1.15rem); line-height: 1.62; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.85rem; }
.button {
  min-height: 3.05rem;
  padding: .62rem 1.05rem;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  border: 1px solid var(--gold);
  font-size: .83rem;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
  transition: background-color .2s, border-color .2s;
}
.arrow {
  position: relative;
  flex: 0 0 .78rem;
  width: .78rem;
  height: .78rem;
  display: inline-block;
}
.arrow::before, .arrow::after { position: absolute; content: ""; }
.arrow::before { inset: 50% .08rem auto .02rem; border-top: 1px solid; }
.arrow::after { right: .08rem; top: 50%; width: .42rem; height: .42rem; border-top: 1px solid; border-right: 1px solid; transform: translateY(-50%) rotate(45deg); }
.arrow-down { transform: rotate(90deg); }
.arrow-up { transform: rotate(-90deg); }
.button-primary { background: var(--gold); color: #211c15; }
.button-primary:hover { background: #ecd1a6; border-color: #ecd1a6; }
.button-secondary { background: #181c18a6; border-color: #a7987f; color: var(--text); }
.button-secondary:hover { background: #36372a; border-color: var(--gold); }
.hero-credit {
  position: absolute;
  right: max(3rem, calc((100vw - 84rem) / 2));
  bottom: 1.7rem;
  display: flex;
  align-items: center;
  gap: .65rem;
  color: #ded2be;
  font-size: .66rem;
  letter-spacing: .17em;
  text-transform: uppercase;
}
.hero-credit span { display: block; width: 1.7rem; height: 1px; background: var(--gold); }

.book-section { padding-block: clamp(3.8rem, 7vw, 6.25rem); background: var(--deep); }
.book-layout { display: grid; grid-template-columns: .98fr 1fr; align-items: start; gap: clamp(2rem, 7vw, 7rem); }
.book-layout h2 { margin-top: .85rem; }
.book-description { padding-top: .3rem; }
.book-description p, .entry-copy > p:not(.eyebrow), .author-copy > p:not(.eyebrow) { color: var(--soft); }
.book-description p + p, .entry-copy > p + p, .author-copy > p + p { margin-top: .85rem; }
.text-link {
  display: inline-flex;
  gap: .5rem;
  align-items: center;
  color: var(--gold);
  text-decoration-color: #8b775a;
  text-underline-offset: .32em;
  font-size: .86rem;
  font-weight: 700;
}
.text-link:hover { color: #f8d7a7; }
.book-description .text-link { margin-top: 1.15rem; min-height: 2.75rem; }

.explorer-section { padding-block: clamp(3.85rem, 7.6vw, 7rem); background: var(--green); border-block: 1px solid #3f4235; }
.explorer-heading { margin: 0 auto 2rem; text-align: center; }
.explorer-heading .eyebrow span { font-family: Georgia, serif; }
.explorer-heading h2 { margin-top: .7rem; }
.explorer-heading > p:last-child { margin-top: .85rem; color: var(--soft); }
.explorer { width: min(100%, 66rem); margin-inline: auto; }
.entry-nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid #64614f; scroll-margin-top: 1rem; }
.entry-nav a {
  display: grid;
  align-items: center;
  min-height: 3.45rem;
  padding: .55rem .4rem;
  border-inline-end: 1px solid #64614f;
  background: #242a23;
  color: var(--soft);
  text-align: center;
  text-decoration: none;
  font-size: .83rem;
  font-weight: 600;
  line-height: 1.2;
}
.entry-nav a:last-child { border-inline-end: 0; }
.entry-nav a:hover { background: #333b30; color: var(--text); }
.entry-nav a[aria-selected="true"] { color: #282318; background: #d2b387; }
.entry-nav a:focus-visible { position: relative; z-index: 1; outline-offset: -4px; outline-color: #f9e5c2; }
.entry-nav a[aria-selected="true"]:focus-visible { outline-color: #302d20; }
.entry {
  display: grid;
  grid-template-columns: .83fr 1fr;
  grid-template-rows: minmax(28rem, auto);
  background: var(--card);
  border: 1px solid #64614f;
  border-top: 0;
  scroll-margin-top: 4.55rem;
}
.explorer:not([data-enhanced]) .entry + .entry { margin-top: 1rem; border-top: 1px solid #64614f; }
.entry-art { position: relative; overflow: hidden; background: #20241d; }
.entry-art img { position: absolute; width: 100%; height: 100%; object-fit: cover; }
.entry-copy { align-self: center; padding: clamp(1.65rem, 4vw, 3.45rem); }
.entry-copy h3 { margin: .6rem 0 .85rem; }
.entry-copy .related { margin-top: 1.1rem; padding-top: .75rem; border-top: 1px solid #585545; }
.related p { margin-bottom: .25rem; color: var(--muted); font-size: .68rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.related a { display: flex; align-items: center; justify-content: space-between; gap: .65rem; width: fit-content; min-height: 2.75rem; color: var(--gold); font-size: .83rem; font-weight: 600; text-decoration-color: #8b775a; text-underline-offset: .28em; }
.related a:hover { color: #f8d7a7; }

.author-section { padding-block: clamp(3.5rem, 7vw, 6.5rem); background: var(--deep); }
.author-layout { display: grid; grid-template-columns: minmax(0, .76fr) minmax(0, 1fr); align-items: center; gap: clamp(2.5rem, 9vw, 9rem); width: min(100% - 6rem, 62rem); }
.author-art { padding: .45rem; border: 1px solid #6b604e; }
.author-art img { width: 100%; height: auto; aspect-ratio: 1.15; object-fit: cover; }
.author-copy h2 { margin: .65rem 0 1rem; }

.updates-section { padding-block: clamp(3.5rem, 7vw, 6rem); background: #252921; border-block: 1px solid #49483b; }
.updates-section h2 { margin: .65rem 0 1.8rem; }
.update-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid #5b5748; }
.update-list > div { padding: 1.15rem 1.25rem; }
.update-list > div + div { border-inline-start: 1px solid #5b5748; }
.update-list dt { margin-bottom: .3rem; font: 400 clamp(1.55rem, 2.4vw, 2rem)/1.05 var(--serif); }
.update-list dd { color: var(--muted); font-size: .84rem; }

.site-footer { padding-block: 1.45rem; }
.footer-layout { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.site-footer .text-link { min-height: 2.75rem; }

@media (max-width: 900px) {
  .frame, .site-header-inner, .author-layout { width: calc(100% - 3.25rem); }
  .hero-credit { right: 1.625rem; }
  .book-layout { gap: 2rem; }
  .entry { grid-template-columns: .77fr 1fr; }
}

@media (max-width: 700px) {
  .frame, .site-header-inner, .author-layout { width: calc(100% - 2.25rem); }
  .site-header-inner { min-height: 4.35rem; }
  .site-nav { gap: .75rem; }
  .site-nav a { font-size: .68rem; letter-spacing: .08em; }
  .site-nav .nav-updates { padding-inline: .6rem; }
  .hero h1 { font-size: clamp(5.4rem, 13.5vw, 7rem); }
  .hero-credit { display: none; }
  .book-layout, .author-layout { grid-template-columns: 1fr; gap: 1.4rem; }
  .book-description { padding-top: 0; }
  .entry { grid-template-columns: 1fr; grid-template-rows: auto; }
  .entry-art { min-height: clamp(15rem, 56vw, 22rem); }
  .entry-art img { object-position: center 35%; }
  .author-art { width: min(100%, 25rem); }
  .author-copy { grid-row: 1; }
  .update-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .update-list > div:nth-child(3) { border-inline-start: 0; }
  .update-list > div:nth-child(n + 3) { border-top: 1px solid #5b5748; }
}

@media (max-width: 640px) {
  .hero { min-height: 37rem; align-items: end; }
  .hero::before { background: linear-gradient(0deg, #111511 4%, #141814eb 30%, #141814a0 55%, #14181400 90%); }
  .hero-art img { object-position: center 41%; }
  .hero-inner { padding-block: 10rem 2.9rem; }
  .hero-description { max-width: 27rem; margin-top: 1.3rem; }
  .hero-actions { margin-top: 1.35rem; }
}

@media (max-width: 520px) {
  .site-header-inner { display: grid; gap: 0; min-height: 0; padding-top: .75rem; }
  .site-header .wordmark { justify-self: start; min-height: 2.35rem; }
  .site-nav { gap: clamp(.6rem, 4vw, 1.55rem); }
  .site-nav .nav-updates { padding-inline: 0; border: 0; }
  .hero h1 { font-size: clamp(4.4rem, 14.6vw, 5.5rem); }
  .hero-kicker { font-size: .62rem; }
  .entry-nav { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .entry-nav a { grid-column: span 2; min-height: 2.8rem; }
  .entry-nav a:nth-child(3) { border-inline-end: 0; }
  .entry-nav a:nth-child(n + 4) { grid-column: span 3; border-top: 1px solid #64614f; }
  .entry { scroll-margin-top: 6.75rem; }
  .update-list > div { padding: .95rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; }
}
