/* Glass CTA with gradient border and focus */
.cta-glass {
  position: relative;
  display: inline-block;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 0.5rem;
  padding: 0.75rem 1.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.cta-glass:hover {
  transform: translateY(-1px) scale(1.02);
  background: rgba(255, 255, 255, 0.09);
}

.cta-glass:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(168, 85, 247, .25);
}

.cta-glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(90deg, #60a5fa, #ec4899);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Always-on conic-gradient stroke for hero CTAs */

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

.btn-spin-border {
  position: relative;
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  color: white;
  border: 2px solid transparent;
  background-color: transparent;
  z-index: 1;
}

.btn-spin-border::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(var(--rotate),
      #5ddcff,
      #3c67e3 43%,
      #4e00c2);
  animation: spin 2.5s linear infinite;
  background-origin: border-box;
  background-clip: border-box;
  padding: 2px;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

@keyframes spin {
  0% {
    --rotate: 0deg;
  }

  100% {
    --rotate: 360deg;
  }
}

.animated-gradient {
  background: var(--background-color);
  --edge-bottom-a: 0.12;
  background-image: linear-gradient(0deg, rgba(232, 121, 249, var(--edge-bottom-a)), transparent 28%);
  background-repeat: no-repeat;
  animation: edge-bottom 3s ease-in-out infinite;
  animation-delay: .25s;
}

.animated-gradient::before,
.animated-gradient::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.animated-gradient::before {
  background: linear-gradient(90deg, rgba(232, 121, 249, 0.10), rgba(232, 121, 249, 0.22) 6%, rgba(232, 121, 249, 0.16) 10%, transparent 22%);
  animation: edge-left 3s ease-in-out infinite;
}

.animated-gradient::after {
  background: linear-gradient(270deg, rgba(232, 121, 249, 0.10), rgba(232, 121, 249, 0.22) 6%, rgba(232, 121, 249, 0.16) 10%, transparent 22%);
  animation: edge-right 3s ease-in-out infinite;
  animation-delay: .75s;
}

@keyframes edge-left {
  0% { opacity: .16; }
  25% { opacity: .32; }
  50% { opacity: .46; }
  75% { opacity: .32; }
  100% { opacity: .16; }
}

@keyframes edge-right {
  0% { opacity: .16; }
  25% { opacity: .32; }
  50% { opacity: .46; }
  75% { opacity: .32; }
  100% { opacity: .16; }
}

@property --edge-bottom-a {
  syntax: '<number>';
  inherits: false;
  initial-value: 0.12;
}

@keyframes edge-bottom {
  0% { --edge-bottom-a: 0.12; }
  25% { --edge-bottom-a: 0.22; }
  50% { --edge-bottom-a: 0.34; }
  75% { --edge-bottom-a: 0.22; }
  100% { --edge-bottom-a: 0.12; }
}

.ecg-svg {
  display: block;
}

.ecg-path {
  stroke-linejoin: miter;
  miter-limit: 12;
  stroke-linecap: round;
  stroke-dasharray: var(--ecg-len, 1000);
  stroke-dashoffset: var(--ecg-len, 1000);
  animation: ecg-draw 2.25s linear infinite, ecg-pulse 3.8s ease-in-out infinite;
}

.ecg-path-static {
  stroke-linejoin: round;
  stroke-linecap: round;
  stroke-width: 1.5;
  opacity: 0.28;
}

.ecg-path-anim {
  stroke-linejoin: round;
  stroke-linecap: round;
}

.ecg-reveal {
  animation: none;
}

.ecg-glow {
  filter:
    drop-shadow(0 0 10px rgba(168, 85, 247, 0.95))
    drop-shadow(0 0 22px rgba(192, 38, 211, 0.6))
    drop-shadow(0 0 34px rgba(147, 51, 234, 0.4));
  opacity: 1;
}

@keyframes ecg-pulse {
  0%, 100% { stroke-width: 4; }
  50% { stroke-width: 6; }
}

@keyframes ecg-draw {
  from { stroke-dashoffset: var(--ecg-len, 1000); }
  to { stroke-dashoffset: 0; }
}

@keyframes pulseGlow {
  0%, 100% { opacity: .35; filter: blur(12px); }
  50% { opacity: .65; filter: blur(16px); }
}

.brand-glow {
  position: relative;
  display: inline-block;
}

.brand-glow::after {
  content: "";
  position: absolute;
  inset: -0.35rem -0.6rem;
  border-radius: 1.25rem;
  background: radial-gradient(closest-side, rgba(168,85,247,.55), rgba(96,165,250,.25) 60%, transparent 100%);
  animation: pulseGlow 2.6s ease-in-out infinite;
  z-index: 0;
  pointer-events: none;
}

.brand-content {
  position: relative;
  z-index: 1;
}

@keyframes textGlow {
  0%, 100% { text-shadow: 0 0 6px rgba(139,92,246,.35); }
  50% { text-shadow: 0 0 12px rgba(232,121,249,.55); }
}

.brand-text-glow {
  animation: textGlow 3s ease-in-out infinite;
}

@keyframes strokeGlow {
  0%, 100% {
    opacity: .28;
    text-shadow:
      0 0 6px rgba(191,219,254,.55),
      0 0 10px rgba(129,140,248,.45),
      0 0 14px rgba(255,255,255,.28);
    filter: none;
  }
  50% {
    opacity: .68;
    text-shadow:
      0 0 10px rgba(191,219,254,.85),
      0 0 18px rgba(129,140,248,.70),
      0 0 24px rgba(255,255,255,.42);
    filter: none;
  }
}

.brand-stroke {
  position: relative;
  display: inline-block;
}

.brand-stroke .fill {
  position: relative;
  z-index: 1;
  display: inline-block;
}

.brand-stroke::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  color: transparent;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  white-space: pre;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  font-kerning: normal;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 2px rgba(191,219,254,.80);
  text-stroke: 2px rgba(191,219,254,.80);
  transform: translateZ(0);
  animation: strokeGlow 1.9s ease-in-out infinite;
}

@media (min-width: 768px) {
  .brand-stroke::after {
    -webkit-text-stroke: 2.5px rgba(191,219,254,.85);
    text-stroke: 2.5px rgba(191,219,254,.85);
  }
}

.hero-brand {
  position: relative;
  display: inline-block;
  padding-top: .5rem;
  padding-bottom: .5rem;
}

.hero-brand::before {
  content: "";
  position: absolute;
  inset: -0.5rem -0.75rem;
  border-radius: 1rem;
  background: radial-gradient(closest-side, rgba(17,24,39,0.75), rgba(17,24,39,0.45) 60%, transparent 100%);
  filter: blur(6px);
  pointer-events: none;
  z-index: 0;
}

.hero-brand .brand-text {
  position: relative;
  z-index: 1;
}

@media (max-width: 640px) {
  .ecg-path {
    animation: ecg-draw 2.25s linear infinite, ecg-pulse-sm 3.8s ease-in-out infinite;
  }

  @keyframes ecg-pulse-sm {
    0%, 100% { stroke-width: 2.5; }
    50% { stroke-width: 3.5; }
  }

  .ecg-path-static {
    stroke-width: 1;
  }
}
