/* =====================================================
   Signal House Press — Stylesheet
   ===================================================== */

/* Custom Properties */
:root {
  --color-bg: #f8f4ef;
  --color-bg-alt: #f0e9de;
  --color-surface: #fdfaf6;
  --color-text: #211d18;
  --color-text-muted: #7a7068;
  --color-accent: #3d5c49;
  --color-accent-light: #4e7260;
  --color-accent-faint: #e7eeea;
  --color-border: #dcd4c7;
  --color-hero: #1a2820;
  --color-badge-coming: #7c5c2e;
  --color-badge-coming-bg: #f5ecd7;

  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --max-width: 1100px;
  --nav-height: 68px;
  --radius: 3px;
  --shadow: 0 1px 8px rgba(33, 29, 24, 0.07), 0 2px 4px rgba(33, 29, 24, 0.04);
  --shadow-hover: 0 4px 20px rgba(33, 29, 24, 0.12), 0 2px 6px rgba(33, 29, 24, 0.06);
}

/* =====================================================
   Reset & Base
   ===================================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

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

a:hover {
  color: var(--color-accent-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* =====================================================
   Layout Utilities
   ===================================================== */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* =====================================================
   Navigation
   ===================================================== */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  height: var(--nav-height);
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  position: relative;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: normal;
  letter-spacing: 0.04em;
  color: var(--color-text);
  text-decoration: none;
  white-space: nowrap;
}

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

.nav-mark {
  height: 26px;
  width: auto;
  display: block;
  flex-shrink: 0;
  opacity: 0.85;
}

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

.nav-links a {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

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

.nav-links a.active {
  color: var(--color-text);
}

/* =====================================================
   Hero (Home)
   ===================================================== */

/*
  BOOKSHELF IMAGES
  ─────────────────
  Drop two photos into the images/ folder:

    images/bookshelf-dark.jpg
      Used in: hero section + newsletter section
      Style: dark, moody — shelves in low light, rich shadows
      Source: unsplash.com — search "bookshelf dark moody" or "library shelves dark"

    images/bookshelf-light.jpg
      Used in: interior page heroes (Books, Authors, About, Contact)
      Style: warm, bright — sunlit shelves, warm wood tones
      Source: unsplash.com — search "bookshelf warm light" or "books cozy shelf"

  Both fall back gracefully to flat color if the images aren't present yet.
*/

.hero {
  background-color: var(--color-hero);
  background-image:
    linear-gradient(rgba(26, 40, 32, 0.84), rgba(26, 40, 32, 0.84)),
    image-set(
      url('../images/bookshelf-dark.webp') type('image/webp'),
      url('../images/bookshelf-dark.jpg') type('image/jpeg')
    );
  background-size: cover;
  background-position: center;
  color: #fff;
  text-align: center;
  padding: 2.5rem 1.5rem 2rem;
}

.hero-rule {
  width: 48px;
  height: 1px;
  background: rgba(255,255,255,0.35);
  border: none;
  margin: 1.75rem auto 1.5rem;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 5vw, 3.75rem);
  font-weight: normal;
  letter-spacing: 0.01em;
  line-height: 1.15;
  margin-bottom: 0;
}

.hero-tagline {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.1rem;
  color: rgba(255,255,255,0.75);
  max-width: 420px;
  margin: 0 auto 2.25rem;
  line-height: 1.6;
}

.hero-cta {
  display: inline-flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* =====================================================
   Buttons
   ===================================================== */

.btn {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: normal;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-primary {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}

.btn-primary:hover {
  background: rgba(255,255,255,0.22);
  border-color: #fff;
  color: #fff;
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  color: rgba(255,255,255,0.8);
  border-color: rgba(255,255,255,0.3);
}

.btn-outline:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.65);
  text-decoration: none;
}

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

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

/* =====================================================
   Section Headers
   ===================================================== */

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: normal;
  letter-spacing: 0.01em;
  color: var(--color-text);
  margin-bottom: 0.4rem;
}

.section-header p {
  color: var(--color-text-muted);
  font-style: italic;
  max-width: 520px;
  margin: 0 auto;
  font-family: var(--font-body);
}

.section-rule {
  width: 32px;
  height: 1px;
  background: var(--color-border);
  margin: 0.85rem auto;
  border: none;
}

/* =====================================================
   Featured Books (Home)
   ===================================================== */

.featured-section {
  padding: 2rem 1.5rem;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.section-eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.featured-section .section-header {
  margin-bottom: 1.5rem;
}

/* Show blurb (clamped) in featured context */
.featured-section .book-blurb {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 1rem;
}

/* Featured grid: 3 columns on desktop */
.featured-section .book-grid {
  grid-template-columns: repeat(3, 1fr);
}

.catalog-browse-link {
  text-align: center;
  margin-top: 3rem;
}

.catalog-browse-link a {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: 1px solid var(--color-accent);
  padding-bottom: 1px;
  transition: opacity 0.15s;
}

.catalog-browse-link a:hover {
  opacity: 0.7;
  text-decoration: none;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2rem;
}

.book-card {
  background: transparent;
  border: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s;
}

.book-card:hover {
  transform: translateY(-3px);
}

.book-cover {
  position: relative;
  background: var(--color-bg-alt);
  aspect-ratio: 2 / 3;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(33,29,24,0.10);
  border-radius: 2px;
}

.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
}

.cover-placeholder .placeholder-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-style: italic;
  color: var(--color-text-muted);
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

.cover-placeholder .placeholder-author {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  opacity: 0.6;
}

.badge {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-coming {
  background: var(--color-badge-coming-bg);
  color: var(--color-badge-coming);
}

.book-info {
  padding: 1.1rem 0.25rem 0.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.book-meta {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 0.72rem;
  color: var(--color-text-muted);
  margin-bottom: 0.35rem;
}

.book-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: normal;
  color: var(--color-text);
  margin-bottom: 0.45rem;
  line-height: 1.3;
}

.book-author-byline {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-bottom: 0.85rem;
}

.book-blurb {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  line-height: 1.55;
  flex: 1;
  margin-bottom: 1rem;
  display: none;
}

/* Ratings (book cards) */
.book-rating {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-decoration: none;
  margin-bottom: 0.5rem;
}

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

.rating-stars {
  color: #d4a04a;
  letter-spacing: -0.5px;
}

.rating-number {
  font-weight: 500;
  color: var(--color-text);
}

.rating-source {
  color: var(--color-text-muted);
  font-size: 0.7rem;
}

/* Ratings (in reader quotes section) */
.action-ratings {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.action-rating {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.action-rating .rating-stars {
  color: #d4a04a;
  letter-spacing: -0.5px;
}

.action-rating .rating-number {
  font-weight: 500;
  color: var(--color-text);
}

.action-rating .rating-count {
  font-size: 0.75rem;
}

.action-rating .rating-source {
  font-size: 0.75rem;
  font-weight: 500;
}

.rating-source-link {
  color: var(--color-accent);
  text-decoration: none;
}

.rating-source-link:hover {
  text-decoration: underline;
}

.book-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
}

.buy-link {
  display: inline-block;
  padding: 0.4rem 0.85rem;
  background: var(--color-accent);
  color: #fff;
  border: 1px solid var(--color-accent);
  border-radius: 2px;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, filter 0.15s;
}

.buy-link:hover {
  filter: brightness(0.88);
  text-decoration: none;
}

.goodreads-link {
  background: transparent;
  color: var(--color-accent);
  filter: none;
}

.goodreads-link:hover {
  background: var(--color-accent);
  color: #fff;
  filter: none;
}

.coming-soon-label {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* =====================================================
   Newsletter Section (Home)
   ===================================================== */

.newsletter-section {
  background-color: var(--color-hero);
  color: #fff;
  padding: 5.5rem 1.5rem;
  text-align: center;
}

.newsletter-inner {
  max-width: 520px;
  margin: 0 auto;
}

.newsletter-eyebrow {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.03em;
  margin-bottom: 0.75rem;
}

.newsletter-section h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: normal;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.newsletter-body {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.65;
  margin-bottom: 2rem;
}

.newsletter-form {
  margin-bottom: 0;
}

.newsletter-fields {
  display: flex;
  gap: 0.5rem;
  max-width: 420px;
  margin: 0 auto 0.85rem;
}

.newsletter-fields input[type="email"] {
  flex: 1;
  padding: 0.7rem 1rem;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  min-width: 0;
}

.newsletter-fields input[type="email"]::placeholder {
  color: rgba(255,255,255,0.35);
}

.newsletter-fields input[type="email"]:focus {
  border-color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.12);
}

.newsletter-btn {
  padding: 0.7rem 1.4rem;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: var(--radius);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}

.newsletter-btn:hover {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.7);
}

.newsletter-disclaimer {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.35);
  font-family: var(--font-heading);
  font-style: italic;
}

.newsletter-success {
  font-family: var(--font-heading);
  font-style: italic;
  color: rgba(255,255,255,0.75);
  font-size: 1rem;
  margin-top: 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* =====================================================
   Catalog Page (books.html)
   ===================================================== */

.page-hero {
  background-color: var(--color-bg);
  background-image:
    linear-gradient(rgba(248, 244, 239, 0.76), rgba(248, 244, 239, 0.76)),
    image-set(
      url('../images/bookshelf-light.webp') type('image/webp'),
      url('../images/bookshelf-light.jpg') type('image/jpeg')
    );
  background-size: cover;
  background-position: center;
  padding: 3.5rem 1.5rem 3rem;
  text-align: center;
  border-bottom: 1px solid var(--color-border);
}

.page-hero h1 {
  font-family: var(--font-heading);
  font-size: 2.1rem;
  font-weight: normal;
  letter-spacing: 0.01em;
  margin-bottom: 0.4rem;
}

.page-hero p {
  font-family: var(--font-heading);
  font-style: italic;
  color: var(--color-text-muted);
}

.catalog-section {
  padding: 3rem 1.5rem 5rem;
}


.filter-bar {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0;
}

.filter-group {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  padding-right: 1.75rem;
  margin-right: 1.75rem;
  border-right: 1px solid var(--color-border);
}

.filter-group:last-child {
  padding-right: 0;
  margin-right: 0;
  border-right: none;
}

.filter-label {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-right: 0.75rem;
  padding-bottom: 0.6rem;
  white-space: nowrap;
  min-width: 3.5rem;
}

.filter-btn {
  padding: 0 0.85rem 0.6rem;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--color-text-muted);
  font-family: var(--font-body);
  font-size: 0.875rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  margin-bottom: -1px;
  border-radius: 0;
}

.filter-btn:hover {
  color: var(--color-text);
}

.filter-btn.active {
  color: var(--color-text);
  border-bottom-color: var(--color-accent);
}

/* =====================================================
   Authors Page (authors.html)
   ===================================================== */

.authors-section {
  padding: 3.5rem 1.5rem 5rem;
}


.authors-list {
  display: flex;
  flex-direction: column;
}

.author-entry {
  padding: 4rem 0;
  border-bottom: 1px solid var(--color-border);
}

.author-entry:first-child {
  padding-top: 0;
}

.author-entry:last-child {
  border-bottom: none;
}

.author-entry-content {
}

.author-genre-tag {
  display: block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

.author-name {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  font-weight: normal;
  margin-bottom: 1.5rem;
  color: var(--color-text);
  line-height: 1.15;
}

.author-bio {
  font-size: 1rem;
  color: var(--color-text);
  line-height: 1.85;
  margin-bottom: 2rem;
}

.reading-order {
  margin: 1.25rem 0;
  padding: 1rem 1.1rem;
  border-left: 2px solid var(--color-accent);
  background: var(--color-bg-alt);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.reading-order-label {
  font-size: 0.7rem;
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 0 0 0.5rem;
}

.reading-order-line {
  font-size: 0.875rem;
  color: var(--color-text);
  margin: 0.25rem 0 0;
  line-height: 1.5;
}

.reading-order-note {
  color: var(--color-text-muted);
  font-size: 0.8rem;
}

.author-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: 1px solid var(--color-accent);
  padding-bottom: 1px;
  transition: opacity 0.15s;
}

.author-link:hover {
  opacity: 0.7;
  text-decoration: none;
}

.author-socials {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.75rem;
}

.author-social-link {
  display: inline-flex;
  align-items: center;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.author-social-link:hover {
  color: var(--color-accent);
  text-decoration: none;
}

/* =====================================================
   About Page
   ===================================================== */

.about-section {
  padding: 4rem 1.5rem 6rem;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 5rem;
  align-items: start;
}

.about-heading {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: normal;
  color: var(--color-text);
  margin: 2.5rem 0 0.65rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--color-border);
}

.about-heading:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.about-prose p {
  color: var(--color-text-muted);
  line-height: 1.85;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.about-prose a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Sidebar */
.sidebar-logo {
  text-align: center;
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--color-border);
}

.sidebar-logo-img {
  width: 130px;
  height: auto;
  display: inline-block;
  opacity: 0.85;
}

.about-sidebar {
  border-left: 1px solid var(--color-border);
  padding-left: 2.5rem;
  position: sticky;
  top: calc(var(--nav-height) + 2rem);
}

.sidebar-widget {
  margin-bottom: 2.5rem;
}

.sidebar-widget-label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0.85rem;
}

.sidebar-genre-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-genre-list li {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--color-text);
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--color-border);
}

.sidebar-genre-list li:last-child {
  border-bottom: none;
}

.sidebar-submissions-status {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--color-text);
  margin-bottom: 0.65rem;
}

.sidebar-submissions-note {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* =====================================================
   Pre-Order Badge & Button
   ===================================================== */

.badge-preorder {
  background: #e6efea;
  color: #2a5235;
}

.buy-link-preorder {
  background: #3a6645;
  border-color: #3a6645;
  color: #fff;
}

.buy-link-preorder:hover {
  filter: brightness(0.88);
}

.release-date {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 0.72rem;
  color: var(--color-text-muted);
}

/* =====================================================
   Contact Page
   ===================================================== */

.contact-section {
  padding: 3.5rem 1.5rem 5rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 4rem;
  align-items: start;
}

.contact-block-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: normal;
  margin-bottom: 0.85rem;
  color: var(--color-text);
}

.contact-block-body {
  color: var(--color-text-muted);
  line-height: 1.75;
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

.contact-email-link {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.975rem;
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  margin-bottom: 2rem;
  transition: color 0.15s;
}

.contact-email-link:hover {
  color: var(--color-accent-light);
  text-decoration: underline;
}

.contact-social-label {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-bottom: 0.65rem;
}

.contact-newsletter {
  margin-top: 1.5rem;
}

.contact-newsletter-link {
  font-size: 0.9rem;
  color: var(--color-accent);
  text-decoration: none;
}

.contact-newsletter-link:hover {
  text-decoration: underline;
}

.social-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.social-link {
  display: inline-flex;
  align-items: center;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.social-link:hover {
  color: var(--color-accent);
  text-decoration: none;
}

/* =====================================================
   ARC Signup Form
   ===================================================== */

.arc-block {
  border-left: 1px solid var(--color-border);
  padding-left: 4rem;
}

.arc-form {
  margin-top: 1.5rem;
}

.form-field {
  margin-bottom: 1.25rem;
}

.form-field label,
.form-fieldset legend {
  display: block;
  font-size: 0.875rem;
  color: var(--color-text);
  margin-bottom: 0.4rem;
}

.form-fieldset {
  border: none;
  padding: 0;
  margin: 0 0 1.25rem;
}

.form-fieldset legend {
  margin-bottom: 0.75rem;
}

.required {
  color: var(--color-accent);
  margin-left: 2px;
}

.form-hint {
  color: var(--color-text-muted);
  font-size: 0.8rem;
  font-style: italic;
  font-family: var(--font-heading);
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field textarea {
  display: block;
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.5;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-faint);
}

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

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--color-text);
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--color-accent);
  cursor: pointer;
  flex-shrink: 0;
}

.arc-submit {
  margin-top: 0.5rem;
  width: 100%;
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
}

.arc-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-note {
  margin-top: 0.75rem;
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-align: center;
}

/* Form feedback messages */
.form-feedback {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  line-height: 1.55;
}

.form-success {
  background: #edf5ed;
  color: #2a5a2a;
  border: 1px solid #c0d9c0;
}

.form-error {
  background: #fdf0ed;
  color: #8b3a2a;
  border: 1px solid #f0c4b8;
}

.form-feedback a {
  color: inherit;
  font-weight: 500;
}

/* =====================================================
   Footer Social Links
   ===================================================== */

.footer-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 0.85rem 0;
  flex-wrap: wrap;
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-social-link:hover {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
}

/* =====================================================
   Footer
   ===================================================== */

.site-footer {
  background-color: var(--color-hero);
  background-image:
    linear-gradient(rgba(26, 40, 32, 0.82), rgba(26, 40, 32, 0.82)),
    image-set(
      url('../images/bookshelf-dark.webp') type('image/webp'),
      url('../images/bookshelf-dark.jpg') type('image/jpeg')
    );
  background-size: cover;
  background-position: center 60%;
  color: rgba(255,255,255,0.6);
  text-align: center;
  padding: 2.75rem 1.5rem;
  font-size: 0.85rem;
}

.site-footer a {
  color: rgba(255,255,255,0.7);
}

.site-footer a:hover {
  color: rgba(255,255,255,0.95);
  text-decoration: none;
}

.footer-logo {
  width: 90px;
  height: auto;
  display: block;
  margin: 0 auto 1rem;
  filter: brightness(0) invert(1);
  opacity: 0.7;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 1rem 0 0;
  list-style: none;
}

.footer-copy {
  margin-top: 1.25rem;
  font-size: 0.75rem;
  opacity: 0.4;
}

/* =====================================================
   Book card links (catalog → detail page)
   ===================================================== */

.book-cover-link {
  display: block;
  text-decoration: none;
}

.book-cover-link:hover img {
  opacity: 0.88;
  transition: opacity 0.15s;
}

.book-title-link {
  text-decoration: none;
  color: inherit;
}

.book-title-link:hover .book-title {
  color: var(--color-accent);
}

/* =====================================================
   Book Detail Page (book.html)
   ===================================================== */

.book-detail-section {
  padding: 3rem 1.5rem 5rem;
}

.book-detail-breadcrumb {
  margin-bottom: 2.5rem;
}

.book-detail-breadcrumb a {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.15s;
}

.book-detail-breadcrumb a:hover {
  color: var(--color-accent);
  text-decoration: none;
}

.book-detail-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 4rem;
  align-items: start;
}

.book-detail-cover {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: flex-start;
}

.book-detail-cover-img {
  position: relative;
  width: 100%;
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-hover);
  aspect-ratio: 2 / 3;
}

.book-detail-cover-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.book-detail-cover-img .badge {
  font-size: 0.72rem;
}

.book-detail-cover .book-detail-actions {
  margin-top: 0;
}

.book-detail-info {
  padding-top: 0.5rem;
}

.book-detail-genre {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  display: block;
  margin-bottom: 0.6rem;
}

.book-detail-title {
  font-family: var(--font-heading);
  font-size: clamp(1.9rem, 3.5vw, 2.75rem);
  font-weight: normal;
  line-height: 1.15;
  color: var(--color-text);
  margin-bottom: 0.65rem;
}

.book-detail-series {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 0.35rem;
}

.book-detail-author {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-bottom: 0;
}

.book-detail-author a {
  color: var(--color-accent);
  text-decoration: none;
}

.book-detail-author a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.book-detail-divider {
  width: 40px;
  height: 1px;
  background: var(--color-border);
  border: none;
  margin: 1.75rem 0;
}

.book-detail-blurb {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-text);
  margin-bottom: 0;
}

.book-detail-description {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-text);
}

.book-detail-description p {
  margin: 0 0 1em;
}

.book-detail-description p:last-child {
  margin-bottom: 0;
}

/* =====================================================
   Series Nav (Continue the Series)
   ===================================================== */

.series-nav {
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--color-border);
}

.series-nav-heading {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 1.5rem;
}

.series-nav-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.series-nav-book,
.series-nav-book--current {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 80px;
  text-decoration: none;
  gap: 0.35rem;
}

.series-nav-book img,
.series-nav-book--current img {
  width: 80px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: block;
}

.series-nav-divider {
  width: 1px;
  align-self: stretch;
  background: var(--color-border);
  margin: 0 0.25rem;
}

.series-nav-book--current img {
  opacity: 0.45;
}

.series-nav-num {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.series-nav-title {
  font-size: 0.8rem;
  font-family: var(--font-heading);
  color: var(--color-text);
  text-align: center;
  line-height: 1.3;
}

/* =====================================================
   Reader Quotes
   ===================================================== */

.reader-quotes {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--color-border);
}

.reader-quotes-heading {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 1.5rem;
}

.reader-quotes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.reader-quote {
  margin: 0;
  padding: 1.25rem 1.5rem;
  background: var(--color-surface);
  border-radius: var(--radius);
  border-left: 3px solid var(--color-accent);
}

.reader-quote p {
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--color-text);
  margin: 0 0 0.75rem;
}

.reader-quote footer {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.reader-quote-source {
  opacity: 0.75;
}

.series-nav-book:hover img {
  box-shadow: var(--shadow-hover);
}

.series-nav-book:hover .series-nav-title {
  color: var(--color-accent);
}

.book-detail-actions {
  margin-top: 2rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.book-detail-release {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.book-not-found {
  text-align: center;
  padding: 5rem 1.5rem;
  color: var(--color-text-muted);
}

.book-not-found h1 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: normal;
  margin-bottom: 1rem;
}

.book-not-found p {
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}


/* =====================================================
   No-results state
   ===================================================== */

.no-results {
  text-align: center;
  padding: 4rem 1.5rem;
  color: var(--color-text-muted);
  font-family: var(--font-heading);
  font-style: italic;
  display: none;
}

.no-results.visible {
  display: block;
}

/* =====================================================
   Hamburger / Mobile Nav
   ===================================================== */

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  margin-right: -0.5rem;
}

.nav-toggle svg {
  display: block;
  width: 22px;
  height: 22px;
  color: var(--color-text);
}

/* =====================================================
   Responsive
   ===================================================== */

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .arc-block {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--color-border);
    padding-top: 2.5rem;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .about-sidebar {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--color-border);
    padding-top: 2rem;
    position: static;
  }

  .featured-section .book-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .featured-section {
    padding: 3.5rem 1.5rem;
  }

  .newsletter-section {
    padding: 3.5rem 1.5rem;
  }

  .authors-section {
    padding: 2.5rem 1.5rem 3.5rem;
  }

  .about-section {
    padding: 2.5rem 1.5rem 3.5rem;
  }

  .contact-section {
    padding: 2.5rem 1.5rem 3.5rem;
  }

  .catalog-section {
    padding: 2rem 1.5rem 3.5rem;
  }
}

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

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 1.5rem 1.25rem;
    gap: 0;
    box-shadow: 0 4px 12px rgba(33,29,24,0.08);
  }

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

  .nav-links li {
    border-bottom: 1px solid var(--color-border);
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  .nav-links a {
    display: block;
    padding: 0.75rem 0;
    font-size: 0.95rem;
  }

  /* Hero */
  .hero {
    padding: 3.5rem 1rem 3rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-tagline {
    font-size: 0.95rem;
  }

  /* Page heroes */
  .page-hero {
    padding: 2.5rem 1.5rem 2rem;
  }

  .page-hero h1 {
    font-size: 1.6rem;
  }

  /* Book grid */
  .book-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.25rem;
  }

  .authors-grid {
    grid-template-columns: 1fr;
  }

  /* Filter bar — collapsible with pills on mobile */
  .filter-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 0.5rem 1rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--color-text-muted);
    cursor: pointer;
    margin-bottom: 1.25rem;
  }

  .filter-toggle svg {
    flex-shrink: 0;
  }

  .filter-bar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
  }

  .filter-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    padding-right: 0;
    margin-right: 0;
    border-right: none;
  }

  .filter-label {
    width: 100%;
    padding-bottom: 0.2rem;
    margin-right: 0;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }

  .filter-btn {
    padding: 0.45rem 0.9rem;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    font-size: 0.8rem;
    margin-bottom: 0;
    color: var(--color-text-muted);
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .filter-btn.active {
    background: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent);
  }

  .section-header h2 {
    font-size: 1.5rem;
  }

  /* Author entries */
  .author-entry {
    padding: 2.5rem 0;
  }

  /* Book detail */
  .book-detail-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .book-detail-cover {
    max-width: 220px;
    margin: 0 auto;
  }

  .book-detail-title {
    font-size: 1.5rem;
  }

  .book-detail-description {
    font-size: 0.95rem;
  }

  /* Series nav */
  .series-nav-grid {
    gap: 1rem;
  }

  /* Catalog */
  .filter-btn {
    font-size: 0.8rem;
    padding: 0 0.6rem 0.6rem;
  }

  .book-title {
    font-size: 0.95rem;
  }

  .book-card:hover {
    transform: none;
  }
}

@media (max-width: 480px) {
  .newsletter-fields {
    flex-direction: column;
  }

  .newsletter-btn {
    width: 100%;
    padding: 0.75rem;
  }

  .featured-section .book-grid {
    grid-template-columns: 1fr;
  }

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

  .hero {
    padding: 2.5rem 1rem 2rem;
  }

  .newsletter-section {
    padding: 2.5rem 1rem;
  }

  /* Prevent iOS zoom on input focus */
  .form-field input[type="text"],
  .form-field input[type="email"],
  .form-field textarea {
    font-size: 16px;
  }

  .container {
    padding: 0 1rem;
  }

  .footer-logo {
    width: 70px;
  }

  .book-detail-cover {
    max-width: 160px;
  }

  .book-detail-description p {
    font-size: 0.9rem;
    line-height: 1.7;
  }

  .reader-quotes-grid {
    gap: 1.25rem;
  }

  .reader-quote p {
    font-size: 0.9rem;
  }
}
