@charset "UTF-8";

/**
 * medias.css 1.11.0
 * Author: hybrid.
 * Type: core
 *
 * Base styles for media — images, figures, SVG, thumbnails, section images,
 * placeholders, backgrounds, float and galleries.
 * Figcaption styles live here, not in reset.css.
 * video / audio / iframe base sizing lives in reset.css (next to display: block).
 * Project overrides live in styles.css (or styles-medias.css).
 * figure — layout container, always width: 100%.
 *          size constraints apply to children (> *, img), not the figure itself.
 *          use parent or wrapper to control figure width.
 *
 * Sections
 * CONFIG     — core tokens
 * ANIMATIONS — picture, img, link-label transitions
 * CORE       — img, picture, svg, figure, links, placeholder, thumbnail, section image, gallery, background, iframe, float, sizes, video controls
 *
 * Gallery
 * .gallery          — cover by default
 * .gallery.contain  — cropped gallery, whole image inside the ratio box (object-fit: contain, box unchanged)
 * .gallery figure.cropped.contain — same for a single image (exempt from the gallery crop, or scale = contain)
 *
 * Thumbnail
 * .thumbnail        — cropped image filling its parent box, ratio inherited from the parent (--img-ratio: inherit)
 *
 * Section image
 * .section-image    — full-width image cropped to --section-image-ratio, overflow hidden (no figcaption / link-label)
 *
 * Tokens defined here
 * --figure-link-label-offset / --figure-link-label-gap
 * --media-ratio
 * --img-fit / --img-height / --img-width / --img-ratio / --img-margin
 * --img-placeholder-blur
 * --dominant-color
 * --figure-gap / --figure-align-margin
 * --figcaption-font-size / --figcaption-gap
 * --figure-link-font-size / --figure-link-icon-size
 * --figure-link-bg-color / --figure-link-filter
 * --figure-link-focus-width / --figure-link-focus-color / --figure-link-focus-offset
 * --thumbnail-border-radius / --thumbnail-background-color
 * --section-image-ratio / --section-image-position
 * --iframe-height / --iframe-ratio / --iframe-bg-color
 *
 * Optional token, not declared (read at use, fallback none)
 * --alpha-mask        mask-image of picture, set per project or per element
 *
 * Dependencies
 * --light-color        defined in colors.css
 * --bright-rgb         defined in colors.css
 * --font-size          defined in reset.css (override in fonts.css)
 * --line-height        defined in reset.css (override in fonts.css)
 * --content-spacing    defined in spacing.css
 * --section-gap-x      defined in layout.css
 * --content-max-width  defined in layout.css
 * --duration-fast      defined in animations.css
 * --duration-normal    defined in animations.css
 * --ease               defined in animations.css
 */



/* ================================================================================================== */
/* ============================================= CONFIG ============================================= */
/* ================================================================================================== */


/* ============================== RATIOS ============================== */

:root {
	--media-ratio: 16/9;
}


/* ============================== IMG ============================== */

:root {
	--img-fit: contain;
	--img-height: auto;
	--img-width: 100%;
	--img-ratio: auto;
	--img-margin: 0 auto;
	--img-placeholder-blur: 2rem;
}


/* ============================== PICTURE ============================== */

:root {
	--dominant-color: var(--light-color, #919191);
}

/* ============================== FIGURE ============================== */

:root {
	--figure-gap: var(--content-spacing);
	--figure-align-margin: max(var(--section-gap-x), calc((100% - var(--content-max-width)) / 2));

	--figcaption-font-size: var(--font-size, 1rem);
	--figcaption-gap: .5em;

	--figure-link-font-size: var(--font-size, 1rem);
	--figure-link-icon-size: calc(var(--font-size) * 2);
	--figure-link-bg-color: rgba(var(--bright-rgb), .75);
	--figure-link-filter: grayscale(1);
	--figure-link-label-offset: 1em; /* label slides up on hover */
	--figure-link-label-gap: .25em;
	--figure-link-focus-width: .2em;
	--figure-link-focus-color: currentColor;
	--figure-link-focus-offset: 0;
}


/* ============================== THUMBNAIL ============================== */

:root {
	--thumbnail-border-radius: 0;
	--thumbnail-background-color: var(--light-color, #919191);
}


/* ============================== SECTION IMAGE ============================== */

:root {
	--section-image-ratio: var(--media-ratio);
	--section-image-position: center;
}


/* ============================== IFRAME ============================== */

:root {
	--iframe-height: 2em;
	--iframe-ratio: 16/9;
	--iframe-bg-color: var(--light-color, #919191);
}



/* ====================================================================================================== */
/* ============================================= ANIMATIONS ============================================= */
/* ====================================================================================================== */

picture {
	transition: background var(--duration-fast) var(--ease) var(--duration-fast);
}
img {
	transition:
		transform var(--duration-normal) var(--ease),
		filter var(--duration-fast) var(--ease),
		opacity var(--duration-fast) var(--ease);
}
.link-label * {
	transition:
		transform var(--duration-normal) var(--ease),
		opacity var(--duration-fast) var(--ease);
}



/* ================================================================================================ */
/* ============================================= CORE ============================================= */
/* ================================================================================================ */


/* ============================== IMG ============================== */

img {
	position: relative;
	height: var(--img-height);
	width: var(--img-width);
	margin: var(--img-margin);
	aspect-ratio: var(--img-ratio);
	object-fit: var(--img-fit);
}

img[loading='lazy'] { opacity: 0; }
img::before { font-size: 0; } /* hide alt broken img */


/* ============================== PICTURE ============================== */

picture {
	position: relative;
	height: 100%;
	width: 100%;
	background-color: var(--dominant-color);
	mask-image: var(--alpha-mask, none);
	-webkit-mask-image: var(--alpha-mask, none);
	mask-size: cover; mask-repeat: no-repeat;
	-webkit-mask-size: cover; -webkit-mask-repeat: no-repeat;
}

figure[data-loaded=true]:not(.empty) picture { background-color: transparent; }


/* ============================== SVG ============================== */

svg {
	height: 100%;
	width: 100%;
	/* GPU compositing — legacy rendering fix */
	transform: translate3d(0, 0, 0);
	backface-visibility: hidden;
}


/* ============================== FIGURE ============================== */

figure {
	position: relative;
	display: flex;
	flex-direction: column;
	height: auto;
	width: 100%;
	max-width: 100%;
	align-items: flex-start;
}


/* =============== CONTENT =============== */

figure:not([class*="-size"]) picture:not([style*="aspect-ratio"]) { display: contents; }
figure img { z-index: 10; /* above .img-placeholder (z-index: 1) */ }
figure.empty img { opacity: 0; }
figure svg { width: auto; margin: auto; }


/* =============== CONTAIN =============== */

figure.contain picture { background-color: transparent; }


/* =============== CROPPED =============== */

figure.cropped {
	--img-fit: cover;
	--img-height: 100%;
}
figure.cropped.contain {
	--img-fit: contain;
	--img-height: auto;
	--img-margin: auto;
}


/* =============== COVER =============== */

figure.cover {
	--img-fit: cover;
	--img-height: 100%;
	max-width: none;
	width: 100%;
	align-items: normal;
}


/* =============== FIGCAPTION =============== */

figure figcaption {
	z-index: 20; /* wp editor fix */
	font-size: var(--figcaption-font-size);
	margin-top: var(--figcaption-gap);
}


/* ============================== LINKS ============================== */

figure a {
	position: relative;
	display: block;
	width: 100%;
	margin: auto;
}


/* ============================== LABEL ============================== */

figure a .link-label {
	position: absolute;
	inset: 0;
	z-index: 15;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	font-size: 0;
	line-height: 0;
	color: currentColor;
	opacity: 0;
}
figure a .link-label > * {
	line-height: var(--line-height, inherit);
	color: currentColor;
	transform: translateY(var(--figure-link-label-offset));
	pointer-events: none;
}
figure a .link-label .label {
	position: relative;
	font-size: var(--figure-link-font-size);
	margin-top: var(--figure-link-label-gap);
}
figure a .link-label [class^="icon-"] {
	font-size: var(--figure-link-icon-size);
}


/* =============== OVERLAY =============== */

figure a::before {
	content: '';
	position: absolute;
	z-index: 15;
	inset: 0;
	background: var(--figure-link-bg-color);
	opacity: 0;
}


/* =============== HOVER =============== */

@media (hover: hover) {
	figure a:hover::before,
	figure a:hover .link-label { opacity: 1; }
	figure a:hover .link-label > * { transform: translateY(0); }
	figure a:hover img { filter: var(--figure-link-filter); }
}
@media (hover: none) {
	figure a.hover::before,
	figure a.hover .link-label { opacity: 1; }
	figure a.hover .link-label > * { transform: translateY(0); }
	figure a.hover img { filter: var(--figure-link-filter); }
}


/* =============== FOCUS =============== */

/* Keyboard focus: visible ring (RGAA 10.7) and the same reveal as the hover */

figure a:focus-visible {
	outline: var(--figure-link-focus-width) solid var(--figure-link-focus-color);
	outline-offset: var(--figure-link-focus-offset);
}
figure a:focus-visible::before,
figure a:focus-visible .link-label { opacity: 1; }
figure a:focus-visible .link-label > * { transform: translateY(0); }
figure a:focus-visible img { filter: var(--figure-link-filter); }


/* ============================== PLACEHOLDER ============================== */

/**
 * Permanent blur layer beneath the main image.
 * Visible during load, stays visible if image fails.
 */

figure .img-placeholder {
	position: absolute;
	z-index: 1;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: blur(var(--img-placeholder-blur));
	clip-path: inset(0);
}
figure[data-loaded] .img-placeholder { opacity: 0; }


/* ============================== THUMBNAIL ============================== */

/**
 * Cropped image filling its parent box.
 * Ratio comes from the parent (--img-ratio: inherit).
 */

:where(.thumbnail) {
	--img-fit: cover;
	--img-height: 100%;
	--img-margin: 0;
	--img-ratio: inherit;
}
.thumbnail picture {
	border-radius: var(--thumbnail-border-radius);
	background-color: var(--thumbnail-background-color);
}
.thumbnail img { border-radius: var(--thumbnail-border-radius); }


/* ============================== SECTION IMAGE ============================== */

/**
 * Full-width image cropped to a ratio, bleeding out of the content width.
 * No figcaption / link-label: overflow is hidden.
 */

.section-image {
	--img-fit: cover;
	--img-height: 100%;
	--img-ratio: var(--section-image-ratio);
	width: 100%;
	max-width: none;
	margin-inline: 0;
	aspect-ratio: var(--section-image-ratio);
	overflow: hidden;
}
.section-image picture { margin: 0; }
.section-image img { object-position: var(--section-image-position); }


/* ============================== GALLERY ============================== */

.gallery {
	--img-fit: cover;
	--img-height: 100%;
	--img-ratio: inherit;
}

/* contain — whole image inside the ratio box, for two cases:
   .gallery.contain       cropped gallery, all images
   figure.cropped.contain a single image (native scale = contain, or exempt from the gallery crop)
   The image keeps filling the box (--img-height: 100%) and object-fit fits it in: the height: auto of
   figure.cropped.contain would let a portrait image overflow the box.
   figure.cropped sets its own tokens, so the figure itself is targeted. */

.gallery.contain figure.cropped,
.gallery figure.cropped.contain {
	--img-fit: contain;
	--img-height: 100%;
}
.gallery.contain figure picture { background-color: transparent; }


/* ============================== BACKGROUND ============================== */

/* !important: the markup (WP blocks, PHP) can set background and size inline; these classes win over it */

.background-container {
	position: absolute;
	z-index: -1;
	top: 0;
	left: -100%;
	right: -100%;
	height: 100%;
	width: auto;
	overflow: hidden;
	padding: 0 !important;
	margin: 0 !important;
}
.background {
	position: absolute;
	z-index: -1;
	top: 0;
	left: 0;
	height: 100%;
	width: 100%;
	margin: 0 !important;
	padding: 0 !important;
	max-width: none;
	background-size: cover !important;
	background-repeat: no-repeat !important;
	background-position: center center !important;
	pointer-events: none;
	--img-fit: cover;
	--img-height: 100%;
}
.background.contain {
	background-size: contain !important;
	background-position: left !important;
}

.bg-top-left      { background-position: top left !important; }
.bg-top-center    { background-position: top center !important; }
.bg-top-right     { background-position: top right !important; }
.bg-center-left   { background-position: center left !important; }
.bg-center-right  { background-position: center right !important; }
.bg-bottom-left   { background-position: bottom left !important; }
.bg-bottom-center { background-position: bottom center !important; }
.bg-bottom-right  { background-position: bottom right !important; }


/* ============================== IFRAME ============================== */

.iframe-container {
	position: relative;
	width: 100%;
	min-height: var(--iframe-height);
	aspect-ratio: var(--iframe-ratio, 16/9);
	background: var(--iframe-bg-color);
}
.iframe-container iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}


/* ============================== ALIGNMENT ============================== */

/* !important: beats the margin-inline of layout.css (main > *:not(section)...), higher specificity */
main > figure.is-left {
	align-self: flex-start;
	margin-left: var(--figure-align-margin) !important;
}
main > figure.is-center {
	align-self: center;
}
main > figure.is-right {
	align-self: flex-end;
	margin-right: var(--figure-align-margin) !important;
}

figure.text-left figcaption {
	text-align: left;
	margin-right: auto;
}
figure.text-center figcaption {
	text-align: center;
	margin-left: auto;
	margin-right: auto;
}
figure.text-right figcaption {
	text-align: right;
	margin-left: auto;
}


/* ============================== FLOAT ============================== */

figure.float-left,
figure.float-right { width: auto; }
figure.float-left + *,
figure.float-right + * { margin-top: 0; }
figure.float-left {
	float: left;
	margin: 0 var(--figure-gap) var(--figure-gap) 0;
}
figure.float-right {
	float: right;
	margin: 0 0 var(--figure-gap) var(--figure-gap);
}
.clear-float { clear: both; }


/* ============================== SIZES ============================== */

figure[class*="size-"] > *,
figure[class*="size-"] img {
	max-height: var(--img-height);
	max-width: var(--img-width);
	width: 100%;
}


/* ============================== VIDEO CONTROLS ============================== */

/* Hide native browser video controls (download button, panel overflow) */

video::-internal-media-controls-download-button { display: none; }
video::-webkit-media-controls-enclosure { overflow: hidden; }
video::-webkit-media-controls-panel { width: calc(100% + 32px); margin-left: auto; }