/* Ensure hero and animated elements always remain visible once played */
.lp-mask > span {
  transform: none;
}
.lp-rise, .lp-reveal, .lp-panel, .lp-fade, .lp-settle {
  opacity: 1;
}

[data-motion=play] .lp-rise,
[data-motion=play] .lp-reveal,
[data-motion=play].lp-reveal,
[data-motion=play] .lp-panel,
[data-motion=play] .lp-fade,
[data-motion=play] .lp-settle,
[data-motion=play] .lp-pop,
[data-motion=play] .lp-bracket,
[data-motion=play] .lp-grow-x,
[data-motion=play] .lp-grow-y,
[data-motion=play] .lp-draw {
  opacity: 1 !important;
  transform: none !important;
}

[data-motion=play] .lp-mask > span {
  transform: none !important;
}

/* Failsafe: if data-motion="armed" hasn't transitioned within 0.6s, reveal smoothly so nothing is ever blank */
@keyframes lpArmedFailsafe {
  to {
    opacity: 1 !important;
    transform: none !important;
  }
}

[data-motion="armed"] .lp-rise,
[data-motion="armed"].lp-reveal,
[data-motion="armed"] .lp-panel,
[data-motion="armed"] .lp-fade {
  animation: lpArmedFailsafe 0.3s ease 0.6s forwards;
}

[data-motion="armed"] .lp-mask > span {
  animation: lpArmedFailsafe 0.3s ease 0.6s forwards;
}

#hero canvas {
  mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 85%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 85%, transparent);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Footer Back to Top Button */
.pixwed-footer-btt {
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.pixwed-footer-btt:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -4px rgba(217, 119, 6, 0.45);
}

/* ==========================================================================
   Royal Gold Palette & Gradient Fixes
   Guarantees 100% visibility for all buttons, badges, banners & charts
   ========================================================================== */

/* Arbitrary Hex Gradient Utilities */
.from-\[\#f59e0b\] {
  --tw-gradient-from: #f59e0b var(--tw-gradient-from-position, 0%);
  --tw-gradient-to: rgb(245 158 11 / 0) var(--tw-gradient-to-position, 100%);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}
.via-\[\#d97706\] {
  --tw-gradient-to: rgb(217 119 6 / 0) var(--tw-gradient-to-position, 100%);
  --tw-gradient-stops: var(--tw-gradient-from), #d97706 var(--tw-gradient-via-position, 50%), var(--tw-gradient-to);
}
.to-\[\#b45309\] {
  --tw-gradient-to: #b45309 var(--tw-gradient-to-position, 100%);
}
.from-\[\#b45309\] {
  --tw-gradient-from: #b45309 var(--tw-gradient-from-position, 0%);
  --tw-gradient-to: rgb(180 83 9 / 0) var(--tw-gradient-to-position, 100%);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}
.to-\[\#d97706\] {
  --tw-gradient-to: #d97706 var(--tw-gradient-to-position, 100%);
}
.from-\[\#ff884a\] {
  --tw-gradient-from: #f59e0b var(--tw-gradient-from-position, 0%);
  --tw-gradient-to: rgb(245 158 11 / 0) var(--tw-gradient-to-position, 100%);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

/* Fallback direct background gradients for all combinations */
.bg-gradient-to-r.from-\[\#f59e0b\],
.bg-gradient-to-r[class*="from-[#f59e0b]"],
[class*="from-[#f59e0b]"][class*="to-[#b45309]"] {
  background-image: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%) !important;
}

.bg-gradient-to-br.from-\[\#f59e0b\],
.bg-gradient-to-br[class*="from-[#f59e0b]"] {
  background-image: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%) !important;
}

.bg-gradient-to-t.from-\[\#b45309\],
.bg-gradient-to-t[class*="from-[#b45309]"] {
  background-image: linear-gradient(to top, #b45309, #d97706) !important;
}

/* Primary Royal Gold Buttons (Header, Hero, Feature Cards, Banner, Modal) */
a[href="/register"].group,
a[href="/register"].bg-gradient-to-r,
a[href="/register"].inline-flex,
.btn-royal-gold {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(251, 191, 36, 0.45) !important;
  box-shadow: 0 10px 25px -4px rgba(217, 119, 6, 0.5), 0 4px 10px -2px rgba(245, 158, 11, 0.3) !important;
  font-weight: 600 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

a[href="/register"].group:hover,
a[href="/register"].bg-gradient-to-r:hover,
a[href="/register"].inline-flex:hover,
.btn-royal-gold:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%) !important;
  box-shadow: 0 14px 35px -4px rgba(217, 119, 6, 0.65), 0 0 20px rgba(245, 158, 11, 0.45) !important;
  color: #ffffff !important;
  transform: translateY(-1px);
}

/* Secondary CTA "Live Demo" and "Try the Live Demo" buttons */
a[href="/demo"] {
  border-color: rgba(217, 119, 6, 0.35) !important;
  transition: all 0.2s ease;
}

a[href="/demo"]:hover {
  border-color: #d97706 !important;
  color: #b45309 !important;
  background-color: #fffbeb !important;
  box-shadow: 0 4px 14px -2px rgba(217, 119, 6, 0.2) !important;
}

/* Table header Royal Gold */
th.bg-gradient-to-r {
  background: linear-gradient(to right, #f59e0b, #d97706, #b45309) !important;
  color: #ffffff !important;
}

/* Text and Fill utilities */
.text-\[\#f4560d\] {
  color: #d97706 !important;
}
.fill-\[\#f4560d\] {
  fill: #d97706 !important;
}

/* Golden luxury accents */
.bg-amber-500, .bg-amber-600 {
  background-color: #d97706 !important;
}

.text-amber-600, .text-amber-700 {
  color: #b45309 !important;
}

.border-amber-500, .border-amber-400 {
  border-color: #d97706 !important;
}

.focus-visible\:ring-amber-500:focus-visible {
  --tw-ring-color: #d97706 !important;
}

/* Gentle floating micro-animations for hero chips */
@keyframes lp-float-slow {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-7px); }
}

@keyframes lp-float-reverse {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(6px); }
}

.lp-chip-fly:nth-child(odd) {
  animation: lp-float-slow 5s ease-in-out infinite;
}

.lp-chip-fly:nth-child(even) {
  animation: lp-float-reverse 5.8s ease-in-out infinite;
}

/* Golden subtle pulse on primary buttons */
@keyframes lp-gold-pulse {
  0%, 100% {
    box-shadow: 0 10px 25px -4px rgba(217, 119, 6, 0.5), 0 4px 10px -2px rgba(245, 158, 11, 0.3);
  }
  50% {
    box-shadow: 0 14px 34px -2px rgba(245, 158, 11, 0.75), 0 0 20px rgba(245, 158, 11, 0.4);
  }
}

a[href="/register"].group {
  animation: lp-gold-pulse 3.2s ease-in-out infinite;
}

/* Mascot Hop Animation */
@keyframes mascot-hop {
  0% { transform: translateY(0) scale(1, 1); }
  28% { transform: translateY(-16px) scale(0.94, 1.08); }
  55% { transform: translateY(0) scale(1.08, 0.92); }
  78% { transform: translateY(-5px) scale(0.98, 1.02); }
  100% { transform: translateY(0) scale(1, 1); }
}

.mascot-hop {
  animation: mascot-hop 0.65s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ==========================================================================
   Floating Back to Top Widget with Live Circular Progress Ring
   ========================================================================== */
.pixwed-btt-btn {
  position: fixed;
  bottom: 26px;
  right: 26px;
  z-index: 99999;
  width: 52px;
  height: 52px;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 12px 32px -6px rgba(0, 0, 0, 0.45), 0 0 20px -3px rgba(245, 158, 11, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px) scale(0.82);
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s, box-shadow 0.25s;
  color: #fbbf24;
  outline: none;
  padding: 0;
  margin: 0;
}

.pixwed-btt-btn.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.pixwed-btt-btn:hover {
  transform: translateY(-4px) scale(1.08);
  border-color: rgba(245, 158, 11, 0.75);
  box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.5), 0 0 25px rgba(245, 158, 11, 0.45);
  color: #fef08a;
}

.pixwed-btt-btn:active {
  transform: translateY(-1px) scale(0.96);
}

.pixwed-btt-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  pointer-events: none;
}

.pixwed-btt-ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 3;
}

.pixwed-btt-ring-progress {
  fill: none;
  stroke: url(#btt-gold-gradient);
  stroke-width: 3.2;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.12s linear;
}

.pixwed-btt-icon {
  position: relative;
  z-index: 2;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pixwed-btt-btn:hover .pixwed-btt-icon {
  transform: translateY(-3px);
}

.pixwed-btt-tooltip {
  position: absolute;
  right: 64px;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fde68a;
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateX(8px);
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.pixwed-btt-btn:hover .pixwed-btt-tooltip {
  opacity: 1;
  transform: translateX(0);
}

/* ==========================================================================
   Delight Layer: scroll progress, card spotlight & tilt, gold shimmer
   ========================================================================== */

.pixwed-scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 60;
  transform-origin: left center;
  transform: scaleX(0);
  background: linear-gradient(90deg, #fde68a, #f59e0b 40%, #b45309);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.55);
  pointer-events: none;
}

.pixwed-spotlight {
  position: relative;
  isolation: isolate;
  transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
}

.pixwed-spotlight::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(420px circle at var(--spot-x, 50%) var(--spot-y, 50%), rgba(245, 158, 11, 0.16), transparent 45%);
  transition: opacity 0.3s ease;
  z-index: -1;
}

.pixwed-spotlight:hover {
  box-shadow: 0 22px 48px -22px rgba(180, 83, 9, 0.38);
}

.pixwed-spotlight:hover::after {
  opacity: 1;
}

.pixwed-magnetic {
  transition: translate 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

#hero h1 .text-amber-600 > span {
  background: linear-gradient(100deg, #b45309 0%, #d97706 30%, #fcd34d 50%, #d97706 70%, #b45309 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: pixwedGoldShimmer 5s ease-in-out 1.2s infinite;
}

@keyframes pixwedGoldShimmer {
  0%, 100% { background-position: 100% 0; }
  50% { background-position: 0% 0; }
}

/* Tutorial placeholders read as upcoming episodes, not empty boxes */
#tutorials .aspect-video {
  border-style: solid !important;
  border-color: rgba(245, 158, 11, 0.25) !important;
  background: radial-gradient(circle at 20% 15%, rgba(253, 230, 138, 0.45), transparent 55%), linear-gradient(135deg, #fffbeb, #ffffff 60%, #fef3c7) !important;
}

#tutorials .aspect-video p {
  margin-top: 14px;
  font-size: 15px !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  color: #1e293b !important;
  font-weight: 700 !important;
}

#tutorials .aspect-video p::before {
  content: "Episode soon";
  display: block;
  margin: 0 auto 8px;
  width: max-content;
  padding: 2px 10px;
  border-radius: 9999px;
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

@media (prefers-reduced-motion: reduce) {
  .pixwed-spotlight { transform: none; }
  #hero h1 .text-amber-600 > span { animation: none; }
}
