@import url("https://fonts.googleapis.com/css2?family=Raleway:wght@700&family=Roboto:wght@400;500;700;900&display=swap");

:root {
	--main-color: #212121;
	--hover-color: #2196f3;
}

* {
	margin: 0;
	padding: 0;
	color: var(--main-color);
	font-family: "Roboto", sans-serif;
	letter-spacing: 0.03em;
	box-sizing: border-box;
}

body {
	position: relative;
}

/* Колір та шрифт не вказані в body, оскільки для дочірниіх елементів в деяких випадках потрібно зазначати для стилів значення - inherit. */

li {
	list-style-type: none;
}

h2 {
	font-weight: 700;
	font-size: 36px;
	line-height: 1.17;
	text-align: center;
	margin-bottom: 50px;
}

a {
	text-decoration: none;
}

.container {
	width: 1200px;
	margin: 0 auto;
	padding: 0 15px;
}


button {
	cursor: pointer;
}

/* -------------- Header -------------- */

header {
	border-bottom: 1px solid #ececec;
	padding: 25px 0;
}

header .container {
	display: flex;
	justify-content: space-between;
}

.logo-nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	color: #212121;
}
.main-logo {
	font-family: "Raleway", sans-serif;
	font-size: 26px;
	font-weight: 700;
	line-height: 1.19;

	margin-right: 93px;
}

.main-logo span {
	color: var(--hover-color);
	font-family: inherit;
}

.logo-nav ul {
	display: flex;
}

.logo-nav li {
	margin-right: 50px;
	position: relative;
}

.logo-nav li a {
	position: relative;
	font-weight: 500;
	font-size: 14px;
	cursor: pointer;
	transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-nav li a::after {
	display: none;
	content: "";
	position: absolute;
	width: 75px;
	height: 4px;
	bottom: -32px;
	left: -1.5px;
	background-color: var(--hover-color);
	border-radius: 2px;
}

.logo-nav li:first-child a::after {
	width: 48px;
}

.logo-nav li:last-child a::after {
	width: 67px;
}

.logo-nav li a:hover,
.logo-nav li a:focus {
	color: var(--hover-color);
}

.focused {
	color: var(--hover-color);
	transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-nav li a.focused::after {
	display: block;
}

.email-tel {
	display: flex;
	align-items: center;
	column-gap: 50px;
}

.email-tel li a {
	display: flex;
	align-items: center;
	column-gap: 10px;
	cursor: pointer;
}

.email,
.tel {
	font-weight: 500;
	font-size: 14px;
	color: #757575;
	line-height: 1.71;
	transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.email-icon {
	fill: #757575;
	width: 16px;
	height: 12px;
	transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.tel-icon {
	fill: #757575;
	width: 10px;
	height: 16px;
	transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.email:hover,
.tel:hover,
.email:focus,
.tel:focus {
	color: var(--hover-color);
}

.email:hover .email-icon,
.tel:hover .tel-icon,
.email:focus .email-icon,
.tel:focus .tel-icon {
	fill: var(--hover-color);
}

/* -------------- Promo -------------- */

.promo {
	width: 100%;
	padding: 200px 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	background-color: #c4c4c4;
	background-image: url("../images/bg_overlay.png"),
		url("../images/main_bg.jpg"), url("../images/bg_underlay.jpg");
	background-position: center center;
	background-repeat: no-repeat;
	background-size: 1600px;
}

.promo h1 {
	max-width: 696px;
	width: 100%;
	font-weight: 900;
	font-size: 44px;
	line-height: 1.36;
	text-transform: uppercase;
	color: #ffffff;
	text-align: center;
	margin-bottom: 30px;
}

.promo button {
	border: none;
	background-color: var(--hover-color);
	box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.15);
	border-radius: 4px;
	width: 216px;
	height: 50px;
	font-weight: 700;
	font-size: 16px;
	color: #fff;
	cursor: pointer;
	transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.promo button:hover,
.promo button:focus {
	background-color: #188ce8;
}

/* -------------- Description -------------- */

.section {
	padding: 94px 0;
}

.description ul {
	display: flex;
	justify-content: space-between;
	column-gap: 30px;
}

.description h3 {
	font-weight: 700;
	font-size: 14px;
	line-height: 1.14;
	text-transform: uppercase;
	color: #212121;
	margin-bottom: 10px;
}

.description p {
	font-size: 14px;
	line-height: 1.71;

	color: #757575;
}

.description-svg {
	width: 270px;
	height: 120px;
	background: #f5f4fa;
	border-radius: 4px;
	margin-bottom: 30px;
	display: flex;
	justify-content: center;
	align-items: center;
}

.description-svg svg {
	width: 70px;
	height: 70px;
}

/* -------------- projects -------------- */

.projects {
	padding-bottom: 94px;
}

.projects ul {
	display: grid;
	grid-template-columns: repeat(3, 370px);
	justify-content: space-between;
}

.projects li {
	position: relative;
}

.projects-text {
	position: absolute;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	font-weight: 700;
	font-size: 14px;
	line-height: 1.14;
	display: flex;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: #ffffff;
	background: rgba(47, 48, 58, 0.8);
	width: 370px;
	height: 70px;
	justify-content: center;
	align-items: center;
}

.projects img {
	height: auto;
	display: block;
	width: 100%;
}

/* -------------- Team -------------- */

.team {
	background-color: #f5f4fa;
}

.team-card {
	display: flex;
	justify-content: space-between;
}

.team-card-item {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	/* height: 368px; */
	width: 270px;
	background-color: #fff;
	box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.12), 0px 1px 1px rgba(0, 0, 0, 0.14),
		0px 2px 1px rgba(0, 0, 0, 0.2);
	border-radius: 0px 0px 4px 4px;
}

.team-card-item img {
	height: auto;
	display: block;
	width: 100%;
}

.team-card-item-descr {
	padding: 30px 0 16px;
}

.team h3 {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	font-weight: 500;
	font-size: 16px;
	line-height: 1.19;
	color: #212121;
}

.team p {
	margin-top: 10px;
	font-weight: 400;
	font-size: 16px;
	line-height: 1.19;
	color: #757575;
	text-align: center;
}

.team-social {
	display: flex;
	justify-content: center;
	margin-bottom: 30px;
	column-gap: 10px;
}

.team-social li {
	width: 44px;
	height: 44px;
	background-color: transparent;
}

.team-social-icon {
	fill: #afb1b8;
	width: 20px;
	height: 20px;
}

.team-social li a,
.clients li a {
	display: flex;
	justify-content: center;
	align-items: center;
	width: inherit;
	height: 100%;
	border-radius: 100%;
	transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.team-social-icon {
	transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.team-social li a:hover,
.team-social li a:focus {
	background-color: var(--hover-color);
}

.team-social li a:hover .team-social-icon,
.team-social li a:focus .team-social-icon {
	fill: #fff;
}

/* ------------------ Clients --------------- */

.clients {
	display: grid;
	grid-template-columns: repeat(6, 170px);
	grid-template-rows: 92px;
	column-gap: 30px;
	justify-content: center;
}

.clients li {
	transition: border-color, fill, 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.clients li a {
	border: 1px solid #afb1b8;
	border-radius: 4px;
	transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.clients-icon {
	transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.clients li a:hover,
.clients li a:focus {
	border-color: var(--hover-color);
}

.clients li:hover .clients-icon,
.clients li a:focus .clients-icon {
	fill: var(--hover-color);
}

.clients-icon {
	fill: #afb1b8;
}

.clients-icon-1 {
	width: 41px;
	height: 46.7px;
}

.clients-icon-2 {
	width: 40px;
	height: 52px;
}

.clients-icon-3 {
	width: 43.46px;
	height: 41.18px;
}

.clients-icon-4 {
	width: 84.44px;
	height: 40.62px;
}

.clients-icon-5 {
	width: 62.54px;
	height: 45.43px;
}

.clients-icon-6 {
	width: 93.79px;
	height: 43.93px;
}
/* -------------- Footer -------------- */

footer {
	padding: 60px 0;
	width: 100%;
	background-color: #2f303a;
}

footer .container {
	padding: 0;
	display: flex;
	column-gap: 70px;
}

footer .main-logo {
	margin-bottom: 20px;
	color: #fff;
}

footer address {
	font-style: normal;
}

footer p {
	font-size: 14px;
	line-height: 1.71;

	color: #ffffff;
	margin-bottom: 9px;
}

footer a {
	color: rgba(255, 255, 255, 0.6);
	display: block;
	width: auto;
}

footer .email,
footer .tel {
	font-weight: 400;
	color: rgba(255, 255, 255, 0.6);
}

.footer__email {
	margin-bottom: 9px;
}

.contacts-social-wrapper {
	padding-top: 10px;
}

.contacts-social-wrapper p,
.subscribe p {
	font-weight: 700;
	font-size: 14px;
	line-height: 1.14;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: #ffffff;
	margin-bottom: 20px;
}

.contacts-social {
	display: flex;
	column-gap: 10px;
}

.contacts-social li {
	width: 44px;
	height: 44px;
	border-radius: 100%;
	background-color: rgba(255, 255, 255, 0.1);
	transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.contacts-social-icon {
	fill: #fff;
	width: 20px;
	height: 20px;
}

.contacts-social li a {
	display: flex;
	justify-content: center;
	align-items: center;
	width: inherit;
	height: 100%;
	border-radius: 100%;
}

.contacts-social li:hover,
.contacts-social li a:focus {
	background-color: var(--hover-color);
}

.subscribe {
	margin-left: 23px;
	padding-top: 10px;
}

.subscribe p {
	margin-bottom: 19px;
}

.subscribe label {
	appearance: none;
	opacity: 0;
	display: block;
	height: 0;
}

.subscribe input {
	width: 358px;
	border: 1px solid rgba(255, 255, 255, 0.3);
	filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.15));
	border-radius: 4px;
	background-color: transparent;
	padding: 14px 16px;
	line-height: 1.25;
	color: #fff;
	outline: none;
}

.subscribe input:focus {
	border-color: var(--hover-color);
}

.subscribe input::placeholder {
	line-height: 1.25;
	letter-spacing: 0.03em;
	color: rgba(255, 255, 255, 0.6);
}

.subscribe button {
	display: inline-flex;
	align-items: center;
	border: none;
	width: 200px;
	background: #2196f3;
	box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.15);
	border-radius: 4px;
	padding: 10px 28px;
	font-weight: 700;
	line-height: 1.88;
	text-align: center;
	letter-spacing: 0.06em;
	color: #ffffff;
	cursor: pointer;
	margin-left: 9px;
}

.subscribe button svg {
	fill: #fff;
	width: 24px;
	height: 24px;
	margin-left: 10px;
}
/* ----------------- Portfolio ----------------- */

.portfolio {
	padding: 94px 0;
}

.portfolio-filter {
	display: flex;
	justify-content: center;
	column-gap: 8px;
	height: 38px;
}

.portfolio-filter li button {
	height: 38px;
	border: none;
	display: flex;
	align-items: center;
	padding: 0 22px;
	font-weight: 500;
	font-size: 16px;
	line-height: 1.625;
	text-align: center;

	background: #f5f4fa;
	border-radius: 4px;
	cursor: pointer;
	transition: color, background-color,
		box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-filter li button:hover,
.portfolio-filter li button:focus {
	color: #ffffff;
	background-color: var(--hover-color);
	box-shadow: 0px 3px 1px rgba(0, 0, 0, 0.1), 0px 1px 2px rgba(0, 0, 0, 0.08),
		0px 2px 2px rgba(0, 0, 0, 0.12);
}

.portfolio-wrapper {
	margin-top: 50px;
	display: grid;
	justify-content: center;
	grid-template-columns: repeat(3, 370px);
	gap: 30px;
	grid-template-rows: repeat(3, 404px);
	grid-auto-rows: 404px;
}

.portfolio-wrapper li {
	cursor: pointer;
	transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-wrapper li:hover,
.portfolio-wrapper li:focus {
	box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.12), 0px 4px 4px rgba(0, 0, 0, 0.06),
		1px 4px 6px rgba(0, 0, 0, 0.16);
}

.portfolio-wrapper li:hover .card-hover-text,
.portfolio-wrapper li:focus .card-hover-text {
	top: 0;
}

.portfolio-card {
	position: relative;
	overflow: hidden;
	height: 100%;
	display: block;
}

.card-hover-text {
	position: absolute;
	width: 370px;
	height: 294px;
	top: 294px;
	left: 0;
	background-color: rgba(33, 150, 243, 0.9);
	font-size: 18px;
	line-height: 1.56;
	letter-spacing: 0.03em;
	color: #ffffff;
	display: flex;
	align-items: center;
	padding: 0 24px;
	z-index: 1;
	transition: top 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-wrapper img {
	height: auto;
	width: 100%;
	display: block;
}

.portfolio-wrapper-descr {
	border-left: 1px solid #eeeeee;
	border-right: 1px solid #eeeeee;
	border-bottom: 1px solid #eeeeee;
	padding: 20px 24px 19px;
	position: absolute;
	bottom: 0;
	width: 100%;
	background-color: #fff;
	z-index: 2;
}

.portfolio-wrapper-descr h2 {
	text-align: left;
	font-weight: 700;
	font-size: 18px;
	line-height: 2;
	letter-spacing: 0.06em;
	margin-bottom: 4px;
}

.portfolio-wrapper-descr p {
	line-height: 1.875;
	color: #757575;
}

/* ------------- 





Modal 





------------*/

.modal {
	position: absolute;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background-color: rgba(0, 0, 0, 0.2);
	display: flex;
	justify-content: center;
	align-items: center;
	opacity: 1;
	transform: scale(1);
	z-index: 5;
}

.is-visible {
	overflow: hidden;
}

.is-hidden {
	visibility: hidden;
	pointer-events: none;
}

.closed-style {
	opacity: 0;
	transform: scale(0.7);
	transition: transform, opacity, 2s ease-in-out;
}

.modal-window {
	width: 528px;
	padding: 40px;
	position: relative;
	background: #ffffff;
	box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.12), 0px 1px 1px rgba(0, 0, 0, 0.14),
		0px 2px 1px rgba(0, 0, 0, 0.2);
	border-radius: 4px;
}

.modal-window-animation {
	animation: rotateY 2s ease-in;
}

.modal-close {
	position: absolute;
	width: 30px;
	height: 30px;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 100%;
	top: 8px;
	right: 8px;
	display: flex;
	justify-content: center;
	align-items: center;
	cursor: pointer;
}

.modal-window h2 {
	font-weight: 700;
	font-size: 20px;
	line-height: 1.15;
	text-align: center;
	letter-spacing: 0.03em;
	margin-bottom: 12px;
}

.modal-window label {
	font-size: 12px;
	line-height: 1.166;
	letter-spacing: 0.01em;
	color: #757575;
	position: relative;
}

.modal-window input {
	width: 100%;
	display: block;
	border: 1px solid rgba(33, 33, 33, 0.2);
	border-radius: 4px;
	height: 40px;
	padding: 12px 42px;
	margin: 4px 0 10px;
	outline: none;
}

.modal-window input:focus {
	border-color: var(--hover-color);
}

.modal-window input:focus + svg {
	fill: var(--hover-color);
}

.modal-window label svg {
	position: absolute;
	top: 32px;
	left: 12px;
	fill: var(--main-color);
}

.modal-window label[for="modal-name"] svg {
	width: 12px;
	height: 12px;
}

.modal-window label[for="modal-tel"] svg {
	width: 13px;
	height: 13px;
}

.modal-window label[for="modal-email"] svg {
	width: 15px;
	height: 12px;
}

.modal-window textarea {
	display: block;
	margin: 4px 0 16px;
	padding: 12px 16px;
	width: 100%;
	height: 120px;
	resize: none;
	border: 1px solid rgba(33, 33, 33, 0.2);
	border-radius: 4px;
}

.modal-window textarea::placeholder {
	font-size: 12px;
	line-height: 1.166px;
	letter-spacing: 0.01em;
	color: rgba(117, 117, 117, 0.5);
	padding-top: 7px;
}

.modal-window textarea:focus {
	border-color: var(--hover-color);
}

.agree-block {
	margin-bottom: 30px;
}

.agree-block label {
	cursor: pointer;
	user-select: none;
	padding-left: 37px;
	font-size: 14px;
	line-height: 1.71;
	letter-spacing: 0.03em;
	color: #757575;
}

.agree-block label a {
	color: var(--hover-color);
	text-decoration: underline;
}

.agree-block input {
	position: absolute;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: 0;
	border: none;
}

.checkbox {
	top: 0;
	left: 14px;
	position: absolute;
	width: 16px;
	height: 15px;
	background-image: url(../images/svg/checkbox/checkbox.svg);
}

.agree-block input:checked ~ .checkbox {
	background-image: url(../images/svg/checkbox/checkbox-checked.svg);
}

.modal-window button {
	background: #188ce8;
	box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.15);
	border-radius: 4px;
	font-weight: 700;
	line-height: 1.88;
	letter-spacing: 0.06em;
	display: block;
	margin: 0 auto;
	padding: 10px 52px;
	border: none;
	color: #ffffff;
}

/*




fldkmgkmdklmfngks






*/
@keyframes rotateY {
	0% {
		transform: perspective(1000px) rotateY(90deg);
	}
	33% {
		transform: perspective(1000px) rotateY(-60deg);
	}

	66% {
		transform: perspective(1000px) rotateY(30deg);
	}

	100% {
		transform: perspective(1000px) rotateY(0);
	}
}
