/* --------------------------------------------
              >> HOME PAGE <<
        Premium Button – Bon Séjour
---------------------------------------------- */

/* ================= VARIABLES ================= */

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

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

/* Button variables */
:root {
  --bst-round-size: 27px;
  --bst-text-color: rgb(255, 255, 255);
  --bst-font-size: clamp(1rem, 2vw, 1.2rem);
  --bst-hover-time: 400ms;
  --bst-hover-ease: cubic-bezier(0.25, 1, 0.5, 1);
}

/* ================= WRAPPER ================= */

.bs-btn-wrap {
  position: relative;
  z-index: 2;
  border-radius: var(--bst-round-size);
  pointer-events: none;
  transition: all var(--bst-hover-time) var(--bst-hover-ease);
}

/* ================= SHADOW ================= */

.bs-btn-shadow {
  --shadow-cutoff: 2em;
  position: absolute;
  inset: calc(var(--shadow-cutoff) / -2);
  filter: blur(clamp(2px, 0.125em, 12px));
  pointer-events: none;
}

.bs-btn-shadow::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--bst-round-size);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.1));
  width: calc(100% - var(--shadow-cutoff) - 0.25em);
  height: calc(100% - var(--shadow-cutoff) - 0.25em);
  top: calc(var(--shadow-cutoff) - 0.5em);
  left: calc(var(--shadow-cutoff) - 0.875em);
  padding: 0.125em;
  box-sizing: border-box;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  transition: all var(--bst-hover-time) var(--bst-hover-ease);
}

/* ================= BUTTON ================= */

.bs-btn {
  --border-width: clamp(1px, 0.0625em, 4px);

  all: unset;
  cursor: pointer;
  pointer-events: auto;
  position: relative;
  z-index: 3;

  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(--bst-round-size);

  box-shadow:
    inset 0 0.125em 0.125em rgba(221, 247, 255, 0.05),
    inset 0 -0.125em 0.125em rgba(82, 189, 255, 0.5),
    0 0.25em 0.125em -0.125em rgba(0, 0, 0, 0.2),
    0 0 0.1em 0.25em inset rgba(195, 249, 255, 0.2);

  backdrop-filter: blur(clamp(1px, 0.125em, 4px));
  transition: all var(--bst-hover-time) var(--bst-hover-ease);
}

.bs-btn:hover {
  transform: scale(0.975);
  backdrop-filter: blur(0.01em);
  box-shadow:
    inset 0 0.125em 0.125em rgba(221, 247, 255, 0.05),
    inset 0 -0.125em 0.125em rgba(82, 189, 255, 0.5),
    0 0.15em 0.05em -0.1em rgba(0, 0, 0, 0.25),
    0 0 0.05em 0.1em inset rgba(195, 249, 255, 0.2);
}

/* ================= TEXT ================= */

.bs-btn span {
  display: block;
  padding: 0.875em 1.5em;

  font-family: "Poppins", sans-serif;
  font-size: var(--bst-font-size);
  font-weight: 500;
  letter-spacing: -0.05em;
  color: var(--bst-text-color);

  user-select: none;
  text-shadow: 0 0.15em 0.05em rgba(0, 0, 0, 0.1);

  position: relative;
  transition: all var(--bst-hover-time) var(--bst-hover-ease);
}

.bs-btn:hover span {
  text-shadow: 0.025em 0.025em 0.025em rgba(0, 0, 0, 0.12);
}

/* ================= LIGHT SWEEP ================= */

.bs-btn span::after {
  content: "";
  position: absolute;
  inset: calc(var(--border-width) / 2);
  border-radius: var(--bst-round-size);
  background: linear-gradient(
    var(--angle-2),
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.5) 45%,
    rgba(255, 255, 255, 0) 55%
  );

  mix-blend-mode: screen;
  background-size: 200% 200%;
  background-position: 0% 50%;
  pointer-events: none;

  transition:
    background-position calc(var(--bst-hover-time) * 1.25) var(--bst-hover-ease),
    --angle-2 calc(var(--bst-hover-time) * 1.25) var(--bst-hover-ease);
}

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

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

/* ================= TOUCH ================= */

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