/* Bradecote & Catchpoll — shared stylesheet
   Design tokens per Stage 2 spec (§9), derived from screenshots. */

:root {
  --bg-tan:      #d2c28d;
  --text-dark:   #1b1b2e;
  --text-body:   #2a2a2a;
  --accent-gold: #b8912a;
  --nav-text:    #ffffff;
  --font-body:   'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-script: 'Tangerine', 'Brush Script MT', cursive;
  --max-width:   1200px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-tan);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
}

a { color: var(--accent-gold); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ---------- Header / nav ---------- */

header.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 2rem 1rem;
}

.logo {
  font-family: var(--font-script);
  font-size: 2.4rem;
  color: #2a1c0f;
  font-style: italic;
}

.logo img { height: 40px; }

nav.main-nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

nav.main-nav > ul > li {
  position: relative;
}

nav.main-nav a,
nav.main-nav > ul > li > .nav-label {
  color: var(--nav-text);
  font-weight: 600;
  cursor: pointer;
  font-size: 1.05rem;
}

nav.main-nav > ul > li > .nav-label {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
}

nav.main-nav .has-dropdown > .nav-label::after {
  content: ' \25BE';
  font-size: 0.7em;
}

nav.main-nav .dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-tan);
  padding: 0.5rem 0;
  min-width: 180px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  z-index: 10;
}

nav.main-nav .has-dropdown:hover .dropdown,
nav.main-nav .has-dropdown.open .dropdown { display: block; }

nav.main-nav .dropdown a {
  display: block;
  padding: 0.4rem 1rem;
  color: var(--text-dark);
}

/* Home page only: header floats transparently over the hero image,
   which then runs right to the top of the page. */
body.page-home header.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  background: transparent;
}

body.page-home .hero {
  margin-top: 0;
}

/* ---------- Page title block ---------- */

.page-title {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 2rem 2rem;
}

.page-title h1 {
  font-size: 3rem;
  font-weight: 800;
  color: var(--text-dark);
  text-align: center;
  margin: 1rem 0 2rem;
}

/* ---------- Hero (home page) ---------- */

.hero {
  position: relative;
  background-size: cover;
  background-position: center;
  aspect-ratio: 2000 / 610;
  min-height: 320px;
  display: flex;
  align-items: center;
}

.hero-overlay {
  background: transparent;
  width: 100%;
  padding: 0 2rem;
}

.hero h1 {
  font-size: 4rem;
  color: #66452b;
  text-align: center;
  margin: 0;
}

.hero .tagline {
  text-align: center;
  color: #fff;
  font-size: 1.4rem;
  margin-top: 0.5rem;
}

.hero-figure {
  position: absolute;
  top: 10%;
  right: 5%;
  width: 180px;
  opacity: 0.85;
}

/* ---------- Content sections ---------- */

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem;
}

.content-block {
  background: var(--bg-tan);
  padding: 2rem;
  margin-bottom: 2rem;
}

.entry {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
  margin-bottom: 3.5rem;
  flex-wrap: wrap;
}

.entry.reverse { flex-direction: row-reverse; }

.entry-image { flex: 0 0 320px; }
.entry-image img { border-radius: 2px; }

.entry-text { flex: 1 1 400px; }

.entry-text h3 {
  font-size: 1.8rem;
  color: var(--text-dark);
  margin-top: 0;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  background: var(--accent-gold);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.8rem 1.8rem;
  border-radius: 2px;
  margin-top: 1rem;
}

.btn:hover { text-decoration: none; opacity: 0.9; }

/* ---------- Author photo layout ---------- */

.author-layout {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.author-photo { flex: 0 0 320px; }
.author-bio { flex: 1 1 400px; }

/* ---------- Background index groupings ---------- */

.background-group {
  display: flex;
  gap: 2.5rem;
  align-items: flex-start;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.background-group h2 {
  color: var(--text-dark);
}

.background-group ul {
  list-style: none;
  padding: 0;
}

.background-group li a {
  display: block;
  padding: 0.3rem 0;
}

.background-group-text { flex: 1 1 400px; }
.background-group-image { flex: 0 0 320px; }

/* ---------- News list ---------- */

.news-entry {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

.news-entry .date {
  font-weight: 700;
  display: block;
  margin-bottom: 0.5rem;
}

.news-entry h3 { margin-top: 0.2rem; }

.news-entry .entry-image { flex: 0 0 220px; }

/* ---------- Background article images (float, alternating sides) ---------- */

.clearfix::after {
  content: '';
  display: table;
  clear: both;
}

.bg-image-left,
.bg-image-right {
  width: 340px;
  max-width: 40%;
  margin-bottom: 1.5rem;
  border-radius: 2px;
}

.bg-image-left {
  float: left;
  margin-right: 2rem;
}

.bg-image-right {
  float: right;
  margin-left: 2rem;
}

/* ---------- Video embeds ---------- */

.video-block {
  margin-bottom: 2.5rem;
}

.video-block p {
  font-weight: 600;
  color: var(--text-dark);
  margin-top: 0.8rem;
}

.video-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Extract pages ---------- */

.extract-text .copyright {
  font-weight: 700;
  text-align: center;
  display: block;
  margin: 1.5rem 0;
}

.extract-text p {
  margin-bottom: 1.2rem;
}

/* ---------- Reviews page ---------- */

.review-quote {
  margin-bottom: 1rem;
}

.review-quote cite {
  font-style: normal;
  font-weight: 700;
}

/* ---------- Audiobooks page ---------- */

.audiobook-intro {
  margin-bottom: 3rem;
  overflow: hidden; /* clear the float */
}

.audiobook-intro .narrator-photo {
  float: left;
  width: 160px;
  margin: 0 1.5rem 1rem 0;
  border-radius: 2px;
}

.audiobook-links {
  margin-top: 1rem;
}

/* ---------- Footer ---------- */

footer.site-footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.9rem;
  color: var(--text-dark);
}

/* ---------- Responsive (basic, per Stage 2: not a priority this stage) ---------- */

@media (max-width: 800px) {
  header.site-header { flex-direction: column; gap: 1rem; }
  nav.main-nav ul { flex-wrap: wrap; justify-content: center; gap: 1rem; }
  .entry, .entry.reverse { flex-direction: column; }
  .hero h1 { font-size: 2.5rem; }
}
