/* ============================================================
   THE BOOKSTACKERS — Shared Stylesheet
   Cozy indie publisher aesthetic
   Josefin Sans + Poetsen One via Google Fonts
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:ital,wght@0,100;0,300;0,400;0,600;0,700;1,300;1,400&family=Poetsen+One&display=swap');

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* ── Design Tokens ── */
:root {
  --cream:         #F5EDE0;
  --warm-white:    #FDF8EF;
  --brown-dark:    #2C1A0E;
  --brown-medium:  #6B3A2A;
  --terracotta:    #A8522B;
  --green-bs:      #2E6644;   /* BookStackers logo green */
  --green-light:   #4A9063;
  --gold:          #C4923A;
  --border:        #D4C0A0;
  --muted:         #7A6A58;
  --shadow:        rgba(44, 26, 14, 0.12);

  --font-head:     'Josefin Sans', sans-serif;
  --font-display:  'Poetsen One', serif;
  --font-body:     Georgia, 'Times New Roman', serif;
}

/* ── Base ── */
body {
  background-color: var(--cream);
  color: var(--brown-dark);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.05rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--green-bs); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--terracotta); }
img { max-width: 100%; height: auto; display: block; }

/* ── Layout ── */
.container { max-width: 1140px; margin: 0 auto; padding: 0 1.5rem; }
.section    { padding: 5rem 0; }
.section-alt { background-color: var(--warm-white); }
.text-center { text-align: center; }
.text-muted  { color: var(--muted); }

/* ── Eyebrow label ── */
.eyebrow {
  display: block;
  font-family: var(--font-head);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.65rem;
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: 3px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary   { background: var(--green-bs);   color: #fff; border-color: var(--green-bs); }
.btn-primary:hover   { background: transparent; color: var(--green-bs); }
.btn-secondary { background: var(--terracotta); color: #fff; border-color: var(--terracotta); }
.btn-secondary:hover { background: transparent; color: var(--terracotta); }
.btn-outline   { background: transparent; color: var(--brown-dark); border-color: var(--brown-dark); }
.btn-outline:hover   { background: var(--brown-dark); color: var(--cream); }
.btn-white     { background: #fff; color: var(--brown-dark); border-color: #fff; }
.btn-white:hover     { background: transparent; color: #fff; }

/* ── ─────────────────────────────── ── */
/* ── HEADER / NAV                    ── */
/* ── ─────────────────────────────── ── */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: var(--warm-white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 14px var(--shadow);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.8rem 1.5rem;
  max-width: 1140px; margin: 0 auto;
}
.site-logo {
  display: flex; align-items: center; gap: 0.65rem;
  text-decoration: none; color: inherit;
}
.site-logo img { width: 40px; height: 40px; object-fit: contain; }
.logo-text {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brown-dark);
  line-height: 1.3;
}
.logo-text small {
  display: block;
  font-weight: 300;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  color: var(--muted);
}
.site-nav { display: flex; align-items: center; gap: 1.75rem; }
.site-nav > a {
  font-family: var(--font-head);
  font-size: 0.76rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--brown-dark);
}
.site-nav > a:hover { color: var(--green-bs); }

/* Dropdown */
.nav-drop { position: relative; }
.nav-drop > a { cursor: pointer; }
.drop-menu {
  display: none;
  position: absolute; top: calc(100% + 1rem); left: 50%;
  transform: translateX(-50%);
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 10px 28px var(--shadow);
  min-width: 230px;
  padding: 0.5rem 0;
  z-index: 300;
}
.nav-drop:hover .drop-menu { display: block; }
.drop-menu-label {
  font-family: var(--font-head);
  font-size: 0.62rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--muted);
  padding: 0.5rem 1.2rem 0.25rem;
}
.drop-menu a {
  display: block; padding: 0.6rem 1.2rem;
  border-left: 3px solid transparent;
  font-size: 0.82rem; color: var(--brown-dark);
  transition: all 0.15s;
}
.drop-menu a:hover {
  border-left-color: var(--green-bs);
  background: var(--cream);
  color: var(--green-bs);
}
.drop-menu a strong { display: block; font-family: var(--font-head); font-size: 0.8rem; }
.drop-menu a em { font-size: 0.72rem; font-style: normal; color: var(--muted); }

/* Nav social icons */
.nav-social { display: flex; align-items: center; gap: 0.75rem; }
.nav-social a { color: var(--muted); font-size: 0.95rem; transition: color 0.2s; }
.nav-social a:hover { color: var(--green-bs); }

/* ── ─────────────────────────────── ── */
/* ── HOMEPAGE HERO                   ── */
/* ── ─────────────────────────────── ── */
.hero-home {
  min-height: 88vh; display: flex; align-items: center;
  background: linear-gradient(135deg, #F5EDE0 0%, #EEE0C8 55%, #E5D2B4 100%);
  position: relative; overflow: hidden;
}
.hero-home .container { position: relative; z-index: 1; }
.hero-content { max-width: 620px; }
.hero-home h1 { margin-bottom: 1.25rem; }
.hero-home p { font-size: 1.05rem; color: var(--brown-medium); max-width: 500px; margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-deco {
  position: absolute; right: 4%; top: 50%; transform: translateY(-50%);
  width: 42%; max-width: 460px; pointer-events: none; opacity: 0.07;
  font-size: 18rem; line-height: 1; text-align: center;
}

/* ── AUTHOR HERO (pen name pages) ── */
.author-hero {
  padding: 5rem 0 4rem;
  position: relative; overflow: hidden;
}
.author-hero-inner {
  display: grid; grid-template-columns: 1fr 280px;
  gap: 3.5rem; align-items: center;
}
.author-badge {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: #fff; padding: 0.3rem 0.85rem;
  border-radius: 2px; margin-bottom: 1rem;
}
.author-hero h1 { margin-bottom: 1rem; }
.author-hero p  { font-size: 1.05rem; color: var(--brown-medium); margin-bottom: 1.75rem; }
.author-avatar {
  aspect-ratio: 1; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 5rem;
  box-shadow: 0 10px 36px rgba(0,0,0,0.15);
}

/* ── ─────────────────────────────── ── */
/* ── AUTHOR CARDS (homepage grid)    ── */
/* ── ─────────────────────────────── ── */
.authors-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}
.author-card {
  display: block; text-decoration: none; color: inherit;
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: 4px; overflow: hidden;
  transition: transform 0.22s, box-shadow 0.22s;
}
.author-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 36px var(--shadow);
  color: inherit;
}
.card-accent  { height: 6px; }
.card-body    { padding: 1.75rem; }
.card-tag {
  font-family: var(--font-head);
  font-size: 0.62rem; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 0.4rem;
}
.author-card h3   { font-size: 1.35rem; margin-bottom: 0.5rem; color: var(--brown-dark); }
.author-card p    { font-size: 0.88rem; color: var(--muted); line-height: 1.65; }
.card-read-more {
  display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 1.1rem;
  font-family: var(--font-head); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--green-bs);
}
.author-card:hover .card-read-more { color: var(--terracotta); }

/* ── ─────────────────────────────── ── */
/* ── BOOK COVERS (CSS-only placeholders) ── */
/* ── ─────────────────────────────── ── */
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 1.75rem;
}
.book-wrap { position: relative; }
.book-cover {
  position: relative; aspect-ratio: 2/3;
  border-radius: 3px 6px 6px 3px; overflow: hidden;
  box-shadow: 5px 5px 18px rgba(0,0,0,0.18), inset -3px 0 8px rgba(0,0,0,0.12);
  transition: transform 0.22s, box-shadow 0.22s;
  cursor: default;
}
.book-cover:hover {
  transform: translateY(-5px) rotate(-0.8deg);
  box-shadow: 10px 14px 28px rgba(0,0,0,0.22);
}
/* Spine illusion */
.book-cover::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 12px;
  background: rgba(0,0,0,0.18);
  border-radius: 3px 0 0 3px;
}
.book-cover-inner {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 1rem 1rem 1rem 1.2rem; color: #fff;
}
.bc-series {
  font-family: var(--font-head);
  font-size: 0.55rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  opacity: 0.75;
}
.bc-middle { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 0.5rem 0; }
.bc-title {
  font-family: var(--font-display);
  font-size: 1rem; line-height: 1.25;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.bc-subtitle {
  font-family: var(--font-head);
  font-size: 0.62rem; opacity: 0.8;
  margin-top: 0.35rem; font-weight: 300;
}
.bc-author {
  font-family: var(--font-head);
  font-size: 0.6rem; letter-spacing: 0.1em;
  opacity: 0.82;
}
.book-badge {
  position: absolute; top: 0.6rem; right: 0.6rem;
  background: var(--gold); color: #fff;
  font-family: var(--font-head); font-size: 0.52rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.18rem 0.45rem; border-radius: 2px;
}
.book-coming-soon {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: rgba(255,255,255,0.7);
}

/* ── ─────────────────────────────── ── */
/* ── ABOUT BLOCK                     ── */
/* ── ─────────────────────────────── ── */
.about-split { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.stat-grid   { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.stat-card   {
  background: var(--warm-white); border: 1px solid var(--border);
  border-radius: 4px; padding: 1.5rem; text-align: center;
}
.stat-number { font-family: var(--font-display); font-size: 2.4rem; color: var(--green-bs); display: block; line-height: 1; margin-bottom: 0.35rem; }
.stat-label  { font-family: var(--font-head); font-size: 0.65rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.stat-card-wide { grid-column: span 2; font-family: var(--font-head); font-size: 0.9rem; color: var(--muted); line-height: 1.55; font-style: italic; padding: 1.25rem 1.5rem; }

/* ── ─────────────────────────────── ── */
/* ── AUTHOR BIO                      ── */
/* ── ─────────────────────────────── ── */
.bio-block {
  display: grid; grid-template-columns: 120px 1fr; gap: 2.5rem; align-items: start;
  padding: 2.5rem; background: var(--warm-white);
  border: 1px solid var(--border); border-radius: 6px;
}
.bio-portrait {
  width: 120px; height: 120px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 3.5rem; flex-shrink: 0;
}
.bio-block h3 { margin-bottom: 0.25rem; }
.bio-role {
  font-family: var(--font-head); font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 0.75rem; display: block;
}
.bio-block p { font-size: 0.95rem; color: var(--brown-medium); line-height: 1.72; }

/* ── ─────────────────────────────── ── */
/* ── NEWSLETTER                      ── */
/* ── ─────────────────────────────── ── */
.newsletter {
  padding: 4.5rem 0; text-align: center;
}
.newsletter h2     { margin-bottom: 0.75rem; }
.newsletter p      { color: var(--muted); max-width: 460px; margin: 0 auto 2rem; }
.nl-form {
  display: flex; max-width: 480px; margin: 0 auto;
  border: 1px solid var(--border); border-radius: 3px; overflow: hidden;
  background: var(--warm-white);
}
.nl-form input {
  flex: 1; padding: 0.85rem 1rem;
  background: transparent; border: none; outline: none;
  font-family: var(--font-body); font-size: 0.9rem;
  color: var(--brown-dark);
}
.nl-form input::placeholder { color: var(--muted); }
.nl-form button {
  padding: 0.85rem 1.4rem; border: none; cursor: pointer;
  font-family: var(--font-head); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: #fff; transition: background 0.2s; white-space: nowrap;
}
.nl-note {
  font-family: var(--font-head); font-size: 0.7rem;
  color: var(--muted); margin-top: 0.65rem;
}

/* Dark newsletter variant */
.newsletter-dark {
  background: var(--brown-dark); color: var(--cream);
}
.newsletter-dark h2 { color: var(--cream); }
.newsletter-dark p  { color: rgba(245,237,224,0.65); }
.newsletter-dark .nl-form { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.18); }
.newsletter-dark .nl-form input { color: var(--cream); }
.newsletter-dark .nl-form input::placeholder { color: rgba(245,237,224,0.4); }
.newsletter-dark .nl-note { color: rgba(245,237,224,0.35); }

/* ── ─────────────────────────────── ── */
/* ── SECTION HEADER                  ── */
/* ── ─────────────────────────────── ── */
.section-header { margin-bottom: 2.5rem; }
.section-header.has-action {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem;
}
.section-header h2 { margin-bottom: 0.25rem; }
.section-header p  { color: var(--muted); margin: 0; font-family: var(--font-head); font-size: 0.82rem; }

/* Ruled divider */
.ruled { display: flex; align-items: center; gap: 1rem; margin: 3.5rem 0; }
.ruled::before, .ruled::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.ruled-icon { color: var(--border); font-size: 1rem; }

/* ── ─────────────────────────────── ── */
/* ── FOOTER                          ── */
/* ── ─────────────────────────────── ── */
.site-footer { background: var(--brown-dark); color: rgba(245,237,224,0.65); padding: 4.5rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; margin-bottom: 3.5rem; }
.footer-brand img  { width: 46px; opacity: 0.88; margin-bottom: 1rem; }
.footer-brand-name { font-family: var(--font-head); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--cream); margin-bottom: 0.75rem; }
.footer-brand p    { font-size: 0.85rem; line-height: 1.65; color: rgba(245,237,224,0.5); }
.footer-social     { display: flex; gap: 0.85rem; margin-top: 1.25rem; }
.footer-social a   { color: rgba(245,237,224,0.45); font-size: 1.05rem; transition: color 0.2s; }
.footer-social a:hover { color: var(--cream); }
.footer-col h4 {
  font-family: var(--font-head); font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--cream); margin-bottom: 1rem;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col ul li a { font-size: 0.85rem; color: rgba(245,237,224,0.5); transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--cream); }
.footer-bottom {
  border-top: 1px solid rgba(245,237,224,0.1);
  padding-top: 1.75rem;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-head); font-size: 0.76rem; letter-spacing: 0.06em;
  color: rgba(245,237,224,0.28);
}

/* ── ─────────────────────────────── ── */
/* ── SERIES DETAIL (audiobook)       ── */
/* ── ─────────────────────────────── ── */
.series-card {
  background: var(--warm-white); border: 1px solid var(--border);
  border-radius: 6px; overflow: hidden;
  display: grid; grid-template-columns: 180px 1fr;
}
.series-cover {
  aspect-ratio: auto; min-height: 220px;
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem;
}
.series-info { padding: 2rem; }
.series-info h3 { margin-bottom: 0.25rem; }
.series-info .series-sub {
  font-family: var(--font-head); font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 0.85rem;
}
.series-info p { font-size: 0.9rem; color: var(--muted); }
.chapters {
  margin-top: 1rem; padding-top: 1rem;
  border-top: 1px solid var(--border);
  list-style: none;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.35rem;
}
.chapters li {
  font-family: var(--font-head); font-size: 0.75rem; color: var(--muted);
  display: flex; align-items: center; gap: 0.4rem;
}
.chapters li::before { content: '♪'; color: var(--green-bs); }

/* ── ─────────────────────────────── ── */
/* ── RESPONSIVE                      ── */
/* ── ─────────────────────────────── ── */
@media (max-width: 900px) {
  .about-split, .author-hero-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .author-avatar { width: 180px; height: 180px; margin: 0 auto; }
  .series-card { grid-template-columns: 1fr; }
  .series-cover { min-height: 160px; }
  .bio-block { grid-template-columns: 1fr; gap: 1.5rem; }
  .bio-portrait { margin: 0 auto; }
}
@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero-home { min-height: 75vh; }
  .authors-grid { grid-template-columns: 1fr; }
  .nl-form { flex-direction: column; }
  .nl-form button { border-radius: 0; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .books-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .stat-card-wide { grid-column: span 2; }
  .drop-menu { left: 0; transform: none; }
  .header-inner { flex-wrap: wrap; gap: 0.5rem; }
}
