/* ═══════════════════════════════════════════════════════════════
   NIGHTBOX LLC — Luxury Button Library v1.0
   Twelve bespoke button variants, each with unique animation,
   icon system, and micro-interaction. Hand-tuned per use case.
   2026-05-09 · Companion to brand-cgd.css
═══════════════════════════════════════════════════════════════ */

/* ───────────────────────────────────────────────────────────────
   Foundation — every luxury button extends .btn-lux
─────────────────────────────────────────────────────────────── */
.btn-lux {
  --lux-glow: rgba(240, 193, 74, 0.45);
  --lux-ring: rgba(240, 193, 74, 0.4);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 30px;
  font-family: var(--tx-display, 'Inter', system-ui, sans-serif);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  border: 0;
  border-radius: var(--radius-md, 14px);
  cursor: pointer;
  text-decoration: none;
  user-select: none;
  white-space: nowrap;
  isolation: isolate;
  overflow: hidden;
  transition: transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 280ms cubic-bezier(0.16, 1, 0.3, 1),
              filter 280ms;
  font-variation-settings: 'wght' 700;
}
.btn-lux:focus-visible {
  outline: 2px solid var(--lux-ring);
  outline-offset: 3px;
}
.btn-lux:active { transform: translateY(1px) scale(0.98); }
.btn-lux .ico {
  width: 18px; height: 18px;
  flex-shrink: 0;
  display: inline-block;
}

/* ═══════════════════════════════════════════════════════════════
   1. AURUM — molten gold liquid with traveling light shimmer
   Use: primary CTAs, "Install Free", "Get the Shield"
═══════════════════════════════════════════════════════════════ */
.btn-aurum {
  background: linear-gradient(135deg, #ffe9a8 0%, #ffd76a 30%, #f0c14a 55%, #d8a836 80%, #b8861e 100%);
  background-size: 200% 100%;
  background-position: 0% 0%;
  color: #1a1410;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -1px 0 rgba(184, 134, 30, 0.6),
    0 6px 18px rgba(240, 193, 74, 0.32),
    0 12px 36px rgba(240, 193, 74, 0.18);
  animation: aurumIdle 6s ease-in-out infinite;
}
.btn-aurum::before {
  content: "";
  position: absolute;
  top: 0; left: -50%;
  width: 40%; height: 100%;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.6) 50%, transparent 70%);
  transform: skewX(-20deg);
  transition: left 700ms cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 1;
}
.btn-aurum:hover {
  background-position: 100% 0%;
  transform: translateY(-2px) scale(1.01);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 0 -1px 0 rgba(184, 134, 30, 0.7),
    0 12px 28px rgba(240, 193, 74, 0.5),
    0 24px 60px rgba(240, 193, 74, 0.3);
  animation-play-state: paused;
}
.btn-aurum:hover::before { left: 130%; }
.btn-aurum > * { position: relative; z-index: 2; }
@keyframes aurumIdle {
  0%, 100% { background-position: 0% 0%; }
  50%      { background-position: 50% 0%; }
}

/* ═══════════════════════════════════════════════════════════════
   2. SHIELD — dome silhouette with breathing halo
   Use: "Activate Shield", security CTAs
═══════════════════════════════════════════════════════════════ */
.btn-shield {
  background: radial-gradient(ellipse at 50% 0%, #2d2419 0%, #1a1410 60%);
  color: #ffd76a;
  border: 1px solid rgba(240, 193, 74, 0.4);
  padding-left: 50px;
  box-shadow:
    inset 0 1px 0 rgba(240, 193, 74, 0.15),
    0 4px 16px rgba(0, 0, 0, 0.4);
}
.btn-shield::before {
  content: "";
  position: absolute;
  left: 18px; top: 50%;
  width: 22px; height: 22px;
  transform: translateY(-50%);
  background: linear-gradient(180deg, #ffd76a 0%, #f0c14a 50%, #d8a836 100%);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 2 L20 6 V12 C20 17 16 21 12 22 C8 21 4 17 4 12 V6 Z' fill='black'/></svg>") center/contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 2 L20 6 V12 C20 17 16 21 12 22 C8 21 4 17 4 12 V6 Z' fill='black'/></svg>") center/contain no-repeat;
  filter: drop-shadow(0 0 8px rgba(240, 193, 74, 0.6));
  z-index: 1;
}
.btn-shield::after {
  content: "";
  position: absolute;
  left: 18px; top: 50%;
  width: 22px; height: 22px;
  transform: translate(-50%, -50%);
  left: 29px;
  border-radius: 50%;
  border: 1px solid rgba(240, 193, 74, 0.5);
  animation: shieldHalo 2.4s ease-out infinite;
  z-index: 0;
}
@keyframes shieldHalo {
  0%   { transform: translate(-50%, -50%) scale(0.6); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(2.4); opacity: 0; }
}
.btn-shield:hover {
  background: radial-gradient(ellipse at 50% 0%, #3d3220 0%, #251c14 60%);
  border-color: rgba(240, 193, 74, 0.7);
  box-shadow:
    inset 0 1px 0 rgba(240, 193, 74, 0.3),
    0 8px 32px rgba(240, 193, 74, 0.25);
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════════════
   3. TREASURY — verdant emerald with $ pulse glow
   Use: EFTPS / tax / Treasury CTAs
═══════════════════════════════════════════════════════════════ */
.btn-treasury {
  background: linear-gradient(135deg, #064e3b 0%, #065f46 50%, #047857 100%);
  color: #d1fae5;
  border: 1px solid rgba(16, 185, 129, 0.5);
  padding-left: 48px;
  box-shadow:
    inset 0 1px 0 rgba(16, 185, 129, 0.3),
    0 4px 18px rgba(6, 95, 70, 0.5);
}
.btn-treasury::before {
  content: "$";
  position: absolute;
  left: 16px; top: 50%;
  transform: translateY(-50%);
  width: 22px; height: 22px;
  background: linear-gradient(180deg, #34d399 0%, #10b981 100%);
  color: #052e1f;
  font-weight: 900;
  font-size: 0.95rem;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6);
  animation: treasuryPulse 2.8s ease-in-out infinite;
}
@keyframes treasuryPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6); }
  50%      { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
}
.btn-treasury:hover {
  background: linear-gradient(135deg, #047857 0%, #059669 50%, #10b981 100%);
  border-color: rgba(52, 211, 153, 0.8);
  box-shadow:
    inset 0 1px 0 rgba(52, 211, 153, 0.4),
    0 8px 28px rgba(6, 95, 70, 0.7),
    0 0 0 4px rgba(16, 185, 129, 0.15);
  transform: translateY(-2px);
}

/* ═══════════════════════════════════════════════════════════════
   4. MINING — three animated dots showing PoQ tier
   Use: "Start Mining", PoQ CTAs
═══════════════════════════════════════════════════════════════ */
.btn-mining {
  background: linear-gradient(180deg, #1f1f2e 0%, #14141f 100%);
  color: #f0c14a;
  border: 1px solid rgba(240, 193, 74, 0.3);
  padding-right: 56px;
}
.btn-mining::before, .btn-mining::after,
.btn-mining > .ico {
  position: absolute;
  right: 16px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--c-gold-400, #f0c14a);
  top: 50%;
}
.btn-mining::before {
  right: 30px;
  transform: translateY(-50%);
  animation: miningDot 1.4s ease-in-out infinite;
  animation-delay: 0s;
  content: "";
}
.btn-mining::after {
  right: 22px;
  transform: translateY(-50%);
  animation: miningDot 1.4s ease-in-out infinite;
  animation-delay: 0.2s;
  content: "";
}
.btn-mining .mining-dot-3 {
  position: absolute;
  right: 14px; top: 50%;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--c-gold-400, #f0c14a);
  transform: translateY(-50%);
  animation: miningDot 1.4s ease-in-out infinite;
  animation-delay: 0.4s;
}
@keyframes miningDot {
  0%, 100% { opacity: 0.3; transform: translateY(-50%) scale(1); }
  50%      { opacity: 1;   transform: translateY(-50%) scale(1.4); box-shadow: 0 0 8px rgba(240, 193, 74, 0.8); }
}
.btn-mining:hover {
  background: linear-gradient(180deg, #2a2a40 0%, #1c1c2c 100%);
  border-color: rgba(240, 193, 74, 0.6);
  box-shadow: 0 8px 24px rgba(240, 193, 74, 0.2);
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════════════
   5. SPEC — code brackets that morph wider on hover
   Use: "Read the spec", "View JSON", developer CTAs
═══════════════════════════════════════════════════════════════ */
.btn-spec {
  background: rgba(13, 16, 24, 0.6);
  color: #cfd2d7;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--tx-mono, 'JetBrains Mono', monospace);
  font-size: 0.92rem;
  padding-left: 22px;
  padding-right: 22px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.btn-spec::before, .btn-spec::after {
  display: inline-block;
  color: var(--c-gold-400, #f0c14a);
  font-weight: 800;
  transition: transform 280ms cubic-bezier(0.34, 1.56, 0.64, 1), color 200ms;
}
.btn-spec::before { content: "{"; margin-right: 10px; }
.btn-spec::after  { content: "}"; margin-left: 10px; }
.btn-spec:hover {
  border-color: rgba(240, 193, 74, 0.5);
  color: var(--c-gold-200, #ffd76a);
  background: rgba(240, 193, 74, 0.04);
}
.btn-spec:hover::before { transform: translateX(-4px); color: var(--c-gold-200, #ffd76a); }
.btn-spec:hover::after  { transform: translateX(4px);  color: var(--c-gold-200, #ffd76a); }

/* ═══════════════════════════════════════════════════════════════
   6. FEDERAL — slow-rotating eagle/seal silhouette
   Use: "Federal review request", "Contact program office"
═══════════════════════════════════════════════════════════════ */
.btn-federal {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.25);
  padding-left: 50px;
  position: relative;
}
.btn-federal::before {
  content: "";
  position: absolute;
  left: 15px; top: 50%;
  width: 24px; height: 24px;
  transform: translateY(-50%);
  background:
    radial-gradient(circle, #fbbf24 0%, #d97706 40%, transparent 70%),
    radial-gradient(circle, #1e3a8a 0%, transparent 60%);
  background-size: 100% 100%, 60% 60%;
  background-position: center, center;
  background-repeat: no-repeat;
  border-radius: 50%;
  border: 1.5px solid #fbbf24;
  animation: federalRotate 18s linear infinite;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.3);
}
@keyframes federalRotate {
  0%   { transform: translateY(-50%) rotate(0deg); }
  100% { transform: translateY(-50%) rotate(360deg); }
}
.btn-federal:hover {
  background: linear-gradient(180deg, #334155 0%, #1e293b 100%);
  border-color: rgba(251, 191, 36, 0.5);
  box-shadow: 0 8px 28px rgba(30, 58, 138, 0.4), 0 0 0 4px rgba(251, 191, 36, 0.06);
  transform: translateY(-1px);
}
.btn-federal:hover::before { animation-duration: 6s; }

/* ═══════════════════════════════════════════════════════════════
   7. PIRATE — wobbling skull-quack with cyrillic К signature
   Use: Cyber-Kryak callsigns, mockery CTAs, easter eggs
═══════════════════════════════════════════════════════════════ */
.btn-pirate {
  background: linear-gradient(135deg, #1a0f1a 0%, #2d1a2d 100%);
  color: #ffd76a;
  border: 1px solid rgba(240, 193, 74, 0.4);
  padding-left: 48px;
  font-family: var(--tx-mono, monospace);
  letter-spacing: 0.04em;
}
.btn-pirate::before {
  content: "Кря";
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%) rotate(-8deg);
  font-size: 0.78rem;
  font-weight: 900;
  color: #f0c14a;
  background: rgba(240, 193, 74, 0.15);
  border: 1px dashed rgba(240, 193, 74, 0.5);
  border-radius: 4px;
  padding: 2px 5px;
  animation: pirateWobble 3.6s ease-in-out infinite;
}
@keyframes pirateWobble {
  0%, 100% { transform: translateY(-50%) rotate(-8deg); }
  25%      { transform: translateY(-50%) rotate(-4deg) translateX(-1px); }
  50%      { transform: translateY(-50%) rotate(-10deg); }
  75%      { transform: translateY(-50%) rotate(-6deg) translateX(1px); }
}
.btn-pirate:hover {
  background: linear-gradient(135deg, #2d1a2d 0%, #4a2a4a 100%);
  border-color: rgba(240, 193, 74, 0.8);
  transform: translateY(-1px) skewX(-1deg);
}
.btn-pirate:hover::before { animation-duration: 0.8s; }

/* ═══════════════════════════════════════════════════════════════
   8. ARROW-SHOOT — arrow that extends + lengthens on hover
   Use: "Continue", "Next", forward-flow CTAs
═══════════════════════════════════════════════════════════════ */
.btn-arrow-shoot {
  background: rgba(255, 255, 255, 0.04);
  color: var(--c-text, #f0f1f5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding-right: 56px;
  backdrop-filter: blur(8px);
}
.btn-arrow-shoot::after {
  content: "→";
  position: absolute;
  right: 22px; top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--c-gold-400, #f0c14a);
  transition: right 320ms cubic-bezier(0.34, 1.56, 0.64, 1),
              letter-spacing 320ms,
              color 200ms;
}
.btn-arrow-shoot:hover {
  border-color: rgba(240, 193, 74, 0.4);
  background: rgba(240, 193, 74, 0.03);
  padding-right: 64px;
}
.btn-arrow-shoot:hover::after {
  right: 14px;
  letter-spacing: 4px;
  color: var(--c-gold-200, #ffd76a);
}

/* ═══════════════════════════════════════════════════════════════
   9. FROST — frosted glass with light beam sweep
   Use: secondary actions, "Learn more", neutral CTAs
═══════════════════════════════════════════════════════════════ */
.btn-frost {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
  color: var(--c-text, #f0f1f5);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
}
.btn-frost::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.18) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.btn-frost:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.04) 100%);
  transform: translateY(-1px);
}
.btn-frost:hover::before { transform: translateX(100%); }

/* ═══════════════════════════════════════════════════════════════
   10. CIPHER — random hex chars that resolve to label on hover
   Use: cryptographic CTAs, /api endpoints, technical actions
═══════════════════════════════════════════════════════════════ */
.btn-cipher {
  background: #0d1117;
  color: var(--c-gold-400, #f0c14a);
  border: 1px solid rgba(240, 193, 74, 0.2);
  font-family: var(--tx-mono, monospace);
  font-size: 0.88rem;
  letter-spacing: 0.04em;
}
.btn-cipher .label-real,
.btn-cipher .label-cipher {
  display: inline-block;
  transition: opacity 280ms;
}
.btn-cipher .label-cipher {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: rgba(240, 193, 74, 0.3);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  opacity: 0;
  pointer-events: none;
  font-feature-settings: 'tnum';
}
.btn-cipher:hover {
  border-color: rgba(240, 193, 74, 0.6);
  background: #14181f;
  box-shadow: 0 0 0 4px rgba(240, 193, 74, 0.06);
}
.btn-cipher:hover .label-real   { opacity: 0; }
.btn-cipher:hover .label-cipher { opacity: 1; animation: cipherScramble 0.6s steps(8) forwards; }
@keyframes cipherScramble {
  0%   { content: "deadbeef cafef00d"; }
  50%  { content: "f0c14a 0xPOQ"; }
  100% { content: "verified ✓"; }
}

/* ═══════════════════════════════════════════════════════════════
   11. MAGNETIC — JS-coupled magnetic hover (button leans toward cursor)
   Use: high-conversion primary CTAs (works without JS too)
═══════════════════════════════════════════════════════════════ */
.btn-magnetic {
  background: linear-gradient(135deg, #ffd76a 0%, #f0c14a 50%, #d8a836 100%);
  color: #1a1410;
  font-weight: 800;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 6px 20px rgba(240, 193, 74, 0.35);
  transition: transform 100ms ease-out, box-shadow 280ms;
  will-change: transform;
}
.btn-magnetic::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(from 0deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  animation: magneticBorder 3s linear infinite;
  transition: opacity 280ms;
}
.btn-magnetic:hover {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 12px 36px rgba(240, 193, 74, 0.55);
}
.btn-magnetic:hover::before { opacity: 1; }
@keyframes magneticBorder {
  to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════════════════════
   12. CANARY — warrant-canary themed, breathing/heartbeat
   Use: transparency / canary / surveillance-related CTAs
═══════════════════════════════════════════════════════════════ */
.btn-canary {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #78350f;
  border: 1px solid #d97706;
  padding-left: 50px;
  font-weight: 800;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 4px 14px rgba(217, 119, 6, 0.25);
}
.btn-canary::before {
  content: "🐤";
  position: absolute;
  left: 16px; top: 50%;
  transform: translateY(-50%) scale(1);
  font-size: 1.4rem;
  filter: drop-shadow(0 1px 2px rgba(120, 53, 15, 0.3));
  animation: canaryBreathe 1.6s ease-in-out infinite;
}
@keyframes canaryBreathe {
  0%, 100% { transform: translateY(-50%) scale(1); }
  50%      { transform: translateY(-50%) scale(1.12); }
}
.btn-canary:hover {
  background: linear-gradient(135deg, #fde68a 0%, #fcd34d 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 8px 24px rgba(217, 119, 6, 0.4);
  transform: translateY(-1px);
}

/* ───────────────────────────────────────────────────────────────
   Reduced-motion respects all custom animations
─────────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .btn-aurum, .btn-shield::after, .btn-treasury::before,
  .btn-mining::before, .btn-mining::after, .btn-mining .mining-dot-3,
  .btn-federal::before, .btn-pirate::before, .btn-canary::before,
  .btn-magnetic::before {
    animation: none !important;
  }
  .btn-aurum { background-position: 0% 0%; }
}
