/* ═══════════════════════════════════════════════════════════
   TUNEX GRADIENT BUTTON
   Port of the "gradient-button" pattern (default + "variant").

   Applied through the site's existing button classes rather
   than new markup, so every CTA upgrades at once and nothing
   about size, padding or type changes — only the surface:

     .btn-r / .btn-nav-red   -> default : animated gradient fill
     .btn-b / .btn-nav-ghost -> variant : animated gradient ring

   The palette stays inside the Tunex range (deep red -> brand
   red -> hot red -> magenta) so the buttons read as the brand
   rather than as a generic rainbow.
   ═══════════════════════════════════════════════════════════ */

:root {
  --gb-1: #8f1229;
  --gb-2: #c41e3a;
  --gb-3: #ff3b57;
  --gb-4: #b600a8;
  --gb-ramp: linear-gradient(
    100deg,
    var(--gb-1) 0%,
    var(--gb-2) 22%,
    var(--gb-3) 42%,
    var(--gb-4) 62%,
    var(--gb-2) 82%,
    var(--gb-1) 100%
  );
}

/* the shared drift; 300% of width means the ramp never visibly restarts */
@keyframes gb-drift {
  from {
    background-position: 0% 50%;
  }
  to {
    background-position: 300% 50%;
  }
}

/* ── DEFAULT: gradient fill ────────────────────────────── */

.btn-r,
.btn-nav-red {
  background: var(--gb-ramp);
  background-size: 300% 100%;
  animation: gb-drift 9s linear infinite;
  border: none;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 22px rgba(196, 30, 58, 0.32);
  transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}

/* the base rule sets `background: var(--rd)` on hover, which would drop the
   gradient entirely — keep the ramp and change only depth and speed */
.btn-r:hover,
.btn-nav-red:hover {
  background: var(--gb-ramp);
  background-size: 300% 100%;
  animation-duration: 3.5s;
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(196, 30, 58, 0.45);
}

/* a soft sheen that sweeps across on hover */
.btn-r::after,
.btn-nav-red::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 30%,
    rgba(255, 255, 255, 0.28) 50%,
    transparent 70%
  );
  transform: translateX(-100%);
  transition: transform 0.7s var(--ease-out);
  pointer-events: none;
}
.btn-r:hover::after,
.btn-nav-red:hover::after {
  transform: translateX(100%);
}

/* keep the label above the sheen */
.btn-r > *,
.btn-nav-red > * {
  position: relative;
  z-index: 1;
}

/* ── VARIANT: gradient ring, dark core ─────────────────── */

/* Two stacked backgrounds: the core is clipped to the padding box, the ramp
   to the border box, so the transparent border becomes the gradient ring.
   (An inset box-shadow cannot do this — any spread big enough to punch out
   the core also covers the gradient, leaving a plain dark button.) */
.btn-b,
.btn-nav-ghost,
.lamp-btns .btn-b {
  position: relative;
  color: #fff;
  border: 1.5px solid transparent !important;
  background-image: linear-gradient(var(--gb-core, #0d0d0d), var(--gb-core, #0d0d0d)),
    var(--gb-ramp);
  background-origin: padding-box, border-box;
  background-clip: padding-box, border-box;
  background-repeat: no-repeat, no-repeat;
  background-size: auto, 300% 100%;
  animation: gb-ring-drift 11s linear infinite;
  box-shadow: none;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

/* the core layer must be pinned while only the ramp travels */
@keyframes gb-ring-drift {
  from {
    background-position: 0 0, 0% 50%;
  }
  to {
    background-position: 0 0, 300% 50%;
  }
}

.btn-b:hover,
.btn-nav-ghost:hover,
.lamp-btns .btn-b:hover {
  --gb-core: #191919;
  animation-duration: 4.5s;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(196, 30, 58, 0.22);
}

/* ── MOTION ────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .btn-r,
  .btn-nav-red {
    animation: none;
    background-position: 30% 50%;
  }
  .btn-b,
  .btn-nav-ghost,
  .lamp-btns .btn-b {
    animation: none;
    background-position: 0 0, 30% 50%;
  }
  .btn-r::after,
  .btn-nav-red::after {
    display: none;
  }
}
