:root {
  --forest: #2f4a3a;
  --forest-deep: #1f3328;
  --sage: #c9d8b6;
  --sage-soft: #eef3e7;
  --sand: #e8d9a8;
  --cream: #fbf8f0;
  --ink: #23302a;
  --muted: #5d6b63;
  --line: #dfe6d6;
  --radius: 18px;
  --shadow: 0 20px 50px -20px rgba(31, 51, 40, .35);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  /* Signature font for David's name. To try another, swap the family here and in the Google Fonts link. */
  --signature: "Allison", "Brush Script MT", cursive;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--forest); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; color: var(--forest-deep); margin: 0 0 .5em; }
h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1.1em; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: #fff; padding: 8px 14px; z-index: 100; border-radius: 8px; }

.eyebrow {
  font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: #5f7f66; margin-bottom: .8em;
}

/* Buttons */
.btn {
  display: inline-block; padding: .85em 1.6em; border-radius: 999px;
  background: var(--forest); color: #fff; font-weight: 600; text-decoration: none;
  border: 2px solid var(--forest); transition: transform .15s ease, background .15s ease;
}
.btn:hover { background: var(--forest-deep); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--forest); }
.btn-ghost:hover { background: var(--sage-soft); }
.btn-small { padding: .45em 1.1em; font-size: .9rem; }
.btn:not(.btn-ghost) { color: #fff; }
.nav .btn-small { color: #fff; }
.btn-small.btn-ghost { color: var(--forest); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.6em 0; }
.center-row { justify-content: center; margin: 1em 0; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 248, 240, .9); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--serif); font-weight: 600; font-size: 1.15rem; color: var(--forest-deep); }
.nav ul { list-style: none; display: flex; align-items: center; gap: 26px; margin: 0; padding: 0; }
.nav a:not(.btn) { text-decoration: none; color: var(--ink); font-size: .95rem; font-weight: 500; }
.nav a:not(.btn):hover { color: var(--forest); }

/* Hero */
.hero {
  padding: 72px 0 96px;
  background:
    radial-gradient(900px 500px at 85% 20%, rgba(201, 216, 182, .55), transparent 60%),
    radial-gradient(700px 400px at 0% 100%, rgba(232, 217, 168, .35), transparent 60%);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.subtitle { font-family: var(--serif); font-style: italic; font-size: 1.5rem; color: #4d6b56; margin-top: -.3em; }
.lede { font-size: 1.15rem; color: #3b4a42; max-width: 36em; }
.formats { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.formats li { font-size: .82rem; font-weight: 500; padding: .3em .9em; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--muted); }

/* Book cover */
.hero-book { display: flex; justify-content: center; perspective: 1400px; }
.book { transform: rotateY(-14deg) rotateX(2deg); transition: transform .5s ease; }
.book:hover { transform: rotateY(-4deg); }
.cover-img {
  width: 320px; height: auto; aspect-ratio: 900 / 1430; border-radius: 3px 10px 10px 3px; background: #fff;
  box-shadow: var(--shadow), 0 2px 6px rgba(0,0,0,.12), inset 0 0 0 1px rgba(0,0,0,.04);
}
.book { position: relative; display: block; text-decoration: none; }
.book::before { /* spine highlight */
  content: ""; position: absolute; inset: 0 auto 0 0; width: 14px; border-radius: 3px 0 0 3px; z-index: 1;
  background: linear-gradient(90deg, rgba(0,0,0,.18), rgba(255,255,255,.25) 45%, rgba(0,0,0,.06));
}

.pull {
  margin: 2em 0; padding: .2em 0 .2em 1.2em; border-left: 4px solid #5d8a3a;
  font-family: var(--serif); font-style: italic; font-size: 1.45rem; line-height: 1.4; color: var(--forest-deep);
}

/* Sections */
.section { padding: 96px 0; }
.section.alt { background: var(--sage-soft); }
.section .narrow p { font-size: 1.08rem; }

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 44px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; }
.card p { color: var(--muted); font-size: .97rem; margin: 0; }
.icon { font-size: 1.8rem; margin-bottom: 12px; }

.influences { margin-top: 64px; }
.influences ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 36px; }
.influences li { font-family: var(--serif); font-size: 1.3rem; color: var(--forest-deep); }

.details { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 56px 0 0; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.details div { background: #fff; padding: 20px; text-align: center; }
.details dt { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.details dd { margin: 4px 0 0; font-weight: 600; color: var(--forest-deep); }

/* Video */
.video { position: relative; aspect-ratio: 16 / 9; background: #1f3328; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin-top: 28px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-card {
  display: flex; align-items: center; gap: 20px; text-align: left; margin-top: 28px;
  padding: 22px 26px; border-radius: var(--radius); text-decoration: none; color: var(--cream);
  background: linear-gradient(135deg, var(--forest) 0%, var(--forest-deep) 100%); box-shadow: var(--shadow);
  transition: transform .15s ease;
}
.video-card:hover { transform: translateY(-2px); }
.play { flex: none; width: 58px; height: 58px; border-radius: 50%; background: var(--sand); position: relative; }
.play::after { content: ""; position: absolute; left: 23px; top: 18px; border-left: 17px solid var(--forest-deep); border-top: 11px solid transparent; border-bottom: 11px solid transparent; }
.video-text { display: flex; flex-direction: column; }
.video-text strong { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; }
.video-text span { color: var(--sage); font-size: .9rem; }

/* Buy */
.buy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 44px 0 28px; }
.buy-col { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 26px; }
.buy-col h3 { margin-bottom: .1em; }
.store-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.store-list a {
  display: flex; justify-content: space-between; align-items: center;
  padding: .75em 1em; border-radius: 12px; border: 1px solid var(--line);
  text-decoration: none; color: var(--ink); font-weight: 500; transition: all .15s ease;
}
.store-list a::after { content: "→"; color: var(--forest); }
.store-list a:hover { border-color: var(--forest); background: var(--sage-soft); }

/* Author */
.author-grid { display: grid; grid-template-columns: 340px 1fr; gap: 64px; align-items: center; }
.author-photo { margin: 0; }
.author-photo img { width: 100%; height: auto; aspect-ratio: 4 / 5; border-radius: var(--radius); object-fit: cover; box-shadow: var(--shadow); background: #fff; }
.author-photo figcaption { margin-top: 10px; font-size: .8rem; color: var(--muted); text-align: center; }

/* Giving */
.giving { background: var(--forest); color: var(--cream); }
.giving h2, .giving h3 { color: #fff; }
.giving .eyebrow { color: var(--sage); }
.orgs { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 32px; }
.org { border: 1px solid rgba(255,255,255,.2); border-radius: var(--radius); padding: 28px 20px; background: rgba(255,255,255,.05); }
.org h3 { margin: 0; }


/* Links & breadcrumbs */
a.plain { color: inherit; text-decoration: none; }
a.plain:hover { color: var(--forest); }
.text-link { font-weight: 600; text-decoration: none; align-self: center; }
.text-link:hover { text-decoration: underline; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--forest); text-decoration: underline; }
.crumbs span[aria-hidden] { margin: 0 6px; opacity: .6; }
.nav a[aria-current="page"] { color: var(--forest); }

/* Books grid */
.books-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); gap: 28px; margin-top: 44px; }
.book-card {
  display: grid; grid-template-columns: 170px 1fr; gap: 28px; align-items: start;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
}
.book-card-cover { display: block; text-decoration: none; transition: transform .2s ease; }
.book-card-cover:hover { transform: translateY(-3px); }
.book-card .cover-img, .book-card .cover-placeholder { width: 100%; }
.book-card h3 { font-size: 1.55rem; margin: 10px 0 2px; }
.book-card-sub { font-family: var(--serif); font-style: italic; color: #4d6b56; margin-bottom: .8em; }
.book-card-body p { font-size: .98rem; }
.book-card .cta-row { margin: 1em 0 0; align-items: center; }
.badge { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: .35em .8em; border-radius: 999px; }
.badge-available { background: var(--sage-soft); color: var(--forest); }
.badge-soon { background: #fdf1cf; color: #8a6200; }

/* Placeholder covers (used until real cover art exists) */
.cover-placeholder {
  position: relative; aspect-ratio: 900 / 1430; border-radius: 3px 10px 10px 3px; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; text-align: center;
  padding: 10% 8%; box-shadow: var(--shadow); color: #fff;
}
.cover-lg { width: 320px; }
.cover-yl { background: radial-gradient(120% 70% at 50% 30%, #3a3f3d 0%, #1d2120 60%, #121514 100%); }
.cover-yl::after { /* road line */
  content: ""; position: absolute; left: 50%; bottom: 0; width: 6%; height: 22%; transform: translateX(-50%);
  background: repeating-linear-gradient(to top, #e8b93a 0 18%, transparent 18% 34%); opacity: .8;
}
.yl-light {
  position: absolute; top: 12%; left: 50%; transform: translateX(-50%);
  width: 26%; aspect-ratio: 1 / 2.6; background: #0b0d0c; border-radius: 14px; border: 2px solid #2c312f;
  display: flex; flex-direction: column; justify-content: space-around; align-items: center; padding: 6% 0;
}
.yl-light i { display: block; width: 66%; aspect-ratio: 1; border-radius: 50%; background: #2a2e2c; }
.yl-light i:nth-child(2) { background: #f5c03b; box-shadow: 0 0 18px 6px rgba(245, 192, 59, .6), 0 0 60px 20px rgba(245, 192, 59, .25); }
.cp-title { position: relative; z-index: 1; font-family: var(--serif); font-weight: 600; font-size: clamp(1.1rem, 2.4vw, 2.3rem); line-height: 1.05; color: #fbe7a8; margin-bottom: 8px; }
.cover-lg .cp-title { font-size: 2.4rem; }
.cp-author { position: relative; z-index: 1; font-size: .62rem; letter-spacing: .22em; text-transform: uppercase; color: #d9d4c5; margin-bottom: 26%; }
.cover-lg .cp-author { font-size: .78rem; }
.cp-note { position: absolute; z-index: 1; top: 10px; right: 10px; font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; background: rgba(255,255,255,.12); padding: 3px 8px; border-radius: 999px; color: #e9e4d6; }
.hero-yl { background:
    radial-gradient(800px 480px at 85% 25%, rgba(245, 192, 59, .22), transparent 60%),
    radial-gradient(700px 400px at 0% 100%, rgba(201, 216, 182, .35), transparent 60%); }

.author-grid-sm { grid-template-columns: 220px 1fr; gap: 48px; }

/* Footer */
.site-footer { padding: 36px 0; border-top: 1px solid var(--line); }
.footer-grid { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.footer-grid p { margin: 0; color: var(--muted); }
.social { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.footer-grid a { text-decoration: none; }

/* Responsive */
@media (max-width: 960px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .details { grid-template-columns: repeat(2, 1fr); }
  .buy-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .nav ul li:not(:last-child) { display: none; }
  .hero { padding: 48px 0 72px; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-book { order: -1; }
  .cover-img { width: 250px; }
  .author-grid, .author-grid-sm { grid-template-columns: 1fr; gap: 36px; }
  .cover-lg { width: 250px; }
  .author-photo { max-width: 300px; }
  .section { padding: 72px 0; }
}
@media (max-width: 560px) {
  .book-card { grid-template-columns: 1fr; }
  .book-card-cover { width: 170px; margin: 0 auto; }
  .cards, .orgs { grid-template-columns: 1fr; }
  .brand span { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* Yellow Lights page */
.lede-yl { font-family: var(--serif); font-size: 1.45rem; line-height: 1.45; color: var(--forest-deep); }
.excerpt { font-family: var(--serif); font-size: 1.18rem; line-height: 1.8; color: #2c3a33; border-left: 4px solid #f5c03b; padding-left: 1.4em; margin: 1.5em 0; }
.excerpt p { font-size: inherit !important; }
.excerpt-gap { text-align: center; letter-spacing: .5em; color: var(--muted); }
.excerpt-key { font-style: italic; font-weight: 600; color: var(--forest-deep); }
.intro-narrow { max-width: 620px; margin: 0 auto; }
.progress { display: grid; gap: 22px; margin: 32px auto; max-width: 520px; text-align: left; }
.meter-label { display: flex; justify-content: space-between; font-size: .95rem; margin-bottom: 6px; }
.meter-label strong { color: var(--forest-deep); }
.meter-bar { height: 12px; background: var(--sage-soft); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.meter-bar span { display: block; height: 100%; width: var(--pct); background: linear-gradient(90deg, #f5c03b, #e8a21a); border-radius: 999px; }

/* Credentials */
.creds { list-style: none; padding: 0; margin: 44px 0 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.creds li { grid-column: span 2; }
.creds li:nth-child(n+4) { grid-column: span 3; }
.creds li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 24px 22px; border-top: 4px solid #5d8a3a; }
.creds h3 { font-size: 1.12rem; margin-bottom: 6px; }
.creds p { font-size: .93rem; color: var(--muted); margin: 0; }
@media (max-width: 960px) { .creds { grid-template-columns: 1fr 1fr; } .creds li, .creds li:nth-child(n+4) { grid-column: auto; } .creds li:last-child { grid-column: 1 / -1; } }
@media (max-width: 560px) { .creds { grid-template-columns: 1fr; } .creds li:last-child { grid-column: auto; } }

/* Signature name treatment */
.brand span { font-family: var(--signature); font-weight: 400; font-size: 2rem; line-height: 1; letter-spacing: 0; position: relative; top: 3px; }
.site-footer .brand span { font-size: 1.8rem; }
h1.signature { font-family: var(--signature); font-weight: 400; font-size: clamp(4rem, 9vw, 7rem); line-height: 1; letter-spacing: 0; margin: .05em 0 .25em; }
