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

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

*/

.page {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-family: var(--main-font), sans-serif;
  font-variation-settings: "wght" var(--main-font-normal);
  min-inline-size: 320px;
  min-block-size: 100dvb;
  background-image: var(--bg-image);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  outline: 2px solid;
  outline-offset: -2px;
  padding: clamp(122px, 119.18px + 0.75vw, 130px) 0;
  gap: 20px;
  margin: 100px 0px;
  background-color: #fff;
}

.content__place {
  width: clamp(375px, 260.56px + 30.52vw, 700px);
}

.text__press {
  font-family: var(--accent-font), sans-serif;
  font-size: 14px;
}

.cover__title {
  font-family: var(--accent-font), sans-serif;
  font-size: clamp(3.0625rem, 2.7104rem + 1.5023vw, 4.0625rem);
  line-height: 100%;
  text-transform: uppercase;
}

.title__text {
  font-family: var(--accent-font), sans-serif;
  font-size: clamp(0.875rem, 0.6769rem + 0.8451vw, 1.4375rem);
  line-height: 100%;
  text-transform: uppercase;
}

.main__content {
  display: grid;
  place-items: center;
  gap: 50px;
}

.card {
  display: grid;
  gap: 50px;
  grid-template-columns: 1fr;
}

.card__content {
  display: grid;
  border: 2px solid;
  background-color: #fff;
}

.card__content-title {
  font-variation-settings: "wght" var(--main-font-bold);
  font-size: 18px;
  padding: 4px 10px;
}

.card__content-wrapper {
  position: relative;
  overflow: hidden;
  border-block-start: 2px solid;
  border-block-end: 2px solid;
}

.card__content-image {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  object-position: right;
  aspect-ratio: 1 / 1;
}

.filter__brightness {
  filter: brightness(70%);
}

.filter__hue {
  filter: hue-rotate(90deg);
}

.filter__contrast {
  filter: contrast(200%);
}

.filter__invert {
  filter: invert(200%);
}

.filter__sepia {
  filter: sepia(100%);
}

.filter__blur {
  filter: blur(0.5rem) grayscale(0.8);
}

.filter__grayscale {
  filter: grayscale(0.8);
}

.label {
  position: absolute;
  top: 25px;
  right: 25px;
  text-transform: uppercase;
  opacity: 50%;
  mix-blend-mode: hard-light;
  text-shadow: -1px 0 #fff, 0 1px #fff, 1px 0 #fff, 0 -1px #fff;
}

@supports((text-stroke: 1px #fff) or (-webkit-text-stroke: 1px #fff)) {
  .label {
    -webkit-text-stroke: 1px #fff;
    text-stroke: 1px #fff;
    text-shadow: none;
  }
}

.card__content-text {
  display: grid;
  gap: 25px;
  padding: 25px;
  line-height: 21px;
  font-size: 18px;
}

.card__like-button-place {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  margin-inline-end: 25px;
  margin-block-end: 25px;
  justify-self: right;
}

.like-button {
  border: none;
  padding: 0;
  background-color: transparent;
}

.like-icon-wrapper {
  display: flex;
  position: relative;
  cursor: pointer;
  outline: 2px solid transparent;
  outline-offset: -1px;
  transition: outline 0.3s ease;
}

.button__effect {
  position: relative;
  box-shadow: none;
  transition: box-shadow 0.3s ease;
  overflow: hidden;
}

.button__effect::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background-color: #000;
  transition: transform 0.5s ease-in-out;
  transform: translateX(-100%);
  z-index: 1;
  position: absolute;
  top: 0;
  left: 0;
}

.button__effect:hover::before {
  transform: translateX(0);
}

.button__text {
  display: inline-flex;
  position: relative;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  color: var(--difcolor);
  mix-blend-mode: difference;
  z-index: 2;
}

.button-outline {
  outline: 2px solid #000;
  outline-offset: -2px;
  border: none;
}

.card__like-button-text {
  inline-size: 130px;
  block-size: 38px;
  line-height: 90%;
}

.card__like-button:focus,
.card__like-button:focus-visible {
  border: none;
}

.button__effect:focus,
.button__effect:focus-visible {
  box-shadow: 2px 2px 0 #000;
}

.like-icon-wrapper:focus-visible {
  outline-color: #000;
}

.save__button {
  display: grid;
  justify-items: center;
  align-items: center;
  background-color: #fff;
  width: 306px;
  height: 84px;
  margin: 0 0 100px 0;
  padding: 17px 20px;
  gap: 8px;
  cursor: pointer;
}

.floppy__icon {
  width: 28px;
  height: 28px;
  color: var(--difcolor);
  mix-blend-mode: difference;
  z-index: 2;
}

.save__button-text {
  line-height: 90%;
}

.save__popap {
  position: fixed;
  align-items: center;
  border: none;
  outline: 2px solid #000;
  outline-offset: -2px;
  width: 341px;
  height: 191px;
  padding: 30px 40px;
  row-gap: 30px;
  max-width: 100%;
  max-height: 100%;
}

.save__popap[open] {
  display: grid;
  grid-template-columns: 1.2fr 4fr;
  grid-template-rows: 3fr 1fr;
  overflow: hidden;
}

.save__popap[open]::backdrop {
  backdrop-filter: brightness(70%);
}

.floppy__icon-popap {
  width: 39px;
  height: 39px;
}

.close__popap {
  grid-column: 1/3;
  background-color: #fff;
  width: 261px;
  height: 38px;
  text-transform: uppercase;
  line-height: 90%;
  cursor: pointer;
}

.save__popap-text {
  text-transform: uppercase;
  line-height: 150%;
}

.sparks {
  opacity: 0;
}

.contour {
  transition: fill 0.1s linear;
}

.main-body {
  transition: fill 0.3s linear;
}

.core {
  transition: fill 0.3s linear 0.03s;
}

.like-icon:hover .core {
  fill: var(--heartcolor);
  transition: fill 0.3s linear;
}

.like-icon:hover .main-body {
  fill: var(--heartcolor);
  transition: fill 0.3s linear 0.05s;
}

.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 linear 0.05s;
}

.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 linear 0.05s;
}

.like-icon.is-liked .contour {
  fill: var(--animation-fill-color);
  transition: fill 0.3s linear 0.06s;
}

.like-icon.is-liked .heart {
  animation: ScaleHeart 0.3s ease-in 0.1s;
  transform-origin: center;
}

.like-icon.is-liked .sparks {
  animation: sparks 0.3s ease-in 0.3s;
}

@media (width >=768px) {
  .save__button {
    display: flex;
    justify-content: center;
    width: 335px;
    height: 55px;
  }

  .floppy__icon {
    width: 21px;
    height: 21px;
  }

  .save__popap[open] {
    grid-template-columns: 1fr 4fr;
  }

  .save__popap {
    width: 353px;
    padding: 30px;
  }

  .close__popap {
    width: 293px;
  }
}