/* ==========================================================================
   Meta Church VR: page extras for beliefs.html
   Loaded AFTER styles.css. Tokens only: no raw colours, no new font sizes.
   1. Hero crop   2. Doctrine layout (index + numbered list)   3. Our approach   4. Print
   ========================================================================== */

/* ---------- 1. Hero: on wide screens, slide the garden cross clear of the text scrim ----------
   The shared page hero darkens the left half for the copy, and the cross sits at 48% of the photo.
   Widening the image (anchored left) moves the cross to about two thirds across, into the clear part. */
@media (min-width: 68.75em) {
  .page-hero--beliefs .page-hero__media img {
    width: 140%;
    max-width: none;
    object-position: 0 52%;
  }
}

/* ---------- 2. Doctrine: "On this page" index + numbered editorial list ---------- */
.beliefs__grid { display: grid; gap: clamp(2rem, 5vw, 3.5rem); }
.beliefs__grid > * { min-width: 0; }

/* Phones and tablets: the index is a paper card of jump chips */
.belief-index {
  padding: 1.1rem 1.25rem 1.35rem;
  border-radius: var(--r-md);
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}
.belief-index__title {
  margin-bottom: .85rem;
  font-size: var(--fs-200);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}
.belief-index__list { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.belief-index a {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  min-height: var(--tap);
  padding: .4rem .95rem;
  border: 1.5px solid var(--rule-strong);
  border-radius: var(--r-pill);
  font-size: var(--fs-300);
  font-weight: 600;
  line-height: 1.25;
  color: var(--fg);
  text-decoration: none;
  transition: background-color var(--dur-1), border-color var(--dur-1), color var(--dur-1);
}
.belief-index a:hover { background: var(--tint); border-color: var(--accent-2); }
.belief-index__num {
  font-family: var(--font-serif);
  font-style: italic;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}
.belief-index a[aria-current] { border-color: var(--accent); color: var(--accent); }

/* The list itself */
.doctrine { max-width: 46rem; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule-strong); }
.doctrine__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .6rem;
  padding-block: clamp(1.75rem, 4vw, 2.75rem);
  border-bottom: 1px solid var(--rule);
}
.doctrine__num {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  font-size: var(--fs-700);
  line-height: 1;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}
.doctrine__body { min-width: 0; }
.doctrine__body > p { margin-top: .8rem; max-width: 38em; color: var(--fg-soft); }
.doctrine__body > .verse { margin-top: 1.4rem; max-width: 34em; }
/* arriving from the index (or a shared link): mark the heading you landed on */
.doctrine__item:target h3 {
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: .22em;
  text-decoration-color: var(--accent-2);
}

@media (min-width: 40em) {
  .doctrine__item { grid-template-columns: 4.5rem minmax(0, 1fr); gap: 0 clamp(1rem, 3vw, 2rem); }
  .doctrine__num { padding-top: .1em; }
}

/* Desktop: the index becomes a sticky side column */
@media (min-width: 62em) {
  .beliefs__grid { grid-template-columns: 15.5rem minmax(0, 1fr); gap: var(--gap-grid); align-items: start; }
  .belief-index {
    position: sticky;
    top: calc(var(--header-h) + 1.5rem);
    max-height: calc(100vh - var(--header-h) - 3rem);
    overflow-y: auto;
    padding: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
  }
  .belief-index__list { display: block; border-top: 1px solid var(--rule-strong); }
  .belief-index a {
    display: flex;
    padding: .45rem .5rem .45rem .85rem;
    border: 0;
    border-bottom: 1px solid var(--rule);
    border-left: 3px solid transparent;
    border-radius: 0;
    outline-offset: -3px;                    /* the column scrolls on short screens, so keep the focus ring inside it */
  }
  .belief-index a:hover { border-color: var(--rule); border-left-color: var(--accent-2); }
  .belief-index a[aria-current] { border-color: var(--rule); border-left-color: var(--accent-2); background: var(--tint); color: var(--accent); }
}
@media (min-width: 62em) and (max-height: 46em) {
  .belief-index a { min-height: 2.25rem; }   /* pointer layouts on short screens: fit all eleven without scrolling */
}

/* ---------- 3. Our approach (evergreen band) ---------- */
.approach .split__media img { box-shadow: var(--shadow-dark); }
.approach .split__text > p.approach__grace {
  display: grid;
  grid-template-columns: 1.1rem minmax(0, 1fr);
  gap: .85rem;
  margin-top: 2rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--rule);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  font-size: var(--fs-500);
  line-height: 1.5;
  color: var(--fg);
}
.approach__grace .leaf { width: 1.1rem; height: 1.1rem; margin-top: .3em; }

/* ---------- 4. Print: doctrine should be printable ---------- */
@media print {
  .site-footer, .belief-index, .breadcrumb, .page-hero__media, .split__media, .actions, .further { display: none !important; }

  .page-hero, .section--evergreen {
    --fg: var(--ink);
    --fg-soft: var(--ink-soft);
    --rule: var(--line);
    --rule-strong: var(--line-strong);
    --accent: var(--maple);
    --accent-2: var(--amber);
    --tick: none;
    color: var(--ink);
  }
  .page-hero { display: block; min-height: 0; background: none; }
  .page-hero__body { display: block; padding: 0 0 var(--sp-4); background: none; }
  .page-hero h1 { text-shadow: none; }
  .page-hero h1 em { color: var(--maple); }
  .page-hero__lede { color: var(--ink-soft); }

  .section { padding-block: var(--sp-5); background: none !important; }
  .section-head { margin-bottom: var(--sp-5); }
  .split, .beliefs__grid { display: block; }
  .doctrine { max-width: none; }
  .doctrine__item { padding-block: var(--sp-4); break-inside: avoid; page-break-inside: avoid; }
  .doctrine__item:target h3 { text-decoration: none; }
  h2, h3 { break-after: avoid; page-break-after: avoid; }

  main::after {
    content: "Meta Church VR \00B7  www.metachurchvr.org/beliefs.html \00B7  metachurchvr@gmail.com";
    display: block;
    width: min(100% - var(--gutter) * 2, var(--container));
    margin: var(--sp-5) auto 0;
    padding-top: var(--sp-4);
    border-top: 1px solid var(--line-strong);
    font-size: var(--fs-300);
    color: var(--ink-soft);
  }
}
