/* #region @keyframes */
@keyframes slideRight {
	from {
		opacity: 0;
		translate: -32px;
	}

	to {
		opacity: 1;
	}
}

@keyframes slideUp {
	from {
		opacity: 0;
		translate: 0 var(--px32);
	}

	to {
		opacity: 1;
	}
}

/* #endregion */
/* #region @prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-delay: 0s !important;
		animation-duration: 0s !important;
		scroll-behavior: auto !important;
		transition-delay: 0s !important;
		transition-duration: 0s !important;
	}
}

/* #endregion */
/* #region Elements */
*, *::before, *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

a {
	color: var(--aqua700);
	text-decoration: none;
	transition: all .2s;

	&:hover {
		text-decoration: underline;
	}
}

body {
	background-color: var(--blue900);
	color: var(--blue700);
	font-family: var(--font-sans);
	font-size: var(--fz18);
}

button {
	background: none;
	border: none;
	cursor: pointer;
}

details {
	margin-left: var(--px20);

	a {
		display: block;
		margin-top: var(--px08);
		width: max-content;
	}

	&[open] summary ~ * {
		animation: slideRight .5s ease-in-out;
	}
}

h1, h2, h3 {
	font-weight: normal;
	line-height: 1.1;
	text-wrap: balance;
}

hr {
	border: 0;
	border-top: var(--px01) dotted var(--blue300);
	margin: var(--px32) 0;
}

html {
	scroll-behavior: smooth;
	scrollbar-gutter: stable;

	&:has(.nav-contain.open) {
		overflow: hidden;
	}
}

img {
	display: block;
	max-width: 100%;
}

li {
	font-size: var(--fz16);
	line-height: 1.4;
	text-wrap: pretty;
}

p {
	line-height: 1.5;
	margin-bottom: var(--px20);
	text-wrap: pretty;
}

summary {
	color: var(--aqua700);
	cursor: pointer;
	font-size: var(--fz12);
	letter-spacing: var(--px01);
	margin-left: -20px;
	text-transform: uppercase;
}

sup {
	font-size: var(--fz12);
	margin-inline: var(--px01);
}

ul {
	list-style: square;
	margin-bottom: var(--px24);
	padding-left: var(--px20);
}

/* #endregion */
/* #region Global */
.btn {
	background-color: var(--aqua700);
	border-radius: var(--radius);
	color: white;
	display: inline-block;
	font-size: var(--fz14);
	font-weight: 500;
	letter-spacing: var(--px03);
	line-height: 1;
	padding: var(--px16) var(--px20);
	text-transform: uppercase;
	transition: all .2s;

	&:hover {
		background-color: var(--aqua500);
		text-decoration: none;
	}
}

.content {
	margin-inline: auto;
	width: min(85%, var(--content-max-width, 1200px));
}

.skip {
	background-color: var(--blue700);
	color: white;
	left: var(--px16);
	padding: var(--px08) var(--px16);
	position: absolute;
	text-decoration: none;
	top: -100%;
	z-index: 20;

	&:focus {
		top: var(--px16);
	}
}

/* #endregion */
/* #region Nav */
.nav-contain {
	justify-self: end;
}

.nav-grid {
	display: grid;
	gap: var(--px32) 2vw;
	grid-auto-flow: column;

	@media (width < 1200px) {
		align-content: start;
		backdrop-filter: blur(8px);
		background-color: var(--blue700-80);
		grid-auto-flow: row;
		height: 100vh;
		justify-content: center;
		opacity: 0;
		padding: var(--px96) var(--px16) 0;
		position: absolute;
		right: 0;
		top: 0;
		transition: var(--transition);
		visibility: hidden;
		width: 100vw;
	}

	a {
		border-bottom: var(--px02) solid transparent;
		color: var(--aqua700);
		font-size: var(--fz14);
		font-weight: 600;
		letter-spacing: var(--px02);
		padding-bottom: var(--px06);
		position: relative;
		text-decoration: none;
		text-transform: uppercase;
		transition: var(--transition);

		@media (width < 1200px) {
			font-size: var(--fz18);
			translate: 0 var(--px32);
		}

		&:hover {
			border-color: currentColor;
			color: var(--aqua500);
		}
	}
}

.nav-toggle {
	display: none;

	@media (width < 1200px) {
		color: var(--aqua700);
		display: block;
		font-size: var(--fz24);
		position: relative;
		text-decoration: none;
		z-index: 20;
	}
}

.open {
	.fa-xmark {
		display: block;
		font-size: var(--fz32);
		rotate: 180deg;
		transition: .5s;
	}

	.nav-grid {
		opacity: 1;
		visibility: visible;
		z-index: 10;

		a {
			border: none;
			color: white;
			translate: 0;
		}
	}

	.nav-toggle {
		color: white;
		rotate: 180deg;
		transition: .5s;
		z-index: 20;
	}
}

/* #endregion */
/* #region Header */
.header {
	background-color: var(--white-90);
	box-shadow: var(--px04) var(--px04) var(--px24) var(--px04) var(--blue900-10);
	padding-block: var(--px16);
	position: fixed;
	width: 100%;
	z-index: 10;
}

.header-grid {
	align-items: center;
	display: grid;
	gap: var(--px16);
	grid-template-columns: auto 1fr;

	.logo {
		transition: var(--transition);
		width: 300px;

		&.scrolled {
			width: 200px;
		}
	}
}

/* #endregion */
/* #region Footer */
.footer {
	--font-size: var(--fz14);
	background-color: var(--blue900);
	color: var(--blue100);
	line-height: 1.8;
	padding-block: var(--px64) var(--px96);
	text-align: center;

	a {
		color: var(--aqua500);
		display: block;
		font-size: var(--font-size);
		margin-inline: auto;
		transition: color .2s;
		width: max-content;

		&:hover {
			color: var(--aqua300);
			text-decoration: none;
		}

		&[href*="linkedin.com"] {
			margin-bottom: var(--px32);
		}
	}

	i {
		font-size: var(--fz28);
		margin-top: var(--px16);
	}

	p {
		font-size: var(--font-size);
		line-height: 1.4;
	}
}

/* #endregion */
/* #region Hero */
.hero {
	background: url("https://ripcord.sirv.com/RMC/tower.jpg?ch=1100") center/cover;
	color: white;
	position: relative;
	text-align: center;

	@media (width < 1400px) {
		background-attachment: scroll;
	}

	h1 {
		font-size: var(--fz48);
		margin-bottom: var(--px24);

		br {
			@media (width < 900px) {
				display: none;
			}
		}
	}

	h2 {
		font-size: var(--fz20);
		letter-spacing: var(--px02);
		margin-bottom: var(--px12);
		text-transform: uppercase;
	}
}

.hero-container {
	animation: slideUp 1.5s ease both;
	height: 80vh;
	margin: 0 auto;
	padding-top: 25vh;

	@media (width < 900px) {
		height: 70vh;
	}

	@media (width < 700px) {
		padding-top: 15vh;
	}
}

/* #endregion */
/* #region Home-Clients */
.home-clients {
	background: whitesmoke;
	padding-block: var(--px64);
	text-align: center;

	h2 {
		font-size: var(--fz24);
		margin-bottom: var(--px24);
	}
}

/* #endregion */
/* #region Home-Commentary */
.home-commentary {
	background: linear-gradient(to bottom, var(--blue900), var(--blue700-80)), url("https://ripcord.sirv.com/RMC/Dollarphotoclub_83882623.jpg") center bottom/cover fixed;
	color: white;
	padding-block: var(--px80);
	text-align: center;

	@media (width < 1400px) {
		background-attachment: scroll;
	}

	h2 {
		color: var(--blue300);
		font-size: var(--fz16);
		letter-spacing: var(--px01);
		margin-bottom: var(--px32);
		text-transform: uppercase;
	}

	p {
		font-size: var(--fz28);
		font-weight: 600;
		margin-bottom: var(--px16);
	}
}

/* #endregion */
/* #region Home-Keys */
.home-keys {
	bottom: 0;
	cursor: default;
	left: 0;
	padding: var(--px32) var(--px16) var(--px16);
	position: absolute;
	right: 0;

	@media (width < 1200px) {
		display: none;
	}
}

.home-keys-grid {
	--keys-delay: 1s;
	align-items: end;
	display: grid;
	gap: var(--px08);
	grid-template-columns: repeat(5, 1fr);

	div {
		animation: slideUp 1s ease var(--keys-delay) both;
		background-color: var(--blue700-80);
		padding: var(--px16);

		&:hover p {
			height: auto;
			max-height: 300px;
			transition: max-height 1.5s ease-out, opacity 1s;
		}

		&:nth-child(2) {
			--keys-delay: 1.75s;
		}

		&:nth-child(3) {
			--keys-delay: 2.5s;
		}

		&:nth-child(4) {
			--keys-delay: 3.25s;
		}

		&:nth-child(5) {
			--keys-delay: 4s;
		}
	}

	h2 {
		font-size: var(--fz20);
		font-weight: 700;
		letter-spacing: normal;
		margin-bottom: var(--px08);
		text-transform: none;
	}

	p {
		line-height: 1.3;
		margin: 0 0 var(--px16) 0;
		max-height: 0;
		overflow: hidden;
		transition: max-height .5s;
	}
}

/* #endregion */
/* #region Sub */
.sub {
	background: white;
	padding-block: var(--px48) var(--px80);

	h1 {
		font-weight: 600;
		margin-bottom: var(--px32);
	}

	h2 {
		font-size: var(--fz24);
		font-weight: 500;
		line-height: 1.5;
		margin: var(--px24) 0 var(--px12);
	}

	h3 {
		font-size: var(--fz16);
		font-weight: 600;
		margin-block: var(--px24) var(--px08);
		text-transform: uppercase;
	}

	i {
		font-size: var(--fz24);
		margin-left: var(--px12);
	}

	li {
		font-size: var(--fz18);

		+ li {
			margin: var(--px12) 0 0;
		}
	}

	ul {
		margin: 0 0 var(--px40) var(--px24);
	}
}

.sub-next {
	display: block;
	font-weight: 700;
	margin-top: var(--px64);
	position: relative;
	text-transform: uppercase;

	&::after {
		content: "\27F6";
		margin-left: var(--px04);
		position: absolute;
		top: -15%;
	}

	&:hover {
		color: var(--aqua700);
	}
}

.sub-tagline {
	color: var(--blue500);
	font-size: var(--fz20);
	font-weight: 300;
	line-height: 1.5;
	text-wrap: pretty;
}

.subhero {
	background: center/cover;
	height: 50vh;

	@media (width < 900px) {
		height: 30vh;
	}
}

.subhero-clients {
	background-image: url("https://ripcord.sirv.com/RMC/handshake.jpg?cy=550&ch=1000");
}

.subhero-commentary {
	background-image: url("https://ripcord.sirv.com/RMC/golfballs.jpg");
}

.subhero-contact {
	background-image: url("https://ripcord.sirv.com/RMC/exterior.jpg?ch=1300");
}

.subhero-history {
	background-image: url("https://ripcord.sirv.com/RMC/conferenceroom.jpg?cy=170&ch=1000");
}

.subhero-process {
	background-image: url("https://ripcord.sirv.com/RMC/reports-blur.jpg");
}

.subhero-team {
	background-image: url("https://ripcord.sirv.com/RMC/team-meeting.jpg?cy=330&ch=1000");
}

/* #endregion */
/* #region Sub-Commentary */
.sub-commentary-grid {
	display: grid;
	grid-template-columns: repeat(3, auto);
	margin-top: var(--px32);

	@media (width < 1200px) {
		grid-template-columns: auto;
	}

	a {
		display: block;
		margin-bottom: var(--px08);
		width: max-content;
	}
}

.sub-commentary-archives-grid {
	display: grid;
	font-size: var(--fz14);
	gap: var(--px08) var(--px48);
	grid-template-columns: repeat(4, auto);
	justify-content: start;
	margin-top: var(--px16);

	@media (width < 1200px) {
		grid-template-columns: auto auto;
	}

	@media (width < 700px) {
		grid-template-columns: auto;
	}

	a {
		display: block;
		margin-bottom: var(--px06);
		width: max-content;
	}

	h3 {
		font-size: var(--fz16);
		margin-bottom: var(--px08);
	}
}

/* #endregion */
/* #region Sub-Contact */
.sub-contact-grid {
	display: grid;
	gap: var(--px16) 10vw;
	grid-template-columns: auto 1fr;

	@media (width < 700px) {
		grid-template-columns: auto;
	}
}

/* #endregion */
/* #region Sub-History */
.timeline {
	--box-padding: var(--px32);
	--dot-width: var(--px16);
	display: grid;
	gap: calc(var(--dot-width) + var(--px16));
	grid-auto-flow: dense;
	grid-template-columns: 1fr auto 1fr;
	position: relative;

	@media (width < 800px) {
		gap: var(--px08);
		grid-auto-flow: initial;
		grid-template-columns: auto;
	}

	&::before {
		background: linear-gradient(transparent, var(--blue300) 5%, var(--blue300) 90%, transparent);
		content: "";
		height: 100%;
		left: 50%;
		position: absolute;
		top: 0;
		translate: -50%;
		width: var(--px04);

		@media (width < 800px) {
			display: none;
		}
	}

	h3 {
		font-size: var(--fz18);
		font-weight: 700;
		line-height: 1.3;
		margin-block: 0 var(--px16);
		text-transform: initial;
	}

	img {
		width: 200px;
	}

	p {
		font-size: var(--fz16);
	}

	.date {
		color: var(--blue500);
		font-size: var(--fz20);
		font-weight: 700;
		padding-top: var(--px28);

		@media (width < 800px) {
			grid-column: auto !important;
			justify-self: start !important;
		}

		&:nth-child(even) {
			grid-column: 3;
		}

		&:nth-child(odd) {
			justify-self: end;
		}
	}

	.dot {
		background-color: var(--blue300);
		border-radius: 50%;
		grid-column: 2;
		height: var(--dot-width);
		margin-top: var(--box-padding);
		width: var(--dot-width);

		@media (width < 800px) {
			display: none;
		}
	}

	.textbox {
		background-color: var(--blue100);
		padding: var(--box-padding);
	}
}

/* #endregion */
/* #region Sub-Team */
.modal {
	height: 100%;
	left: 0;
	opacity: 0;
	overflow: auto;
	position: fixed;
	top: 0;
	transition: opacity .5s, visibility 0s linear .5s;
	visibility: hidden;
	width: 100%;
	z-index: 30;

	.modal-close {
		--color: var(--aqua500);
		align-items: center;
		aspect-ratio: 1;
		border: var(--px03) solid var(--color);
		border-radius: 50%;
		color: var(--color);
		cursor: pointer;
		display: flex;
		justify-content: center;
		margin-left: auto;
		transition: var(--transition);
		width: var(--px40);

		@media (width < 500px) {
			margin-bottom: var(--px16);
		}

		&:hover, &:focus {
			background-color: var(--color);
			color: white;
		}

		i {
			font-size: var(--fz20);
			margin-inline: 0;
			text-align: center;
		}
	}

	.modal-content {
		background: white url("https://ripcord.sirv.com/RMC/shutterstock_2593714365.png?w=700&opacity=60") center 15% no-repeat;
		background-size: contain;
		border-radius: var(--radius);
		margin: 5% auto;
		padding: var(--px24) var(--px40);
		position: relative;
		text-transform: none;
		width: min(700px, 90%);

		a {
			display: block;
			width: max-content;

			@media (width < 500px) {
				width: auto;
				word-break: break-all;
			}
		}

		> div:not(.modal-close) {
			font-size: var(--fz14);
			font-weight: 700;
			letter-spacing: var(--px01);
			line-height: 1.2;
			margin: 0 auto var(--px32);
			max-width: 45ch;
			text-align: center;
			text-transform: uppercase;
			text-wrap: pretty;
		}

		h2 {
			font-size: var(--fz24);
			font-weight: 700;
			margin-block: 0;
			text-align: center;
		}

		h3 {
			margin-bottom: var(--px16);
			position: relative;

			&:first-of-type {
				--gap-for-pip: var(--px64);
				margin-top: var(--gap-for-pip);

				&::before {
					background-color: var(--blue300);
					content: "";
					height: var(--px04);
					position: absolute;
					top: calc(-1 * (var(--gap-for-pip)/2));
					width: var(--px32);
				}
			}
		}

		img {
			border: var(--px01) solid lightgrey;
			margin: 0 auto var(--px08);
			width: 300px;
		}

		li {
			font-size: var(--fz14);
		}

		p {
			font-size: var(--fz16);
		}

		ul {
			margin-left: 0;
		}

		.role {
			font-size: var(--fz12);
			letter-spacing: var(--px01);
			text-transform: uppercase;
		}
	}

	&.visible {
		background-color: var(--blue700-80);
		opacity: 1;
		transition: opacity .5s, visibility 0s linear 0s;
		visibility: visible;
	}
}

.modal-trigger {
	cursor: pointer;
}

.sub-team-grid {
	--col-min-width: 350px;
	display: grid;
	gap: var(--px16);
	grid-template-columns: repeat(auto-fill, var(--col-min-width));
	justify-content: center;
	margin-top: var(--px48);

	.bio {
		background-color: var(--aqua700);
		color: white;
		transition: all .2s ease-out;

		&:hover {
			background-color: var(--aqua500);
		}

		a {
			display: block;
			overflow: hidden;

			&:hover {
				text-decoration: none;
			}
		}

		h2 {
			font-size: var(--fz18);
			line-height: 1.1;
			margin-block: .4em;
		}

		img {
			transition: var(--transition);

			&:hover {
				scale: 1.07;
			}
		}

		.role {
			font-size: var(--fz12);
			letter-spacing: var(--px01);
			text-transform: uppercase;
		}

		.title-bar {
			min-height: var(--px96);
			padding: var(--px16);
			text-align: center;
		}
	}
}

/* #endregion */