/* The hero's "Get started" (ver 2.4.1: blue glass; 2.4's had too much pink). The beta
   banner's glass in a button, in blues only at rest: a sky light, a deep light and a pale one
   drift over a deep-to-bright blue, a fine pinstripe sits under the frosted pane, a sheen
   crosses it on the banner's 7 s beat, and the pointer's light and tilt come from home.js
   ([data-glass] sets --mx, --my, --glass-rx, --glass-ry). Under the pointer or the keyboard a
   faint pink glow follows the light and the shadow warms. The label is ink, as on the site's
   other cyan surfaces (ink on these blues reads at 6:1 and more; white would not). */
@property --glass-pink {
  syntax: '<number>';
  inherits: true;
  initial-value: 0;
}
.glass-btn {
  --mx: 50%;
  --my: 35%;
  --glass-rx: 0deg;
  --glass-ry: 0deg;
  --glass-pink: 0;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 62px;
  padding: 0 32px;
  border: 1px solid rgba(255, 255, 255, .78);
  border-radius: 999px;
  background-color: #2f9bff; /* readable before the gradients paint */
  background-image:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .13) 0 1px, transparent 1px 6px),
    radial-gradient(60% 80% at 12% 18%, rgba(143, 225, 255, .75) 0%, transparent 62%),
    radial-gradient(50% 70% at 88% 84%, var(--cyan-deep) 0%, transparent 62%),
    radial-gradient(40% 50% at 72% 12%, rgba(196, 236, 255, .55) 0%, transparent 70%),
    linear-gradient(120deg, var(--cyan-deep) 0%, #2f9bff 50%, var(--cyan) 100%);
  background-size: auto, 190% 190%, 190% 190%, 190% 190%, 100% 100%;
  background-position: 0 0, 0% 0%, 100% 100%, 100% 0%, 0 0;
  color: var(--ink);
  font: 700 18px/1 var(--sans);
  letter-spacing: -.01em;
  text-decoration: none;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .95),
    inset 0 -1px 0 rgba(255, 255, 255, .3),
    0 18px 38px -16px rgba(4, 57, 110, .55),
    0 6px 16px -8px rgba(5, 130, 171, .45);
  transform: perspective(780px) rotateX(var(--glass-rx)) rotateY(var(--glass-ry));
  transition: transform .3s var(--ease), box-shadow .3s ease, border-color .3s ease, --glass-pink .4s ease;
  animation: glass-drift 9s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes glass-drift {
  to { background-position: 0 0, 100% 100%, 0% 0%, 0% 100%, 0 0; }
}

/* The frosted pane: a white veil with the pointer's light in it, as on the banner's glass,
   and at the light's heart a small pink glow that is nothing at rest (--glass-pink is 0). */
.glass-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(110px circle at var(--mx) var(--my), rgb(255 46 136 / calc(var(--glass-pink) * 20%)), transparent 70%),
    radial-gradient(150px circle at var(--mx) var(--my), rgba(255, 255, 255, .5), transparent 62%),
    linear-gradient(180deg, rgba(255, 255, 255, .4) 0%, rgba(255, 255, 255, .08) 40%, rgba(255, 255, 255, .12) 100%);
}

/* The sheen, always crossing (the banner's 7 s beat). */
.glass-btn::after {
  content: "";
  position: absolute;
  inset: -20% -40%;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, .7) 50%, transparent 58%);
  transform: translateX(-70%);
  animation: glass-sheen 7s var(--ease) infinite;
}
@keyframes glass-sheen {
  0%, 62% { transform: translateX(-70%); }
  100% { transform: translateX(70%); }
}

.glass-btn svg { transition: transform .3s var(--ease); }

.glass-btn:is(:hover, .tracking, :focus-visible) {
  --glass-pink: 1;
  border-color: #fff;
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 -1px 0 rgba(255, 255, 255, .35),
    0 24px 44px -16px rgba(200, 0, 95, .24),
    0 8px 20px -8px rgba(5, 130, 171, .55);
  transform: perspective(780px) rotateX(var(--glass-rx)) rotateY(var(--glass-ry)) translateY(-2px) scale(1.02);
}
.glass-btn:is(:hover, .tracking, :focus-visible) svg { transform: translateX(4px); }
.glass-btn:focus-visible { outline: 3px solid var(--cyan-deep); outline-offset: 4px; }
.glass-btn:active { transform: perspective(780px) rotateX(var(--glass-rx)) rotateY(var(--glass-ry)) scale(1.005); }

@media (prefers-reduced-motion: reduce) {
  .glass-btn, .glass-btn::after { animation: none; }
  .glass-btn::after { display: none; }
}
@media (prefers-reduced-motion: reduce), (hover: none), (pointer: coarse) {
  .glass-btn, .glass-btn svg { transform: none !important; transition: none; will-change: auto; }
}
@media (max-width: 560px) {
  .glass-btn { height: 58px; padding: 0 26px; font-size: 17px; }
}
