/*************************** MAIN STYLES********************/
:root {
    --iris: #4d5ae5;
    --ocean: #404bbf;
    --navy-blue: #2e2f42;
    --green: #31d0aa;
    --slate: #434455;
    --light-slate: #8e8f99;
    --cornflower: #e7e9fc;
    --cloud: #f4f4fd;
    --navy-blue-modal: rgba(46, 47, 66, 0.4);
    --grey: rgba(46, 47, 66, 0.7);
    --white: #ffffff;
    --dairy: #fcfcfc;


    --font-family: "Roboto", sans-serif;
    --second-family: "Raleway", sans-serif;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    font-weight: 400;
    color: var(--slate);
    background-color: var(--white);
    line-height: 1.5;
    letter-spacing: 0.02em;
    
}

a {
    text-decoration: none;

}

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

h2, h3 {
    color: var(--navy-blue);
    margin: 0;
}

p {
    margin: 0;
}

img {
  display: block;
}

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

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

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

}

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

.logo {
  font-family: var(--second-family);
  color: var(--navy-blue);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-right: 76px;
}

.logo-link {
  color: var(--iris);
}

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

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

.nav-link {
  color: var(--navy-blue);
  font-weight: 500;
  letter-spacing: 0.02em;
  display: block;
  padding-top: 24px;
  padding-bottom: 24px;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.nav-link.current-link::after {
  position: absolute;
  content: "";
  left: 0;
  bottom: -1px;

  width: 100%;
  height: 4px;
  border-radius: 2px;
  background-color: var(--ocean);
}

.address {
  margin-left: auto;
}

.address-link {
  color: var(--slate);
  font-style: normal;
  letter-spacing: 0.02em;
  display: block;
  padding-top: 24px;
  padding-bottom: 24px;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  
}

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

/************************** Section HERO*********************/
.hero {
  display: block;
  margin: 0 auto;
  max-width: 1440px;
  background-color: var(--navy-blue);
  background-image: linear-gradient(
    to bottom,
    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;
}

.hero-wrapper{
  display: flex;
  flex-direction: column;
  align-items: center;  
  text-align: center;
  padding-top: 188px;
  padding-bottom: 188px;
}

.hero-title {
  font-size: 56px;
  line-height: 1.07;
  letter-spacing: 0.02em;
  color: var(--white);
  margin-top: 0;
  margin-bottom: 48px;
  max-width: 496px;
  
}

.hero-button {
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: var(--white);
  background-color: var(--iris);
  padding: 16px 32px;
  cursor: pointer;
  border: none;
  border-radius: 4px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  transition: 
    transform 250ms cubic-bezier(0.4,0,0.2,1),
    color 250ms cubic-bezier(0.4, 0, 0.2, 1),
    background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-button:hover,
.hero-button:focus {
  transform: translateY(-1px);
  background-color: var(--ocean);
  color: var(--white);
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
}

.hero-button:active {
  transform: translateY(1px);
}
/************************ Section OUR FEATURES **************/

.features-title {
  font-size: 36px;
  letter-spacing: 0.02em;
  line-height: 1.11;
  text-align: center;
}

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

.features-item {
  flex-basis: calc((100% - 72px) / 4);
}

.wrapper-features-icon {
  width: 100%;
  height: 112px;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid var(--light-slate);
  border-radius: 4px;
  background: var(--cloud);
  margin-bottom: 8px;
}

.features-item-heading {
  font-size: 20px;
  letter-spacing: 0.02em;
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 8px;
}

.features-item-paragraph {
  letter-spacing: 0.02em;
}

/************************* Section OUR TEAM ****************/
.team {
  background: var(--cloud);
}


.team-title {
  text-align: center;
  font-size: 36px;
  letter-spacing: 0.02em;
  line-height: 1.11;
  margin-bottom: 72px;
}

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

.team-item {
  background: var(--white);
  border-radius: 0 0 4px 4px;
  box-shadow: 0 2px 1px 0 rgba(46, 47, 66, 0.08), 0 1px 1px 0 rgba(46, 47, 66, 0.16), 0 1px 6px 0 rgba(46, 47, 66, 0.08);
}

.team-cart {
  padding: 32px 16px;
}

.team-heading {
  font-size: 20px;
  letter-spacing: 0.02em;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  margin-bottom: 8px;
}

.team-paragraph {
  letter-spacing: 0.02em;
  text-align: center;
  margin-bottom: 8px;
}

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

.team-icon-item {
  width: 40px;
  height: 40px;
}

.team-link {
  width: 100%;
  height: 100%;

  display: flex;
  align-items: center;
  justify-content: center;

  background-color: var(--iris);
  border-radius: 50%;

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

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

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



/************************ Section OUR PORTFOLIO *************/

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

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

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

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

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

}

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

.card-overlay {
  position: absolute;
  inset: 0;

  padding: 40px 32px;
  color: var(--cloud);
  background-color: var(--iris);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(100%);
}

.portfolio-item-cart {
  padding: 32px 16px;
  border-bottom: 1px solid var(--cornflower);
  border-left: 1px solid var(--cornflower);
  border-right: 1px solid var(--cornflower);
}

.portfolio-item-heading {
  font-size: 20px;
  letter-spacing: 0.02em;
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 8px;
}

.portfolio-item-paragraph {
  letter-spacing: 0.02em;
}

/*************************** FOOTER **********************/
.footer {
  background-color: var(--navy-blue);
  padding: 100px 0;
}
.footer-wrapper {
  display: flex;
  align-items: baseline;
}

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

.logo-footer {
  display: inline-block;
  color: var(--cloud);
  margin-bottom: 16px;
}

.footer-paragraph {
  letter-spacing: 0.02em;
  color: var(--cloud);
  max-width: 264px;
}

.footer-social-paragraph {
font-weight: 500;
color: var(--white);
margin-bottom: 16px;
}

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

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

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

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

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

.footer-subscribe {
  margin-left: auto;
}

.footer-subscribe-paragraph {
  font-weight: 500;
  color: var(--white);
  margin-bottom: 16px;
}

.footer-form {
  display: flex;
  justify-content: center;
  align-items: center;
}

.footer-form-label {
  margin-right: 24px;
}

.footer-form-input {
  box-sizing: border-box;
  height: 40px;
  width: 264px;
  background: var(--navy-blue);
  border: 1px solid var(--white);
  border-radius: 4px;
  padding: 8px 16px;
  font-weight: 400;
  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.04em;
  color: var(--white);
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  transition: 
      box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1),
      border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-form-input:hover,
.footer-form-input:focus {
  outline: none; 
  border-color: var(--green);
}

.footer-form-input::placeholder {
  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.04em;
  color: var(--white);
}

.footer-form-btn {
  cursor: pointer;
  border: none;

  font-weight: 500;
  letter-spacing: 0.04em;
  text-align: center;
  color: var(--white);

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;

  padding: 8px 24px;
  background-color: var(--iris);
  border-radius: 4px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  transition: 
    transform 250ms cubic-bezier(0.4,0,0.2,1),
    box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1),
    background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-form-btn:hover,
.footer-form-btn:focus {
  transform: translateY(-1px);
  background-color: var(--green);
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
}

.footer-form-btn:active {
  transform: translateY(1px);
}

.footer-btn-icon {
  fill: var(--white);
}

/*****************MODAL*******************/

.modal-overlay {
  background-color: var(--navy-blue-modal);

  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 250ms cubic-bezier(0.4,0,0.2,1);
}

.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal {
  position: absolute;

  border-radius: 4px;
  width: 408px;
  min-height: 584px;
  padding: 72px 24px 24px 24px;

  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 1px 3px 0 rgba(0, 0, 0, 0.12), 0 2px 1px 0 rgba(0, 0, 0, 0.2);
  background-color: var(--dairy);
}

.modal-close {
  position: absolute;
  top: 24px;
  right: 24px;

  cursor: pointer;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  background-color: var(--cornflower);

  display: flex;
  justify-content: center;
  align-items: center;

  transition: 
      transform 250ms cubic-bezier(0.4, 0, 0.2, 1),
      box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1),
      background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-close:hover,
.modal-close:focus {
  transform: translateY(-1px);
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  background-color: var(--ocean);
}

.modal-close:hover .modal-close-vector,
.modal-close:focus .modal-close-vector {
  fill: var(--white);
}

.modal-close:active {
  transform: translateY(1px);
}

.modal-close-vector {
  fill: var(--navy-blue);
  transition: 
      fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-paragraph {
  font-weight: 500;
  text-align: center;
  color: var(--navy-blue);
  margin-bottom: 16px;
}

.modal-form {
  display: flex;
  flex-direction: column;
}

.form-field {
  margin-bottom: 8px;
}

.form-label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  line-height: 1.16667;
  letter-spacing: 0.04em;
  color: var(--light-slate);
}

.input-wrapper {
  position: relative;
}

.form-input {
  width: 100%;
  height: 40px;
  border: 1px solid var(--navy-blue-modal);
  border-radius: 4px;
  padding: 8px 16px 8px 38px;
  transition: 
      border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.form-input:hover,
.form-input:focus {
  outline: none;
  border-color: var(--iris);
}

.form-input:hover + .form-icon,
.form-input:focus + .form-icon {
  fill: var(--iris);
}

.form-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);

  fill: var(--navy-blue);
  transition: 
      fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.form-textarea {
  width: 100%;
  height: 120px;
  padding: 8px 16px;

  border: 1px solid var(--navy-blue-modal);
  border-radius: 4px;
  resize: none;
  outline: none;
  transition: 
      border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.form-textarea:hover,
.form-textarea:focus {
  border-color: var(--iris);
}

.form-textarea::placeholder {
  font-size: 12px;
  line-height: 1.16667;
  letter-spacing: 0.04em;
  color: var(--navy-blue-modal);
}

.input-check {
  opacity: 0;
  pointer-events: none;
}

.form-label-checked {
  display: flex;
  align-items: center;
  position: relative;

  font-weight: 400;
  font-size: 12px;
  line-height: 1.16667;
  letter-spacing: 0.04em;
  color: var(--light-slate);
}

.form-field-textarea {
  margin-bottom: 16px;
}

.form-field-checkbox {
  margin-bottom: 24px;
}

.form-checked-icon {
  width: 16px;
  height: 16px;
  border-radius: 2px;
  border: 1px solid var(--navy-blue-modal);
  margin-right: 8px;

  display: flex;
  justify-content: center;
  align-items: center;
  fill: transparent;
  transition:
    background-color 250ms cubic-bezier(0.4,0,0.2,1),
    fill 250ms cubic-bezier(0.4,0,0.2,1),
    border-color 250ms cubic-bezier(0.4,0,0.2,1);
}

.input-check:checked + .form-label-checked .form-checked-icon {
  border: none;
  fill: var(--cloud);
  background-color: var(--ocean);
}

.form-checkbox-link {
  line-height: 1.33333;
  text-decoration: underline;
  text-decoration-skip-ink: none;
  color: var(--iris);
}

.btn-div {
  display: flex;
  justify-content: center;
}

.modal-form-btn {
  min-width: 169px;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-align: center;
  color: var(--white);

  padding: 16px 32px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  background-color: var(--iris);
  border-radius: 4px;
  cursor: pointer;
  border: none;
  transition: 
    transform 250ms cubic-bezier(0.4,0,0.2,1),
    color 250ms cubic-bezier(0.4, 0, 0.2, 1),
    background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-form-btn:hover,
.modal-form-btn:focus {
  transform: translateY(-1px);
  background-color: var(--ocean);
  color: var(--white);
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
}

.modal-form-btn:active {
  transform: translateY(1px);
}