/* Papa Bill Books — warm literary static site
   Colors: cream #FAF7F2, navy #18273A, antique gold #B8862D
   Headings: Fraunces (serif). Body: Source Sans 3 (sans). */

:root {
  --cream: #FAF7F2;
  --cream-deep: #F1EBE1;
  --paper: #FFFcf7;
  --navy: #18273A;
  --navy-soft: #24364d;
  --gold: #B8862D;
  --gold-deep: #8F6A1E;
  --gold-soft: #d4a84a;
  --ink: #1c1a16;
  --muted: #5c5346;
  --line: rgba(24, 39, 58, 0.12);
  --gold-line: rgba(184, 134, 45, 0.35);
  --shadow: 0 18px 40px -18px rgba(24, 39, 58, 0.35);
  --radius: 14px;
  --header-h: 72px;
  --serif: "Fraunces", Georgia, "Palatino Linotype", Palatino, "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

/* Subtle parchment grain */
body::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.85'/%3E%3C/svg%3E");
}

body > * { position: relative; z-index: 1; }

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

a { color: var(--gold-deep); text-underline-offset: 3px; }
a:hover { color: var(--navy); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.wrap {
  width: min(1120px, calc(100% - 2.4rem));
  margin-inline: auto;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  background: var(--navy);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 100;
  border-radius: 0 0 8px 8px;
}
.skip-link:focus { top: 0; color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gold-line);
  height: var(--header-h);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--navy);
}
.logo:hover { color: var(--navy); }

.logo-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--gold);
  background: var(--navy);
  color: var(--gold);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.logo-word {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: 0.01em;
}

.site-nav {
  display: flex;
  gap: 1.6rem;
}
.site-nav a {
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}
.site-nav a:hover { color: var(--gold-deep); }

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--gold-line);
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  padding: 10px 9px;
  flex-direction: column;
  justify-content: space-between;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--navy);
  border-radius: 1px;
}

/* ---------- Type ---------- */
h1, h2, h3, .footer-brand {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--navy);
  line-height: 1.2;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.7rem;
}
.eyebrow.center, .center { text-align: center; }

.section-intro {
  max-width: 42rem;
  margin: 0.6rem auto 2.2rem;
  text-align: center;
  color: var(--muted);
  font-size: 1.12rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  text-decoration: none;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  padding: 0.72rem 1.15rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
  cursor: pointer;
  text-align: center;
  line-height: 1.25;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-gold {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold);
}
.btn-gold:hover { background: var(--gold-deep); border-color: var(--gold-deep); color: #fff; }
.btn-outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--gold-line);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-deep); background: #fff; }
.btn-lg { padding: 0.9rem 1.4rem; font-size: 1.02rem; }
.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.85rem; white-space: nowrap; }

/* ---------- Hero ---------- */
.hero {
  padding: 5.2rem 0 4.8rem;
  background:
    radial-gradient(1200px 420px at 50% -10%, rgba(184,134,45,0.13), transparent 60%),
    linear-gradient(180deg, #f3eee6 0%, var(--cream) 100%);
  border-bottom: 1px solid var(--gold-line);
  text-align: center;
}
.hero-inner { max-width: 46rem; }
.hero h1 {
  font-size: clamp(2.35rem, 5.4vw, 3.7rem);
  font-weight: 600;
  margin: 0 0 1.1rem;
}
.hero-lead {
  font-size: 1.2rem;
  color: var(--muted);
  margin: 0 auto 2rem;
  max-width: 38rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
}


/* ---------- Share strip ---------- */
.share-strip {
  margin-top: 1.85rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--gold-line);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.share-prompt {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.08rem;
  color: var(--navy);
  line-height: 1.4;
}
.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: center;
}
.share-icon {
  width: 1.05em;
  height: 1.05em;
  flex-shrink: 0;
}
.btn-share-fb {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.btn-share-fb:hover { background: var(--navy-soft); border-color: var(--gold); color: #fff; }
.btn-copy-link {
  background: transparent;
  color: var(--navy);
  border-color: var(--gold);
}
.btn-copy-link:hover { background: #fff; color: var(--gold-deep); border-color: var(--gold-deep); }
.btn-copy-link.is-copied {
  background: var(--cream-deep);
  color: var(--navy);
  border-color: var(--gold);
  transform: none;
}

.site-footer .share-strip {
  margin: 0 0 1.5rem;
  padding: 0 0 1.35rem;
  border-top: 0;
  border-bottom: 1px solid rgba(184, 134, 45, 0.28);
  align-items: flex-start;
}
.site-footer .share-prompt { color: var(--gold-soft); }
.site-footer .btn-share-fb {
  background: transparent;
  color: #faf7f2;
  border-color: var(--gold-soft);
}
.site-footer .btn-share-fb:hover {
  background: rgba(184, 134, 45, 0.18);
  color: #fff;
  border-color: var(--gold-soft);
}
.site-footer .btn-copy-link {
  color: #faf7f2;
  border-color: rgba(250, 247, 242, 0.35);
}
.site-footer .btn-copy-link:hover {
  background: rgba(250, 247, 242, 0.08);
  color: var(--gold-soft);
  border-color: var(--gold-soft);
}
.site-footer .btn-copy-link.is-copied {
  background: rgba(184, 134, 45, 0.18);
  color: #fff;
  border-color: var(--gold-soft);
}

/* Ornamental divider under sections */
.what-they-are, .series, .goodnight, .about, .contact {
  padding: 4.5rem 0;
}
.what-they-are { background: var(--cream); }
.what-they-are h2, .series h2, .goodnight h2, .about h2, .contact h2 {
  font-size: clamp(1.85rem, 3.2vw, 2.5rem);
  margin: 0 0 0.4rem;
}

.card-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.3rem;
}
.info-card {
  background: var(--paper);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius);
  padding: 1.6rem 1.4rem 1.5rem;
  box-shadow: var(--shadow);
}
.info-card h3 {
  font-size: 1.25rem;
  margin: 0 0 0.6rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--gold-line);
}
.info-card p { margin: 0; color: var(--muted); }

/* ---------- Search ---------- */
.search-bar {
  max-width: 36rem;
  margin: 0 auto 2.8rem;
}
.search-bar input[type="search"] {
  width: 100%;
  font-family: var(--sans);
  font-size: 1.02rem;
  padding: 0.85rem 1.1rem;
  border: 1.5px solid var(--gold-line);
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  box-shadow: 0 8px 24px -16px rgba(24,39,58,0.4);
}
.search-bar input[type="search"]:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184,134,45,0.2);
}
.search-status {
  min-height: 1.3em;
  margin: 0.55rem 0 0;
  text-align: center;
  font-size: 0.92rem;
  color: var(--muted);
}

/* ---------- Series ---------- */
.series { background: linear-gradient(180deg, #f4efe7 0%, var(--cream) 18rem); }
.series-block { margin-top: 2.4rem; }
.series-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem 1.5rem;
  margin-bottom: 1.4rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--gold-line);
}
.series-heading h3 {
  font-size: clamp(1.4rem, 2.4vw, 1.75rem);
  margin: 0;
}
.series-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.set-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.6rem;
}
.set-card {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 1.15rem;
  background: var(--paper);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius);
  padding: 1.1rem;
  box-shadow: var(--shadow);
  align-items: start;
}
.set-card.is-hidden { display: none; }

.set-cover-wrap {
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 10px 22px -10px rgba(24,39,58,0.55);
  border: 1px solid rgba(184,134,45,0.45);
  background: var(--navy);
}
.set-cover-wrap img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.set-body h3 {
  margin: 0.15rem 0 0.4rem;
  font-size: 1.28rem;
}
.set-kicker {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}
.set-blurb {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.set-meta {
  margin: 0 0 0.9rem;
  font-size: 0.85rem;
  color: var(--navy-soft);
  font-weight: 600;
}
.set-body .btn-gold { width: 100%; margin-bottom: 0.65rem; }

.book-drawer {
  border-top: 1px dashed var(--gold-line);
  padding-top: 0.35rem;
}
.book-drawer summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--navy);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0;
}
.book-drawer summary::-webkit-details-marker { display: none; }
.book-drawer summary::before {
  content: "▸";
  color: var(--gold);
  font-size: 0.9rem;
}
.book-drawer[open] summary::before { content: "▾"; }
.drawer-count {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold-deep);
  background: rgba(184,134,45,0.12);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
}

.book-list {
  list-style: none;
  margin: 0.2rem 0 0;
  padding: 0;
}
.book-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.55rem 0;
  border-top: 1px solid var(--line);
}
.book-row.is-hidden { display: none; }
.book-info { display: flex; flex-direction: column; min-width: 0; }
.book-name { font-weight: 700; color: var(--navy); }
.book-sub { font-size: 0.88rem; color: var(--muted); font-style: italic; font-family: var(--serif); }
.book-pages { font-size: 0.78rem; color: var(--muted); }

/* ---------- God's Goodnight Stories ---------- */
.goodnight {
  background:
    linear-gradient(180deg, var(--cream) 0%, #f3eee6 100%);
  border-top: 1px solid var(--gold-line);
  border-bottom: 1px solid var(--gold-line);
}
.goodnight > .wrap > .eyebrow,
.goodnight > .wrap > h2 { text-align: center; }
.goodnight h2 .subtitle {
  display: block;
  font-style: italic;
  font-weight: 500;
  font-size: 0.62em;
  color: var(--gold-deep);
  margin-top: 0.25rem;
}
.ggs-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.2fr;
  gap: 2.4rem;
  align-items: center;
  margin-top: 2rem;
}
.ggs-covers {
  display: grid;
  grid-template-columns: 1.15fr 0.8fr;
  gap: 0.9rem;
  align-items: end;
}
.ggs-cover, .ggs-coloring {
  border-radius: 6px;
  box-shadow: 0 18px 36px -16px rgba(24,39,58,0.55);
  border: 1px solid rgba(184,134,45,0.4);
  background: #fff;
}
.ggs-lead {
  font-family: var(--serif);
  font-size: 1.35rem;
  color: var(--navy);
  margin: 0 0 1rem;
  line-height: 1.4;
}
.buy-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1.3rem 0 1rem;
}
.ggs-more { color: var(--muted); font-size: 0.98rem; }

.quotes { margin-top: 3.2rem; }
.quotes-title {
  text-align: center;
  font-size: 1.45rem;
  margin: 0 0 1.4rem;
}
.quote-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.1rem;
}
.quote-grid blockquote {
  margin: 0;
  background: var(--paper);
  border: 1px solid var(--gold-line);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.15rem 1.2rem 1rem;
}
.quote-grid p { margin: 0 0 0.8rem; color: var(--ink); }
.quote-grid footer {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gold-deep);
}

/* ---------- About / Contact ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2.4rem;
  align-items: start;
}
.about-photo {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--gold-line);
  box-shadow: var(--shadow);
  object-fit: cover;
  aspect-ratio: 1;
}
.contact {
  background: var(--navy);
  color: #f3eee6;
  text-align: center;
}
.contact h2, .contact .eyebrow { color: var(--gold-soft); }
.contact h2 { color: #faf7f2; }
.contact .section-intro { color: rgba(250,247,242,0.82); }
.contact-email { margin: 0; }
.contact-email a {
  color: #fff;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 3vw, 2rem);
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 0.15rem;
}
.contact-email a:hover { color: var(--gold-soft); }

.site-footer {
  background: #121c2b;
  color: rgba(250,247,242,0.72);
  padding: 2.4rem 0 2.6rem;
  font-size: 0.86rem;
  line-height: 1.55;
}
.footer-brand {
  font-size: 1.2rem;
  color: var(--gold-soft);
  margin: 0 0 0.9rem;
}
.copyright-block { margin: 0 0 0.75rem; max-width: 54rem; }
.site-footer a { color: var(--gold-soft); }
.footer-copy { margin: 1.1rem 0 0; color: rgba(250,247,242,0.55); }

/* Search: hide empty series blocks */
.series-block.is-hidden { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .card-row,
  .ggs-grid,
  .about-grid,
  .quote-grid { grid-template-columns: 1fr; }
  .set-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 320px; }
  .ggs-covers { max-width: 420px; }
}

@media (max-width: 720px) {
  :root { --header-h: 64px; }
  .nav-toggle { display: flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--gold-line);
    flex-direction: column;
    padding: 0.6rem 1.2rem 1.1rem;
    gap: 0;
    box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
  .hero { padding: 2.4rem 0 2.2rem; }
  .hero-lead { margin-bottom: 1.25rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .share-strip { margin-top: 1.2rem; padding-top: 1rem; }
  .share-prompt { font-size: 1rem; }
  .share-actions .btn { padding: 0.62rem 0.95rem; }
  .set-card { grid-template-columns: 110px 1fr; gap: 0.85rem; padding: 0.85rem; }
  .set-body h3 { font-size: 1.12rem; }
  .book-row { flex-wrap: wrap; }
  .what-they-are, .series, .goodnight, .about, .contact { padding: 3.2rem 0; }
  .buy-row .btn { flex: 1 1 calc(50% - 0.55rem); }
}

@media (max-width: 420px) {
  .set-card { grid-template-columns: 1fr; }
  .set-cover-wrap { max-width: 220px; margin: 0 auto; }
}
