/* Self-hosted display face so the brand renders identically on every OS.
   Source Serif 4 (c) Adobe, SIL Open Font License 1.1 - see fonts/LICENSE-source-serif-4.txt */
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/source-serif-4-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/source-serif-4-latin-600-normal.woff2") format("woff2");
}

:root {
  --bg: #f5efe6;
  --bg-top: #fbf8f2;
  --surface: #fffdf8;
  --surface-soft: #f8f1e7;
  --surface-warm: #f1e6d7;
  --text: #1f1b16;
  --text-soft: #5c544a;
  --accent: #6b5235;
  --accent-deep: #3f2f1d;
  --line: rgba(76, 58, 34, 0.16);
  --line-strong: rgba(76, 58, 34, 0.28);
  --shadow-soft: 0 18px 40px rgba(35, 25, 15, 0.06);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --max-width: 1120px;
  --content-width: 960px;
  --measure: 68ch;
  --measure-tight: 54ch;
  --font-display: "Source Serif 4", "Iowan Old Style", "Palatino Linotype",
    "Book Antiqua", Baskerville, Georgia, serif;
  /* Sticky header is taller on small screens, where the brand lockup wraps. */
  --header-clearance: 11.75rem;
  --font-body: Optima, Candara, "Noto Sans", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: auto;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(173, 144, 100, 0.12), transparent 28%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg) 100%);
  font-family: var(--font-body);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
}

p,
li {
  font-size: 1rem;
}

h1,
h2,
h3,
p,
blockquote,
ol,
ul {
  margin-top: 0;
}

.site-shell {
  width: min(var(--max-width), calc(100% - 1.25rem));
  margin: 0 auto;
  padding-bottom: 4rem;
}

.site-header {
  position: sticky;
  top: 0.75rem;
  z-index: 100;
  isolation: isolate;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  /* Fully opaque: a translucent header let large headings ghost through it. */
  background: #fbf8f2;
  box-shadow: 0 10px 30px rgba(37, 28, 17, 0.06);
}

/* Keep in-page anchor targets clear of the sticky header. */
[id] {
  scroll-margin-top: var(--header-clearance);
}

.brand-lockup {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.brand {
  color: var(--accent-deep);
  font-family: var(--font-display);
  font-size: clamp(1.28rem, 2vw, 1.55rem);
  letter-spacing: 0.02em;
  text-decoration: none;
}

.brand:hover,
.brand:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.brand-subtitle {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.72rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--accent-deep);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.site-nav {
  display: none;
  width: 100%;
  flex-direction: column;
  gap: 0.4rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
}

.site-nav.is-open {
  display: flex;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.4rem;
  min-height: 2.75rem;
  padding: 0.8rem 0.95rem;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--text-soft);
  font-family: inherit;
  font-size: 0.97rem;
  line-height: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.nav-link:hover,
.nav-link:focus-visible {
  background: rgba(107, 82, 53, 0.08);
  color: var(--accent-deep);
}

.nav-link[aria-current="page"],
.nav-link.is-active-section {
  background: var(--accent-deep);
  color: #fbf7f0;
}

.nav-caret {
  width: 0.42rem;
  height: 0.42rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-0.12em) rotate(45deg);
  transition: transform 0.15s ease;
}

.nav-group[open] > .nav-journey .nav-caret {
  transform: translateY(0.06em) rotate(-135deg);
}

/* Native <details> disclosure, so the journey list still opens with no JS. */
.nav-group {
  display: flex;
  flex-direction: column;
}

.nav-journey {
  list-style: none;
}

.nav-journey::-webkit-details-marker {
  display: none;
}

.nav-journey::marker {
  content: "";
}

.journey-menu {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  margin: 0.25rem 0 0.35rem 0.7rem;
  padding-left: 0.65rem;
  border-left: 1px solid var(--line);
}

.journey-menu a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 2.75rem;
  padding: 0.55rem 0.7rem;
  border-radius: 12px;
  color: var(--text-soft);
  font-size: 0.94rem;
  text-decoration: none;
}

.journey-menu a:hover,
.journey-menu a:focus-visible {
  background: rgba(107, 82, 53, 0.08);
  color: var(--accent-deep);
}

.journey-menu a[aria-current="page"] {
  color: var(--accent-deep);
  font-weight: 600;
}

.journey-menu-step {
  flex-shrink: 0;
  min-width: 1.6rem;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.journey-menu a[aria-current="page"] .journey-menu-step {
  color: var(--accent-deep);
}

.journey-menu-continues {
  margin-top: 0.35rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--line);
}

/* One focus ring for everything focusable. The previous value,
   rgba(107, 82, 53, 0.35), measured 1.73:1 against the page and failed
   WCAG 1.4.11 (3:1 for non-text). Solid --accent measures 6.87:1. */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* On the dark decision panel the ring must contrast with the panel instead. */
.next-step-section.is-decision a:focus-visible {
  outline-color: #fdfaf4;
}

main {
  padding-top: 1.25rem;
}

.hero,
.page-hero {
  padding: 3rem 0 2.75rem;
  border-bottom: 1px solid var(--line);
}

.hero-kicker,
.hero-layout,
.section-header,
.content-grid,
.scripture-grid,
.reflection-box,
.misunderstanding-box,
.next-step-section,
.journey-cards,
.footer {
  width: min(100%, var(--content-width));
  margin-left: auto;
  margin-right: auto;
}

.hero-kicker {
  margin-bottom: 1rem;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.35rem;
  align-items: start;
}

.page-hero h1 {
  margin-bottom: 0;
  max-width: 11ch;
  color: var(--accent-deep);
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 9vw, 5.4rem);
  line-height: 0.97;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.hero-summary {
  max-width: 40rem;
  margin-top: 1.35rem;
  color: rgba(31, 27, 22, 0.9);
  font-size: clamp(1.08rem, 2.4vw, 1.28rem);
  line-height: 1.65;
}

.hero-aside {
  display: grid;
  gap: 1rem;
}

.hero-card,
.hero-note {
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.hero-card-label,
.hero-note-label,
.section-kicker {
  margin-bottom: 0.7rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-card blockquote {
  margin-bottom: 0;
  color: var(--accent-deep);
  font-family: var(--font-display);
  font-size: clamp(1.24rem, 2.3vw, 1.68rem);
  line-height: 1.42;
  letter-spacing: -0.01em;
}

.hero-card cite,
.scripture-reference {
  display: block;
  margin-top: 1rem;
  color: var(--text-soft);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-note p {
  margin-bottom: 0;
  color: var(--text-soft);
}

.content-section {
  padding: 2.9rem 0;
  border-bottom: 1px solid rgba(76, 58, 34, 0.1);
}

.content-section:last-child {
  border-bottom: 0;
}

.section-header {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
  align-items: start;
  margin-bottom: 1.55rem;
}

.section-header > :last-child {
  max-width: 46rem;
}

.section-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  color: var(--accent-deep);
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1;
}

.section-header h2 {
  margin-bottom: 0;
  max-width: 23ch;
  color: var(--accent-deep);
  font-family: var(--font-display);
  font-size: clamp(1.95rem, 4.5vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.lede {
  max-width: var(--measure-tight);
  margin-top: 0.65rem;
  color: var(--text-soft);
  font-size: 1.05rem;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.15rem;
  align-items: start;
}

.content-grid > * {
  margin-bottom: 0;
}

.content-grid p,
.reflection-box p,
.misunderstanding-box p,
.next-step-section p {
  max-width: var(--measure);
}

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

.scripture-block {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 100%;
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #fffdf9 0%, #f6efe5 100%);
  box-shadow: var(--shadow-soft);
}

.scripture-block::before {
  content: "Scripture";
  align-self: flex-start;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(107, 82, 53, 0.18);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.scripture-block p {
  margin-bottom: 0;
}

.scripture-text {
  color: var(--accent-deep);
  font-family: var(--font-display);
  font-size: clamp(1.18rem, 2.3vw, 1.45rem);
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.scripture-note {
  max-width: var(--measure-tight);
  color: var(--text-soft);
  font-size: 0.98rem;
}

.reflection-box,
.misunderstanding-box {
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.reflection-box {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #fffdf9 0%, #f8f2e8 100%);
}

.misunderstanding-box {
  border: 1px solid rgba(107, 82, 53, 0.2);
  background: linear-gradient(180deg, #f5eadc 0%, #fbf7f1 100%);
}

.reflection-box h3,
.misunderstanding-box h3,
.journey-card h3,
.next-step-section h2,
.note-panel h3 {
  margin-bottom: 0.85rem;
  color: var(--accent-deep);
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.5vw, 1.62rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-weight: 600;
}

.reflection-box > *:last-child,
.misunderstanding-box > *:last-child,
.next-step-section > *:last-child,
.journey-card > *:last-child {
  margin-bottom: 0;
}

.reflection-questions,
.bullet-list {
  margin: 0.15rem 0 0;
  padding-left: 1.2rem;
}

.reflection-questions li,
.bullet-list li {
  max-width: var(--measure);
  margin-bottom: 0.9rem;
  padding-left: 0.2rem;
}

.reflection-questions li::marker,
.bullet-list li::marker {
  color: var(--accent);
}

.journey-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.journey-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 100%;
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.journey-card.is-current {
  border-color: var(--line-strong);
  background: linear-gradient(180deg, #fffdf8 0%, #f2e8da 100%);
}

.journey-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.3rem;
  height: 2.3rem;
  padding: 0 0.72rem;
  border-radius: 999px;
  background: rgba(107, 82, 53, 0.09);
  color: var(--accent-deep);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.journey-card p {
  margin-bottom: 0;
  color: var(--text-soft);
}

.journey-card a {
  align-self: flex-start;
  margin-top: auto;
  color: var(--accent-deep);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.journey-card a:hover,
.journey-card a:focus-visible,
.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--accent-deep);
  text-decoration-color: currentColor;
}

.next-step-section {
  display: grid;
  gap: 1rem;
  padding: 1.55rem;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  background: linear-gradient(180deg, #f6ecdf 0%, #fffdf8 100%);
  box-shadow: var(--shadow-soft);
}

.next-step-section p {
  margin-bottom: 0;
  color: rgba(31, 27, 22, 0.9);
}

.next-step-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0.85rem 1.15rem;
  border: 1px solid var(--accent-deep);
  border-radius: 999px;
  background: var(--accent-deep);
  color: #fbf7f0;
  font-size: 0.97rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.button:hover,
.button:focus-visible {
  box-shadow: 0 0 0 3px rgba(107, 82, 53, 0.12);
}

.button-secondary {
  background: transparent;
  color: var(--accent-deep);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  background: rgba(107, 82, 53, 0.05);
}

/* Reserved for the one moment the site asks for a response.
   Used once, on how-to-respond.html, so it carries weight. */
.next-step-section.is-decision {
  border-color: var(--accent-deep);
  background: linear-gradient(180deg, #4a3823 0%, var(--accent-deep) 100%);
  box-shadow: 0 22px 50px rgba(35, 25, 15, 0.22);
}

.next-step-section.is-decision h2 {
  color: #fdfaf4;
}

.next-step-section.is-decision p {
  color: rgba(250, 244, 234, 0.92);
}

.next-step-section.is-decision .button {
  border-color: #fdfaf4;
  background: #fdfaf4;
  color: var(--accent-deep);
}

.next-step-section.is-decision .button-secondary {
  border-color: rgba(253, 250, 244, 0.5);
  background: transparent;
  color: #fdfaf4;
}

.next-step-section.is-decision .button:hover,
.next-step-section.is-decision .button:focus-visible {
  box-shadow: 0 0 0 3px rgba(253, 250, 244, 0.28);
}

.next-step-section.is-decision .button-secondary:hover,
.next-step-section.is-decision .button-secondary:focus-visible {
  background: rgba(253, 250, 244, 0.12);
}

.note-panel {
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.note-panel p {
  margin-bottom: 0;
  color: var(--text-soft);
}

.footer {
  display: grid;
  gap: 0.8rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  color: var(--text-soft);
}

.footer p {
  margin-bottom: 0;
  max-width: var(--measure);
  font-size: 0.95rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1rem;
}

.footer-links a {
  color: var(--text-soft);
  font-size: 0.95rem;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.18em;
}

.footer-links a[aria-current="page"] {
  color: var(--accent-deep);
  text-decoration-color: currentColor;
}

/* WCAG 2.4.1 Bypass Blocks: off-screen until focused by keyboard. */
.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -100%;
  z-index: 200;
  padding: 0.8rem 1.15rem;
  border: 1px solid var(--accent-deep);
  border-radius: 999px;
  background: var(--accent-deep);
  color: #fbf7f0;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 0.75rem;
}

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

@media (min-width: 640px) {
  .site-shell {
    width: min(var(--max-width), calc(100% - 2rem));
  }

  .site-header {
    top: 1rem;
    padding: 1rem 1.1rem;
  }

  .hero,
  .page-hero {
    padding: 3.75rem 0 3rem;
  }

  .content-section {
    padding: 3.25rem 0;
  }

  .hero-card,
  .hero-note,
  .scripture-block,
  .reflection-box,
  .misunderstanding-box,
  .journey-card,
  .next-step-section,
  .note-panel {
    padding: 1.6rem;
  }
}

@media (min-width: 820px) {
  :root {
    --header-clearance: 7.75rem;
  }

  .site-header {
    flex-wrap: nowrap;
    align-items: center;
  }

  .nav-toggle {
    display: none;
  }

  .site-nav {
    display: flex;
    width: auto;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.45rem;
    padding-top: 0;
    border-top: 0;
  }

  .nav-link {
    justify-content: center;
    white-space: nowrap;
  }

  .nav-group {
    position: relative;
  }

  /* Desktop: the journey list becomes a dropdown panel. */
  .journey-menu {
    position: absolute;
    top: calc(100% + 0.6rem);
    left: 0;
    z-index: 10;
    width: max-content;
    min-width: 15rem;
    gap: 0.05rem;
    margin: 0;
    padding: 0.55rem;
    border: 1px solid var(--line);
    border-left: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: 0 18px 40px rgba(35, 25, 15, 0.14);
  }

  .journey-menu-continues {
    margin-top: 0.3rem;
    padding-top: 0.4rem;
  }

  .section-header {
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 1.35rem;
  }

  .section-number {
    width: 68px;
    height: 68px;
    font-size: 1.7rem;
  }

  /* Scripture blocks are browsable cards, so they stay side by side.
     Sequential prose stays in one column: see .content-grid below. */
  .scripture-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.35rem 1.6rem;
  }

  .content-grid {
    gap: 1.35rem;
  }

  .journey-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1040px) {
  .hero-layout {
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.9fr);
    gap: 2rem;
  }

  .page-hero h1 {
    font-size: clamp(3.2rem, 6vw, 5.6rem);
  }

  .content-grid {
    gap: 1.5rem;
  }

  .journey-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
