/* SundatoonPod — Playful Cartoon & Modern Sunda Theme */
:root {
  --ink: #1b1f3b;
  --cream: #fffdf6;
  --cream-warm: #fef3d9;
  --teal: #0f9d8a;
  --teal-dark: #0a7a6b;
  --mango: #ffb703;
  --coral: #ff595e;
  --sky: #4cc9f0;
  --lilac: #d8b4fe;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background-color: var(--cream);
  color: var(--ink);
  overflow-x: hidden;
}

.font-display {
  font-family: 'Fredoka', system-ui, sans-serif;
}

/* Subtle Sunda Kawung / Cloud dot pattern */
.bg-sunda-dots {
  background-image: radial-gradient(rgba(27, 31, 59, 0.08) 1.5px, transparent 1.5px);
  background-size: 24px 24px;
}

.bg-mega-pattern {
  background-color: var(--cream-warm);
  background-image:
    radial-gradient(circle at 20px 20px, rgba(15, 157, 138, 0.1) 2px, transparent 2.5px),
    radial-gradient(circle at 60px 60px, rgba(255, 183, 3, 0.14) 2px, transparent 2.5px);
  background-size: 80px 80px;
}

/* Cartoon Neo-Brutalist Borders & Tactile Offset Shadows */
.toon-card {
  border: 2.5px solid var(--ink);
  box-shadow: 5px 5px 0px var(--ink);
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

.toon-card-hover:hover {
  transform: translate(-2px, -3px);
  box-shadow: 7px 8px 0px var(--ink);
}

.toon-btn {
  border: 2.5px solid var(--ink);
  box-shadow: 4px 4px 0px var(--ink);
  transition: transform 0.14s ease, box-shadow 0.14s ease, background-color 0.14s ease;
}

.toon-btn:hover {
  transform: translate(-1.5px, -2px);
  box-shadow: 5.5px 6px 0px var(--ink);
}

.toon-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px var(--ink);
}

.toon-pill {
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0px var(--ink);
}

.toon-shadow-lg {
  border: 3px solid var(--ink);
  box-shadow: 8px 8px 0px var(--ink);
}

/* Floating cartoon sticker animations */
@keyframes floatSlow {
  0%, 100% {
    transform: translateY(0px) rotate(-2deg);
  }
  50% {
    transform: translateY(-7px) rotate(1deg);
  }
}

@keyframes floatSlowAlt {
  0%, 100% {
    transform: translateY(0px) rotate(2deg);
  }
  50% {
    transform: translateY(-6px) rotate(-1.5deg);
  }
}

.animate-float {
  animation: floatSlow 4.2s ease-in-out infinite;
}

.animate-float-alt {
  animation: floatSlowAlt 4.8s ease-in-out infinite;
}

/* Equalizer bars for active audio preview */
@keyframes eqBounce {
  0%, 100% {
    transform: scaleY(0.28);
  }
  50% {
    transform: scaleY(1);
  }
}

.eq-bar {
  transform-origin: bottom;
  transition: transform 0.2s ease;
}

.is-playing .eq-bar {
  animation: eqBounce 0.75s ease-in-out infinite;
}

.is-playing .eq-bar:nth-child(2) {
  animation-delay: 0.12s;
  animation-duration: 0.62s;
}
.is-playing .eq-bar:nth-child(3) {
  animation-delay: 0.24s;
  animation-duration: 0.85s;
}
.is-playing .eq-bar:nth-child(4) {
  animation-delay: 0.08s;
  animation-duration: 0.7s;
}
.is-playing .eq-bar:nth-child(5) {
  animation-delay: 0.2s;
  animation-duration: 0.58s;
}

/* Custom Range Scrubber */
input[type='range'].toon-range {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

input[type='range'].toon-range::-webkit-slider-runnable-track {
  height: 10px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: #fef3d9;
}

input[type='range'].toon-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -7px;
  border-radius: 50%;
  background: var(--coral);
  border: 2.5px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
}

input[type='range'].toon-range::-moz-range-track {
  height: 10px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: #fef3d9;
}

input[type='range'].toon-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--coral);
  border: 2.5px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
}

/* FAQ Accordion transition */
.faq-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease;
}

.faq-item[data-open='true'] .faq-content {
  grid-template-rows: 1fr;
}

.faq-item[data-open='true'] .faq-chevron {
  transform: rotate(180deg);
}

/* Marquee subtle strip */
@keyframes marqueeScroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marqueeScroll 28s linear infinite;
}

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

/* Focus visibility */
:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .animate-float,
  .animate-float-alt,
  .marquee-track,
  .is-playing .eq-bar {
    animation: none;
  }
}
