/* ═══════════════════════════════════════════════════════════
   book.css — Shared stylesheet for all series pages
   thebobblog.com · Hermes Thane

   Edit this ONE file to change the look of every book page.
   ═══════════════════════════════════════════════════════════ */

:root {
  --paper: #f3efe8;
  --paper-deep: #ece5da;
  --ink: #141210;
  --ink-soft: #2c2621;
  --stone: #867d73;
  --stone-light: #d9d2c8;
  --line: #cfc6ba;
  --vermillion: #b83a2f;
  --gold: #ad7a2e;
  --night: #1d1a1a;
  --night-soft: #2a2523;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.09);
  --shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.06);
  --radius: 18px;
  --max: 1120px;
  --nav-h: 82px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  background:
    radial-gradient(circle at top right, rgba(184, 58, 47, 0.05), transparent 30%),
    linear-gradient(180deg, #f5f1eb 0%, #f3efe8 100%);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  line-height: 1.65;
  overflow-x: hidden;
}

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

.container {
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto;
}

.section { padding: 5rem 0; }

/* ─── TYPOGRAPHY ─── */
.eyebrow {
  display: inline-block;
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.18em;
  font-size: 0.92rem;
  color: var(--vermillion);
  margin-bottom: 1rem;
}

.section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.1rem, 4vw, 3.35rem);
  letter-spacing: 0.06em;
  line-height: 0.95;
  margin-bottom: 1rem;
}

.lede {
  max-width: 62ch;
  color: var(--ink-soft);
  font-size: 1rem;
}

/* ─── BUTTONS ─── */
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.7rem;
}

.button,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0.9rem 1.35rem;
  border-radius: 999px;
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}

.button {
  background: var(--vermillion);
  color: var(--white);
  box-shadow: var(--shadow-soft);
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.button-secondary {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
}

.button-secondary:hover {
  border-color: var(--vermillion);
  color: var(--vermillion);
  transform: translateY(-2px);
}

/* ─── DIVIDER ─── */
.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
  margin: 0.5rem auto;
  width: min(calc(100% - 2rem), 700px);
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.divider span {
  width: 10px;
  height: 10px;
  background: var(--vermillion);
  transform: rotate(45deg);
  display: inline-block;
}

/* ─── NAV ─── */
nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: var(--nav-h);
  border-bottom: 1px solid rgba(207, 198, 186, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(243, 239, 232, 0.9);
}

.nav-inner {
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  text-decoration: none;
  color: var(--ink);
  display: inline-flex;
  flex-direction: column;
  gap: 0.15rem;
}

.brand-main {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.4rem;
  letter-spacing: 0.12em;
  line-height: 1;
}

.brand-sub {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--stone);
}

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

.nav-links a {
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--stone);
  transition: color 0.2s ease;
}

.nav-links a:hover { color: var(--ink); }

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.55);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  background: var(--ink);
  transition: 0.25s ease;
}

/* ─── HERO ─── */
.hero {
  position: relative;
  padding: clamp(3rem, 5vw, 5rem) 0 4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(300px, 430px) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
}

.hero-cover-wrap { position: relative; }

.hero-cover {
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  background: linear-gradient(160deg, #271f1b 0%, #151212 100%);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.18);
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(255,255,255,0.08);
}

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

.cover-badge {
  position: absolute;
  left: 1.2rem;
  bottom: 1.2rem;
  padding: 0.6rem 0.85rem;
  border-radius: 999px;
  background: rgba(20, 18, 16, 0.82);
  color: var(--paper);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,0.12);
}

.hero-copy .book-number {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.25em;
  color: var(--stone);
  font-size: 0.92rem;
  margin-bottom: 1rem;
}

.hero-copy h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3.4rem, 10vw, 7rem);
  letter-spacing: 0.05em;
  line-height: 0.88;
  margin-bottom: 1rem;
  text-wrap: balance;
}

.tagline {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  font-style: italic;
  color: var(--stone);
  max-width: 24ch;
  margin-bottom: 1.3rem;
}

.hero-summary {
  max-width: 60ch;
  color: var(--ink-soft);
  font-size: 1rem;
}

/* ─── META STRIP ─── */
.meta-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.meta-card {
  padding: 1rem 1rem 0.95rem;
  background: rgba(255,255,255,0.58);
  border: 1px solid rgba(207,198,186,0.9);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}

.meta-card span {
  display: block;
  font-size: 0.72rem;
  color: var(--stone);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 0.4rem;
  font-weight: 700;
}

.meta-card strong {
  display: block;
  font-size: 0.98rem;
  line-height: 1.35;
  font-weight: 700;
  color: var(--ink);
}

/* ─── ABOUT / TWO-COL LAYOUTS ─── */
.about-grid,
.two-col {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: start;
}

.prose p + p { margin-top: 1rem; }

.panel {
  background: rgba(255,255,255,0.5);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 1.5rem;
  box-shadow: var(--shadow-soft);
}

.flavor-list {
  list-style: none;
  display: grid;
  gap: 1rem;
}

.flavor-list li {
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(207,198,186,0.8);
}

.flavor-list li:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.flavor-list strong {
  display: block;
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--vermillion);
  margin-bottom: 0.35rem;
}

/* ─── QUOTE BLOCK ─── */
.quote-block {
  background: linear-gradient(180deg, rgba(255,255,255,0.45), rgba(255,255,255,0.7));
  border-left: 4px solid var(--vermillion);
  border-radius: 0 18px 18px 0;
  padding: 1.6rem 1.5rem;
}

.quote-block p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.35rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.quote-block cite {
  display: block;
  margin-top: 0.8rem;
  font-style: normal;
  font-size: 0.8rem;
  color: var(--stone);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
}

/* ─── FORMAT CARDS ─── */
.format-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.format-card {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,0.68), rgba(255,255,255,0.5));
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1.5rem;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  min-height: 255px;
}

.format-card .icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: rgba(184,58,47,0.1);
  color: var(--vermillion);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
}

.format-card h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  line-height: 1;
}

.format-card p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  flex: 1;
}

.format-card .small-note {
  color: var(--stone);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-weight: 700;
}

/* ─── EXCERPT ─── */
.excerpt-wrap {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  align-items: stretch;
  margin-top: 2rem;
}

.excerpt-card {
  background: rgba(255,255,255,0.6);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 2rem;
  box-shadow: var(--shadow-soft);
}

.excerpt-card p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.26rem;
  line-height: 1.8;
  color: var(--ink-soft);
}

.excerpt-side { display: grid; gap: 1rem; }

.micro-card {
  background: rgba(255,255,255,0.55);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.3rem;
  box-shadow: var(--shadow-soft);
}

.micro-card h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.micro-card p {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* ─── CTA / NEWSLETTER BAND ─── */
.cta-band {
  background: linear-gradient(135deg, #1e1818 0%, #2b2323 55%, #3a2926 100%);
  color: var(--paper);
  border-radius: 32px;
  padding: 2rem;
  box-shadow: 0 25px 60px rgba(0,0,0,0.18);
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
  align-items: center;
}

.cta-band .eyebrow { color: #d9b77b; }

.cta-band .section-title,
.cta-band p,
.cta-band label { color: var(--paper); }

.signup-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 22px;
  padding: 1.2rem;
}

.signup-card form { display: grid; gap: 0.8rem; }

.signup-card input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.12);
  color: var(--white);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  font: inherit;
}

.signup-card input::placeholder { color: rgba(243,239,232,0.72); }

.signup-card .button {
  width: 100%;
  border: none;
  cursor: pointer;
}

/* ─── GALLERY ─── */
.gallery-shell {
  background: linear-gradient(180deg, rgba(255,255,255,0.62), rgba(255,255,255,0.48));
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 1.5rem;
  box-shadow: var(--shadow-soft);
  margin-top: 2rem;
}

.gallery-preview {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(10px);
  transition: max-height 0.35s ease, opacity 0.25s ease, transform 0.25s ease, margin-bottom 0.25s ease;
  margin-bottom: 0;
}

.gallery-shell.active .gallery-preview,
.gallery-shell.has-touch-open .gallery-preview {
  max-height: 560px;
  opacity: 1;
  transform: translateY(0);
  margin-bottom: 1rem;
}

.gallery-preview-frame {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: linear-gradient(145deg, #261e1d 0%, #131111 100%);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 24px 45px rgba(0,0,0,0.16);
}

.gallery-preview-frame img { width: 100%; height: 100%; object-fit: cover; }

.gallery-caption {
  position: absolute;
  left: 1rem; right: 1rem; bottom: 1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  padding: 0.9rem 1rem;
  border-radius: 18px;
  background: rgba(20,18,16,0.72);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--paper);
}

.gallery-caption strong {
  display: block;
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.gallery-caption span {
  display: block;
  font-size: 0.88rem;
  color: rgba(243,239,232,0.82);
  margin-top: 0.2rem;
}

.gallery-strip-wrap { display: grid; gap: 0.8rem; }

.gallery-help {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stone);
  font-weight: 700;
}

.gallery-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 140px;
  gap: 0.8rem;
  overflow-x: auto;
  padding-bottom: 0.4rem;
  scrollbar-width: thin;
  scrollbar-color: var(--stone-light) transparent;
}

.gallery-strip::-webkit-scrollbar { height: 10px; }
.gallery-strip::-webkit-scrollbar-thumb { background: var(--stone-light); border-radius: 999px; }

.gallery-thumb {
  position: relative;
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 18px;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  box-shadow: var(--shadow-soft);
  aspect-ratio: 4 / 3;
}

.gallery-thumb:hover,
.gallery-thumb:focus-visible,
.gallery-thumb.active {
  transform: translateY(-3px);
  border-color: var(--vermillion);
  box-shadow: var(--shadow);
  outline: none;
}

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

.gallery-thumb::after {
  content: attr(data-title);
  position: absolute;
  left: 0.6rem; right: 0.6rem; bottom: 0.55rem;
  padding: 0.38rem 0.55rem;
  border-radius: 999px;
  background: rgba(20,18,16,0.76);
  color: var(--paper);
  font-size: 0.64rem;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* ─── FOOTER ─── */
footer {
  border-top: 1px solid var(--line);
  margin-top: 5rem;
  padding: 2rem 0 3rem;
}

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

.footer-mark { display: grid; gap: 0.3rem; }

.footer-mark strong {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.12em;
  font-size: 1.2rem;
}

.footer-mark span,
.footer-links a,
.footer-copy {
  color: var(--stone);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}

.footer-links { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.footer-links a:hover { color: var(--vermillion); }

/* ─── RESPONSIVE ─── */
@media (max-width: 980px) {
  .hero-grid, .about-grid, .two-col, .cta-band, .excerpt-wrap {
    grid-template-columns: 1fr;
  }
  .format-grid { grid-template-columns: repeat(2, 1fr); }
  .meta-strip { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }

  .nav-links {
    position: fixed;
    top: calc(var(--nav-h) - 1px);
    left: 0; right: 0;
    background: rgba(243,239,232,0.98);
    border-bottom: 1px solid var(--line);
    padding: 1.25rem 1rem 1.5rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: 0.25s ease;
  }

  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }

  .nav-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  .hero { padding-top: 2rem; }
  .section { padding: 4rem 0; }
  .gallery-strip { grid-auto-columns: 120px; }
}

@media (max-width: 560px) {
  .container { width: min(calc(100% - 1rem), var(--max)); }
  .meta-strip, .format-grid { grid-template-columns: 1fr; }
  .hero-copy h1 { font-size: 3.15rem; }
  .gallery-help { display: grid; }
  .gallery-strip { grid-auto-columns: 105px; }

  .gallery-shell.active .gallery-preview,
  .gallery-shell.has-touch-open .gallery-preview { max-height: 330px; }
}
