/* ============================
   Erin Davis — erindavis.org
   ============================ */

:root {
  --ink: #2c2622;
  --ink-soft: #5a5148;
  --cream: #faf6f0;
  --cream-deep: #f1e9dd;
  --rose: #b5636b;
  --rose-deep: #8f4b52;
  --gold: #76602f;
  --line: #e3d9c8;
  --max: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Georgia", "Iowan Old Style", serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-weight: 400;
  letter-spacing: 0.01em;
  margin: 0 0 0.5em;
  color: var(--ink);
}

a { color: var(--rose-deep); }
a:hover { color: #6f3a40; }

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

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--gold);
  font-family: Helvetica, Arial, sans-serif;
  margin-bottom: 0.6em;
}

/* ---------- Nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 246, 240, 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
}

.brand {
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 1.3rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink-soft);
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
}

.nav-links a:hover {
  color: var(--rose-deep);
  border-bottom-color: var(--rose-deep);
}

.nav-toggle {
  min-width: 44px;
  min-height: 44px;
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 1rem;
  cursor: pointer;
}

@media (max-width: 780px) {
  .nav-links {
    display: none;
    flex-direction: column;
    gap: 14px;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cream);
    padding: 18px 24px 22px;
    border-bottom: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--line);
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 800px) {
  .hero .wrap { grid-template-columns: 1fr; }
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 2.9rem);
  line-height: 1.15;
  margin-bottom: 0.4em;
}

.hero .tagline {
  font-size: 1.15rem;
  color: var(--ink-soft);
  font-style: italic;
  margin-bottom: 1.3em;
  max-width: 46ch;
}

.hero-portrait {
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(60, 40, 30, 0.14);
}

.hero-portrait img { width: 100%; height: auto; }

.cta-row { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 13px 24px;
  border-radius: 3px;
  border: 1px solid var(--rose-deep);
  transition: all 0.15s ease;
}

.btn-solid {
  background: var(--rose-deep);
  color: #fff;
}
.btn-solid:hover { background: #6f3a40; border-color: #6f3a40; color: #fff; }

.btn-outline {
  background: transparent;
  color: var(--rose-deep);
}
.btn-outline:hover { background: var(--rose-deep); color: #fff; }

/* ---------- Sections ---------- */
section.page-section {
  padding: 34px 0;
  border-bottom: 1px solid var(--line);
}

section.page-section:last-of-type { border-bottom: none; }

.section-intro {
  text-align: center;
  color: var(--ink-soft);
  max-width: 700px;
  margin: -10px auto 34px;
}

.alt-bg { background: var(--cream-deep); }

/* ---------- Collapsible sections ---------- */
.section-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px 0;
  text-align: left;
  font-family: inherit;
  color: inherit;
}

.section-toggle-text { display: block; }
.section-title { margin: 0; font-size: inherit; font-weight: 400; }
.section-title-text { display: block; font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif; font-size: 1.5rem; font-weight: 400; letter-spacing: 0.01em; color: var(--ink); }
.section-toggle-text .eyebrow { display: block; margin-bottom: 0.3em; }

.chevron {
  font-size: 1.3rem;
  color: var(--gold);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.section-toggle[aria-expanded="true"] .chevron { transform: rotate(180deg); }

/* Sections are only collapsed when JavaScript is running (html.js), so crawlers and no-JS visitors see everything. */
.js .section-body { display: none; }
.js .section-body.open { display: block; padding-top: 30px; animation: section-in 0.25s ease; }
@keyframes section-in { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 780px) {
}

/* ---------- Connect / About ---------- */
.connect-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: start;
}

@media (max-width: 800px) {
  .connect-grid { grid-template-columns: 1fr; }
}

.connect-grid figure { margin: 0; }
.connect-grid figcaption {
  font-family: Helvetica, Arial, sans-serif;
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-top: 10px;
  text-align: center;
}

.social-list {
  display: flex;
  gap: 14px;
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 0.85rem;
}

/* ---------- Listen ---------- */
.podcast-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

@media (max-width: 900px) {
  .podcast-grid { grid-template-columns: 1fr; }
}

.podcast-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  text-align: center;
}

.podcast-card-img {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.podcast-card-img img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.podcast-card-img.bg-deep-well { background: rgb(77, 66, 68); }
.podcast-card-img.bg-grounded { background: rgb(128, 155, 155); }
.podcast-card-img.bg-women-of-bible { background: rgb(147, 140, 137); }

.podcast-card .pc-body { padding: 20px 20px 26px; }

.podcast-card h3 { font-size: 1.15rem; margin-bottom: 0.4em; }

.podcast-card p {
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin-bottom: 1.1em;
}

/* ---------- Books ---------- */
.books-grid {
  grid-auto-flow: dense;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

@media (max-width: 980px) { .books-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .books-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .books-grid { grid-template-columns: 1fr; } }

.book-card {
  display: block;
  width: 100%;
  padding: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
}

.book-cover {
  overflow: hidden;
  background: var(--cream-deep);
}

.book-cover img {
  display: block;
  width: 100%;
  height: auto;
}

.book-cover.no-cover {
  aspect-ratio: 2 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.book-card-title {
  display: block;
  padding: 12px 14px 6px;
  font-size: 0.92rem;
  line-height: 1.3;
}

.book-card-toggle {
  display: block;
  padding: 0 14px 14px;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--rose-deep);
}

.book-detail {
  display: none;
  grid-column: 1 / -1;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  margin-top: -4px;
}

.book-detail.open { display: grid; grid-template-columns: 160px 1fr; gap: 26px; }

@media (max-width: 560px) {
  .book-detail.open { grid-template-columns: 1fr; }
}

.book-detail img { border-radius: 6px; }

.book-detail-author {
  font-family: Helvetica, Arial, sans-serif;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold);
  margin-bottom: 0.6em;
}

.book-detail p { color: var(--ink-soft); }

.retailer-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.retailer-row a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  padding: 8px 14px;
  border: 1px solid var(--rose-deep);
  border-radius: 3px;
  color: var(--rose-deep);
}

.retailer-row a:hover { background: var(--rose-deep); color: #fff; }

/* ---------- Speaking ---------- */
.speaking-headshot {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 20px;
}

.speaking-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

@media (max-width: 800px) { .speaking-grid { grid-template-columns: 1fr; } }

blockquote {
  margin: 0 0 20px;
  padding-left: 18px;
  border-left: 3px solid var(--gold);
  font-style: italic;
  color: var(--ink-soft);
}

blockquote cite {
  display: block;
  font-style: normal;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gold);
  margin-top: 6px;
}

.booking-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 26px;
}

.booking-box dl { margin: 0; }
.booking-box dt {
  font-family: Helvetica, Arial, sans-serif;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold);
  margin-top: 14px;
}
.booking-box dt:first-child { margin-top: 0; }
.booking-box dd { margin: 2px 0 0; }

/* ---------- Info ---------- */
.info-list {
  max-width: 720px;
  margin: 0 auto;
}

.info-list details {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}

.info-list summary {
  cursor: pointer;
  font-family: "Iowan Old Style", Georgia, serif;
  font-size: 1.05rem;
}

.info-list p { color: var(--ink-soft); margin-top: 10px; }

.pdf-list {
  margin: 10px 0 0;
  padding-left: 20px;
  color: var(--ink-soft);
}

.pdf-list li { margin-bottom: 6px; }

/* ---------- Footer ---------- */
footer {
  padding: 40px 0 60px;
  text-align: center;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

/* ---------- Accessibility & robustness ---------- */
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 4px; font-family: Helvetica, Arial, sans-serif; font-size: 0.85rem; text-decoration: none; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--rose-deep); outline-offset: 3px; }
section, main { scroll-margin-top: 72px; }
.books-fallback { grid-column: 1 / -1; list-style: none; margin: 0; padding: 0; }
.books-fallback li { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 14px 18px; margin-bottom: 10px; font-size: 0.95rem; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
