/* ==========================================================================
   WEEGLECAT — APPLE-GRADE FLUID INTERFACES & CUSTOM STYLES
   Typography: Bricolage Grotesque (Display) + Outfit (Body/UI)
   ========================================================================== */

:root {
  --font-display: 'Bricolage Grotesque', sans-serif;
  --font-sans: 'Outfit', sans-serif;
}

body {
  font-family: var(--font-sans);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.outfit-font {
  font-family: 'Outfit', sans-serif;
  font-optical-sizing: auto;
}

.bricolage-grotesque {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-optical-sizing: auto;
  font-variation-settings: "wdth" 100;
}

h1, h2, h3, h4, .font-display {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-optical-sizing: auto;
  font-variation-settings: "wdth" 100;
  letter-spacing: -0.025em;
}

/* Marquee Infinite Loop */
.marquee-track {
  display: flex;
  width: max-content;
  animation: marqueeScroll 24s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

@keyframes marqueeScroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Audio Visualizer Bars */
.audio-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.audio-bars .bar {
  width: 3px;
  background-color: #fbbf24;
  border-radius: 2px;
  animation: equalize 1s ease-in-out infinite alternate;
}

.audio-bars .bar-1 { height: 40%; animation-delay: 0.1s; }
.audio-bars .bar-2 { height: 90%; animation-delay: 0.3s; }
.audio-bars .bar-3 { height: 60%; animation-delay: 0.2s; }

@keyframes equalize {
  0% { height: 25%; }
  50% { height: 100%; }
  100% { height: 40%; }
}

/* Floating Cartoon Particles (Restrained opacity, no harsh shadows) */
.floating-particle {
  position: absolute;
  pointer-events: none;
  opacity: 0.18;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
  will-change: transform;
}

.p-coin-1 {
  top: 15%;
  left: 8%;
  animation: floatSlow 7s ease-in-out infinite;
}

.p-coin-2 {
  top: 45%;
  right: 10%;
  animation: floatSlow 8.5s ease-in-out infinite reverse;
}

.p-leaf-1 {
  top: 70%;
  left: 12%;
  animation: floatSlow 9s ease-in-out infinite 1s;
}

.p-leaf-2 {
  top: 30%;
  right: 5%;
  animation: floatSlow 10s ease-in-out infinite 2s;
}

.p-paw-1 {
  top: 85%;
  right: 15%;
  animation: floatSlow 8s ease-in-out infinite 0.5s;
}

.p-arrow-1 {
  top: 22%;
  left: 85%;
  animation: floatSlow 11s ease-in-out infinite 1.5s;
}

@keyframes floatSlow {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(8deg);
  }
}

@keyframes bounceSubtle {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

.animate-bounce-subtle {
  animation: bounceSubtle 3s ease-in-out infinite;
}

/* Scroll Reveal & Staggered In-Animations */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

#hero [data-reveal],
[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

.stagger-1 { transition-delay: 0.08s; }
.stagger-2 { transition-delay: 0.16s; }
.stagger-3 { transition-delay: 0.24s; }
.stagger-4 { transition-delay: 0.32s; }
.stagger-5 { transition-delay: 0.4s; }

/* Enhanced In-Animations */
@keyframes heroFadeInUp {
  0% {
    opacity: 0;
    transform: translateY(28px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes scaleInPop {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes drawerSlideDown {
  0% {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.animate-hero-fade {
  animation: heroFadeInUp 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-scale-pop {
  animation: scaleInPop 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.mobile-drawer-open {
  display: block !important;
  animation: drawerSlideDown 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

/* Card hover glow accent */
.card-hover-fx {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.card-hover-fx:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.35);
  box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.7), 0 0 20px rgba(245, 158, 11, 0.08);
}

/* Dialog / Modal Styling */
dialog.den-modal[open] {
  opacity: 1;
  pointer-events: auto;
}

dialog.den-modal[open] #denDialogCard {
  transform: scale(1);
}

/* Toast Notifications */
.toast-msg {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border: 2px solid #f59e0b;
  border-radius: 16px;
  padding: 0.75rem 1.25rem;
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 4px 4px 0px #0f172a;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  pointer-events: auto;
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast-msg.toast-fadeout {
  animation: toastSlideOut 0.25s ease forwards;
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toastSlideOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-10px); }
}

/* Accessible Focus States */
:focus-visible {
  outline: 2px solid #fbbf24;
  outline-offset: 3px;
}

/* Section scroll offset for fixed header */
section {
  scroll-margin-top: 5.5rem;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
  .marquee-track {
    animation: none;
  }
  .floating-particle {
    display: none;
  }
}
