/* Здесь вы напишете основную часть стилей страницы.

Будьте внимательны! Для корректной работы скриптов на этом сайте нужно, чтобы в HTML некоторые классы были названы особым образом:
✦ like-icon — для svg-иконки анимированного сердца
✦ card__like-button — для кнопки Like рядом с иконкой
✦ card__icon-button — для кнопки, оборачивающей иконку
✦ card__icon-button — для кнопки, оборачивающей иконку
✦ is-liked — для обозначения состояния лайкнутой иконки в виде сердца
✦ button__text — для обозначения текстового элемента внутри кнопки

*/

.page {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-inline-size: 320px;
  min-block-size: 100dvb;
  margin-block-start: 100px;
  font-family: var(--main-font-family, Inter), sans-serif;
  font-variation-settings: "wght" var(--card-body-weight, 410);
  background-image: var(--background-image);
  background-size: cover;
  background-attachment: fixed;
}
.header {
  padding: 130px 122.5px;
  gap: 20px;
  background-color: #fff;
  outline: 2px solid black;
  font-family: var(--accent-font-family);
  font-weight: 400;
  text-transform: uppercase;
}
.content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  inline-size: clamp(375px, calc(260.56338px + 30.516432vw), 700px);
}
.header-title {
  font-size: clamp(3.0625rem, 2.7104rem + 1.5023vw, 4.0625rem);
}
.header-description {
  font-size: clamp(0.875rem, 0.6769rem + 0.8451vw, 1.4375rem);
}
.main {
  display: flex;
  flex-direction: column;
  gap: 50px;
  margin-block-start: 98px;
  padding-block-end: 100px;
}
.card__list {
  display: flex;
  flex-direction: column;
  gap: 50px;
  list-style: none;
  inline-size: clamp(375px, calc(260.56338px + 30.516432vw), 700px);
}
.card__img-wrapper {
  position: relative;
}
.card {
  background-color: #fff;
  border: 2px solid black;
  font-size: 18px;
}
.card__wrapper-text {
  position: absolute;
  right: 25px;
  top: 25px;
  font-family: var(--accent-font-family);
  font-size: 14px;
  text-transform: uppercase;
  mix-blend-mode: hard-light;
  opacity: 50%;
  text-shadow: 1px 1px 0 var(--label-outline-color);
}

@supports (
  (text-stroke: 1px var(--label-outline-color)) or
    (-webkit-text-stroke: 1px var(--label-outline-color))
) {
  .card__wrapper-text {
    -webkit-text-stroke: 1px var(--label-outline-color);
    text-stroke: 1px var(--label-outline-color);
    text-shadow: none;
  }
}
.card__title {
  padding: 4px 10px;
  font-size: inherit;
  font-variation-settings: "wght" var(--card-title-weight, 715);
}
.card__img {
  display: block;
  inline-size: 100%;
}
.filter-invert {
  filter: invert(0.9);
}
.filter-sepia {
  filter: sepia(0.8);
}
.filter-mono {
  filter: grayscale(100%);
}
.filter-blur {
  filter: blur(5px);
}
.filter-cold {
  filter: hue-rotate(270deg);
}
.filter-pop {
  filter: contrast(150%) saturate(20%);
}
.filter-bright {
  filter: brightness(1.5);
}
.filter-faded {
  filter: saturate(400%);
}
.card__desription {
  display: flex;
  flex-direction: column;
  gap: 25px;
  padding: 25px;
  line-height: 1.17;
}
.card__buttons {
  display: flex;
  justify-content: end;
  align-items: center;
  gap: 4px;
  padding: 0 25px 25px 25px;
}
.button {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  padding: 0;
  font-family: var(--accent-font-family);
  font-size: 14px;
}
.button:focus {
  outline: none;
}
.button:not(.card__icon-button) {
  position: relative;
  color: #fff;
  transition: box-shadow 0.3s ease;
}
.button .like-icon {
  border: 2px solid transparent;
  transition: border-color 0.3s ease;
  width: 39px;
  height: 36px;
}
.button:focus-visible .like-icon {
  border-color: black;
}
.button:not(.card__icon-button):focus-visible {
  box-shadow: 2px 2px 0 black;
}
.button:not(.card__icon-button)::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: black;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.5s ease-in-out;
}
.button:not(.card__icon-button):hover::before {
  transform: scaleX(1);
}
.button__text {
  mix-blend-mode: difference;
  position: relative;
}
.sparks {
  fill: var(--animation-fill-color);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.contour {
  transition: fill 0.1s linear;
}
.core {
  fill: transparent;
  transition: fill 0.3s 0.03s linear;
}
.main-body {
  fill: transparent;
  transition: fill 0.3s linear;
}
.like-icon:hover .core {
  fill: var(--accent-color);
  transition: fill 0.3s linear;
}
.like-icon:hover .main-body {
  fill: var(--accent-color);
  transition: fill 0.3s 0.05s linear;
}
.like-icon:active .core {
  fill: var(--animation-fill-color);
  transition: fill 0.3s linear;
}
.like-icon:active .main-body {
  fill: var(--animation-fill-color);
  transition: fill 0.3s 0.05s linear;
}
.like-icon.is-liked .core {
  fill: var(--animation-fill-color);
  transition: fill 0.3s linear;
}
.like-icon.is-liked .main-body {
  fill: var(--animation-fill-color);
  transition: fill 0.3s 0.05s linear;
}
.like-icon.is-liked .contour {
  fill: var(--animation-fill-color);
  transition: fill 0.3s 0.06s linear;
}
.like-icon.is-liked .heart {
  transform-origin: center;
  animation: heart-scale 0.3s ease-in 0.1s;
}
.like-icon.is-liked .sparks {
  transform-origin: center;
  animation: sparks 0.3s ease-in 0.3s;
}
.card__icon-button {
  border: none;
}
.card__like-button {
  inline-size: 130px;
  block-size: 38px;
  border: 2px solid var(--accent-color);
}
.save-button {
  gap: 8px;
  inline-size: 335px;
  block-size: 55px;
  background-color: #fff;
  padding: 0;
}
.save__modal {
  inline-size: clamp(341px, calc(336.775px + 1.127vw), 353px);
  border: 2px solid var(--accent-color);
  padding: 30px clamp(30px, calc(43.521px - 0.939vw), 40px);
  font-family: var(--accent-font-family);
  overflow: hidden;
}
.save__modal-description {
  display: flex;
  align-items: center;
  gap: 20px;
}
.save__modal-title {
  font-weight: 400;
  text-transform: uppercase;
  font-size: 14px;
  inline-size: 234px;
  line-height: 150%;
}
.floppy-icon {
  fill: #fff;
  position: relative;
  mix-blend-mode: difference;
  width: 21px;
  height: 21px;
}
.save__modal-description .floppy-icon {
  width: 39px;
  height: 39px;
  mix-blend-mode: initial;
}
.save__madal-button {
  inline-size: clamp(261px, calc(249.732px + 3.005vw), 293px);
  block-size: 38px;
  margin-block-start: 30px;
  text-transform: uppercase;
}
.save__modal::backdrop {
  background-color: rgba(0, 0, 0, 0.75);
}
@media (width <= 375px) {
  .save-button {
    flex-direction: column;
    inline-size: 306px;
    block-size: 84px;
  }
  .floppy-icon {
    width: 29px;
    height: 29px;
  }
}
