/* ==========================================================================
   Meta Church VR: page extras for privacy.html, disclaimer.html and 404.html
   Loaded AFTER styles.css, only on those three pages. Tokens only: no raw
   colours, no new font sizes.
   Contents
     1. Quiet page hero (legal pages: the photo steps back behind the title)
     2. Legal layout: sticky section index + prose
     3. 404: way-back links + next-gathering bulletin
   ========================================================================== */

/* ---------- 1. Quiet page hero ---------- */
/* A heavier evergreen wash so the photograph reads as texture, not as a subject. */
.page-hero--quiet .page-hero__media::after { background: rgba(var(--scrim), .58); }
.page-hero--quiet .page-hero__media img { filter: saturate(.8); }

/* ---------- 2. Legal layout ---------- */
.legal { display: grid; gap: clamp(2rem, 5vw, 3.5rem); }
.legal > * { min-width: 0; }

.legal__index {
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border-radius: var(--r-lg);
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}
.legal__title {
  display: flex;
  align-items: center;
  gap: .55em;
  font-family: var(--font-sans);
  font-size: var(--fs-200);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}
.legal__title + .legal__list { margin-top: .6rem; }

.legal__list { margin: 0; padding: 0; list-style: none; counter-reset: legal; }
.legal__list > li { counter-increment: legal; border-top: 1px solid var(--rule); }
.legal__list > li:first-child { border-top: 0; }
.legal__list a {
  display: grid;
  grid-template-columns: 1.75rem minmax(0, 1fr);
  align-items: center;
  min-height: var(--tap);
  padding: .45rem .5rem .45rem .35rem;
  border-radius: var(--r-sm);
  font-size: var(--fs-300);
  font-weight: 600;
  line-height: 1.35;
  color: var(--fg);
  text-decoration: none;
  transition: background-color var(--dur-1), color var(--dur-1);
}
.legal__list a::before {
  content: counter(legal) ".";
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.legal__list a:hover { background: var(--tint); color: var(--link); }
.legal__list a[aria-current="true"] { background: var(--tint); color: var(--link); }

/* "Related" block under the index */
.legal__related { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1.5px dashed var(--rule-strong); }
.legal__related p { margin-top: .35rem; font-size: var(--fs-300); line-height: 1.5; color: var(--fg-soft); }
.legal__related .text-link { margin-top: .15rem; font-size: var(--fs-300); }

/* headings are jump targets: keep them clear of the sticky header (html already sets scroll-padding-top) */
.legal .prose h2 { scroll-margin-top: 1rem; }

@media (min-width: 36em) and (max-width: 61.99em) {
  /* tablets: the index runs in two columns so the policy starts sooner */
  .legal__list--long { column-count: 2; column-gap: 1.5rem; }
  .legal__list--long > li { break-inside: avoid; }
  .legal__list--long > li:first-child { border-top: 1px solid transparent; }
}

@media (min-width: 62em) {
  .legal { grid-template-columns: minmax(15rem, 19rem) minmax(0, 1fr); align-items: start; gap: clamp(3rem, 6vw, 6rem); }
  .legal__index {
    position: sticky;
    top: calc(var(--header-h) + 1.5rem);
    max-height: calc(100vh - var(--header-h) - 3rem);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}
@media (min-width: 62em) and (max-height: 40em) {
  .legal__index { position: static; max-height: none; }      /* un-stick when the card cannot fit the viewport */
}

@media print {
  .legal { display: block; }
  .legal__index { display: none; }
}

/* ---------- 3. 404 ---------- */
.lost { display: grid; gap: var(--gap-grid); }
.lost > * { min-width: 0; }

.ways { display: grid; gap: clamp(.75rem, 2vw, 1.25rem); margin: 0; padding: 0; list-style: none; }
.ways > li { display: grid; min-width: 0; }                  /* the link stretches to the row height */
.way {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  min-height: 5.5rem;
  padding: 1.1rem 1.25rem;
  border-radius: var(--r-lg);
  background: var(--paper);
  box-shadow: var(--shadow-soft);
  color: var(--ink);
  text-decoration: none;
  transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.way:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.way__icon {
  display: grid; place-items: center;
  width: 3rem; height: 3rem;
  border-radius: 50%;
  background: var(--sand);
  color: var(--maple-deep);
}
.way__icon .icon { width: 1.4rem; height: 1.4rem; }
.way__text { display: grid; gap: .15rem; min-width: 0; }
.way__name { font-family: var(--font-serif); font-size: var(--fs-600); line-height: 1.15; letter-spacing: -.01em; }
.way__hint { font-size: var(--fs-300); line-height: 1.45; color: var(--ink-soft); }
.way > .icon { color: var(--maple); }

.lost__next { display: grid; gap: 1rem; align-content: start; }
.lost__next .countdown { margin-top: 6px; }                  /* room for the maple ribbon that sits above the card */

@media (min-width: 40em) {
  .ways { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 62em) {
  .lost { grid-template-columns: minmax(0, 1fr) minmax(19rem, 23rem); align-items: start; }
  .lost__next { position: sticky; top: calc(var(--header-h) + 2rem); }
}
@media (min-width: 62em) and (max-height: 46em) {
  .lost__next { position: static; }
}
