/* ==========================================================
   Divine Karma — sage & ivory theme
   Palette: sage greens, warm ivory, soft dusty gold, forest text
   Note: CSS variable names kept stable (terracotta, brown) so that
   component styles recolor in one place. Their hex values now map
   to sage greens and deep forest, not the original terracotta/brown.
   ========================================================== */

:root {
  --cream: #f4efe2;          /* warm ivory — main background */
  --cream-dark: #e8e1cf;     /* soft ivory for nav + section-alt */
  --sand: #d4cdb6;           /* muted warm border */
  --terracotta: #6b7d56;     /* PRIMARY ACCENT: mid sage (buttons, links) */
  --terracotta-dark: #4e5d3e;/* deeper sage for hover states */
  --sage: #a8b89a;           /* light sage for gradient top-stops */
  --sage-dark: #7a8c66;      /* mid-deep sage for gradient bottom-stops */
  --brown: #2f3a26;          /* deep forest for headings */
  --brown-soft: #5e6b50;     /* muted moss for body text */
  --gold: #b8a063;           /* dusty muted gold accent */
  --ink: #1f2418;            /* near-black forest for body copy */
  --shadow: 0 6px 24px rgba(47, 58, 38, 0.12);
  --radius: 10px;
  --max-width: 1100px;
  --font-serif: 'Cormorant Garamond', 'Georgia', 'Times New Roman', serif;
  --font-sans: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.7;
  font-size: 17px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* subtle paper/earth texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    radial-gradient(ellipse at top left, rgba(184, 160, 99, 0.09), transparent 60%),
    radial-gradient(ellipse at bottom right, rgba(107, 125, 86, 0.12), transparent 60%);
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--brown);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.01em;
}

h1 { font-size: clamp(2.2rem, 4.2vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin-bottom: 1rem; }
h3 { font-size: 1.4rem; margin-bottom: 0.5rem; }

p { margin-bottom: 1rem; }

a { color: var(--terracotta-dark); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--terracotta); }

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

/* ---------------- Header / Nav ---------------- */
.site-header {
  /* Dark background so the white Divine Karma logo reads cleanly. The brand
     palette's deepest forest (--brown) keeps the header on-brand rather than
     pure black. */
  background: var(--brown);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(6px);
}

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

.brand {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--brown);
  font-weight: 700;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  line-height: 1;
}

/* Actual logo image (replaces the old gradient dot + text wordmark) */
.brand-logo {
  display: block;
  height: 54px;
  width: auto;
  max-width: 260px;
}

/* Visually hide the text "Divine Karma" next to the logo but keep it for screen readers */
.brand-text-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Fallback span that shows when the logo file is missing */
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--gold), var(--terracotta));
  box-shadow: inset 0 -4px 8px rgba(0,0,0,0.12);
  display: inline-block;
  vertical-align: middle;
}

/* Footer logo (white variant against dark brown footer) */
.footer-logo {
  display: block;
  height: 72px;
  width: auto;
  max-width: 240px;
  margin-bottom: 0.9rem;
}

.nav-links {
  display: flex;
  gap: 1.8rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--cream);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.3rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* Admin link — discreet utility access to the private portal. Reads
   as "tool", not a reader link. Slightly muted, with a subtle border. */
.nav-links a.nav-admin {
  color: var(--brown-soft);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.7rem;
  border: 1px solid rgba(94, 107, 80, 0.35);
  border-radius: 999px;
  border-bottom: 1px solid rgba(94, 107, 80, 0.35);
  opacity: 0.8;
  transition: opacity 0.2s, border-color 0.2s, color 0.2s;
}
.nav-links a.nav-admin:hover {
  color: var(--brown);
  border-color: var(--brown-soft);
  border-bottom-color: var(--brown-soft);
  opacity: 1;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--cream);
  cursor: pointer;
}

/* ---------------- Hero ---------------- */
.hero {
  background: linear-gradient(135deg, var(--cream) 0%, var(--sand) 100%);
  padding: 5rem 1.5rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 140%;
  height: 120px;
  background: var(--cream);
  border-radius: 50% 50% 0 0;
}

.hero-inner {
  max-width: 820px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-kicker {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--terracotta-dark);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.hero h1 {
  margin-bottom: 1.2rem;
  color: var(--brown);
}

.hero p.lead {
  font-size: 1.2rem;
  color: var(--brown-soft);
  max-width: 640px;
  margin: 0 auto 2rem;
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-block;
  padding: 0.85rem 1.8rem;
  background: var(--terracotta);
  color: var(--cream);
  border: none;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: transform 0.15s, background 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 12px rgba(107, 125, 86, 0.28);
}

.btn:hover {
  background: var(--terracotta-dark);
  transform: translateY(-2px);
  color: var(--cream);
  box-shadow: 0 6px 18px rgba(78, 93, 62, 0.38);
}

.btn-outline {
  background: transparent;
  color: var(--brown);
  border: 2px solid var(--brown);
  box-shadow: none;
}

.btn-outline:hover {
  background: var(--brown);
  color: var(--cream);
}

.btn-sage {
  background: var(--sage);
  box-shadow: 0 4px 12px rgba(168, 184, 154, 0.35);
}
.btn-sage:hover {
  background: var(--sage-dark);
}

/* ---------------- Sections ---------------- */
main {
  flex: 1;
}

.section {
  padding: 4rem 1.5rem;
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-alt {
  background: var(--cream-dark);
}

.section-head {
  text-align: center;
  margin-bottom: 3rem;
}

.section-head p {
  color: var(--brown-soft);
  max-width: 640px;
  margin: 0.5rem auto 0;
}

/* ---------------- Daily Quote Card ---------------- */
.quote-card {
  max-width: 720px;
  margin: 0 auto;
  background: linear-gradient(180deg, #fff 0%, var(--cream) 100%);
  border: 1px solid var(--sand);
  border-radius: var(--radius);
  padding: 3rem 2.5rem;
  text-align: center;
  box-shadow: var(--shadow);
  position: relative;
}

.quote-card::before {
  content: '\201C';
  position: absolute;
  top: -20px;
  left: 30px;
  font-family: var(--font-serif);
  font-size: 6rem;
  color: var(--gold);
  line-height: 1;
  opacity: 0.7;
}

.quote-text {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-style: italic;
  color: var(--brown);
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.quote-meta {
  color: var(--terracotta-dark);
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}

.quote-controls {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
}

.quote-controls button {
  background: transparent;
  border: 1px solid var(--sand);
  color: var(--brown-soft);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.quote-controls button:hover {
  background: var(--sand);
  color: var(--brown);
}

/* ---------------- Book Grid ---------------- */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.book-card {
  background: #fff;
  border: 1px solid var(--sand);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: transform 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
}

.book-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(47, 58, 38, 0.18);
}

.book-cover {
  aspect-ratio: 2/3;
  background: linear-gradient(135deg, var(--sage) 0%, var(--terracotta) 100%);
  border-radius: 6px;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cream);
  font-family: var(--font-serif);
  font-size: 1.3rem;
  text-align: center;
  padding: 1rem;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
  width: 100%;
  object-fit: contain;
  background-color: #0a0a14;
}

img.book-cover {
  padding: 0;
}

.book-cover.cover-2 {
  background: linear-gradient(135deg, var(--gold) 0%, var(--brown-soft) 100%);
}
.book-cover.cover-3 {
  background: linear-gradient(135deg, var(--terracotta-dark) 0%, var(--sage-dark) 100%);
}

.book-title {
  font-family: var(--font-serif);
  color: var(--brown);
  margin-bottom: 0.5rem;
}

.book-blurb {
  color: var(--brown-soft);
  margin-bottom: 1.25rem;
  flex: 1;
}

.book-card .btn {
  align-self: center;
}

/* ---------------- About / Bio ---------------- */
.bio-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  align-items: start;
}

.bio-photo {
  aspect-ratio: 1;
  width: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sage) 0%, var(--gold) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cream);
  font-family: var(--font-serif);
  font-size: 1.1rem;
  text-align: center;
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 4px solid #fff;
  object-fit: cover;
  object-position: center top;
}

img.bio-photo {
  padding: 0;
  background: var(--sand);
}

.bio-text p { color: var(--brown-soft); }

/* ---------------- v10: <picture> wrappers ----------------
   When an <img class="book-cover"> or <img class="bio-photo"> is wrapped
   in a <picture> element (for WebP fallback), the <picture> is display:inline
   by default and has no intrinsic sizing. That collapsed the inner img and
   exposed the sage gradient background of .book-cover / .bio-photo.
   These rules move the sizing contract to the <picture> wrapper itself
   and neutralize the now-inappropriate background/border styling on the
   inner img, so the visual result matches the pre-v10 direct-<img> layout.  */
.book-card picture {
  display: block;
  width: 100%;
  aspect-ratio: 2/3;
  margin-bottom: 1.25rem;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
  background: linear-gradient(135deg, var(--sage) 0%, var(--terracotta) 100%);
}

.book-card picture.cover-2 {
  background: linear-gradient(135deg, var(--gold) 0%, var(--brown-soft) 100%);
}

.book-card picture.cover-3 {
  background: linear-gradient(135deg, var(--terracotta-dark) 0%, var(--sage-dark) 100%);
}

.book-card picture img.book-cover {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: none;
  object-fit: cover;
}

.bio-grid picture {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 4px solid #fff;
  background: linear-gradient(135deg, var(--sage) 0%, var(--gold) 100%);
}

.bio-grid picture img.bio-photo {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: none;
  object-fit: cover;
  object-position: center top;
}

/* ---------------- Contact Form ---------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 3rem;
  align-items: start;
}

.contact-intro p {
  color: var(--brown-soft);
}

.contact-form {
  background: #fff;
  border: 1px solid var(--sand);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-field label {
  display: block;
  font-weight: 600;
  color: var(--brown);
  margin-bottom: 0.3rem;
  font-size: 0.95rem;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--sand);
  border-radius: 6px;
  background: var(--cream);
  font: inherit;
  color: var(--ink);
  transition: border-color 0.2s, background 0.2s;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--terracotta);
  background: #fff;
}

.form-field textarea {
  resize: vertical;
  min-height: 120px;
}

.form-status {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.95rem;
  display: none;
}

.form-status.success {
  display: block;
  background: #e6ede0;
  color: var(--sage-dark);
  border: 1px solid var(--sage);
}

.form-status.error {
  display: block;
  background: #f9e4e1;
  color: #a04438;
  border: 1px solid #a04438;
}

/* ---------------- Social ---------------- */
.social-row {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1.2rem;
}

.social-link {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--cream-dark);
  color: var(--brown);
  border: 1px solid var(--sand);
  transition: transform 0.2s, background 0.2s, color 0.2s;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.social-link:hover {
  background: var(--terracotta);
  color: var(--cream);
  transform: translateY(-3px);
}

/* Footer social pills: keep dark-on-ivory text even though .footer-inner a
   otherwise paints links cream. Without this override, the "IG" / "FB"
   letters become cream-on-cream inside the dark footer and disappear,
   which is most visible on mobile where the footer is the tallest block. */
.site-footer .social-link,
.footer-inner .social-link {
  color: var(--brown);
  opacity: 1;
  background: var(--cream);
  border-color: var(--cream);
}

.site-footer .social-link:hover,
.footer-inner .social-link:hover {
  background: var(--gold);
  color: var(--brown);
  opacity: 1;
}

/* ---------------- Footer ---------------- */
.site-footer {
  background: var(--brown);
  color: var(--cream);
  padding: 3rem 1.5rem 2rem;
  margin-top: 4rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}

.footer-inner h4 {
  color: var(--gold);
  font-family: var(--font-serif);
  margin-bottom: 0.8rem;
}

.footer-inner a {
  color: var(--cream);
  opacity: 0.85;
}

.footer-inner a:hover {
  color: var(--gold);
  opacity: 1;
}

.footer-inner ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(247, 241, 230, 0.15);
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.8;
}

.footer-bottom a.footer-admin {
  color: inherit;
  opacity: 0.75;
  text-decoration: none;
  border-bottom: 1px dotted rgba(247, 241, 230, 0.35);
}

.footer-bottom a.footer-admin:hover {
  opacity: 1;
  border-bottom-color: rgba(247, 241, 230, 0.7);
}

/* ---------------- CTA strip ---------------- */
.cta-strip {
  background: linear-gradient(135deg, var(--sage) 0%, var(--sage-dark) 100%);
  color: var(--cream);
  text-align: center;
  padding: 3rem 1.5rem;
}

.cta-strip h2 { color: var(--cream); }
.cta-strip p { color: rgba(247, 241, 230, 0.9); max-width: 600px; margin: 0.5rem auto 1.5rem; }
.cta-strip .btn { background: var(--cream); color: var(--brown); }
.cta-strip .btn:hover { background: var(--gold); color: var(--brown); }

/* ---------------- Inkling app section ----------------
   "Twilight" panel with deep midnight background. Lets the original
   purple/cyan Inkling palette render true without fighting the
   sage/ivory site theme. */
.inkling-section {
  background:
    radial-gradient(ellipse at 25% 30%, rgba(184, 156, 255, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse at 75% 75%, rgba(103, 232, 249, 0.14) 0%, transparent 55%),
    linear-gradient(160deg, #0d0a1f 0%, #0a0915 60%, #050410 100%);
  color: #e6e6f5;
  padding: 4.5rem 1.5rem;
  text-align: center;
}

.inkling-section .section-inner {
  max-width: 820px;
  margin: 0 auto;
}

/* Official Inkling brandmark (mandala + wordmark, paths-only SVG so the
   wordmark renders correctly even when web fonts are still loading). */
.inkling-logo {
  display: block;
  width: 220px;
  height: auto;
  margin: 0 auto 1.5rem;
  filter: drop-shadow(0 0 28px rgba(168, 132, 255, 0.32));
}

/* "Coming soon" status pill — small, calm, with a slow pulse on the dot
   so it reads as live but doesn't compete with the rest of the section. */
.inkling-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border: 1px solid rgba(184, 156, 255, 0.45);
  border-radius: 999px;
  background: rgba(184, 156, 255, 0.08);
  color: #d8c8ff;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.inkling-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #67e8f9;
  box-shadow: 0 0 10px #67e8f9;
  animation: inkling-pulse 2.4s ease-in-out infinite;
}

@keyframes inkling-pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.25); }
}

@media (prefers-reduced-motion: reduce) {
  .inkling-status-dot { animation: none; }
}

.inkling-tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  color: #e6e6f5;
  line-height: 1.3;
  margin-bottom: 1.2rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.inkling-desc {
  color: #c4c4dd;
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto 2rem;
  font-size: 1rem;
}

.store-badges {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 1.1rem 0.65rem 0.95rem;
  background: #000;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 10px;
  text-decoration: none;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s, background 0.2s;
  min-width: 170px;
  /* Override the global a:hover sage color that would otherwise
     re-tint the badge text. */
}

.store-badge:hover,
.store-badge:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(184, 156, 255, 0.85);
  box-shadow: 0 8px 24px rgba(168, 132, 255, 0.25);
  color: #fff;
}

.store-badge .badge-icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.store-badge .badge-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  text-align: left;
}

.store-badge .badge-text small {
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.85;
  font-weight: 400;
  margin-bottom: 1px;
}

.store-badge .badge-text strong {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  font-family: var(--font-sans);
}

/* ---------------- Responsive ---------------- */
@media (max-width: 800px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    /* Match the dark header so the cream links stay readable when the
       menu drops over the light page background. */
    background: var(--brown);
    flex-direction: column;
    gap: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
  }
  .nav-links.open { max-height: 400px; }
  .nav-links li {
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
  }
  .nav-links a {
    display: block;
    padding: 0.9rem 1.5rem;
    border: none;
    color: var(--cream);
  }

  .brand-logo { height: 42px; }
  .footer-logo { height: 60px; }

  .hero { padding: 3rem 1.5rem 3rem; }
  .section { padding: 3rem 1.25rem; }
  .bio-grid, .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .bio-photo { max-width: 240px; margin: 0 auto; }

  /* Constrain the <picture> wrapper on mobile the same way .bio-photo is
     constrained — otherwise the 1fr bio-grid makes it viewport-wide and
     the circular crop becomes a warped oval. */
  .bio-grid picture {
    max-width: 240px;
    margin: 0 auto;
  }

  /* Book cards stack single-column on narrow viewports. Make sure each
     <picture> wrapper respects the card's content-box width and does not
     overflow when padding tightens. */
  .book-card {
    padding: 1.5rem;
  }
  .book-card picture {
    width: 100%;
    max-width: 100%;
  }

  .quote-card { padding: 2.5rem 1.5rem; }
  .quote-text { font-size: 1.25rem; }

  /* Inkling section on mobile:
     - Logo (mandala + wordmark) shrinks to a comfortable phone size.
     - Drop the App Store / Google Play brand icons and the small
       "Download on the" / "Get it on" lead-in text — turn each
       badge into a clean rounded button with just the platform
       name as the label, side-by-side on one row when they fit. */
  .inkling-section { padding: 3rem 1.25rem; }
  .inkling-logo {
    width: 170px;
    margin-bottom: 1rem;
  }
  .inkling-status { font-size: 0.7rem; padding: 0.3rem 0.75rem; margin-bottom: 1.1rem; }
  .inkling-tagline { margin-bottom: 0.9rem; }
  .inkling-desc { font-size: 0.95rem; margin-bottom: 1.6rem; }

  .store-badges {
    width: 100%;
    gap: 0.7rem;
  }

  .store-badge {
    flex: 1 1 140px;
    min-width: 0;
    justify-content: center;
    padding: 0.85rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(184, 156, 255, 0.55);
  }

  .store-badge .badge-icon { display: none; }
  .store-badge .badge-text { text-align: center; }
  .store-badge .badge-text small { display: none; }
  .store-badge .badge-text strong { font-size: 1rem; }
}

/* ==========================================================================
   v17 ENHANCEMENTS — audit-driven additions
   ==========================================================================
   - "What Divine Karma means" callout
   - Reader Reflections grid
   - Newsletter capture
   - FAQ accordion
   - Skip-to-content link
   - Stronger focus rings
   - Mobile font bump
   ========================================================================== */

/* Skip to content — invisible until tabbed, lands above the page chrome
   for keyboard and screen-reader users. */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0.75rem;
  background: var(--brown);
  color: var(--cream);
  padding: 0.6rem 1.1rem;
  border-radius: 0 0 var(--radius) var(--radius);
  z-index: 100;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: top 0.18s ease;
  text-decoration: none;
}
.skip-link:focus {
  top: 0;
  color: var(--gold);
}

/* Visible-on-focus outline on every interactive element. Replaces the
   default browser ring with one that matches the brand. */
*:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Screen-reader-only utility (used by the newsletter email label) */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* "What Divine Karma means" — a calm, centered callout between the hero
   and the Today's Quote section. Single-column, ample breathing room. */
.meaning-section {
  padding: 3rem 1.5rem 0.5rem;
}
.meaning-card {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  padding: 2.2rem 2rem;
  background: var(--cream-dark);
  border-radius: 14px;
  border: 1px solid rgba(184, 160, 99, 0.25);
  box-shadow: var(--shadow);
}
.meaning-kicker {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--gold);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}
.meaning-body {
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  line-height: 1.55;
  color: var(--brown);
  margin: 0;
}

/* Reader Reflections — three quote cards, equal columns on desktop,
   stacks on mobile. Hidden when data-placeholder="true" except for the
   "note for David" so the section is invisible to visitors until you
   replace the quotes. Once you have real reviews, change the attribute
   to data-placeholder="false". */
.reflections-section[data-placeholder="true"] .reflections-grid,
.reflections-section[data-placeholder="true"] .section-head { display: none; }

.reflections-section[data-placeholder="true"] {
  background: rgba(255, 248, 220, 0.4);
  border-top: 1px dashed rgba(184, 160, 99, 0.45);
  border-bottom: 1px dashed rgba(184, 160, 99, 0.45);
  padding: 1.2rem 1.5rem;
}
.reflections-section[data-placeholder="false"] .reflections-note { display: none; }

.reflections-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.reflection-card {
  background: var(--cream);
  border: 1px solid var(--sand);
  border-radius: 14px;
  padding: 1.8rem 1.5rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  box-shadow: var(--shadow);
}
.reflection-stars {
  color: var(--gold);
  letter-spacing: 0.15em;
  font-size: 1rem;
  margin: 0;
}
.reflection-quote {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--brown);
  margin: 0;
  font-style: italic;
}
.reflection-by {
  color: var(--brown-soft);
  font-size: 0.9rem;
  font-style: normal;
  margin-top: auto;
}
.reflections-note {
  background: #fff5cc;
  border: 1px dashed #b8a063;
  padding: 0.9rem 1.1rem;
  border-radius: 8px;
  font-size: 0.92rem;
  color: var(--brown);
  margin: 0;
}
.reflections-note code {
  background: rgba(0,0,0,0.06);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  font-size: 0.88em;
}

/* Newsletter capture — sage-toned section with a single-row email + button
   on desktop, stacked on mobile. */
.newsletter-section {
  background: linear-gradient(135deg, rgba(168, 184, 154, 0.28) 0%, rgba(244, 239, 226, 0.6) 100%);
  padding: 4rem 1.5rem;
}
.newsletter-card {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}
.newsletter-kicker {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--terracotta-dark);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-bottom: 0.6rem;
}
.newsletter-section h2 {
  margin-bottom: 0.8rem;
  color: var(--brown);
}
.newsletter-lead {
  color: var(--brown-soft);
  font-size: 1.05rem;
  line-height: 1.65;
  max-width: 540px;
  margin: 0 auto 1.6rem;
}
.newsletter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  align-items: stretch;
}
.newsletter-form input[type="email"] {
  flex: 1 1 280px;
  min-width: 0;
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--sand);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 1rem;
  background: var(--cream);
  color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.newsletter-form input[type="email"]:focus {
  outline: none;
  border-color: var(--terracotta);
  box-shadow: 0 0 0 3px rgba(107, 125, 86, 0.18);
}
.newsletter-form .btn {
  white-space: nowrap;
}
.newsletter-fineprint {
  color: var(--brown-soft);
  font-size: 0.85rem;
  margin-top: 1rem;
  font-style: italic;
}

/* FAQ accordion (used on books.html) — pure HTML <details>/<summary>,
   no JS required. Each open/close has a sage chevron and gentle motion. */
.faq-list {
  max-width: 760px;
  margin: 2rem auto 0;
}
.faq-item {
  border-bottom: 1px solid var(--sand);
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1.1rem 0;
  font-family: var(--font-serif);
  font-size: 1.18rem;
  color: var(--brown);
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: color 0.2s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  color: var(--terracotta);
  font-size: 1.6rem;
  font-weight: 300;
  transition: transform 0.2s;
}
.faq-item[open] summary::after {
  content: "\2212"; /* minus */
}
.faq-item summary:hover { color: var(--terracotta-dark); }
.faq-item[open] summary { color: var(--terracotta-dark); }
.faq-answer {
  padding: 0 0 1.4rem;
  color: var(--brown-soft);
  line-height: 1.7;
}

/* ---------- Mobile additions ---------- */
@media (max-width: 800px) {
  /* Slightly larger body type on phones — older readers consistently
     report 17px feels small in this category. */
  body { font-size: 18px; }

  .meaning-section { padding: 2rem 1.25rem 0.5rem; }
  .meaning-card { padding: 1.6rem 1.25rem; }

  .reflections-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .newsletter-section { padding: 3rem 1.25rem; }
  .newsletter-form { flex-direction: column; }
  .newsletter-form input[type="email"] { flex: 1 1 auto; width: 100%; }
  .newsletter-form .btn { width: 100%; }

  .faq-item summary { font-size: 1.08rem; padding: 1rem 0; }
}

/* Per-book review (a single quote inside each book card on books.html) */
.book-review {
  margin: 1rem 0 1.2rem;
  padding: 1rem 1.1rem;
  background: rgba(184, 160, 99, 0.06);
  border-left: 3px solid var(--gold);
  border-radius: 0 8px 8px 0;
}
.book-review .reflection-stars {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}
.book-review .reflection-quote {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 0.4rem;
}
.book-review .reflection-by {
  font-size: 0.85rem;
  color: var(--brown-soft);
}

/* ==========================================================================
   v18 — Insights blog + Media kit components
   ========================================================================== */

/* Insight card (blog hub list item) */
.insight-card {
  padding: 2rem 0;
  border-bottom: 1px solid var(--sand);
}
.insight-card:last-of-type { border-bottom: none; }
.insight-meta {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--brown-soft);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin-bottom: 0.6rem;
}
.insight-card h2 {
  margin-bottom: 0.6rem;
}
.insight-card h2 a {
  color: var(--brown);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}
.insight-card h2 a:hover {
  color: var(--terracotta-dark);
  border-bottom-color: var(--gold);
}
.insight-excerpt {
  color: var(--brown-soft);
  line-height: 1.7;
  font-size: 1.05rem;
}
.insight-readmore {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--terracotta-dark);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.insight-readmore:hover { border-bottom-color: var(--terracotta); }

/* Long-form essay layout (single blog post) */
.essay {
  max-width: 720px;
  margin: 3rem auto 0;
  padding: 0 1.5rem;
}
.essay-header {
  text-align: center;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--sand);
}
.essay-meta {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--brown-soft);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin-bottom: 0.8rem;
}
.essay-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.2;
  color: var(--brown);
}
.essay-body {
  font-family: var(--font-serif);
  font-size: 1.18rem;
  line-height: 1.85;
  color: var(--ink);
}
.essay-body p { margin-bottom: 1.4rem; }
.essay-body h2 {
  font-size: 1.6rem;
  margin: 2.5rem 0 1rem;
  color: var(--brown);
  font-style: italic;
}
.essay-body em {
  color: var(--terracotta-dark);
}
/* Drop-cap on the first paragraph of an essay */
.essay-body > p:first-of-type::first-letter {
  font-family: var(--font-serif);
  float: left;
  font-size: 4.2rem;
  line-height: 0.85;
  margin: 0.4rem 0.6rem 0 0;
  color: var(--gold);
  font-weight: 600;
}

/* Essay closing CTA */
.essay-cta {
  margin: 3rem auto 0;
  padding: 2.2rem 2rem;
  background: var(--cream-dark);
  border-radius: 14px;
  border: 1px solid rgba(184, 160, 99, 0.25);
  text-align: center;
  max-width: 720px;
  box-shadow: var(--shadow);
}
.essay-cta h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--brown);
}
.essay-cta p {
  color: var(--brown-soft);
  margin-bottom: 1.2rem;
}

/* Media kit components */
.bio-block {
  background: var(--cream-dark);
  border-left: 3px solid var(--gold);
  padding: 1.2rem 1.4rem;
  border-radius: 0 8px 8px 0;
  margin-bottom: 1rem;
}
.bio-block p { margin-bottom: 0; }

.media-assets-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}
.media-asset {
  margin: 0;
  text-align: center;
}
.media-asset figcaption {
  font-size: 0.85rem;
  color: var(--brown-soft);
  margin-top: 0.5rem;
}

@media (max-width: 800px) {
  .essay-body { font-size: 1.1rem; }
  .essay-body > p:first-of-type::first-letter { font-size: 3.5rem; }
  .media-assets-grid { grid-template-columns: repeat(2, 1fr); }
  .essay-cta { padding: 1.6rem 1.25rem; }
  .insight-card { padding: 1.6rem 0; }
}

/* ==========================================================================
   v19 — Hover-linked book covers + chapter-sample buttons
   ========================================================================== */

/* Home-page book cover linked to books.html#<slug>.
   Visual cue on hover: lift, gentle shadow, gold underline of the title link. */
.book-card .cover-link {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
}
.book-card .cover-link:hover,
.book-card .cover-link:focus-visible {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 14px 32px rgba(47, 58, 38, 0.22);
}
.book-card .cover-link img {
  transition: filter 0.25s ease;
}
.book-card .cover-link:hover img,
.book-card .cover-link:focus-visible img {
  filter: brightness(1.04);
}

/* Linked book title — same hover affordance as the cover */
.book-card .book-title-link {
  color: var(--brown);
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.book-card .book-title-link:hover,
.book-card .book-title-link:focus-visible {
  color: var(--terracotta-dark);
  border-bottom-color: var(--gold);
}

/* Two-button row inside book cards on the books page (Buy + Read sample).
   Stacks on narrow widths so neither button gets squeezed. */
.book-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: stretch;
  margin-top: 0.4rem;
}
.book-actions .btn {
  flex: 1 1 140px;
  text-align: center;
  white-space: nowrap;
  padding: 0.7rem 1rem;
  font-size: 0.95rem;
}
@media (max-width: 800px) {
  .book-actions { flex-direction: column; }
  .book-actions .btn { flex: 1 1 auto; width: 100%; }
}

/* --------- Comparison table (Books Like Divine Karma + Skeptics pages) --------- */
.comparison-table-wrap { overflow-x: auto; margin: 1.6rem 0 0.5rem; }
.comparison-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.94rem;
  background: var(--cream);
  border: 1px solid var(--sand);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.comparison-table caption {
  caption-side: bottom;
  text-align: center;
  font-style: italic;
  color: var(--brown-soft);
  font-size: 0.85rem;
  padding-top: 0.7rem;
}
.comparison-table thead th {
  background: var(--cream-dark);
  color: var(--brown);
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: left;
  padding: 0.85rem 0.95rem;
  border-bottom: 1px solid var(--sand);
}
.comparison-table tbody td {
  padding: 0.75rem 0.95rem;
  border-bottom: 1px solid rgba(212, 205, 182, 0.5);
  vertical-align: top;
  line-height: 1.55;
}
.comparison-table tbody tr:last-child td { border-bottom: none; }
.comparison-table tbody tr:nth-child(even) { background: rgba(244, 239, 226, 0.55); }
.comparison-table tbody td:first-child { font-weight: 600; color: var(--brown); }
.comparison-table tbody td em { color: var(--brown-soft); }
.comparison-table a { color: var(--terracotta-dark); text-decoration: underline; text-decoration-color: rgba(78,93,62,0.3); text-underline-offset: 2px; }
.comparison-table a:hover { text-decoration-color: var(--terracotta); }

@media (max-width: 640px) {
  .comparison-table { font-size: 0.86rem; }
  .comparison-table thead th, .comparison-table tbody td { padding: 0.6rem 0.65rem; }
}

/* --------- Footer Pages grouping (Read / Explore / About sub-sections) --------- */
.footer-pages-group { margin-bottom: 0.85rem; }
.footer-pages-group:last-child { margin-bottom: 0; }
.footer-pages-group h5 {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.85;
  margin: 0 0 0.3rem 0;
  padding-bottom: 0.15rem;
  border-bottom: 1px solid rgba(184, 160, 99, 0.18);
}
.footer-pages-group ul { margin: 0; padding: 0; list-style: none; }
.footer-pages-group ul li { margin: 0.18rem 0; }

/* --------- Accessibility: respect motion preferences --------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --------- Footer spiritual disclaimer + admin row --------- */
.footer-disclaimer {
  text-align: center;
  font-size: 0.78rem;
  color: rgba(244, 239, 226, 0.55);
  font-style: italic;
  padding: 0.6rem 1.5rem 0;
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.45;
}

/* --------- Per-book page hero grid --------- */
.book-hero-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2.5rem;
  align-items: start;
}
.book-hero-grid picture { display: block; max-width: 240px; }
.book-hero-grid picture img { display: block; width: 100%; height: auto; }

@media (max-width: 720px) {
  .book-hero-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
    justify-items: center;
  }
  .book-hero-grid picture { max-width: 220px; margin: 0 auto; }
  .book-hero-grid > div { text-align: left; }
}

/* --------- Footer redesign (v36): 4-column horizontal, buy row, compact bottom bar --------- */
.site-footer .footer-inner {
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(140px, 1fr));
  gap: 2rem 1.6rem;
  align-items: start;
}
.site-footer .footer-pages-group { margin-bottom: 0; }
.site-footer .footer-pages-group h5 {
  margin-top: 0;
  margin-bottom: 0.6rem;
}
.site-footer .footer-pages-group ul li { margin: 0.25rem 0; }

/* Compact buy row: a single line of Amazon book links above the disclaimer */
.footer-buy-row {
  max-width: var(--max-width);
  margin: 1.8rem auto 0;
  padding: 0.9rem 1.5rem 0;
  text-align: center;
  border-top: 1px solid rgba(247, 241, 230, 0.12);
  font-size: 0.82rem;
  color: rgba(244, 239, 226, 0.7);
  font-style: italic;
}
.footer-buy-row strong {
  font-style: normal;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  text-transform: uppercase;
  margin-right: 0.5rem;
}
.footer-buy-row a {
  color: rgba(244, 239, 226, 0.9);
  text-decoration: underline;
  text-decoration-color: rgba(184, 160, 99, 0.4);
  text-underline-offset: 2px;
  margin: 0 0.35rem;
}
.footer-buy-row a:hover {
  color: var(--gold);
  text-decoration-color: var(--gold);
}

/* Tighter bottom bar with inline meta-links */
.footer-bottom {
  margin-top: 1.2rem;
  padding-top: 1rem;
  font-size: 0.82rem;
}
.footer-bottom a { color: inherit; opacity: 0.75; }
.footer-bottom a:hover { color: var(--gold); opacity: 1; }
.footer-bottom .footer-meta-sep {
  margin: 0 0.45rem;
  opacity: 0.5;
}

/* Mobile: collapse 4-col grid to 2-col then stack */
@media (max-width: 820px) {
  .site-footer .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 540px) {
  .site-footer .footer-inner {
    grid-template-columns: 1fr;
  }
  .footer-buy-row { font-size: 0.78rem; }
  .footer-buy-row a { display: inline-block; margin: 0.15rem 0.35rem; }
}

/* --------- Inkling: "coming soon" disabled store badge variant --------- */
.store-badge.store-badge-coming {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
  filter: grayscale(0.4);
  position: relative;
}
.store-badge.store-badge-coming::after {
  content: "soon";
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.12);
  padding: 1px 5px;
  border-radius: 3px;
}
