/* ===================================================================
   theWAY MEDIA — wayism.net
   Ink & Parchment — publishing-house navy, muted gold, aged paper
   =================================================================== */

:root {
  --ink:        #1B2838;   /* deep navy-ink — header & dark elements   */
  --ink-deep:   #101923;   /* darker ink for gradients                */
  --gold:       #A9812E;   /* muted gold — primary accent              */
  --gold-bright:#C9A227;   /* brighter gold — hover / tertiary accent  */
  --gold-foil:  #E4C767;   /* pale gold highlight — foil/shine edges  */
  --slate:      #46586B;   /* muted steel-blue — secondary accent      */
  --parchment:  #F7F1E1;   /* warm page background                    */
  --cream:      #FFFDF8;   /* content card background                 */
  --text-dark:  #22201B;   /* main body text                          */
  --text-mid:   #5C5646;   /* secondary / muted text                  */
  --border:     #D9CBA3;   /* warm parchment border                   */
  --link:       #7A5C1E;   /* olive-gold links                        */
  --link-hover: #A9812E;   /* gold on hover                           */
  --h2-rule:    #1B2838;   /* ink h2 underline                        */
}

/* ---- Reset ---- */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* ---- Body: aged-paper texture, built from layered gradients only ---- */
body {
  font-family: Georgia, 'Iowan Old Style', 'Palatino Linotype', 'Noto Serif', serif;
  line-height: 1.7;
  color: var(--text-dark);
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px 20px;
  background-color: var(--parchment);
  background-image:
    radial-gradient(circle at 15% 20%, rgba(169, 129, 46, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 85% 10%, rgba(27, 40, 56, 0.05) 0%, transparent 45%),
    radial-gradient(circle at 60% 90%, rgba(169, 129, 46, 0.045) 0%, transparent 50%),
    repeating-linear-gradient(90deg, rgba(34, 32, 27, 0.012) 0px, transparent 1px, transparent 3px);
  background-attachment: fixed;
}

/* ---- Header / Masthead & Navigation ---- */
body > header {
  background: linear-gradient(180deg, var(--ink) 0%, var(--ink-deep) 100%);
  color: white;
  padding: 1.75rem 20px 0;
  margin: 0 -20px 2rem -20px;
  text-align: center;
  border-bottom: 3px solid var(--gold);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
}

.masthead { padding-bottom: 1.1rem; }

.wordmark {
  display: inline-block;
  font-family: Georgia, 'Iowan Old Style', serif;
  font-size: 1.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #F1E6C8;
  text-decoration: none;
}

.wordmark:hover { text-decoration: none; color: #F1E6C8; }

.wm-accent { color: var(--gold-foil); }

.masthead-tagline {
  margin: 0.3rem 0 0;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(232, 220, 192, 0.65);
}

nav {
  margin: 0;
  padding: 0.6rem 0 0.9rem;
  border-top: 1px solid rgba(232, 220, 192, 0.15);
}

nav a {
  display: inline-block;
  margin: 0 0.3rem;
  color: #E8DCC0;
  text-decoration: none;
  padding: 0.4rem 0.9rem;
  border-radius: 4px;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 0.25s, color 0.2s;
}

nav a:hover {
  background: rgba(232, 220, 192, 0.16);
  color: var(--gold-foil);
  text-decoration: none;
}

/* ---- Main Content ---- */
main {
  position: relative;
  background: var(--cream);
  padding: 2.5rem clamp(1.25rem, 4vw, 3rem);
  border-radius: 3px 3px 10px 10px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 14px 34px rgba(27, 40, 56, 0.14),
    0 2px 8px rgba(27, 40, 56, 0.08);
  border: 1px solid var(--border);
  overflow: hidden;
}

main::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--ink) 0%, var(--gold-foil) 50%, var(--ink) 100%);
}

/* ---- Typography ---- */
h1 {
  color: var(--ink);
  font-size: 2.2rem;
  margin-bottom: 1rem;
  text-align: center;
  letter-spacing: 0.01em;
}

h2 {
  color: var(--ink);
  font-size: 1.6rem;
  margin: 2rem 0 1rem;
  border-bottom: 2px solid var(--h2-rule);
  padding-bottom: 0.4rem;
}

h3 {
  color: var(--gold);
  font-size: 1.25rem;
  margin: 1.5rem 0 0.7rem;
}

h4 {
  color: var(--ink);
  font-size: 1.05rem;
  margin: 1.2rem 0 0.5rem;
}

p {
  margin-bottom: 1.2rem;
  color: var(--text-dark);
}

/* ---- Links ---- */
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }

ol, ul { margin: 1rem 0; padding-left: 2rem; }
li { margin-bottom: 0.5rem; }

/* ---- Footer ---- */
footer {
  margin-top: 3rem;
  padding: 1.75rem 0 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-mid);
  background: #EFE6CC;
  margin-left: -20px;
  margin-right: -20px;
  font-size: 0.85rem;
}

footer::before {
  content: "❖";
  display: block;
  color: var(--gold);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

footer p { margin-bottom: 0.4rem; }
footer a { color: var(--link); }
footer a:hover { color: var(--link-hover); }

/* ---- Buttons ---- */
.cta-button, .btn-retailer {
  display: inline-block;
  padding: 12px 26px;
  background: linear-gradient(180deg, var(--gold-foil) 0%, var(--gold) 55%, #8E6B24 100%);
  color: #201705;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 6px rgba(27, 40, 56, 0.2), 0 0 0 1px rgba(169, 129, 46, 0.35) inset;
  transition: transform 0.2s, box-shadow 0.2s;
  margin: 0.4rem 0.5rem 0.4rem 0;
}

.cta-button:hover, .btn-retailer:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(27, 40, 56, 0.3), 0 0 0 1px rgba(169, 129, 46, 0.45) inset;
  text-decoration: none;
  color: #201705;
}

.cta-button-outline {
  background: transparent;
  color: var(--ink);
  box-shadow: 0 0 0 2px var(--ink) inset;
}

.cta-button-outline:hover {
  background: var(--ink);
  color: #F1E6C8;
  box-shadow: 0 8px 16px rgba(27, 40, 56, 0.25);
}

.btn-retailer::before { content: "🛒"; margin-right: 0.45em; font-size: 0.85em; }

/* ---- Hero (homepage) ---- */
.hero {
  text-align: center;
  padding: 1.5rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

.hero-title {
  font-size: 2.6rem;
  line-height: 1.15;
  margin-bottom: 1.1rem;
}

.hero-lead {
  max-width: 640px;
  margin: 0 auto 1.75rem;
  color: var(--text-mid);
  font-size: 1.08rem;
}

.hero-lead p { margin-bottom: 0; }

.hero-actions .cta-button, .hero-actions .cta-button-outline {
  margin: 0.4rem 0.6rem;
}

.section-label {
  text-align: center;
  border-bottom: none;
  font-size: 0.85rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-mid);
  margin: 0 0 2rem;
}

.section-label span {
  position: relative;
  padding: 0 1.2rem;
}

.section-label span::before, .section-label span::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 2.5rem;
  height: 1px;
  background: var(--border);
}

.section-label span::before { right: 100%; }
.section-label span::after { left: 100%; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  body { padding: 0 10px 10px; }
  body > header { margin: 0 -10px 1rem -10px; padding: 1.5rem 10px 0; }
  main { padding: 1.25rem; }
  .hero-title { font-size: 2rem; }
  .cta-button, .btn-retailer, .cta-button-outline { display: block; text-align: center; margin: 0.5rem 0; }
}

/* ---- Book Navigation (chapters) ---- */
.book-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  margin: 2rem 0;
  background: linear-gradient(135deg, #F1E9D4 0%, #E4D6AE 100%);
  border-radius: 12px;
  border: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 1rem;
}

.book-navigation a {
  text-decoration: none;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  flex: 1;
  text-align: center;
  min-width: 120px;
}

.nav-prev, .nav-next {
  background: linear-gradient(45deg, #DCE4EA 0%, #F1E9D4 100%);
  color: var(--text-dark);
}

.nav-main {
  background: linear-gradient(180deg, var(--gold-foil) 0%, var(--gold) 55%, #8E6B24 100%);
  color: #201705;
  font-size: 1.1em;
  flex: 2;
}

.nav-prev:hover, .nav-next:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  color: var(--text-dark);
}

.nav-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(169, 129, 46, 0.4);
  color: #201705;
}

@media (max-width: 768px) {
  .book-navigation { flex-direction: column; text-align: center; }
  .book-navigation a { flex: none; width: 100%; margin: 0.25rem 0; }
}

.book-chapter { max-width: 720px; margin: 0 auto; padding: 2rem 0; }

.chapter-part-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-mid);
  margin-bottom: 0.5rem;
}

/* ---- Books Grid / Card ---- */
.books-grid, .books-page .books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.75rem;
  margin: 2rem 0;
}

.book-card {
  border: 1px solid var(--border);
  border-radius: 4px 4px 10px 10px;
  padding: 1.25rem;
  background: linear-gradient(180deg, #FFFDF8 0%, #FAF3E2 100%);
  text-align: center;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 3px 8px rgba(27, 40, 56, 0.08);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  position: relative;
  overflow: hidden;
}

.book-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-foil));
}

.book-card:hover {
  box-shadow: 0 10px 24px rgba(27, 40, 56, 0.2);
  transform: translateY(-3px);
}

.book-card-cover, .book-detail-cover {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 3px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28), 3px 3px 0 rgba(27, 40, 56, 0.12);
}

.book-card-cover { max-height: 260px; margin-bottom: 0.9rem; }

.book-card h3 { margin: 0.5rem 0 0.25rem; font-size: 1.05rem; }
.book-card-author { color: var(--text-mid); font-size: 0.88rem; font-style: italic; margin-bottom: 0; }
.book-card-vocalist { color: var(--text-mid); font-size: 0.82rem; font-weight: 400; font-style: italic; }

/* ---- Book Detail Page ---- */
.book-detail-header {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.book-detail-cover-wrap { flex: 0 0 220px; max-width: 220px; }

.book-detail-meta { flex: 1; min-width: 260px; }

.book-detail-subtitle {
  font-size: 1rem;
  font-style: italic;
  color: var(--text-mid);
  margin-bottom: 0.5rem;
}

.book-detail-author {
  font-size: 1.1rem;
  color: var(--slate);
  margin-bottom: 0.75rem;
}

.book-detail-terms {
  margin: 0.75rem 0;
}

.category-tag, .tag {
  display: inline-block;
  background: #F1E9D4;
  border: 1px solid var(--gold);
  color: var(--text-mid);
  border-radius: 3px;
  padding: 0.1rem 0.5rem;
  font-size: 0.8rem;
  text-decoration: none;
  margin: 0.1rem 0.15rem;
}

.category-tag:hover, .tag:hover { background: var(--gold); color: #fff; }

.isbn-table {
  margin: 1rem 0;
  padding: 0.85rem 1rem;
  background: rgba(169, 129, 46, 0.06);
  border-left: 3px solid var(--gold);
  border-radius: 0 4px 4px 0;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.85rem;
  color: var(--text-mid);
}

.isbn-table div { margin-bottom: 0.25rem; }
.isbn-table strong { font-family: Georgia, serif; color: var(--text-dark); }

.retailer-buttons { margin-top: 1rem; }

.book-chapters-list {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.book-chapters-list ol { padding-left: 1.5rem; }

/* ---- Back navigation (song / detail pages) ---- */
.back-nav {
  margin: 0 0 1.5rem;
  font-size: 0.9rem;
}

.back-nav a {
  color: var(--link);
  text-decoration: none;
}

.back-nav a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

/* ---- Authors Grid / Card ---- */
.authors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.75rem;
  margin: 2rem 0;
}

.author-card {
  border: 1px solid var(--border);
  border-radius: 4px 4px 10px 10px;
  padding: 1.5rem;
  background: linear-gradient(180deg, #FFFDF8 0%, #FAF3E2 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 3px 8px rgba(27, 40, 56, 0.08);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  position: relative;
  overflow: hidden;
}

.author-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--slate), var(--ink));
}

.author-card:hover {
  box-shadow: 0 10px 24px rgba(27, 40, 56, 0.2);
  transform: translateY(-3px);
}

.author-card-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.75rem; }
.author-card-photo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid var(--cream); box-shadow: 0 0 0 1px var(--border); }
.author-card-bio { color: var(--text-mid); font-size: 0.9rem; }
.author-card-link { font-weight: 600; font-size: 0.9rem; }

.author-profile { max-width: 760px; margin: 0 auto; }
.author-profile-header { display: flex; gap: 1.5rem; align-items: flex-start; flex-wrap: wrap; margin-bottom: 1.5rem; }
.author-profile-photo {
  width: 140px; height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--cream);
  box-shadow: 0 0 0 1px var(--border), 0 0 0 5px var(--parchment), 0 0 0 6px var(--border), 0 6px 16px rgba(27, 40, 56, 0.18);
}
.author-profile-bio { color: var(--text-mid); font-style: italic; }
.author-section { margin: 1.5rem 0; }
.author-books-list { list-style: none; padding: 0; margin-top: 2rem; }
.author-books-list li { margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }

@media (max-width: 768px) {
  .book-detail-header { flex-direction: column; }
  .book-detail-cover-wrap { flex-basis: auto; max-width: 220px; }
  .book-card { padding: 1rem; }
}
