/*
 * Structural styles: layout, galleries, backdrops.
 * The look of the site lives in style.css (your site CSS) and pages.css (per-page CSS).
 */

html {
	font-size: 1.44vmin; /* replaced by assets/js base unit script */
	-webkit-text-size-adjust: 100%;
	overflow-x: clip;
}

*, *::before, *::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	min-height: 100vh;
	-webkit-font-smoothing: antialiased;
	overflow-x: clip;
}

bodycopy {
	display: block;
	overflow-wrap: break-word;
}

.gallery_image_caption {
	overflow-wrap: anywhere;
}

.clearfix::after {
	content: "";
	display: table;
	clear: both;
}

a {
	color: inherit;
	text-decoration: none;
}

h1, h2 {
	margin: 0;
}

.page_content img {
	max-width: 100%;
	height: auto;
	vertical-align: bottom;
}

.page_content iframe {
	max-width: 100%;
}

/* -------------------------------------------------- pages */

.page_container {
	position: relative;
	isolation: isolate;
}

.page {
	position: relative;
	z-index: 1;
}

.pinned-top {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 100;
	pointer-events: none;
}

.pinned-top a,
.pinned-top img {
	pointer-events: auto;
}

/* -------------------------------------------------- backdrops */

.backdrop {
	position: absolute;
	inset: 0;
	z-index: 0;
	clip-path: inset(0);
	pointer-events: none;
}

.backdrop-inner {
	position: sticky;
	top: 0;
	width: 100%;
	height: 100vh;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

.backdrop-overlay {
	position: absolute;
	inset: 0;
}

.backdrop canvas {
	display: block;
	width: 100%;
	height: 100%;
	opacity: 0;
	transition: opacity 0.6s ease-in-out;
}

.backdrop canvas.ready {
	opacity: 1;
}

/* -------------------------------------------------- column grid */

[grid-row] {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
}

[grid-col] {
	flex: 0 0 auto;
	min-width: 0;
}

[grid-col^="x"] { flex: 1 1 0; }
[grid-col="1"]  { width: 8.3333%; }
[grid-col="2"]  { width: 16.6667%; }
[grid-col="3"]  { width: 25%; }
[grid-col="4"]  { width: 33.3333%; }
[grid-col="5"]  { width: 41.6667%; }
[grid-col="6"]  { width: 50%; }
[grid-col="7"]  { width: 58.3333%; }
[grid-col="8"]  { width: 66.6667%; }
[grid-col="9"]  { width: 75%; }
[grid-col="10"] { width: 83.3333%; }
[grid-col="11"] { width: 91.6667%; }
[grid-col="12"] { width: 100%; }

body.mobile [grid-responsive] > [grid-col] {
	flex: 0 0 100%;
	width: 100%;
}

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

.gallery {
	position: relative;
	text-align: center;
}

.g-card {
	display: block;
	position: relative;
}

.g-img {
	position: relative;
	height: 0;
}

.g-img img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
}

.gallery_image_caption {
	position: relative;
}

/* freeform layout, positioned in % of the gallery's width */
.montessori {
	padding-bottom: var(--gh);
	margin-bottom: 3rem;
}

.montessori > .g-card {
	position: absolute;
	padding: calc(var(--pad) * 0.1rem);
}

/* phones: stacked columns */
body.mobile .montessori {
	column-count: var(--mcols);
	column-gap: 1rem;
	padding: 0 2rem;
}

body.mobile .montessori > .g-card {
	position: relative;
	break-inside: avoid;
	margin-bottom: 1rem;
	left: auto !important;
	top: auto !important;
	margin-top: 0 !important;
	width: auto !important;
}

.grid {
	display: grid;
	grid-template-columns: repeat(var(--cols), 1fr);
	gap: calc(var(--pad) * 0.5rem);
	align-items: center;
}

body.mobile .grid {
	grid-template-columns: repeat(var(--mcols), 1fr);
}

.justify {
	display: flex;
	flex-wrap: wrap;
	gap: calc(var(--pad) * 0.5rem);
}

.justify .justify-end {
	flex: 1000 1 0;
}

/* slideshow */
.slideshow {
	position: relative;
	width: 100%;
	user-select: none;
}

.ss-track {
	position: relative;
	width: 100%;
	aspect-ratio: var(--ar);
	overflow: hidden;
	transition: aspect-ratio 0.4s ease;
}

.slideshow[data-constrain="1"] .ss-track {
	max-height: 85vh;
}

.ss-slide {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	transform: translateX(100%);
	transition-property: transform;
	transition-timing-function: ease-in-out;
}

.ss-slide.active {
	transform: translateX(0);
}

.ss-slide.prev {
	transform: translateX(-100%);
}

.ss-slide.no-anim {
	transition: none !important;
}

.ss-slide a {
	display: contents;
}

.ss-slide img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.ss-prev,
.ss-next {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 50%;
	border: 0;
	padding: 0;
	background: transparent;
	z-index: 2;
	cursor: inherit;
}

.ss-prev { left: 0; }
.ss-next { right: 0; }

.ss-caption {
	min-height: 1em;
	margin-top: 0.5rem;
	font-size: 1.2rem;
}

/* -------------------------------------------------- image zoom */

.zoom-view {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 5rem;
	background: rgba(246, 243, 255, 0.6);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	opacity: 0;
	transition: opacity 0.2s ease;
}

.zoom-view.open {
	opacity: 1;
}

.zoom-view img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

body.mobile .zoom-view {
	padding: 1rem;
}

.zoomable-img {
	cursor: zoom-in;
}

@media (prefers-reduced-motion: reduce) {
	.ss-slide {
		transition: none !important;
	}
}

/* generated grid spacing */
[grid-row][grid-gutter="0"]{margin:0 -0rem}
[grid-col][grid-pad="0"]{padding:0rem}
[grid-row][grid-gutter="0.5"]{margin:0 -0.25rem}
[grid-col][grid-pad="0.5"]{padding:0.25rem}
[grid-row][grid-gutter="1"]{margin:0 -0.5rem}
[grid-col][grid-pad="1"]{padding:0.5rem}
[grid-row][grid-gutter="1.25"]{margin:0 -0.625rem}
[grid-col][grid-pad="1.25"]{padding:0.625rem}
[grid-row][grid-gutter="1.75"]{margin:0 -0.875rem}
[grid-col][grid-pad="1.75"]{padding:0.875rem}
[grid-row][grid-gutter="2"]{margin:0 -1rem}
[grid-col][grid-pad="2"]{padding:1rem}
[grid-row][grid-gutter="2.5"]{margin:0 -1.25rem}
[grid-col][grid-pad="2.5"]{padding:1.25rem}
[grid-row][grid-gutter="3.5"]{margin:0 -1.75rem}
[grid-col][grid-pad="3.5"]{padding:1.75rem}
[grid-row][grid-gutter="4"]{margin:0 -2rem}
[grid-col][grid-pad="4"]{padding:2rem}
[grid-row][grid-gutter="5"]{margin:0 -2.5rem}
[grid-col][grid-pad="5"]{padding:2.5rem}
[grid-row][grid-gutter="7"]{margin:0 -3.5rem}
[grid-col][grid-pad="7"]{padding:3.5rem}
[grid-row][grid-gutter="8"]{margin:0 -4rem}
[grid-col][grid-pad="8"]{padding:4rem}
[grid-row][grid-gutter="10"]{margin:0 -5rem}
[grid-col][grid-pad="10"]{padding:5rem}
