/* Glossy 3D icon buttons — chrome + brand colors (masks live in logos.css). */

.glossy-btn {
  --glossy-btn-size: 72px;
  --btn-face: #4a4a4a;
  --btn-icon: #ffffff;
  --btn-glow: var(--btn-face);

  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: var(--glossy-btn-size);
  height: var(--glossy-btn-size);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  border: none;
  outline: 1px solid #000000;
  outline-offset: 0;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--btn-face) 72%, #fff) 0%,
    var(--btn-face) 42%,
    color-mix(in srgb, var(--btn-face) 78%, #000) 100%
  );
  box-shadow:
    0 1px 0 color-mix(in srgb, var(--btn-face) 40%, #fff) inset,
    0 -2px 6px color-mix(in srgb, var(--btn-face) 50%, #000) inset,
    0 4px 10px rgba(0, 0, 0, 0.45),
    0 0 8px 2px color-mix(in srgb, var(--btn-glow) 80%, transparent),
    0 0 18px 5px color-mix(in srgb, var(--btn-glow) 50%, transparent);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    filter 0.15s ease;
}

.glossy-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border: none;
  outline: none;
  box-shadow: none;
  border-radius: inherit;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.45) 0%,
    rgba(255, 255, 255, 0.14) 38%,
    rgba(255, 255, 255, 0) 58%
  );
  pointer-events: none;
}

.glossy-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow:
    0 1px 0 color-mix(in srgb, var(--btn-face) 40%, #fff) inset,
    0 -2px 6px color-mix(in srgb, var(--btn-face) 50%, #000) inset,
    0 7px 14px rgba(0, 0, 0, 0.5),
    0 0 10px 3px color-mix(in srgb, var(--btn-glow) 90%, transparent),
    0 0 22px 7px color-mix(in srgb, var(--btn-glow) 55%, transparent);
}

.glossy-btn:active {
  transform: translateY(1px);
  filter: brightness(0.96);
  box-shadow:
    0 2px 6px color-mix(in srgb, var(--btn-face) 60%, #000) inset,
    0 2px 4px rgba(0, 0, 0, 0.35),
    0 0 6px 1px color-mix(in srgb, var(--btn-glow) 55%, transparent);
}

.glossy-btn:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

.glossy-btn img,
.glossy-btn .logo-svg {
  width: 72%;
  height: 72%;
  object-fit: contain;
  position: relative;
  z-index: 1;
  transform: scale(var(--logo-svg-scale, 1));
  transform-origin: center center;
}

.glossy-btn .logo-fallback {
  position: relative;
  z-index: 1;
  font-size: var(--logo-fallback-size, 1.75rem);
  font-weight: bold;
  line-height: 1;
  color: var(--btn-icon);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.logo-icon {
  position: relative;
  z-index: 1;
  display: block;
  width: 72%;
  height: 72%;
  background-color: var(--btn-icon);
  -webkit-mask-image: var(--logo-mask);
  mask-image: var(--logo-mask);
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.btn-neutral {
  --btn-face: #5a5a5a;
  --btn-icon: #f0f0f0;
  --logo-fallback-size: 1.85rem;
}

.btn-artstation {
  --btn-face: var(--brand-artstation-dark);
  --btn-icon: var(--brand-artstation);
  --btn-glow: #ffffff;
}

.btn-bandcamp {
  --btn-face: var(--brand-bandcamp-alt);
  --btn-icon: #ffffff;
}

.btn-bandlab {
  --btn-face: var(--brand-bandlab);
  --btn-icon: #ffffff;
}

.btn-cafepress {
  --btn-face: var(--brand-cafepress-dark);
  --btn-icon: #ffffff;
}

.btn-deviantart {
  --btn-face: var(--brand-deviantart);
  --btn-icon: #ffffff;
}

.btn-discord {
  --btn-face: var(--brand-discord);
  --btn-icon: #ffffff;
}

.btn-facebook {
  --btn-face: var(--brand-facebook);
  --btn-icon: #ffffff;
}

.btn-github {
  --btn-face: #2d333b;
  --btn-icon: var(--brand-github-light);
  --btn-glow: #ffffff;
}

.btn-googleplus {
  --btn-face: var(--brand-google-plus);
  --btn-icon: #ffffff;
}

.btn-kofi {
  --btn-face: var(--brand-kofi);
  --btn-icon: #ffffff;
}

.btn-linkedin {
  --btn-face: var(--brand-linkedin);
  --btn-icon: #ffffff;
}

.btn-nitrocosm {
  --btn-face: var(--brand-nitrocosm-dark);
  --btn-icon: #ffffff;
  --btn-glow: #ffffff;
}

.btn-patreon {
  --btn-face: var(--brand-patreon);
  --btn-icon: #ffffff;
}

.btn-paypal {
  --btn-face: #ffffff;
  --btn-icon: var(--brand-paypal);
}

.btn-photobucket {
  --btn-face: var(--brand-photobucket);
  --btn-icon: #ffffff;
}

.btn-rss {
  --btn-face: var(--brand-rss);
  --btn-icon: #ffffff;
}

.btn-soundcloud {
  --btn-face: var(--brand-soundcloud);
  --btn-icon: #ffffff;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--brand-soundcloud-gradient-start) 80%, #fff) 0%,
    var(--brand-soundcloud-gradient-end) 55%,
    color-mix(in srgb, var(--brand-soundcloud-gradient-end) 85%, #000) 100%
  );
}

.btn-tumblr {
  --btn-face: var(--brand-tumblr-dark);
  --btn-icon: #ffffff;
  --btn-glow: #ffffff;
}

.btn-twitch {
  --btn-face: var(--brand-twitch);
  --btn-icon: #ffffff;
}

.btn-twitter {
  --btn-face: var(--brand-twitter);
  --btn-icon: #ffffff;
}

.btn-vimeo {
  --btn-face: var(--brand-vimeo);
  --btn-icon: #ffffff;
}

.btn-youtube {
  --btn-face: var(--brand-youtube);
  --btn-icon: #ffffff;
}

/*
 * Use the source SVGs as masks (includes Inkscape group transforms).
 * logos.css data-URI masks strip those transforms and clip several logos.
 */
.btn-artstation { --logo-mask: url('../img/icons/artstation.svg'); }
.btn-bandcamp { --logo-mask: url('../img/icons/bandcamp.svg'); }
.btn-bandlab { --logo-mask: url('../img/icons/bandlab.svg'); }
.btn-cafepress { --logo-mask: url('../img/icons/cafepress.svg'); }
.btn-deviantart { --logo-mask: url('../img/icons/deviantart.svg'); }
.btn-discord { --logo-mask: url('../img/icons/discord.svg'); }
.btn-facebook { --logo-mask: url('../img/icons/facebook.svg'); }
.btn-github { --logo-mask: url('../img/icons/github.svg'); }
.btn-googleplus { --logo-mask: url('../img/icons/googleplus.svg'); }
.btn-kofi { --logo-mask: url('../img/icons/kofi.svg'); }
.btn-linkedin { --logo-mask: url('../img/icons/linkedin.svg'); }
.btn-nitrocosm { --logo-mask: url('../img/icons/nitrocosm.svg'); }
.btn-patreon { --logo-mask: url('../img/icons/patreon.svg'); }
.btn-paypal { --logo-mask: url('../img/icons/paypal.svg'); }
.btn-photobucket { --logo-mask: url('../img/icons/photobucket.svg'); }
.btn-rss { --logo-mask: url('../img/icons/rss.svg'); }
.btn-soundcloud { --logo-mask: url('../img/icons/soundcloud.svg'); }
.btn-tumblr { --logo-mask: url('../img/icons/tumblr.svg'); }
.btn-twitch { --logo-mask: url('../img/icons/twitch.svg'); }
.btn-twitter { --logo-mask: url('../img/icons/twitter.svg'); }
.btn-vimeo { --logo-mask: url('../img/icons/vimeo.svg'); }
.btn-youtube { --logo-mask: url('../img/icons/youtube.svg'); }

/* Inside link cards: decorative icon (parent <a> handles navigation). */
ul#link_list a > .glossy-btn {
  --glossy-btn-size: 56px;
  flex-shrink: 0;
  pointer-events: none;
  border-radius: 12px;
}

ul#link_list a > .glossy-btn:hover,
ul#link_list a > .glossy-btn:active {
  transform: none;
  filter: none;
}

ul#link_list a .glossy-btn img,
ul#link_list a .glossy-btn .logo-svg {
  float: none;
  margin-right: 0;
  width: 72%;
  height: 72%;
}