:root {
  --bg: #f5f0e6;
  --bg-soft: #fbf8f1;
  --surface: rgba(255, 252, 246, 0.9);
  --surface-strong: #fffdf8;
  --ink: #2f261f;
  --muted: #63564b;
  --line: #d8cbbb;
  --line-strong: #baa78f;
  --accent: #6c4e38;
  --accent-deep: #4f3828;
  --accent-soft: #e6dbcb;
  --shadow: 0 18px 40px rgba(53, 39, 27, 0.08);
  --radius: 20px;
  --radius-sm: 12px;
  --container: 1180px;
  --measure: 72ch;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.5), transparent 36%),
    linear-gradient(180deg, #ede3d2 0%, #f6f1e9 24%, #f8f4ed 100%);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.7;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover,
a:focus-visible {
  color: var(--accent-deep);
}

button,
a.button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.3rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: #f9f4ee;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

button:hover,
a.button:hover,
.button:hover,
button:focus-visible,
a.button:focus-visible,
.button:focus-visible {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  color: #fffaf4;
  transform: translateY(-1px);
}

.button-secondary {
  background: transparent;
  color: var(--accent-deep);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.site-shell {
  width: min(calc(100% - 2rem), var(--container));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(10px);
  background: rgba(245, 240, 230, 0.9);
  border-bottom: 1px solid rgba(186, 167, 143, 0.5);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 84px;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.brand__title {
  font-size: clamp(1.35rem, 2.1vw, 1.75rem);
  line-height: 1.1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-toggle {
  display: none;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a[aria-current="page"] {
  color: var(--accent-deep);
  background: rgba(230, 219, 203, 0.72);
}

.main {
  padding: 2.5rem 0 4.5rem;
}

.hero {
  position: relative;
  overflow: hidden;
  margin-top: 1rem;
  padding: clamp(2rem, 4vw, 4rem);
  border: 1px solid rgba(186, 167, 143, 0.55);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 251, 244, 0.95), rgba(241, 231, 216, 0.92)),
    url("../images/header_knox_bible.jpg") right top / 34% auto no-repeat;
  box-shadow: var(--shadow);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -4rem -4rem auto;
  width: 18rem;
  height: 18rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(108, 78, 56, 0.1), transparent 70%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 44rem;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0 0 1rem;
  color: var(--accent-deep);
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  line-height: 1.15;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.4rem);
  max-width: 12ch;
}

h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

h3 {
  font-size: 1.28rem;
}

p {
  margin: 0 0 1.15rem;
}

.lede {
  max-width: 46rem;
  font-size: 1.13rem;
  color: var(--muted);
}

.hero__actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.hero__meta,
.stats,
.feature-grid,
.card-grid,
.link-grid,
.detail-grid,
.quote-grid,
.review-list,
.image-grid {
  display: grid;
  gap: 1.25rem;
}

.hero__meta,
.stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 2rem;
}

.stat,
.card,
.quote-card,
.review-card,
.detail-card,
.feature-card,
.link-card,
.callout,
.figure-card {
  border: 1px solid rgba(186, 167, 143, 0.5);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.stat,
.feature-card,
.detail-card,
.link-card,
.callout,
.figure-card,
.card,
.quote-card,
.review-card {
  padding: 1.35rem;
}

.stat strong {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 1.55rem;
  color: var(--accent-deep);
}

.stat span {
  color: var(--muted);
  font-size: 0.95rem;
}

.section {
  margin-top: clamp(2.4rem, 5vw, 4.5rem);
}

.section__intro {
  max-width: 46rem;
  margin-bottom: 1.5rem;
}

.feature-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-grid,
.detail-grid,
.quote-grid,
.image-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.link-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.review-list {
  grid-template-columns: 1fr;
}

.feature-card h3,
.detail-card h3,
.card h3,
.review-card h3,
.link-card h3 {
  margin-bottom: 0.55rem;
}

.feature-card p:last-child,
.detail-card p:last-child,
.card p:last-child,
.review-card p:last-child,
.link-card p:last-child,
.callout p:last-child,
.quote-card p:last-child {
  margin-bottom: 0;
}

.page-header {
  padding: clamp(1.2rem, 3vw, 2rem) clamp(1.9rem, 4vw, 3rem);
  border: 1px solid rgba(186, 167, 143, 0.55);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 252, 247, 0.94), rgba(237, 227, 210, 0.88));
  box-shadow: var(--shadow);
}

.page-header p {
  max-width: 44rem;
  color: var(--muted);
}

.page-header h1 {
  max-width: none;
  font-size: clamp(1.8rem, 3.2vw, 2.7rem);
}

.page-comments .page-header p {
  max-width: none;
}

.page-reviews .page-header p {
  max-width: none;
}

.page-links .page-header p {
  max-width: none;
}

.page-home .page-header p {
  max-width: none;
}

.page-links .link-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.page-links .link-card--featured {
  grid-column: 1 / -1;
}

.page-features .page-header__book-image {
  width: min(75%, 187.5px);
  max-width: 187.5px;
}

.page-header--split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: center;
}

.page-header__media img {
  width: 100%;
  max-width: 210px;
  border-radius: 18px;
  filter: drop-shadow(0 18px 40px rgba(53, 39, 27, 0.08));
}

.page-header__media {
  justify-self: end;
}

.page-header__book-image {
  width: min(100%, 250px);
  max-width: 250px;
  height: auto;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.page-history .page-header__book-image {
  width: min(100%, 350px);
  max-width: 350px;
}

.page-why-unique .page-header__media {
  justify-self: end;
}

.page-why-unique .page-header__media img {
  width: min(100%, 250px);
  max-width: 250px;
}

.figure-card--inline {
  float: right;
  width: min(260px, 42%);
  margin: 0 0 1.25rem 1.5rem;
}

.figure-card--inline img {
  width: 100%;
}

.page-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
  margin-top: 2rem;
}

.article,
.sidebar-panel {
  padding: clamp(1.9rem, 4vw, 3rem);
  border: 1px solid rgba(186, 167, 143, 0.45);
  border-radius: 24px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.article {
  min-width: 0;
}

.article > img,
.article > .full-width,
.article > .figure-card,
.article > .image-grid,
.article > .quote-grid,
.article > .review-list,
.article > .detail-grid {
  max-width: none;
}

.article > .quote-card,
.article > .callout {
  margin-bottom: 2rem;
}

.article > .quote-grid + .quote-grid {
  margin-top: 2rem;
}

.article::after {
  content: "";
  display: block;
  clear: both;
}

.article h2:not(:first-child),
.article h3:not(:first-child) {
  margin-top: 2rem;
}

.article ul,
.article ol {
  margin: 0 0 1.2rem;
  padding-left: 1.2rem;
}

.article li + li {
  margin-top: 0.65rem;
}

.article blockquote,
.quote-card blockquote {
  margin: 0;
  font-size: 1.08rem;
  color: var(--accent-deep);
}

.quote-card cite,
.quote-attribution {
  display: block;
  margin-top: 1rem;
  color: var(--muted);
  font-style: normal;
  font-variant: small-caps;
  letter-spacing: 0.04em;
}

.pull-quote {
  padding: 1.5rem 1.5rem 1.3rem;
  border-left: 3px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(248, 242, 232, 0.95), rgba(255, 252, 247, 0.95));
}

.sidebar-panel {
  position: sticky;
  top: 6.5rem;
}

.sidebar-panel h2,
.sidebar-panel h3 {
  font-size: 1.2rem;
}

.sidebar-panel nav ul,
.resource-list,
.mini-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar-panel nav li + li,
.resource-list li + li,
.mini-list li + li {
  margin-top: 0.55rem;
}

.sidebar-panel nav a,
.resource-list a,
.mini-list a {
  color: var(--muted);
  text-decoration: none;
}

.sidebar-panel nav a:hover,
.resource-list a:hover,
.mini-list a:hover {
  color: var(--accent-deep);
  text-decoration: underline;
}

.figure-card {
  overflow: hidden;
}

.figure-card img {
  border-radius: 14px;
}

.figure-card figcaption {
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: 0.94rem;
}

.review-card summary {
  cursor: pointer;
  list-style: none;
}

.review-card summary::-webkit-details-marker {
  display: none;
}

.review-card summary h3 {
  display: inline;
  margin: 0;
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.review-card summary p {
  margin: 0.55rem 0 0;
  color: var(--muted);
}

.review-card summary:hover h3,
.review-card summary:focus-visible h3 {
  color: var(--accent-deep);
}

.review-card[open] {
  background: #fffdf9;
}

.review-card .review-body {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.review-card .review-source {
  margin-bottom: 0.2rem;
  color: var(--muted);
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.site-footer {
  margin-top: 4rem;
  padding: 2rem 0 3rem;
  border-top: 1px solid rgba(186, 167, 143, 0.55);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2rem;
}

.site-footer__nav--single {
  grid-column: 1 / -1;
}

.site-footer p,
.site-footer li {
  color: var(--muted);
  font-size: 0.96rem;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li + li {
  margin-top: 0.5rem;
}

.site-footer__credit {
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.not-found {
  min-height: calc(100vh - 84px);
  display: grid;
  place-items: center;
}

.not-found .page-header {
  max-width: 42rem;
  text-align: center;
}

.mobile-only {
  display: none;
}

@media (max-width: 980px) {
  .page-layout,
  .site-footer__inner {
    grid-template-columns: 1fr;
  }

  .sidebar-panel {
    position: static;
  }

  .link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body {
    font-size: 17px;
  }

  .site-header__inner {
    min-height: 76px;
    align-items: start;
    padding: 0.9rem 0;
  }

  .nav-toggle {
    display: inline-flex;
    margin-top: 0.2rem;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 0.6rem);
    left: 1rem;
    right: 1rem;
    display: none;
    padding: 1rem;
    border: 1px solid rgba(186, 167, 143, 0.6);
    border-radius: 20px;
    background: rgba(255, 251, 245, 0.98);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav a {
    padding: 0.7rem 0.85rem;
  }

  .hero {
    background:
      linear-gradient(135deg, rgba(255, 251, 244, 0.96), rgba(241, 231, 216, 0.94));
  }

  .hero__meta,
  .stats,
  .feature-grid,
  .card-grid,
  .detail-grid,
  .quote-grid,
  .link-grid,
  .image-grid,
  .page-header--split {
    grid-template-columns: 1fr;
  }

  .page-header__media img {
    margin: 0 auto;
    max-width: 260px;
  }

  .page-header__media {
    justify-self: center;
  }

  .page-why-unique .page-header__media {
    justify-self: center;
  }

  .page-why-unique .page-header__media img {
    margin: 0 auto;
  }

  .page-header__book-image {
    height: auto;
    max-height: 330px;
  }

  .figure-card--inline {
    float: none;
    width: 100%;
    max-width: 260px;
    margin: 0 0 1.25rem;
  }

  .mobile-only {
    display: inline-flex;
  }
}
