/* Rolies Architects — rebuild of rolies.com (Cargo 3 site), values taken from the live stylesheet */

:root {
	--bg: #f5f5f5;
	--ink: rgba(0, 0, 0, 0.85);
	--ink-2: rgba(0, 0, 0, 0.75);
	--caption: rgba(0, 0, 0, 0.59);
	--nav: rgba(68, 68, 68, 0.85);
	--serif: "Newsreader", "Arizona Text Variable", Georgia, serif;
	--pad: 3.7rem;
	/* Cargo scales the whole site with the viewport */
	font-size: min(1.08vw, 1.44vh);
}

@media (max-width: 767px) {
	:root {
		font-size: 2.912vw;
		--pad: calc(3.7rem * 0.45);
	}
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
	background-color: var(--bg);
	color: var(--ink);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
a:active, .zoomable img:active { opacity: 0.7; }
img { display: block; max-width: 100%; height: auto; }

.bodycopy {
	font-family: var(--serif);
	font-size: 1.2rem;
	font-weight: 300;
	line-height: 1.2;
	letter-spacing: 0;
	color: var(--ink);
}

.bodycopy b { font-weight: 500; }

.caption {
	display: block;
	font-family: var(--serif);
	font-size: 0.9rem;
	font-weight: 300;
	line-height: 1.9;
	letter-spacing: -0.016em;
	color: var(--caption);
	text-align: left;
}

.body-copy-blank {
	display: block;
	font-family: var(--serif);
	font-size: 1.4rem;
	font-weight: 300;
	line-height: 1.2;
	color: var(--bg); /* intentionally invisible, as on the original */
}

.nav {
	display: block;
	font-family: var(--serif);
	font-size: 1.05rem;
	font-weight: 300;
	line-height: 1.45;
	color: var(--nav);
}

.nav a { color: var(--nav); }
.nav a.active { font-weight: 400; color: var(--ink); }

.logo { color: #000 !important; }
.side-nav .logo { font-size: 1.35rem; }

.logo-mobile {
	display: block;
	font-family: var(--serif);
	font-size: 1.98rem;
	font-weight: 300;
	line-height: 1.85;
	letter-spacing: -0.014em;
	color: var(--ink);
}

/* ---------- Layout ---------- */

.side-nav {
	position: fixed;
	top: 0;
	left: 0;
	width: 22%;
	padding: var(--pad);
	padding-right: 0;
	z-index: 10;
}

.main {
	margin-left: 22%;
	width: 78%;
	padding: var(--pad);
	min-height: 100vh;
}

.column-set {
	display: flex;
	align-items: flex-start;
	gap: var(--gutter, 0);
}

.column-unit { flex: 0 0 auto; min-width: 0; }

.mobile-header, .mobile-nav { display: none; }

/* ---------- Gallery (Cargo gallery-columnized, 2 columns) ---------- */

.gallery {
	display: flex;
	align-items: flex-start;
	gap: 6.2rem;
}

.gallery-col {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4rem;
}

/* before JS distributes items into columns */
.gallery:not(.is-ready) { display: grid; grid-template-columns: 1fr 1fr; column-gap: 6.2rem; row-gap: 4rem; align-items: start; }

.media-item { margin: 0; }
.media-item img {
	width: 100%;
	/* thin-line cross */
	cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M16 4v24M4 16h24' stroke='%23fff' stroke-width='2.5' stroke-opacity='.6'/%3E%3Cpath d='M16 4v24M4 16h24' stroke='%23000' stroke-width='1'/%3E%3C/svg%3E") 16 16, crosshair;
	background: rgba(0, 0, 0, 0.03);
}
.media-item .caption { margin-top: 0.5em; margin-bottom: 2em; }

/* scroll animation */
/* Contact form */
.contact-form { display: flex; flex-direction: column; max-width: 32rem; }
.contact-form label { font-size: 0.9em; color: var(--nav); margin: 0 0 0.25em; }
.contact-form input, .contact-form textarea {
	font: inherit; color: var(--ink); background: transparent;
	border: 0; border-bottom: 1px solid currentColor; border-radius: 0;
	padding: 0.25em 0; margin: 0 0 1.1em; outline: none;
}
.contact-form textarea { border: 1px solid currentColor; padding: 0.4em; resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus { border-color: #000; }
.contact-form button {
	align-self: flex-start; font: inherit; color: #fff; background: #000;
	border: 0; padding: 0.45em 1.4em; cursor: pointer;
}
.contact-form button:disabled { opacity: 0.5; cursor: default; }
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 0.9em 0 0; min-height: 1.2em; }
.form-status.error { color: #a00; }

/* Page transitions: content fades in on load, out when leaving via the menu */
@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }
.main { animation: page-in 0.6s ease both; transition: opacity 0.3s ease; }
body.leaving .main { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .main { animation: none; transition: none; } }

.reveal { opacity: 0; transform: translateY(1.5rem); transition: opacity 0.9s ease, transform 0.9s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- About ---------- */

.about .bio { margin: 0; }

/* ---------- Quick view (lightbox) ---------- */

.quick-view {
	position: fixed;
	inset: 0;
	z-index: 100;
	background-color: #f8f8f8;
	padding: 7.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s;
	cursor: zoom-out;
}

.quick-view.open { opacity: 1; visibility: visible; }

.quick-view img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	cursor: pointer;
	user-select: none;
}

body.qv-open { overflow: hidden; }

/* ---------- Icons ---------- */

.menu-icon { display: inline-block; color: var(--ink); line-height: 0; }
.menu-icon svg { width: 2.2rem; height: 2.2rem; }
.icon-link svg { width: 1.3rem; height: 1.3rem; vertical-align: -0.2em; }

/* ---------- Mobile ---------- */

@media (max-width: 767px) {
	.side-nav { display: none; }

	.mobile-header {
		display: flex;
		align-items: center;
		justify-content: space-between;
		position: sticky;
		top: 0;
		z-index: 20;
		padding: var(--pad);
		padding-bottom: 0.5rem;
		background: var(--bg);
	}

	.mobile-nav {
		position: fixed;
		inset: 0;
		z-index: 50;
		background: #ffffff;
		padding: var(--pad);
		flex-direction: column;
	}

	.mobile-nav.open { display: flex; }
	.mobile-nav .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.2em; }
	.mobile-nav .nav { font-size: 1.6rem; }

	.main { margin-left: 0; width: 100%; padding-top: 1rem; }

	.column-set { flex-direction: column; }
	.column-set .column-unit { width: 100% !important; }
	.column-set .column-unit:empty { display: none; }

	.gallery, .gallery:not(.is-ready) { column-gap: 1rem; gap: 1rem; }
	.gallery-col { gap: 1rem; }

	.quick-view { padding: 10px; }
}
