/* ===== Reset & base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --ink: #2e2e2e;
  --muted: #6f6f6f;
  --btn: #111111;
  --footer-bg: #1e1e1e;
  --line: #e4e4e4;
  --accent: #5a1f2a;
  --heading-spacing: 0.22em;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'EB Garamond', Georgia, serif;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, .site-title, .btn, .nav-links, .footer__title {
  font-family: 'Josefin Sans', 'Helvetica Neue', Arial, sans-serif;
}

/* ===== Placeholder helpers ===== */
.img-placeholder,
.hero__bg {
  position: relative;
  background: repeating-linear-gradient(
      45deg, #d9d9d9, #d9d9d9 12px, #d0d0d0 12px, #d0d0d0 24px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.placeholder-label {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #555;
  background: rgba(255,255,255,0.72);
  padding: 8px 16px;
  border-radius: 2px;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  height: 56vh;
  min-height: 360px;
  overflow: hidden;
  background: #1e1e1e;
}
.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}
/* Elegant placeholder until a clean landscape banner photo is supplied */
.hero__bg--placeholder {
  background: linear-gradient(180deg, #2c3e50 0%, #3b5266 45%, #6b7b86 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero__bg--placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.28), rgba(0,0,0,0.05) 40%, rgba(0,0,0,0.15));
}
.hero__bg--placeholder .placeholder-label { position: relative; z-index: 1; }
.hero__bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 26px;
  z-index: 5;
}
.site-title {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.16em;
  text-shadow: 0 1px 10px rgba(0,0,0,0.4);
}

/* Hamburger */
.nav-toggle {
  background: none;
  border: none;
  cursor: pointer;
  width: 24px;
  height: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* ===== Nav overlay ===== */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20,20,20,0.97);
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.nav-overlay.open { opacity: 1; visibility: visible; }
.nav-close {
  position: absolute;
  top: 24px; right: 40px;
  background: none; border: none;
  color: #fff; font-size: 42px;
  line-height: 1; cursor: pointer;
}
.nav-links {
  list-style: none;
  text-align: center;
}
.nav-links > li { margin: 14px 0; }
.nav-links a, .nav-group {
  color: #fff;
  text-decoration: none;
  font-size: 22px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
}
.nav-links a:hover { color: #bbb; }
.nav-group { color: #8a8a8a; font-size: 15px; display: block; margin-bottom: 6px; }
.has-sub ul { list-style: none; }
.has-sub ul li { margin: 8px 0; }
.has-sub ul a { font-size: 16px; letter-spacing: 0.12em; color: #ddd; }

/* ===== Embedded images fill their frames ===== */
img.cover, img.book-cover {
  object-fit: cover;
  display: block;
}
img.portrait {
  width: 100%;
  border-radius: 2px;
  box-shadow: 0 14px 34px rgba(0,0,0,0.18);
}
.media-caption {
  text-align: center;
  font-style: italic;
  color: var(--muted);
  font-size: 15px;
  margin-top: 14px;
}

/* ===== Compact header (sub-pages) ===== */
.compact-header {
  background: #1e1e1e;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
}
.compact-header .site-title {
  position: static;
  width: auto; height: auto;
  padding: 0; margin: 0;
  overflow: visible; clip: auto; border: 0;
  color: #fff;
  font-family: 'Josefin Sans', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 400;
  font-size: 17px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-shadow: none;
}
.compact-header .nav-toggle span { background: #fff; box-shadow: none; }

/* ===== Book detail page ===== */
.book-detail {
  max-width: 1040px;
  margin: 0 auto;
  padding: 80px 40px 60px;
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 64px;
  align-items: start;
}
.book-detail__cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  box-shadow: 0 18px 40px rgba(0,0,0,0.2);
}
.book-detail__eyebrow {
  font-family: 'Josefin Sans', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 14px;
}
.book-detail__title {
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 400;
  font-size: 34px;
  letter-spacing: var(--heading-spacing);
  text-transform: uppercase;
  line-height: 1.3;
  color: var(--ink);
}
.book-detail__series {
  font-style: italic;
  font-size: 20px;
  color: #555;
  margin-top: 10px;
}
.book-detail__meta {
  font-family: 'Josefin Sans', sans-serif;
  letter-spacing: 0.1em;
  font-size: 13px;
  text-transform: uppercase;
  color: var(--accent);
  margin: 18px 0 24px;
}
.book-detail__desc p { margin-bottom: 18px; color: #444; }
.book-detail__actions { margin-top: 28px; display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.book-detail__back {
  font-family: 'Josefin Sans', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
}
.book-detail__back:hover { color: var(--ink); }

@media (max-width: 820px) {
  .compact-header { padding: 0 24px; height: 74px; }
  .book-detail { grid-template-columns: 1fr; gap: 36px; padding: 50px 26px; justify-items: center; text-align: center; }
  .book-detail__cover { max-width: 260px; }
  .book-detail__actions { justify-content: center; }
}

/* ===== Feature (book) section ===== */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 90px 40px 70px;
}
.feature__cover { display: flex; justify-content: center; }
.cover {
  width: 320px;
  aspect-ratio: 2 / 3;
  box-shadow: 0 18px 40px rgba(0,0,0,0.18);
}
.feature__info { text-align: center; }
.feature__eyebrow {
  font-family: 'Josefin Sans', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}
.feature__title {
  font-weight: 400;
  font-size: 40px;
  letter-spacing: var(--heading-spacing);
  line-height: 1.3;
  color: var(--ink);
}
.feature__series {
  font-style: italic;
  font-size: 22px;
  color: #555;
  margin-top: 12px;
}
.feature__status {
  color: var(--muted);
  font-size: 19px;
  margin: 22px 0 30px;
}

/* ===== Section headings ===== */
.section-heading {
  text-align: center;
  font-weight: 400;
  font-size: 30px;
  letter-spacing: var(--heading-spacing);
  text-transform: uppercase;
  color: var(--ink);
}
.section-sub {
  text-align: center;
  color: var(--muted);
  font-size: 18px;
  max-width: 620px;
  margin: 16px auto 0;
}

/* ===== Books grid ===== */
.books {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 40px 80px;
}
.books__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 54px 40px;
  margin-top: 56px;
}
.book-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.book-cover {
  width: 100%;
  max-width: 220px;
  aspect-ratio: 2 / 3;
  box-shadow: 0 12px 30px rgba(0,0,0,0.15);
  margin-bottom: 22px;
}
.book-cover-link { display: block; width: 100%; max-width: 220px; margin-bottom: 28px; }
.book-cover-link img { margin-bottom: 0; }
.book-card__title {
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 400;
  font-size: 19px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.35;
  margin-bottom: 8px;
}
.book-card__title a { color: inherit; text-decoration: none; }
.book-card__title a:hover { color: var(--accent); }
.feature__cover a { display: inline-block; }
.book-card__tag {
  font-style: italic;
  color: #666;
  font-size: 16px;
  margin-bottom: 12px;
}
.book-card__desc {
  color: #4a4a4a;
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 20px;
}
.btn--sm {
  margin-top: auto;
  padding: 11px 26px;
  font-size: 13px;
}

/* ===== Button (pill) ===== */
.btn {
  display: inline-block;
  background: var(--btn);
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 15px 34px;
  border-radius: 40px;
  transition: opacity 0.2s ease;
}
.btn:hover { opacity: 0.82; }

/* ===== Divider ===== */
.divider {
  border: none;
  border-top: 1px solid var(--line);
  max-width: 1100px;
  margin: 0 auto;
}

/* ===== Story section ===== */
.story {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 40px 100px;
}
.story__text { text-align: center; }
.story__heading {
  font-weight: 400;
  font-size: 30px;
  letter-spacing: var(--heading-spacing);
  line-height: 1.4;
  margin-bottom: 28px;
}
.story__text p { margin-bottom: 20px; color: #444; }
.story__text .btn { margin-top: 12px; }
.wide {
  width: 100%;
  aspect-ratio: 4 / 3;
}

/* ===== Footer ===== */
.footer {
  background: var(--footer-bg);
  color: #cfcfcf;
  text-align: center;
  padding: 70px 24px 90px;
}
.social {
  display: flex;
  justify-content: center;
  gap: 26px;
  margin-bottom: 44px;
}
.social__icon {
  color: #fff;
  text-decoration: none;
  width: 34px; height: 34px;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 16px;
  transition: background 0.2s ease;
}
.social__icon:hover { background: rgba(255,255,255,0.14); }
.footer__title {
  font-weight: 300;
  font-size: 34px;
  letter-spacing: 0.25em;
  color: #8f8f8f;
  margin-bottom: 14px;
}
.footer__sub { color: #b8b8b8; margin-bottom: 28px; }
.subscribe {
  display: inline-flex;
  gap: 0;
}
.subscribe input {
  border: none;
  padding: 15px 18px;
  width: 280px;
  font-size: 15px;
  font-family: 'EB Garamond', serif;
}
.subscribe button {
  border: 1px solid #555;
  background: transparent;
  color: #fff;
  padding: 15px 26px;
  font-family: 'Josefin Sans', sans-serif;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: background 0.2s ease;
}
.subscribe button:hover { background: rgba(255,255,255,0.1); }
.footer__privacy {
  margin-top: 26px;
  font-size: 14px;
  color: #8a8a8a;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .books__grid { grid-template-columns: repeat(2, 1fr); gap: 46px 32px; }
}

@media (max-width: 820px) {
  .feature, .story {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 60px 26px;
  }
  .story__media { order: -1; }
  .feature__title { font-size: 30px; }
  .books { padding: 30px 26px 60px; }
  .hero__bar { padding: 22px 24px; }
  .site-title { font-size: 20px; }
  .subscribe { flex-direction: column; width: 100%; max-width: 340px; margin: 0 auto; }
  .subscribe input { width: 100%; }
  .subscribe button { width: 100%; }
}
