/* =============================================
   The Nearest Thing to Heaven
   Colors: #d93741 (red), #2d2e32 (dark)
   Fonts: Courier Prime, Arial
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:ital,wght@0,400;0,700;1,400&display=swap');

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

html, body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  color: #2d2e32;
  background: #fff;
}

a { color: inherit; text-decoration: none; }

/* ── Mobile-only header (hamburger bar) ── */
.mobile-header {
  display: none;
  justify-content: flex-end;
  padding: 12px 24px;
  background: #fff;
}

/* ── Site nav (desktop: inside content grid, mobile: hidden) ── */
.site-nav {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 0 14px;
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-size: 17px;
  font-weight: 700;
  padding-left: 16px;
  padding-top: 0;
}

.site-nav a,
.site-nav .kudos {
  color: #d93741;
  cursor: pointer;
  line-height: 1.6;
  white-space: nowrap;
}

.site-nav a:hover { opacity: 0.75; }
.site-nav .kudos { color: #d93741; }

/* ── Names block (sits above books in same column) ── */
.names-block {
  min-width: 0;
  padding-bottom: 0;
}

.names-block img {
  display: block;
  width: 100%;
  max-width: 700px;
  height: auto;
}

/* ── Page top (maps page: names + nav in a flex row) ── */
.page-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.page-top .names-img {
  flex: 1;
  min-width: 0;
  display: block;
  height: auto;
  max-width: 700px;
  margin-bottom: 0;
}

.page-top .site-nav {
  flex-shrink: 0;
  width: 270px;
}

/* hamburger – shown only inside mobile-header */
.hamburger-btn {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #2d2e32;
}

/* ── Mobile Drawer ── */
.mobile-drawer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
}

.mobile-drawer.open { display: block; }

.drawer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
}

.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 75%;
  max-width: 320px;
  height: 100%;
  background: #fff;
  padding: 32px 40px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.drawer-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #aaa;
  line-height: 1;
}

.drawer-panel a,
.drawer-panel .kudos {
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-size: 22px;
  color: #2d2e32;
  display: block;
}

.drawer-panel a:hover { color: #d93741; }
.drawer-panel .kudos { color: #2d2e32; cursor: default; }

/* ── Home Page ── */
.home-main {
  display: grid;
  grid-template-columns: 1fr 270px;
  grid-template-rows: auto auto;
  gap: 12px 0;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 40px 40px;
}

/* Row 1: names in col 1, nav in col 2 — nav centers on the names height */
.home-main .names-block { grid-column: 1; grid-row: 1; }
.home-main .site-nav    { grid-column: 2; grid-row: 1; align-self: center; }
/* Row 2: content in col 1, buy-now in col 2 */
.home-main .content-left { grid-column: 1; grid-row: 2; }
.home-main .buy-now      { grid-column: 2; grid-row: 2; }

.content-left {
  min-width: 0;
}

.names-img {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 16px;
}

.covers-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.covers-gallery img {
  display: block;
  width: 100%;
  height: auto;
  cursor: pointer;
}

.inline-nav {
  display: flex;
  justify-content: center;
  gap: 20px;
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-size: 18px;
  color: #d93741;
  padding: 14px 0;
}

.inline-nav a { color: #d93741; }
.inline-nav a:hover { opacity: 0.8; }
.inline-nav .kudos { color: #d93741; cursor: default; }

.blurb {
  font-family: Arial, sans-serif;
  font-size: 16px;
  line-height: 1.3;
  color: #2d2e32;
  margin: 0;
  padding-top: 8px;
}

.blurb em {
  color: #d93741;
  font-style: italic;
}

/* Buy Now sidebar */
.buy-now {
  padding: 70px 0 0 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.buy-label {
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-size: 20px;
  font-weight: 700;
  color: #2d2e32;
  margin: 0 0 4px;
}

.amazon-link {
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-size: 15px;
  font-weight: 700;
  color: #d93741;
  text-decoration: underline;
  display: block;
  margin-bottom: 12px;
  line-height: 2.1;
}

.amazon-link:hover { opacity: 0.8; }

.audiobook-text {
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-size: 14px;
  color: #2d2e32;
  margin: 0;
  line-height: 1.2;
}

/* ── Maps Page ── */
.maps-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 40px 80px;
}

.maps-names-block {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  margin-bottom: 20px;
  gap: 24px;
}

.maps-names-block .names-img {
  display: block;
  width: 100%;
  height: auto;
  min-width: 0;
  margin-bottom: 0;
}

.maps-nav {
  display: none;
}

/* Media Slider */
.media-slider {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

.slider-main {
  width: 100%;
  height: 500px;
  position: relative;
  background: #fff;
  margin-bottom: 0;
  line-height: 0;
}

.slider-main img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #fff;
}

.slider-caption {
  text-align: center;
  padding: 16px 0 12px;
}

.slider-caption .part-title {
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-size: 20px;
  font-weight: 700;
  color: #d93741;
  margin: 0 0 4px;
}

.slider-caption .part-subtitle {
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-size: 16px;
  color: #2d2e32;
  margin: 0;
}

/* Thumbnail strip */
.thumb-strip {
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 12px 0;
}

.thumb-item {
  width: 88px;
  height: 66px;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 6px;
  transition: border-color 0.15s;
}

.thumb-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
  transition: opacity 0.15s;
}

.thumb-item.active {
  border-color: #d93741;
}

.thumb-item.active img { opacity: 1; }
.thumb-item:hover img { opacity: 0.9; }

.maps-credit {
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-size: 14px;
  text-align: center;
  color: #2d2e32;
  margin: 16px 0 0;
}

/* ── Contact Modal ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 400;
  align-items: center;
  justify-content: center;
}

.modal-overlay.open {
  display: flex;
}

.modal-box {
  background: #fff;
  width: 90%;
  max-width: 600px;
  padding: 48px 60px 52px;
  position: relative;
  border-radius: 2px;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 22px;
  color: #aaa;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover { color: #666; }

.modal-title {
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-size: 32px;
  color: #d93741;
  text-align: center;
  margin: 0 0 32px;
  font-weight: 400;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-size: 15px;
  margin-bottom: 8px;
  color: #2d2e32;
}

.form-label .required { color: #d93741; }

.form-input,
.form-textarea {
  width: 100%;
  border: 1.5px solid #2d2e32;
  border-radius: 0;
  padding: 12px 14px;
  font-size: 15px;
  font-family: 'Courier Prime', 'Courier New', monospace;
  outline: none;
  background: #fff;
}

.form-input:focus,
.form-textarea:focus {
  border-color: #d93741;
}

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

.form-submit-wrap {
  text-align: center;
  margin-top: 32px;
}

.form-submit {
  background: #d93741;
  color: #fff;
  border: none;
  border-radius: 40px;
  padding: 16px 60px;
  font-size: 16px;
  font-family: 'Courier Prime', 'Courier New', monospace;
  cursor: pointer;
  transition: opacity 0.15s;
}

.form-submit:hover { opacity: 0.88; }

.form-msg {
  text-align: center;
  margin-top: 16px;
  font-size: 14px;
  min-height: 20px;
  font-family: 'Courier Prime', 'Courier New', monospace;
}

.form-msg.error { color: #d93741; }

.form-success {
  display: none;
  text-align: center;
  padding: 24px 0;
}

.form-success.visible { display: block; }

.form-success p {
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-size: 20px;
  line-height: 1.6;
  color: #2d2e32;
  margin: 0;
}

/* ── Lightbox ── */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 500;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.lightbox-overlay.open { display: flex; }
.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  cursor: default;
  display: block;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: #fff;
  font-size: 36px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  opacity: 0.8;
}
.lightbox-close:hover { opacity: 1; }

/* ── Responsive ── */
@media (max-width: 900px) {
  /* Show hamburger bar, hide desktop nav */
  .mobile-header { display: flex; }
  .site-nav { display: none; }

  /* Home: collapse to single column */
  .home-main {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    padding: 16px 20px 40px;
  }
  .home-main .names-block { grid-column: 1; grid-row: 1; }
  .home-main .content-left { grid-column: 1; grid-row: 2; }
  .home-main .buy-now      { grid-column: 1; grid-row: 3; }

  .covers-gallery { grid-template-columns: 1fr 1fr; }

  .buy-now {
    padding: 24px 0 0;
    flex-direction: column;
    align-items: center;
  }

  /* Maps: page-top stacks */
  .page-top { flex-direction: column; gap: 0; }
  .maps-main { padding: 16px 20px 40px; }

  .slider-main { height: 320px; }
  .thumb-item { width: 80px; height: 60px; }

  .modal-box { padding: 36px 24px 40px; }
  .modal-title { font-size: 26px; }
}

@media (max-width: 480px) {
  .covers-gallery { grid-template-columns: 1fr; }
  .thumb-strip { gap: 4px; }
  .thumb-item { width: 56px; height: 44px; }
}
