* {
  box-sizing: border-box;
}

@font-face {
  font-family: "SuisseIntl";
  src: url("Fonts/SuisseIntl-Book.otf") format("opentype");
  font-weight: 500;
  /* Book */
  font-style: normal;
}

@font-face {
  font-family: "SuisseIntl";
  src: url("Fonts/SuisseIntl-Medium.otf") format("opentype");
  font-weight: 600;
  /* Medium */
  font-style: normal;
}

body {
  margin: 0;
  font-family: "SuisseIntl", sans-serif;
  background: #fff;
  justify-content: center;
}

.headercontainer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1440px;
  padding: 24px 40px 24px 40px;
  margin: 0 auto;
}

.logo {
  font-weight: 600;
  font-size: 18px;
}
.h1 {
  color: black;
}

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

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

.nav a {
  text-decoration: none;
  color: #000;
}

.text-xl {
  font-weight: 500;
  font-size: 54px;
  line-height: 120%;
}

.text-xlplus {
  color: #000;
  text-decoration-line: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  text-decoration-color: #999;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.text-xlplus:hover {
  color: #999;
  text-decoration-color: #000;
}

.logo,
.text-xlplus {
  overflow-wrap: anywhere;
}

.text-l {
  font-weight: 500;
  font-size: 36px;
  line-height: 120%;
}
.text-m {
  font-weight: 500;
  font-size: 28px;
  line-height: 120%;
}
.text-s {
  font-weight: 500;
  font-size: 20px;
  line-height: 120%;
}

.text-xs {
  font-weight: 500;
  font-size: 18px;
  line-height: 140%;
}

.hero {
  display: flex;
  flex-direction: column;
  max-width: 1440px;
  padding: 120px 40px 0px 40px;
  align-items: center;
  margin-inline: auto;
  /* современный центр вместо margin: 0 auto */
  /* внутренние отступы */
}

.services {
  display: flex;
  flex-direction: column;
  max-width: 1440px;
  padding: 120px 40px 0px 40px;
  margin-inline: auto;
}
.projects {
  display: flex;
  flex-direction: column;
  max-width: 1440px;
  padding: 120px 40px 80px 40px;
  margin-inline: auto;
}

.fillwidthimage {
  width: 100%;
  margin-top: 30px;
}

.fillwidthimage img {
  display: block;
  width: 100%;
  height: auto;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-flow: row dense;
  gap: 12px;
}

/* Карточки */
.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 30px;
}

/* Утилити-классы для ширины */
.span-12 {
  grid-column: span 12;
}
.span-6 {
  grid-column: span 6;
}
.span-8 {
  grid-column: span 8;
}
.span-4 {
  grid-column: span 4;
}

.card figure {
  margin: 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #f3f3f3;
  width: 100%;
  height: 520px;
}
.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.card h3 {
  padding-top: 10px;
  line-height: 140%;
}
.tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.tags span {
  border: 1px solid black;
  border-radius: 200px;
  padding: 2px 10px 4px 10px;
}
/* сюда настройку что 2х картинки */
@media (max-width: 768px) {
  .text-xl {
    font-size: 32px;
  }
  .text-l {
    font-size: 24px;
  }
  .text-m {
    font-size: 20px;
  }
  .text-s {
    font-size: 16px;
  }
  .text-xs {
    font-size: 14px;
  }
  .projects {
    padding: 24px 20px 40px 20px;
  }

  .headercontainer,
  .hero,
  .services {
    padding: 24px 20px 0px 20px;
  }

  .nav ul {
    flex-direction: column;
    gap: 12px;
  }

  .grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .span-12,
  .span-8,
  .span-6,
  .span-4 {
    grid-column: span 2;
  }

  .card figure {
    height: 200px;
  }
}

/* Скрываем чекбокс */
.burger-toggle {
  display: none;
}

/* Бургер (по умолчанию скрыт на десктопе) */
.burger-icon {
  display: none;
  font-size: 28px;
  cursor: pointer;
}

/* Мобилка */
@media (max-width: 768px) {
  .burger-icon {
    display: block;
  }
}

.nav ul {
  display: none;
  flex-direction: column;
  gap: 12px;
  padding-top: 16px;
}

/* Показываем меню, если чекбокс активен */
@media (max-width: 768px) {
  .burger-toggle:checked ~ .nav ul {
    display: flex;
  }
}

/* Десктопное меню по умолчанию */
.nav ul {
  display: flex;
  gap: 40px;
  list-style: none;
  padding: 0;
  flex-direction: row;
}

/* Мобильное меню */
@media (max-width: 768px) {
  .nav ul {
    display: none;
    flex-direction: column;
    gap: 12px;
    padding-top: 16px;
  }

  .burger-icon {
    display: block;
  }

  .burger-toggle:checked ~ .nav ul {
    display: flex;
  }
}
