/* ==========================================================
   Jist Dedication Social Foundation — style.css
   Production animation & utility layer
   ========================================================== */

/* ── Custom Properties ──────────────────────────────────── */
:root {
  --clr-primary:        #964900;
  --clr-orange:         #F58220;
  --clr-gold:           #C09D25;
  --clr-navy:           #0A1B39;
  --clr-cream:          #FFF8F1;
  --clr-surface:        #F4EDE5;

  /* timing */
  --dur-fast:           150ms;
  --dur-base:           300ms;
  --dur-slow:           600ms;
  --dur-xslow:          900ms;
  --ease-out:           cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring:        cubic-bezier(0.34, 1.56, 0.64, 1);

  /* scroll progress */
  --progress-h:         3px;
}

/* ── 1. Scroll Progress Bar ─────────────────────────────── */
#progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: var(--progress-h);
  width: 0%;
  background: linear-gradient(90deg, var(--clr-primary), var(--clr-orange));
  z-index: 9999;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* ── 2. Animate-on-scroll (AO) system ──────────────────── */
.ao {
  opacity: 0;
  will-change: transform, opacity;
  transition:
    opacity  var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-out);
}

/* directions — initial hidden state */
.ao-fade-up    { transform: translateY(36px); }
.ao-fade-left  { transform: translateX(-40px); }
.ao-fade-right { transform: translateX(40px); }
.ao-scale-in   { transform: scale(0.88); }

/* triggered state */
.ao.visible {
  opacity: 1;
  transform: none;
}

/* stagger delays */
.ao-delay-1 { transition-delay: 0.10s; }
.ao-delay-2 { transition-delay: 0.20s; }
.ao-delay-3 { transition-delay: 0.30s; }
.ao-delay-4 { transition-delay: 0.40s; }
.ao-delay-5 { transition-delay: 0.50s; }

/* ── 3. Hero word stagger ───────────────────────────────── */
@keyframes heroWordIn {
  from {
    opacity: 0;
    transform: translateY(24px) skewY(2deg);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

.hero-word {
  display: inline-block;
  opacity: 0;
  animation: heroWordIn var(--dur-slow) var(--ease-out) forwards;
}

/* ── 4. Number counter shimmer pulse ────────────────────── */
@keyframes countPulse {
  0%, 100% { color: var(--clr-primary); }
  50%       { color: var(--clr-orange); text-shadow: 0 0 20px rgba(245,130,32,.35); }
}

.count-up.animating {
  animation: countPulse 1.6s var(--ease-out) infinite;
}

/* ── 5. Float animation for decorative elements ─────────── */
@keyframes floatY {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33%       { transform: translateY(-18px) rotate(1.5deg); }
  66%       { transform: translateY(-8px) rotate(-1deg); }
}

@keyframes floatX {
  0%, 100% { transform: translateX(0px); }
  50%       { transform: translateX(14px); }
}

.float-anim {
  animation: floatY 7s ease-in-out infinite;
}

.float-anim-2 {
  animation: floatY 9s ease-in-out infinite reverse;
}

.float-anim-3 {
  animation: floatX 11s ease-in-out infinite;
}

/* ── 6. Card hover lift + glow ──────────────────────────── */
.card-lift {
  transition:
    transform var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out);
}

.card-lift:hover {
  transform: translateY(-8px);
  box-shadow:
    0 24px 48px rgba(150, 73, 0, 0.14),
    0 6px 16px rgba(150, 73, 0, 0.08);
}

/* image zoom inside card on hover */
.card-img-zoom {
  overflow: hidden;
}

.card-img-zoom img {
  transform: scale(1);
  transition: transform 0.7s var(--ease-out);
}

.card-lift:hover .card-img-zoom img {
  transform: scale(1.06);
}

/* colored top accent bar on cards */
.card-accent-top::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--clr-primary), var(--clr-orange));
  border-radius: 4px 4px 0 0;
}

/* ── 7. Button ripple + gradient shift ──────────────────── */
@keyframes ripple {
  0%   { transform: scale(0); opacity: 0.4; }
  100% { transform: scale(4); opacity: 0; }
}

.btn-ripple {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.btn-ripple::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: rgba(255,255,255,0.25);
  transform: scale(0);
  border-radius: inherit;
  pointer-events: none;
}

.btn-ripple:active::after {
  animation: ripple 0.5s ease-out forwards;
}

.btn-gradient-shift {
  background-size: 200% 100%;
  background-position: left center;
  transition: background-position var(--dur-slow) var(--ease-out);
}

.btn-gradient-shift:hover {
  background-position: right center;
}

/* ── 8. Gradient text utility ───────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, var(--clr-primary) 0%, var(--clr-orange) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── 9. Blob / organic shape decorative elements ────────── */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
}

.hero-orb-1 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(245,130,32,0.45), transparent 70%);
  top: -120px;
  right: -80px;
}

.hero-orb-2 {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(192,157,37,0.35), transparent 70%);
  bottom: 80px;
  left: -60px;
}

.hero-orb-3 {
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(150,73,0,0.3), transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* ── 10. Nav scroll shrink ──────────────────────────────── */
#main-nav {
  transition:
    padding    var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out),
    border-color var(--dur-base) var(--ease-out);
}

.nav-scrolled {
  box-shadow: 0 2px 20px rgba(10,27,57,0.10) !important;
  border-bottom: 1px solid rgba(150,73,0,0.15);
}

.nav-scrolled .nav-logo {
  height: 40px !important;
}

/* ── 11. Marquee ticker ─────────────────────────────────── */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

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

.marquee-wrap {
  overflow: hidden;
}

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

/* ── 12. Image parallax container ───────────────────────── */
.parallax-img-wrap {
  overflow: hidden;
  position: relative;
}

.parallax-img-wrap img {
  will-change: transform;
  transform: scale(1.1) translateY(0px);
  transition: transform 0s linear;
}

/* ── 13. Testimonial card hover glow ────────────────────── */
.testimonial-card {
  transition:
    transform var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out);
  position: relative;
}

.testimonial-card:hover {
  transform: translateY(-6px);
  box-shadow:
    0 20px 40px rgba(150, 73, 0, 0.12),
    0 0 0 1px rgba(150, 73, 0, 0.06);
}

.testimonial-card .quote-bg {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 5rem;
  line-height: 1;
  color: rgba(150,73,0,0.08);
  font-family: Georgia, serif;
  pointer-events: none;
  user-select: none;
}

/* ── 14. Custom scrollbar ───────────────────────────────── */
::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { background: var(--clr-cream); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--clr-primary), var(--clr-orange));
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background: var(--clr-primary); }

/* Firefox */
* { scrollbar-width: thin; scrollbar-color: var(--clr-primary) var(--clr-cream); }

/* ── 15. Page entrance fade ─────────────────────────────── */
@keyframes pageEntrance {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

body {
  animation: pageEntrance 0.55s var(--ease-out) both;
}

/* ── 16. Divider wave SVG section separator ─────────────── */
.wave-divider {
  display: block;
  width: 100%;
  overflow: hidden;
  line-height: 0;
}

.wave-divider svg {
  width: 100%;
  height: auto;
  display: block;
}

/* ── 17. Skeleton loading shimmer ───────────────────────── */
@keyframes shimmer {
  0%   { background-position: -800px 0; }
  100% { background-position:  800px 0; }
}

.skeleton {
  background: linear-gradient(
    90deg,
    #f0e9e0 25%,
    #faf4ed 37%,
    #f0e9e0 63%
  );
  background-size: 800px 100%;
  animation: shimmer 1.6s linear infinite;
  border-radius: 6px;
}

.skeleton-text { height: 1em; margin: 0.5em 0; }
.skeleton-img  { width: 100%; aspect-ratio: 4/3; }

/* ── 18. Prefers-reduced-motion overrides ───────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .ao {
    opacity: 1 !important;
    transform: none !important;
  }

  .hero-word {
    opacity: 1 !important;
    animation: none !important;
  }

  .float-anim,
  .float-anim-2,
  .float-anim-3 {
    animation: none !important;
  }

  .marquee-track {
    animation: none !important;
  }

  body {
    animation: none !important;
  }
}

/* ── 19. Pulse ring for donate button ───────────────────── */
@keyframes pulseRing {
  0%   { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245,130,32, 0.55); }
  70%  { transform: scale(1);    box-shadow: 0 0 0 14px rgba(245,130,32, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245,130,32, 0); }
}

.btn-pulse {
  animation: pulseRing 2.2s ease-out infinite;
}

.btn-pulse:hover {
  animation-play-state: paused;
}

/* ── 20. Section label pill styles ─────────────────────── */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(150,73,0,0.08);
  color: var(--clr-primary);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 999px;
  border: 1px solid rgba(150,73,0,0.15);
  margin-bottom: 12px;
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--clr-orange);
  flex-shrink: 0;
}

/* ── Gallery overlay hover ──────────────────────────────── */
.gallery-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.gallery-item img {
  transition: transform 0.6s var(--ease-out);
  display: block;
  width: 100%;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(10,27,57,0.85), transparent);
  padding: 20px 16px 14px;
  transform: translateY(100%);
  transition: transform 0.38s var(--ease-out);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
}

.gallery-item:hover .gallery-overlay {
  transform: translateY(0);
}

/* ── Decorative dots pattern ────────────────────────────── */
.dot-grid-overlay {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.18) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 1;
}

/* ── CTA decorative circles ─────────────────────────────── */
.cta-deco-circle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  pointer-events: none;
}

/* ── Large quote decorative ─────────────────────────────── */
.deco-quote {
  position: absolute;
  font-size: 12rem;
  line-height: 1;
  color: rgba(245,130,32,0.08);
  font-family: Georgia, serif;
  pointer-events: none;
  user-select: none;
  top: -30px;
  left: -10px;
}

/* ── Smooth scroll ─────────────────────────────────────── */
html {
  scroll-behavior: smooth;
}

/* ── Career card badge ──────────────────────────────────── */
.career-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(150,73,0,0.1);
  color: var(--clr-primary);
}

/* ── Footer social icons ────────────────────────────────── */
.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  color: rgba(249,243,235,0.7);
  transition:
    background var(--dur-base) var(--ease-out),
    color var(--dur-base) var(--ease-out),
    transform var(--dur-base) var(--ease-out);
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
}

.social-icon:hover {
  background: var(--clr-orange);
  color: #fff;
  transform: translateY(-3px);
}

/* ── Newsletter input ───────────────────────────────────── */
.newsletter-input {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  border-radius: 8px 0 0 8px;
  padding: 10px 16px;
  outline: none;
  transition: border-color var(--dur-base);
  min-height: 44px;
}

.newsletter-input::placeholder { color: rgba(255,255,255,0.45); }
.newsletter-input:focus { border-color: var(--clr-orange); }

.newsletter-btn {
  background: var(--clr-orange);
  color: #fff;
  border: none;
  border-radius: 0 8px 8px 0;
  padding: 10px 20px;
  font-weight: 700;
  cursor: pointer;
  min-height: 44px;
  transition: background var(--dur-base);
}

.newsletter-btn:hover { background: var(--clr-primary); }

/* ── Missing global utility classes ────────────────────── */
/* These were inline-only in index.html — now global so ALL pages work */
.action-gradient {
  background: linear-gradient(135deg, #964900 0%, #f58220 100%);
}

.editorial-shadow {
  box-shadow: 0px 24px 48px rgba(30, 27, 23, 0.06);
}

.ambient-shadow {
  box-shadow: 0px 24px 48px rgba(30, 27, 23, 0.08);
}

/* ── Hero carousel ──────────────────────────────────────── */
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
  pointer-events: none;
}
.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.35s var(--ease-out);
  flex-shrink: 0;
}
.hero-dot.active {
  background: var(--clr-orange);
  width: 28px;
  border-radius: 4px;
}
.hero-dot:hover { background: rgba(255, 255, 255, 0.75); }
.hero-dot.active:hover { background: var(--clr-orange); }

/* ── Dark testimonial cards (Real Change section) ────────── */
.testimonial-dark {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  transition:
    background var(--dur-base) var(--ease-out),
    transform var(--dur-base) var(--ease-out);
}
.testimonial-dark:hover {
  background: rgba(255, 255, 255, 0.09);
  transform: translateY(-6px);
}
