/* E.M. Gayle — black + gold with white sections, matching emgaylebooks.com brand. */
:root {
  --bg-deep: #0b0a0d;
  --bg-panel: #141216;
  --bg-card: rgba(255, 255, 255, 0.045);
  --border: rgba(212, 169, 83, 0.28);
  --border-soft: rgba(255, 255, 255, 0.09);
  --gold: #d4a953;
  --gold-bright: #e8c268;
  --gold-deep: #a37e2c;
  --cream: #f0e1a8;
  --text: #edeaef;
  --text-muted: #a9a2b0;
  /* light sections (store palette) */
  --light-bg: #ffffff;
  --light-surface: #fbf8f2;
  --light-border: #e8ddc2;
  --light-text: #241b2e;
  --light-muted: #7a6680;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 300;
  background-color: var(--bg-deep);
  background-image:
    radial-gradient(ellipse 70% 45% at 25% -10%, rgba(212, 169, 83, 0.07), transparent),
    radial-gradient(ellipse 60% 40% at 85% 5%, rgba(255, 255, 255, 0.04), transparent);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.7;
  font-size: 1.02rem;
}

.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.4rem; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.25; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
h3 { font-size: 1.25rem; }
a { color: var(--gold-bright); text-decoration: none; }
a:hover { color: var(--cream); }
strong { font-weight: 700; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 10, 13, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-top: 0.85rem; padding-bottom: 0.85rem;
}
.brand-text {
  font-family: var(--font-display); font-weight: 700; font-size: 1.55rem;
  color: var(--gold-bright); letter-spacing: 0.08em; white-space: nowrap;
}
.brand-text:hover { color: var(--cream); }
.site-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.15rem; align-items: center; }
.site-nav a {
  color: var(--text); font-size: 0.92rem; font-weight: 500;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--gold-bright); }

/* Hero */
.hero { padding: 4.5rem 0 3.5rem; text-align: center; }
.hero.hero-image {
  position: relative;
  min-height: 82vh;
  display: flex; align-items: center; justify-content: center;
  padding: 3rem 0;
  background-image:
    linear-gradient(rgba(11, 10, 13, 0.38), rgba(11, 10, 13, 0.62)),
    url('images/hero-background.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
.hero.hero-image h1, .hero.hero-image .lede { text-shadow: 0 2px 14px rgba(0, 0, 0, 0.7); }
.hero.hero-image .lede { color: #d9d2e0; }
@media (max-width: 720px) {
  .hero.hero-image { background-attachment: scroll; min-height: 65vh; }
}
.hero .kicker {
  color: var(--gold); text-transform: uppercase; letter-spacing: 0.35em;
  font-size: 0.8rem; font-weight: 500; display: block; margin-bottom: 1rem;
}
.hero h1 { margin-bottom: 1rem; color: #fff; }
.hero h1 .gold { color: var(--gold-bright); }
.hero .lede { max-width: 44rem; margin: 0 auto 2rem; color: var(--text-muted); font-size: 1.1rem; }

/* Buttons */
.btn {
  display: inline-block; padding: 0.78rem 1.7rem; border-radius: 6px;
  background: linear-gradient(135deg, var(--gold), #c39a45);
  color: #17120a; font-weight: 700; font-size: 0.95rem; letter-spacing: 0.02em;
  border: none; cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 18px rgba(212, 169, 83, 0.22);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(212, 169, 83, 0.38); color: #17120a; }
.btn.ghost {
  background: transparent; color: var(--gold-bright);
  border: 1px solid var(--gold); box-shadow: none;
}
.btn.ghost:hover { background: rgba(212, 169, 83, 0.12); color: var(--cream); }
.btn.purple {
  background: #1c1720; color: var(--gold-bright);
  border: 1px solid var(--gold); box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
}
.btn.purple:hover { background: #262029; color: var(--cream); }
.btn + .btn { margin-left: 0.6rem; }

section { padding: 3rem 0; }
.section-title { text-align: center; margin-bottom: 0.5rem; color: #fff; }
.section-sub { text-align: center; color: var(--text-muted); margin-bottom: 2.2rem; max-width: 46rem; margin-left: auto; margin-right: auto; }

/* ---------- Light (white) sections ---------- */
section.light { background: var(--light-bg); color: var(--light-text); }
section.light .section-title, section.light h1, section.light h2, section.light h3 { color: var(--light-text); }
section.light .section-sub, section.light p { color: var(--light-text); }
section.light .section-sub { color: var(--light-muted); }
section.light a { color: var(--gold-deep); }
section.light a:hover { color: #241b2e; }
section.light .btn { color: #17120a; }
section.light .btn:hover { color: #17120a; }
section.light .btn.ghost { color: var(--gold-deep); border-color: var(--gold-deep); }
section.light .btn.ghost:hover { background: rgba(163, 126, 44, 0.1); color: #241b2e; }
section.light .btn.purple { background: #241b2e; color: var(--gold-bright); border-color: #241b2e; }
section.light .book-card { background: var(--light-surface); border: 1px solid var(--light-border); }
section.light .book-card h3, section.light .book-card h3 a { color: var(--light-text); }
section.light .book-card p { color: var(--light-muted); }
section.light .series-tag { color: var(--gold-deep); }
section.light .series-desc { color: var(--light-muted); }
section.light .cover-card .cover-title { color: var(--light-text); }
section.light .cover-card .cover-num { color: var(--gold-deep); }
section.light .reading-order li { background: var(--light-surface); border: 1px solid var(--light-border); }
section.light .reading-order li::before { background: #241b2e; color: var(--gold-bright); }
section.light .reading-order li span { color: var(--light-muted) !important; }
section.light .faq h3 { color: var(--gold-deep); }
section.light .faq p { color: var(--light-text); }
section.light .post-card { background: var(--light-surface); border: 1px solid var(--light-border); }
section.light .post-card p { color: var(--light-muted); }
section.light .post-card .date, section.light .date { color: var(--gold-deep) !important; }
section.light .post-body h2 { color: var(--gold-deep); }

/* Book card grids */
.book-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.6rem; }
.book-card {
  background: var(--bg-card); border: 1px solid var(--border-soft); border-radius: 12px;
  padding: 1.4rem; text-align: center; transition: border-color 0.2s ease, transform 0.2s ease;
}
.book-card:hover { border-color: var(--border); transform: translateY(-4px); }
.book-card img {
  width: 100%; max-width: 210px; height: auto; border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.book-card h3 { margin: 1rem 0 0.3rem; color: #fff; }
.book-card .series-tag { color: var(--gold); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; }
.book-card p { color: var(--text-muted); font-size: 0.92rem; margin: 0.5rem 0 1rem; }

/* Cover wall */
.series-block { margin-bottom: 3.2rem; }
.series-block h2 { color: inherit; margin-bottom: 0.35rem; }
.series-block .series-desc { color: var(--text-muted); max-width: 52rem; margin-bottom: 0.6rem; }
.series-block .series-links { margin-bottom: 1.4rem; font-size: 0.95rem; }
.series-block .series-links a { margin-right: 1.4rem; }
.cover-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1.1rem; }
.cover-card { display: block; text-align: center; }
.cover-card img {
  width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 6px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.cover-card:hover img { transform: translateY(-4px) scale(1.02); box-shadow: 0 12px 30px rgba(212, 169, 83, 0.35); }
.cover-card .cover-title { display: block; margin-top: 0.55rem; font-size: 0.88rem; color: var(--text); font-weight: 500; }
.cover-card .cover-num { display: block; font-size: 0.75rem; color: var(--gold); text-transform: uppercase; letter-spacing: 0.1em; }

/* Book detail page */
.book-hero { display: grid; grid-template-columns: minmax(230px, 320px) 1fr; gap: 2.6rem; align-items: start; padding-top: 2.5rem; }
.book-hero .cover img {
  width: 100%; height: auto; border-radius: 8px;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.65), 0 0 34px rgba(212, 169, 83, 0.14);
}
.series-label { color: var(--gold); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.14em; display: block; margin-bottom: 0.6rem; }
.book-hero h1 { color: #fff; margin-bottom: 0.6rem; }
.book-hero .hook { font-family: var(--font-display); font-style: italic; font-size: 1.25rem; color: var(--cream); margin-bottom: 1.2rem; }
.trope-list { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.2rem; }
.trope-list li {
  background: rgba(212, 169, 83, 0.08); border: 1px solid rgba(212, 169, 83, 0.4);
  color: var(--gold-bright); border-radius: 999px; padding: 0.28rem 0.85rem; font-size: 0.83rem;
}
.meta-row { color: var(--text-muted); font-size: 0.93rem; margin-bottom: 1.4rem; }
.meta-row strong { color: var(--text); }
.buy-box {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  padding: 1.3rem 1.5rem; margin-bottom: 1.8rem;
}
.buy-box h2 { font-size: 1.05rem; color: var(--gold); text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 0.9rem; }
.buy-box .btn { margin: 0.25rem 0.5rem 0.25rem 0; }
.blurb h2 { color: #fff; font-size: 1.35rem; margin-bottom: 0.8rem; }
.blurb p { margin-bottom: 0.9rem; }
.praise {
  border-left: 3px solid var(--gold); padding: 0.6rem 0 0.6rem 1.2rem; margin: 1.6rem 0;
  font-family: var(--font-display); font-style: italic; font-size: 1.08rem; color: var(--cream);
}
.praise cite { display: block; margin-top: 0.5rem; font-family: var(--font-body); font-style: normal; font-size: 0.85rem; color: var(--text-muted); }
.next-prev { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 2.5rem; }

/* Reading order */
.reading-order { max-width: 46rem; margin: 0 auto; counter-reset: bookstep; list-style: none; }
.reading-order li {
  position: relative; padding: 0.9rem 1rem 0.9rem 3.4rem; margin-bottom: 0.6rem;
  background: var(--bg-card); border: 1px solid var(--border-soft); border-radius: 10px;
}
.reading-order li::before {
  counter-increment: bookstep; content: counter(bookstep);
  position: absolute; left: 0.9rem; top: 50%; transform: translateY(-50%);
  width: 1.8rem; height: 1.8rem; border-radius: 50%;
  background: #1c1720; border: 1px solid var(--gold); color: var(--gold-bright);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem;
}

/* FAQ */
.faq { max-width: 50rem; margin: 0 auto; }
.faq h3 { color: var(--gold-bright); margin: 1.8rem 0 0.5rem; }
.faq p { color: var(--text); }

/* About */
.about-grid { max-width: 52rem; margin: 0 auto; }
.about-grid.with-photo { display: grid; grid-template-columns: 260px 1fr; gap: 2.4rem; align-items: start; max-width: 62rem; }
.author-photo img { width: 100%; height: auto; border-radius: 10px; box-shadow: 0 12px 34px rgba(0, 0, 0, 0.3); }
.about-grid p { margin-bottom: 1rem; }

/* Blog */
.post-list { max-width: 48rem; margin: 0 auto; }
.post-card {
  background: var(--bg-card); border: 1px solid var(--border-soft); border-radius: 12px;
  padding: 1.6rem 1.8rem; margin-bottom: 1.4rem;
}
.post-card h2 { font-size: 1.35rem; margin-bottom: 0.4rem; }
.post-card .date { color: var(--gold); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.1em; }
.post-card p { color: var(--text-muted); margin-top: 0.5rem; }
.post-body { max-width: 46rem; margin: 0 auto; }
.post-body h1 { color: inherit; margin-bottom: 0.4rem; }
.post-body h2 { color: var(--gold-bright); margin: 2rem 0 0.7rem; }
.post-body p { margin-bottom: 1rem; }
.post-body ul, .post-body ol { margin: 0 0 1rem 1.4rem; }
.post-body li { margin-bottom: 0.4rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); margin-top: 3rem; padding: 2.5rem 0 2rem; background: #0b0a0d; }
.site-footer .cols { display: flex; flex-wrap: wrap; gap: 3rem; margin-bottom: 1.6rem; }
.site-footer h4 { color: var(--gold); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 0.7rem; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 0.35rem; }
.site-footer a { color: var(--text-muted); font-size: 0.93rem; }
.site-footer a:hover { color: var(--gold-bright); }
.fineprint { color: var(--text-muted); font-size: 0.8rem; }

/* Mobile */
@media (max-width: 720px) {
  .site-header .wrap { flex-direction: column; gap: 0.4rem; padding-bottom: 0.8rem; }
  .brand-text { font-size: 1.35rem; }
  .site-nav { justify-content: center; }
  .book-hero { grid-template-columns: 1fr; }
  .book-hero .cover { max-width: 260px; margin: 0 auto; }
  .about-grid.with-photo { grid-template-columns: 1fr; }
  .author-photo { max-width: 240px; margin: 0 auto; }
  .btn + .btn { margin-left: 0; margin-top: 0.6rem; }
  .cover-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}
