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

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

*/

.page {
  font-family: var(--Inter), sans-serif;
  background-image: var(--gradient-background);
  background-size: cover;
  background-attachment: fixed;
  min-inline-size: 320px;
  min-block-size: 100dvb;
  font-variation-settings: "wght" var(--regular);
}
.container {
  margin: auto;
  border: 2px solid #000000;
  outline: none;
  background-color: #ffffff;
  max-inline-size: var(--container-width);
}
.header__container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-top: 100px;
  margin-bottom: 95px;
  inline-size: var(--container-width);
}
.header__tittle {
  padding-top: 130px;
  color: var(--black-text);
  font-family: var(--PressStart2P), fantasy;
  font-weight: 400;
  font-size: var(--font-size-header-tittle);
  font-style: normal;
  line-height: 1;
  text-transform: uppercase;
}
.header__subtittle {
  padding-bottom: 110px;
  color: var(--black-text);
  font-family: var(--PressStart2P), fantasy;
  font-weight: 400;
  font-size: var(--font-size-header-subtittle);
  font-style: normal;
  line-height: 2.7;
  text-transform: uppercase;
}
.cards__block {
  display: flex;
  flex-direction: column;
  gap: 50px;
  margin: auto;
}
.cards__tittle {
  padding: 4px 10px;
  color: var(--black-text);
  font-size: 18px;
  font-style: normal;
  line-height: 1.2;
  font-variation-settings: "wght" var(--black);
}
.cards__text__container {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 25px 25px 23px 25px;
}
.cards__text {
  color: var(--black-text);
  font-size: 18px;
  font-style: normal;
  line-height: 1.2;
  font-variation-settings: "wght" var(--regular);
}
.car {
  display: block;
  object-fit: cover;
  object-position: center;
  background-size: cover;
  min-inline-size: var(--container-image-width);
  block-size: 100%;
  aspect-ratio: 1 / 1;
}
.footer {
  margin: auto;
}
.button_universal {
  position: relative;
  height: auto;
  border: 2px solid #000;
  overflow: hidden;
  background-color: #fff;
  transition: box-shadow 0.3s ease;
}
.footer__button {
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  align-items: center;
  gap: 8px;
  margin: 52px auto 100px auto;
  padding: 15px 20px;
}
.button_universal:focus {
  box-shadow: 2px 2px #000;
  outline: none;
}
.button_universal::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  background-color: black;
  transition: transform 0.5s ease-in-out;
  transform: translateX(-100%);
}

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

.diskette__text.button__text,
.svg__diskette__open {
  position: relative;
  z-index: 1;
  color: white;
  fill: #fff;
  stroke: #fff;
  mix-blend-mode: difference;
}

.diskette__text {
  color: var(--black-text);
  font-family: var(--PressStart2P), fantasy;
  font-weight: 400;
  font-size: 14px;
  font-style: normal;
  line-height: 0.9;
}
.button__like {
  display: flex;
  flex-direction: row;
  justify-content: end;
  width: 100%;
  margin-bottom: 22.5px;
  border: none;
  padding-right: 25px;
  background-color: #fff;
}

.like {
  align-self: start;
  margin-top: 3px;
  margin-bottom: 3px;
  margin-left: 7px;
  padding: 10px 34px;
  color: var(--black-text);
  font-family: var(--PressStart2P), fantasy;
  font-weight: 400;
  font-size: 14px;
  font-style: normal;
  line-height: 0.9;
}

.like span {
  position: relative;
  z-index: 2;
  color: #fff;
  mix-blend-mode: difference;
}

.like__container {
  height: 40px;
  border: 2px solid transparent;
  padding: 0;
  background-color: #fff;
  transition:
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.like__container:focus {
  border: 2px solid #000;
  outline: none;
}
.like__container:focus-visible {
  border-color: #000;
}
.svg__diskette {
  flex-shrink: 0;
}
.container__for__image__and__html {
  position: relative;
  height: 100%;
  border-top: 2px solid #000;
  border-bottom: 2px solid #000;
}

.label__html {
  position: absolute;
  top: 28px;
  right: 25px;
  opacity: 0.5;
  color: var(--black-text);
  font-family: var(--PressStart2P), fantasy;
  font-weight: 400;
  font-size: 14px;
  font-style: normal;
  line-height: 0.9;
  text-transform: uppercase;
  text-shadow:
    1px 1px var(--white-outline),
    -1px -1px var(--white-outline);
  mix-blend-mode: hard-light;
}
@supports (
  (text-stroke: 1px var(--white-outline)) or
    (-webkit-text-stroke: 1px var(--white-outline))
) {
  .label__html {
    text-shadow: none;
    -webkit-text-stroke: 1px var(--white-outline);
    text-stroke: 1px var(--white-outline);
  }
}
dialog::backdrop {
  background-color: rgb(0 0 0 / 0.75);
}
.button__ok {
  display: inline-block;
  margin: 0 auto;
  padding: 10.5px calc(50% - 15px);
  color: var(--black-text);
  font-family: var(--PressStart2P), fantasy;
  font-weight: 400;
  font-size: 14px;
  font-style: normal;
  line-height: 0.9;
  text-transform: uppercase;
}

.button__image__and__label {
  display: flex;
  flex-direction: row;
  gap: 20px;
  margin-bottom: 30px;
}
.label__button {
  color: var(--black-text);
  font-family: var(--PressStart2P), fantasy;
  font-weight: 400;
  font-size: 14px;
  font-style: normal;
  line-height: 1.5;
  text-transform: uppercase;
}
.svg__diskette__close {
  margin-top: 10px;
  inline-size: 39px;
  block-size: 39px;
}
.svg__diskette__open {
  inline-size: 21px;
  block-size: 21px;
}
.dialog {
  max-width: 353px;
  border: 2px solid #000;
  padding: 30px 30px 27px 30px;
}
@media (width <= 375px) {
  .header__tittle {
    padding-top: 120px;
  }
  .header__subtittle {
    padding-bottom: 105px;
  }
  .header__container {
    gap: 10px;
    margin-bottom: 100px;
  }
  .footer__button {
    flex-direction: column;
  }
  .svg__diskette__open {
    inline-size: 28px;
    block-size: 28px;
  }
  .container {
    max-inline-size: var(--container-width-mob);
  }
  .car {
    min-inline-size: var(--container-image-width-mob);
  }
  .cards__text {
    line-height: 1.18;
  }
  .cards__text__container {
    padding-top: 25px;
  }
  .dialog {
    max-width: 340px;
    padding-bottom: 28px;
  }
  .button__ok {
    margin-left: 7px;
    padding: 10px calc(50% - 22px);
  }
  .button__image__and__label {
    margin-left: 7px;
  }
  .cards__tittle {
    margin-top: 2px;
  }
  .button__like {
    margin-bottom: 21.2px;
  }
}

.car__sepia {
  filter: sepia(65%);
}
.car__saturate {
  filter: saturate(500%);
}
.car__contrast {
  filter: contrast(125%) hue-rotate(-320deg);
}
.car__invert {
  filter: invert(0.7);
}
.car__brightness {
  filter: brightness(90%) sepia(90%);
}
.car__blur {
  filter: blur(0.1rem);
}
.car__grayscale {
  filter: grayscale(0.2) invert(0.9) sepia(80%)
    drop-shadow(1px 1px 1px rgba(0, 0, 2, 0.1));
}

.button__ok span {
  position: relative;
  z-index: 2;
  color: #fff;
  mix-blend-mode: difference;
}

.like-icon {
  width: 39px;
  height: 36px;
  transform-origin: center;
}
.main-body {
  fill: transparent;
  transition: fill 0.3s linear;
}
.core {
  fill: transparent;
  transition: fill 0.3s linear 0.03s;
}
.contour {
  fill: var(--contour);
  transition: fill 0.1s linear;
}
.sparks {
  opacity: 0;
  fill: var(--animation-fill-color);
}
.like-icon:hover .core {
  fill: var(--contour);
  transition: fill 0.3s linear 0s;
  cursor: pointer;
}
.like-icon:hover .main-body {
  fill: var(--contour);
  transition: fill 0.3s linear 0.05s;
  cursor: pointer;
}
.like-icon:active .core {
  fill: var(--main-body);
  transition: fill 0.3s linear 0s;
}
.like-icon:active .main-body {
  fill: var(--main-body);
  transition: fill 0.3s linear 0.05s;
}
.like-icon.is-liked .core {
  fill: var(--main-body);
  transition: fill 0.3s linear 0s;
}
.like-icon.is-liked .main-body {
  fill: var(--main-body);
  transition: fill 0.3s linear 0.05s;
}
.like-icon.is-liked .contour {
  fill: var(--main-body);
  transition: fill 0.3s linear 0.06s;
}
.like-icon.is-liked .heart {
  transform-origin: center center;
  animation: heart 0.3s ease-in 0.1s;
}
.like-icon.is-liked .sparks {
  transform-origin: center center;
  animation: sparks 0.3s ease-in 0.3s;
}
