/* ==========================================================================
   SPATIAL UI / GLASSMORPHISM AESTHETIC OVERRIDE
   ========================================================================== */
:root {
  /* Translucent base colors for glass effect */
  --color-base: rgba(255, 255, 255, 0.4);
  --color-surface: rgba(255, 255, 255, 0.35);
  --color-surface-hover: rgba(255, 255, 255, 0.5);
  --color-surface-dark: rgba(20, 20, 20, 0.45);
  
  /* Text adjustment for glass over light backgrounds */
  --color-text-primary: #1c1c1e;
  --color-text-secondary: #48484a;
  --color-text-inverse: #ffffff;
  
  /* White borders for the frosted glass edge */
  --color-border: rgba(255, 255, 255, 0.7);
  --color-border-dark: rgba(255, 255, 255, 0.3);
  
  /* Softer, wider shadows for the floating spatial look */
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.12);
  
  /* Maximize border radii for the 'pill' and 'panel' aesthetic */
  --radius-sm: 16px;
  --radius-md: 24px;
  --radius-lg: 32px;
  --radius-xl: 48px;
}

/* 
  Provide a lush, blurred, "living room" style background 
  to mimic the AR/Spatial computing environment shown in references.
*/
body {
  background-color: #f1f5ee;
  background-image: 
    radial-gradient(circle at 15% 35%, rgba(135, 185, 135, 0.3) 0%, transparent 30%),
    radial-gradient(circle at 85% 65%, rgba(135, 185, 135, 0.3) 0%, transparent 30%),
    radial-gradient(circle at 75% 25%, rgba(135, 185, 135, 0.15) 0%, transparent 20%),
    url('../assets/illustrations/wave1.svg'),
    url('../assets/illustrations/wave2.svg');
  background-attachment: fixed, fixed, fixed, scroll, scroll;
  background-position: top left, top left, top left, bottom left, bottom left;
  background-size: 100% 100%, 100% 100%, 100% 100%, 100% auto, 100% auto;
  background-repeat: no-repeat;
}

/* Hide original background shapes to clean up the environment */
.mesh-gradient-bg {
  display: none !important;
}

/* Reset all section backgrounds so the environment shows through */
.section {
  background: transparent !important;
  border: none !important;
}

/* ==========================================================================
   GLASSMORPHISM CORE COMPONENTS
   ========================================================================== */

/* Apply heavy blur and glass borders to all major containers */
.card, .compare-card, .pricing-card, .header-nav, .hero-pill, 
.industry-card, .portfolio-item, .process-step, .faq-item, 
.contact-card, .btn, .trust-bar-item, .maintenance-pricing-card, .maintenance-note-card {
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  background: var(--color-base) !important;
}

/* Refine the Navigation Bar */
.header-nav {
  background: rgba(255, 255, 255, 0.25) !important;
  border-radius: 100px; /* Floating pill header */
  margin: 1.5rem auto;
  max-width: var(--container-max-width);
  width: calc(100% - 3rem);
  left: 50%;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
              background 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.header-nav.scrolled {
  background: rgba(255, 255, 255, 0.45) !important;
  box-shadow: var(--shadow-lg);
  transform: translateX(-50%) translateY(5px);
}

.header-nav.nav-hidden {
  transform: translateX(-50%) translateY(-150%) !important;
  opacity: 0 !important;
  pointer-events: none;
}

.nav-container {
  padding: 0 1.5rem;
}

/* Refine Buttons */
.btn {
  border-radius: 100px; /* Pill shape buttons */
  font-weight: 600;
  letter-spacing: 0.02em;
}

.btn-primary {
  background: #253a29 !important; /* Elegant dark forest green */
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: white !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.btn-primary:hover {
  background: #1c2b1e !important;
  transform: scale(1.02);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.5) !important;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.7) !important;
  transform: scale(1.02);
}

/* Hero Section adjustments */
.hero-pill {
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.4) !important;
}

.trust-bar-item {
  border-radius: 100px;
  padding: 0.5rem 1rem;
  background: rgba(245, 250, 243, 0.85) !important;
  border: 1px solid rgba(255,255,255, 0.6) !important;
}

/* Tags / Badges */
.section-tag, .portfolio-tag, .timeline-badge, .popular-badge, .best-value-badge {
  background: rgba(255, 255, 255, 0.6) !important;
  color: #0b5025 !important; /* Elegant dark green theme */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  border-radius: 100px;
}

/* Fix dark section overrides (Pricing, etc) to use light glass */
.pricing-section h2, .pricing-section .section-description, .pricing-note {
  color: var(--color-text-primary) !important;
  -webkit-text-fill-color: var(--color-text-primary) !important;
}

.pricing-card {
  background: rgba(255, 255, 255, 0.4) !important;
  color: var(--color-text-primary) !important;
}

.pricing-card-popular {
  background: rgba(255, 255, 255, 0.55) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.9) !important;
  transform: scale(1.02);
}

.pricing-card p, .pricing-features li {
  color: var(--color-text-secondary) !important;
}

.pricing-features strong {
  color: var(--color-text-primary) !important;
}

/* Process step circle & cards */
.process-grid::before {
  display: none !important; /* Hide old connecting line */
}

.process-step {
  background: rgba(255, 255, 255, 0.5) !important;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  height: 100%;
}

.process-step:hover {
  transform: translateY(-10px) !important;
  box-shadow: var(--shadow-md);
  background: rgba(255, 255, 255, 0.7) !important;
}

.process-number {
  background: #f1f5ee !important;
  color: #0b5025 !important;
  border: 2px dashed rgba(11, 80, 37, 0.3) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 16px rgba(11, 80, 37, 0.1) !important;
  width: 60px !important;
  height: 60px !important;
  font-size: 1.5rem !important;
}

/* Cards Hover Effects */
.card:hover, .pricing-card:hover, .portfolio-item:hover, .industry-card:hover, .compare-card:hover {
  background: rgba(255, 255, 255, 0.5) !important;
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-lg);
}

/* Compare Cards */
.compare-card.ours {
  background: rgba(255, 255, 255, 0.5) !important;
  color: var(--color-text-primary) !important;
}

.compare-card.ours p, .compare-list.ours li {
  color: var(--color-text-secondary) !important;
}

/* Device Frames / Image containers inside glass */
.device-frame {
  background: transparent !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;
}
.device-frame::before {
  opacity: 0.7;
}

/* Domain banner */
.domain-banner {
  background: rgba(255, 255, 255, 0.4) !important;
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
}
.domain-banner h2, .domain-banner p, .domain-content h2, .domain-content p {
  color: var(--color-text-primary) !important;
}

/* Gallery images */
.gallery-item {
  background: transparent !important;
  border: 4px solid rgba(255, 255, 255, 0.4);
}

/* ==========================================================================
   AGGRESSIVE TEXT CONTRAST OVERRIDES
   ========================================================================== */
/* Override any inline white text styles */
[style*="color: white"], 
[style*="color: #fff"], 
[style*="color: #FFFFFF"] {
  color: var(--color-text-primary) !important;
}

[style*="color: rgba(255,255,255"] {
  color: var(--color-text-secondary) !important;
}

/* Override text gradients that might fade into the glass */
.text-gradient-light, .text-gradient {
  background: none !important;
  -webkit-text-fill-color: var(--color-text-primary) !important;
  color: var(--color-text-primary) !important;
}

/* Ensure secondary buttons have legible text */
.btn-secondary {
  color: var(--color-text-primary) !important;
}

/* Ensure SVG icons that were white are now dark */
.icon-check, .icon-cross {
  stroke: var(--color-text-primary) !important;
}

/* Override contact icons from blue to green */
.contact-highlight-icon {
  background: rgba(37, 211, 102, 0.15) !important;
  color: #0b5025 !important;
}

.contact-highlight-text h4 {
  color: #0b5025 !important;
}

/* ==========================================================================
   WHATSAPP BUTTON FIX
   ========================================================================== */
/* The WhatsApp buttons were losing contrast with white text on glass */
.btn-whatsapp {
  background: rgba(37, 211, 102, 0.15) !important;
  color: #0b5025 !important;
  border-color: rgba(37, 211, 102, 0.4) !important;
}

.btn-whatsapp svg {
  stroke: #0b5025 !important;
}

.btn-whatsapp:hover {
  background: rgba(37, 211, 102, 0.25) !important;
  transform: scale(1.02);
}

/* ==========================================================================
   PREMIUM SPATIAL REVEAL ANIMATIONS
   ========================================================================== */
/* Overriding standard reveal with a blur, scale, and 3D depth effect */
.reveal {
  opacity: 0 !important;
  transform: translateY(40px) scale(0.92) translateZ(-50px) rotateX(8deg) !important;
  filter: blur(12px);
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), 
              filter 1.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  will-change: opacity, transform, filter;
  transform-style: preserve-3d;
  perspective: 1200px;
}

.reveal.active {
  opacity: 1 !important;
  transform: translateY(0) scale(1) translateZ(0) rotateX(0deg) !important;
  filter: blur(0);
}

/* ==========================================================================
   ORGANIC HAND-DRAWN ELEMENTS
   ========================================================================== */
.underline-green {
  position: relative;
  display: inline-block;
  z-index: 1;
}

.underline-green::after {
  content: "";
  position: absolute;
  left: -5%;
  bottom: -2%;
  width: 110%;
  height: 25px;
  z-index: -1;
  background-image: url('../assets/illustrations/underline.svg');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  pointer-events: none;
}

/* Ensure primary buttons stay white despite aggressive overrides */
.btn-primary, .btn-primary[style] {
  color: white !important;
  -webkit-text-fill-color: white !important;
}

/* ==========================================================================
   FLOATING EMOJIS IN HERO
   ========================================================================== */
.floating-emoji-container {
  position: absolute;
  z-index: 1; 
}

.emoji-1 {
  top: 45%;
  left: 6%;
}

.emoji-2 {
  top: 15%;
  right: 12%;
}

.emoji-3 {
  bottom: 15%;
  right: 8%;
}

.floating-emoji {
  width: 170px;
  height: auto;
  filter: drop-shadow(0 20px 30px rgba(0,0,0,0.15));
}

.emoji-1 .floating-emoji {
  animation: float-emoji-1 6s ease-in-out infinite;
}

.emoji-2 .floating-emoji {
  width: 140px;
  animation: float-emoji-2 7s ease-in-out infinite;
}

.emoji-3 .floating-emoji {
  width: 150px;
  animation: float-emoji-3 5s ease-in-out infinite;
}

@keyframes float-emoji-1 {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(6deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

@keyframes float-emoji-2 {
  0% { transform: translateY(0px) rotate(15deg); }
  50% { transform: translateY(-15px) rotate(5deg); }
  100% { transform: translateY(0px) rotate(15deg); }
}

@keyframes float-emoji-3 {
  0% { transform: translateY(0px) rotate(-10deg); }
  50% { transform: translateY(-25px) rotate(0deg); }
  100% { transform: translateY(0px) rotate(-10deg); }
}

@media (max-width: 1300px) {
  .emoji-1 { left: 0%; }
  .emoji-2 { right: 5%; }
  .emoji-3 { right: 0%; }
}

@media (max-width: 1024px) {
  .floating-emoji-container {
    display: block !important;
    opacity: 0.3 !important;
    z-index: 1 !important;
    pointer-events: none !important;
  }
  
  .floating-emoji {
    width: 65px !important;
  }
  
  .emoji-1 { top: 35% !important; left: 2% !important; }
  .emoji-2 { top: 55% !important; right: 2% !important; }
  .emoji-3 { top: 75% !important; left: 15% !important; }
}

/* ==========================================================================
   CIRCULAR SPINNING BADGE
   ========================================================================== */
.circular-badge {
  position: absolute;
  top: 15%;
  right: -5%;
  width: 150px;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  z-index: 10;
  transition: transform 0.4s ease;
}

.circular-badge:hover {
  transform: scale(1.1);
}

.circular-text {
  position: absolute;
  width: 100%;
  height: 100%;
  animation: spin 15s linear infinite;
}

.circular-text text {
  font-size: 10px;
  font-weight: 700;
  fill: #0b5025;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-family: var(--font-base);
}

.circular-icon {
  width: 70px;
  height: 70px;
  background: rgba(245, 250, 243, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.25rem;
  box-shadow: 0 10px 25px rgba(11, 80, 37, 0.15);
  z-index: 2;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@media (max-width: 900px) {
  .circular-badge {
    position: relative;
    top: auto;
    right: auto;
    margin: 2rem auto 0 auto;
    width: 130px;
    height: 130px;
  }
}
