:root {
  --iris: #4d5ae5;
}

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

body {
  font-family: "Roboto", sans-serif;
  color: #434455;
  background-color: #fff;
  margin: 0;
}

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

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

a {
  text-decoration: none;
}

/* ====== Utilities ====== */
.container {
  width: 1158px;           
  margin: 0 auto;          
  padding: 0 15px;         
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  border: 0;
  padding: 0;
  white-space: nowrap;
  clip-path: inset(50%);
  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: #4d5ae5;
}

.logo-part {
  color: #2e2f42;
}

/* ====== Header ====== */
.site-header {
  border-bottom: 1px solid #e7e9fc; 
}

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

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

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

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

.nav-link {
  padding: 24px 0;         
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #2e2f42;
}

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

/* Contacts */
.contacts {
  font-style: normal;
}

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

.contact-link {
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
}

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

/* ====== Hero (Section 1) ====== */
.hero {
  padding: 188px 0;        
  background-color: #2e2f42;
  text-align: center;
}

.hero-title {
  max-width: 496px;        
  color: #fff;
  font-size: 56px;
  line-height: 1.07;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hero-btn {
  display: block;
  min-width: 169px;
  height: 56px;
  border: none;
  background-color: var(--iris, #4d5ae5);
  border-radius: 4px;
  cursor: pointer;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.04em;
  margin: 0 auto;
}

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

/* ====== Features (Section 2) ====== */
.features {
  padding: 120px 0;        
}

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

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

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



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

.feature-text {
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
}

/* ====== Team (Section 3) ====== */
.team {
  padding: 120px 0;        
  background-color: #f4f4fd;
}

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

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

.team-item {
  width: calc((100% - 72px) / 4);            
  background-color: #fff;
  border-radius: 0 0 4px 4px;                
  overflow: hidden;
}

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

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

.team-role {
  text-align: center;                          
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
}

/* ====== Portfolio (Section 4) ====== */
.portfolio {
  padding-top: 120px;
  padding-bottom: 120px;    
}

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

.portfolio-item {
  width: calc((100% - 48px) / 3); 
  background-color: #fff;
}

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

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

.item-description {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
}

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

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

.site-footer .logo-part {
  color: #f4f4fd;
}

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