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

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

*/

.page {
  font-family: var(--font-main);
  font-variation-settings: "wght" var(--font-weight-normal);
  background-image: 
  repeating-linear-gradient(90deg, #d3d3d3, #d3d3d3 2px, transparent 2px, transparent 4px),
  repeating-linear-gradient(0deg, #d3d3d3, #d3d3d3 2px, transparent 2px, transparent 4px),
  repeating-linear-gradient(to bottom, #e7e7e7 0.01%, #1a1a1a 100%);
  background-size: cover;
  background-attachment: fixed;
  display: grid;
  justify-content: center;
  gap:100px;
  padding-top: 100px;
}

.header-block {
  display: grid;
  align-items: center;
  justify-content: center;
  background-color: var(--header-block-color);
  width: var(--block-width);
  height: var(--header-block-height);
  padding: var(--header-block-padding-vertical) var(--header-block-padding-horizontal);
  border: var(--border);
}

.header-logo {
  display: grid;
  align-items: center;
  justify-content: center;
  gap: 20px;
  font-family: var(--font-accent);
  font-weight: var(--font-weight-height);
}

.header-logo-title {
  font-size: clamp(49px, 43.37px + 1.50vw, 65px);
  text-align: center;
}

.header-logo-description {
  font-size: clamp(14px, 10.83px + 0.85vw, 23px);
  text-align: center;
  text-transform: uppercase;
}

.main{
  display: grid;
  align-items: center;
  justify-content: center;
  gap: 51px;
}

.card{
  background-color: var(--card-color);
  border: var(--border);
  width: var(--block-width);
  display: grid;
  width: var();
}

.card-title{
  font-variation-settings: "wght" var(--font-weight-heading);
  margin: 4px 10px;
  font-size: 18px;
  width: var(--card-text-width);
}

.card-picture-part{
  display: grid;
  position: relative;
  overflow: hidden;
  border-top: var(--border);
  border-bottom: var(--border);
  height: var(--picture-height);
  
}

.watermark{
  position: absolute;
  justify-self: end;
  right: 25px;
  top: 25px;
  color: var(--watermark-color);
  font-family: var(--font-accent);
  font-weight: var(--font-weight-height);
  font-size: 14px;
  text-shadow:  
  1px 0 0 var(--watermark-color-shadow),
  1px 1px 0 var(--watermark-color-shadow),
  1px -1px 0 var(--watermark-color-shadow),
  0 1px 0 var(--watermark-color-shadow),
  -1px 0 0 var(--watermark-color-shadow),
  -1px 1px 0 var(--watermark-color-shadow),
  -1px -1px 0 var(--watermark-color-shadow),
  0 -1px 0 var(--watermark-color-shadow);
  mix-blend-mode: hard-light;
  z-index:2;
  opacity: 0.5;
}

@supports (text-stroke: 1px var(--watermark-color-shadow)) or (-webkit-text-stroke: 1px var(--watermark-color-shadow)) {
    .watermark { 
        -webkit-text-stroke: 1px var(--watermark-color-shadow);
        text-stroke: 1px var(--watermark-color-shadow);
        text-shadow: none;
    }
}

.card-picture{
  position: absolute;
  right: -8px;
  width: auto;
  height: 100%;
  transform: scale(1.02);
}

.filter-saturate {
  filter: saturate(0.3);
}

.filter-bright {
  filter: saturate(300%);
}

.filter-pink{
  filter: hue-rotate(30deg);
}

.filter-invent {
  filter: invert(0.75);
}

.filter-brown {
   filter: sepia(0.9) brightness(85%);
}

.filter-blur {
  filter: blur(10px);
}

.filter-grin {
  filter: saturate(1.5) hue-rotate(90deg) blur(1px) opacity(0.6) brightness(70%);
}

.card-text-block{
  display: grid;
  gap: 25px;
  margin: 25px 26px 25px 25px;
  line-height: 21px;
}


.card-text{
  font-family: var(--font-main);
  font-weight: var(--font-weight-normal);
  font-size: 18px;
}

.card-botton-part{
  height: 38px;
  display: flex;
  gap: 7px;
  justify-self: end;
  margin-bottom: 25px;
  margin-right: 25px;
}

button{
  border: none;
}

.like-icon{
  position: relative;
  background-color: transparent;
  transition: transform 0.2s;
  transform-origin: center;
}

.sparks {
  opacity: 0;
}

.card__icon-button { 
  padding: 0px;
  display: flex;
  align-items: center;
  justify-self: center;
  height: 100%;
  border: 2px solid transparent;
}

.card__icon-button:focus-visible {
  outline: none;
  border-radius: 0;
  border-color: var(--acent-color);
}

.button__text{
  font-family: var(--font-accent);
  font-size: 14px;
  line-height: 90%;
  position: relative;
  color: var(--text-color);
  mix-blend-mode: difference; 
  z-index: 2; 
}

.card__like-button{
  background-color: transparent;
  border: var(--border);
  box-shadow: none;
  display: grid;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 130px;
  height: 38px;
}

.section-button-save {
  display: grid;
}

.button-save {
  margin: 0px auto 100px;
  background-color: rgba(255, 255, 255, 1);
  border: var(--border);
  width: var(--footer-button-width);
  display: flex;
  flex-direction: var(--footer-button-direction);
  align-items: center;
  gap: 8px;
  padding: 17px 18px;
}

.button-save-picture {
  block-size: var(--footer-button-picture-size);
  inline-size: auto;
  mix-blend-mode: difference;
  z-index: 2;
  position: relative;
  filter: brightness(0) invert(1);
}

.button-save-text {
  font-family: var(--font-accent);
  font-weight: var(--font-weight-height);
  font-size: 14px;
  line-height: 90%;
  position: relative;
  color: var(--text-color);
  mix-blend-mode: difference; 
  z-index: 2; 
}

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

dialog[open] {
  padding: 0px;
  border: var(--border);
  width: var(--dialog-width);
}

.dialog {
  display: grid;
  gap: 30px;
}

.dialog-text-and-picture {
  padding: 29px 40px 0px 35px;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 20px;
  width:var(--dialog-TextAndPicture-width);
  align-items: center;
}

.dialog-picture {
  width: 39px;
  height: 39px;
  margin: 0px;
  padding: 0px;
}

.dialog-text {
  font-family: var(--font-accent);
  font-weight: var(--font-weight-height);
  font-size: 14px;
  line-height: 150%;
  text-transform: uppercase;
  min-width: 202px;
}

.dialog-button {
  display: grid;
  align-items: start;
  justify-content: center;
}

.dialog-close {
  margin-bottom: 30px;
  width: var(--button-ok-width);
  height: 38px;
  font-family: var(--font-accent);
  font-weight: var(--font-weight-height);
  font-size: 14px;
  line-height: 90%;
  text-transform: uppercase;
  border: var(--border);
  padding: 12.5px 116.5px;
}

.button-standard:hover {
  cursor: pointer;
}

.button-standard{
  transition: box-shadow 0.3s ease;
  transition: border-color 0.3s ease;
  overflow: hidden;
  position: relative;
  background-color: var(--background-color-button); 
}

.button-black-bg:focus {
  outline: none;
  box-shadow: 2px 2px 0px var(--acent-color);
}

.button-black-bg::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-color:var(--acent-color);
  transform-origin: left;
  transform: translateX(-100%);
  transition: transform 0.5s ease-in-out;
  top: 0;
  left: 0;
  z-index: 1;
}

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

.dialog-button__text{
position: relative;
color: var(--text-color);
mix-blend-mode: difference; 
z-index: 2; 
}

.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(--animation-fill-color-first);
  transition: fill 0.3s linear;
}

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

.like-icon:hover .contour {
    fill:var(--animation-fill-color-first); 
}

.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 {
  animation: scale-heart 0.3s ease-in forwards;
  animation-delay: 0.1;
}

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

.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;
}

