:root {
  --bg: #fafafa;
  --black: #121212;
  --gray: #363636;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: #000;
  font-family: "Inter", sans-serif;
}

h1,
h2,
p {
  margin: 0;
  line-height: 1.2;
}

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

.notspent-page {
  width: 1012px;
  margin: 0 auto;
  padding-bottom: 64px;
}

.back-link {
  margin-top: 64px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  line-height: 1;
  color: var(--gray);
}

.back-link img {
  width: 12px;
  height: 12px;
  object-fit: contain;
  display: block;
  transform: translateY(0.5px);
}

.back-link span {
  position: relative;
  top: 1px;
}

.hero {
  padding-top: 19px;
}

.hero h1 {
  font-size: 40px;
  font-weight: 500;
  line-height: 1;
}

.hero p {
  margin-top: 9px;
  font-size: 16px;
}

.meta-row {
  width: 327px;
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.meta-label {
  font-size: 14px;
  color: var(--gray);
}

.meta-value {
  font-size: 16px;
  font-weight: 500;
  color: var(--black);
  white-space: nowrap;
}

.meta-item.wide {
  width: 155px;
}

.hero-image-block {
  padding: 24px 0;
}

.hero-image {
  width: 100%;
  height: 631px;
  border-radius: 15px;
  object-fit: cover;
}

.split-section {
  padding: 48px 0;
  display: grid;
  grid-template-columns: 461px 496px;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.split-section.reverse {
  grid-template-columns: 496px 461px;
}

.text-col h2 {
  font-size: 26px;
  font-weight: 500;
  line-height: 1;
}

.text-col p {
  margin-top: 12px;
  font-size: 16px;
}

.side-image {
  width: 496px;
  height: 496px;
  border-radius: 15px;
  object-fit: cover;
}

.tools-grid {
  width: 496px;
  height: 488px;
  border-radius: 15px;
  display: grid;
  grid-template-columns: repeat(2, 148px);
  grid-auto-rows: 148px;
  justify-content: center;
  align-content: center;
  gap: 90px;
}

.tool-card {
  width: 148px;
  height: 148px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
  background: linear-gradient(180deg, rgba(162, 197, 255, 0.4) 0%, rgba(209, 250, 255, 0.4) 100%);
  transition: transform 280ms ease;
  transform-origin: center center;
}

.tool-card img {
  width: 111px;
  height: 111px;
  object-fit: contain;
}

@media (hover: hover) and (pointer: fine) {
  .tool-card:hover {
    transform: scale(1.04) rotate(-2deg);
  }
}

.phones-row {
  padding: 48px 0;
  display: grid;
  grid-template-columns: repeat(3, 313px);
  justify-content: space-between;
  gap: 24px;
}

.phones-row img {
  width: 313px;
  height: 601px;
  object-fit: cover;
}

.final-block {
  padding-top: 0;
  padding-bottom: 48px;
}

@media (max-width: 1100px) {
  .notspent-page {
    width: 785px;
  }

  .hero h1 {
    font-size: 36px;
  }

  .hero-image {
    height: auto;
  }

  .split-section,
  .split-section.reverse {
    grid-template-columns: 1fr;
  }

  .tools-grid,
  .side-image {
    width: 100%;
    height: auto;
  }

  .tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 180px;
    gap: 16px;
  }

  .tool-card {
    width: 100%;
    height: 180px;
  }

  .phones-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .phones-row img {
    width: 100%;
    height: auto;
  }
}

@media (max-width: 820px) {
  .notspent-page {
    width: 370px;
    padding-bottom: 40px;
  }

  .back-link {
    margin-top: 40px;
  }

  .hero h1 {
    font-size: 32px;
  }

  .meta-row {
    width: 100%;
  }

  .meta-item.wide {
    width: 200px;
  }

  .split-section,
  .split-section.reverse,
  .phones-row,
  .hero-image-block {
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .text-col h2 {
    font-size: 24px;
  }

  .split-section.reverse .text-col {
    order: 1;
  }

  .split-section.reverse .tools-grid {
    order: 2;
    width: 100%;
    height: auto;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 80px;
    gap: 10px;
    justify-content: stretch;
    align-content: stretch;
  }

  .split-section.reverse .tool-card {
    width: 100%;
    height: 80px;
    border-radius: 12px;
  }

  .split-section.reverse .tool-card img {
    width: 54px;
    height: 54px;
  }
}
