:root {
  --main-title-color: #2e2f42;
  --main-text-color: #434455;
  --cl-accent: #4d5ae5;
  --cl-focus: #404bbf;

  --main-background-color: #ffffff;
  --secondary-background-color: #2e2f42;
  --button-background-color-accent: #4d5ae5;
  --button-background-focus: #404bbf;

  --cubic: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* #region General*/
body {
  font-family: 'Roboto', sans-serif;
  color: var(--main-text-color);
  background-color: var(--main-background-color);
}

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

ul {
  margin: 0;
  padding-left: 0;
}

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

.list {
  list-style: none;
}

.link {
  text-decoration: none;
}

.container {
  /* outline: 1px solid red; */
  width: 1158px;
  padding-left: 15px;
  padding-right: 15px;
  margin: 0 auto;
}

/* #endregion */

/* #region Header*/
.header {
  background-color: #ffffff;
  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);
}

.header-container {
  display: flex;
}

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

.header-logo {
  margin-right: 76px;
  display: block;
  padding: 24px 0;
  font-family: 'Raleway', sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--cl-accent);
}

.header-logo-span {
  color: var(--main-title-color);
}

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

.header-link {
  display: block;
  position: relative;
  padding: 24px 0;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.32px;
  color: var(--main-title-color);
  transition: color var(--cubic);
}

.header-link.current {
  color: var(--cl-focus);
}

.header-link.current::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 4px;
  background: var(--cl-focus);
  left: 0;
  bottom: -1px;
  border-radius: 2px;
}

.header-link:hover,
.header-link:focus {
  color: var(--cl-focus);
}

.header-address {
  font-style: normal;
}

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

.header-contacts-item {
  display: block;
  padding: 24px 0;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.32px;
  color: var(--cl-focus);
  transition: color var(--cubic);
}

.header-contacts-item:hover,
.header-contacts-item:focus {
  color: var(--cl-focus);
}
/* #endregion */

/* #region Hero*/
.hero {
  max-width: 1440px;
  height: 600px;
  margin: 0 auto;
  background-image: linear-gradient(
      rgba(46, 47, 66, 0.7),
      rgba(46, 47, 66, 0.7)
    ),
    url(../images/bg-office-opt.jpg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  text-align: center;
  padding-top: 188px;
  padding-bottom: 188px;
  background-color: var(--secondary-background-color);
}

.hero-title {
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 48px;
  max-width: 496px;
  font-weight: 700;
  font-size: 56px;
  line-height: 1.07;
  letter-spacing: 1.12px;
  color: #ffffff;
  text-align: center;
}

.hero-button {
  display: block;
  min-width: 169px;
  height: 56px;
  padding: 16px 32px;
  margin: 0 auto;
  font-family: 'Roboto', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 500;
  letter-spacing: 0.64px;
  color: #ffffff;
  background-color: var(--button-background-color-accent);
  border: 1px solid transparent;
  border: none;
  border-radius: 4px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: background-color var(--cubic);
}

.hero-button:hover,
.hero-button:focus {
  background-color: var(--button-background-focus);
}
/* #endregion */

/* #region Values*/
.values {
  padding-top: 120px;
  padding-bottom: 120px;
}

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

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

.values-block {
  width: 264px;
}

.values-icons {
  display: flex;
  width: 100%;
  height: 112px;
  margin-bottom: 8px;
  background-color: #f4f4fd;
  border-radius: 4px;
  border: 1px solid #8e8f99;
  justify-content: center;
  align-items: center;
}

.values-item {
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.4px;
  color: var(--main-title-color);
}

.values-item-text {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.32px;
  font-weight: 400;
  color: var(--main-text-color);
}
/* #endregion */

/* #region  Our team*/
.team {
  background-color: #f4f4fd;
  padding-top: 120px;
  padding-bottom: 120px;
}

.title {
  margin-bottom: 72px;
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.72px;
  text-align: center;
  text-transform: capitalize;
  color: var(--main-title-color);
}

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

.team-item {
  background-color: var(--main-background-color);
  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);
}

.team-text {
  padding-top: 32px;
  padding-bottom: 32px;
  text-align: center;
}

.team-name {
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.4px;
  text-align: center;
  color: var(--main-title-color);
}

.team-job-title {
  margin-bottom: 8px;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.32px;
  text-align: center;
}

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

.social-list-link {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--button-background-color-accent);
  transition: background-color var(--cubic);
}

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

.team-social-list-icon {
  fill: #f4f4fd;
}

/* #endregion */

/* #region Our Portfolio*/
.portfolio {
  padding-top: 120px;
  padding-bottom: 120px;
}

.portfolio-offer {
  display: flex;
  flex-wrap: wrap;
  row-gap: 48px;
  column-gap: 24px;
}

.portfolio-offer-item {
  width: calc((100% - 48px) / 3);
  transition: box-shadow var(--cubic);
}

.portfolio-offer-item:hover,
.portfolio-offer-item:focus {
  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-offer-item:hover .portfolio-top-text,
.portfolio-offer-item:focus .portfolio-top-text {
  transform: translateY(0);
}

.portfolio-pic-text {
  position: relative;
  overflow: hidden;
}

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

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

.offer-name {
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.4px;
  color: var(--main-title-color);
}

.offer-type {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.32px;
}
/* #endregion */

/* #region Footer*/
.footer {
  margin-bottom: 16px;
  padding-top: 100px;
  padding-bottom: 100px;
  background-color: var(--secondary-background-color);
}

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

.footer-text-container {
  margin-right: 120px;
}

.footer-logo {
  display: inline-block;
  margin-bottom: 16px;
  font-family: 'Raleway', sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.54px;
  text-transform: uppercase;
  color: var(--cl-accent);
}

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

.footer-text {
  width: 264px;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.32px;
  color: #ffffff;
}

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

.footer-soc-med > .footer-text {
  margin-bottom: 16px;
  font-weight: 500;
}

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

.footer-social-list-link {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--button-background-color-accent);
  transition: background-color var(--cubic);
}

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

.footer-social-list-icon {
  fill: #f4f4fd;
}

/* #endregion */
