/* ===== Normalize ===== */
@import url("https://cdnjs.cloudflare.com/ajax/libs/modern-normalize/1.1.0/modern-normalize.min.css");

/* ===== Base styles ===== */
html {
  scroll-behavior: smooth;
}

body {
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  color: #2e2f42;
  background-color: #ffffff;
  margin: 0;
}

.container {
  align-items: center;
  width: 1158px;
  padding-left: 15px;
  padding-right: 15px;
  margin: 0 auto;
}

.header-box > .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ===== Typography reset ===== */
h1,
h2,
h3,
p {
  margin: 0;
}

/* ===== Lists reset ===== */
ul {
  list-style: none;
  margin: 0;
}

/* ===== Links ===== */
a {
  text-decoration: none;
  color: inherit;
}

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

.hero-button:hover,
.hero-button:focus {
  background-color: #404bbf;
}

/* ===== Header contacts hover ===== */
address a:hover,
address a:focus {
  color: #404bbf;
}

/* ===== Visually hidden ===== */

.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;
}

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

a {
  text-decoration: none;
  color: inherit;
}

/* ===== Navigation Header ===== */
.site-nav {
  display: flex;
  align-items: center;
}

.header-box {
  background-color: #ffffff;
  display: flex;
  align-items: flex-end;
  border-bottom: 1px solid #e7e9fc;
  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);
}

.logo-header {
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #4d5ae5;
  margin-right: 76px;
}

.nav-list {
  display: flex;
  gap: 40px;
  margin-left: auto;
  justify-content: flex-start;
}

.logo {
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  font-size: 18px;

  /* line-height: 21px; */
  line-height: 1.17;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #4d5ae5;
}
.logo:focus {
  color: #404bbf;
}

.logo-accent-header {
  color: #2e2f42;
}

.logo-accent {
  color: #f4f4fd;
}

.nav-link {
  color: #404bbf;
  text-decoration: none;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.02em;
  padding: 24px 0;
  display: block;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.nav-link-studio::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 4px;
  background-color: #404bbf;
  border-radius: 2px;
}

.nav-link:hover,
.nav-link:focus {
  color: #404bbf;
}

.contacts {
  font-style: normal;
}
.contact-text {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-list {
  display: flex;
  gap: 40px;
  align-items: flex-end;
  margin-left: auto;
  justify-content: flex-end;
}

/* ===== Hero Section ===== */
.hero-section {
  background-image: linear-gradient(
      rgba(46, 47, 66, 0.7),
      rgba(46, 47, 66, 0.7)
    ),
    url("../images/officepeople.jpeg");
  padding-top: 188px;
  padding-bottom: 188px;
  text-align: center;
  color: white;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  margin: 0 auto;
}

.hero-section .container {
  max-width: 1158px;
  margin: 0 auto;
}

.hero-name {
  font-family: "Roboto", sans-serif;
  font-weight: 700;
  font-size: 56px;
  color: #ffff;
  text-align: center;
  max-width: 496px;
  line-height: 107%;
  letter-spacing: 0.02em;
  margin: 0 auto;
  display: block;
  margin-bottom: 48px;
}

/* ===== Strategy Section ===== */
.strategy-box {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 112px;
  background-color: #f4f4fd;
  border-radius: 4px;
  border: 1px solid #8e8f99;
  margin-bottom: 8px;
}

.strategy-section {
  padding-bottom: 120px;
  padding-top: 120px;
}

.strategy-card {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #2e2f42;
  margin-bottom: 8px;
}

.strategy-list {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

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

.strategy-text {
  line-height: 1.5;
  letter-spacing: 0.02em;
  max-width: 264px;
}

/* ===== Team Section ===== */
.strategy-contacts-list {
  display: flex;
  justify-content: center;
  gap: 24px;
}

.strategy-contacts-item {
  width: 40px;
  height: 40px;
}

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

.strategy-contacts-link:hover,
.strategy-contacts-link:focus {
  background-color: #404bbf;
  background-color: #404bbf;
}

.icon-class {
  fill: #f4f4fd;
}

.team-section {
  background-color: #f4f4fd;
  padding: 120px 0;
}

.team-title {
  font-size: 36px;
  line-height: 1.11;
  text-align: center;
  letter-spacing: 0.02em;
  text-transform: capitalize;
  color: #2e2f42;
  margin: 0 auto;
  margin-bottom: 72px;
}

.team-list {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
  gap: 24px;
}

.team-card {
  background-color: #ffffff;
  border-radius: 0px 0px 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);
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.team-card:hover {
  background-color: #f4f4fd;
}

.team-card-name {
  padding: 32px 0;
}

.team-card-title {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #2e2f42;
  margin: 0 auto;
  text-align: center;
  margin-bottom: 8px;
}

.team-card-text {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  margin: 0 auto;
  text-align: center;
  margin-bottom: 8px;
}

/* ===== Portfolio Section ===== */
.portfolio-section {
  padding: 120px 0;
}

.portfolio-list {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
  row-gap: 48px;
  column-gap: 24px;
}

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

.first-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);
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-name {
  padding: 32px 16px;
  border: 1px solid #e7e9fc;
  border-top: none;
}

.portfolio-title {
  font-size: 36px;
  line-height: 1.11;
  text-align: center;
  letter-spacing: 0.02em;
  text-transform: capitalize;
  color: #2e2f42;
  margin-bottom: 72px;
}

.portfolio-card-title {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #2e2f42;
  margin-bottom: 8px;
}

.portfolio-card-text {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  margin: 0 auto;
}

.portfolio-item-text {
  position: absolute;
  top: 0;
}

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

.portfolio-image-cover {
  position: relative;
  overflow: hidden;
}

.first-portfolio-item:hover .portfolio-back-text {
  transform: translateY(0%);
}

/* ===== Footer ===== */
.footer {
  background-color: #2e2f42;
  color: #ffffff;
  padding: 100px 0;
}

.footer-text {
  line-height: 1.5;
  color: #f4f4fd;
  letter-spacing: 0.02em;
  max-width: 264px;
}

.logo-footer {
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #4d5ae5;
  margin-bottom: 16px;
  display: inline-block;
}

.logo-accent-footer {
  color: #f4f4fd;
}

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

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

.footer-box-left {
  margin-right: 120px;
}

.footer-box-right {
  display: flex;
  align-items: baseline;
  margin-right: 120px;
  flex-direction: column;
  align-items: flex-start;
}

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

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

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

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

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