/* ===== KINDER LIMBS CUSTOM STYLES ===== */

:root {
  --font-display: 'Sour Gummy', 'Cairo', sans-serif;
  --font-body: 'Sour Gummy', 'Cairo', sans-serif;
  --font-ar: 'Cairo', 'Sour Gummy', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: #1c1917;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  font-family: var(--font-body);
  font-weight: 400;
  position: relative;
  transition: background-image 0.4s ease-in-out;
}

html[lang="ar"] body {
  font-family: var(--font-ar);
}

.font-display,
h1,
h2,
h3 {
  font-family: var(--font-display);
}

html[lang="ar"] .font-display,
html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3 {
  font-family: var(--font-ar);
}

/* Soft atmospheric scrim over page backgrounds to prevent text/illustration collisions */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(28, 25, 23, 0.72) 0%,
    rgba(28, 25, 23, 0.62) 50%,
    rgba(28, 25, 23, 0.82) 100%
  );
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 0;
  display: none;
  pointer-events: none;
}

body.has-background::before {
  display: block;
}

.content-wrapper {
  position: relative;
  z-index: 1;
}

/* ===== NAVIGATION ACTIVE STATES ===== */
.nav-pill {
  color: #b45309;
  font-weight: 600;
}

.nav-pill:hover {
  background-color: #fef3c7;
  color: #92400e;
}

.nav-pill.active-link {
  background-color: #f59e0b;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.25);
}

.lang-btn {
  color: #78716c;
}

.lang-btn:hover {
  color: #92400e;
}

.lang-btn.active-link {
  background-color: #d97706;
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(217, 119, 6, 0.25);
}

footer {
  position: relative;
  z-index: 10;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 18px rgba(217, 119, 6, 0.35);
  }
  50% {
    box-shadow: 0 0 34px rgba(245, 158, 11, 0.65);
  }
}

@keyframes ig-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(217, 119, 6, 0);
  }
}

.hero-fade-in {
  animation: fadeInUp 0.8s ease-out forwards;
}

.hero-fade-in-delay {
  animation: fadeInUp 0.8s ease-out 0.2s forwards;
  opacity: 0;
}

.hero-fade-in-delay-2 {
  animation: fadeInUp 0.8s ease-out 0.4s forwards;
  opacity: 0;
}

.book-float {
  animation: float 4.5s ease-in-out infinite;
}

.book-3d {
  perspective: 900px;
}

.book-3d img {
  transition: transform 0.5s ease;
}

.book-3d:hover img {
  transform: rotateY(-8deg) scale(1.03);
}

.cta-glow {
  animation: pulse-glow 2.5s ease-in-out infinite;
}

.ig-cta {
  animation: ig-pulse 2.5s ease-in-out infinite;
}

.section-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.section-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.comic-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.comic-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.22);
}

/* ===== FORM & INTERACTIVE INPUTS ===== */
.contact-form-input {
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.contact-form-input:focus {
  border-color: #d97706;
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.16);
}

.form-success {
  animation: fadeInUp 0.5s ease-out;
}

/* ===== COLORING WORKSPACE POLISH ===== */
.paint-color-btn.active-swatch {
  outline: 3px solid #d97706;
  outline-offset: 2px;
  transform: scale(1.12);
}

.paint-tool-btn.active-tool {
  background-color: #fef3c7;
  color: #b45309;
  box-shadow: inset 0 0 0 1px #fcd34d;
}

/* Prevent accidental image drag/save on comic/coloring assets */
.no-save-media {
  -webkit-user-drag: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* Mobile fixed background compatibility */
@media (max-width: 768px) {
  body {
    background-attachment: scroll;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
