/* ================================
   KINGDOM LIFE EMBASSY — WORDPRESS THEME
   Tailwind CDN handles utilities; this file provides custom components
   ================================ */

/* ---- Base ---- */
html { scroll-behavior: smooth; }
body {
  font-family: Inter, system-ui, sans-serif;
  color: #1a1a1a;
  background-color: #E8E6E1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- Container ---- */
.container-section {
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  max-width: 1200px;
  padding-left: 1rem;
  padding-right: 1rem;
}
@media (min-width: 640px) {
  .container-section { padding-left: 1.5rem; padding-right: 1.5rem; }
}
@media (min-width: 1024px) {
  .container-section { padding-left: 2rem; padding-right: 2rem; }
}

/* ---- Buttons ---- */
.btn-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background-color: #0c1b2a;
  padding: 0.875rem 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  color: #fff;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 20px rgba(42,90,122,0.4), 0 0 40px rgba(12,27,42,0.2), 0 4px 16px rgba(12,27,42,0.3);
}
.btn-primary:hover {
  transform: scale(1.03);
  box-shadow: 0 0 30px rgba(42,90,122,0.6), 0 0 60px rgba(12,27,42,0.4), 0 0 100px rgba(26,58,82,0.2), 0 6px 24px rgba(12,27,42,0.4);
  animation: glow-pulse 2s ease-in-out infinite;
}
.btn-outline {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 1px solid #fff;
  background-color: transparent;
  padding: 0.875rem 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  color: #fff;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 15px rgba(42,90,122,0.3), 0 0 30px rgba(12,27,42,0.15), inset 0 0 15px rgba(42,90,122,0.05);
}
.btn-outline:hover {
  background-color: #fff;
  color: #0c1b2a;
  box-shadow: 0 0 30px rgba(42,90,122,0.5), 0 0 60px rgba(12,27,42,0.3), 0 0 100px rgba(26,58,82,0.15);
  animation: glow-pulse 2s ease-in-out infinite;
}

/* ---- Labels & Headings ---- */
.label-tag {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #2a5a7a;
}
.heading-section {
  font-weight: 700;
  font-size: clamp(36px, 5vw, 72px);
  letter-spacing: -0.03em;
  line-height: 1;
}
.heading-subsection {
  font-weight: 700;
  font-size: clamp(28px, 3.5vw, 48px);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

/* ---- Cards ---- */
.card-base {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background-color: rgba(221, 218, 212, 0.8);
  padding: 2rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(20px) saturate(1.1);
  -webkit-backdrop-filter: blur(20px) saturate(1.1);
  box-shadow: 0 4px 24px rgba(0,0,0,0.08), 0 0 30px rgba(42,90,122,0.08), inset 0 1px rgba(255,255,255,0.15);
}
.card-base::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.2px;
  background: linear-gradient(135deg, rgba(42,90,122,0.3), rgba(12,27,42,0.1), rgba(42,90,122,0.2));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.card-base:hover {
  transform: translateY(-0.25rem);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 0 40px rgba(42,90,122,0.15), 0 0 80px rgba(12,27,42,0.1), inset 0 1px rgba(255,255,255,0.2);
}

/* ---- Frosted Glass ---- */
.frosted-glass {
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  background: rgba(12, 27, 42, 0.55);
  border: 1px solid rgba(42, 90, 122, 0.25);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3), 0 0 40px rgba(42,90,122,0.1), inset 0 1px rgba(255,255,255,0.08);
}
.player-glass {
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  background: rgba(12, 27, 42, 0.55);
  border: 1px solid rgba(42, 90, 122, 0.25);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3), 0 0 40px rgba(42,90,122,0.1), inset 0 1px rgba(255,255,255,0.08);
}
.frosted-glass-light {
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(20px) saturate(1.1);
  -webkit-backdrop-filter: blur(20px) saturate(1.1);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(42, 90, 122, 0.2);
  box-shadow: 0 4px 24px rgba(0,0,0,0.15), 0 0 30px rgba(42,90,122,0.08), inset 0 1px rgba(255,255,255,0.1);
}
.frosted-glass-light::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.2px;
  background: linear-gradient(135deg, rgba(42,90,122,0.25), rgba(255,255,255,0.05), rgba(42,90,122,0.15));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ---- Form ---- */
.form-frosted {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 2rem;
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  background: rgba(12, 27, 42, 0.45);
  border: 1px solid rgba(42, 90, 122, 0.25);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2), 0 0 40px rgba(42,90,122,0.1), inset 0 1px rgba(255,255,255,0.08);
}
.input-field {
  position: relative;
  width: 100%;
  border-radius: calc(0.75rem + 4px);
  border: 1px solid rgba(42, 90, 122, 0.3);
  background-color: rgba(255, 255, 255, 0.9);
  padding: 0.875rem 18px;
  font-size: 1rem;
  color: #1a1a1a;
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04), inset 0 0 0 rgba(42,90,122,0);
}
.input-field::placeholder { color: rgba(107, 101, 96, 0.5); }
.input-field:focus {
  border-color: #2a5a7a;
  box-shadow: 0 0 0 3px rgba(42,90,122,0.15), 0 0 20px rgba(42,90,122,0.2), 0 4px 12px rgba(0,0,0,0.08);
}

/* ---- Text Glow ---- */
.text-glow {
  text-shadow: 0 0 10px rgba(42,90,122,0.5), 0 0 30px rgba(12,27,42,0.4), 0 0 60px rgba(26,58,82,0.2);
}
.border-glow {
  box-shadow: 0 0 15px rgba(42,90,122,0.3), 0 0 30px rgba(12,27,42,0.2), inset 0 0 20px rgba(42,90,122,0.05);
}

/* ---- Gradients ---- */
.bg-gradient-deep {
  background: linear-gradient(135deg, #16324d, #0c1b2a 40%, #071521);
}
.bg-gradient-ocean {
  background: linear-gradient(180deg, #1a3a52, #0c1b2a 60%, #071521);
}
.bg-gradient-radial-deep {
  background: radial-gradient(ellipse at 30% 20%, #204a6e, #16324d 30%, #0c1b2a 70%, #071521);
}

/* ---- Frosted Texture Overlay ---- */
.frosted-texture { position: relative; }
.frosted-texture::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.025;
  pointer-events: none;
  mix-blend-mode: overlay;
}

/* ---- Animations ---- */
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 30px rgba(42,90,122,0.4), 0 0 60px rgba(12,27,42,0.25), 0 6px 24px rgba(12,27,42,0.3); }
  50% { box-shadow: 0 0 50px rgba(42,90,122,0.7), 0 0 100px rgba(12,27,42,0.45), 0 0 150px rgba(26,58,82,0.25), 0 8px 32px rgba(12,27,42,0.35); }
}
@keyframes card-glow-pulse {
  0%, 100% { box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 0 40px rgba(42,90,122,0.12), 0 0 80px rgba(12,27,42,0.08), inset 0 1px rgba(255,255,255,0.2); }
  50% { box-shadow: 0 12px 40px rgba(0,0,0,0.16), 0 0 60px rgba(42,90,122,0.25), 0 0 120px rgba(12,27,42,0.15), 0 0 180px rgba(26,58,82,0.08), inset 0 1px rgba(255,255,255,0.25); }
}
@keyframes mesh-orb-1 {
  0% { transform: translate(0) scale(1); }
  100% { transform: translate(30%, 20%) scale(1.1); }
}
@keyframes mesh-orb-2 {
  0% { transform: translate(0) scale(1); }
  100% { transform: translate(-20%, 30%) scale(1.15); }
}
@keyframes mesh-orb-3 {
  0% { transform: translate(0) scale(1); }
  100% { transform: translate(20%, -25%) scale(1.05); }
}
@keyframes bounce-arrow {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}
@keyframes glow-pulse-dark {
  0%, 100% { box-shadow: 0 8px 32px rgba(0,0,0,0.3), 0 0 40px rgba(42,90,122,0.15); }
  50% { box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 60px rgba(42,90,122,0.3), 0 0 100px rgba(12,27,42,0.2); }
}
@keyframes timeline-glow {
  0%, 100% { opacity: 0.6; box-shadow: 0 0 6px rgba(42,90,122,0.5), 0 0 12px rgba(42,90,122,0.3); }
  50% { opacity: 1; box-shadow: 0 0 12px rgba(42,90,122,0.9), 0 0 24px rgba(42,90,122,0.6), 0 0 48px rgba(26,58,82,0.3); }
}
@keyframes dot-pop {
  0%, 100% { transform: scale(1); box-shadow: 0 0 8px rgba(42,90,122,0.8), 0 0 16px rgba(42,90,122,0.5), 0 0 32px rgba(26,58,82,0.3); }
  50% { transform: scale(1.4); box-shadow: 0 0 12px rgba(42,90,122,1), 0 0 24px rgba(42,90,122,0.8), 0 0 48px rgba(26,58,82,0.5), 0 0 80px rgba(42,90,122,0.2); }
}

.animate-mesh-orb-1 { animation: mesh-orb-1 25s linear infinite alternate; }
.animate-mesh-orb-2 { animation: mesh-orb-2 30s linear infinite alternate; }
.animate-mesh-orb-3 { animation: mesh-orb-3 20s linear infinite alternate; }
.animate-bounce-arrow { animation: bounce-arrow 2s ease-in-out infinite; }
.glow-pulse-dark { animation: glow-pulse-dark 3s ease-in-out infinite; }

/* ---- Scroll Reveal (progressive enhancement) ---- */
[data-reveal] {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1), transform 0.7s cubic-bezier(0.16,1,0.3,1);
}
[data-reveal].kle-reveal-hidden {
  opacity: 0;
  transform: translateY(30px);
}
[data-reveal].kle-reveal-hidden.kle-reveal-visible {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal-variant="scaleIn"].kle-reveal-hidden { opacity: 0; transform: scale(0.92); }
[data-reveal-variant="scaleIn"].kle-reveal-hidden.kle-reveal-visible { opacity: 1; transform: scale(1); }
[data-reveal-variant="slideLeft"].kle-reveal-hidden { opacity: 0; transform: translateX(-60px); }
[data-reveal-variant="slideLeft"].kle-reveal-hidden.kle-reveal-visible { opacity: 1; transform: translateX(0); }
[data-reveal-variant="slideRight"].kle-reveal-hidden { opacity: 0; transform: translateX(60px); }
[data-reveal-variant="slideRight"].kle-reveal-hidden.kle-reveal-visible { opacity: 1; transform: translateX(0); }

/* ---- WordPress Admin Bar Fix ---- */
.admin-bar #kleTopBar { top: 32px; }
.admin-bar #kleMainNav { top: 32px; }
@media (min-width: 768px) { .admin-bar #kleMainNav { top: 72px; } }
@media (max-width: 782px) { .admin-bar #kleTopBar { top: 46px; } .admin-bar #kleMainNav { top: 46px; } }

/* ---- Mobile Menu States ---- */
#kleMobileMenu.open { transform: translateX(0) !important; }
#kleFooterDropdown.open { max-height: 500px !important; opacity: 1 !important; }

/* ---- Scrolled Nav States ---- */
#kleTopBar.scrolled {
  background: rgba(12, 27, 42, 0.95) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
#kleMainNav.scrolled {
  background: #fff !important;
  box-shadow: 0 1px 0 rgba(0,0,0,0.05) !important;
}
#kleMainNav.scrolled .text-white,
#kleMainNav.scrolled #kleHamburger { color: #1a1a1a; }

/* ---- Print ---- */
@media print { #kleTopBar, #kleMainNav, #kleMobileMenu, footer { display: none !important; } }
