/* AXEs Studios portfolio. Slate from our roof renders, steel text. Wood is kept for the few things you act on:
   the slider line, the two buttons and the focus ring. */
:root {
	--night: #1b2027; /* page */
	--deck: #262d36;
	--steel: #c3cad2;
	--steel-dim: #8e97a2;
	--chalk: #eef1f4;
	--wood: #bf8b47;
	--wood-hi: #d6a35e;
	--display: "Big Shoulders Display", "Arial Narrow", sans-serif;
	--text: "Archivo", system-ui, sans-serif;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	scroll-padding-top: 24px;
}

body {
	margin: 0;
	background: var(--night);
	color: var(--steel);
	font: 400 1.0625rem/1.6 var(--text);
	-webkit-font-smoothing: antialiased;
}

img {
	display: block;
	max-width: 100%;
	height: auto;
}

a {
	color: var(--chalk);
	text-decoration-color: var(--steel-dim);
	text-underline-offset: 0.2em;
}

:focus-visible {
	outline: 3px solid var(--wood-hi);
	outline-offset: 3px;
}

.wrap {
	width: min(1440px, 100% - 48px);
	margin-inline: auto;
}

.skip {
	position: absolute;
	left: 12px;
	top: -60px;
	padding: 8px 14px;
	background: var(--chalk);
	color: var(--night);
	z-index: 10;
}
.skip:focus {
	top: 12px;
}

/* header */
.bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 22px 0;
}
.brand {
	font: 800 1.6rem/1 var(--display);
	color: var(--chalk);
	text-decoration: none;
	letter-spacing: 0.01em;
}
.bar nav {
	display: flex;
	gap: 26px;
	font-weight: 500;
}
.bar nav a {
	text-decoration: none;
	color: var(--steel);
	padding: 10px 0; /* 44 px tall tap target */
}
.bar nav a:hover,
.bar .nav-contact {
	color: var(--chalk);
}

/* type */
h1,
h2 {
	font-family: var(--display);
	color: var(--chalk);
	margin: 0;
	text-wrap: balance;
}
h1 {
	font-weight: 800;
	font-size: clamp(3rem, 4.6vw, 4.75rem); /* capped so "Roblox maps" keeps to one line in the hero column */
	line-height: 0.92;
	max-width: 11ch;
	letter-spacing: -0.005em;
}
h2 {
	font-weight: 700;
	font-size: clamp(2rem, 3.4vw, 2.8rem);
	line-height: 1;
	margin-bottom: 22px;
	max-width: 18ch;
}
p {
	margin: 0 0 1em;
	max-width: 62ch;
}

/* hero: text left, the slider right, both inside the first screen of a 1366x768 laptop */
.hero {
	display: grid;
	grid-template-columns: minmax(300px, 1fr) 2.6fr;
	gap: 48px;
	align-items: center;
	padding: 10px 0 40px;
}
.lede {
	font-size: 1.15rem;
	max-width: 34ch;
	margin: 22px 0 26px;
}
.cta {
	display: inline-flex;
	align-items: center;
	min-height: 50px;
	padding: 0 24px;
	border-radius: 4px;
	background: var(--wood);
	color: var(--night);
	font: 600 1.05rem/1 var(--text);
	text-decoration: none;
}
.cta:hover {
	background: var(--wood-hi);
}
.terms {
	font-size: 0.92rem;
	color: var(--steel-dim);
	max-width: 36ch;
	margin: 16px 0 0;
}
.ba-hero {
	/* width follows the free height, so the picture, its labels and the caption stay above the fold */
	width: min(100%, calc((100svh - 220px) * 1.55));
	justify-self: end;
}

/* before/after */
figure {
	margin: 0;
	min-width: 0;
}
figcaption {
	font-size: 0.95rem;
	padding-top: 6px;
	max-width: 64ch;
}
.ba-frame {
	position: relative;
	aspect-ratio: var(--ar);
	overflow: hidden;
	background: var(--deck);
	touch-action: pan-y; /* vertical swipes still scroll the page on phones */
	cursor: ew-resize;
	user-select: none;
	--pos: 50%;
}
.ba-frame img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	pointer-events: none;
}
.ba-after {
	clip-path: inset(0 0 0 var(--pos));
}
.ba-frame::after {
	/* the dividing line */
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: var(--pos);
	width: 2px;
	margin-left: -1px;
	background: var(--wood);
	pointer-events: none;
}
.ba-handle {
	/* a 44 px box on the line holds the keyboard focus ring; inside it, a slim grip */
	position: absolute;
	top: 50%;
	left: var(--pos);
	width: 44px;
	height: 64px;
	margin: -32px 0 0 -22px;
	border-radius: 6px;
	pointer-events: none;
}
.ba-handle::before {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 8px;
	height: 46px;
	margin: -23px 0 0 -4px;
	border-radius: 4px;
	background: var(--wood);
	box-shadow: 0 0 0 1px rgb(27 32 39 / 0.55);
}
.ba-range {
	/* keyboard and screen-reader control; the pointer drag is handled in main.js */
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	pointer-events: none;
}
.ba-frame:has(.ba-range:focus-visible) .ba-handle {
	outline: 3px solid var(--wood-hi);
	outline-offset: 0;
}
.ba-legend {
	display: flex;
	justify-content: space-between;
	padding-top: 7px;
	font-size: 0.8rem;
	line-height: 1.2;
	color: var(--steel-dim);
}

/* sections: space alone separates them */
.block {
	padding: 72px 0;
}

/* the avenue: picture left, what changed and what stayed right */
.feature {
	display: grid;
	grid-template-columns: 1.6fr 1fr;
	gap: 48px;
	align-items: center;
}
.feature-text p {
	max-width: 46ch;
}

/* map pass + terms */
.cols {
	display: grid;
	grid-template-columns: 1.1fr 1fr;
	gap: 72px;
	align-items: start;
}
.pass {
	margin: 0;
	max-width: 56ch;
}
.pass dt {
	/* the term runs into its line, like a lead-in, instead of a two-column table */
	float: left;
	margin-right: 0.4em;
	color: var(--chalk);
	font-weight: 600;
}
.pass dt::after {
	content: ".";
}
.pass dd {
	margin: 0 0 12px;
}
.steps {
	margin: 0 0 28px;
	padding-left: 1.4em;
	max-width: 54ch;
}
.steps li {
	padding-left: 6px;
	margin-bottom: 14px;
}
.steps li::marker {
	color: var(--steel-dim);
	font-weight: 600;
}
.steps strong {
	color: var(--chalk);
	font-weight: 600;
}
.about {
	font-size: 0.95rem;
	color: var(--steel-dim);
	max-width: 54ch;
}

/* stills: one large picture and two beside it */
.gallery {
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: 22px 18px;
	align-items: start;
}
.gallery figure:first-child {
	/* the large picture fills the height of the two beside it */
	grid-row: span 2;
	align-self: stretch;
	display: flex;
	flex-direction: column;
}
.gallery figure:first-child .zoom {
	flex: 1;
	min-height: 0;
	position: relative;
}
.gallery figure:first-child .zoom img {
	position: absolute;
	inset: 0;
	height: 100%;
	object-fit: cover;
}
.zoom {
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	background: var(--deck);
	cursor: zoom-in;
}
.zoom img {
	width: 100%;
	transition: filter 0.2s ease;
}
.zoom:hover img {
	filter: brightness(1.08);
}

/* contact */
.contact {
	padding: 72px 0 80px;
}
.contact h2 {
	font-size: clamp(2.6rem, 6vw, 4.6rem);
	font-weight: 800;
	max-width: none;
}
.handle {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px 18px;
	margin-top: 26px;
}
.handle-label {
	font-size: 0.95rem;
}
.handle-name {
	font: 700 2rem/1 var(--display);
	color: var(--chalk);
}
.copy {
	font: 600 1rem/1 var(--text);
	color: var(--night);
	background: var(--wood);
	border: 0;
	border-radius: 4px;
	padding: 14px 20px;
	min-height: 44px;
	cursor: pointer;
}
.copy:hover {
	background: var(--wood-hi);
}
.copied {
	font-size: 0.95rem;
}

.foot {
	padding: 8px 0 40px;
	font: 700 1.1rem/1 var(--display);
	color: var(--steel-dim);
}

/* lightbox */
.lightbox {
	border: 0;
	padding: 0;
	background: transparent;
	max-width: min(1600px, 94vw);
	max-height: 94vh;
	color: var(--steel);
}
.lightbox::backdrop {
	background: rgb(15 18 22 / 0.92);
}
.lightbox img {
	max-height: 84vh;
	width: auto;
	margin-inline: auto;
}
.lb-caption {
	margin: 10px auto 0;
	text-align: center;
}
.lightbox form {
	display: flex;
	justify-content: flex-end;
	margin-bottom: 8px;
}
.lb-close {
	font: 600 0.95rem/1 var(--text);
	color: var(--chalk);
	background: var(--deck);
	border: 0;
	border-radius: 4px;
	padding: 12px 16px;
	min-height: 44px;
	cursor: pointer;
}

/* tablets: the hero and the avenue stack */
@media (max-width: 1000px) {
	.hero,
	.feature {
		grid-template-columns: 1fr;
		gap: 0;
	}
	h1 {
		font-size: clamp(3rem, 9vw, 5.4rem);
	}
	.lede {
		max-width: 46ch;
		margin: 20px 0 24px;
	}
	.terms {
		max-width: 46ch;
		margin-bottom: 32px;
	}
	.ba-hero {
		justify-self: start;
		width: 100%;
	}
	.feature-text {
		padding-top: 30px;
	}
}

/* phones */
@media (max-width: 760px) {
	.wrap {
		width: calc(100% - 32px);
	}
	.bar nav a:not(.nav-contact) {
		display: none;
	}
	.hero {
		padding-bottom: 24px;
	}
	.cta {
		width: 100%;
		justify-content: center;
	}
	.block {
		padding: 48px 0;
	}
	.cols,
	.gallery {
		grid-template-columns: 1fr;
		gap: 40px;
	}
	.gallery {
		gap: 26px;
	}
	.gallery figure:first-child {
		grid-row: auto;
	}
	.gallery figure:first-child .zoom img {
		position: static;
	}
	.contact {
		padding: 48px 0 56px;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	.zoom img {
		transition: none;
	}
}
