/* ================= RESET ================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --iris: #4d5ae5;
  --ocean: #404bbf;
  --navy-blue: #2e2f42;
  --slate: #434455;
  --cloud: #f4f4fd;
  --cornflower: #e7e9fc;
}

body {
  font-family: "Roboto", sans-serif;
  color: var(--slate);
  background-color: #ffffff;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin: 0;
}

ul,
ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

a {
  text-decoration: none;
}

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

/* ================= COMMON ================= */

.container {
  max-width: 1158px;
  padding: 0 15px;
  margin: 0 auto;
}

.section-title {
  margin-bottom: 72px;
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  text-align: center;
  color: var(--navy-blue);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  border: 0;
  padding: 0;
  white-space: nowrap;
  clip-path: inset(100%);
  clip: rect(0 0 0 0);
  overflow: hidden;
}

/* ================= LOGO ================= */

.logo {
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--iris);
}

.logo-part {
  color: var(--navy-blue);
}

/* ================= HEADER ================= */

.page-header {
  border-bottom: 1px solid var(--cornflower);
  box-shadow: 0px 2px 1px rgba(46, 47, 66, 0.08),
    0px 1px 1px rgba(46, 47, 66, 0.16),
    0px 1px 6px rgba(46, 47, 66, 0.08);
}

.header-container {
  display: flex;
  align-items: center;
}

.header-nav {
  display: flex;
  align-items: center;
}

.header-logo {
  margin-right: 76px;
  padding: 24px 0;
}

.nav-list {
  display: flex;
  gap: 40px;
}

.nav-link {
  padding: 24px 0;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--navy-blue);
  position: relative;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover,
.nav-link:focus {
  color: var(--ocean);
}

.nav-link.current {
  color: var(--ocean);
}

.nav-link.current::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background-color: var(--ocean);
}

.contacts {
  margin-left: auto;
  font-style: normal;
}

.contacts-list {
  display: flex;
  gap: 40px;
}

.contacts-link {
  padding: 24px 0;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--slate);
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.contacts-link:hover,
.contacts-link:focus {
  color: var(--ocean);
}

/* ================= HERO ================= */

.hero-section {
  max-width: 1440px;
  margin: 0 auto;
  padding: 188px 0;

  background-image: linear-gradient(
      rgba(46, 47, 66, 0.7),
      rgba(46, 47, 66, 0.7)
    ),
    url(../images/people-office.jpg);

  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.headline-text {
  max-width: 496px;
  margin: 0 auto 48px;
  text-align: center;
  font-weight: 700;
  font-size: 56px;
  line-height: 1.07;
  letter-spacing: 0.02em;
  color: #ffffff;
}

.hero-button {
  display: block;
  margin: 0 auto;
  min-width: 169px;
  height: 56px;
  border: none;
  border-radius: 4px;
  background-color: var(--iris);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #ffffff;
  cursor: pointer;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-button:hover,
.hero-button:focus {
  background-color: var(--ocean);
}

/* ================= ADVANTAGES ================= */

.advantages-section {
  padding: 120px 0;
}

.advantages-list {
  display: flex;
  gap: 24px;
}

.advantages-item {
  width: calc((100% - 72px) / 4);
}

.advantages-icon-container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 112px;
  margin-bottom: 8px;
  background-color: var(--cloud);
  border: 1px solid #8e8f99;
  border-radius: 4px;
}

.advantages-subtitle {
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--navy-blue);
}

.advantages-text {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

/* ================= TEAM ================= */

.team-section {
  padding: 120px 0;
  background-color: var(--cloud);
}

.team-list {
  display: flex;
  gap: 24px;
}

.team-item {
  width: calc((100% - 72px) / 4);
  background-color: #ffffff;
  border-radius: 0 0 4px 4px;
  box-shadow: 0px 1px 6px rgba(46, 47, 66, 0.08),
    0px 1px 1px rgba(46, 47, 66, 0.16),
    0px 2px 1px rgba(46, 47, 66, 0.08);
}

.team-info {
  padding: 32px 0;
  text-align: center;
}

.team-names-text {
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--navy-blue);
}

.team-position-text {
  margin-bottom: 8px;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

/* ================= SOCIAL ICONS ================= */

.social-list {
  display: flex;
  justify-content: center;
  gap: 24px;
}

.social-item {
  width: 40px;
  height: 40px;
}

.social-link {
  width: 100%;
  height: 100%;
  background-color: var(--iris);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.social-link:hover,
.social-link:focus {
  background-color: var(--ocean);
}

.social-icon {
  fill: var(--cloud);
}

/* ================= PORTFOLIO ================= */

.portfolio-section {
  padding: 120px 0;
}

.portfolio-list {
  display: flex;
  flex-wrap: wrap;
  gap: 48px 24px;
}

.portfolio-item {
  width: calc((100% - 48px) / 3);
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-item:hover {
  box-shadow: 0px 1px 6px rgba(46, 47, 66, 0.08),
    0px 1px 1px rgba(46, 47, 66, 0.16),
    0px 2px 1px rgba(46, 47, 66, 0.08);
}

.portfolio-thumb {
  position: relative;
  overflow: hidden;
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  padding: 40px 32px;
  height: 100%;
  width: 100%;
  background-color: var(--iris);
  color: var(--cloud);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  transform: translateY(100%);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-item:hover .portfolio-overlay {
  transform: translateY(0);
}

.portfolio-info {
  padding: 32px 16px;
  border: 1px solid var(--cornflower);
  border-top: none;
}

.portfolio-title-text {
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--navy-blue);
}

.portfolio-category-text {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

/* ================= FOOTER ================= */

.page-footer {
  padding: 100px 0;
  background-color: var(--navy-blue);
}

.footer-container {
  display: flex;
  align-items: baseline;
}

.footer-brand {
  margin-right: 120px;
}

.footer-logo {
  display: inline-block;
  margin-bottom: 16px;
}

.footer-logo .logo-part {
  color: var(--cloud);
}

.footer-text {
  max-width: 264px;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--cloud);
}

.footer-social-title {
  margin-bottom: 16px;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #ffffff;
}

.footer-social-list {
  display: flex;
  gap: 16px;
}

.footer-social-item {
  width: 40px;
  height: 40px;
}

.footer-social-link {
  width: 100%;
  height: 100%;
  background-color: var(--iris);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-social-link:hover,
.footer-social-link:focus {
  background-color: #31d0aa;
}

.footer-social-icon {
  fill: var(--cloud);
}
