/* ========================================
   Paul Fox Author Website — Style Sheet
   Theme: Film Noir / Editorial
   Inspired by: Ian Rankin site aesthetic
   Accent: #cc2200 (brand red)
   ======================================== */

/* ----------------------------------------
   1. CSS Custom Properties
   ---------------------------------------- */
:root {
  /* Colors */
  --color-bg:            #0d0d0d;
  --color-bg-secondary:  #161616;
  --color-bg-card:       #111111;
  --color-text:          #d8d8d8;
  --color-text-muted:    #a8a8a8;
  --color-text-heading:  #f2f2f2;
  --color-accent:        #cc2200;
  --color-accent-hover:  #e63300;
  --color-border:        #2a2a2a;
  --color-border-light:  #333333;
  --color-rule:          #cc2200;

  /* Typography */
  --font-heading: 'Trirong', Georgia, serif;
  --font-body:    'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  /* Type Scale */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.375rem;
  --text-2xl:  1.875rem;
  --text-3xl:  2.5rem;
  --text-4xl:  3.25rem;
  --text-5xl:  4.5rem;

  /* Spacing */
  --sp-1:  0.25rem;
  --sp-2:  0.5rem;
  --sp-3:  0.75rem;
  --sp-4:  1rem;
  --sp-6:  1.5rem;
  --sp-8:  2rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-24: 6rem;

  /* Layout */
  --max-width:     1200px;
  --header-height: 68px;

  /* Transitions */
  --ease-fast: 0.15s ease;
  --ease-base: 0.25s ease;
  --ease-slow: 0.4s ease;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  min-height: 100vh;
}

/* Subtle 35mm film grain overlay (site-wide) */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 100; /* Below header (1000) and nav (999) — grain was washing out burger lines */
  pointer-events: none;
  background: url('../assets/images/film-grain.png') repeat;
  background-size: 180px 180px;
  opacity: 0.14;
  mix-blend-mode: soft-light;
}

img { display: block; max-width: 100%; }
ul  { list-style: none; }

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

/* ----------------------------------------
   3. Typography
   ---------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-text-heading);
  line-height: 1.15;
  font-weight: 700;
}

h1 { font-size: var(--text-5xl); letter-spacing: -0.02em; }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl);  }

p { margin-bottom: var(--sp-4); }
p:last-child { margin-bottom: 0; }

/* Eyebrow / Section Label */
.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--sp-3);
}

/* Section subtitle */
.lead {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  line-height: 1.7;
  max-width: 640px;
}

/* ----------------------------------------
   4. Layout Utilities
   ---------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}

.section {
  padding: var(--sp-24) 0;
}

.section--sm {
  padding: var(--sp-16) 0;
}

.section--dark {
  background-color: var(--color-bg-secondary);
}

/* Books + newsletter cinematic backdrop system */
.books-delivery-section,
.newsletter-cityscape-section,
.about-newsletter-section,
.blog-newsletter-section,
.contact-newsletter-section {
  --cinema-pos: center 44%;
  --cinema-brightness: 0.58;
  --cinema-opacity: 0.40;
  --cinema-overlay-a: 0.68;
  --cinema-overlay-b: 0.54;
  --cinema-min-h: 0;
  position: relative;
  overflow: hidden;
  min-height: var(--cinema-min-h);
}

.books-delivery-section::before,
.newsletter-cityscape-section::before,
.about-newsletter-section::before,
.blog-newsletter-section::before,
.contact-newsletter-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: var(--cinema-pos);
  background-repeat: no-repeat;
  filter: grayscale(1) contrast(1.05) brightness(var(--cinema-brightness));
  opacity: var(--cinema-opacity);
  pointer-events: none;
}

.books-delivery-section::before { background-image: url('../assets/images/sf-books-delivery.jpg'); }
.newsletter-cityscape-section::before { background-image: url('../assets/images/sf-cityscape.jpg'); }
.about-newsletter-section::before { background-image: url('../assets/images/sf-about-newsletter.webp'); }
.blog-newsletter-section::before { background-image: url('../assets/images/sf-blog-newsletter.jpg'); }
.contact-newsletter-section::before { background-image: url('../assets/images/sf-contact-newsletter.jpg'); }

.books-delivery-section::after,
.newsletter-cityscape-section::after,
.about-newsletter-section::after,
.blog-newsletter-section::after,
.contact-newsletter-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(5, 5, 5, var(--cinema-overlay-a)) 0%,
    rgba(5, 5, 5, var(--cinema-overlay-b)) 50%,
    rgba(5, 5, 5, var(--cinema-overlay-a)) 100%
  );
  pointer-events: none;
}

.books-delivery-section > .container,
.newsletter-cityscape-section > .container,
.about-newsletter-section > .container,
.blog-newsletter-section > .container,
.contact-newsletter-section > .container {
  position: relative;
  z-index: 1;
}

/* Per-section composition tuning for consistency */
.books-delivery-section {
  --cinema-pos: center 46%;
}

.newsletter-cityscape-section {
  --cinema-pos: center 42%;
}

.about-newsletter-section {
  --cinema-pos: center 40%;
}

.blog-newsletter-section {
  --cinema-pos: center 50%;
  --cinema-brightness: 0.52;
}

.contact-newsletter-section {
  --cinema-pos: 30% 18%;
  --cinema-brightness: 0.52;
}

/* Thin horizontal rule */
.rule {
  width: 100%;
  height: 1px;
  background-color: var(--color-border);
  border: none;
  margin: var(--sp-16) 0;
}

/* ----------------------------------------
   5. Header & Navigation
   ---------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background-color: rgba(13, 13, 13, 0.97);
  -webkit-backdrop-filter: blur(12px); /* iOS Safari prefix */
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  z-index: 9000; /* Well above all page content; below lightbox (10000) */
  /* Force GPU compositing layer — prevents iOS Safari scroll repaint dropping the header */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

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

/* Logo */
.site-logo {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  text-decoration: none;
  line-height: 1;
  font-family: var(--font-heading);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--color-text-heading);
}

.site-logo:hover { color: var(--color-accent); }

/* Header-only fedora mark beside logo */
.site-header .site-logo {
  position: relative;
  padding-left: 88px;
}

.site-header .site-logo::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 72px;
  height: 60px;
  background: url('../assets/images/fedora-website-photo.png') center / contain no-repeat;
  opacity: 0.95;
}

@media (max-width: 768px) {
  .site-header .site-logo { padding-left: 62px; }
  .site-header .site-logo::before { width: 56px; height: 44px; }
}

.logo-img {
  height: 42px;
  width: auto;
  display: block;
}

@media (max-width: 768px) {
  .logo-img {
    height: 32px;
  }
}

@media (max-width: 480px) {
  .logo-img {
    height: 28px;
  }
}

/* Logo subtitle */
.site-logo span {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* Nav */
.site-nav ul {
  display: flex;
  gap: var(--sp-8);
}

.site-nav a {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding: var(--sp-2) 0;
  position: relative;
  transition: color var(--ease-fast);
}

.site-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--color-accent);
  transition: width var(--ease-base);
}

.site-nav a:hover { color: var(--color-text-heading); }
.site-nav a:hover::after,
.site-nav a.active::after { width: 100%; }
.site-nav a.active { color: var(--color-text-heading); }

/* Mobile toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--sp-2);
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2.5px;
  background-color: #ffffff;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.16);
  transition: var(--ease-fast);
}

.menu-toggle-floating {
  display: none;
}

/* ----------------------------------------
   6. Main + Page offset
   ---------------------------------------- */
main {
  padding-top: var(--header-height);
  min-height: calc(100vh - 200px);
}

/* ----------------------------------------
   7. Hero — Split Layout (Homepage)
   ---------------------------------------- */
.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: clamp(580px, 85vh, 860px);
  border-bottom: 1px solid var(--color-border);
  position: relative;
}

/* SF Noir cityscape — full-width behind both panels */
.hero-split::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../assets/images/sf-books-delivery.jpg');
  background-size: cover;
  background-position: center 40%;
  filter: grayscale(100%);
  opacity: 0.28;
  z-index: 0;
  pointer-events: none;
}

/* Dark overlay — left darker (book cover stays crisp), right slightly open */
.hero-split::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(5, 5, 5, 0.76) 0%,
    rgba(5, 5, 5, 0.60) 50%,
    rgba(5, 5, 5, 0.50) 100%
  );
  z-index: 0;
  pointer-events: none;
}

.hero-cover-panel {
  position: relative;
  z-index: 2;
  background: transparent;
  padding: 0;
  overflow: hidden;
  /* border-right removed — cityscape spans full width */
}

.hero-cover-panel::before {
  content: '';
  position: absolute;
  inset: 8% 16% 10%;
  background: radial-gradient(circle at 50% 45%, rgba(204,34,0,0.22), rgba(204,34,0,0) 62%);
  filter: blur(22px);
  pointer-events: none;
}

/* Carousel container sits inside hero-cover-panel — no extra img rules needed here */

.hero-content-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--sp-16) var(--sp-12);
  position: relative;
  z-index: 2;
}

.hero-content-inner {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

.hero-series-label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--sp-4);
}

.hero-author-name {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 5.5vw, 5.5rem);
  font-weight: 700;
  color: var(--color-text-heading);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-6);
}

.hero-tagline {
  font-size: var(--text-xl);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--sp-8);
  max-width: 420px;
  border-left: 2px solid var(--color-accent);
  padding-left: var(--sp-4);
  font-style: italic;
}

.hero-actions {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

.hero-trust-strip {
  margin-top: var(--sp-4);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
}

/* ----------------------------------------
   7b. Cover Flow Carousel (Single Book Showcase)
   ---------------------------------------- */

/* Cover Flow Container */
.coverflow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 900px;
  height: 540px;
  z-index: 10;
  overflow: hidden;
}

.coverflow-track {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

/* Individual Cover Items - stacked, only active one visible */
.coverflow-item {
  position: absolute;
  width: 320px;
  height: 480px;
  opacity: 0;
  transform: scale(0.95);
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
  overflow: hidden;
}

.coverflow-item.active {
  opacity: 1;
  transform: scale(1);
  z-index: 10;
}

.coverflow-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  background: #000;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 8px 20px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  border-radius: 0;
  display: block;
  margin: 0;
  padding: 0;
}

/* Subtle ambient glow behind book */
.coverflow-item::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 340px;
  height: 500px;
  background: radial-gradient(ellipse at center, rgba(204,34,0,0.12) 0%, transparent 70%);
  border-radius: 8px;
  pointer-events: none;
  z-index: -1;
}

/* Arrows */
.coverflow-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: var(--color-text);
  cursor: pointer;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.coverflow-arrow:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  transform: translateY(-50%) scale(1.08);
}

.coverflow-arrow svg {
  width: 22px;
  height: 22px;
}

.coverflow-arrow--prev { left: 14px; }
.coverflow-arrow--next { right: 14px; }

/* Dots */
.coverflow-dots {
  position: absolute;
  bottom: -80px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 14px;
}

.coverflow-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.coverflow-dot:hover {
  background: rgba(255, 255, 255, 0.5);
}

.coverflow-dot.active {
  background: var(--color-accent);
  transform: scale(1.25);
}

/* Mobile adjustments */
@media (max-width: 1024px) {
  .coverflow {
    max-width: 700px;
    height: 460px;
  }
  .coverflow-item {
    width: 280px;
    height: 420px;
  }
  .coverflow-item::before {
    width: 300px;
    height: 440px;
  }
  .coverflow-arrow {
    width: 48px;
    height: 48px;
  }
  .coverflow-arrow--prev { left: 12px; }
  .coverflow-arrow--next { right: 12px; }
  .coverflow-arrow svg {
    width: 20px;
    height: 20px;
  }
  .coverflow-dots { bottom: -70px; }
}

@media (max-width: 768px) {
  .coverflow {
    max-width: 480px;
    height: 380px;
  }
  .coverflow-item {
    width: 220px;
    height: 330px;
  }
  .coverflow-item::before {
    width: 240px;
    height: 350px;
  }
  .coverflow-arrow {
    width: 42px;
    height: 42px;
  }
  .coverflow-arrow--prev { left: 10px; }
  .coverflow-arrow--next { right: 10px; }
  .coverflow-dots {
    bottom: -60px;
    gap: 12px;
  }
  .coverflow-dot {
    width: 10px;
    height: 10px;
  }
}

@media (max-width: 480px) {
  .coverflow {
    max-width: 320px;
    height: 280px;
  }
  .coverflow-item {
    width: 150px;
    height: 225px;
  }
  .coverflow-item::before {
    width: 170px;
    height: 245px;
  }
}

/* Hero Cover Panel Adjustments for Cover Flow — background now transparent (cityscape shows through) */

.hero-cover-panel::before {
  background: radial-gradient(circle at 50% 50%, rgba(204,34,0,0.18), rgba(0,0,0,0) 60%);
}

/* ----------------------------------------
   7c. Hero Carousel (legacy/fade style - unused now)
   ---------------------------------------- */

/* ----------------------------------------
   8. Page Hero (inner pages)
   ---------------------------------------- */
.page-hero {
  padding: var(--sp-16) 0 var(--sp-12);
  border-bottom: 1px solid var(--color-border);
}

.page-hero h1 {
  font-size: var(--text-4xl);
  margin-bottom: var(--sp-4);
}

.page-hero .lead {
  max-width: 600px;
}

/* ----------------------------------------
   9. Buttons
   ---------------------------------------- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: all var(--ease-base);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--color-accent);
  color: #fff;
}
.btn-primary:hover {
  background-color: var(--color-accent-hover);
  color: #fff;
  transform: translateY(-1px);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border-light);
}
.btn-outline:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* ----------------------------------------
   10. Section Headings w/ Rule
   ---------------------------------------- */
.section-header {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  margin-bottom: var(--sp-12);
}

.section-header h2 {
  white-space: nowrap;
}

.section-header::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

/* ----------------------------------------
   11. Homepage Book Grid (compact covers)
   ---------------------------------------- */
.covers-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--sp-6);
}

.cover-item {
  display: block;
  text-align: center;
}

/* Book flip microinteraction */
.cover-flip {
  display: block;
  width: 100%;
  height: 0;
  padding-top: 150%; /* 2:3 ratio fallback-safe */
  position: relative;
  perspective: 1200px;
  margin-bottom: var(--sp-4);
}

.cover-flip-inner {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.cover-flip-front,
.cover-flip-back {
  display: block;
  position: absolute;
  inset: 0;
  overflow: hidden;
  backface-visibility: hidden;
  border: 1px solid var(--color-border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

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

.cover-flip-back {
  transform: rotateY(180deg);
  background:
    radial-gradient(circle at 18% 20%, rgba(204, 34, 0, 0.05), transparent 52%),
    repeating-linear-gradient(
      to bottom,
      rgba(89, 74, 50, 0.10) 0px,
      rgba(89, 74, 50, 0.10) 1px,
      rgba(0, 0, 0, 0) 1px,
      rgba(0, 0, 0, 0) 5px
    ),
    linear-gradient(180deg, #e2d3b8 0%, #d6c09d 52%, #cab28e 100%);
  color: #1e1710;
  text-align: left;
  padding: var(--sp-3);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  justify-content: flex-start;
  overflow: hidden;
  font-family: 'Courier New', 'IBM Plex Mono', monospace;
}

.case-note-label {
  color: #6f170b;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  line-height: 1.2;
}

.case-note-line {
  font-size: 0.8rem;
  font-weight: 700;
  color: #1a140d;
  letter-spacing: 0.01em;
  line-height: 1.3;
}

/* Red label words (Location:, Incident:, Client: etc.) */
.case-note-line strong {
  color: #6f170b;
  font-weight: 700;
}

.case-note-hook {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  font-style: italic;
  color: #14100b;
  line-height: 1.35;
}

@media (hover: hover) and (pointer: fine) {
  .cover-item:hover .cover-flip-inner,
  .cover-item:focus-within .cover-flip-inner {
    transform: rotateY(180deg);
  }
}

@media (max-width: 768px) {
  .cover-flip-back { display: none; }

  /* Show back face when JS adds .flipped on tap */
  .cover-item.flipped .cover-flip-back { display: flex; }
}

/* Touch: tap to flip — trigger rotation via JS .flipped class */
.cover-item.flipped .cover-flip-inner {
  transform: rotateY(180deg);
}

/* Mobile cover flip-back: tighter sizing so text fits inside small covers */
@media (max-width: 768px) {
  .cover-item.flipped .cover-flip-back {
    padding: var(--sp-2);
    gap: 0.25rem;
  }
  .cover-item.flipped .case-note-label {
    font-size: 0.58rem;
    letter-spacing: 0.08em;
    margin-bottom: 0.2rem;
  }
  .cover-item.flipped .case-note-line {
    font-size: 0.6rem;
    line-height: 1.2;
  }
  .cover-item.flipped .case-note-line strong {
    color: #6f170b;
    font-weight: 700;
  }
  .cover-item.flipped .case-note-hook {
    font-size: 0.62rem;
    line-height: 1.22;
    margin-top: 0.2rem;
  }
}

.cover-item-title {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  color: var(--color-text-heading);
  margin-bottom: var(--sp-1);
  line-height: 1.2;
}

.cover-item-price {
  font-size: var(--text-base);
  color: var(--color-text);
  font-weight: 600;
}

/* ----------------------------------------
   12. Book Listings (Books Page — editorial)
   ---------------------------------------- */
.book-listing {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--sp-12);
  align-items: start;
  padding: var(--sp-12) 0;
  border-bottom: 1px solid var(--color-border);
}

.book-listing:first-child {
  padding-top: 0;
}

.book-listing-cover {
  position: static;
}

.book-listing-cover img {
  width: 100%;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
  transition: transform var(--ease-base);
}
.book-listing-cover img:hover {
  transform: translateY(-4px);
}

.book-listing-info {}

.book-listing-number {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--sp-3);
}

.book-listing-title {
  font-size: var(--text-3xl);
  margin-bottom: var(--sp-4);
  line-height: 1.1;
}

.book-listing-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  margin-bottom: var(--sp-6);
  padding-bottom: var(--sp-6);
  border-bottom: 1px solid var(--color-border);
}

.book-listing-pages {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.book-listing-price {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-accent);
  font-family: var(--font-heading);
}

.book-listing-badge {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-bg);
  background-color: var(--color-accent);
  padding: 0.2em 0.6em;
}

.book-listing-synopsis {
  color: var(--color-text);
  line-height: 1.75;
  margin-bottom: var(--sp-6);
  max-width: 640px;
}

/* ----------------------------------------
   13. Author Section (Homepage)
   ---------------------------------------- */
/* Bridge ambience for About section (matches hero noir treatment) */
.author-bridge-bg {
  position: relative;
  overflow: hidden;
}

.author-bridge-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../assets/images/golden-gate-bridge-bw.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  filter: grayscale(1) contrast(1.05) brightness(0.5);
  opacity: 0.24;
  pointer-events: none;
}

.author-bridge-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(5, 5, 5, 0.80) 0%,
    rgba(5, 5, 5, 0.66) 50%,
    rgba(5, 5, 5, 0.78) 100%
  );
  pointer-events: none;
}

.author-bridge-bg > .container {
  position: relative;
  z-index: 1;
}

.author-feature {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: var(--sp-12);
  align-items: center;
}

.author-feature-photo {
  position: relative;
}

.author-feature-photo img {
  width: 100%;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7);
}

.author-feature-photo::before {
  content: '';
  position: absolute;
  inset: -8px;
  border: 1px solid var(--color-border-light);
  pointer-events: none;
  z-index: -1;
}

.author-feature-photo::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 140%;
  height: 140%;
  background: radial-gradient(ellipse at center, rgba(204,34,0,0.25) 0%, transparent 65%);
  pointer-events: none;
  z-index: -2;
}

.author-feature-text .eyebrow {
  margin-bottom: var(--sp-4);
}

.author-feature-text h2 {
  margin-bottom: var(--sp-6);
}

.author-feature-text p {
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: var(--sp-4);
}

/* ----------------------------------------
   14. Newsletter
   ---------------------------------------- */
.newsletter-wrap {
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
}

.newsletter-wrap h2 {
  margin-bottom: var(--sp-3);
}

.newsletter-wrap p {
  color: var(--color-text-muted);
  margin-bottom: var(--sp-8);
}

.newsletter-form {
  display: flex;
  gap: var(--sp-3);
}

.newsletter-form input {
  flex: 1;
  padding: 0.75rem 1rem;
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border-light);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  transition: border-color var(--ease-fast);
}
.newsletter-form input:focus {
  outline: none;
  border-color: var(--color-accent);
}
.newsletter-form input::placeholder {
  color: var(--color-text-muted);
}

/* ----------------------------------------
   15. Forms
   ---------------------------------------- */
.form-group {
  margin-bottom: var(--sp-6);
}

.form-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--sp-2);
}

input[type="email"],
input[type="text"],
textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.5;
  transition: border-color var(--ease-fast);
}
input[type="email"]:focus,
input[type="text"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}
input::placeholder,
textarea::placeholder {
  color: var(--color-text-muted);
}
textarea {
  resize: vertical;
  min-height: 140px;
}

/* ----------------------------------------
   16. Blog
   ---------------------------------------- */
.blog-list {
  max-width: 720px;
}

.blog-entry {
  padding: var(--sp-8) 0;
  border-bottom: 1px solid var(--color-border);
}
.blog-entry:last-child { border-bottom: none; }

.blog-entry-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin-bottom: var(--sp-3);
}

.blog-date {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.blog-tag {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  background-color: var(--color-bg-secondary);
  padding: 0.2em 0.5em;
  border: 1px solid var(--color-border);
}

.blog-entry h2 {
  font-size: var(--text-2xl);
  margin-bottom: var(--sp-3);
}
.blog-entry h2 a {
  color: var(--color-text-heading);
  transition: color var(--ease-fast);
}
.blog-entry h2 a:hover { color: var(--color-accent); }

.blog-excerpt {
  color: var(--color-text-muted);
  line-height: 1.75;
  margin-bottom: var(--sp-4);
}

/* ----------------------------------------
   17. About Page
   ---------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--sp-12);
  align-items: start;
}

.about-photo-wrap {
  align-self: center;
}

.about-series {
  grid-column: 2;
}

.about-photo-wrap {
  position: static;
}

.about-photo-wrap img {
  width: 100%;
  max-width: 280px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7);
}

.series-list {
  margin-top: var(--sp-8);
  border-top: 1px solid var(--color-border);
}

.series-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-base);
}

.series-list-number {
  color: var(--color-accent);
  font-weight: 700;
  font-size: var(--text-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  min-width: 40px;
}

.series-list-price {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

/* ----------------------------------------
   18. Contact Page
   ---------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-16);
  align-items: start;
}

.contact-info h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--sp-4);
}

.contact-info p {
  color: var(--color-text-muted);
  line-height: 1.8;
}

.contact-info a {
  color: var(--color-accent);
}

/* ----------------------------------------
   18b. Book Cover Lightbox
   ---------------------------------------- */

/* Click-to-enlarge cursor on book listing covers */
.book-listing-cover img {
  cursor: zoom-in;
}

/* Lightbox overlay */
.cover-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.cover-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.cover-lightbox-img {
  max-width: min(80vw, 420px);
  max-height: 85vh;
  object-fit: contain;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.9);
  display: block;
}

.cover-lightbox-close {
  position: absolute;
  top: var(--sp-6);
  right: var(--sp-6);
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--ease-base), border-color var(--ease-base);
  flex-shrink: 0;
}

.cover-lightbox-close:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

/* ----------------------------------------
   19. Footer
   ---------------------------------------- */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: var(--sp-12) 0 var(--sp-8);
  margin-top: var(--sp-16);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: var(--sp-12);
  margin-bottom: var(--sp-12);
}

.footer-brand .site-logo {
  font-size: var(--text-xl);
  display: inline-block;
  margin-bottom: var(--sp-4);
}

.footer-brand p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
  max-width: 260px;
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--sp-4);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.footer-col a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  transition: color var(--ease-fast);
}
.footer-col a:hover { color: var(--color-text-heading); }

.footer-bottom {
  padding-top: var(--sp-8);
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom p {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin: 0;
  letter-spacing: 0.04em;
}

.footer-bottom-series {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ----------------------------------------
   19b. Social Icons
   ---------------------------------------- */
.social-links {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  transition: color var(--ease-fast);
  line-height: 1;
}

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

.social-links svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* Smaller in header */
.social-links--header svg {
  width: 15px;
  height: 15px;
}

/* Header right: nav + social icons grouped together */
.header-right {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
}

/* ----------------------------------------
   19c. About Page — Author Layout
   ---------------------------------------- */

/* Centred single-column author layout */
.about-author-layout {
  max-width: 760px;
  margin: 0 auto;
}

.about-author-photo {
  text-align: center;
  margin-bottom: var(--sp-12);
}

.about-author-photo img {
  width: 280px;
  max-width: 100%;
  display: inline-block;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7);
}

/* ----------------------------------------
   19d. Utilities
   ---------------------------------------- */
.mt-2 { margin-top: var(--sp-2); }
.mt-4 { margin-top: var(--sp-4); }
.mt-8 { margin-top: var(--sp-8); }
.mt-12 { margin-top: var(--sp-12); }
.mb-6 { margin-bottom: var(--sp-6); }
.mb-8 { margin-bottom: var(--sp-8); }
.text-center { text-align: center; }
.text-lg { font-size: var(--text-lg); }
.container--narrow { max-width: 640px; }
.inline-flex-gap { display: flex; align-items: center; gap: var(--sp-4); }
.series-link { color: var(--color-text-heading); font-size: var(--text-base); }
.link-inline-accent {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-accent);
}
.link-inline-accent:hover { color: var(--color-accent-hover); }

/* 404 page */
.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--sp-8);
}
.error-page h1 {
  font-size: clamp(3rem, 12vw, 6rem);
  color: var(--color-accent);
  margin-bottom: var(--sp-4);
}
.error-page p { margin-bottom: var(--sp-6); }
.error-wrap { max-width: 560px; }

/* ----------------------------------------
   20. Animations
   ---------------------------------------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Elements start invisible; JS IntersectionObserver adds .is-visible to trigger */
.animate-fade-in {
  opacity: 0;
  transform: translateY(18px);
}

.animate-fade-in.is-visible {
  animation: fadeUp 0.6s ease forwards;
}

/* Honour users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .animate-fade-in { opacity: 1; transform: none; }
  .animate-fade-in.is-visible { animation: none; }
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* ----------------------------------------
   22. Noir Atmosphere (Floating Particles)
   ---------------------------------------- */
.particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 50;
}

.particle {
  position: absolute;
  bottom: 0;
  width: 3px;
  height: 3px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  animation: float-particle 15s infinite linear;
}

@keyframes float-particle {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  5% {
    opacity: 0.8;
  }
  50% {
    opacity: 0.6;
  }
  95% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(-120vh) translateX(40px);
    opacity: 0;
  }
}

/* Stagger animation delays */
.particle:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 25s; }
.particle:nth-child(2) { left: 20%; animation-delay: 3s; animation-duration: 22s; }
.particle:nth-child(3) { left: 30%; animation-delay: 7s; animation-duration: 28s; }
.particle:nth-child(4) { left: 40%; animation-delay: 2s; animation-duration: 24s; }
.particle:nth-child(5) { left: 50%; animation-delay: 5s; animation-duration: 26s; }
.particle:nth-child(6) { left: 60%; animation-delay: 1s; animation-duration: 23s; }
.particle:nth-child(7) { left: 70%; animation-delay: 4s; animation-duration: 27s; }
.particle:nth-child(8) { left: 80%; animation-delay: 6s; animation-duration: 21s; }
.particle:nth-child(9) { left: 90%; animation-delay: 8s; animation-duration: 29s; }
.particle:nth-child(10) { left: 15%; animation-delay: 10s; animation-duration: 30s; }
.particle:nth-child(11) { left: 35%; animation-delay: 12s; animation-duration: 25s; }
.particle:nth-child(12) { left: 55%; animation-delay: 9s; animation-duration: 24s; }
.particle:nth-child(13) { left: 75%; animation-delay: 11s; animation-duration: 26s; }
.particle:nth-child(14) { left: 85%; animation-delay: 13s; animation-duration: 28s; }
.particle:nth-child(15) { left: 25%; animation-delay: 14s; animation-duration: 22s; }

/* ----------------------------------------
   23. Connie — Option A: Scene Break Divider
   ---------------------------------------- */
.connie-scene-break {
  display: flex;
  align-items: center;
  width: 100%;
  height: 136px;
  padding: 0 var(--sp-12);
  overflow: hidden;
}

.connie-scene-line {
  height: 1px;
  flex: 1;
}

.connie-scene-line--left {
  background: linear-gradient(to right, transparent 0%, var(--color-border-light) 100%);
}

.connie-scene-line--right {
  background: linear-gradient(to left, transparent 0%, var(--color-border-light) 100%);
}

.connie-scene-plane {
  height: 228px;
  width: auto;
  filter: grayscale(1) brightness(2);
  opacity: 0.45;
  margin: 0 var(--sp-6);
  flex-shrink: 0;
  pointer-events: none;
}

@media (min-width: 769px) {
  .connie-quote { margin-top: -10px; }
}

/* ----------------------------------------
   24. Connie — Option B: Pull Quote Section
   ---------------------------------------- */
.connie-quote {
  --quote-pos: center 34%;
  position: relative;
  overflow: hidden;
  min-height: clamp(260px, 30vw, 400px);
  display: flex;
  align-items: center;
  background-image: url('../assets/images/golden-gate-bridge-bw.jpg');
  background-size: cover;
  background-position: var(--quote-pos);
  background-repeat: no-repeat;
}

.connie-quote::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(5, 5, 5, 0.78) 0%,
    rgba(5, 5, 5, 0.64) 48%,
    rgba(5, 5, 5, 0.74) 100%
  );
  pointer-events: none;
}

.connie-quote > .container {
  position: relative;
  z-index: 1;
}

.connie-quote-wrap {
  position: relative;
  max-width: 760px;
}

.connie-quote-ghost {
  display: none;
}

.connie-quote-text {
  font-family: var(--font-heading);
  font-size: clamp(1.3rem, 2.2vw, 1.95rem);
  font-style: italic;
  color: var(--color-text-heading);
  line-height: 1.6;
  margin: var(--sp-6) 0 var(--sp-8);
  border-left: 3px solid var(--color-accent);
  padding-left: var(--sp-6);
  quotes: none;
}

/* ----------------------------------------
   25. Connie — Option C: Footer Watermark
   ---------------------------------------- */
.site-footer {
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 82%;
  height: 220px;
  background: url('../assets/images/connie-silhouette.svg') center / contain no-repeat;
  filter: grayscale(1) brightness(3);
  opacity: 0.055;
  pointer-events: none;
  z-index: 0;
}

/* Ensure footer content sits above the watermark */
.site-footer .container {
  position: relative;
  z-index: 1;
}

/* Desktop: move Connie into the lower copyright band (below the divider line) */
@media (min-width: 769px) {
  .site-footer::before { display: none; }

  .footer-bottom {
    position: relative;
    overflow: visible;
  }

  .footer-bottom::before {
    content: '';
    position: absolute;
    top: -56px;
    left: 50%;
    transform: translateX(-50%);
    width: 1050px;
    height: 180px;
    background: url('../assets/images/connie-silhouette.svg') center / contain no-repeat;
    filter: grayscale(1) brightness(3);
    opacity: 0.055;
    pointer-events: none;
  }
}

/* ----------------------------------------
   26. Connie — Option D: Books Page Strip
   ---------------------------------------- */
.books-connie-strip {
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-secondary);
  padding: var(--sp-8) 0;
  overflow: hidden;
}

.books-connie-strip-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--sp-6);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-8);
}

.books-connie-img {
  height: 76px;
  width: auto;
  filter: grayscale(1) brightness(2);
  opacity: 0.5;
  flex-shrink: 0;
}

.books-connie-label {
  border-left: 2px solid var(--color-accent);
  padding-left: var(--sp-6);
}

.books-connie-label .eyebrow {
  margin-bottom: var(--sp-2);
}

.books-connie-tagline {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-style: italic;
  color: var(--color-text-heading);
  margin: 0;
  line-height: 1.2;
}

/* ----------------------------------------
   27. Synopsis — Read More Toggle
   ---------------------------------------- */

/* Hidden on desktop — button not shown, full text always visible */
.synopsis-toggle {
  display: none;
}

/* Mobile only: truncate + toggle */
@media (max-width: 768px) {
  .synopsis-wrap {
    position: relative;
  }

  .synopsis-wrap .book-listing-synopsis {
    max-height: 5.6rem; /* ~3 lines at 1.75 line-height */
    overflow: hidden;
    transition: max-height 0.38s ease;
    margin-bottom: var(--sp-2);
  }

  /* Fade gradient over truncated text */
  .synopsis-wrap::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 2rem; /* sit just above the toggle button */
    height: 2.2rem;
    background: linear-gradient(to bottom, transparent, var(--color-bg));
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .synopsis-wrap.expanded .book-listing-synopsis {
    max-height: 800px;
  }

  .synopsis-wrap.expanded::after {
    opacity: 0;
  }

  .synopsis-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    background: none;
    border: none;
    padding: var(--sp-1) 0 var(--sp-4);
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-accent);
    cursor: pointer;
    transition: color var(--ease-fast);
  }

  .synopsis-toggle:hover {
    color: var(--color-accent-hover);
  }

  .toggle-icon {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    display: block;
  }

  .synopsis-wrap.expanded .toggle-icon {
    transform: rotate(180deg);
  }
}

/* Mobile adjustments for Connie elements */
@media (max-width: 768px) {
  .connie-scene-break { padding: 0 var(--sp-6); height: 72px; }
  .connie-scene-plane { height: 54px; margin: 0 var(--sp-3); transform: none; }
  .connie-quote { min-height: 0; --quote-pos: center 50%; }
  .connie-quote-ghost { display: none; }
  .connie-quote-text { font-size: var(--text-xl); padding-left: var(--sp-4); }
  .books-connie-strip-inner { flex-direction: column; align-items: center; text-align: center; gap: var(--sp-4); }
  .books-connie-label { border-left: none; padding-left: 0; border-top: 2px solid var(--color-accent); padding-top: var(--sp-4); text-align: center; }
  .books-connie-img { height: 48px; }
  .books-connie-tagline { font-size: var(--text-xl); text-align: center; }
  .site-footer::before { width: 120%; height: 140px; bottom: 20px; }
}

/* ---- Tablet (≤1024px) ---- */
@media (max-width: 1024px) {
  .covers-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .book-listing {
    grid-template-columns: 160px 1fr;
    gap: var(--sp-8);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }

  /* Fedora strip: center on tablet */
  .books-connie-strip-inner { flex-direction: column; align-items: center; text-align: center; gap: var(--sp-4); }
  .books-connie-label { border-left: none; padding-left: 0; border-top: 2px solid var(--color-accent); padding-top: var(--sp-4); text-align: center; }
  .books-connie-tagline { text-align: center; }

  /* Cover flip-back: smaller text so case notes fit in 3-column covers */
  .cover-flip-back {
    padding: var(--sp-2);
    gap: 0.22rem;
  }
  .case-note-label { font-size: 0.64rem; margin-bottom: 0.2rem; letter-spacing: 0.08em; }
  .case-note-line { font-size: 0.65rem; line-height: 1.22; }
  .case-note-line strong { color: #6f170b; font-weight: 700; }
  .case-note-hook { font-size: 0.65rem; line-height: 1.25; margin-top: 0.2rem; }
}

/* ---- Mobile (≤768px) ---- */
@media (max-width: 768px) {

  /* Typography scale down */
  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
  h3 { font-size: var(--text-xl);  }

  /* Global section padding */
  .section  { padding: var(--sp-16) 0; }
  .section--sm { padding: var(--sp-12) 0; }

  /* Hide header social links on mobile — footer ones remain */
  .social-links--header { display: none; }

  /* ---- Navigation ---- */
  .site-header {
    -webkit-transform: none;
    transform: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background-color: rgba(13, 13, 13, 0.98);
  }

  .site-header .container {
    position: relative;
    padding-left: var(--sp-4);
    padding-right: 44px;
  }
  .header-right {
    margin-left: auto;
    gap: 0;
  }
  .menu-toggle {
    display: flex;
    position: fixed;
    right: 12px;
    top: 14px;
    transform: none;
    margin: 0;
    padding: 8px;
    z-index: 9100; /* Above header/content on iOS scroll repaint */
    background: rgba(13, 13, 13, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
  }

  .menu-toggle-floating {
    display: flex;
    position: fixed;
    right: 12px;
    top: 14px;
    margin: 0;
    padding: 8px;
    z-index: 99999;
    background: rgba(13, 13, 13, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 8px;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .site-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background-color: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: var(--sp-6);
    display: none;
    z-index: 8999; /* Below header (9000) */
  }
  .site-nav.active { display: block; }
  .site-nav ul {
    flex-direction: column;
    gap: var(--sp-4);
  }
  .site-nav a { font-size: var(--text-base); }

  /* ---- Hero split → stacked; cover panel hidden on mobile ---- */
  .hero-split {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .hero-cover-panel {
    display: none; /* Carousel not needed on mobile; content panel fills full width */
  }
  .hero-content-panel {
    padding: var(--sp-10) var(--sp-6);
  }
  .hero-content-inner {
    max-width: none;
    padding-left: 0;
    padding-right: 0;
  }
  .hero-author-name { font-size: var(--text-3xl); }
  .hero-tagline { font-size: var(--text-base); }

  /* ---- Page hero ---- */
  .page-hero {
    padding: var(--sp-10) 0 var(--sp-8);
  }
  .page-hero h1 { font-size: var(--text-3xl); }

  /* ---- Section header with ruled line ----
     On mobile: drop the flex ruler, just stack eyebrow + heading */
  .section-header {
    flex-wrap: wrap;
    gap: var(--sp-3);
  }
  .section-header h2 {
    white-space: normal;
    font-size: var(--text-xl);
    flex: 1 1 100%;
  }
  .section-header::after {
    display: none;
  }
  /* Keep eyebrow above heading */
  .section-header .eyebrow {
    flex: 1 1 100%;
    margin-bottom: 0;
  }

  /* ---- Book listings → single column ---- */
  .book-listing {
    grid-template-columns: 1fr;
    gap: var(--sp-8);
    padding: var(--sp-10) 0;
  }
  .book-listing + .book-listing {
    margin-top: var(--sp-4);
  }
  .book-listing .btn {
    margin-bottom: var(--sp-4);
  }
  .book-listing-cover {
    position: static;
    max-width: 180px;        /* don't let cover go full width */
  }
  .book-listing-title { font-size: var(--text-2xl); }
  .book-listing-meta {
    flex-wrap: wrap;
    gap: var(--sp-3);
  }

  /* ---- Homepage covers grid → 2 cols ---- */
  .covers-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-4);
  }

  /* ---- Author feature, About, Contact → stacked ---- */
  .author-feature,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-8);
  }
  .about-series {
    grid-column: auto;
  }
  .author-feature-photo,
  .about-photo-wrap {
    text-align: center;
  }
  .author-feature-photo { position: relative; }
  .about-photo-wrap { position: static; }
  .author-feature-photo img,
  .about-photo-wrap img {
    margin: 0 auto;
    max-width: 220px;
  }
  .author-feature-photo::before { display: none; }

  /* ---- Newsletter form → stacked ---- */
  .newsletter-form { flex-direction: column; }

  /* ---- Footer → single column ---- */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-8);
  }
  .footer-brand { grid-column: auto; }
  .footer-bottom {
    flex-direction: column;
    gap: var(--sp-3);
    text-align: center;
  }
}

/* ---- Small phones (≤480px) ---- */
@media (max-width: 480px) {
  :root { --header-height: 60px; }

  h1 { font-size: var(--text-2xl); }

  .container { padding: 0 var(--sp-4); }

  /* Hero */
  .hero-cover-panel   { min-height: 65vw; }
  .hero-content-panel { padding: var(--sp-8) var(--sp-4); }
  .menu-toggle,
  .menu-toggle-floating { top: 8px; right: 8px; }
  .hero-content-inner { padding-left: 0; padding-right: 0; }
  .hero-author-name   { font-size: var(--text-2xl); }
  .hero-actions       { flex-direction: column; }
  .hero-actions .btn  { text-align: center; }

  /* Covers: 2 columns still, tighter */
  .covers-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-3);
  }
  .cover-item-title { font-size: var(--text-sm); }

  /* Book listing cover centred */
  .book-listing-cover { max-width: 150px; }

  /* Page hero */
  .page-hero { padding: var(--sp-8) 0 var(--sp-6); }
  .page-hero h1 { font-size: var(--text-2xl); }

  /* Blog */
  .blog-entry-meta { flex-wrap: wrap; gap: var(--sp-2); }

  /* Buttons full width on smallest screens */
  .btn { display: block; text-align: center; }
  .hero-actions .btn { display: inline-block; }
}
/* (fog + clippings features held — not built for v1 review) */

/* ----------------------------------------
   Admin Easter Egg
   ---------------------------------------- */
.admin-egg {
  display: inline;
  opacity: 0.07;
  color: var(--color-accent);
  font-size: 0.6rem;
  text-decoration: none;
  margin-left: 0.4rem;
  transition: opacity 0.4s ease;
  vertical-align: middle;
  cursor: default;
}
.admin-egg:hover {
  opacity: 0.3;
  cursor: pointer;
}
