:root {
	color-scheme: light;
	--background: #f5f7f8;
	--surface: #ffffff;
	--text: #17202a;
	--muted: #5f6c7b;
	--accent: #1f6f9f;
	--line: #d8e0e6;
	--shadow: 0 14px 36px rgb(23 32 42 / 10%);
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--background);
	color: var(--text);
	font: 17px/1.6 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
	content: "";
	display: block;
	height: 0.5rem;
	background: var(--accent);
}

header,
main,
.template-carousel {
	width: min(100% - 2rem, 1120px);
	margin-right: auto;
	margin-left: auto;
}

header {
	padding: 3rem 0 1.5rem;
	border-bottom: 1px solid var(--line);
}

h1,
h2,
h3,
h4,
h5,
p,
figure {
	margin-top: 0;
}

h1,
h2,
h3,
h4,
h5 {
	line-height: 1.2;
}

h1 {
	margin-bottom: 0.55rem;
	font-size: clamp(2.4rem, 7vw, 5rem);
	letter-spacing: 0;
}

h2 {
	max-width: 760px;
	margin-bottom: 1rem;
	color: var(--muted);
	font-size: clamp(1.1rem, 2vw, 1.45rem);
	font-weight: 500;
}

h3 {
	margin: 2.5rem 0 1rem;
	font-size: 1.65rem;
}

h4 {
	margin: 1.6rem 0 0.2rem;
	font-size: 1.12rem;
}

h5 {
	margin: 0 0 0.7rem;
	color: var(--muted);
	font-size: 0.9rem;
	text-transform: uppercase;
}

a {
	color: var(--accent);
}

main {
	padding: 1.5rem 0 4rem;
}

section {
	padding-bottom: 1.5rem;
}

ul {
	padding-left: 1.25rem;
}

li + li {
	margin-top: 0.25rem;
}

.template-carousel {
	padding: 1.5rem 0 0.5rem;
}

.template-carousel__intro {
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1rem;
}

.template-carousel__intro h3 {
	margin: 0;
}

.template-carousel__intro p {
	max-width: 420px;
	margin-bottom: 0.15rem;
	color: var(--muted);
}

.template-carousel__track {
	display: grid;
	grid-auto-columns: minmax(min(88vw, 320px), 36%);
	grid-auto-flow: column;
	gap: 1rem;
	overflow-x: auto;
	padding: 0.25rem 0 1rem;
	scroll-snap-type: inline mandatory;
}

.template-carousel__slide {
	margin: 0;
	overflow: hidden;
	scroll-snap-align: start;
	background: var(--surface);
	border: 1px solid var(--line);
	box-shadow: var(--shadow);
}

.template-carousel__slide .photo-link {
	display: block;
	width: 100%;
}

.template-carousel__slide .photo-link img {
	cursor: zoom-in;
}

.template-carousel__slide img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.template-carousel__slide figcaption {
	display: grid;
	gap: 0.2rem;
	padding: 0.8rem 1rem;
	color: var(--muted);
}

.template-carousel__slide strong {
	color: var(--text);
}

.instagram-posts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
	gap: 1rem;
}

.instagram-post {
	padding: 1rem;
	background: var(--surface);
	border: 1px solid var(--line);
}

.instagram-post img {
	height: auto;
	max-width: 100%;
}

.template-picker {
	position: fixed;
	z-index: 20;
	top: 1rem;
	right: 1rem;
	display: flex;
	gap: 0.45rem;
	align-items: center;
	padding: 0.5rem;
	background: var(--surface);
	border: 1px solid var(--line);
	box-shadow: var(--shadow);
	font: 14px/1.2 system-ui, sans-serif;
}

.template-picker select,
.template-picker button {
	font: inherit;
}

.photo-lightbox {
	position: fixed;
	z-index: 1000;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 2rem;
	background: rgb(0 0 0 / 88%);
}

.photo-lightbox[aria-hidden="false"] {
	display: flex;
}

.photo-lightbox img {
	width: auto;
	max-width: 90vw;
	max-height: 90vh;
}

.photo-lightbox button {
	position: fixed;
	top: 1rem;
	right: 1rem;
	padding: 0.55rem 0.75rem;
	border: 1px solid rgb(255 255 255 / 24%);
	background: #ffffff;
	color: var(--text);
	font: inherit;
}

@media (max-width: 720px) {
	.template-carousel__intro {
		display: block;
	}

	.template-carousel__track {
		grid-auto-columns: minmax(82vw, 1fr);
	}
}
