:root {
  --ink: #2c2118;
  --ink-soft: #5a4635;
  --bronze: #8a5b2c;
  --bronze-dark: #503018;
  --gold: #c99b55;
  --ember: #8e3d24;
  --night: #17130f;
  --night-2: #241b14;
  --paper: #e8d7ad;
  --paper-light: #f4e6bf;
  --paper-dark: #cbb27c;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.04), transparent 25%),
    radial-gradient(circle at 80% 0%, rgba(155,86,37,.12), transparent 30%),
    linear-gradient(135deg, #0e0c0a, #241a13 52%, #100d0a);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .22;
  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(255,255,255,.018) 0,
      rgba(255,255,255,.018) 1px,
      transparent 1px,
      transparent 4px
    );
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.page-shell {
  width: min(1500px, 100%);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 30px;
  color: #f2e5c9;
  background:
    linear-gradient(rgba(18,14,10,.95), rgba(25,18,13,.93)),
    radial-gradient(circle at center, rgba(139,77,38,.25), transparent 60%);
  border-bottom: 1px solid rgba(211,157,82,.35);
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
  backdrop-filter: blur(8px);
}

.brand-block {
  min-width: 280px;
}

.eyebrow {
  color: #bca27f;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .68rem;
}

h1 {
  margin: 2px 0 0;
  font-size: clamp(2.3rem, 5vw, 4.2rem);
  line-height: .92;
  letter-spacing: .12em;
  font-weight: 600;
  text-shadow: 0 0 22px rgba(206,140,67,.18);
}

.subtitle {
  color: #d6c09f;
  margin-top: 6px;
  font-style: italic;
  font-size: .95rem;
}

.top-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  border: 1px solid rgba(205,163,99,.24);
  background: rgba(255,255,255,.02);
  color: #e2cfad;
  padding: 8px 11px;
  border-radius: 4px;
  text-decoration: none;
  transition: .18s ease;
}

.nav-link:hover {
  color: white;
  border-color: rgba(221,171,96,.72);
  background: rgba(157,93,42,.16);
  transform: translateY(-1px);
}

.layout {
  display: grid;
  grid-template-columns: 275px minmax(0, 1fr);
  gap: 34px;
  padding: 34px 32px 60px;
  align-items: start;
}

.chapter-panel {
  position: sticky;
  top: 142px;
  color: #e5d3b6;
  background:
    linear-gradient(rgba(36,25,18,.96), rgba(21,16,12,.96)),
    radial-gradient(circle at 50% 0, rgba(169,100,49,.25), transparent 50%);
  border: 1px solid rgba(207,161,91,.28);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(0,0,0,.38);
  overflow: hidden;
}

.ornament {
  text-align: center;
  font-size: 2rem;
  padding: 18px 0 8px;
  color: #b77f46;
  text-shadow: 0 0 16px rgba(198,128,55,.28);
}

.chapter-heading {
  padding: 0 18px 14px;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .22em;
  color: #9f8568;
  text-align: center;
  border-bottom: 1px solid rgba(208,163,96,.15);
}

.chapter-list {
  max-height: calc(100vh - 310px);
  overflow-y: auto;
  padding: 10px;
}

.chapter-item {
  position: relative;
  width: 100%;
  color: #c9b79d;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.05);
  padding: 12px 10px 12px 34px;
  text-align: left;
  transition: .18s ease;
}

.chapter-item::before {
  content: "◆";
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%) scale(.72);
  color: #72513a;
  transition: .18s ease;
}

.chapter-item:hover,
.chapter-item.active {
  color: #fff2d2;
  background: linear-gradient(90deg, rgba(142,61,36,.28), rgba(255,255,255,.015));
  padding-left: 40px;
}

.chapter-item:hover::before,
.chapter-item.active::before {
  color: #c88b49;
  content: "⚔";
  transform: translateY(-50%) scale(.9);
}

.chapter-number {
  display: block;
  font-size: .67rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #8e765f;
}

.chapter-name {
  display: block;
  margin-top: 3px;
  font-size: .98rem;
}

.sidebar-note {
  margin: 12px;
  padding: 14px;
  border: 1px solid rgba(193,145,80,.18);
  background: rgba(0,0,0,.14);
  color: #9e8b73;
  font-size: .8rem;
  line-height: 1.5;
}

.sidebar-note strong,
.sidebar-note span {
  display: block;
}

.sidebar-note strong {
  color: #ceb187;
  margin-bottom: 4px;
}

.reading-wrap {
  min-width: 0;
}

.parchment {
  position: relative;
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(34px, 6vw, 78px);
  background:
    linear-gradient(rgba(255,247,220,.38), rgba(255,245,215,.12)),
    repeating-linear-gradient(
      0deg,
      rgba(108,78,43,.025) 0,
      rgba(108,78,43,.025) 1px,
      transparent 1px,
      transparent 5px
    ),
    radial-gradient(circle at 18% 16%, rgba(255,255,255,.28), transparent 26%),
    radial-gradient(circle at 88% 85%, rgba(96,57,27,.11), transparent 24%),
    var(--paper);
  border: 1px solid #a6844c;
  box-shadow:
    0 30px 65px rgba(0,0,0,.48),
    inset 0 0 70px rgba(94,62,25,.19),
    inset 0 0 7px rgba(91,54,19,.3);
}

.parchment::after {
  content: "";
  position: absolute;
  inset: 10px;
  pointer-events: none;
  border: 1px solid rgba(115,77,36,.18);
}

.corner {
  position: absolute;
  width: 54px;
  height: 54px;
  opacity: .42;
  pointer-events: none;
}

.corner::before,
.corner::after {
  content: "";
  position: absolute;
  background: var(--bronze-dark);
}

.corner::before {
  width: 38px;
  height: 1px;
  top: 13px;
  left: 8px;
}

.corner::after {
  width: 1px;
  height: 38px;
  top: 8px;
  left: 13px;
}

.corner-tr {
  right: 8px;
  top: 8px;
  transform: rotate(90deg);
}

.corner-tl {
  left: 8px;
  top: 8px;
}

.corner-br {
  right: 8px;
  bottom: 8px;
  transform: rotate(180deg);
}

.corner-bl {
  left: 8px;
  bottom: 8px;
  transform: rotate(270deg);
}

.chapter-kicker {
  text-align: center;
  color: #795f3e;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-size: .78rem;
}

#chapterTitle {
  margin: 10px 0 12px;
  text-align: center;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 500;
  line-height: 1.05;
  color: #392818;
}

.chapter-rule {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 auto 40px;
  max-width: 360px;
  color: #8a6738;
}

.chapter-rule::before,
.chapter-rule::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(to right, transparent, #85663d, transparent);
}

.chapter-body {
  font-size: 1.12rem;
  line-height: 1.85;
  text-align: left;
}

.chapter-body p {
  margin: 0 0 1.25em;
}

.dropcap::first-letter {
  float: left;
  font-size: 4.5rem;
  line-height: .8;
  padding: .12em .12em 0 0;
  color: #6e4023;
  font-family: Georgia, serif;
}

.chapter-controls {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 30px;
  margin-top: 36px;
  border-top: 1px solid rgba(83,57,30,.2);
}

.chapter-controls button,
.seal-button {
  border: 1px solid #7e5932;
  background: linear-gradient(#92552f, #65351f);
  color: #f8e8c8;
  padding: 10px 16px;
  border-radius: 3px;
  box-shadow: inset 0 1px rgba(255,255,255,.14);
}

.chapter-controls button:hover,
.seal-button:hover {
  filter: brightness(1.08);
}

.chapter-controls button:disabled {
  opacity: .32;
  cursor: default;
  filter: none;
}

.book-section {
  margin-top: 58px;
  padding-top: 44px;
  border-top: 1px solid rgba(93,62,31,.22);
}

.section-symbol {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin: -68px auto 12px;
  background: var(--paper);
  font-size: 1.45rem;
  color: #674328;
}

.book-section h3 {
  text-align: center;
  font-size: 1.55rem;
  color: #4f331e;
  margin: 0 0 18px;
}

.section-intro,
.small-note {
  color: #725b42;
  font-size: .93rem;
}

.star-row {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
}

.star-row button {
  border: 0;
  background: transparent;
  color: #8d765b;
  font-size: 2.2rem;
  transition: .15s ease;
  padding: 0 3px;
}

.star-row button:hover,
.star-row button.active {
  color: #9a572c;
  transform: translateY(-2px) scale(1.05);
}

.rating-text {
  text-align: center;
  color: #6e563d;
  margin-top: 10px;
}

.comment-form {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  border: 1px solid rgba(102,67,34,.4);
  background: rgba(255,250,230,.45);
  color: #3b2a1e;
  border-radius: 3px;
  padding: 11px 12px;
  outline: none;
}

.comment-form textarea {
  min-height: 120px;
  resize: vertical;
}

.comment-form input:focus,
.comment-form textarea:focus {
  border-color: #80512e;
  box-shadow: 0 0 0 2px rgba(123,77,39,.08);
}

.seal-button {
  width: max-content;
}

.comment-list {
  display: grid;
  gap: 13px;
  margin-top: 24px;
}

.comment-card {
  padding: 14px 16px;
  background: rgba(255,248,222,.35);
  border-left: 3px solid #82542f;
  box-shadow: 0 1px rgba(255,255,255,.3);
}

.comment-card strong {
  color: #5a371f;
}

.comment-card .date {
  color: #8b7258;
  font-size: .75rem;
  margin-left: 8px;
}

.comment-card p {
  margin: 8px 0 0;
  white-space: pre-wrap;
}

.site-footer {
  max-width: 920px;
  margin: 20px auto 0;
  color: #8f7961;
  font-size: .78rem;
  text-align: center;
}

.footer-mark {
  margin: 0 9px;
  color: #6e4a2d;
}

@media (max-width: 900px) {
  .site-header {
    position: relative;
    flex-direction: column;
    align-items: flex-start;
  }

  .top-nav {
    justify-content: flex-start;
  }

  .layout {
    grid-template-columns: 1fr;
    padding: 20px 14px 45px;
  }

  .chapter-panel {
    position: relative;
    top: auto;
  }

  .chapter-list {
    max-height: 270px;
  }
}

@media (max-width: 600px) {
  .site-header {
    padding: 16px;
  }

  .top-nav {
    gap: 5px;
  }

  .nav-link {
    font-size: .84rem;
    padding: 7px 9px;
  }

  .parchment {
    padding: 36px 22px;
  }

  .chapter-body {
    font-size: 1.02rem;
    line-height: 1.75;
  }

  .chapter-controls {
    flex-direction: column;
  }

  .chapter-controls button {
    width: 100%;
  }
}


/* CONTACT PAGE */
.active-nav {
  color: #fff2d2;
  border-color: rgba(221,171,96,.72);
  background: rgba(157,93,42,.16);
}

.contact-layout {
  padding: 44px 20px 60px;
}

.contact-parchment {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(34px, 6vw, 70px);
  background:
    linear-gradient(rgba(255,247,220,.38), rgba(255,245,215,.12)),
    repeating-linear-gradient(
      0deg,
      rgba(108,78,43,.025) 0,
      rgba(108,78,43,.025) 1px,
      transparent 1px,
      transparent 5px
    ),
    radial-gradient(circle at 18% 16%, rgba(255,255,255,.28), transparent 26%),
    radial-gradient(circle at 88% 85%, rgba(96,57,27,.11), transparent 24%),
    var(--paper);
  border: 1px solid #a6844c;
  box-shadow:
    0 30px 65px rgba(0,0,0,.48),
    inset 0 0 70px rgba(94,62,25,.19),
    inset 0 0 7px rgba(91,54,19,.3);
}

.contact-title {
  margin: 10px 0 12px;
  text-align: center;
  font-size: clamp(2rem, 4vw, 3.1rem);
  font-weight: 500;
  line-height: 1.05;
  color: #392818;
}

.contact-intro {
  text-align: center;
  color: #68503a;
  margin: 0 auto 28px;
  max-width: 560px;
  line-height: 1.65;
}

.contact-form {
  display: grid;
  gap: 18px;
}

.contact-form label {
  display: grid;
  gap: 7px;
  color: #533820;
  font-weight: bold;
  font-size: .94rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(102,67,34,.45);
  background: rgba(255,250,230,.48);
  color: #3b2a1e;
  border-radius: 3px;
  padding: 12px 13px;
  outline: none;
}

.contact-form textarea {
  min-height: 190px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #80512e;
  box-shadow: 0 0 0 2px rgba(123,77,39,.08);
}

.contact-submit {
  margin-top: 4px;
  justify-self: start;
}

.contact-note {
  margin: 24px 0 0;
  color: #7b6349;
  font-size: .8rem;
  line-height: 1.5;
}

@media (max-width: 600px) {
  .contact-layout {
    padding: 20px 12px 45px;
  }

  .contact-parchment {
    padding: 34px 22px;
  }

  .contact-submit {
    width: 100%;
  }
}


.rating-display span {
  color: #8d765b;
  font-size: 2.2rem;
  padding: 0 3px;
}

.rating-display span.active {
  color: #9a572c;
}
