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

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

*/

.page {
  min-inline-size: 320px;
  min-block-size: 100dvb;
  font-family: var(--main-font, sans-serif);
  font-variation-settings: var(--main-font-variations, 400);
  background-image: var(--grid-gradient);
  background-attachment: fixed;
  background-size: cover;
  min-height: 100vh;
}

.header {
  font-family: var(--accent-font, monospace);
  background-color: var(--themes-background, #fff);
  border: 2px solid var(--themes-mainColor, #000);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 100px;
  /*min-block-size: 327px;
  min-width: clamp(0.875rem, -24.2363rem + 124.3902vw, 4.0625rem);
  min-height: clamp(0.875rem, -2.7637rem + 15.6923vw, 4.0625rem);
  min-width: 375px;*/
  padding: 120px 0;
  width: 100%;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.header__logo {
  font-variation-settings: "wght" var(--main-font-variations, 400);
  font-size: 49px;
  line-height: 100%;
  letter-spacing: 0;
  vertical-align: bottom;
  text-transform: uppercase;
}

.header__title {
  font-variation-settings: "wght" var(--main-font-variations, 400);
  font-size: 14px;
  line-height: 100%;
  letter-spacing: 0;
  text-transform: uppercase;
}

.main {
  display: flex;
  flex-direction: column;
  padding-top: 0px;
  margin-top: 100px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.article {
  background-color: var(--themes-background, #fff);
  border: 2px solid var(--themes-mainColor, #000);
  display: grid;
  grid-template-columns: 1fr;
  margin-bottom: 48px;
}

.article__title {
  font-family: var(--main-font, sans-serif);
  font-variation-settings: "wght" var(--title-weight, 785);
  font-size: 18px;
  /*line-height: 100%;*/
  letter-spacing: 0;
  min-width: clamp(1.125rem, 1.125rem + 0vw, 1.125rem);
  padding: 5px 10px;
  line-height: 21px;
}

.article__container {
  position: relative;
  display: block;
  width: 100%;
  line-height: 0;
}

.article__container-logo {
  position: absolute;
  /*right: 13px;*/

  right: clamp(0.688rem, -4.359rem + 21.484vw, 1.313rem);
  /*top: clamp(1.563rem, 1.518rem + 0.193vw, 1.688rem);*/

  z-index: 2;
  font-family: var(--accent-font, monospace);
  font-weight: var(--main-font-variations, 400);
  padding-top: 1.563rem;
  /*padding-left: clamp(16.5rem, 9.7rem + 29.014vw, 35.813rem);*/
  color: #000;
  opacity: 0.5;
  font-size: 14px;
  line-height: 100%;
  letter-spacing: 0;
  text-transform: uppercase;
  mix-blend-mode: hard-light;
  text-shadow: -1px 0 #fff, 0 1px #fff, 1px 0 #fff, 0 -1px #fff;
}

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

.article__container-logo-mark {
  text-transform: lowercase;
}

.article__image {
  display: block;
  object-fit: cover;
  aspect-ratio: 1/1;
  width: 100%;
  max-width: 100%;
  /*position: relative;
  object-fit: contain;
  object-position: center;
  align-items: center;
  inline-size: clamp(23.188rem, 16.035rem + 30.516vw, 43.5rem);*/
}

.vibrant-energy {
  filter: saturate(2.3) contrast(1.2);
}

.cyberpunk-neon {
  filter: brightness(0.9) contrast(1.4) saturate(2) hue-rotate(-10deg);
}

.trippy-hallucination {
  filter: invert(0.7) blur(1px) hue-rotate(90deg);
}

.apocalyptic-fire {
  filter: sepia(0.6) hue-rotate(-30deg) saturate(2) contrast(1.5);
}

.warm-nostalgia {
  filter: sepia(0.6) blur(1px);
}

.bw-with-accent {
  filter: grayscale(0.9) sepia(0.1);
}

.frozen-silence {
  filter: brightness(0.85) hue-rotate(190deg) saturate(1.5) contrast(1.3);
}

.article__text {
  font-family: var(--main-font, sans-serif);
  font-variation-settings: "wght" var(--main-font-variations, 400);
  font-size: 18px;
  line-height: 21px;
  letter-spacing: 0;
}

.article__text-main {
  padding: 25px;
  margin-top: 3px;
}

.article__text-personal {
  padding: 1px 26px;
}

.article__buttons {
  display: flex;
  align-items: center;
  justify-content: end;
  padding: 43px 25px 25px 25px;
  gap: 5px;
}

.card__icon-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  block-size: 38px;
  border: 2px solid transparent;
  background-color: transparent;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

.card__icon-button:focus {
  outline: none;
}

.card__icon-button:focus-visible {
  border-color: var(--themes-mainColor, #000);
}

.like-icon {
  transform-origin: center;
  inline-size: 39px;
  block-size: 36px;
}

.like-icon .sparks {
  opacity: 0;
}

.like-icon .contour {
  transition: fill 0.1s linear 0s;
}

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

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

/* при состоянии :hover*/
.like-icon:hover .core {
  fill: var(--contour-color, #000);
  transition-delay: 0s;
}

.like-icon:hover .main-body {
  fill: var(--contour-color, #000);
  transition-delay: 0.05s;
}

.like-icon:hover .contour {
  fill: var(--contour-color, #000);
}

/*при состоянии :active*/
.like-icon:active .core {
  fill: var(--animation-fill-color, #ff0000);
  transition-delay: 0s;
}

.like-icon:active .main-body {
  fill: var(--animation-fill-color, #ff0000);
  transition-delay: 0.05s;
}

.like-icon:active .contour {
  fill: var(--contour-color, #000);
}

/*is-liked*/
.like-icon.is-liked .core {
  fill: var(--animation-fill-color);
  transition-delay: 0s;
}

.like-icon.is-liked .main-body {
  fill: var(--animation-fill-color);
  transition-delay: 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: scale-heart 0.3s ease-in 0.1s;
}

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

.card__like-button {
  inline-size: 130px;
  block-size: 38px;
  transition: box-shadow 0.3s ease;
  /*margin-right: 25px;*/
}

.card__like-button:focus {
  outline: none;
  box-shadow: 2px 2px 0 var(--themes-mainColor, #000);
}

.button {
  color: var(--themes-background, #fff);
  background-color: var(--themes-background, #fff);
  position: relative;
  overflow: hidden;
  border: 2px solid var(--themes-mainColor, #000);
  cursor: pointer;
}

.button::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--themes-mainColor, #000);
  transform: translateX(-100%);
  transition: transform 0.5s ease-in-out;
}

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

.button__text {
  font-family: var(--accent-font, monospace);
  font-variation-settings: "wght" var(--main-font-variations, 400);
  font-size: 14px;
  line-height: 90%;
  letter-spacing: 0;
  mix-blend-mode: difference;
}

.button__text:focus {
  outline: none;
  box-shadow: 2px 2px 0 var(--themes-mainColor, #000);
}

.button-floppy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  /*inline-size: 310px;*/
  block-size: 84px;
  /*margin: 0 32px 100px;*/
  transition: box-shadow 0.3s ease;
  width: 100%;
  max-width: 310px;
  margin: 0 auto clamp(4rem, 3.5rem + 2vw, 6.4375rem);
}

.button-floppy:focus {
  outline: none;
  box-shadow: 2px 2px 0 var(--themes-mainColor, #000);
}

.floppy {
  block-size: 28px;
  color: inherit;
  mix-blend-mode: difference;
}

.modal__content {
  display: grid;
  grid-template-columns: min-content 1fr;
  align-items: center;
  column-gap: 18px;
  padding-bottom: 30px;
  /*padding-left: 40px;
  padding-right: 40px;*/
}

.dialog {
  max-width: 90%;
  /*height: 195px;*/
  border: 2px solid var(--themes-mainColor, #000);
  display: none;
  padding: 30px 38px;
  text-transform: uppercase;
  width: clamp(357px, 31%, 700px);
}

.dialog:open {
  display: grid;
  align-content: space-between;
}

.dialog:not([open]) {
  display: none;
  pointer-events: none;
  opacity: 0;
}

.dialog::backdrop {
  background-color: rgb(0 0 0 / 0.75);
}

.dialog__floppy {
  block-size: 39px;
}

.dialog__title {
  font-family: var(--accent-font, monospace);
  font-weight: var(--main-font-variations, 400);
  font-size: 14px;
  line-height: 150%;
  letter-spacing: 0;
  text-transform: uppercase;
}

.modal__button {
  inline-size: 257px;
  block-size: 38px;
  padding-top: 5px;
  padding-right: 10px;
  transition: box-shadow 0.3s ease;
}

.modal__button:focus {
  outline: none;
  box-shadow: 2px 2px 0 var(--themes-mainColor, #000);
}

@media (width >= 1440px) {
  .page {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .header {
    inline-size: 48.6%;
    /*block-size: 368px;*/
    padding: 127px 0;
  }

  .header__logo {
    font-size: 65px;
  }

  .header__title {
    font-size: 23px;
  }

  .article {
    inline-size: clamp(1.125rem, 1.125rem + 0vw, 1.125rem);
    justify-content: center;
    justify-items: stretch;
    width: 696px;
  }

  .article__buttons {
    padding: 25px;
  }

  .button-floppy {
    flex-direction: row;
    max-width: 340px;
    block-size: 58px;
  }

  .floppy {
    block-size: 21px;
  }

  .dialog {
    inline-size: 357px;
    /*block-size: 195px;*/
    padding: 30px;
  }

  .dialog:open {
    justify-items: center;
  }

  .modal__button {
    inline-size: 293px;
    padding-top: 0;
    padding-right: 0;
  }
}
