/* Glints & Glimmers — extends the confirmed Pinterest system:
   warm cream ground, aged gold frame, italic serif display type. */

:root {
  --ground: #EFE7D8;
  --ground-raised: #F6F0E4;
  --ink: #3B2F22;
  --ink-soft: #5B4C3A;
  --gold: #B08D57;
  --gold-line: #C9AD7C;
  --rule: rgba(176, 141, 87, 0.35);
  --focus: #8A5A2A;
  --honest-bg: #E8DCC0;
  --serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --body-font: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --max: 42rem;
  --max-wide: 56rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #211A12;
    --ground-raised: #2A2118;
    --ink: #EDE3D0;
    --ink-soft: #C9BBA1;
    --gold: #C9A467;
    --gold-line: #A98650;
    --rule: rgba(201, 164, 103, 0.4);
    --focus: #E0B978;
    --honest-bg: #33281A;
  }
}

* { box-sizing: border-box; }

html {
  background: var(--ground);
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body-font);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; }

a {
  color: var(--ink);
  text-decoration-color: var(--gold-line);
  text-underline-offset: 3px;
}
a:hover { color: var(--gold); }

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ground-raised);
  color: var(--ink);
  padding: 0.75rem 1rem;
  border: 1px solid var(--gold-line);
  z-index: 100;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.site-frame {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

.site-header {
  border-bottom: 1px solid var(--rule);
  padding: 1.5rem 1.25rem;
}

.site-header-inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.brand {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.brand:hover { color: var(--gold); }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.site-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--gold-line);
}

/* ---------- Main / generic containers ---------- */

main { flex: 1; }

.wrap {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.wrap-wide {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin: 0 0 0.9rem;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.15;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.1rem); margin: 0 0 0.6rem; }
h2 { font-size: clamp(1.5rem, 3.6vw, 2rem); margin: 2.4rem 0 1rem; }
h3 { font-size: 1.15rem; margin: 1.6rem 0 0.6rem; }

.subtitle {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--ink-soft);
  margin: 0 0 1.5rem;
}

.promise {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.35rem;
  line-height: 1.5;
  color: var(--ink);
  margin: 0 0 2rem;
  max-width: 38rem;
}

p { margin: 0 0 1.15rem; }

.lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 40rem;
}

hr.rule {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 2.5rem 0;
}

.gold-dashes {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin: 1.75rem 0;
}
.gold-dashes span {
  display: block;
  width: 1.6rem;
  height: 1px;
  background: var(--gold-line);
}

/* ---------- Home page hero ---------- */

.hero {
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--rule);
}

.hero .tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.9rem, 5vw, 2.8rem);
  max-width: 34rem;
  margin: 0 0 1.25rem;
}

.hero-lede {
  max-width: 36rem;
  color: var(--ink-soft);
  font-size: 1.1rem;
}

.home-section {
  padding: 3rem 0;
}

/* ---------- Book cards / typographic "cover" ---------- */

.book-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}

.book-card {
  display: block;
  border: 1px solid var(--gold-line);
  background: var(--ground-raised);
  padding: 1.75rem 1.5rem;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.book-card:hover {
  border-color: var(--gold);
  color: var(--ink);
}

.book-card-title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: 1.5rem;
  margin: 0 0 0.35rem;
}

.book-card-subtitle {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin: 0 0 0.75rem;
}

.book-card-promise {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin: 0;
}

.book-card-meta {
  margin-top: 0.9rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
}

/* Typographic "cover" used on the book page in place of a missing image */
.cover-plate {
  border: 1px solid var(--gold-line);
  background: var(--ground-raised);
  padding: 2.5rem 1.75rem;
  text-align: center;
  margin: 0 0 2.25rem;
  position: relative;
}
.cover-plate::before,
.cover-plate::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid var(--rule);
  pointer-events: none;
}
.cover-plate-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1.1rem;
}
.cover-plate-title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  line-height: 1.15;
  margin: 0;
}
.cover-plate-subtitle {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ink-soft);
  margin: 0.9rem 0 0;
}

/* ---------- Structure / stats ---------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  margin: 1.5rem 0;
}

.stat {
  background: var(--ground);
  padding: 1.1rem 1rem;
}

.stat-value {
  font-family: var(--serif);
  font-size: 1.9rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1;
}

.stat-label {
  margin-top: 0.4rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.signature-line {
  font-style: italic;
  color: var(--ink-soft);
  border-left: 2px solid var(--gold-line);
  padding-left: 1rem;
  margin: 1.5rem 0 0;
}

/* ---------- Honest section — the feature ---------- */

.honest {
  background: var(--honest-bg);
  border: 1px solid var(--gold-line);
  border-left-width: 6px;
  padding: 2.25rem 1.75rem;
  margin: 2.75rem 0;
}

.honest-label {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin: 0 0 0.75rem;
}

.honest h2 {
  margin-top: 0;
  font-size: clamp(1.35rem, 3.4vw, 1.7rem);
}

.honest p {
  font-size: 1.08rem;
  color: var(--ink);
}

/* ---------- For you / not for you ---------- */

.audience-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
  margin: 1.5rem 0 2.5rem;
}

@media (min-width: 42rem) {
  .audience-grid { grid-template-columns: 1fr 1fr; }
}

.audience-col h3 {
  margin-top: 0;
}

.audience-col ul {
  margin: 0;
  padding-left: 1.2rem;
}

.audience-col li {
  margin-bottom: 0.65rem;
}

.audience-col.no {
  border-left: 2px solid var(--rule);
  padding-left: 1.25rem;
}
@media (min-width: 42rem) {
  .audience-col.no { padding-left: 1.75rem; }
}

/* ---------- Excerpt ---------- */

.excerpt {
  margin: 2.5rem 0;
  padding: 2rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.excerpt-text {
  font-family: var(--serif);
  font-size: 1.3rem;
  line-height: 1.65;
  color: var(--ink);
}

.excerpt-source {
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---------- CTA / newsletter ---------- */

.cta {
  background: var(--ground-raised);
  border: 1px solid var(--gold-line);
  padding: 2rem 1.5rem;
  margin: 2.5rem 0;
}

.cta h2, .cta h3 {
  margin-top: 0;
}

.cta-note {
  color: var(--ink-soft);
  font-size: 0.95rem;
  max-width: 34rem;
}

.newsletter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
  max-width: 30rem;
}

.newsletter-form input[type="email"] {
  flex: 1 1 12rem;
  min-width: 0;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--gold-line);
  background: var(--ground);
  color: var(--ink);
  font-size: 1rem;
  font-family: var(--body-font);
}

.newsletter-form input[type="email"]::placeholder {
  color: var(--ink-soft);
  opacity: 0.8;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.4rem;
  background: var(--ink);
  color: var(--ground);
  border: 1px solid var(--ink);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  font-family: var(--body-font);
}
.btn:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ground);
}

@media (prefers-color-scheme: dark) {
  .btn { color: var(--ground); }
}

.form-note {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-top: 0.6rem;
}

.placeholder-badge {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 1px dashed var(--gold-line);
  padding: 0.15rem 0.5rem;
  margin-bottom: 0.75rem;
}

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

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 2.5rem 1.25rem;
  margin-top: 3rem;
}

.site-footer-inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.site-footer a {
  color: var(--ink-soft);
}
.site-footer a:hover { color: var(--gold); }

/* ---------- About page lists ---------- */

.method-list {
  padding-left: 1.2rem;
}
.method-list li { margin-bottom: 0.85rem; }

/* ---------- 404 ---------- */

.error-page {
  padding: 5rem 0;
  text-align: center;
}
.error-page h1 { font-size: clamp(3rem, 10vw, 5rem); }

/* ---------- Utility ---------- */

.scroll-x {
  overflow-x: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.books-index-count {
  color: var(--ink-soft);
  margin-bottom: 2.25rem;
}


/* ---------- Alignment correction ----------
   Header, footer and content now share one gutter (--max-wide). Prose keeps a
   readable measure but aligns to that gutter's left edge instead of re-centering
   inside it, so every element on the page shares a single vertical line. */
.wrap > *,
.prose,
.honest,
.excerpt,
.cover-plate,
.cta-box { margin-left: 0; margin-right: 0; }

.prose p,
.prose li,
.lede,
.promise,
.hero .tagline,
.hero-lede { max-width: 34rem; }

.honest, .cta-box, .excerpt, .cover-plate { max-width: 44rem; }

/* ---------- Vertical rhythm ----------
   Section gaps were roughly double what the type size warrants; tightened so the
   page reads as one document rather than a stack of separated cards. */
.book-section { padding: 2.25rem 0; }
.home-section { padding: 2.25rem 0; }
.hero { padding: 3rem 0 2.25rem; }


/* ---------- Home: compact title list ----------
   The home page listed all 14 books with subtitle, promise and word count, which
   made it a duplicate of /books/. It now lists titles only and sends the reader
   to the index for detail. */
.book-index-compact { list-style: none; padding: 0; margin: 1.75rem 0 0; max-width: 44rem; }
.book-index-compact li { border-bottom: 1px solid var(--rule); }
.book-index-compact li:first-child { border-top: 1px solid var(--rule); }
.book-index-compact a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1.5rem;
  padding: 0.85rem 0.25rem; text-decoration: none; color: inherit;
}
.book-index-compact a:hover,
.book-index-compact a:focus-visible { background: var(--gold-wash, rgba(176,141,87,.10)); }
.bic-title { font-family: var(--serif); font-style: italic; font-size: 1.15rem; }
.bic-words { font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); white-space: nowrap; }
@media (max-width: 30rem) { .bic-words { display: none; } }

/* ---------- Devotion Audit landing page (/audit/) ---------- */
.audit-table { width: 100%; border-collapse: collapse; margin: 1.25rem 0; font-size: 0.95rem; }
.audit-table th, .audit-table td { border-bottom: 1px solid var(--rule); padding: 0.6rem 0.75rem; text-align: left; vertical-align: top; }
.audit-table th[scope="row"] { font-weight: 600; white-space: nowrap; }
.audit-grid th[scope="col"] { font-family: var(--serif); font-size: 1.05rem; }
.audit-grid td { text-align: center; }
.audit-grid th[scope="row"] { white-space: normal; }
