/* ============================================================
   topic-pages.css — rules from styles.css used by the pages it is linked from: /topics/, /topics/sacred-scripture, /topics/the-saints, /topics/prayer-and-fasting, /topics/church-history.
   They were moved here so that no other page downloads them; their
   order, and the comments that went with them, are as they were.
   Linked straight after styles.css.
   ============================================================ */

/* A parish nave dressed for Easter, photographed down the central axis: a
   painted barrel vault running back to the apse, stained glass in the apse
   windows and both aisles, the altar banked with flowers under a Risen banner,
   and the empty pews in the foreground.

   Centred on both axes, and neither is really a choice. The picture is
   symmetric about its own centre line, so any horizontal offset reads as a
   photograph hung crooked — the same reasoning that fixes the Ravenna plate and
   the Mass nave. The vertical follows from what the crop is protecting: the
   source is 2.4:1 against a band nearer 4:1, so cover spends about a quarter of
   the height at each edge, and centred is where the apse half-dome sits whole
   inside the band with the vault ribs still reading in the upper corners and
   the crucifix just held at the lower. Biasing upward to keep more vault drops
   the crucifix out of frame and leaves the dome sitting low; downward brings in
   the front pews, which are the brightest thing in the picture and the last
   thing wanted directly beneath the title.

   No veil override. This is a bright, high-lit interior rather than the dim
   brick of the Mass nave, so the shared opening has plenty to work with; the
   .40 that rescues that picture would leave this one glaring behind the type. */
.church-history-head{
  --pagehead-image:url("images/church-history-masthead.webp");
  --pagehead-position:center;
  --pagehead-position-mobile:center;
}

/* Fra Angelico's predella of the forerunners of Christ with the saints and
   martyrs: rank upon rank of haloed figures on a gold ground, packed shoulder
   to shoulder and composed as three horizontal friezes rather than as a scene
   with a subject somewhere in it.

   That composition is what makes the crop survivable. The panel is 743x414,
   about 1.8:1, against a band nearer 4.4:1, so cover keeps roughly a third of
   the picture's height and throws away the rest — on any ordinary photograph
   that would be a mutilation. Here every horizontal slice is another row of
   faces, so the band reads as a crowd continuing past both edges, which is
   what the communion of saints ought to look like behind that title.

   center 30% is where the slice lands on a whole rank: haloes and faces
   complete across the full width, with drapery and staves above and the
   shoulders of the row beneath closing the lower edge. Centred instead cuts
   the row below through the eyes; higher than about a quarter brings in the
   torsos of the rank above with their heads already gone.

   The mobile position is the same declaration but does almost nothing: at
   phone widths the band is tall enough relative to its width that cover scales
   to the height and the overflow moves to the sides, so the vertical is spent
   and only the horizontal centring is doing work.

   No veil override. The gold ground is bright but it is bright in small
   flecks between the figures rather than as an open field, and the shared
   opening reads it as texture — the type sits clear of it without help. */
.the-saints-head{
  --pagehead-image:url("images/the-saints-masthead.webp");
  --pagehead-position:center 30%;
  --pagehead-position-mobile:center 30%;
}

/* Christ in the wilderness at first light: the figure seated on a low rock,
   hunched forward with the head bowed, the fasting ground running out flat
   behind him and a band of dawn along the horizon. The whole picture is one
   silhouette against one thin light, which is the only thing in it and the
   reason the veil below is not the shared one.

   center 35% is the slice that keeps the figure entire. The source is 797x420
   against a band nearer 4.4:1, so cover keeps about two-fifths of the height;
   at 35% the bowed head clears the top edge, the shoulders and the rock stay
   in, and the dawn band sits low and to the right where the standfirst is not.
   Higher and the crown of the head is cut; lower and the head goes with the
   sky and what is left is rock.

   The veil is opened to .34 for the same reason .mass-head is opened to .40.
   This is a dark painting already — near-black robe, dusk ground, and one
   narrow strip of yellow doing all the work — so the shared .62 takes it to an
   undifferentiated brown and the reader gets no figure at all, only a stain.
   At .34 the silhouette and the horizon both survive, and the run to .82 at
   the foot keeps the standfirst clear where the ground is lightest. */
.prayer-fasting-head{
  --pagehead-image:url("images/prayer-and-fasting-masthead.webp");
  --pagehead-position:center 35%;
  --pagehead-position-mobile:center 35%;
  --pagehead-veil:linear-gradient(180deg,rgba(26,18,11,.34) 0%,rgba(26,18,11,.52) 70%,rgba(26,18,11,.82) 100%);
}

/* A page head whose artwork is footage rather than a plate. .pagehead-image
   paints its picture in ::before, from a variable, and no variable can hold a
   video — so the film is laid in as a real element at the bottom of the band and
   the two pseudo-elements are lifted over it. The order the reader sees is the
   one every other head has: picture, veil, grain, type. Only the picture moves.

   The same colour grade the stills get is applied here too. Without it the
   footage arrives at full saturation against a site whose every photograph has
   been pulled back toward the parchment, and the band reads as a screen someone
   embedded rather than a plate the page was built around. */
.pagehead-video{
  position:absolute;inset:0;z-index:0;
  width:100%;height:100%;object-fit:cover;pointer-events:none;
  filter:saturate(.72) sepia(.12) contrast(1.08);
}

/* Sacred Scripture — /topics/sacred-scripture.
   --pagehead-image is set to none deliberately: ::before is otherwise the
   opaque layer of the two, and any plate named there would sit on top of the
   film and hide it completely. Dropping it leaves ::before holding just the
   veil, which is what has to cross the video for the title to clear it.

   The veil opens a little wider than the shared .62. Moving footage carries its
   own contrast — a frame that was legible a second ago may not be — so the type
   needs more ground than a fixed plate demands, and .68 gives it without
   closing the band down to black. */
.scripture-head{
  --pagehead-image:none;
  --pagehead-veil:linear-gradient(180deg,rgba(26,18,11,.68) 0%,rgba(26,18,11,.80) 70%,rgba(26,18,11,.94) 100%);
}
.scripture-head::before,
.scripture-head::after{z-index:1;}

/* A reader who has asked the system for less motion is not asking for a still
   band — they are asking for a still picture. The video is withdrawn and the
   poster is handed to ::before as an ordinary plate, so the head degrades into
   exactly the treatment /bible already carries rather than into bare gradient. */
@media(prefers-reduced-motion:reduce){
  .scripture-head .pagehead-video{display:none;}
  .scripture-head{
    --pagehead-image:url("images/bible-masthead.webp");
    --pagehead-position:center 44%;
  }
}
