/* page layout */

:root {
	--bkg-color: #dddde4;
}

* {
	margin: 0;
	padding: 0;
}

body {
	background: #fff;
	min-width: 320px;
}
main {
	max-width: 940px;
}
#main-bkg {
	padding: 5%;
	margin-top: 0;
	padding-top: 0;

	background: #fff;
	box-shadow: 0 0.5em 1em 0 #888;
}



/* nav */
nav {
	width: 100%;
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	border-top: 2px solid #eee;
	z-index: 1;
}
nav a {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 3em;
	color: navy;

	font-size: 1.125em;
	text-align: center;
	text-decoration: none;

	background: #fff;

	border-left: 1px solid #eee;
	border-right: 1px solid #eee;
	border-bottom: 2px solid #eee;
}
nav a:hover {
	color: #36f;
	background: #eee;
}
nav a:active {
	background: #ddd;
}
nav a.active {
	color: #36f;
}

#dropdown {
	display: none;
	position: relative;
}
#dropdown ul {
	padding-left: 1.5em;

	position: absolute;
	right: 0;
	z-index: 10;

	/* background: rgba(240, 240, 240, 0.667);
	backdrop-filter: blur(0.5em); */
	background: #f0f0f0;

	box-shadow: 0px 0.33em 1em 0px #888;
	font-size: 1.125em;
	border-bottom-left-radius: 0.5em;
}
#dropdown a {
	color: navy;
	padding: 0.5em 1em;
	padding-left: 0.25em;
	text-decoration: none;
	display: block;
}
#dropdown a:hover {
	background: #ddd;
}
#dropdown.show {
  display:block;
}

#about {
  cursor: pointer;
}



/* top of page */
.logo {
	display: grid;
	grid-template-columns: auto 33%;
	gap: 1em;
	padding: 1em 1em 0.5em 1em;
}
.logo img {
	width: 100%;
	max-width: 246px;
	display: block;
	aspect-ratio: 82 / 29;
}
.logo h1 {
	font-size: 1.125em;
	flex-grow: 1;
	margin-top: auto;
	text-wrap: balance;
}

hr {
	margin: 0;
	height: 3px;
	background: #36f;
	border: 2px solid #000;
	border-radius: 3px;
}



/* images */
.elevated {
	box-shadow: 0 0 1em #002699;
	border-radius: 1em;
	padding: 0.375em;
	/* margin: 0.5em; */
	overflow: hidden; /* for image zoom */
	box-sizing: border-box;
}
.elevated img {
	border-radius: 0.5em;
}

.img-square {
	width: 100%;
	aspect-ratio: 1;
	height: auto;
	/* max-width: 250px; */
}
.img-rect {
	height: auto;
}
.img-square img {
	width: 100%;
	height: auto;
}
.img-rect img {
	width: 100%;
	height: auto;
}

.grid {
  display: grid;
	grid-template-columns: 1fr;
	gap: 2em;
	padding: 1em;
	box-sizing: border-box;
}
.grid > div {
	vertical-align: baseline;
}
.grid > div > a {
	display: block;
	width: 75%;
	margin: auto;
	margin-bottom: 0.25em;

	font-size: large;
	text-decoration: none;
	text-align: center;
}
.grid .img-square {
	margin: auto;
	margin-bottom: 0.5em;
}

.two-img .img-square {
	margin: auto;
}

.one-img {
	display: table;
}
.one-img .elevated {
	margin: 0.5em 0;
	float: bottom;
}
.one-img img {
	display: block;
}
.one-img h4 {
	margin-top: 2em;
	text-align: center;
}



/* bottom of page */
.cards {
	display: grid;
	grid-template-columns: auto auto auto auto;
	width: fit-content;
	align-items: center;
}
.card {
	width: 37px;
	height: 21px;
	margin-right: 4px;
}
.paypal {
	width: 41px;
	height: 20px;
	margin-right: 16px;
	border: 1px solid #bbb;
}
#bottom-text {
	padding: 1.5em;
}
#salesAtAmpflow {
	height: 2rem;
}



/* misc */
h2, h3, h4 {
	margin-bottom: 0.5em;
}
ul {
	margin-left: 35px;
}
sup {
	font-size: 0.67em;
	color: #002699;
}
.top-left { border-top-left-radius: 10px; }
.top-right { border-top-right-radius: 10px; }
.bottom-left { border-bottom-left-radius: 10px; }
.bottom-right { border-bottom-right-radius: 10px; }




/* misc effects */
a img, .picture img, img.hover {
	cursor: pointer;
	transition: transform 0.29s;
}
a img:hover, .picture img:hover, img.hover:hover {
	transform: scale(1.033);
	filter: opacity(0.85);
}
.unselectable {
	-moz-user-select: none;
	-webkit-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

.color-link {
	cursor: pointer;
	border-radius: 4px;
	padding: 1px;
}
.color-text {
	border-radius: 4px;
	padding: 2px;
	box-shadow: 0 0 6px #ccc;
}



/* flash text when loading element by id in url */
:target::before {
	content: "";
	display: block;
	height: 70px;
	margin-top: -70px;
}
:target {
	-webkit-animation-name: target-animation;
	-moz-animation-name: target-animation;
	-o-animation-name: target-animation;
	animation-name: target-animation;

	-webkit-animation-duration: 2s;
	-moz-animation-duration: 2s;
	-o-animation-duration: 2s;
	animation-duration: 2s;
}
@-webkit-keyframes target-animation {
	from { color: #fff; }
	to { color: default; }
}
@-moz-keyframes target-animation {
	from { color: #fff; }
	to { color: default; }
}
@-o-keyframes target-animation {
	from { color: #fff; }
	to { color: default; }
}
@keyframes target-animation {
	from { color: #fff; }
	to { color: default; }
}



/* form */
form input {
	font-size: 12px;
	margin: 6px 0px;
	padding: 6px 12px;
	cursor: pointer;
	background: #eee;
	border: 1px solid gray;
	box-shadow: 0 0 2px #ccc;

	border-top-left-radius    : 6px 4px;
	border-top-right-radius   : 6px 4px;
	border-bottom-left-radius : 6px 4px;
	border-bottom-right-radius: 6px 4px;
}
form input:hover {
	background: #ddd;
	border-color: #666;
}
form input:active {
	background: #fff;
	border-color: gray;
}



/* media queries */
@media screen and (min-width: 576px) {
	nav {
		grid-template-columns: 1fr 1fr;
	}
	.logo {
		padding: 1.25em 1.5em 0.75em 1em;
	}
	.logo h1 {
		font-size: 1.25em;
	}
	#dropdown ul {
		padding-left: 1.75em;
		border-bottom-left-radius: 0.75em;
	}
	#dropdown a {
		padding: 0.75em 1.5em;
		padding-left: 0.375em;
	}
	.grid {
		grid-template-columns: 1fr 1fr;
		gap: 2.5em;
		padding: 1.25em;
	}
	.grid > .middle {
		grid-column-start: 1;
		grid-column-end: 3;

		padding: 0 0.75em;
		margin: 0 25%;
	}

	.elevated {
		padding: 0.5em;
	}

	.two-img > div:nth-child(1) { grid-area: img-1; }
	.two-img > div:nth-child(2) { grid-area: txt; }
	.two-img > div:nth-child(3) { grid-area: img-2; }
	.two-img {
		grid-template-areas:
			"img-1 img-2"
			"txt txt";
	}

	.one-img .elevated {
		width: calc(128px + 20%);
	}
	.one-img.left .elevated {
		margin-right: 1em;
		float: left;
	}
	.one-img.right .elevated {
		margin-left: 1em;
		float: right;
	}
	.one-img .wide {
		width: 55%;
	}

	#salesAtAmpflow {
		height: 1rem;
	}
}

@media screen and (min-width: 768px) {
	body {
		background: var(--bkg-color);
	}
	main {
		margin: 1.5em auto;
		/*
			%  (1920px * 0.6 - 768px * 0.9) / (1920px - 768px)
			px (1920px * 0.6 - 768px * 0.9) / (1920px - 768px) * (1 - 768px) + 768px * 0.9
			max(66%, min(90%, calc(40% + 384.4px)));
		*/
		width: 100%;
	}

	nav {
		display: flex;

		border-top-left-radius: 0.75em 2em;
		border-top-right-radius: 0.75em 2em;
		
		background: linear-gradient(#d1d0d6, #777);
		box-shadow: 0 0.5em 1em 0 #888;

		border-top: none;
	}
	nav a {
		flex-grow: 1;
		height: 2em;
	
		border-top-left-radius: 0.75em 2em;
		border-top-right-radius: 0.75em 2em;
		
		background: linear-gradient(#ddd, #ccc);

		border: 2px solid #fff;
		border-bottom: 2px solid #eee;
	}
	nav a:hover {
		background: linear-gradient(#eee, #ddd);
		flex-grow: 1.33;
	}
	nav a:active {
		background: linear-gradient(#ccc, #ddd);
		flex-grow: 1.33;
	}
	nav a.active {
		background: #fff;
		border-bottom: 2px solid #fff;
		flex-grow: 1.5;
	}
	nav a.active:active {
		background: linear-gradient(#eee, #fff);
	}
	#dropdown ul {
		padding-left: 2em;
		border-bottom-left-radius: 1em;
	}
	#dropdown a {
		padding: 1em 2em;
		padding-left: 0.5em;
	}

	.logo {
		padding: 1.5em 2em 0.5em 1em;
	}
	.logo img {
		margin-top: 0.75em;
		margin-bottom: 1.25em;
	}
	.logo h1 {
		font-size: 1.375em;
	}
	.grid {
		gap: 3em;
		padding: 1em;
	}
	.grid > .middle {
		padding: 0 1em;
	}

	.two-img > div:nth-child(1) { grid-area: img-1; }
	.two-img > div:nth-child(2) { grid-area: txt; }
	.two-img > div:nth-child(3) { grid-area: img-2; }

	.two-img {
		grid-template-areas: "img-1 txt img-2";
		grid-template-columns: 1fr 1fr 1fr;
		gap: 1em;
		padding: 1em;
	}

	.elevated {
		padding: 0.75em;
		/* box-sizing: content-box; */
	}
	.img-square {
		max-width: calc(250px + 1.5em);
	}
	.img-rect.w-351 {
		min-width: calc(351px + 1.5em);
		width: calc(351px + 1.5em);
	}
	.img-rect.w-426 {
		width: calc(426px + 1.5em);
	}
	.img-rect.w-433 {
		width: calc(433px + 1.5em);
	}
	.img-rect.w-269 {
		width: calc(269px + 1.5em);
	}
	.img-rect.w-279 {
		width: calc(279px + 1.5em);
	}
	.img-square.w-400 {
		min-width: calc(400px + 1.5em);
		width: calc(400px + 1.5em);
	}
	.img-square.w-500 {
		width: calc(500px + 1.5em);
	}
	.img-square.w-250 {
		min-width: calc(250px + 1.5em);
		width: calc(250px + 1.5em);
	}
	.img-rect.w-442 {
		min-width: calc(442px + 1.5em - 2px);
		width: calc(442px + 1.5em - 2px);
	}
	.img-square.w-135 {
		width: calc(135px + 1.5em);
	}

	.hex .img-square {
		max-width: 250px;
	}
}

@media screen and (min-width: 1024px) {
	main {
		margin: 2em auto;
	}
	.logo h1 {
		font-size: 1.5em;
	}
}

@media screen and (min-width: 1280px) {
	main {
		margin: 2.5em auto;
	}
	.logo h1 {
		font-size: 1.625em;
	}
}

@media screen and (min-width: 1536px) {
	:root {
		/* font-size: 1.0625em; */
	}
	main {
		margin: 3em auto;
	}
}

@media screen and (min-width: 1920px) {
	:root {
		/* font-size: 1.125em; */
	}
}
