/* =============================================================================
   Page banner (partials/page-banner.php): the head of every inner page.
   A colour band the full width of the screen, edge to edge, with square corners, under a little air below the header. A real photo of people fills the band as its background, under a
   purple veil (the logo's plum; deep plum on the legal pages): strong behind the text on the left, light on the right where the people are, so the
   photo stays clearly visible. On top: the breadcrumb trail as a small row with a short rule, a big bold heading, a short text, an optional search
   bar or buttons, and a small line of facts. With the photos switched off (Panel > Site settings > Page banners) the panel is the plain colour.
   The photo is decoration (alt=""). Static: no script, no motion. Loaded after site.css, theme.css and the page's own styles (the partial adds it
   to View::$styles).
   Type: one size per level, from the site's scale in theme.css. The title is var(--fs-h1), the same on every page, long or short (the partial used
   to write a .pb-hs-1 to .pb-hs-4 class that set a long title a step smaller; that is gone, so a page title never looks smaller than the one before
   it. .pb-compact still asks for a shorter panel, which is about height, not type). The short text under it is var(--fs-body), as every reading
   paragraph on the site is. A long title simply takes another line: the panel grows with it, and one very long word breaks (overflow-wrap below).

   What the content of $extra (a search bar, buttons) must do: it sits on the veiled photo. On plum and deep plum the text is light (inherited from the
   panel: var(--pb-fg)); .btn-plum and .btn-line are turned around below (light pill, light outline) like the ones on a deep band; a white field or a
   light card is fine as it is. Use the focus ring colour var(--pb-ring) (light on dark panels). amber, leaf and sky panels carry dark text (--ink).
   The variables are set on .pb: --pb-bg --pb-fg (heading) --pb-fg2 (text) --pb-fg3 (small text) --pb-acc (accent) --pb-ring --pb-veil (r,g,b).
   Contrast: the veil is measured, not assumed. White text on the veiled photo is checked by pixels (the lightest pixel behind each block of text,
   every photo and page type at 1440, 1024, 768, 390 and 320, and from 760 to 899): the heading 3:1 or better (large text), the short text, the small
   line, the breadcrumb trail and the label 4.5:1 or better. The accent colours (leaf, amber, sky) are only used for large text (the key word of the
   heading). A photo chosen in the panel gets the same veil; a very bright photo lowers these ratios a little.
   Hooks other stylesheets rely on: the classes .pb and .pb-k-<key> (legal.css), and --pb-px, the side space inside the panel.
   ============================================================================= */

.pb{
  /* the panel's colours: plum by default (white text), changed by .pb-t-<tone> below; the accent by .pb-a-<accent> */
  --pb-bg:var(--plum); --pb-veil:105,58,120; --pb-fg:#FFFFFF; --pb-fg2:#FFFFFF; --pb-fg3:#F3EAF6; --pb-rule:rgba(255,255,255,.5); --pb-ring:#FBF8F2;
  --pb-acc:var(--leaf);
  /* the shape: height of the panel (a little less than the home page's first screen), the space inside */
  --pb-h:clamp(400px,36vw,560px);
  --pb-px:clamp(28px,4.4vw,64px); --pb-pt:clamp(22px,2.6vw,36px); --pb-pb:clamp(28px,3.4vw,52px);
  --pb-zone:12%;   /* what the copy leaves free at its right: with a photo the people stand there */
  padding:clamp(16px,1.3vw,20px) 0 clamp(26px,3.2vw,48px);   /* above: clear space below the header, on phones too */
  background:var(--bg);
}
.pb-ph{--pb-zone:38%}
.pb-compact{--pb-h:clamp(330px,27vw,420px)}

.pb-t-deep{--pb-bg:var(--deep); --pb-veil:52,24,63}
.pb-a-leaf{--pb-acc:#B6DF7A}   /* the logo's leaf green, a little paler: 3:1 or better over every part of the photos (the audit measured 2.6 with the plain leaf) */
.pb-a-amber{--pb-acc:var(--amber)}
.pb-a-sky{--pb-acc:var(--sky)}
/* a light panel (amber, leaf or sky): dark text, and deep plum for the small touches */
.pb-t-amber,.pb-t-leaf,.pb-t-sky{--pb-fg:var(--ink); --pb-fg2:var(--ink); --pb-fg3:#3A2646; --pb-rule:rgba(42,23,51,.55); --pb-ring:var(--deep); --pb-acc:var(--deep)}
.pb-t-amber{--pb-bg:var(--amber); --pb-veil:240,174,94}
.pb-t-leaf{--pb-bg:var(--leaf); --pb-veil:150,203,91}
.pb-t-sky{--pb-bg:var(--sky); --pb-veil:62,173,227}

.pb-wrap{margin:0; padding:0}   /* the band runs edge to edge: no column, no gutter */
/* padding-inline: --pb-px, but on a screen wider than the page column the side space grows with it, so the copy stays in line with the content below */
.pb-panel{position:relative; display:flex; flex-direction:column; min-height:var(--pb-h); padding:var(--pb-pt) var(--pb-px) var(--pb-pb); padding-inline:max(var(--pb-px),calc((100% - var(--maxw)) / 2 + var(--gutter))); background:var(--pb-bg); color:var(--pb-fg)}
.pb-panel > *{min-width:0}   /* a grid or flex child never grows past its column because of one long word */
.pb :focus-visible{outline:3px solid var(--pb-ring); outline-offset:3px}

/* ---- The photo: the background of the panel, with the purple veil on top (left to right: strong, then light) -------------------- */
.pb-bg{position:absolute; inset:0; z-index:0; overflow:hidden; border-radius:inherit; background:var(--pb-bg); pointer-events:none}
.pb-bg img{position:absolute; inset:0; display:block; width:100%; height:100%; object-fit:cover}
.pb-bg::after{content:""; position:absolute; inset:0; background:linear-gradient(90deg,rgba(var(--pb-veil),.93) 0,rgba(var(--pb-veil),.91) 40%,rgba(var(--pb-veil),.72) 64%,rgba(var(--pb-veil),.42) 100%)}

/* ---- The small row at the top left: the breadcrumb trail, after a short rule -------------------------------------------------- */
.pb-top{position:relative; z-index:1; padding-right:var(--pb-zone)}
.pb .crumbs-row{display:flex; flex-wrap:wrap; align-items:center; gap:2px 8px; font:500 13.5px/1.3 'Noto Sans',system-ui,sans-serif; color:var(--pb-fg3)}
.pb .crumbs-row::before{content:""; flex:none; width:clamp(24px,2.6vw,40px); height:1.5px; margin-right:4px; background:var(--pb-rule)}
.pb .crumbs-row a{display:inline-flex; align-items:center; min-width:0; max-width:100%; min-height:24px; padding:0 2px; border-radius:4px; color:var(--pb-fg3); text-decoration:none; overflow-wrap:anywhere}   /* min-height: a 24px target (WCAG 2.5.8) */
.pb .crumbs-row a:hover{color:var(--pb-fg); text-decoration:underline; text-underline-offset:3px}
.pb .crumbs-row .sep{color:var(--pb-fg3)}   /* the "/" between the crumbs: as readable as the crumbs (the rule colour was 2.8 to 3.5 : 1 on the photo) */
.pb .crumbs-row .here{max-width:min(100%,42ch); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--pb-fg); font-weight:600}   /* a long title is cut here: the heading below says it in full */

/* ---- The copy: the heading (and a label above it) in the middle, the short text, $extra and the small line at the bottom ------- */
.pb-text{position:relative; z-index:1; flex:1; display:flex; flex-direction:column; gap:clamp(22px,2.6vw,36px); margin-top:clamp(20px,2.8vw,40px); padding-right:var(--pb-zone)}
.pb-head{margin-block:auto}   /* the heading sits between the small row above and the text below it, so a tall panel is not hollow at the top or the middle */
/* the Let's Connect banner carries only a heading and a short text: they travel together, centred, so no hollow opens between them */
.pb-k-connect .pb-head{margin-block:auto 0}
.pb-k-connect .pb-low{margin-block:0 auto}
.pb-head,.pb-low{display:flex; flex-direction:column; align-items:flex-start; gap:clamp(12px,1.3vw,18px); min-width:0}
.pb-tags{display:flex; flex-wrap:wrap; align-items:center; gap:8px 10px}
.pb .pill{--tone:var(--pb-acc); color:var(--pb-fg)}
.pb .blink{color:var(--pb-fg)}
.pb .blink::before{background:currentColor}
.pb .pb-h1{margin:0; max-width:100%; font:600 var(--fs-h1)/1.03 var(--display); letter-spacing:-.035em; color:var(--pb-fg); text-wrap:balance; overflow-wrap:anywhere}   /* anywhere: even one very long word breaks instead of pushing the page wider */
.pb .pb-h1 b{font-weight:inherit; color:var(--pb-acc)}   /* the key word: the accent colour (large text: 3:1 is enough) */
.pb-lede{margin:0; font-size:var(--fs-body); line-height:1.6; color:var(--pb-fg2); overflow-wrap:anywhere}
.pb-lede-h{font:600 var(--fs-h4)/1.3 var(--display); color:var(--pb-fg)}
.pb-extra{width:100%; min-width:0; color:var(--pb-fg2)}
.pb-note{display:flex; align-items:flex-start; gap:12px; margin:0; max-width:60ch; font-size:13.5px; line-height:1.5; color:var(--pb-fg3)}
.pb-note::before{content:""; flex:none; width:28px; height:1.5px; margin-top:.78em; background:var(--pb-rule)}   /* a short rule before the small line, as before the breadcrumb trail */
/* buttons in $extra on a dark panel: turned around like the ones on a deep band (a plum button would vanish) */
.pb-t-plum .btn-plum,.pb-t-deep .btn-plum{background:var(--card); border-color:var(--card); color:var(--deep)}
.pb-t-plum .btn-plum:hover,.pb-t-deep .btn-plum:hover{background:#FFFFFF; border-color:#FFFFFF; color:var(--deep); box-shadow:0 14px 26px -14px rgba(0,0,0,.6)}
.pb-t-plum .btn-line,.pb-t-deep .btn-line{border-color:rgba(251,248,242,.6); color:#FBF8F2}
.pb-t-plum .btn-line:hover,.pb-t-deep .btn-line:hover{background:rgba(251,248,242,.12); border-color:#FBF8F2; color:#FFFFFF}

/* ---- No photo (the usual case now that Site settings > Page banners ships photos off): the panel hugs its content instead of
   keeping room for a photo, and the heading sits beside the short text/search bar/small line rather than stacked under it, for a
   shorter, more horizontal banner. The client's request of 25 November 2026. ----------------------------------------------- */
.pb:not(.pb-ph){--pb-pt:clamp(24px,2.8vw,36px); --pb-pb:clamp(24px,2.8vw,36px)}
.pb:not(.pb-ph) .pb-panel{min-height:0}
.pb:not(.pb-ph) .pb-text{flex-direction:row; flex-wrap:wrap; align-items:center; gap:clamp(20px,3vw,48px); margin-top:clamp(12px,1.6vw,20px)}
.pb:not(.pb-ph) .pb-head{margin-block:0; flex:1 1 320px}
.pb:not(.pb-ph) .pb-low{margin-block:0; flex:2 1 360px}

/* ---- Phones: one column, the same edge-to-edge band, the photo behind everything under a stronger veil --------------------- */
@media (max-width:899px){
  .pb{--pb-px:24px; --pb-pt:24px; --pb-pb:28px; --pb-zone:0%}
  .pb-panel{min-height:0}
  .pb-top{padding:0}
  .pb-text{gap:18px; margin-top:20px; padding:0}
  .pb-head{margin-block:0}
  .pb-bg img{filter:saturate(1.15) contrast(1.1)}   /* the photo stays a photo under the strong veil: a little more colour and contrast */
  .pb-bg::after{background:linear-gradient(180deg,rgba(var(--pb-veil),.9) 0,rgba(var(--pb-veil),.86) 45%,rgba(var(--pb-veil),.82) 100%)}   /* the text runs the full width here: strong all over, a little lighter toward the bottom */
}
@media (min-width:760px) and (max-width:899px){   /* a wide tablet: the text keeps to the left again, so the veil goes back to left-to-right and the people show on the right */
  .pb-bg::after{background:linear-gradient(90deg,rgba(var(--pb-veil),.92) 0,rgba(var(--pb-veil),.9) 45%,rgba(var(--pb-veil),.76) 72%,rgba(var(--pb-veil),.6) 100%)}
  .pb-top{padding-right:34%}   /* a long breadcrumb trail wraps before it reaches the light part of the veil */
}
@media (max-width:400px){
  .pb{--pb-px:20px}
}

/* ---- Print: a plain heading, no photo -------------------------------------------------------------------------------------------- */
@media print{   /* the panel's colour is not printed, so all of its text turns dark: the variables carry it to the label, the heading, the breadcrumbs and the small line */
  .pb{--pb-bg:#FFFFFF; --pb-fg:#000000; --pb-fg2:#000000; --pb-fg3:#000000; --pb-rule:#555555; --pb-acc:#000000; padding:0}
  .pb-panel{display:block; min-height:0; padding:0; border-radius:0; background:none; color:#000}
  .pb-bg{display:none}
  .pb-text,.pb-top{padding:0; margin:0}
  .pb .pb-h1 b{color:inherit; font-weight:700}
  .pb .btn-plum,.pb .btn-line,.pb .btn-go,.pb .btn-light{background:none; border-color:#000000; color:#000000; box-shadow:none}
}

/* ---- Forced colours (Windows high contrast): the system colours, a visible edge for the panel, no photo behind the text -------------- */
@media (forced-colors:active){
  .pb-panel{border:2px solid CanvasText}
  .pb-bg{display:none}
  .pb .pb-h1 b{color:inherit}
}
