/* libbyclarke.com: static copy of the Cargo site.
   Part 1 reproduces Cargo's layout engine (pages, columns, galleries, media).
   Part 2 is the site's own stylesheet, carried over from Cargo.
   Sizes use rem. The root size (--base-size) is set by a small script in each
   page's <head>, following the way Cargo scales a site to the window. */

/* ---------- Part 1: layout engine ---------- */
html { --mobile-scale: 1.25; --mobile-padding-offset: 0.27; --gs: 1; font-size: var(--base-size, 1.44vh); touch-action: manipulation; }
html.mobile { font-size: calc(var(--base-size, 2.154vw) * var(--mobile-scale)); --gs: var(--mobile-padding-offset); }
html, body { margin: 0; padding: 0; min-height: 100vh; }
body { -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; text-size-adjust: none; display: flex; flex-direction: column; width: 100%; background-color: #fff; }
body.no-scroll { overflow: hidden; }
*, *::before, *::after { box-sizing: border-box; }

.content { display: flex; flex-direction: column; align-items: stretch; flex-grow: 1; min-height: 100vh; }
.pages { width: 100%; flex: 1 0 auto; }
.page { display: flex; justify-content: center; width: 100%; max-width: 100%; }
.page-layout { width: 100%; max-width: 100%; display: flex; align-items: flex-start; }
.page-content { width: 100%; padding: 4rem 7rem; text-align: left; }
.mobile .page-content { padding: calc(4rem * var(--gs)) calc(7rem * var(--gs)); }
.mobile .desktop-only, html:not(.mobile) .mobile-only { display: none; }

bodycopy { display: block; overflow-wrap: break-word; position: relative; max-width: 100%; width: 100%; --font-scale: 1; }
a { color: inherit; }
h1, h2, h3 { margin: 0; }

/* columns: a 12-column grid, as in Cargo */
column-set { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter, 2rem); align-items: start; width: 100%; }
column-unit { display: block; min-width: 0; grid-column: span var(--span, 6); }
column-set:has(> column-unit:nth-child(3):last-child) > column-unit:not([span]) { --span: 4; }
column-set:has(> column-unit:nth-child(4):last-child) > column-unit:not([span]) { --span: 3; }
.mobile column-set:not([mobile-stack="false"]) { grid-template-columns: minmax(0, 1fr); row-gap: calc(var(--mgutter, var(--gutter, 2rem)) * var(--gs)); }
.mobile column-set:not([mobile-stack="false"]) > column-unit { grid-column: auto; }
.mobile column-set:not([mobile-stack="false"]):not([mobile-hide-empty="false"]) > column-unit:empty { display: none; }
.mobile column-set[mobile-stack="false"] { column-gap: calc(var(--gutter, 2rem) * var(--gs)); }

/* Cargo adds a gutter above a block that directly follows another block */
:is(column-set, gallery-grid, gallery-columnized, gallery-justify, gallery-slideshow) + :is(column-set, gallery-grid, gallery-columnized, gallery-justify, gallery-slideshow) { margin-top: calc(var(--gutter, 2rem) * var(--gs)); }

/* media */
media-item { display: inline-flex; flex-direction: column; vertical-align: bottom; position: relative; width: var(--w, 100%); max-width: 100%; margin: 0; }
media-item > img, media-item > a > img, media-item > video { display: block; width: 100%; height: auto; }
media-item > a { display: block; }
media-item.zoomable > img { cursor: zoom-in; }
media-item .embed { position: relative; width: 100%; background: #000; }
media-item .embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
bodycopy iframe { border: 0; max-width: 100%; }

/* grid gallery */
gallery-grid { display: grid; justify-items: stretch; grid-template-columns: repeat(var(--columns, 3), minmax(0, 1fr)); gap: calc(var(--gutter, 2rem) * var(--gs)); width: 100%; align-items: start; }
.mobile gallery-grid { grid-template-columns: repeat(var(--mcolumns, 2), minmax(0, 1fr)); gap: calc(var(--mgutter, var(--gutter, 2rem)) * var(--gs)); }
gallery-grid > media-item[grid-span="2"] { grid-column: span 2; }
gallery-grid[vertical-align="center"] > media-item { align-self: center; }

/* columnized gallery: site.js sorts items into columns, shortest column first */
gallery-columnized { display: flex; align-items: flex-start; flex-wrap: wrap; gap: calc(var(--gutter, 1rem) * var(--gs)); width: 100%; }
.mobile gallery-columnized { gap: calc(var(--mgutter, var(--gutter, 1rem)) * var(--gs)); }
gallery-columnized > .col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: inherit; }
gallery-columnized.ready { flex-wrap: nowrap; }
gallery-columnized:not(.ready) > media-item { width: calc((100% - (var(--columns, 3) - 1) * var(--gutter, 1rem)) / var(--columns, 3)); }

/* justified gallery: site.js packs items into rows of equal height */
gallery-justify { display: flex; flex-wrap: wrap; align-items: flex-start; width: 100%; gap: calc(var(--gutter, 1rem) * var(--gs)); }
.mobile gallery-justify { gap: calc(var(--mgutter, var(--gutter, 1rem)) * var(--gs)); }
gallery-justify:not(.ready) > media-item { width: calc(22rem * var(--ar, 1)); flex-grow: 1; max-width: 100%; }
gallery-justify.ready { display: block; }
gallery-justify .justify-row { display: flex; align-items: flex-start; gap: inherit; }
gallery-justify .justify-row + .justify-row { margin-top: calc(var(--gutter, 1rem) * var(--gs)); }
.mobile gallery-justify .justify-row + .justify-row { margin-top: calc(var(--mgutter, var(--gutter, 1rem)) * var(--gs)); }
gallery-justify .justify-row > media-item { flex: none; }

/* slideshow */
gallery-slideshow { display: block; position: relative; width: 100%; overflow: hidden; }
gallery-slideshow[data-fixed-height] { height: var(--slide-height, 50rem); }
gallery-slideshow > media-item { position: absolute; inset: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.8s cubic-bezier(0.24, 0, 0.29, 1); pointer-events: none; }
gallery-slideshow > media-item.active { opacity: 1; pointer-events: auto; }
gallery-slideshow > media-item > img { width: 100%; height: 100%; object-fit: contain; }
gallery-slideshow:not([data-fixed-height]) { aspect-ratio: var(--fit-ar, 1.5); }
.mobile gallery-slideshow[data-fixed-height] { height: auto; aspect-ratio: var(--fit-ar, 1.5); }
.slideshow-nav { position: absolute; top: 50%; width: 30px; height: 30px; margin-top: -15px; padding: 0; border: 0; border-radius: 50%; background: rgba(87, 87, 87, 0.35); cursor: pointer; opacity: 0; transition: opacity 0.2s ease-in-out; z-index: 2; }
.slideshow-nav svg { display: block; width: 100%; height: 100%; fill: none; stroke: rgba(255, 255, 255, 0.9); stroke-width: 1.5px; }
.slideshow-nav.prev { left: 15px; } .slideshow-nav.next { right: 15px; }
.slideshow-nav.next svg { transform: scaleX(-1); }
gallery-slideshow:hover .slideshow-nav, .mobile .slideshow-nav, .slideshow-nav:focus-visible { opacity: 1; }
.slideshow-nav:active { opacity: 0.7; }
.mobile .slideshow-nav.prev { left: 10px; } .mobile .slideshow-nav.next { right: 10px; }

/* icons */
text-icon { display: inline-block; position: relative; aspect-ratio: 1; height: 1.2em; width: auto; margin-top: -1em; margin-bottom: -0.25em; vertical-align: baseline; }
text-icon svg { display: block; position: absolute; inset: 0; width: 100%; height: 100%; fill: currentColor; }

/* quick view (image zoom) */
.quick-view { position: fixed; inset: 0; z-index: 5000; display: flex; align-items: center; justify-content: center; padding: 3rem; background-color: #ffffff; cursor: zoom-out; }
.quick-view[hidden] { display: none; }
.quick-view img, .quick-view video { transform: none !important; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.quick-view .slideshow-nav { opacity: 1; position: fixed; }
.quick-view .slideshow-nav.prev { left: 20px; } .quick-view .slideshow-nav.next { right: 20px; }
.quick-view-close { position: fixed; top: 20px; right: 20px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(87, 87, 87, 0.35); color: rgba(255, 255, 255, 0.9); font: 20px/30px Helvetica, Arial, sans-serif; padding: 0; cursor: pointer; }
.mobile .quick-view { padding: 10px; }

/* contact form, shown over the page as on Cargo */
.contact-form { position: fixed; inset: 0; z-index: 6000; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.4); padding: 16px; }
.contact-form[hidden] { display: none; }
.contact-dialog { width: 450px; max-width: 100%; height: 600px; max-height: 90vh; display: flex; flex-direction: column; background: #fff; border-radius: 3px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25); font: 13px/1.4 -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif; color: rgba(0, 0, 0, 0.85); }
.contact-head { position: relative; text-align: center; font-weight: 700; padding: 12px 40px; border-bottom: 1px solid rgba(0, 0, 0, 0.1); }
.contact-close { position: absolute; right: 10px; top: 9px; width: 20px; height: 20px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.25); color: #fff; font-size: 15px; line-height: 20px; padding: 0; cursor: pointer; }
.contact-dialog form { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.contact-dialog input, .contact-dialog textarea { border: 0; outline: 0; font: inherit; color: inherit; padding: 10px 12px; width: 100%; background: transparent; }
.contact-dialog input { border-bottom: 1px solid rgba(0, 0, 0, 0.1); }
.contact-dialog textarea { flex: 1; resize: none; }
.contact-note { margin: 0; padding: 8px 12px; color: #063acc; border-top: 1px solid rgba(0, 0, 0, 0.1); }
.contact-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid rgba(0, 0, 0, 0.1); }
.contact-actions button { font: inherit; border: 0; border-radius: 10em; padding: 6px 16px; min-width: 120px; text-align: left; cursor: pointer; }
.contact-cancel { background: rgba(0, 0, 0, 0.12); color: rgba(0, 0, 0, 0.75); }
.contact-send { background: rgba(0, 0, 0, 0.85); color: #fff; font-weight: 700; }

/* pinned pages, backdrops and split pages */
header.pinned-top.desktop-only { position: sticky; top: 0; z-index: 100; }
.page { position: relative; }
.page.has-backdrop { min-height: var(--viewport-height, 100vh); background: #091937; overflow: hidden; }
.page.has-backdrop > .page-layout { position: relative; z-index: 1; align-self: center; align-items: center; }
.backdrop { position: absolute; inset: 0; overflow: hidden; }
.backdrop-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.backdrop-video { position: absolute; inset: 0; pointer-events: none; }
.backdrop-video iframe { position: absolute; top: 50%; left: 50%; width: 100%; height: 100%; min-width: calc(var(--bh, 100vh) * 1.7778); min-height: calc(var(--bw, 100vw) * 0.5625); transform: translate(-50%, -50%); border: 0; }
.backdrop-tint { position: absolute; inset: 0; background: #091937; opacity: 0.25; }
.mobile .page.has-backdrop .backdrop-video { display: none; }
.page.split-page { min-height: var(--viewport-height, 100vh); align-items: stretch; }
.page.split-page > .backdrop.split { position: sticky; inset: auto; top: 0; align-self: flex-start; height: var(--viewport-height, 100vh); width: 50%; order: 1; background: #000; }
.page.split-page > .page-layout { width: 50%; max-width: 50%; }
.mobile .page.split-page { flex-direction: column; }
.mobile .page.split-page > .backdrop.split { position: relative; order: 0; width: 100%; height: 50vh; }
.mobile .page.split-page > .page-layout { width: 100%; max-width: 100%; }

media-item figcaption { display: block; }
media-item[data-missing] { display: none; }
media-item.no-image { border-top: 1px solid rgba(0, 0, 0, 0.75); }
audio { width: 32rem; max-width: 100%; }
small { font-size: 0.8em !important; }

/* ---------- Part 2: the site's stylesheet, from Cargo ---------- */
/* Inter, self-hosted (SIL Open Font License; see assets/fonts/Inter-LICENSE.txt) */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/inter-latin-wght-normal.woff2") format("woff2-variations"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 100 900; font-display: swap; src: url("fonts/inter-latin-ext-wght-italic.woff2") format("woff2-variations"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 100 900; font-display: swap; src: url("fonts/inter-latin-wght-italic.woff2") format("woff2-variations"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

body {
	--swatch-1: rgba(0, 0, 0, 0.85);
	--swatch-2: rgba(0, 0, 0, 0.75);
	--swatch-3: rgba(0, 0, 0, 0.6);
	--swatch-4: rgba(0, 0, 0, 0.4);
	--swatch-5: rgba(0, 0, 0, 0.25);
}

a:active, .linked:active, .zoomable > img:active { opacity: 0.7; }

sub { position: relative; vertical-align: baseline; top: 0.3em; }
sup { position: relative; vertical-align: baseline; top: -0.4em; }
.small-caps { font-variant: small-caps; text-transform: lowercase; }
ol { margin: 0; padding: 0 0 0 2.5em; }
ul { margin: 0; padding: 0 0 0 2.0em; }
ul.lineated { padding: 0; list-style-type: none; margin: 0 0 0 3em; text-indent: -3em; }
blockquote { margin: 0; padding: 0 0 0 2em; }
hr { background: rgba(0, 0, 0, 0.75); border: 0; height: 1px; display: block; }

bodycopy {
	--font-size: 1.7rem;
	font-weight: 400;
	color: rgba(0, 0, 0, 0.85);
	font-family: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-style: normal;
	line-height: 1.5;
	letter-spacing: 0;
}
.mobile bodycopy { --font-size: 1.9rem; }
bodycopy, bodycopy * { font-size: calc(var(--font-scale) * var(--font-size)); }
bodycopy a { color: #ff3e01; text-decoration: none; }

h1 {
	--font-size: 6.4rem;
	font-family: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-style: normal;
	line-height: 1;
	color: #000000;
	letter-spacing: -0.009em;
	font-weight: 900;
	display: block;
}
.mobile h1 { --font-size: 3.4rem; }
h1 a { color: #000000; text-decoration: none; }

h2 {
	--font-size: 2.15rem;
	font-family: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-style: normal;
	font-weight: 700;
	color: rgba(0, 0, 0, 0.75);
	line-height: 1.35;
	display: block;
	letter-spacing: 0;
}
h2 a { color: rgba(0, 0, 0, 0.75); text-decoration: none; }

.caption {
	--font-size: 1.3rem;
	font-weight: 600;
	color: rgba(0, 0, 0, 0.74);
	font-family: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-style: normal;
	line-height: 1.5;
	letter-spacing: 0.067em;
	display: inline-block;
	text-transform: uppercase;
	border: 0.5rem solid #ffffff;
}
.caption a { color: #ff3e01; text-decoration: none; }
media-item .caption { margin-top: .5em; }
gallery-grid .caption, gallery-columnized .caption, gallery-justify .caption { margin-bottom: .5em; }
[thumbnail-index] .caption { text-align: center; display: block; }

.h2 {
	--font-size: 3.95rem;
	font-weight: 700;
	color: rgba(0, 0, 0, 0.99);
	font-family: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-style: normal;
	line-height: 1.35;
	letter-spacing: 0.006em;
	display: block;
	text-transform: uppercase;
}
.mobile .h2 { --font-size: 2.4rem; }
.h2 a { color: #ff3e01; text-decoration: none; }

.h3 {
	--font-size: 2.2rem;
	font-weight: 600;
	color: rgba(0, 0, 0, 0.85);
	font-family: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-style: normal;
	line-height: 1.25;
	letter-spacing: 0;
	display: block;
	text-transform: uppercase;
}
.mobile .h3 { --font-size: 2.4rem; }
.h3 a { color: #ff3e01; text-decoration: none; }

.headerbig {
	--font-size: 7rem;
	font-weight: 600;
	font-family: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-style: normal;
	line-height: 1.2;
	letter-spacing: -0.018em;
	display: block;
	color: #ffffff;
}
.mobile .headerbig { --font-size: 4.2rem; }
.headerbig a { color: #ff3e01; text-decoration: none; }

.small-text {
	--font-size: 1.2rem;
	font-weight: 700;
	color: rgba(0, 0, 0, 0.85);
	font-family: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-style: normal;
	line-height: 1.5;
	letter-spacing: 0;
	display: block;
}
.mobile .small-text { --font-size: 1.6rem; }
.small-text a, a.small-text { color: #ff3e01; text-decoration: none; }

.small-copy-text {
	--font-size: 1.35rem;
	font-weight: 400;
	color: rgba(0, 0, 0, 0.85);
	font-family: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-style: normal;
	line-height: 1.5;
	letter-spacing: 0;
	display: block;
}
.mobile .small-copy-text { --font-size: 1.6rem; }
.small-copy-text a { color: #ff3e01; text-decoration: none; }

.twoColText { column-count: 2; column-gap: 30px; text-align: justify; }
@media screen and (max-width: 770px) { .twoColText { column-count: unset; text-align: left; } }

/* per-page settings carried over from Cargo */
header.pinned-top.desktop-only .page-content { background-color: #000000; padding: 2rem 7rem 1rem; }
.page[data-page="reel"] .page-content { padding: 7rem; text-align: right; }
.mobile .page[data-page="reel"] .page-content { padding: calc(7rem * var(--gs)); }
.page[data-page="index"] { min-height: var(--viewport-height, 100vh); background-color: #ffffff; }
footer.pinned-bottom .page-content { padding-top: 0; padding-bottom: 0; background-color: #ffffff; }
.page[data-page="spiritual-autobiography"] .page-content, .page[data-page="january-2026-1"] .page-content { padding: 4rem 7rem; }
.mobile .page[data-page="spiritual-autobiography"] .page-content, .mobile .page[data-page="january-2026-1"] .page-content { padding: calc(4rem * var(--gs)) calc(7rem * var(--gs)); }
.page[data-page="daily-prayers"] .page-content { padding-bottom: 0; }
