/* Глобальні скидання та базові стилі */
h1, h2, h3, h4, h5, h6, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
address { font-style: normal; }
a { text-decoration: none; color: inherit; }

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

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

.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 {
  border-bottom: 1px solid #e7e9fc;
}

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

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

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

.header-logo { margin-right: 76px; }
.logo-studio-header { color: #2e2f42; }

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

.nav-link {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #2e2f42;
  padding: 24px 0;
  display: block;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.contacts-link {
    display: inline-block;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Hero Section */
.hero {
  background-color: #2e2f42;
  padding: 188px 0;
  /* Для фонового зображення в майбутньому */
}

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

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

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

/* Features */
.features { padding: 120px 0; }
.features-list {
  display: flex;
  gap: 24px;
}

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

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

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

/* Team */
.team {
  background-color: #f4f4fd;
  padding: 120px 0;
}

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

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

.team-item {
  background-color: #ffffff;
  width: calc((100% - 72px) / 4);
  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-card-content {
  padding: 32px 16px;
  text-align: center;
}

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

.team-text, .portfolio-text {
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
}

/* Portfolio */
.portfolio { padding: 120px 0; }
.portfolio-list {
  display: flex;
  flex-wrap: wrap;
  column-gap: 24px;
  row-gap: 48px;
}

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

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

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

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

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