/* ===================== FONTS ===================== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat+Alternates:wght@500&display=swap');

@font-face {
  font-family: "Mona Sans";
  src: url("https://assets.codepen.io/64/Mona-Sans.woff2") format("woff2");
  font-weight: 100 1000;
}

/* ===================== ROOT ===================== */
:root {
  --icon-scale: 0;
  --icon-rotation: 0;
  --icon-opacity: 0;

    --color-pale-pink: hsl(30, 100%, 50%);
  --color-dark-purple: hsl(41 85 31);;
  --color-light-purple: hsl(41 91 57);
  --color-bubblegum-pink: hsl(36 56 34);

  /* --color-pale-pink: hsl(272 16% 57%);
  --color-dark-purple: hsl(269 100% 21%);
  --color-light-purple: hsl(270 100% 40%);
  --color-bubblegum-pink: hsl(300 97% 68%); */
}

/* ===================== GLOBAL ===================== */
* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

main {
  display: grid;
  place-items: center;
  /* padding: 100px; */
  font-family: "Mona Sans", sans-serif;
}

/* ===================== BUTTON WRAPPER ===================== */
.home-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
  margin-top: 50px;
}

/* ===================== HEART BUTTON ===================== */
.heart-btn {
  all: unset;
  cursor: pointer;
  font-family: "Mona Sans", sans-serif;
  font-size: 1.5rem;
  font-weight: 1000;
  color: #fff;
  position: relative;
  transition: transform .2s ease;
}

/* BACKGROUND */
.heart-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom right,
    var(--color-pale-pink),
    var(--color-pale-pink)
  );
  border-radius: 999px;
  transform: scale(.9);
  transition: .2s ease;
}

/* TEXT WRAPPER */
.heart-btn span:nth-child(2) {
  position: relative;
  padding: .6em 1.4em;
  z-index: 2;
  display: block;
  border-radius: 999px;
  transition: transform .2s ease;
}

/* HEART ICONS (CENTER) */
.heart-btn span:nth-child(2)::before,
.heart-btn span:nth-child(2)::after {
  content: "";
  position: absolute;
  opacity: var(--icon-opacity);
  transform: scale(var(--icon-scale))
    rotate(calc(var(--icon-rotation) * -1deg));
  transition: .2s ease;
  pointer-events: none;
}

.heart-btn span:nth-child(2)::before {
  width: 2.1em;
  height: 2.1em;
  top: -0.8em;
  left: -0.8em;
  background: url(https://assets.codepen.io/64/heart+%286%29+%281%29.png)
    no-repeat center / contain;
}

.heart-btn span:nth-child(2)::after {
  width: 1.2em;
  height: 1.2em;
  top: 1em;
  left: .5em;
  background: url(https://assets.codepen.io/64/heart+%285%29+%281%29.png)
    no-repeat center / contain;
  filter: blur(2px);
}

/* SIDE HEARTS */
.heart-btn span:nth-child(1)::before,
.heart-btn span:nth-child(1)::after {
  content: "";
  position: absolute;
  opacity: var(--icon-opacity);
  transform: scale(var(--icon-scale))
    rotate(calc(var(--icon-rotation) * -1deg));
  transition: .2s ease;
  pointer-events: none;
}

.heart-btn span:nth-child(1)::before {
  width: 1.75em;
  height: 1.75em;
  top: -1em;
  right: .5em;
  background: url(https://assets.codepen.io/64/heart+%283%29+%281%29.png)
    no-repeat center / contain;
}

.heart-btn span:nth-child(1)::after {
  width: 2em;
  height: 2em;
  top: 1em;
  right: -.5em;
  background: url(https://assets.codepen.io/64/heart+%284%29+%281%29.png)
    no-repeat center / contain;
}

/* HOVER */
.heart-btn:hover {
  --icon-scale: 1;
  --icon-opacity: 1;
}

.heart-btn:hover::before {
  transform: scale(1.05);
  background: linear-gradient(
    to bottom right,
    var(--color-dark-purple),
    var(--color-light-purple)
  );
  box-shadow: 0 4px 22px -8px var(--color-bubblegum-pink);
}

.heart-btn:hover span:nth-child(2) {
  transform: scale(.95);
}

/* ACTIVE */
.heart-btn:active {
  --icon-scale: .8;
  --icon-rotation: 20;
  transform: scale(1.05);
}

.heart-btn:active::before {
  transform: scale(.95);
}

/* =========================================== SMALL MENU HEART =============================================== */
.menu-heart {
  position: relative;
  display: inline-block;
  padding-left: 16px; /* space for left heart */

  /* REQUIRED DEFAULTS */
  --icon-scale: 0;
  --icon-opacity: 0;
  --icon-rotation: 0;
}

/* HEART ICONS */
.menu-heart::before,
.menu-heart::after {
  content: "";
  position: absolute;
  opacity: var(--icon-opacity);
  transform: scale(var(--icon-scale))
    rotate(calc(var(--icon-rotation) * 1deg));
  transition: transform .25s ease, opacity .25s ease;
  pointer-events: none;
  z-index: 2; /* ✅ keep above background */
}

/* LEFT TOP HEART */
.menu-heart::before {
  width: 12px;
  height: 12px;
  top: -6px;
  left: 0;
  background: url(https://assets.codepen.io/64/heart+%286%29+%281%29.png)
    no-repeat center / contain;
}

/* RIGHT BOTTOM HEART */
.menu-heart::after {
  width: 10px;
  height: 10px;
  bottom: -6px;
  right: -10px;
  background: url(https://assets.codepen.io/64/heart+%284%29+%281%29.png)
    no-repeat center / contain;
}

/* HOVER */
.menu-heart:hover {
  --icon-scale: 1;
  --icon-opacity: 1;
}

/* CLICK */
.menu-heart:active {
  --icon-scale: .7;
  --icon-rotation: 20;
}
