*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

:root {
  --font-optima-like:
    Optima,
    "Optima LT Pro",
    "Optima LT Std",
    "Optima Nova",
    Candara,
    Calibri,
    "Tenor Sans",
    "Segoe UI",
    sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: #000000;
  color: #e8e8e8;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.6;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background-color: #000000;
  border-bottom: 1px solid #2a2a2a;
}

.top-nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.2rem 1rem;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.25rem 2rem;
}

.nav-list > li > a {
  display: block;
  padding: 0.3rem 0.25rem;
  color: #f0f0f0;
  text-decoration: none;
  font-family: var(--font-optima-like);
  font-weight: 500;
  letter-spacing: 0.06em;
  font-size: 1rem;
}

.nav-list > li > a:hover,
.nav-list > li > a:focus-visible {
  color: #d4af37;
  outline: none;
}

.nav-item-dropdown {
  position: relative;
}

.dropdown-menu {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 100%;
  min-width: 10rem;
  background-color: #0a0a0a;
  border: 1px solid #333;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

.nav-item-dropdown:hover .dropdown-menu,
.nav-item-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.dropdown-menu a {
  display: block;
  padding: 0.5rem 1rem;
  color: #e0e0e0;
  text-decoration: none;
  font-family: var(--font-optima-like);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.dropdown-menu a:hover,
.dropdown-menu a:focus-visible {
  background-color: #1a1a1a;
  color: #d4af37;
  outline: none;
}

.sidebar-float {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 150;
  padding: 0.5rem;
  pointer-events: none;
}

.sidebar-float-inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
  max-width: min(28vw, 220px);
  pointer-events: auto;
}

.sidebar-book-block {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
}

.sidebar-float img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.6));
}

.sidebar-buy-holder {
  width: 100%;
}

.sidebar-buy-btn {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.45rem 0.35rem;
  box-sizing: border-box;
  font-family: var(--font-optima-like);
  font-weight: 500;
  font-size: clamp(0.65rem, 1.85vw, 0.88rem);
  letter-spacing: 0.04em;
  color: #f0f0f0;
  background-color: #0a0a0a;
  border: 1px solid #3a3a3a;
  border-radius: 2px;
  cursor: pointer;
  text-align: center;
}

.sidebar-buy-btn:hover,
.sidebar-buy-btn:focus-visible {
  color: #d4af37;
  border-color: #d4af37;
  outline: none;
}

.main-with-sidebar {
  padding-left: min(30vw, 240px);
  padding-right: 1rem;
}

@media (max-width: 640px) {
  .main-with-sidebar {
    padding-left: min(26vw, 120px);
  }

  .sidebar-float-inner {
    max-width: min(26vw, 140px);
  }

  .sidebar-float img {
    max-width: 100%;
  }
}

.hero {
  background-color: #000000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 0 1rem 3rem;
  text-align: center;
}

.hero-divider {
  width: 100%;
  max-width: 1100px;
  height: auto;
  display: block;
}

.hero-title {
  width: 100%;
  max-width: min(92vw, 720px);
  height: auto;
  display: block;
}

.hero-intro {
  max-width: min(92vw, 720px);
  margin-top: 0.25rem;
}

.intro-lede {
  margin: 0;
  font-size: 1.05rem;
  color: #c8c8c8;
  font-family: var(--font-optima-like);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.65;
}

section[id] {
  scroll-margin-top: 4rem;
}

.section-heading {
  margin: 0 0 1rem;
  font-size: 1.35rem;
  font-weight: normal;
  letter-spacing: 0.08em;
  text-align: center;
  color: #f0f0f0;
}

#about .section-heading {
  font-family: var(--font-optima-like);
  font-weight: 500;
  letter-spacing: 0.06em;
}

#about .landing-inner p {
  font-family: var(--font-optima-like);
  letter-spacing: 0.02em;
  line-height: 1.65;
}

#about .landing-inner a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

#about .landing-inner a:hover,
#about .landing-inner a:focus-visible {
  color: #d4af37;
  outline: none;
}

.landing {
  background-color: #000000;
  padding: 2rem 1rem 3rem;
}

.landing-inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.landing-inner p {
  margin: 0;
  font-size: 1.05rem;
  color: #c8c8c8;
}

.page-block {
  background-color: #000000;
  padding: 2rem 1rem 4rem;
  display: flex;
  justify-content: center;
}

.page-block:has(+ .page-block) {
  padding-bottom: 0.75rem;
}

.page-block:has(+ .divider-row) {
  padding-bottom: 0.75rem;
}

.page-block + .page-block {
  padding-top: 0.35rem;
}

.divider-row + .page-block {
  padding-top: 0.35rem;
}

.divider-row {
  background-color: #000000;
  padding: 0.35rem 1rem 1rem;
  display: flex;
  justify-content: center;
}

.page-block img {
  width: 100%;
  max-width: min(92vw, 900px);
  height: auto;
  display: block;
}

.book-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.75rem 1rem 1rem;
  box-sizing: border-box;
  background-color: rgba(0, 0, 0, 0.88);
  cursor: pointer;
}

.book-preview-overlay[hidden] {
  display: none;
}

.book-preview-inner {
  position: relative;
  max-width: min(92vw, 520px);
  width: 100%;
  cursor: default;
}

.book-preview-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(85vh, 900px);
  object-fit: contain;
  margin: 0 auto;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.5));
}

.book-preview-close {
  position: absolute;
  top: -2.35rem;
  right: 0;
  margin: 0;
  padding: 0.15rem 0.55rem;
  font-family: var(--font-optima-like);
  font-size: 1.75rem;
  line-height: 1;
  color: #e8e8e8;
  background: transparent;
  border: 1px solid #555;
  border-radius: 2px;
  cursor: pointer;
}

.book-preview-close:hover,
.book-preview-close:focus-visible {
  color: #d4af37;
  border-color: #d4af37;
  outline: none;
}
