/* =========================================================
   Jack Garret — Survival Fiction
   ========================================================= */

:root {
  --cream:        #F4EEE2;   /* page background            */
  --cream-panel:  #FBF8F1;   /* lighter panels             */
  --ink:          #1C1B18;   /* headlines                  */
  --text:         #4C453B;   /* body copy (warm sepia)     */
  --text-soft:    #726A5C;   /* muted                      */
  --rust:         #9C6A2E;   /* primary accent             */
  --rust-dark:    #855727;   /* accent hover               */
  --border:       #D9CDB8;   /* hairline borders           */
  --border-soft:  #E5DCCB;

  --maxw: 1180px;
  --pad:  clamp(1.25rem, 4vw, 3rem);   /* always pad sides */

  --font-head: 'Oswald', 'Arial Narrow', 'Impact', sans-serif;
  --font-body: 'Lora', Georgia, 'Times New Roman', serif;

  --shadow-book: 0 14px 30px rgba(28, 27, 24, 0.28);
}

/* ---------- reset / base ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

p { margin: 0 0 1rem; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* ---------- shared type ---------- */
.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 0.82rem;
  color: var(--rust);
  position: relative;
}

.section-heading { text-align: center; margin-bottom: 2.75rem; }

.section-heading .eyebrow { padding: 0 1.1rem; }
.section-heading .eyebrow::before,
.section-heading .eyebrow::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 46px;
  height: 1px;
  background: var(--rust);
  opacity: 0.6;
}
.section-heading .eyebrow::before { right: 100%; }
.section-heading .eyebrow::after  { left: 100%; }

.section-title {
  font-family: var(--font-head);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: clamp(2.2rem, 5vw, 3.1rem);
  color: var(--ink);
  margin: 0.35rem 0 0;
  line-height: 1;
}

.section { padding: clamp(2rem, 3.5vw, 3rem) 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.9rem;
  padding: 0.9rem 1.9rem;
  border: 1.5px solid var(--rust);
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, transform .15s ease;
}
.btn:active { transform: translateY(1px); }

.btn-solid {
  background: #956C37;
  border-color: #956C37;
  color: var(--cream-panel);
}
.btn-solid:hover { background: #261E06; border-color: #261E06; }

/* Swapped variant: dark base, shared dark hover */
.btn-swap { background: #3B372C; border-color: #3B372C; }
.btn-swap:hover { background: #261E06; border-color: #261E06; }

.btn-outline {
  background: transparent;
  color: var(--ink);
}
.btn-outline:hover { background: var(--rust); color: var(--cream-panel); }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  background: #fff;
  padding: clamp(1.25rem, 3vw, 2.25rem) 0 clamp(0.75rem, 2vw, 1.25rem);
}
.brand { display: block; }
.brand-banner {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
}

/* =========================================================
   NAV
   ========================================================= */
.site-nav {
  background: var(--cream);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}
.nav-links {
  list-style: none;
  display: flex;
  gap: clamp(1.5rem, 5vw, 4rem);
  margin: 0;
  padding: 0.95rem 0;
}
.nav-links a {
  font-family: var(--font-head);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.92rem;
  color: var(--ink);
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.nav-links a:hover { color: var(--rust); }
.nav-links a.active { color: var(--rust); border-bottom-color: var(--rust); }

/* hamburger (hidden on desktop) */
.nav-toggle {
  display: none;
  position: absolute;
  right: 0;
  background: none;
  border: 0;
  width: 44px; height: 40px;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition: transform .25s ease, opacity .2s ease;
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  background: var(--cream) url("../images/hero-section.jpg") no-repeat right center;
  background-size: cover;
  border-bottom: 1px solid var(--border-soft);
}
.hero-inner {
  min-height: clamp(420px, 46vw, 560px);
  display: flex;
  align-items: center;
}
.hero-copy { max-width: 500px; padding: 3rem 0; }

.hero-title {
  font-family: var(--font-head);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ink);
  font-size: clamp(2.1rem, 5.2vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: 0.01em;
  margin: 0 0 1.25rem;
}
.hero-sub {
  font-size: 1.06rem;
  color: var(--text);
  max-width: 30rem;
  margin-bottom: 1.9rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

/* =========================================================
   BOOKS
   ========================================================= */
.book-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.25rem, 3vw, 2.25rem);
  align-items: end;
}
.book { margin: 0; }
.book-cover {
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  box-shadow: var(--shadow-book);
  transition: transform .25s ease, box-shadow .25s ease;
}
.book-cover img { width: 100%; height: 100%; object-fit: cover; }
.book-cover:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 38px rgba(28, 27, 24, 0.34);
}

/* ----- book grid variants ----- */
.book-grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  gap: clamp(1.75rem, 4vw, 3rem);
}
.book-grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
}

/* ----- featured book: cover + details ----- */
.book-feature {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  max-width: 820px;
  margin: 0 auto;
}
.book-feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
}
.book-feature-grid .book-feature {
  grid-template-columns: 170px 1fr;
  max-width: none;
  gap: 1.5rem;
}
.book-meta {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  color: var(--rust);
  margin-bottom: 0.4rem;
}
.book-title {
  font-family: var(--font-head);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ink);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.05;
  margin: 0 0 0.75rem;
}
.book-desc { margin-bottom: 1rem; }
.book-formats { font-size: 0.92rem; color: var(--text-soft); margin: 0 0 1.1rem; }
.book-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* space + divider between stacked featured books (homepage) */
.books .book-feature + .book-feature {
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-top: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--rust);
}

/* ----- featured book responsive ----- */
@media (max-width: 760px) {
  .book-feature { grid-template-columns: 150px 1fr; }
  .book-feature-grid { grid-template-columns: 1fr; }
  .book-feature-grid .book-feature { grid-template-columns: 150px 1fr; }
}
@media (max-width: 520px) {
  .book-feature,
  .book-feature-grid .book-feature {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }
  .book-feature .book-cover { max-width: 220px; }
  .book-actions { justify-content: center; }
}

.section-cta { text-align: center; margin-top: 3rem; }
.books-tagline {
  font-family: var(--font-head);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  /* half the size of the "BOOKS" section title */
  font-size: clamp(1.1rem, 2.5vw, 1.55rem);
  line-height: 1.15;
  color: var(--ink);
  margin: 0;
}

/* =========================================================
   PANELS (about + newsletter share a frame)
   ========================================================= */
.panel {
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 6px 22px rgba(28, 27, 24, 0.06);
}

/* ---------- ABOUT ---------- */
.about-panel {
  display: grid;
  grid-template-columns: 0.9fr 1.4fr 0.9fr;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: clamp(1.5rem, 3vw, 2.5rem);
}
.about-art img { width: 100%; }
.about-art-left  img { max-width: 300px; margin-left: auto; }
.about-art-right img { max-width: 320px; }
.about-copy { text-align: left; }
.about-copy .eyebrow { margin-bottom: 0.6rem; }
.about-title {
  font-family: var(--font-head);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ink);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.08;
  margin: 0 0 1rem;
}
.about-copy .btn { margin-top: 0.75rem; }
.about-tagline {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--rust);
  margin: 1.5rem 0 0;
}

/* ---------- NEWSLETTER ---------- */
.newsletter-panel {
  display: grid;
  grid-template-columns: 0.8fr 1.6fr 0.8fr;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: clamp(1.75rem, 3.5vw, 3rem);
  text-align: center;
}
.news-art img { width: 100%; max-width: 220px; margin: 0 auto; }
.news-title {
  font-family: var(--font-head);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ink);
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  line-height: 1.05;
  margin: 0 0 0.75rem;
}
.news-copy > p { max-width: 34rem; margin-left: auto; margin-right: auto; }
.news-form {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin: 1.5rem auto 0.75rem;
  max-width: 34rem;
}
.news-input {
  flex: 1 1 auto;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
}
.news-input:focus { outline: 2px solid var(--rust); outline-offset: 1px; }
.news-form .btn { white-space: nowrap; }
.news-fineprint { font-size: 0.85rem; color: var(--text-soft); margin: 0 0 0.25rem; }

/* ---------- MailerLite form: blend into the newsletter panel ----------
   Selectors mirror MailerLite's own specificity, and this sheet loads
   after mailerlite.css, so these overrides win. */
#mlb2-43534524.ml-form-embedContainer .ml-form-embedWrapper.embedForm {
  max-width: 34rem;
  margin: 0 auto;
}
#mlb2-43534524.ml-form-embedContainer .ml-form-embedWrapper {
  background-color: transparent;
}
#mlb2-43534524.ml-form-embedContainer .ml-form-embedWrapper .ml-form-embedBody {
  padding: 0;
}
#mlb2-43534524.ml-form-embedContainer .ml-form-embedWrapper .ml-form-embedBody .ml-form-fieldRow input {
  border-radius: 0 !important;
  border-color: var(--border) !important;
  padding: 0.85rem 1rem !important;
  font-family: var(--font-body) !important;
  font-size: 1rem !important;
  color: var(--text) !important;
}
#mlb2-43534524.ml-form-embedContainer .ml-form-embedWrapper .ml-form-embedBody .ml-form-embedSubmit button {
  background-color: #956C37 !important;
  border-radius: 0 !important;
  font-family: var(--font-head) !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.12em !important;
  padding: 0.9rem 1.9rem !important;
}
#mlb2-43534524.ml-form-embedContainer .ml-form-embedWrapper .ml-form-embedBody .ml-form-embedSubmit button:hover {
  background-color: #261E06 !important;
}
/* contain MailerLite's internal floats */
#mlb2-43534524.ml-form-embedContainer::after { content: ""; display: table; clear: both; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: var(--ink);
  color: #C9C0B1;
  padding: 2.5rem 0;
  margin-top: 1rem;
}
.footer-inner { text-align: center; }
.footer-nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.footer-nav a {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.85rem;
  color: #C9C0B1;
  transition: color .2s ease;
}
.footer-nav a:hover { color: var(--rust); }
.footer-copy { font-size: 0.85rem; color: #8C8474; margin: 0; }

/* =========================================================
   RESPONSIVE
   ========================================================= */

/* Tablet */
@media (max-width: 900px) {
  .about-panel {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "art-left art-right"
      "copy copy";
    text-align: center;
  }
  .about-art-left  { grid-area: art-left; }
  .about-art-right { grid-area: art-right; }
  .about-copy      { grid-area: copy; text-align: center; }
  .about-art-left img, .about-art-right img { margin: 0 auto; max-width: 240px; }

  .newsletter-panel {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "art-left art-right"
      "copy copy";
  }
  .news-art-left  { grid-area: art-left; }
  .news-art-right { grid-area: art-right; }
  .news-copy      { grid-area: copy; }

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

  .hero {
    background-position: 72% center;
  }
  .hero-copy {
    background: linear-gradient(90deg,
      rgba(244,238,226,0.94) 0%,
      rgba(244,238,226,0.85) 55%,
      rgba(244,238,226,0) 100%);
    padding: 2rem 1.25rem 2rem 0;
    border-radius: 4px;
  }
}

/* Phone */
@media (max-width: 620px) {
  body { font-size: 16px; }

  .nav-links {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    width: 100%;
    padding: 0.5rem 0 1rem;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; text-align: center; }
  .nav-links a { display: inline-block; padding: 0.65rem 0; }
  .nav-toggle { display: block; }
  .nav-inner { justify-content: flex-start; min-height: 56px; }

  .hero-inner { min-height: 0; }
  .hero-copy {
    max-width: none;
    padding: 2.5rem 1.25rem;
    background: linear-gradient(180deg,
      rgba(244,238,226,0.92) 0%,
      rgba(244,238,226,0.82) 100%);
  }
  .hero { background-position: 65% top; }
  .hero-actions .btn { flex: 1 1 auto; text-align: center; }

  .about-panel,
  .newsletter-panel {
    grid-template-columns: 1fr;
    grid-template-areas:
      "art-left"
      "copy"
      "art-right";
  }
  .about-art-left img, .about-art-right img,
  .news-art img { max-width: 200px; }

  .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }

  .news-form { flex-direction: column; }
  .news-form .btn { width: 100%; }
}
