/* Layout rules that Cargo's own engine used to provide. site.css (the original Cargo stylesheet) loads after this. */
html { font-size: calc(8.247px + 0.3273vw); --mobile-scale: 1.2; }
@media (max-width: 767px) { html { font-size: 2.688vw; } }
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
img, video, iframe { max-width: 100%; }

/* pages */
.page { position: relative; display: flex; justify-content: center; width: 100%; }
.backdrop { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.page-layout { position: relative; z-index: 1; width: 100%; display: flex; min-height: inherit; }
.page-content { width: 100%; display: flex; min-height: inherit; } /* a row: align-items in page CSS sets vertical position, like Cargo */
bodycopy { width: 100%; }
.bg-video { position: absolute; top: 50%; left: 50%; width: 177.78vh; min-width: 100%; height: 56.25vw; min-height: 100%; transform: translate(-50%, -50%); border: 0; pointer-events: none; }

/* pinned pages (navs) */
.pinned { z-index: 50; pointer-events: none; }
.pinned .page-layout { pointer-events: auto; }
.pinned.fixed { position: fixed; left: 0; right: 0; max-height: 100vh; overflow-y: auto; }
.pinned.overlay:not(.fixed) { position: absolute; left: 0; right: 0; z-index: 40; }
.pinned.overlay:not(.fixed).pinned-top { top: 0; }
.pinned.overlay:not(.fixed).pinned-bottom { bottom: 0; }
.pinned.adjust:not(.fixed) { position: relative; }
.pinned.fixed.adjust.pinned-top { position: sticky; }
.pinned.fixed.pinned-top { top: 0; }
.pinned.fixed.pinned-bottom { bottom: 0; }
.pinned.fixed:not(.overlay).pinned-top { position: sticky; }
body.mobile .only-desktop, body:not(.mobile) .only-mobile { display: none !important; }
body.mobile .page-layout { max-width: 100% !important; } /* Cargo mobile setting "pages full width" */

/* columns: spans share the row like Cargo's 12-column flex layout */
column-set { display: flex; gap: var(--gutter, 1rem); width: 100%; }
column-unit { display: block; flex: var(--span, 1) 1 0%; min-width: 0; }
body.mobile column-set:not(.no-mobile-stack) { flex-direction: column; gap: var(--mobile-gutter, var(--gutter, 1rem)); }
body.mobile column-set:not(.no-mobile-stack) > column-unit:empty { display: none; }

/* media */
media-item { display: inline-block; width: 100%; max-width: var(--scale, 100%); vertical-align: bottom; }
media-item .media { display: block; width: 100%; height: auto; }
media-item.limit-height { width: auto; max-width: none; }
media-item.limit-height .media { height: var(--scale); width: auto; box-sizing: content-box; }
media-item.embed .media { aspect-ratio: 16 / 9; height: auto; border: 0; }
media-item a { display: block; }
.zoomable .media { cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .92); display: flex; align-items: center; justify-content: center; cursor: zoom-out; padding: 2rem; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* galleries */
gallery-grid { display: grid; grid-template-columns: repeat(var(--columns, 3), minmax(0, 1fr)); gap: var(--gutter, 1rem); width: 100%; }
body.mobile gallery-grid { grid-template-columns: repeat(var(--mobile-columns, 1), minmax(0, 1fr)); gap: var(--mobile-gutter, var(--gutter, 1rem)); }
gallery-grid media-item, gallery-columnized media-item { width: 100%; }
gallery-grid .thumbnail { display: block; text-decoration: none; color: inherit; }
gallery-justify { display: flex; flex-wrap: wrap; gap: var(--gutter, 1rem); width: 100%; }
gallery-justify > media-item { flex: 1 1 auto; width: auto; height: var(--row-height, 20rem); }
gallery-justify > media-item .media { height: 100%; width: 100%; object-fit: cover; }
body.mobile gallery-justify > media-item { height: auto; flex-basis: 100%; }
gallery-columnized { display: block; columns: var(--columns, 3); column-gap: var(--gutter, 1rem); }
gallery-slideshow { display: block; position: relative; width: 100%; }
gallery-slideshow > media-item { display: none; width: 100%; }
gallery-slideshow > media-item.active { display: block; }
gallery-slideshow .ss-nav { position: absolute; top: 0; bottom: 0; width: 50%; background: none; border: 0; cursor: pointer; }
gallery-slideshow .ss-prev { left: 0; cursor: w-resize; }
gallery-slideshow .ss-next { right: 0; cursor: e-resize; }

/* misc Cargo elements */
.text-icon { display: inline-block; line-height: 1; }
.text-icon svg { width: 1em; height: 1em; fill: currentColor; vertical-align: -0.12em; }
.audio-player { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.audio-player audio { height: 2.6rem; max-width: 100%; }
bodycopy iframe { border: 0; }
.not-found { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #eeeae0; font: 1.6rem/1.4 "Diatype Mono Variable", monospace; }
