/* ==========================================================================
   melissa rosenthal — site styles
   Rebuilt from the Cargo site. Sizes are in rem, and 1rem grows with the
   window width (same as Cargo), so the layout scales like the original.
   ========================================================================== */

:root {
	/* Font: Cargo's "Repro" can't leave Cargo. Inter is the free stand-in.
	   To use another font (e.g. a licensed Diatype), change these two lines. */
	--font-main: "Inter", "Helvetica Neue", Arial, sans-serif;
	--font-mono: "Courier New", monospace;

	--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);
	--swatch-6: #1f903d;
	--swatch-7: #4e31e1;
	--footer-bg: #f9fdc3;
	--viewport-height: 100svh;
}

html {
	/* Matches Cargo's scaling: 11.06px at 1024px wide, 12.96px at 1440px wide */
	font-size: calc(6.38px + 0.457vw);
	-webkit-text-size-adjust: 100%;
}

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

body {
	margin: 0;
	background: #fff;
	color: #000;
	font-family: var(--font-main);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

/* ---------- Page structure (same class names Cargo used) ---------- */

.page {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	min-height: var(--viewport-height);
}

.page-layout {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	width: 100%;
	max-width: 100%;
	margin: 0 auto;
	padding: 1.5rem;
}

.page-content {
	width: 100%;
	padding: 0.7rem;
	text-align: left;
}

/* ---------- Text ---------- */

.bodycopy {
	font-size: 1.05rem;
	font-weight: 350;
	line-height: 1.2;
	color: #000;
	font-feature-settings: "ss03";
}

.bodycopy a { color: #000; text-decoration: none; }

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

h1 {
	margin: 0;
	font-weight: 100;
	font-size: calc(2.5rem * var(--font-scale, 1));
	line-height: 0.85;
	letter-spacing: -0.006em;
	color: rgba(255, 255, 255, 0.85);
}
h1 a { color: var(--swatch-1); text-decoration: none; }

h2 {
	margin: 0;
	font-weight: 200;
	font-size: calc(2.5rem * var(--font-scale, 1));
	line-height: 1.15;
	color: var(--swatch-2);
}
h2 a { color: var(--swatch-2); text-decoration: none; }

hr {
	display: block;
	height: 0.5px; /* hairline, like Cargo */
	margin: 0.6rem 0;
	border: 0;
	background: #000;
}
/* On Cargo, a line placed loose in the text (not inside a row) collapsed to
   zero height and only added space. Kept that way so pages look the same. */
.bodycopy > hr { height: 0; }

.heavy {
	display: block;
	font-size: 1rem;
	font-weight: 350;
	line-height: 1.3;
	letter-spacing: 0.154em;
	color: var(--swatch-2);
}
.heavy a { color: var(--swatch-2); }

.heading-3 {
	display: block;
	font-size: 1.35rem;
	font-weight: 300;
	line-height: 0.5;
	letter-spacing: 0.062em;
	padding: 0.7rem;
}

.subtext {
	display: block;
	font-size: 1rem;
	font-weight: 200;
	line-height: 1.3;
	color: rgba(0, 0, 0, 0.49);
}

.tag {
	display: inline-block;
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: 0.08em;
}

.caption {
	display: block;
	margin-top: 0.5em;
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.2;
	color: var(--swatch-2);
}

sub { position: relative; vertical-align: baseline; top: 0.3em; }
sup { position: relative; vertical-align: baseline; top: -0.4em; }
ul, ol { margin: 0; padding: 0 0 0 2em; }
blockquote { margin: 0; padding: 0 0 0 2em; }

/* ---------- 12-column rows (Cargo "column sets") ---------- */

.cols {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	column-gap: var(--gutter, 1rem);
}
.col { grid-column: span var(--span, 12); min-width: 0; }

/* ---------- Images & video ---------- */

figure { margin: 0; }

.media {
	display: block;
	width: var(--media-width, 100%);
	max-width: 100%;
	margin: 0 auto;
}
.media img,
.media video {
	display: block;
	width: 100%;
	height: auto;
}
.media.limit-height { width: auto; }
.media.limit-height img,
.media.limit-height video {
	width: auto;
	max-width: 100%;
	height: var(--media-height);
	margin: 0 auto;
}
.media.limit-fit img,
.media.limit-fit video {
	width: auto;
	max-width: 100%;
	max-height: var(--viewport-height);
	margin: 0 auto;
}
.zoomable img { cursor: zoom-in; }

.embed { position: relative; width: 100%; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Galleries ---------- */

.gallery { width: 100%; }

/* justified rows */
.gallery-justify {
	display: flex;
	flex-wrap: wrap;
	gap: var(--gutter);
}
.gallery-justify .media {
	width: auto;
	margin: 0;
	flex: var(--ar, 1) 1 calc(var(--row-height) * var(--ar, 1));
}
.gallery-justify .row-break { flex-basis: 100%; height: 0; }
.gallery-justify::after { content: ""; flex: 999 1 0; }

/* grid */
.gallery-grid {
	display: grid;
	grid-template-columns: repeat(var(--columns), minmax(0, 1fr));
	gap: var(--gutter);
}

/* masonry columns */
.gallery-columnized {
	column-count: var(--columns);
	column-gap: var(--gutter);
}
.gallery-columnized .media {
	break-inside: avoid;
	margin-bottom: var(--gutter);
}

/* freeform (pieces placed by position) */
.gallery-freeform {
	position: relative;
	container-type: inline-size;
}
.gallery-freeform .media {
	position: absolute;
	left: calc(var(--x) * 1%);
	top: calc(var(--y) * 1cqw);
	width: calc(var(--w) * 1%);
	margin: 0;
}

/* slideshow */
.gallery-slideshow { position: relative; }
.gallery-slideshow .media { display: none; }
.gallery-slideshow .media.on { display: block; }
.gallery-slideshow .nav {
	position: absolute;
	top: 50%;
	width: 30px;
	height: 30px;
	margin-top: -15px;
	border: 0;
	border-radius: 50%;
	background: rgba(87, 87, 87, 0.35);
	cursor: pointer;
	z-index: 2;
}
.gallery-slideshow .nav::before {
	content: "";
	position: absolute;
	top: 50%; left: 50%;
	width: 8px; height: 8px;
	border: solid rgba(255, 255, 255, 0.9);
	border-width: 1.5px 1.5px 0 0;
	transform: translate(-65%, -50%) rotate(45deg);
}
.gallery-slideshow .prev { left: 15px; }
.gallery-slideshow .prev::before { transform: translate(-35%, -50%) rotate(-135deg); }
.gallery-slideshow .next { right: 15px; }
.gallery-slideshow .nav:active { opacity: 0.7; }

/* ---------- Home: full-screen slideshow behind the name ---------- */

.home-header { min-height: var(--viewport-height); }
.wallpaper {
	position: absolute;
	inset: 0;
	overflow: hidden;
	background: #000;
}
.wallpaper .slide {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	transition: opacity var(--fade, 1s) ease-in-out;
}
.wallpaper .slide.on { opacity: 1; }

/* ---------- Footer ---------- */

footer.page { min-height: auto; }
footer .page-content { padding: 0; }

/* ---------- Lightbox (click an image to enlarge) ---------- */

.lightbox {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 3rem;
	background: #b8b8b8;
	cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img,
.lightbox video {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}
.lightbox .nav {
	position: absolute;
	top: 50%;
	width: 30px; height: 30px;
	margin-top: -15px;
	border: 0;
	border-radius: 50%;
	background: rgba(87, 87, 87, 0.35);
	cursor: pointer;
}
.lightbox .prev { left: 20px; }
.lightbox .next { right: 20px; }
.lightbox .nav::before {
	content: "";
	position: absolute;
	top: 50%; left: 50%;
	width: 8px; height: 8px;
	border: solid rgba(255, 255, 255, 0.9);
	border-width: 1.5px 1.5px 0 0;
	transform: translate(-65%, -50%) rotate(45deg);
}
.lightbox .prev::before { transform: translate(-35%, -50%) rotate(-135deg); }

/* ==========================================================================
   Phones
   ========================================================================== */

@media (max-width: 767px) {
	html { font-size: calc(0.8px + 0.414vw); }

	.bodycopy { font-size: 6.25rem; }
	h1 { font-size: calc(10.5rem * var(--font-scale, 1)); font-weight: 352; }
	h2 { font-size: calc(14rem * var(--font-scale, 1)); }
	.heavy { font-size: 4rem; color: rgba(4, 4, 4, 0.75); }
	.subtext { font-size: 1.25rem; }
	.tag { font-size: 1.35rem; }
	.caption { font-size: 4rem; line-height: 1.65; }

	.page-layout { padding: 4vw !important; max-width: 100% !important; }
	.page-content { padding: 2.5vw !important; }
	footer .page-content { padding: 0 !important; }

	/* rows stack into one column unless told not to */
	.cols:not(.no-stack) { display: block; }
	.cols:not(.no-stack):not(.keep-empty) > .col.empty { display: none; }
	.cols.no-stack { column-gap: var(--mobile-gutter, var(--gutter)); }
	/* the live site shows no divider lines on phones */
	.cols:not(.no-stack) hr { height: 0; }

	/* images go full width on phones */
	.media { width: 100%; }

	.gallery-justify { gap: var(--mobile-gutter); }
	.gallery-justify .media { flex-basis: calc(var(--row-height) * var(--ar, 1) * 2.5); }
	.gallery-grid { grid-template-columns: repeat(var(--mobile-columns), minmax(0, 1fr)); gap: var(--mobile-gutter); }
	.gallery-columnized { column-count: var(--mobile-columns); column-gap: var(--mobile-gutter); }

	.lightbox { padding: 10px; }
}
