* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

@font-face {
  font-family: 'Seasons';
  src: url(../fonts/The\ Seasons\ Bold.ttf);
}

:root {
  --color-primary: #dc4b82;
  --color-secondary: #e7e7e7;
  --color-text: #000000;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: 'Seasons', sans-serif;
  font-size: 16px;
  scroll-behavior: smooth;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;

  background-image: url('../images/background.png');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
}

.works {
  min-height: 100vh;
  min-height: 100svh;

  padding: clamp(4rem, 7vw, 6rem) clamp(1.5rem, 4vw, 3.5rem);

  background-image: url('../images/background.png');
  background-repeat: no-repeat;
}

.works__container {
  width: min(100%, 78rem);
  margin-inline: auto;
}

.works__header {
  position: relative;

  margin-bottom: clamp(2rem, 4vw, 3rem);

  min-height: clamp(2.5rem, 5vw, 4rem);
}

.works__title {
  margin: 0;

  position: absolute;
  top: 50%;
  left: 50%;

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

  color: var(--color-primary);

  font-family: 'Seasons', serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 400;
  line-height: 1;

  text-align: center;
}

.works__button {
  position: absolute;
  top: 50%;
  left: 0;

  transform: translateY(-50%);

  padding: 0.6rem 1.2rem;

  border: none;
  border-radius: 2rem;

  background-color: var(--color-text);
  color: #faf8f8;

  font-family: 'Seasons', sans-serif;
  font-size: clamp(0.7rem, 1vw, 0.85rem);
  letter-spacing: 0.05em;

  cursor: pointer;

  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

.works__button:hover {
  background-color: var(--color-primary);
  color: #ffffff;
}

.works__gallery {
  margin: 0;
  padding: 0;

  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1rem, 1.5vw, 1.25rem);

  list-style: none;
}

.works__item {
  min-width: 0;
}

.works__figure {
  margin: 0;

  width: 100%;
  aspect-ratio: 1 / 0.95;

  overflow: hidden;

  border-radius: clamp(0.8rem, 1.5vw, 1rem);
  border-bottom: 6px solid var(--color-primary);
}

.works__figure img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;
}

.animate-item {
  opacity: 0;

  transform: translateY(50px) scale(0.95);

  transition:
    opacity 0.9s ease,
    transform 0.9s ease;
}

.animate-item.show {
  opacity: 1;

  transform: translateY(0) scale(1);
}

.delay-1 {
  transition-delay: 0s;
}

.delay-2 {
  transition-delay: 0.2s;
}

.delay-3 {
  transition-delay: 0.4s;
}

@media (max-width: 900px) {
  .works__gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .works {
    padding-inline: clamp(1rem, 5vw, 1.5rem);
  }

  .works__gallery {
    grid-template-columns: 1fr;
  }

  .works__header {
    min-height: auto;

    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 1rem;
  }

  .works__title {
    position: static;

    transform: none;

    order: 1;
  }

  .works__button {
    position: static;

    transform: none;

    order: 2;
  }
}
