/* DE AQUÍ · gold shine
   One soft light follows the cursor across the page. Everything gold
   (type, rules, hairlines, buttons) catches it where the light passes,
   like moving a lamp over foil. Desktop with a mouse only; shine.js
   tags the elements and moves the light. */

@property --shine { syntax: "<number>"; inherits: true; initial-value: 0; }

:root {
  --px: -2000px;                     /* light position, viewport px */
  --py: -2000px;
  --gs-r: 230px;                     /* light radius */
  --gs-hi: 255, 247, 222;            /* hot centre (on dark grounds) */
  --gs-mid: 241, 213, 142;           /* warm falloff */
  transition: --shine .8s cubic-bezier(.16, 1, .3, 1);
}

/* the light itself, pinned to the viewport so every gold piece shares it */
.gs-text,
.gs-fill,
.gs-line-b::after,
.gs-line-t::before,
.gs-ring::before {
  --gs-light: radial-gradient(var(--gs-r) circle at var(--px) var(--py),
    rgba(var(--gs-hi), calc(var(--shine) * .95)) 0%,
    rgba(var(--gs-mid), calc(var(--shine) * .55)) 26%,
    rgba(var(--gs-mid), 0) 62%);
}

/* gold type: keep its gold, add the light on top, clipped to the letters */
.gs-text {
  background-image: var(--gs-light), linear-gradient(var(--gs-base), var(--gs-base));
  background-attachment: fixed, scroll;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* solid gold shapes: rules, bars, icon tiles */
.gs-fill {
  background-image: var(--gs-light);
  background-attachment: fixed;
}

/* gold hairlines drawn as borders: redrawn as a lit line on top */
@media (min-width: 961px) {
  .gs-line-b, .gs-line-t { position: relative; }

  .gs-line-b::after,
  .gs-line-t::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    pointer-events: none;
    background-color: var(--gs-base);
    background-image: var(--gs-light);
    background-attachment: fixed;
  }

  .gs-line-b { border-bottom-color: transparent !important; }
  .gs-line-b::after { bottom: -1px; }
  .gs-line-t { border-top-color: transparent !important; }
  .gs-line-t::before { top: -1px; }
}

/* gold outline around a button: a lit ring */
.gs-ring { position: relative; }

.gs-ring::before {
  content: "";
  position: absolute;
  inset: -1px;
  padding: 1px;
  pointer-events: none;
  background-image: var(--gs-light);
  background-attachment: fixed;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
