/* ==========================================================================
   Pictures: hero options, sliders (the hero's slides, the Slideshow
   block), galleries and the full-screen viewer
   --------------------------------------------------------------------------
   Loaded only by the pages that need it, through the view's `head`
   section: the homepage when its hero is not the original
   design or its gallery section shows, and the gallery pages. The original
   hero lives in site.css; nothing here applies without a hero--* class.

   Same rules as site.css: the interface is quiet, the photograph carries
   the page, motion is slow and small, corners are 2px. Tokens come from
   site.css, each with a fallback, so a renamed token degrades gracefully.
   ========================================================================== */

/* ------------------------------------------------------- hero: the words */

/* Across. The heading keeps its short measure, centred or to the right. */
.hero--centre .hero-content { display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero--right .hero-content { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.hero--centre .hero-actions { justify-content: center; }
.hero--right .hero-actions { justify-content: flex-end; }

/* Up and down. A floating header's height (--hero-offset, site.css) is
   already in the top padding. */
.hero--middle { align-items: center; }
.hero--top { align-items: start; }
.hero--middle .hero-content { padding-block: calc(var(--hero-offset, var(--header-h, 76px)) + var(--space-4, 2.5rem)) var(--space-5, 4rem); }

/* Sizes. Large (the original) is site.css's .display; each step clamps so a
   phone at 360px still fits "everything." on one line. */
.hero--heading-s .hero-content .display { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.25rem); line-height: 1.04; }
.hero--heading-m .hero-content .display { font-size: clamp(2.4rem, 1.4rem + 3.8vw, 4.75rem); line-height: 1; }
.hero--heading-xl .hero-content .display { font-size: clamp(3rem, 1.2rem + 7.4vw, 8.25rem); line-height: .96; max-width: 12ch; }
/* Never taller than the screen allows: on a short, wide screen (a laptop) the
   size follows the height too, so the words and buttons stay above the fold. */
.hero--heading-xl .hero-content .display { font-size: min(clamp(3rem, 1.2rem + 7.4vw, 8.25rem), 12svh); }
.hero--text-s .hero-content .lede { font-size: var(--t-base, 1.0625rem); }
.hero--text-l .hero-content .lede { font-size: clamp(1.3rem, 1.1rem + .8vw, 1.6rem); max-width: 40ch; }

/* Height. Content always wins: these are minimums. Like the full-screen
   original, each gives up the chrome above the hero (--hero-chrome: a
   header or strip that sits above it rather than over it). */
.hero--tall { min-height: min(calc(80svh - var(--hero-chrome, 0px)), 820px); }
.hero--medium { min-height: min(calc(62svh - var(--hero-chrome, 0px)), 640px); }
/* The whole screen, however large: the default stops at 980px, which on a
   large monitor leaves a band under it - this fills it, for a full-screen
   video or picture. svh: the height with a phone's address bar showing,
   so the hero does not jump as the bar comes and goes. */
.hero.hero--screen { min-height: calc(100svh - var(--hero-chrome, 0px)); }

/* ------------------------------------------------------- hero: the shade */

/* hero--scrim redraws the original scrim from where the words sit, at the
   chosen strength (--k). Two layers, as in site.css: one up from the words'
   edge, one in from their side. */
.hero--scrim {
    --k: 1;
    --scrim-v: linear-gradient(to top, rgb(var(--scrim, 10 10 9) / calc(.72 * var(--k))) 0%, rgb(var(--scrim, 10 10 9) / calc(.35 * var(--k))) 42%, rgb(var(--scrim, 10 10 9) / calc(.08 * var(--k))) 70%);
    --scrim-h: linear-gradient(to right, rgb(var(--scrim, 10 10 9) / calc(.55 * var(--k))) 0%, rgb(var(--scrim, 10 10 9) / calc(.2 * var(--k))) 45%, rgb(var(--scrim, 10 10 9) / 0) 70%);
}
.hero--overlay-light { --k: .55; }
.hero--overlay-strong { --k: 1.35; }
.hero--scrim.hero--top {
    --scrim-v: linear-gradient(to bottom, rgb(var(--scrim, 10 10 9) / calc(.72 * var(--k))) 0%, rgb(var(--scrim, 10 10 9) / calc(.35 * var(--k))) 42%, rgb(var(--scrim, 10 10 9) / calc(.08 * var(--k))) 70%);
}
.hero--scrim.hero--middle {
    --scrim-v: linear-gradient(to bottom, rgb(var(--scrim, 10 10 9) / calc(.12 * var(--k))) 0%, rgb(var(--scrim, 10 10 9) / calc(.42 * var(--k))) 50%, rgb(var(--scrim, 10 10 9) / calc(.12 * var(--k))) 100%);
}
.hero--scrim.hero--right {
    --scrim-h: linear-gradient(to left, rgb(var(--scrim, 10 10 9) / calc(.55 * var(--k))) 0%, rgb(var(--scrim, 10 10 9) / calc(.2 * var(--k))) 45%, rgb(var(--scrim, 10 10 9) / 0) 70%);
}
/* Centred words sit over the middle of the picture: an even veil instead of
   a side gradient, a little deeper behind the text. */
.hero--scrim.hero--centre {
    --scrim-h: radial-gradient(ellipse 60% 55% at 50% 55%, rgb(var(--scrim, 10 10 9) / calc(.3 * var(--k))) 0%, rgb(var(--scrim, 10 10 9) / calc(.12 * var(--k))) 100%);
}
.hero--scrim .hero-media::after { background: var(--scrim-v), var(--scrim-h); }
.hero--overlay-none .hero-media::after { display: none; }

@media (max-width: 640px) {
    /* On a phone the words cover most of the photograph, as in site.css: a
       fuller veil, drawn from their edge. */
    .hero--scrim {
        --scrim-v: linear-gradient(to top, rgb(var(--scrim, 10 10 9) / calc(.82 * var(--k))) 0%, rgb(var(--scrim, 10 10 9) / calc(.6 * var(--k))) 50%, rgb(var(--scrim, 10 10 9) / calc(.25 * var(--k))) 80%, rgb(var(--scrim, 10 10 9) / calc(.15 * var(--k))) 100%);
        --scrim-h: linear-gradient(transparent, transparent);
    }
    .hero--scrim.hero--top {
        --scrim-v: linear-gradient(to bottom, rgb(var(--scrim, 10 10 9) / calc(.82 * var(--k))) 0%, rgb(var(--scrim, 10 10 9) / calc(.6 * var(--k))) 50%, rgb(var(--scrim, 10 10 9) / calc(.25 * var(--k))) 80%, rgb(var(--scrim, 10 10 9) / calc(.15 * var(--k))) 100%);
    }
    .hero--scrim.hero--middle {
        --scrim-v: linear-gradient(rgb(var(--scrim, 10 10 9) / calc(.55 * var(--k))), rgb(var(--scrim, 10 10 9) / calc(.55 * var(--k))));
    }
}

/* ------------------------------------------------- hero: the text colour */

/* An editor's colour. Light by default; a dark one (over a light picture,
   usually with the shading off) also turns the main button dark. */
.hero--ink { color: var(--hero-ink); }
.hero--ink .hero-content .lede { color: color-mix(in srgb, var(--hero-ink) 86%, transparent); }
.hero--ink .hero-content .eyebrow { color: color-mix(in srgb, var(--hero-ink) 78%, transparent); }
.hero--ink .btn-ghost-light:not(.hero-panel *) { --btn-fg: var(--hero-ink); --btn-border: color-mix(in srgb, var(--hero-ink) 45%, transparent); }
.hero--ink .btn-ghost-light:not(.hero-panel *):hover { --btn-bg: var(--hero-ink); --btn-fg: var(--on-dark, #F7F5F0); --btn-border: var(--hero-ink); }
.hero--ink-dark .btn-light:not(.hero-panel *) { --btn-bg: var(--hero-ink); --btn-fg: var(--on-dark, #F7F5F0); --btn-border: var(--hero-ink); }
.hero--ink-dark .btn-light:not(.hero-panel *):hover { --btn-bg: color-mix(in srgb, var(--hero-ink) 85%, #000); --btn-border: color-mix(in srgb, var(--hero-ink) 85%, #000); }
.hero--ink-dark :focus-visible:not(.hero-panel *) { --focus: var(--hero-ink); outline-color: var(--hero-ink); }

/* ------------------------------------------------- hero v2: the words */

/* The width of the words. */
.hero--measure-narrow .hero-content .display { max-width: 8ch; }
.hero--measure-narrow .hero-content .lede { max-width: 32ch; }
.hero--measure-wide .hero-content .display { max-width: 16ch; }
.hero--measure-wide .hero-content .lede { max-width: 62ch; }
/* The full width of the content: this hero's choice, or the website's
   (Typography -> Heading width, body.headings-full) for a hero as designed.
   Its words keep a comfortable reading width. Stronger than a heading size's
   own width (heading-xl) and a long title's (site.css). */
.hero.hero--measure-full .hero-content .display,
body.headings-full .hero:not(.hero--measure-narrow, .hero--measure-wide) .hero-content .display { max-width: none; }
.hero.hero--measure-full .hero-content .lede { max-width: 62ch; }

/* The small line above the heading. */
.hero--eyebrow-pill .hero-content .eyebrow { padding: .35em .95em; border: 1px solid currentColor; border-radius: 999px; }
.hero--eyebrow-line .hero-content .eyebrow::before { content: ""; display: inline-block; width: 2.5rem; height: 1px; margin-right: .75rem; vertical-align: middle; background: currentColor; }
.hero--eyebrow-accent .hero-content .eyebrow { color: var(--accent); opacity: 1; }

/* The words on a panel; a soft shadow under them. */
.hero-box { padding: var(--space-4, 2.5rem); background: rgb(var(--scrim, 10 10 9) / .64); border-radius: var(--corner, 0); max-width: 44rem; }
/* Dark words (the owner's colour, or over a light tint): a light panel. */
.hero--ink-dark .hero-box { background: rgb(var(--on-dark-rgb, 247 245 240) / .8); }
.hero--centre .hero-box { text-align: center; }
.hero--right .hero-box { text-align: right; }
.hero-box > :last-child { margin-bottom: 0; }
.hero--shadow .hero-content { text-shadow: 0 1px 2px rgb(0 0 0 / .45), 0 2px 22px rgb(0 0 0 / .35); }

/* As tall as the words. */
.hero--fit { min-height: 0; }

/* Keep this part of the picture in view when it is cropped. */
.hero--focal-top-left .hero-media :is(img, video) { object-position: 0 0; }
.hero--focal-top .hero-media :is(img, video) { object-position: 50% 0; }
.hero--focal-top-right .hero-media :is(img, video) { object-position: 100% 0; }
.hero--focal-left .hero-media :is(img, video) { object-position: 0 50%; }
.hero--focal-right .hero-media :is(img, video) { object-position: 100% 50%; }
.hero--focal-bottom-left .hero-media :is(img, video) { object-position: 0 100%; }
.hero--focal-bottom .hero-media :is(img, video) { object-position: 50% 100%; }
.hero--focal-bottom-right .hero-media :is(img, video) { object-position: 100% 100%; }

/* A portrait behind the words (Hero 'portrait': an entry's, set by code). On
   a wide band it keeps its own shape, the band's full height at the far
   side, its near edge fading into the dark ground the words sit on, rather
   than an enlarged slice of it across the width. On a phone the band is
   tall too, and the picture fills it as any other does. */
@media (min-width: 761px) {
    .hero--portrait .hero-media img {
        inset: 0 0 0 auto; width: auto; max-width: 62%; height: 100%;
        -webkit-mask-image: linear-gradient(to right, transparent 0, #000 30%);
        mask-image: linear-gradient(to right, transparent 0, #000 30%);
    }
    /* Words on the right: the picture on the left. */
    .hero--portrait.hero--right .hero-media img {
        inset: 0 auto 0 0;
        -webkit-mask-image: linear-gradient(to left, transparent 0, #000 30%);
        mask-image: linear-gradient(to left, transparent 0, #000 30%);
    }
}

/* A video filling the hero over its picture, faded in once it plays
   (media.js), with its Pause / Play in the lower left of the video's own
   frame - under the words, or beside them. Light on its dark disc either
   way: beside the words the hero's own colour is the page's dark text. */
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .8s var(--ease, ease); }
.hero-video.is-playing { opacity: 1; }
.hero-video.is-still { opacity: 1; transition: none; }
.hero-video-toggle { position: absolute; left: var(--gutter, 1rem); bottom: var(--space-3, 1.5rem); z-index: 2; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; background: rgb(var(--scrim, 10 10 9) / .45); color: #fff; border: 0; border-radius: 50%; cursor: pointer; }
.hero--split .hero-video-toggle { left: var(--space-3, 1.5rem); }
/* The floating WhatsApp button holds a lower corner of the screen, where a
   hero as tall as the screen puts its Pause: while the button shows on the
   left (on phones only, if it is set so: site-extras.css), Pause takes the
   right. */
body:has(.wa-float--left:not(.wa-float--mobile)) .hero-video-toggle { left: auto; right: var(--gutter, 1rem); }
body:has(.wa-float--left:not(.wa-float--mobile)) .hero--split .hero-video-toggle { right: var(--space-3, 1.5rem); }
@media (max-width: 1024px) {
    body:has(.wa-float--left) .hero-video-toggle { left: auto; right: var(--gutter, 1rem); }
    body:has(.wa-float--left) .hero--split .hero-video-toggle { right: var(--space-3, 1.5rem); }
}
.hero-video-toggle[hidden] { display: none; }
.hero-video-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.hero-video-toggle .slider-icon-play { fill: currentColor; stroke: none; display: none; }
.hero-video-toggle.is-paused .slider-icon-play { display: block; }
.hero-video-toggle.is-paused .slider-icon-pause { display: none; }

/* --------------------------------------------- hero v2: a tint of the owner's */

/* An even colour, or one fading from a side, at the chosen strength
   (--hero-tint, --hero-k: Hero::resolve()). It replaces the scrim. */
.hero--tint { --tint: color-mix(in srgb, var(--hero-tint, rgb(10 10 9)) calc(var(--hero-k, .5) * 100%), transparent); --tint-half: color-mix(in srgb, var(--hero-tint, rgb(10 10 9)) calc(var(--hero-k, .5) * 50%), transparent); }
.hero--tint .hero-media::after { background: var(--tint); }
.hero--tint-bottom .hero-media::after { background: linear-gradient(to top, var(--tint) 0%, var(--tint-half) 45%, transparent 100%); }
.hero--tint-top .hero-media::after { background: linear-gradient(to bottom, var(--tint) 0%, var(--tint-half) 45%, transparent 100%); }
.hero--tint-left .hero-media::after { background: linear-gradient(to right, var(--tint) 0%, var(--tint-half) 45%, transparent 100%); }
.hero--tint-right .hero-media::after { background: linear-gradient(to left, var(--tint) 0%, var(--tint-half) 45%, transparent 100%); }
/* Below the full menu the words run across most of the picture: shading from
   a side reaches all of it, and fades only to half. */
@media (max-width: 1100px) {
    .hero--tint-left .hero-media::after { background: linear-gradient(to right, var(--tint) 0%, var(--tint) 45%, var(--tint-half) 100%); }
    .hero--tint-right .hero-media::after { background: linear-gradient(to left, var(--tint) 0%, var(--tint) 45%, var(--tint-half) 100%); }
}

/* ----------------------------------- hero v2: beside the picture, words only */

/* The words on the page's own ground: its type, its buttons (SiteButtons
   draws them for it), its focus colour. */
.hero:is(.hero--split, .hero--minimal) {
    background: var(--bg); color: var(--text); --focus: var(--text);
    --heading: var(--page-heading, currentColor); --link: var(--page-link, currentColor);
}
.hero:is(.hero--split, .hero--minimal) :focus-visible { --focus: var(--text); }
.hero:is(.hero--split, .hero--minimal) .hero-content .lede { color: var(--text-2); }
.hero:is(.hero--split, .hero--minimal) .hero-content .eyebrow { color: var(--muted); }
.hero:is(.hero--split, .hero--minimal) .hero-box { background: var(--surface); }
.hero:is(.hero--split, .hero--minimal) .hero-content { padding-block: var(--space-5) var(--space-5); }

/* Words only: a tall band of type, not a screenful (the heights still apply). */
.hero--minimal { align-items: center; }
.hero--minimal:not(.hero--tall, .hero--medium, .hero--fit, .hero--screen) { min-height: min(62svh, 640px); }

/* Beside the picture: one under the other on a phone, the picture first;
   side by side from 900px, the picture on the right (or left). */
.hero--split { min-height: 0; align-items: stretch; }
.hero--split .hero-media { position: relative; inset: auto; min-height: min(70vw, 420px); }
.hero--split .hero-media img { position: absolute; inset: 0; }
.hero--split .hero-media::after { display: none; }
.hero--split .hero-content { align-self: center; }
.hero--split .hero-slide { display: grid; align-items: stretch; }
@media (min-width: 900px) {
    .hero--split:not(.hero--slideshow), .hero--split .hero-slide { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .hero--split:not(.hero--fit, .hero--tall, .hero--medium, .hero--screen) { min-height: min(calc(80svh - var(--hero-chrome, 0px)), 760px); }
    .hero--split.hero--screen { min-height: calc(100svh - var(--hero-chrome, 0px)); }
    .hero--split.hero--tall { min-height: min(calc(80svh - var(--hero-chrome, 0px)), 820px); }
    .hero--split.hero--medium { min-height: min(calc(62svh - var(--hero-chrome, 0px)), 640px); }
    .hero--split .hero-media { min-height: 100%; order: 2; }
    .hero--split-left .hero-media { order: 0; }
    .hero--split .hero-content { max-width: 40rem; margin-inline: 0; padding-inline: var(--space-5) var(--gutter); }
    .hero--split-left .hero-content { padding-inline: var(--space-5) var(--gutter); }
    /* The words line up with the page's container (the logo above, the
       sections below): their outer edge is the container's, measured on
       the hero's own width (cqw). */
    .hero--split { container-type: inline-size; }
    .hero--split:not(.hero--split-left) .hero-content { max-width: none; padding-inline-start: max(var(--space-5), calc((100cqw - min(100cqw, var(--max-length, 1440px))) / 2 + var(--gutter))); }
    .hero--split-left .hero-content { max-width: none; padding-inline-end: max(var(--gutter), calc((100cqw - min(100cqw, var(--max-length, 1440px))) / 2 + var(--gutter))); }
}

/* --------------------------------------- hero: a form in a panel (hero.panel) */
/* Beside the words (site/partials/hero-panel.php): the words and the panel
   side by side, the panel a third, two fifths or half the width, on the
   right or the left. Under the words where the picture is beside them, and
   on phones and tablets. */
.hero--panel-third { --panel-w: minmax(300px, 34%); }
.hero--panel-two-fifths { --panel-w: minmax(320px, 41%); }
.hero--panel-half { --panel-w: minmax(0, 1fr); }
.hero .hero-content.hero-content--panel {
    display: grid; grid-template-columns: minmax(0, 1fr) var(--panel-w, minmax(300px, 34%)); gap: var(--space-4); align-items: center; text-align: left;
}
.hero--panel-left .hero-content.hero-content--panel { grid-template-columns: var(--panel-w, minmax(300px, 34%)) minmax(0, 1fr); }
.hero--panel-left .hero-content--panel > .hero-panel { order: -1; }
.hero-content--panel .hero-words { min-width: 0; }
.hero--centre .hero-content--panel .hero-words { text-align: center; }
.hero--centre .hero-content--panel .hero-words .display { margin-inline: auto; }
.hero--centre .hero-content--panel .hero-actions { justify-content: center; }
.hero--right .hero-content--panel .hero-words { text-align: right; }
.hero--right .hero-content--panel .hero-words .display { margin-left: auto; }
.hero--right .hero-content--panel .hero-actions { justify-content: flex-end; }
/* The picture beside the words leaves no room for a third column. */
.hero.hero--split .hero-content.hero-content--panel { grid-template-columns: minmax(0, 1fr); align-items: start; }
.hero.hero--split .hero-content--panel > .hero-panel { order: 0; max-width: 520px; }
@media (max-width: 960px) {
    .hero .hero-content.hero-content--panel { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
    .hero .hero-content--panel > .hero-panel { order: 0; max-width: 560px; }
}

/* The card: light with the page's own type, dark with the band's, or the
   button colour; at the owner's opacity (--panel-a), what shows through
   blurred unless they chose otherwise. */
.hero-panel {
    position: relative; min-width: 0; padding: var(--space-3); text-align: left; text-shadow: none;
    border-radius: max(var(--corner), var(--radius)); box-shadow: 0 28px 60px -30px rgb(0 0 0 / .55);
}
.hero-panel.hero-panel--light {
    background: color-mix(in srgb, var(--field) calc(var(--panel-a, 1) * 100%), transparent);
    color: var(--page-text); --text: var(--page-text); --text-2: var(--page-text-2); --muted: var(--page-muted);
    --line: var(--page-line); --line-strong: var(--page-line-strong); --bg: var(--page-bg); --surface: var(--page-surface); --surface-2: var(--page-surface-2);
    --heading: var(--page-heading); --link: var(--page-link); --focus: var(--page-text);
}
.hero-panel.hero-panel--dark { background: color-mix(in srgb, var(--band) calc(var(--panel-a, 1) * 100%), transparent); }
.hero-panel.hero-panel--accent { background: color-mix(in srgb, var(--page-accent) calc(var(--panel-a, 1) * 100%), transparent); }
.hero-panel--frost { -webkit-backdrop-filter: blur(14px) saturate(1.15); backdrop-filter: blur(14px) saturate(1.15); }
/* The hero's words are light over the picture; the panel's are its own. */
.hero-content .hero-panel :is(.lede, .eyebrow) { color: var(--muted); }
.hero-panel-body > .block:first-child :is(h2, h3):first-child { margin-top: 0; }
/* A form keeps no card of its own there (the panel is its card), and is as
   short as it reads: its sections' names small, less room between them. */
.hero-panel :is(.contact-form-wrap, .block-newsletter .nl-form) { margin-inline: 0; padding: 0; background: none; border: 0; border-radius: 0; }
.hero-panel .contact-form-wrap .quote-form { margin-top: var(--space-2); }
.hero-panel .form-section { margin-bottom: var(--space-2); }
.hero-panel .form-section > legend { margin-bottom: .5rem; font: 600 var(--t-sm)/1.3 var(--font-body, inherit); letter-spacing: 0; text-transform: none; }
.hero-panel .choice { min-height: 0; padding: .55rem .8rem; }
.hero-panel .textarea { min-height: 0; height: 7rem; }
.hero-panel .form-grid { row-gap: .85rem; }
.hero-panel :is(.input, .select) { min-height: 46px; padding-block: .55rem; }

/* A search in a bar across the hero's foot, over its edge. */
.hero-search-band { position: relative; z-index: 2; margin-top: calc(-1 * var(--space-5)); margin-bottom: calc(-1 * var(--space-3)); }
.hero-search-band .hero-panel { padding: var(--space-2) var(--space-2) .85rem; box-shadow: 0 20px 44px -30px rgb(0 0 0 / .5); }
.hero-search-band .hero-panel--light { border: 1px solid var(--line); }
/* Room under the words for the bar, whatever the words' place. */
.hero.hero--search-below .hero-content { padding-bottom: calc(var(--space-5) + var(--space-5)); }
.hero.hero--search-below .hero-cue { bottom: calc(var(--space-5) + 1rem); }
@media (max-width: 760px) {
    .hero-search-band { margin-top: calc(-1 * var(--space-4)); margin-bottom: 0; }
    .hero.hero--search-below .hero-content { padding-bottom: calc(var(--space-4) + var(--space-5)); }
}

/* ----------------------------------------------------- hero: the scroll cue */

.hero-cue {
    position: absolute; left: 50%; bottom: var(--space-2, 1rem); z-index: 2; transform: translateX(-50%);
    display: grid; place-items: center; width: 44px; height: 44px; color: inherit; border-radius: 50%;
}
.hero-cue svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; animation: hero-cue 2.4s var(--ease, ease) infinite; }
.hero--slideshow .hero-cue { bottom: calc(var(--space-3, 1.5rem) + 52px); }
.hero-after { display: block; scroll-margin-top: var(--header-h, 76px); }
.hero-after:focus { outline: 0; }
@keyframes hero-cue { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* ------------------------------------------------------ sliders: the slides */

/* Slides are stacked in one cell, each with its picture and words, so
   changing one never moves anything (no layout shift) and the tallest sets
   the height. Without JavaScript the first (server-marked is-current) is
   the only one shown. */
.slider-slides { display: grid; }
.slider-slide { grid-area: 1 / 1; opacity: 0; visibility: hidden; }
.slider-slide.is-current { opacity: 1; visibility: visible; }
[data-slider] { touch-action: pan-y; }

.hero--slideshow > .hero-slides { align-self: stretch; }
.hero-slide { position: relative; display: grid; align-items: end; }
.hero--middle .hero-slide { align-items: center; }
.hero--top .hero-slide { align-items: start; }

:is(.hero--fade, .slider--fade) .slider-slide { transition: opacity 1.1s var(--ease, ease), visibility 0s linear 1.1s; }
:is(.hero--fade, .slider--fade) .slider-slide.is-current { transition: opacity 1.1s var(--ease, ease), visibility 0s; }

/* "Slide across": the waiting slides park off to the right, hidden; the
   script sends the outgoing one left (or right, going back) and hides it
   once it has left. */
:is(.hero--slide, .slider--slide) .slider-slide { opacity: 1; transform: translateX(100%); transition: transform .9s var(--ease, ease); }
:is(.hero--slide, .slider--slide) .slider-slide:is(.is-current, .is-leaving) { visibility: visible; }
:is(.hero--slide, .slider--slide) .slider-slide.is-current { transform: none; }
:is(.hero--slide, .slider--slide) .slider-slide.is-parked { transition: none; }

/* A slow zoom on the picture on show. */
.hero--zoom .slider-slide.is-current .hero-media img { animation: slider-zoom 14s ease-out both; }
@keyframes slider-zoom { from { transform: scale(1); } to { transform: scale(1.08); } }

/* A slide's own place and shade. */
.hero-slide--centre .hero-content { display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero-slide--left .hero-content { display: block; text-align: left; }
.hero-slide--right .hero-content { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.hero-slide--centre .hero-actions { justify-content: center; }
.hero-slide--left .hero-actions { justify-content: flex-start; }
.hero-slide--right .hero-actions { justify-content: flex-end; }
.hero-slide--bottom { align-items: end; }
.hero-slide--middle { align-items: center; }
.hero-slide--top { align-items: start; }
.hero-slide--middle .hero-content { padding-block: calc(var(--hero-offset, var(--header-h, 76px)) + var(--space-4, 2.5rem)) var(--space-5, 4rem); }
.hero-slide--overlay-default { --k: 1; }
.hero-slide--overlay-light { --k: .55; }
.hero-slide--overlay-strong { --k: 1.35; }
.hero-slide--overlay-none .hero-media::after { display: none; }

/* ---------------------------------------------------- sliders: the controls */

.slider-controls { position: absolute; inset-inline: 0; bottom: var(--space-3, 1.5rem); z-index: 2; }
.slider-controls[hidden] { display: none; }
.slider-controls-inner { display: flex; align-items: center; justify-content: flex-end; gap: .25rem; }
.hero--right .slider-controls-inner { justify-content: flex-start; }
.hero--top .slider-controls-inner, .hero--middle .slider-controls-inner { justify-content: center; }

.slider-ctl, .slider-dot {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; padding: 0; margin: 0;
    background: none; border: 0; color: inherit; cursor: pointer; border-radius: var(--radius, 2px);
}
/* Arrows the owner turned off, kept for phones, where the dots give way. */
@media (min-width: 641px) { .slider-ctl--narrow { display: none; } }
.slider-ctl svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.slider-ctl:hover { background: rgb(var(--on-dark-rgb, 247 245 240) / .14); }
.slider-toggle .slider-icon-play { fill: currentColor; stroke: none; width: 18px; height: 18px; display: none; }
.slider-toggle.is-paused .slider-icon-play { display: block; }
.slider-toggle.is-paused .slider-icon-pause { display: none; }
[data-slider] :focus-visible { outline-color: currentColor; }

/* Arrows in circles. */
.slider--arrows-circles .slider-ctl:not(.slider-toggle) { border: 1px solid rgb(var(--on-dark-rgb, 247 245 240) / .55); border-radius: 50%; background: rgb(var(--scrim, 10 10 9) / .28); }
.slider--arrows-circles .slider-ctl:not(.slider-toggle):hover { background: rgb(var(--scrim, 10 10 9) / .5); }

/* Which slide: dots (as designed), lines, or a count. */
.slider-dots { display: flex; align-items: center; }
.slider-dot span { width: 8px; height: 8px; border-radius: 50%; border: 1px solid currentColor; opacity: .75; transition: background-color .3s, transform .3s, width .3s; }
.slider-dot[aria-current="true"] span { background: currentColor; opacity: 1; transform: scale(1.15); }
.slider-dot:hover span { opacity: 1; }
.slider--indicators-lines .slider-dot { width: 32px; }
.slider--indicators-lines .slider-dot span { width: 22px; height: 3px; border-radius: 2px; border: 0; background: currentColor; opacity: .4; }
.slider--indicators-lines .slider-dot[aria-current="true"] span { opacity: 1; transform: none; }
.slider-count { display: none; min-width: 3.5rem; text-align: center; font-size: var(--t-sm, .875rem); font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.slider--indicators-numbers .slider-count { display: inline-block; }

/* On the page's own ground (a split hero) the controls are its colour. */
.hero--split .slider-controls { bottom: var(--space-2, 1rem); }
.hero--split .slider-ctl:hover { background: var(--surface); }

@media (max-width: 640px) {
    /* Room for the controls under the words. */
    .hero--slideshow:not(.hero--split) .hero-content { padding-bottom: calc(var(--space-6, 4.5rem) + 2.25rem); }
    .hero--slideshow.hero--top .hero-content, .hero--slideshow.hero--middle .hero-content { padding-bottom: calc(var(--space-5, 4rem) + 3rem); }
    .slider-controls { bottom: var(--space-2, 1rem); }
    .slider-controls-inner, .hero--right .slider-controls-inner { justify-content: center; }
    /* Dots for a dozen slides do not fit a phone: a count does. */
    .slider-dots { display: none; }
    .slider-count { display: inline-block; }
}

@media (prefers-reduced-motion: reduce) {
    :is(.hero--fade, .slider--fade) .slider-slide, :is(.hero--fade, .slider--fade) .slider-slide.is-current,
    :is(.hero--slide, .slider--slide) .slider-slide { transition: none; }
    .hero--zoom .slider-slide.is-current .hero-media img, .hero-cue svg { animation: none; }
}

/* ------------------------------------------------------------- galleries */

/* Rows of pictures at their own proportions: each tile grows in proportion
   to --r (width / height), so a row's pictures share one height and none is
   cropped; the order reads left to right. The ::after stops a short last
   row from stretching its pictures across the page. */
.gallery-grid {
    --row: 240px;
    display: flex; flex-wrap: wrap; gap: var(--space-2, 1rem);
    list-style: none; margin: 0; padding: 0;
}
.gallery-grid::after { content: ""; flex: 999 1 0; }
.gallery-tile { flex: var(--r, 1.5) 1 calc(var(--r, 1.5) * var(--row)); min-width: 0; }
.gallery-figure { margin: 0; }
.gallery-zoom { display: block; overflow: hidden; background: var(--surface-2, #DDD8CE); border-radius: var(--corner, 0); }
.gallery-zoom img { width: 100%; height: auto; transition: transform 1.2s var(--ease, ease), opacity .3s; }
.gallery-zoom:hover img { transform: scale(1.02); }
.gallery-zoom:focus-visible { outline-offset: 3px; }
.gallery-caption { display: grid; gap: .15rem; padding-top: .6rem; font-size: var(--t-sm, .875rem); color: var(--muted, #6F6B63); }
.gallery-caption strong { font-weight: 500; color: var(--text, #1B1B19); }
.gallery-caption .link-arrow { justify-self: start; margin-top: .2rem; }
.gallery-back { margin: var(--space-4, 2.5rem) 0 0; }

@media (max-width: 640px) {
    .gallery-grid { --row: 150px; gap: .6rem; }
}

/* The gallery list. */
.gallery-cards { list-style: none; margin: 0; padding: 0; }
.gallery-card .card-media img { aspect-ratio: auto; }
/* In a list (entries.css draws the rows): the cover small beside the words, on a phone too. */
.gallery-card.entry-card--row { grid-template-columns: 6rem minmax(0, 1fr); align-items: start; }
@media (min-width: 641px) { .gallery-card.entry-card--row { grid-template-columns: 160px minmax(0, 1fr); } }

/* A gallery block's rows: like the gallery page on wide screens; on a phone
   one row that scrolls sideways, snapping picture by picture. */
.gallery-strip { --row: 210px; }
@media (max-width: 640px) {
    .gallery-strip {
        flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
        margin-inline: calc(var(--gutter, 1rem) * -1); padding-inline: var(--gutter, 1rem); scroll-padding-inline: var(--gutter, 1rem);
        scrollbar-width: none;
    }
    .gallery-strip::-webkit-scrollbar { display: none; }
    .gallery-strip::after { display: none; }
    .gallery-strip .gallery-tile { flex: 0 0 auto; width: calc(var(--r, 1.5) * 200px); max-width: 82vw; scroll-snap-align: start; }
    .gallery-strip .gallery-zoom { height: 200px; }
    .gallery-strip .gallery-zoom img { height: 100%; object-fit: cover; }
}

/* ---------------------------------------------------- full-screen viewer */

/* A native <dialog> opened as a modal (media.js): the page behind is inert,
   focus stays inside, Escape closes it and focus goes back to the picture. */
.lightbox {
    width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
    background: var(--studio, #141413); color: var(--on-dark, #F7F5F0); overflow: hidden;
}
.lightbox::backdrop { background: rgb(var(--scrim, 10 10 9) / .92); }
.lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.lightbox-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .5rem var(--gutter, 1rem); }
.lightbox-count { font-size: var(--t-sm, .875rem); letter-spacing: .06em; font-variant-numeric: tabular-nums; opacity: .8; }
.lightbox-stage { position: relative; display: grid; place-items: center; min-height: 0; overflow: hidden; padding: 0 var(--gutter, 1rem); touch-action: pan-y pinch-zoom; }
/* The bar and the caption keep their room: the picture fits what is left. */
.lightbox-stage img { max-width: 100%; max-height: calc(100dvh - 9rem); width: auto; height: auto; object-fit: contain; user-select: none; -webkit-user-drag: none; transition: opacity .25s var(--ease, ease); }
.lightbox-stage img.is-loading { opacity: .25; }
.lightbox-caption { min-height: 3rem; padding: .75rem var(--gutter, 1rem) 1rem; text-align: center; font-size: var(--t-sm, .875rem); color: rgb(var(--on-dark-rgb, 247 245 240) / .82); }
.lightbox-caption strong { display: block; font-weight: 500; color: var(--on-dark, #F7F5F0); font-size: var(--t-base, 1.0625rem); }
.lightbox-btn {
    display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px;
    background: none; border: 0; color: inherit; cursor: pointer; border-radius: var(--radius, 2px);
}
.lightbox-btn:hover { background: rgb(var(--on-dark-rgb, 247 245 240) / .1); }
.lightbox-btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.lightbox :focus-visible { outline: 2px solid var(--on-dark, #F7F5F0); outline-offset: 2px; }
.lightbox-prev, .lightbox-next { position: absolute; top: 50%; transform: translateY(-50%); background: rgb(var(--scrim, 10 10 9) / .45); }
.lightbox-prev { left: var(--gutter, 1rem); }
.lightbox-next { right: var(--gutter, 1rem); }
.lightbox-prev[hidden], .lightbox-next[hidden] { display: none; }
html.has-lightbox { overflow: hidden; }

@media (max-width: 640px) {
    .lightbox-stage { padding: 0; }
    .lightbox-prev, .lightbox-next { top: auto; bottom: .5rem; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .gallery-zoom img, .lightbox-stage img { transition: none; }
    .gallery-zoom:hover img { transform: none; }
}

/* ==========================================================================
   The block library (4.3): the Slideshow block, a gallery's masonry and
   slideshow layouts, the testimonials slider, and a video in its dialog
   ========================================================================== */

/* ------------------------------------------------------------ slideshow */
.slideshow-slides { margin: 0; }
.slideshow-slide { margin: 0; display: grid; align-content: start; }
.slideshow-media { display: block; overflow: hidden; border-radius: var(--corner, 0); background: var(--surface-2); aspect-ratio: 16 / 9; }
.slideshow--standard .slideshow-media { aspect-ratio: 3 / 2; }
.slideshow--square .slideshow-media { aspect-ratio: 1 / 1; }
.slideshow--panorama .slideshow-media { aspect-ratio: 21 / 9; }
.slideshow-media img { width: 100%; height: 100%; object-fit: cover; }
.slideshow-media img.slideshow-contain { object-fit: contain; }
.slideshow-caption { display: grid; gap: .3rem; padding-top: var(--space-2); }
.slideshow-title { font-family: var(--font-display); font-size: var(--t-lg); font-weight: var(--heading-weight, 500); color: var(--heading); }
.slideshow-text { color: var(--text-2); }
.slideshow-caption .link-arrow { justify-self: start; margin-top: .2rem; }
/* Over the picture, on a shade. */
.slideshow--caption-over .slideshow-slide { position: relative; }
.slideshow--caption-over .slideshow-caption { position: absolute; inset: auto 0 0; padding: var(--space-5) var(--space-3) var(--space-3);
    background: linear-gradient(to top, rgb(var(--scrim) / .75), rgb(var(--scrim) / 0)); color: var(--on-dark);
    border-radius: 0 0 var(--corner, 0) var(--corner, 0); --page-heading: var(--on-dark); --link: var(--on-dark); }
.slideshow--caption-over .slideshow-text { color: rgb(var(--on-dark-rgb) / .85); }
.slideshow--caption-over .slideshow-title { color: var(--on-dark); }
@media (max-width: 640px) {
    .slideshow--caption-over .slideshow-caption { position: static; background: none; color: inherit; padding: var(--space-2) 0 0; --page-heading: var(--heading); --link: var(--link); }
    .slideshow--caption-over .slideshow-text { color: var(--text-2); }
    .slideshow--caption-over .slideshow-title { color: var(--heading); }
}

/* The title and words centred or to the right, under the picture or on
   its shading; a link with them. */
.slideshow--caption-centre .slideshow-caption { text-align: center; justify-items: center; }
.slideshow--caption-right .slideshow-caption { text-align: right; justify-items: end; }
.slideshow--caption-centre .slideshow-caption .link-arrow { justify-self: center; }
.slideshow--caption-right .slideshow-caption .link-arrow { justify-self: end; }

/* Sliding across, the slides waiting beside it stay inside it. */
.slideshow.slider--slide .slider-slides { overflow: hidden; }

/* In a row, the middle picture larger (media.js, place()): every slide in
   one grid cell, the current one --peek of the width across, the two either
   side of it shrunk to --small and moved out by --step and --step2 (in the
   slide's own width), the rest waiting hidden beyond them. Each shrinks
   towards the middle of its picture, not of picture and caption, so the
   pictures line up (cqw: the slideshow's width; --hw: the shape's height
   over its width). The row runs past the page's edges, cut at the band's. */
.slideshow { --hw: .5625; }
.slideshow--standard { --hw: .6667; }
.slideshow--square { --hw: 1; }
.slideshow--panorama { --hw: .4286; }
.block-slideshow--centre { overflow-x: clip; }
.slider--centre { --peek: .44; --small: .56; --step: 83%; --step2: 144%; --step3: 205%; container-type: inline-size; }
.slider--centre .slider-slide {
    justify-self: center; width: calc(var(--peek) * 100%);
    transform-origin: 50% calc(var(--peek) * 100cqw * var(--hw) / 2);
    transition: transform .8s var(--ease, ease), opacity .8s var(--ease, ease), visibility 0s linear .8s;
}
.slider--centre .slider-slide:is(.is-prev2, .is-prev, .is-current, .is-next, .is-next2) {
    opacity: 1; visibility: visible; transition: transform .8s var(--ease, ease), opacity .8s var(--ease, ease), visibility 0s;
}
.slider--centre .slider-slide.is-current { z-index: 2; transform: none; }
.slider--centre .slider-slide.is-prev { z-index: 1; transform: translateX(calc(-1 * var(--step))) scale(var(--small)); }
.slider--centre .slider-slide.is-next { z-index: 1; transform: translateX(var(--step)) scale(var(--small)); }
.slider--centre .slider-slide.is-prev2 { transform: translateX(calc(-1 * var(--step2))) scale(var(--small)); }
.slider--centre .slider-slide.is-next2 { transform: translateX(var(--step2)) scale(var(--small)); }
.slider--centre .slider-slide.is-before { transform: translateX(calc(-1 * var(--step3))) scale(var(--small)); }
.slider--centre .slider-slide.is-after { transform: translateX(var(--step3)) scale(var(--small)); }
.slider--centre .slider-slide.is-parked { transition: none; }
.slider--centre .slider-slide.is-arriving { animation: slider-arrive .8s var(--ease, ease) both; }
@keyframes slider-arrive { from { opacity: 0; } to { opacity: 1; } }
/* The words belong to the picture in the middle. */
.slider--centre .slideshow-caption { transition: opacity .5s var(--ease, ease); }
.slider--centre .slider-slide:not(.is-current) .slideshow-caption { opacity: 0; }
@media (max-width: 640px) {
    .slider--centre { --peek: .74; --small: .64; --step: 86%; --step2: 154%; --step3: 222%; }
}
@media (prefers-reduced-motion: reduce) {
    .slider--centre .slider-slide, .slider--centre .slider-slide:is(.is-prev2, .is-prev, .is-current, .is-next, .is-next2), .slider--centre .slideshow-caption { transition: none; }
    .slider--centre .slider-slide.is-arriving { animation: none; }
}

/* Without JavaScript nothing moves them: every slide shows, one under
   another, so none is out of reach. */
.no-js :is(.slideshow, .testimonials-slider) .slider-slides { display: grid; gap: var(--space-3); }
.no-js :is(.slideshow, .testimonials-slider) .slider-slide { grid-area: auto; opacity: 1; visibility: visible; transform: none; }
.no-js .slideshow.slider--centre .slider-slide { width: auto; opacity: 1; visibility: visible; transform: none; }
.no-js .slideshow.slider--centre .slider-slide .slideshow-caption { opacity: 1; }

/* The controls of a slider on the page (not over a picture): under it, in
   the page's colours. */
:is(.slideshow, .testimonials-slider) .slider-controls { position: static; margin-top: var(--space-2); color: var(--text); }
:is(.slideshow, .testimonials-slider) .slider-controls-inner { max-width: none; padding-inline: 0; justify-content: center; }
:is(.slideshow, .testimonials-slider) .slider-ctl:hover { background: var(--surface); }
:is(.slideshow, .testimonials-slider).slider--arrows-circles .slider-ctl:not(.slider-toggle) { border-color: var(--line-strong); background: transparent; }
:is(.slideshow, .testimonials-slider).slider--arrows-circles .slider-ctl:not(.slider-toggle):hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
:is(.slideshow, .testimonials-slider) :focus-visible { outline-color: var(--focus); }

/* Previous and next either side of the picture, halfway down it, on a disc
   of the page's colour so they read over a photograph (after the arrows
   in circles above, whose disc is see-through); in a row, in the
   gaps beside the middle picture. The dots or count stay under it. */
.slider--arrows-sides { position: relative; container-type: inline-size; }
.slideshow.slider--arrows-sides .slider-ctl.slider-ctl--side {
    position: absolute; z-index: 3; top: calc(var(--peek, 1) * 100cqw * var(--hw) / 2); transform: translateY(-50%);
    border-radius: 50%; background: var(--surface); color: var(--text); box-shadow: 0 1px 6px rgb(var(--scrim, 10 10 9) / .18);
}
.slideshow.slider--arrows-sides .slider-ctl.slider-ctl--side[data-slider-prev] { left: max(.5rem, calc(50% - var(--peek, 1) * 50% - 22px)); }
.slideshow.slider--arrows-sides .slider-ctl.slider-ctl--side[data-slider-next] { right: max(.5rem, calc(50% - var(--peek, 1) * 50% - 22px)); }
.slideshow.slider--arrows-sides .slider-ctl.slider-ctl--side:hover { background: var(--accent); color: var(--accent-ink); }

/* ------------------------------------------------- testimonials slider */
.testimonials-slider .testimonials { display: grid; }
.testimonials-slider .testimonial { max-width: 46rem; margin-inline: auto; width: 100%; }
.testimonials-slider .testimonial figure { text-align: center; justify-items: center; align-content: center; padding: var(--space-4) var(--space-3); }
.testimonials-slider blockquote { font-size: var(--t-xl); }
.testimonials-slider .testimonial-by { text-align: left; }

/* --------------------------------------------------- gallery: masonry */
.gallery-masonry { list-style: none; margin: 0; padding: 0; columns: var(--masonry, 3) 220px; column-gap: var(--space-2); }
.gallery-masonry--2 { --masonry: 2; }
.gallery-masonry--4 { --masonry: 4; }
.gallery-masonry .gallery-tile { break-inside: avoid; margin-bottom: var(--space-2); }
.gallery-masonry .gallery-zoom { display: block; }
.gallery-masonry img { width: 100%; height: auto; border-radius: var(--corner, 0); }

/* ------------------------------------------------- video in its dialog */
.video-lightbox .lightbox-stage { display: grid; place-items: center; padding: var(--space-2); }
.video-lightbox-media { width: min(100%, 1280px, calc((100dvh - 9rem) * 16 / 9)); aspect-ratio: 16 / 9; background: #000; }
.video-lightbox-media :is(video, iframe) { width: 100%; height: 100%; border: 0; display: block; }

/* ------------------------------------- gallery: even squares (layouts, L.5) */
.gallery-squares { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2, 1rem); grid-template-columns: repeat(var(--squares, 3), minmax(0, 1fr)); }
.gallery-squares--2 { --squares: 2; }
.gallery-squares--4 { --squares: 4; }
.gallery-squares .gallery-tile { min-width: 0; }
.gallery-squares .gallery-zoom { aspect-ratio: 1; }
.gallery-squares .gallery-zoom img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 640px) { .gallery-squares { --squares: 2; gap: .6rem; } }
@container (max-width: 420px) { :is(.row-col, .popup-body) .gallery-squares { --squares: 2; } }
