/* ==========================================================================
   Components — Buttons, sparkle rim, Kit form message for worldclassmemory.com.
   Same classes as yanjaa.com/css/components.css, trimmed to what this site uses.
   ========================================================================== */

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  padding: 1rem 2rem;
  border-radius: 50px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  position: relative;
  z-index: 1;
  background: transparent !important;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50px;
  z-index: -1;
  transition: background 0.25s ease;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50px;
  z-index: -2;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(0);
}

.btn:hover {
  transform: translateY(-16px);
}

.btn:hover::before {
  opacity: 1;
  transform: translateY(16px);
}

/* Squiggle shapes container (filled by script.js on hover) */
.btn-squiggles {
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(100% + 16px);
  height: calc(100% + 16px);
  transform: translate(-50%, -50%);
  z-index: -1;
  pointer-events: none;
  overflow: visible;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:hover .btn-squiggles {
  transform: translate(-50%, calc(-50% + 16px));
}

.btn-squiggle {
  position: absolute;
  font-size: 0.85rem;
  line-height: 1;
  transition: opacity 0.15s ease;
  transform-origin: center center;
  margin-left: -0.4em;
  margin-top: -0.4em;
}

/* Button variants */
.btn--primary {
  color: var(--deep-forest);
  border-color: var(--turquoise);
}

.btn--primary::after {
  background: var(--turquoise);
}

.btn--primary::before {
  background: var(--orchid);
}

/* Deluxe — the waitlist CTA: champagne fill so it pops on the dark stage,
   peacock gradient revealed on hover */
.btn--deluxe {
  color: #3a2c10;
  border-color: rgba(255, 255, 255, 0.3);
}

.btn--deluxe::after {
  background: linear-gradient(135deg, #c9a55a, #e8cc8a);
}

.btn--deluxe:hover {
  color: var(--text-on-dark);
}

.btn--deluxe::before {
  background: var(--gradient-deluxe);
}

/* ---------- Sparkle rim — a travelling highlight around a button's edge plus
   a few twinkles, to make the one button on the page the one you press.
   Wrap the button: <span class="sparkle-rim"><button class="btn">…</button></span> */
@property --rim-a {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

.sparkle-rim {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  padding: 3px;
  border-radius: 50px;
  isolation: isolate;
}

.sparkle-rim > .btn {
  position: relative;
  z-index: 1;
}

.sparkle-rim::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: 0;
  --rim-a: 0deg;
  background: conic-gradient(from var(--rim-a),
    rgba(255, 255, 255, 0) 0deg,
    rgba(255, 255, 255, 0) 205deg,
    #ffd6e5 245deg,
    #ffffff 268deg,
    #ffd6e5 291deg,
    rgba(255, 255, 255, 0) 331deg,
    rgba(255, 255, 255, 0) 360deg);
  animation: rimTurn 2.8s linear infinite;
}

@keyframes rimTurn {
  to { --rim-a: 360deg; }
}

.sparkle-rim::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 2;
  background-image:
    radial-gradient(circle, #fff 0 1.2px, rgba(255, 246, 200, 0.9) 1.8px, transparent 3.2px),
    radial-gradient(circle, #fff 0 1px, rgba(255, 246, 200, 0.85) 1.6px, transparent 2.8px),
    radial-gradient(circle, #fff 0 1.2px, rgba(255, 246, 200, 0.9) 1.8px, transparent 3.4px),
    radial-gradient(circle, #fff 0 0.9px, rgba(255, 246, 200, 0.8) 1.4px, transparent 2.6px);
  background-repeat: no-repeat;
  background-size: 8px 8px, 7px 7px, 9px 9px, 6px 6px;
  background-position: 12% 8%, 88% 22%, 70% 92%, 30% 96%;
  animation: sparkleTwinkle 1.9s ease-in-out infinite;
}

@keyframes sparkleTwinkle {
  0%, 100% { opacity: 0.25; background-size: 6px 6px, 9px 9px, 6px 6px, 8px 8px; }
  30%      { opacity: 1;    background-size: 9px 9px, 6px 6px, 8px 8px, 5px 5px; }
  65%      { opacity: 0.5;  background-size: 7px 7px, 8px 8px, 10px 10px, 7px 7px; }
}

@media (prefers-reduced-motion: reduce) {
  .sparkle-rim::before { animation: none; background: rgba(255, 214, 229, 0.7); }
  .sparkle-rim::after { animation: none; opacity: 0.6; }
}

/* ---------- Kit form status line ---------- */
/* Carries its own background so it reads on the dark stage. */
.kit-message {
  flex: 1 1 100%;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.7rem 1rem;
  border-radius: 14px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: center;
}

.kit-message--error {
  background: #fde8e2;
  color: #a3301a;
}

.kit-message--success {
  background: #d8f3ef;
  color: #0f6b66;
}

@media (max-width: 480px) {
  .btn {
    width: 100%;
    justify-content: center;
  }
}
