/* the Book Camel – layout & design clone */

:root {
  --sand: #e8dcc4;
  --camel: #c4a574;
  --warm-brown: #8b6914;
  --cream: #faf6ef;
  --text: #3d3529;
  --text-muted: #6b5d4a;
  --accent: #b8860b;
  --white: #fff;
  --shadow: rgba(61, 53, 41, 0.12);
  --radius: 12px;
  --font-sans: 'Quicksand', sans-serif;
  --font-serif: 'Lora', serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--cream);
}

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

a {
  color: var(--warm-brown);
  text-decoration: none;
}

a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 999;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  background: var(--warm-brown);
  color: var(--cream);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
}

/* Header */
.site-header {
  background: var(--white);
  border-bottom: 2px solid var(--sand);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: opacity 0.2s ease;
}

.site-header.is-scrolled {
  opacity: 0.75;
}

.site-header:has(.nav.nav-is-open),
.site-header:hover {
  opacity: 1;
}

.nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
}

.nav-top {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 0.75rem;
}

.nav-toggle {
  display: none;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10;
}

.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--warm-brown);
  margin: 5px 0;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.logo-img-wrap {
  display: block;
  text-align: center;
  text-decoration: none;
}

.logo-img {
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: 56px;
  object-fit: contain;
  margin: 0 auto;
  display: block;
}

.logo-svg {
  height: 48px;
  width: auto;
  max-width: 280px;
}

.nav-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
}

.nav-spacer {
  flex: 1;
  min-width: 0;
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-shrink: 0;
}

/* Heaven on the left */
.nav-links-left {
  margin-right: auto;
}

/* Home, About, Shop: truly centered in the nav */
.nav-row .nav-links:not(.nav-links-left) {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-links a,
.nav-right > a:not(.icon-link) {
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
}

.nav-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  min-width: 0;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.nav-right .link-free,
.nav-right .btn-cta {
  white-space: nowrap;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-link img {
  width: 25px;
  height: 25px;
  display: block;
  object-fit: contain;
}

.link-free {
  font-size: 0.95rem;
}

.btn-cta {
  background: var(--camel);
  color: var(--white) !important;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}

.btn-cta:hover {
  background: var(--warm-brown);
  text-decoration: none;
}

.amazon-bar {
  background: linear-gradient(135deg, #f9f7f0 0%, var(--sand) 100%);
  padding: 0.75rem 1.5rem;
  text-align: center;
}

.amazon-logo {
  margin: 0 auto;
  height: 50px;
  width: auto;
}

/* Banner – full image visible, edge to edge, below header */
.banner {
  width: 100%;
  padding: 0;
  position: relative;
}

.banner-parallax-inner {
  position: relative;
  width: 100%;
}

.banner-parallax-inner img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  object-position: center center;
}

/* Sections */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.section-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 0.25rem 0;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--warm-brown);
  margin: 0 0 2rem 0;
}

/* What's New – book cards */
.what-new {
  background: linear-gradient(180deg, var(--cream) 0%, var(--sand) 30%, var(--cream) 100%);
}

.book-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 4px 20px var(--shadow);
  padding: 2rem;
  margin-bottom: 2.5rem;
  display: grid;
  gap: 1.5rem;
}

.book-card:last-child {
  margin-bottom: 0;
}

.book-featured {
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "covers info";
  align-items: start;
}

.book-covers-wrap {
  grid-area: covers;
  position: relative;
  display: inline-block;
  overflow: visible;
}

/* Single "Hover!" + curved arrow at top-right of cover, pointing down (reused on both books) */
.hover-hint {
  position: absolute;
  font-size: 0.8rem;
  z-index: 2;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
}

.hover-hint-corner {
  top: -28px;
  right: -12px;
}

.hover-hint-text {
  font-weight: 600;
  color: var(--warm-brown);
  font-family: var(--font-sans);
  line-height: 1.2;
}

.hover-hint-curve {
  width: 32px;
  height: 32px;
  color: var(--warm-brown);
  flex-shrink: 0;
  margin-top: -2px;
  margin-right: 4px;
}

/* Single flip area: default = first image, hover = second image */
.book-flip {
  position: relative;
  display: block;
  width: 280px;
  border-radius: 6px;
  box-shadow: 0 4px 12px var(--shadow);
  overflow: hidden;
  text-decoration: none;
}

.book-flip:hover {
  text-decoration: none;
}

.book-flip img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  transition: opacity 0.25s ease;
}

.book-flip img:first-child {
  position: relative;
  z-index: 1;
}

.book-flip img:last-child {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0;
}

.book-flip:hover img:first-child {
  opacity: 0;
}

.book-flip:hover img:last-child {
  opacity: 1;
  z-index: 2;
}

@media (min-width: 640px) {
  .book-flip {
    width: 320px;
  }
}

.book-sale .book-covers-wrap {
  grid-area: covers;
}

.book-info {
  grid-area: info;
}

.book-card h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--warm-brown);
  margin: 0 0 0.75rem 0;
}

.book-card p {
  margin: 0 0 1rem 0;
  color: var(--text);
}

.btn-amazon {
  display: inline-block;
  background: #b8860b;
  color: #faf6ef !important;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}

.btn-amazon:hover {
  background: #8b6914;
  text-decoration: none;
  transform: translateY(-1px);
}

.book-sale {
  grid-template-columns: auto 1fr;
  grid-template-areas: "covers info";
  align-items: start;
  text-align: left;
}

.book-sale .book-info {
  grid-area: info;
}

.book-sale .badge {
  display: inline-block;
  background: var(--accent);
  color: var(--white);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

/* Keep Amazon button same size in all book cards */
.book-card .btn-amazon {
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
}

/* About */
.about {
  background: linear-gradient(180deg, var(--cream) 0%, var(--sand) 30%, var(--cream) 100%);
}

.about-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 4px 20px var(--shadow);
  padding: 2rem;
}

.about-intro {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-style: italic;
  max-width: 720px;
  margin: 0 auto 2.5rem auto;
  text-align: center;
  color: var(--text-muted);
}

.value-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .value-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.value-card {
  text-align: center;
  padding: 1.5rem 1rem;
  background: var(--cream);
  border-radius: var(--radius);
  transition: transform 0.2s, box-shadow 0.2s;
}

.value-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--shadow);
}

.value-card img {
  width: 200px;
  height: 200px;
  margin: 0 auto 1rem auto;
  object-fit: contain;
}

.value-card h4 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--warm-brown);
  margin: 0 0 0.5rem 0;
}

.value-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* Page content (Heaven, Free Pages) */
.page-main {
  min-height: 50vh;
}

.page-content {
  padding-top: 2rem;
  padding-bottom: 3rem;
}

.heaven-title {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  color: var(--warm-brown);
  margin: 0 0 1rem 0;
  text-align: center;
  line-height: 1.3;
}

.heaven-intro {
  margin: 0 0 1.5rem 0;
  color: var(--text);
}

.heaven-step {
  margin-bottom: 2.5rem;
}

.heaven-step h2 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--warm-brown);
  margin: 0 0 0.75rem 0;
}

.heaven-step p {
  margin: 0 0 1rem 0;
  color: var(--text);
}

.heaven-step blockquote {
  margin: 1rem 0;
  padding: 1rem 1.25rem;
  background: var(--cream);
  border-left: 4px solid var(--camel);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.heaven-step blockquote cite {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--warm-brown);
  margin-bottom: 0.35rem;
  font-style: normal;
}

.heaven-step blockquote p {
  margin: 0;
  font-size: 0.95rem;
}

.heaven-prayer {
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: var(--sand);
  border-radius: var(--radius);
  font-style: italic;
  color: var(--text);
}

.heaven-prayer p {
  margin: 0;
}

.heaven-video-wrap {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 2rem auto;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 20px var(--shadow);
}

.heaven-video-embed {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
}

.heaven-video-link {
  display: block;
  position: relative;
  text-decoration: none;
  line-height: 0;
}

.heaven-video-link:hover {
  text-decoration: none;
}

.heaven-video-thumb {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}

.heaven-video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 48px;
  background: rgba(0, 0, 0, 0.75);
  border-radius: 12px;
  transition: background 0.2s;
}

.heaven-video-play::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-40%, -50%);
  border-style: solid;
  border-width: 12px 0 12px 22px;
  border-color: transparent transparent transparent #fff;
  margin-left: 4px;
}

.heaven-video-link:hover .heaven-video-play {
  background: rgba(200, 0, 0, 0.9);
}

.freepages-intro {
  text-align: center;
  margin: 0 0 2rem 0;
  color: var(--text);
}

.freepages-gallery-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--warm-brown);
  margin: 0 0 0.5rem 0;
}

.freepages-hint {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 1.5rem 0;
}

.freepages-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

.gallery-item {
  margin: 0;
  text-align: center;
}

.gallery-item a {
  display: block;
  text-decoration: none;
}

.gallery-item a:hover {
  text-decoration: none;
}

.gallery-item img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 4px 12px var(--shadow);
  transition: transform 0.2s;
}

.gallery-item a:hover img {
  transform: scale(1.02);
}

.gallery-item figcaption {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  line-height: 1.4;
}

.gallery-caption-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  opacity: 0.9;
}

.gallery-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  background: var(--sand);
  border-radius: var(--radius);
  font-size: 0.95rem;
  color: var(--text-muted);
  padding: 1rem;
  text-align: center;
}

.gallery-pdf-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  aspect-ratio: 300 / 389;
  background: var(--sand);
  border-radius: var(--radius);
  font-size: 0.95rem;
  color: var(--text-muted);
  padding: 1rem;
  text-align: center;
  box-shadow: 0 4px 12px var(--shadow);
  transition: transform 0.2s ease;
}

.gallery-item a:hover .gallery-pdf-thumb {
  transform: scale(1.02);
}

/* Footer */
/* Footer – dark brown, contact + social + Join theBookClub + email form */
.site-footer {
  background: #6c4931;
  padding: 2.5rem 1.5rem 2rem;
  text-align: center;
  position: relative;
}

.site-footer .skip-link {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto 2rem auto;
  padding: 0 0 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-contact {
  color: #fff;
  font-size: 0.95rem;
  text-decoration: none;
}

.footer-contact:hover {
  color: #f8f8f8;
  text-decoration: underline;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.footer-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  padding: 8px;
  text-decoration: none;
}

.footer-icon:hover {
  text-decoration: none;
  background: #fff;
}

.footer-icon img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.footer-cta {
  max-width: 560px;
  margin: 0 auto;
}

.footer-heading {
  font-family: var(--font-sans);
  font-size: 1.75rem;
  font-weight: 700;
  color: #f8f8f8;
  margin: 0 0 0.5rem 0;
  letter-spacing: 0.02em;
}

.footer-desc {
  color: #fff;
  font-size: 0.95rem;
  margin: 0 0 1.5rem 0;
  line-height: 1.5;
}

.footer-form {
  text-align: left;
}

.footer-form label {
  display: block;
  font-size: 0.9rem;
  color: #a3a3a3;
  margin-bottom: 0.35rem;
}

.footer-form-row {
  display: flex;
  gap: 0;
  align-items: stretch;
}

.footer-form-row input {
  flex: 1;
  min-width: 0;
  padding: 0.6rem 0.85rem;
  font-size: 1rem;
  font-family: var(--font-sans);
  border: 1px solid #c4a574;
  border-right: none;
  border-radius: 6px 0 0 6px;
  background: #fff;
}

.footer-form-row input::placeholder {
  color: #999;
}

.footer-btn {
  padding: 0.6rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-sans);
  color: #6c4931;
  background: #eadecb;
  border: 1px solid #c4a574;
  border-radius: 0 6px 6px 0;
  cursor: pointer;
  white-space: nowrap;
}

.footer-btn:hover {
  background: #f0e6d6;
}

@media (max-width: 600px) {
  .footer-top {
    flex-direction: column;
    text-align: center;
  }

  .footer-form-row {
    flex-direction: column;
  }

  .footer-form-row input {
    border-right: 1px solid #c4a574;
    border-radius: 6px;
  }

  .footer-btn {
    border-radius: 6px;
    border: 1px solid #c4a574;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-row {
    display: none;
    flex-wrap: wrap;
    flex-direction: column;
    justify-content: center;
    gap: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--sand);
  }

  .nav.nav-is-open .nav-row {
    display: flex;
  }

  /* Remove absolute positioning so center links flow in layout */
  .nav-row .nav-links:not(.nav-links-left) {
    position: static;
    left: auto;
    transform: none;
  }

  .nav-links-left {
    margin-right: 0;
  }

  .nav-links {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  .nav-spacer {
    display: none;
  }

  .nav-right {
    flex: none;
    width: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
  }

  .nav-right .icon-link {
    display: inline-flex;
  }

  .nav {
    padding: 0.75rem 1rem;
  }

  .logo-img {
    max-height: 36px;
  }

  .nav-top {
    align-items: center;
    min-height: 44px;
  }

  .nav-links a,
  .nav-right > a:not(.icon-link) {
    font-size: 0.9rem;
  }

  .book-featured,
  .book-sale {
    grid-template-columns: 1fr;
    grid-template-areas:
      "covers"
      "info";
    text-align: center;
  }

  .book-sale .book-info {
    text-align: center;
  }

  .book-covers-wrap {
    display: block;
    margin-left: auto;
    margin-right: auto;
  }

  .book-flip {
    width: 240px;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .hover-hint {
    display: none;
  }

  .section-title {
    font-size: 1.6rem;
  }
}
