/* ---------------------------------------------------------------------------
   Styles for pages generated by the Eleventy project.
   The homepage header is designed to sit over a dark hero image: it is placed
   in grid row 2 and coloured cream. A page without a hero needs it back in
   normal flow with ink-on-cream colouring. Everything else inherits bundle.css.
   --------------------------------------------------------------------------- */

body.page > header {
  grid-area: auto;
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--ink);
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  /* Full-bleed bar, content aligned to the page gutter. The homepage header is
     inset because it floats over the hero; a sticky bar should span the width. */
  width: 100%;
  max-width: none;
  margin: 0;
  padding-inline: max(4.2%, calc((100% - 1360px) / 2));
  box-sizing: border-box;
}
body.page > header a,
body.page > header .chat-link { color: var(--ink); }
body.page > header .chat-link { border-color: var(--line); }
body.page > header .contact-actions .call-button { color: #402b21; }
body.page > header a:focus-visible,
body.page > header button:focus-visible { outline-color: #98743e; }
body.page > header .menu-toggle {
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
}

/* Page opener — takes the role the hero plays on the homepage. */
.page-head { padding-block: clamp(52px, 6vw, 88px) clamp(8px, 1.5vw, 20px); }
.page-head h1 {
  font-size: clamp(2.8rem, 5.2vw, 5.2rem);
  letter-spacing: -.025em;
  line-height: 1.04;
  margin: 0 0 26px;
}
.page-head .lede { max-width: 60ch; font-size: 1.125rem; color: var(--muted); margin-bottom: 30px; }
.page-head > p:last-child { margin-bottom: 0; }

/* Long-form body copy. Constrain the measure on the children rather than the
   section, so headings keep the page's full width while text stays readable. */
.section.prose > p,
.section.prose > ul,
.section.prose > ol,
.section.prose > details { max-width: 68ch; }
.section.prose > h2 { max-width: 22ch; }
.prose h2 { font-size: clamp(2rem, 3.4vw, 3.2rem); margin-bottom: 24px; }
.prose p { margin-bottom: 1.35rem; }
.prose ul, .prose ol { padding-left: 1.15rem; margin: 0 0 1.6rem; }
.prose li { margin-bottom: 1rem; }
.prose li strong { color: var(--ink); }
.prose details { border-top: 1px solid var(--line); padding: 18px 0; }
.prose details:last-of-type { border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.prose details p { margin: 12px 0 0; color: var(--muted); }
.prose summary { font-weight: 500; }

.section.tight { padding-block: clamp(40px, 4.5vw, 68px); }
.page-head + .section.tight { padding-top: clamp(34px, 4vw, 56px); }

@media (max-width: 760px) {
  .page-head { padding-block: 40px 24px; }
  body.page > header { position: static; }
}

/* Source citations under a sourced answer. */
.sources { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 20px; font-size: .9rem; color: var(--muted); max-width: 68ch; }
.sources h3 { font: 600 13px/1.4 Manrope, Arial, sans-serif; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.sources ul { padding-left: 1.1rem; margin: 0; }
.sources li { margin-bottom: .55rem; }
.answer-box { background: var(--ivory); border-left: 3px solid var(--brass); padding: 24px 28px; margin: 0 0 32px; max-width: 68ch; }
.answer-box p { margin: 0; font-size: 1.1rem; }
.answer-box p + p { margin-top: 12px; }

/* Related-reading and guide-hub cards. */
.related h2 { font-size: clamp(1.35rem, 2.2vw, 1.75rem); margin: 0 0 22px; }
.related-list { list-style: none; padding: 0; margin: 0 0 26px; max-width: 72ch; display: grid; gap: 2px; }
.related-list li { margin: 0; }
.related-list a {
  display: block; padding: 20px 22px; text-decoration: none; color: inherit;
  background: var(--ivory); border-left: 3px solid transparent;
  transition: border-color .18s ease, background .18s ease;
}
.related-list a:hover,
.related-list a:focus-visible { border-left-color: var(--brass); background: var(--surface); }
.related-list strong { display: block; color: var(--ink); font-weight: 600; margin-bottom: 5px; }
.related-list span { display: block; color: var(--muted); font-size: .95rem; line-height: 1.55; }
