/* ==========================================================
   Red Letter Relationships — landing page
   Mobile-first. Palette + type per docs/red-letter-relationships-brand-guide.md
   ========================================================== */

:root {
  --rlr-red: #C30000;
  --rlr-red-dark: #9E0000;
  --rlr-ink: #2B2929;
  --rlr-ink-soft: #5A5555;
  --rlr-cream: #FAFAF8;
  --rlr-paper: #F4F2EE;
  --rlr-gem-line: #D9D0C7;

  --font-display: "Oswald", "Arial Narrow", Impact, sans-serif;
  --font-label: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --font-read: "Source Serif 4", Georgia, "Times New Roman", serif;

  /* Bootstrap overrides */
  --bs-body-bg: var(--rlr-cream);
  --bs-body-color: var(--rlr-ink);
  --bs-body-font-family: var(--font-read);
  --bs-body-font-size: 1.0625rem;
  --bs-body-line-height: 1.65;
  --bs-link-color: var(--rlr-red);
  --bs-link-color-rgb: 195, 0, 0;
  --bs-link-hover-color: var(--rlr-red-dark);
  --bs-link-hover-color-rgb: 158, 0, 0;
  --bs-border-color: var(--rlr-gem-line);
  --bs-focus-ring-color: rgba(195, 0, 0, .3);
  color-scheme: light;
}

html { scroll-padding-top: 76px; }
body {
  background: var(--rlr-cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.red { color: var(--rlr-red); }
.ink { color: var(--rlr-ink); }

.skip-link {
  position: absolute; left: 1rem; top: .5rem; z-index: 2000;
  background: var(--rlr-ink); color: #fff; padding: .5rem 1rem;
}

/* ---------- Type ---------- */
.display-head {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -.005em;
  line-height: 1.02;
  color: var(--rlr-ink);
}
.eyebrow {
  font-family: var(--font-label);
  font-weight: 600;
  font-size: .75rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--rlr-red);
  margin-bottom: .75rem;
}
.section-title { font-size: clamp(2rem, 7vw, 3.25rem); margin-bottom: 1.25rem; }
.subhead {
  font-family: var(--font-label);
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.lead-serif { font-size: 1.15rem; line-height: 1.7; color: var(--rlr-ink-soft); }
.lead-serif strong { color: var(--rlr-ink); }
.prose p { margin-bottom: 1.1rem; }
.prose strong { font-weight: 600; }

/* ---------- Buttons ---------- */
.btn-rlr,
.btn-rlr-inverse {
  --bs-btn-font-family: var(--font-label);
  --bs-btn-font-weight: 700;
  --bs-btn-padding-x: 1.4rem;
  --bs-btn-padding-y: .75rem;
  --bs-btn-border-radius: 3px;
  --bs-btn-focus-shadow-rgb: 195, 0, 0;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .85rem;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn-rlr {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--rlr-red);
  --bs-btn-border-color: var(--rlr-red);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--rlr-red-dark);
  --bs-btn-hover-border-color: var(--rlr-red-dark);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--rlr-red-dark);
  --bs-btn-active-border-color: var(--rlr-red-dark);
  --bs-btn-disabled-bg: var(--rlr-red);
  --bs-btn-disabled-border-color: var(--rlr-red);
  box-shadow: 0 6px 18px -8px rgba(195, 0, 0, .65);
}
.btn-rlr:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -10px rgba(195, 0, 0, .8); }
.btn-rlr.btn-lg { font-size: .95rem; --bs-btn-padding-y: 1rem; --bs-btn-padding-x: 1.75rem; }
.btn-rlr-sm { --bs-btn-padding-x: .8rem; --bs-btn-padding-y: .5rem; font-size: .7rem; letter-spacing: .1em; box-shadow: none; white-space: nowrap; }
.btn-rlr-inverse {
  --bs-btn-color: var(--rlr-red);
  --bs-btn-bg: #fff;
  --bs-btn-border-color: #fff;
  --bs-btn-hover-color: var(--rlr-red-dark);
  --bs-btn-hover-bg: var(--rlr-cream);
  --bs-btn-hover-border-color: var(--rlr-cream);
  --bs-btn-active-color: var(--rlr-red-dark);
  --bs-btn-active-bg: var(--rlr-cream);
}
.btn-rlr-inverse.btn-lg { font-size: .95rem; --bs-btn-padding-y: 1rem; --bs-btn-padding-x: 1.75rem; }
.link-quiet {
  font-family: var(--font-label);
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--rlr-ink);
  text-decoration: none;
  border-bottom: 2px solid var(--rlr-gem-line);
  padding-bottom: 2px;
}
.link-quiet:hover { color: var(--rlr-red); border-color: var(--rlr-red); }

/* ---------- Nav ---------- */
.rlr-nav {
  background: rgba(250, 250, 248, .94);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
  --bs-navbar-padding-y: .6rem;
  --bs-navbar-toggler-border-color: transparent;
  --bs-navbar-toggler-focus-width: .15rem;
  --bs-navbar-toggler-padding-x: .4rem;
}
.rlr-nav.is-scrolled { border-color: var(--rlr-gem-line); box-shadow: 0 4px 18px -14px rgba(43, 41, 41, .5); }
.rlr-brand {
  display: inline-flex; align-items: center; gap: .55rem;
  text-decoration: none; margin-right: .5rem;
}
.rlr-brand img { flex-shrink: 0; }
.rlr-brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--rlr-ink);
  font-size: .82rem;
  line-height: 1;
  display: flex; flex-direction: column; gap: 1px;
  letter-spacing: .02em;
}
.rlr-brand-text .red { color: var(--rlr-red); }
.rlr-nav .nav-link {
  font-family: var(--font-label);
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--rlr-ink);
  padding: .75rem 0;
}
.rlr-nav .nav-link:hover, .rlr-nav .nav-link:focus { color: var(--rlr-red); }
.navbar-collapse { order: 3; }

/* ---------- Gem background (hero / devotional) ---------- */
.gem-bg { position: relative; isolation: isolate; overflow: hidden; }
.gem-bg::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background:
    url("../img/gem-tile.svg") center top / 380px auto repeat,
    url("../img/paper.webp") center / 900px auto repeat,
    var(--rlr-cream);
  background-blend-mode: multiply, multiply, normal;
  -webkit-mask-image: radial-gradient(ellipse 120% 90% at 50% 40%, rgba(0,0,0,.28) 0%, rgba(0,0,0,.55) 55%, #000 100%);
          mask-image: radial-gradient(ellipse 120% 90% at 50% 40%, rgba(0,0,0,.28) 0%, rgba(0,0,0,.55) 55%, #000 100%);
}
.gem-bg-soft::before { opacity: .7; }
/* Paper texture only, no gem pattern (hero) — keeps the cover's own gems from competing */
.paper-only::before {
  background: url("../img/paper.webp") center / 900px auto repeat, var(--rlr-cream);
  background-blend-mode: multiply, normal;
  -webkit-mask-image: none;
          mask-image: none;
  opacity: .55;
}

/* ---------- Hero ---------- */
.rlr-hero { padding: 1.5rem 0 3.5rem; border-bottom: 1px solid var(--rlr-gem-line); }
.hero-title { font-size: clamp(2.5rem, 10.5vw, 4.75rem); margin-bottom: 1rem; }
.hero-lead { font-size: 1.08rem; line-height: 1.65; color: var(--rlr-ink-soft); max-width: 36rem; margin: 0 auto 1.75rem; }
.hero-lead em { color: var(--rlr-ink); }
.hero-actions { display: flex; flex-direction: column; align-items: center; gap: 1.1rem; }
.hero-actions .btn { width: 100%; max-width: 22rem; }
.hero-micro {
  margin: 1rem 0 0;
  font-family: var(--font-label); font-size: .72rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--rlr-ink-soft);
}

/* ---------- Book (CSS 3D) ---------- */
.book-link { display: block; text-decoration: none; }
.book {
  position: relative;
  width: 132px;
  margin: 0 auto;
  perspective: 1400px;
}
.book-cover {
  position: relative;
  aspect-ratio: 1 / 1.6;           /* KDP 6x9-ish trim */
  border-radius: 2px 5px 5px 2px;
  overflow: hidden;
  transform: rotateY(-14deg);
  transform-origin: left center;
  box-shadow:
    inset 4px 0 6px -3px rgba(0,0,0,.25),
    18px 22px 40px -14px rgba(43, 41, 41, .55),
    4px 4px 10px -4px rgba(43, 41, 41, .35);
  transition: transform .4s ease;
  background: #fff;
  container-type: inline-size;   /* cover text scales with the book */
}
.book-link:hover .book-cover { transform: rotateY(-6deg); }
.book-cover::after {   /* spine crease + sheen */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(0,0,0,.16) 0, rgba(255,255,255,.35) 2.5%, rgba(0,0,0,0) 6%, rgba(255,255,255,.08) 60%, rgba(0,0,0,.05) 100%);
}
.cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Sections ---------- */
.section { padding: 4rem 0; }
.section-paper { background: var(--rlr-paper); border-top: 1px solid var(--rlr-gem-line); border-bottom: 1px solid var(--rlr-gem-line); }
.gem { width: 2.5rem; height: 2.5rem; color: var(--rlr-gem-line); display: block; }
.gem-lg { width: 4rem; height: 4rem; }
.gem-red { color: var(--rlr-red); }

/* Ache */
.disguise {
  height: 100%;
  background: #fff;
  border: 1px solid var(--rlr-gem-line);
  border-top: 3px solid var(--rlr-red);
  padding: 1.4rem 1.25rem 1.25rem;
}
.disguise { display: flex; gap: 1rem; align-items: center; padding: 1rem 1.1rem; }
.disguise .gem { color: #bfb2a4; width: 2.1rem; height: 2.1rem; flex-shrink: 0; }
.disguise p { margin: 0; font-size: 1.05rem; line-height: 1.5; }

/* Big idea */
.scripture {
  margin: 0;
  background: #fff;
  border: 1px solid var(--rlr-gem-line);
  padding: 2rem 1.5rem 1.75rem;
  text-align: center;
  position: relative;
}
.scripture .gem { margin: 0 auto 1rem; color: #c9bcae; }
.scripture blockquote { margin: 0 0 1rem; }
.scripture blockquote p {
  font-family: var(--font-read); font-style: italic;
  font-size: clamp(1.25rem, 4.6vw, 1.6rem); line-height: 1.45; margin: 0;
}
.scripture figcaption {
  font-family: var(--font-label); font-weight: 700; font-size: .75rem;
  letter-spacing: .18em; text-transform: uppercase; color: var(--rlr-red);
}
.scripture figcaption span { color: var(--rlr-ink-soft); font-weight: 500; margin-left: .35rem; }
.scripture-note {
  margin: 1.1rem 0 0; text-align: center;
  font-family: var(--font-label); font-weight: 600; font-size: .78rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--rlr-ink-soft); line-height: 1.8;
}

/* Journey */
.stages { padding: 0; }
.stage {
  position: relative; height: 100%;
  padding: 1.5rem 1.25rem 1.25rem;
  border-left: 3px solid var(--rlr-red);
  background: #fff;
  box-shadow: 0 1px 0 var(--rlr-gem-line);
}
.stage-num {
  font-family: var(--font-display); font-weight: 700; font-size: 2.6rem; line-height: 1;
  color: var(--rlr-gem-line); display: block; margin-bottom: .5rem;
}
.stage h3 {
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  font-size: 1.35rem; line-height: 1.1; margin-bottom: .6rem;
}
.stage p { margin: 0; font-size: 1rem; line-height: 1.55; color: var(--rlr-ink-soft); }

.chapters { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--rlr-gem-line); }
.chapters li {
  display: flex; gap: 1rem; align-items: baseline;
  padding: 1rem 0; border-bottom: 1px solid var(--rlr-gem-line);
}
.ch-n {
  flex: 0 0 2.25rem;
  font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; color: var(--rlr-red); line-height: 1;
}
.chapters h4 {
  font-family: var(--font-label); font-weight: 700; font-size: .85rem;
  letter-spacing: .1em; text-transform: uppercase; margin: 0 0 .25rem;
}
.chapters p { margin: 0; color: var(--rlr-ink-soft); font-size: 1rem; line-height: 1.5; }
.appendix-note {
  display: flex; gap: 1rem; align-items: flex-start;
  margin-top: 1.75rem; padding: 1.25rem; background: var(--rlr-paper);
  border: 1px dashed #c9bcae;
}
.appendix-note .gem { flex-shrink: 0; color: var(--rlr-red); width: 2rem; height: 2rem; }
.appendix-note p { margin: 0; font-size: 1rem; }

/* Story pull */
.section-ink { background: var(--rlr-ink); color: #EDEAE6; }
.story-setup { font-size: 1.1rem; color: #CFC9C3; max-width: 40rem; margin: 0 auto 1.75rem; }
.pull-quote {
  font-family: var(--font-display); font-weight: 500; text-transform: uppercase;
  font-size: clamp(1.75rem, 6.5vw, 3rem); line-height: 1.12; color: #fff;
  margin: 0 auto 1.25rem; max-width: 50rem;
}
.pull-source {
  font-family: var(--font-label); font-weight: 600; font-size: .72rem;
  letter-spacing: .16em; text-transform: uppercase; color: #ff6b6b; margin: 0;
}
.pull-source em { font-style: normal; color: #CFC9C3; }

/* Praise */
.endorsement {
  height: 100%; margin: 0;
  background: #fff; border: 1px solid var(--rlr-gem-line);
  padding: 1.75rem 1.5rem 1.5rem; position: relative;
}
.endorsement blockquote { margin: 0 0 1.25rem; }
.endorsement blockquote p { font-size: 1.08rem; line-height: 1.65; margin: 0; }
.endorsement figcaption { font-family: var(--font-label); font-size: .78rem; color: var(--rlr-ink-soft); line-height: 1.5; }
.endorsement figcaption strong {
  display: block; color: var(--rlr-ink); font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; font-size: .8rem; margin-bottom: .15rem;
}

/* CTA band */
.cta-band { background: var(--rlr-red); color: #fff; padding: 3.5rem 0; }
.cta-band .display-head { color: #fff; font-size: clamp(2.2rem, 9vw, 3.75rem); margin-bottom: .9rem; }
.cta-band .display-head .light { color: rgba(255,255,255,.72); }
.cta-band p { font-size: 1.12rem; max-width: 34rem; margin: 0 auto 1.75rem; color: rgba(255,255,255,.92); }

/* Devotional */
.fruit-list {
  font-family: var(--font-label); font-weight: 700; text-transform: uppercase;
  font-size: clamp(.62rem, 3.2vw, .78rem); letter-spacing: .08em; line-height: 2.1;
  color: var(--rlr-red); text-align: center;
  margin: 0 auto 1.25rem;
}
.fruit-row { display: block; white-space: nowrap; }
.fruit-list .sep { color: rgba(195, 0, 0, .5); margin: 0 .3em; font-size: 1.3em; line-height: 0; vertical-align: .02em; }
.signup-card {
  background: #fff; border: 1px solid var(--rlr-gem-line); border-top: 4px solid var(--rlr-red);
  padding: 1.5rem 1.25rem; box-shadow: 0 18px 40px -28px rgba(43,41,41,.6);
}
.signup-card h3 { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: 1.6rem; margin-bottom: .25rem; }
.signup-intro { color: var(--rlr-ink-soft); margin-bottom: 1rem; }
.signup-card .form-control {
  font-family: var(--font-label); font-size: 1rem; border-radius: 3px; border-color: #cfc5ba; background: var(--rlr-cream);
}
.signup-card .form-control:focus { border-color: var(--rlr-red); box-shadow: 0 0 0 .2rem rgba(195,0,0,.15); background: #fff; }
.signup-card .invalid-feedback { font-family: var(--font-label); font-size: .78rem; }
.signup-fine { font-family: var(--font-label); font-size: .72rem; line-height: 1.6; color: var(--rlr-ink-soft); margin: .9rem 0 0; }
.signup-success { text-align: center; padding: .5rem 0; }
.signup-success .gem { margin: 0 auto 1rem; width: 3rem; height: 3rem; }
.signup-success p { color: var(--rlr-ink-soft); }
.signup-success:focus { outline: none; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-alert { font-family: var(--font-label); font-size: .85rem; border-radius: 3px; }

/* Author */
.author { display: flex; flex-direction: column; gap: 1.5rem; }
.author-mark {
  width: 5.5rem; height: 5.5rem; flex-shrink: 0;
  border: 1px solid var(--rlr-gem-line); background: #fff;
  display: grid; place-items: center;
}
.author-mark img { width: 55%; }

/* Footer */
.rlr-footer { background: var(--rlr-paper); border-top: 1px solid var(--rlr-gem-line); padding: 2.5rem 0 2rem; }
.rlr-footer .rlr-brand-text { flex-direction: row; gap: .3rem; font-size: .95rem; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.4rem; }
.footer-links a {
  font-family: var(--font-label); font-weight: 600; font-size: .72rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--rlr-ink); text-decoration: none;
}
.footer-links a:hover { color: var(--rlr-red); }
.footer-legal { margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--rlr-gem-line); text-align: center; }
.footer-legal p { font-family: var(--font-label); font-size: .68rem; line-height: 1.6; color: var(--rlr-ink-soft); margin-bottom: .4rem; }

/* Focus visibility */
a:focus-visible, button:focus-visible { outline: 3px solid rgba(195,0,0,.45); outline-offset: 3px; }

/* ==========================================================
   ≥ 576px
   ========================================================== */
@media (min-width: 576px) {
  .book { width: 200px; }
  .hero-actions { flex-direction: row; justify-content: center; gap: 1.5rem; }
  .hero-actions .btn { width: auto; }
  .signup-card { padding: 2rem; }
}

/* ==========================================================
   ≥ 768px
   ========================================================== */
@media (min-width: 768px) {
  .section { padding: 5.5rem 0; }
  .author { flex-direction: row; gap: 2.25rem; }
  .fruit-list { font-size: .9rem; letter-spacing: .16em; }
  .disguise { display: block; padding: 1.4rem 1.25rem 1.25rem; }
  .disguise .gem { margin-bottom: .9rem; }
}

/* ==========================================================
   ≥ 992px
   ========================================================== */
@media (min-width: 992px) {
  .rlr-brand-text { flex-direction: row; gap: .3rem; font-size: 1.05rem; }
  .rlr-nav .nav-link { padding: .5rem .9rem !important; }
  .navbar-collapse { order: 0; }
  .btn-rlr-sm { --bs-btn-padding-x: 1.1rem; --bs-btn-padding-y: .6rem; font-size: .75rem; }

  .rlr-hero { padding: 5rem 0 6rem; }
  .hero-lead { margin-left: 0; }
  .hero-actions { justify-content: flex-start; }
  .book { width: 300px; }


  .cta-band { padding: 4.5rem 0; }
  .chapters { display: grid; grid-template-rows: repeat(5, auto); grid-auto-flow: column; column-gap: 3rem; }
  .scripture { padding: 3rem 2.5rem 2.5rem; }
}

@media (min-width: 1200px) {
  .book { width: 330px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
  .book-cover { transform: none; }
}
