/* ============================================
   Jeff Nelson Books — Shared Stylesheet
   ============================================ */

/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Source+Sans+3:wght@300;400;500;600&display=swap');

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

:root {
  --bg: #FAF7F2;
  --bg-card: #FFFFFF;
  --bg-soft: #F2EDE3;
  --text: #1F1B16;
  --text-muted: #5A544C;
  --accent: #7A2E2E;
  --accent-hover: #5E2222;
  --gold: #B08A4E;
  --border: #E8E0D3;
  --shadow: 0 1px 3px rgba(31, 27, 22, 0.05), 0 4px 16px rgba(31, 27, 22, 0.04);
  --shadow-hover: 0 2px 6px rgba(31, 27, 22, 0.08), 0 8px 24px rgba(31, 27, 22, 0.08);
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.35rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.15rem; font-weight: 500; }

p {
  margin-bottom: 1.1em;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

em, i {
  font-style: italic;
}

strong {
  font-weight: 600;
}

/* Layout containers */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.container-narrow {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Top navigation */
.site-nav {
  background-color: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  background-color: rgba(250, 247, 242, 0.92);
}

.site-nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.site-nav-brand {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}

.site-nav-brand:hover {
  color: var(--text);
  text-decoration: none;
}

.site-nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.site-nav-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.site-nav-links a:hover {
  color: var(--accent);
  text-decoration: none;
}

.site-nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text);
}

/* Hero section */
.hero {
  padding: 5rem 0 4rem;
  text-align: center;
}

.hero-tagline {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  color: var(--accent);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}

.hero h1 {
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}

.hero-intro {
  max-width: 620px;
  margin: 0 auto;
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Section spacing */
section {
  padding: 4rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title-eyebrow {
  font-family: 'Source Sans 3', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.85rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

/* Book grid */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  margin-top: 2rem;
}

.book-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

.book-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.book-card a.book-card-link {
  color: var(--text);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.book-card a.book-card-link:hover {
  text-decoration: none;
  color: var(--text);
}

.book-cover {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  display: block;
  background-color: var(--bg-soft);
}

.book-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.book-card-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  line-height: 1.2;
}

.book-card-subtitle {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.95rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 1rem;
}

.book-card-status {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.book-card-pitch {
  font-size: 1rem;
  color: var(--text);
  line-height: 1.55;
  margin-bottom: 1.25rem;
  flex: 1;
}

.book-card-cta {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-top: auto;
}

.book-card:hover .book-card-cta {
  color: var(--accent-hover);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  border: 1px solid var(--accent);
  background-color: var(--accent);
  color: #fff;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.btn:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
  text-decoration: none;
}

.btn-outline {
  background-color: transparent;
  color: var(--accent);
}

.btn-outline:hover {
  background-color: var(--accent);
  color: #fff;
}

/* About section on homepage */
.about-snippet {
  background-color: var(--bg-soft);
  padding: 4rem 0;
}

.about-snippet-inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  align-items: center;
}

.about-snippet-photo {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 4px;
}

.about-snippet-text h2 {
  margin-bottom: 1rem;
}

.about-snippet-text p {
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.65;
}

/* Newsletter signup */
.newsletter {
  background-color: var(--text);
  color: var(--bg);
  padding: 4rem 0;
  text-align: center;
}

.newsletter h2 {
  color: var(--bg);
  margin-bottom: 1rem;
}

.newsletter p {
  color: rgba(250, 247, 242, 0.85);
  max-width: 520px;
  margin: 0 auto 2rem;
  font-size: 1.05rem;
}

.newsletter .btn {
  background-color: var(--bg);
  color: var(--text);
  border-color: var(--bg);
}

.newsletter .btn:hover {
  background-color: var(--gold);
  color: var(--text);
  border-color: var(--gold);
}

/* Footer */
.site-footer {
  background-color: var(--text);
  color: rgba(250, 247, 242, 0.75);
  padding: 3rem 0 2rem;
  font-size: 0.92rem;
}

.site-footer a {
  color: rgba(250, 247, 242, 0.85);
}

.site-footer a:hover {
  color: var(--gold);
  text-decoration: none;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-section {
  flex: 1;
  min-width: 200px;
}

.footer-section h4 {
  color: var(--bg);
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.05rem;
  margin-bottom: 1rem;
  font-weight: 500;
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: 0.5rem;
}

.footer-bottom {
  border-top: 1px solid rgba(250, 247, 242, 0.15);
  padding-top: 1.5rem;
  margin-top: 2.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(250, 247, 242, 0.55);
}

/* Per-book page styles */
.book-hero {
  padding: 4rem 0 3rem;
}

.book-hero-inner {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 3.5rem;
  align-items: start;
}

.book-hero-cover {
  width: 100%;
  border-radius: 4px;
  box-shadow: 0 8px 32px rgba(31, 27, 22, 0.18);
}

.book-hero-text h1 {
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.book-hero-subtitle {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 1.3rem;
  color: var(--accent);
  margin-bottom: 1.5rem;
  font-weight: 400;
}

.book-hero-status {
  display: inline-block;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 1.5rem;
  padding: 0.4rem 1rem;
  border: 1px solid var(--gold);
  border-radius: 2px;
}

.book-pitch {
  font-size: 1.15rem;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 2rem;
  font-weight: 500;
}

.book-description {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 2rem;
}

.book-buy-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.book-tags {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.book-tag {
  background-color: var(--bg-soft);
  color: var(--text-muted);
  padding: 0.3rem 0.85rem;
  border-radius: 2px;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

/* Extras section on book pages (commercials, etc.) */
.book-extras {
  background-color: var(--bg-soft);
  padding: 4rem 0;
  margin-top: 3rem;
}

.book-extras h2 {
  text-align: center;
  margin-bottom: 0.75rem;
}

.book-extras-intro {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 3rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.video-block {
  background-color: var(--bg-card);
  padding: 2rem;
  border-radius: 4px;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow);
}

.video-block:last-child {
  margin-bottom: 0;
}

.video-block h3 {
  margin-bottom: 1rem;
}

.video-block-description {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 1.5rem;
  font-style: italic;
}

.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background-color: var(--text);
  border-radius: 2px;
  overflow: hidden;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Author note / pull quote */
.pull-quote {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 1.4rem;
  line-height: 1.5;
  color: var(--text);
  text-align: center;
  max-width: 720px;
  margin: 3rem auto;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* About page */
.about-page {
  padding: 4rem 0;
}

.about-page-header {
  text-align: center;
  margin-bottom: 3rem;
}

.about-page-photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 2rem;
  display: block;
  box-shadow: var(--shadow);
}

.about-page-content {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.08rem;
  line-height: 1.75;
}

.about-page-content p {
  margin-bottom: 1.4em;
}

.social-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.social-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  letter-spacing: 0.03em;
}

.social-links a:hover {
  color: var(--accent);
}

/* Contact page */
.contact-page {
  padding: 4rem 0;
}

.contact-page-content {
  max-width: 580px;
  margin: 0 auto;
  text-align: center;
}

.contact-page-content h1 {
  margin-bottom: 1.5rem;
}

.contact-email {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  color: var(--accent);
  margin: 2rem 0;
  letter-spacing: 0.02em;
}

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

  .site-nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background-color: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    gap: 1rem;
  }

  .site-nav-links.is-open {
    display: flex;
  }

  .hero {
    padding: 3rem 0 2.5rem;
  }

  section {
    padding: 3rem 0;
  }

  .container {
    padding: 0 1.25rem;
  }

  .site-nav-inner {
    padding: 0 1.25rem;
  }

  .book-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-snippet-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about-snippet-photo {
    margin: 0 auto;
  }

  .book-hero-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .book-hero-cover {
    max-width: 280px;
    margin: 0 auto;
    display: block;
  }

  .footer-inner {
    flex-direction: column;
    gap: 2rem;
  }
}
