/*btn*/
@property --angle-1 {
  syntax: "<angle>";
  inherits: false;
  initial-value: -75deg;
}

@property --angle-2 {
  syntax: "<angle>";
  inherits: false;
  initial-value: -45deg;
}

:root {
  --global--size: clamp(2rem, 4vw, 5rem);
  --anim--hover-time: 400ms;
  --anim--hover-ease: cubic-bezier(0.25, 1, 0.5, 1);
  --border-radius-btn: 18px; /* var(--border-radius-btn) */
}

body {
  -webkit-font-smoothing: antialiased;
}

/* wspólna klasa dla a i button */
.btn {
  --border-width: 1px;
  position: relative;
  display: inline-block;
  cursor: pointer;
  pointer-events: auto;
  text-decoration: none;
  border: 0;

  background: linear-gradient(
    -75deg,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.2),
    rgba(255, 255, 255, 0.05)
  );
  border-radius: var(--border-radius-btn);
  box-shadow:
    inset 0 0.125em 0.125em rgba(0, 0, 0, 0.05),
    inset 0 -0.125em 0.125em rgba(255, 255, 255, 0.5),
    0 0.25em 0.125em -0.125em rgba(0, 0, 0, 0.2),
    0 0 0.1em 0.25em inset rgba(255, 255, 255, 0.2),
    0 0 0 0 rgba(255, 255, 255, 1);
  backdrop-filter: blur(clamp(1px, 0.125em, 4px));
  -webkit-backdrop-filter: blur(clamp(1px, 0.125em, 4px));
  transition: all var(--anim--hover-time) var(--anim--hover-ease);
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: max-content;
}

.btn > span > svg {
  vertical-align: middle;
}

.btn:hover {
  transform: scale(0.985);
  backdrop-filter: blur(0.01em);
  -webkit-backdrop-filter: blur(0.01em);
  box-shadow:
    inset 0 0.125em 0.125em rgba(0, 0, 0, 0.05),
    inset 0 -0.125em 0.125em rgba(255, 255, 255, 0.5),
    0 0.15em 0.05em -0.1em rgba(0, 0, 0, 0.25),
    0 0 0.05em 0.1em inset rgba(255, 255, 255, 0.5),
    0 0 0 0 rgba(255, 255, 255, 1);
}

.lightbox-prev,
.lightbox-next {
  transform: none !important;
}

.btn span {
  display: block;
  padding-inline: 1em;
  padding-block: 0.5em;

  transition: all var(--anim--hover-time) var(--anim--hover-ease);
}

.btn span::after {
  content: "";
  position: absolute;
  inset: calc(var(--border-width) / 2);
  z-index: 3;
  border-radius: var(--border-radius-btn);
  overflow: hidden;
  pointer-events: none;
  mix-blend-mode: screen;
  background: linear-gradient(
    var(--angle-2),
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.5) 40% 50%,
    rgba(255, 255, 255, 0) 55%
  );
  background-size: 200% 200%;
  background-position: 0% 50%;
  background-repeat: no-repeat;
  transition:
    background-position calc(var(--anim--hover-time) * 1.25)
      var(--anim--hover-ease),
    --angle-2 calc(var(--anim--hover-time) * 1.25) var(--anim--hover-ease);
}

.btn:hover span::after {
  background-position: 25% 50%;
}

.btn:active span::after {
  background-position: 50% 15%;
  --angle-2: -15deg;
}

@media (hover: none) and (pointer: coarse) {
  .btn span::after,
  .btn:active span::after {
    --angle-2: -45deg;
  }
}

.btn::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: calc(0% - var(--border-width) / 2);
  padding: var(--border-width);
  border-radius: var(--border-radius-btn);
  box-sizing: border-box;
  background:
    conic-gradient(
      from var(--angle-1) at 50% 50%,
      rgba(0, 0, 0, 0.2),
      rgba(0, 0, 0, 0) 5% 40%,
      rgba(0, 0, 0, 0.2) 50%,
      rgba(0, 0, 0, 0) 60% 95%,
      rgba(0, 0, 0, 0.2)
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5));
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  box-shadow: inset 0 0 0 calc(var(--border-width) / 2) rgba(255, 255, 255, 0.5);
  transition:
    all var(--anim--hover-time) var(--anim--hover-ease),
    --angle-1 500ms ease;
}

.btn:hover::after {
  --angle-1: -125deg;
}

.btn:active::after {
  --angle-1: -75deg;
}

@media (hover: none) and (pointer: coarse) {
  .btn::after,
  .btn:hover::after,
  .btn:active::after {
    --angle-1: -75deg;
  }
}

.orange-bg {
  background: #ff7a00dd;
  font-size: 100%;
  span,
  span:hover {
    text-shadow: 2px 2px 3px #3335;
    color: #fff !important;
    text-decoration: none !important;
  }
}

.glass-bg {
  background: #99999933;
  font-size: 100%;
  span,
  span:hover {
    text-shadow: 2px 2px 3px #3333;
    color: #333;
    text-decoration: none !important;
  }
}
