/* ═══════════════════════════════════════════════════════════
   J.P. WASTE MANAGEMENT & RECYCLING LTD  ·  style.css
   Light professional theme — effects & animations only.
   Layout handled by Tailwind CSS.
   ═══════════════════════════════════════════════════════════ */

/* ─── Fonts ────────────────────────────────────────────────── */
body { font-family: 'Inter', system-ui, sans-serif; }

/* ─── Loader ─────────────────────────────────────────────── */
#loader { transition: opacity 0.5s ease, visibility 0.5s; }
#loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.loader-ring {
  animation: ring-spin 1.4s linear infinite;
  transform-origin: center;
}
@keyframes ring-spin { to { transform: rotate(360deg); } }

.loader-bar-fill {
  animation: bar-grow 1.5s cubic-bezier(0.4,0,0.2,1) forwards;
}
@keyframes bar-grow { from { width: 0; } to { width: 100%; } }

/* ─── Navbar scrolled ────────────────────────────────────── */
#navbar {
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.nav-scrolled {
  background: rgba(255,255,255,0.97) !important;
  box-shadow: 0 1px 20px rgba(0,0,0,0.08);
}

/* ─── Mobile Menu ────────────────────────────────────────── */
#navMenu { transition: opacity 0.25s ease, visibility 0.25s; }
#navMenu.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
#navMenu:not(.hidden) { opacity: 1; visibility: visible; }

/* ─── Scroll Reveal ──────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.delay-1 { transition-delay: 0.1s; }
.reveal.delay-2 { transition-delay: 0.2s; }
.reveal.delay-3 { transition-delay: 0.3s; }
.reveal.delay-4 { transition-delay: 0.4s; }
.reveal.visible { opacity: 1; transform: none; }

/* ─── Ticker ─────────────────────────────────────────────── */
.ticker-track {
  animation: ticker 32s linear infinite;
  display: inline-flex;
  white-space: nowrap;
}
@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ─── Progress Bars ──────────────────────────────────────── */
.prog-fill {
  height: 100%;
  background: linear-gradient(90deg, #15803d, #22c55e);
  border-radius: 4px;
  width: 0;
  transition: width 1.8s cubic-bezier(0.4,0,0.2,1) 0.2s;
}

/* ─── Service card accent line ───────────────────────────── */
.svc-line {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #15803d, #22c55e);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
  border-radius: 2px 2px 0 0;
}
.svc-card:hover .svc-line { transform: scaleX(1); }

/* ─── Hero gradient text ─────────────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, #15803d, #22c55e);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ─── Hero subtle pattern background ────────────────────── */
.hero-pattern {
  background-image:
    radial-gradient(circle at 1px 1px, rgba(21,128,61,0.06) 1px, transparent 0);
  background-size: 32px 32px;
}

/* ─── Stat card hover lift ───────────────────────────────── */
.stat-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(21,128,61,0.12);
}

/* ─── Back to Top ────────────────────────────────────────── */
#backToTop {
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.3s ease, visibility 0.3s, transform 0.3s ease;
}
#backToTop.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ─── Number badge pulse ─────────────────────────────────── */
@keyframes badge-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(21,128,61,0.3); }
  50%     { box-shadow: 0 0 0 8px rgba(21,128,61,0); }
}
.badge-pulse { animation: badge-pulse 3s ease infinite; }

/* ─── Form focus ring ────────────────────────────────────── */
.form-input:focus {
  outline: none;
  border-color: #15803d;
  box-shadow: 0 0 0 3px rgba(21,128,61,0.12);
}

/* ─── Accreditation logo filter ──────────────────────────── */
.accred-logo {
  filter: grayscale(100%) opacity(0.5);
  transition: filter 0.3s ease;
}
.accred-logo:hover { filter: grayscale(0%) opacity(1); }

/* ─── Form success ───────────────────────────────────────── */
#formSuccess:not(.hidden) { display: flex; }

/* ─── Custom select arrow ────────────────────────────────── */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
}

/* ─── Section divider line ───────────────────────────────── */
.section-rule {
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, #15803d, #22c55e);
  border-radius: 2px;
}
