/* ============================================================
   INNOVAI CR — Clean Tech Light Mode & 3D Spatial Styles
   Inspired by the clean, modern aesthetic of antigravity.google
   ============================================================ */

/* ------------------------------------------------------------------
   1. Design Tokens & Variables
   ------------------------------------------------------------------ */
:root {
  --bg-primary: #FFFFFF;
  --bg-secondary: #F8FAFC;
  --text-primary: #0A0E17;       /* Obsidian Black */
  --text-secondary: #4B5563;     /* Slate Mist */
  --logo-blue: #3556F6;          /* Logo Blue */
  --logo-blue-glow: rgba(53, 86, 246, 0.15);
  --border-light: rgba(10, 14, 23, 0.05);
  --border-medium: rgba(10, 14, 23, 0.12);
  --shadow-sm: 0 1px 3px rgba(10, 14, 23, 0.02);
  --shadow-md: 0 8px 30px rgba(10, 14, 23, 0.04);
  --shadow-lg: 0 16px 40px rgba(10, 14, 23, 0.06);
}

/* ------------------------------------------------------------------
   2. Reset & Global Base
   ------------------------------------------------------------------ */
html {
  scroll-behavior: smooth;
  background-color: var(--bg-primary) !important;
}

body {
  font-family: 'Inter', sans-serif !important;
  background-color: var(--bg-primary) !important;
  color: var(--text-primary) !important;
  overflow-x: hidden;
}

/* Clean Tech Grid Blueprint Background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(var(--border-light) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-light) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
  z-index: -2;
  opacity: 0.6;
}

/* ------------------------------------------------------------------
   3. Force Light Mode Overrides (React elements)
   ------------------------------------------------------------------ */
#root, main, section, footer, .gradient-bg,
.bg-navy, .bg-background, .bg-black, .bg-slate-950, .bg-zinc-950, .bg-gray-950, .bg-slate-900, .bg-zinc-900, .bg-gray-900,
[class*="bg-navy"], [class*="bg-background"], [class*="bg-black"], [class*="bg-slate-"], [class*="bg-zinc-"], [class*="bg-gray-"] {
  background-color: var(--bg-primary) !important;
  background: var(--bg-primary) !important;
}


.bg-navy\/50, .bg-slate-900\/50, .bg-zinc-900\/50, .bg-gray-900\/50, section:nth-of-type(even) {
  background-color: var(--bg-secondary) !important;
  background: var(--bg-secondary) !important;
}

/* Typography Overrides */
h1, h2, h3, h4, h5, h6,
.text-white, .text-slate-100, .text-gray-100, .text-zinc-100,
.text-slate-200, .text-gray-200, .text-zinc-200,
.text-slate-300, .text-gray-300, .text-zinc-300,
.text-slate-400, .text-gray-400, .text-zinc-400 {
  color: var(--text-primary) !important;
}

p, span, li, label,
.text-slate-300, .text-gray-300, .text-zinc-300,
.text-slate-400, .text-gray-400, .text-zinc-400,
.text-slate-500, .text-gray-500, .text-zinc-500 {
  color: var(--text-secondary) !important;
}

/* Bold Architectural Headlines */
h1, h2, h3, [class*="title"], [class*="heading"] {
  font-family: 'Syncopate', sans-serif !important;
  text-transform: uppercase;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
}

/* ------------------------------------------------------------------
   4. Custom Scrollbar & Selection
   ------------------------------------------------------------------ */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

::selection {
  background: var(--logo-blue-glow);
  color: var(--text-primary);
}

/* ------------------------------------------------------------------
   5. Buttons (Pill-Shaped high contrast)
   ------------------------------------------------------------------ */
.btn-primary, button[type="submit"], [class*="btn-primary"] {
  background-color: var(--text-primary) !important;
  color: var(--bg-primary) !important;
  font-family: 'Inter', sans-serif !important;
  font-weight: 600 !important;
  padding: 0.65rem 1.5rem !important;
  border-radius: 9999px !important;          /* Pill layout like antigravity */
  border: 1.5px solid var(--text-primary) !important;
  box-shadow: var(--shadow-sm) !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-primary:hover, button[type="submit"]:hover {
  background-color: var(--logo-blue) !important;
  color: #FFFFFF !important;
  border-color: var(--logo-blue) !important;
  box-shadow: 0 8px 20px var(--logo-blue-glow) !important;
  transform: translateY(-2px);
}

.btn-secondary, [class*="btn-secondary"] {
  background-color: transparent !important;
  color: var(--text-primary) !important;
  font-family: 'Inter', sans-serif !important;
  font-weight: 600 !important;
  padding: 0.65rem 1.5rem !important;
  border-radius: 9999px !important;          /* Pill layout */
  border: 1.5px solid var(--text-primary) !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-secondary:hover {
  background-color: var(--text-primary) !important;
  color: var(--bg-primary) !important;
  transform: translateY(-2px);
}

/* ------------------------------------------------------------------
   6. Architectural Cards & Hover 3D Depth
   ------------------------------------------------------------------ */
.glass-card, .hover-card, .glass-card-shadow, .glass-card-animated,
[class*="glass"], [class*="card"], [class*="service-card"] {
  background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%) !important;
  border: 1px solid rgba(10, 14, 23, 0.06) !important;
  box-shadow: var(--shadow-md) !important;
  border-radius: 20px !important;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1) !important;
  transform-style: preserve-3d;
  backface-visibility: hidden;
}


.glass-card:hover, .hover-card:hover, .glass-card-shadow:hover, .glass-card-animated:hover,
[class*="glass"]:hover, [class*="card"]:hover, [class*="service-card"]:hover {
  border-color: var(--logo-blue) !important;
  box-shadow: var(--shadow-lg), 0 10px 30px var(--logo-blue-glow) !important;
}

[class*="card"] > * {
  transform: translateZ(20px);
}

/* ------------------------------------------------------------------
   7. STABLE HEADER (Clean and easy to click - NO TILT, NO TRANSLATIONS)
   ------------------------------------------------------------------ */
header, nav, [class*="header"], [class*="nav"],
header *, nav *, [class*="header"] *, [class*="nav"] * {
  transform: none !important;
  transform-style: flat !important;
  transition: color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease !important;
}

header, [class*="header"] {
  background-color: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid rgba(10, 14, 23, 0.04) !important;
  box-shadow: none !important;
  padding-top: 0.75rem !important;
  padding-bottom: 0.75rem !important;
}

header nav a, [class*="header"] nav a, [class*="nav"] a {
  font-family: 'Inter', sans-serif !important;
  font-weight: 500 !important;
  color: var(--text-secondary) !important;
  padding: 0.5rem 1rem !important;
  border-bottom: 2px solid transparent !important;
  text-decoration: none !important;
}

header nav a:hover, [class*="header"] nav a:hover, [class*="nav"] a:hover {
  color: var(--logo-blue) !important;
}

/* Remove underlines from header links */
header nav a::after, [class*="header"] nav a::after {
  display: none !important;
}

/* Make WhatsApp button in header a pill */
header button, header a[class*="button"], header [class*="btn"] {
  border-radius: 9999px !important;
  border: 1.5px solid var(--text-primary) !important;
  background: transparent !important;
  color: var(--text-primary) !important;
  padding: 0.45rem 1.25rem !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
}

header button:hover, header a[class*="button"]:hover, header [class*="btn"]:hover {
  background: var(--text-primary) !important;
  color: var(--bg-primary) !important;
}

/* ------------------------------------------------------------------
   8. Scroll Reveal Animations
   ------------------------------------------------------------------ */
.reveal {
  opacity: 0;
  transform: translate3d(0, 30px, 0);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1 !important;
  transform: translate3d(0, 0, 0) !important;
  visibility: visible !important;
}



/* ------------------------------------------------------------------
   9. Clean Preloader
   ------------------------------------------------------------------ */
#preloader {
  position: fixed;
  inset: 0;
  background: var(--bg-primary) !important;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.preloader-ring {
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--border-medium);
  border-top-color: var(--logo-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.preloader-text {
  margin-top: 16px;
  font-family: 'Syncopate', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--text-primary);
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ------------------------------------------------------------------
   10. Interactive Space Aurora Mesh Background
   ------------------------------------------------------------------ */
.aurora-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.aurora-bg::before,
.aurora-bg::after {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(150px);
  opacity: 0.15;
  animation: aurora-move 30s ease-in-out infinite;
}

.aurora-bg::before {
  background: radial-gradient(circle, var(--logo-blue) 0%, transparent 70%); /* Logo Blue */
  top: -10%;
  left: 10%;
}

.aurora-bg::after {
  background: radial-gradient(circle, var(--text-primary) 0%, transparent 70%); /* Obsidian Black */
  bottom: -10%;
  right: 10%;
  animation-delay: -15s;
  animation-direction: reverse;
}

@keyframes aurora-move {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(80px, 50px) scale(1.2); }
}

/* ------------------------------------------------------------------
   11. Mouse Trail Follower
   ------------------------------------------------------------------ */
.mouse-trail {
  position: fixed;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--logo-blue-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: 9998;
  transition: transform 0.08s ease-out;
  mix-blend-mode: multiply;
}

/* ------------------------------------------------------------------
   12. Input fields & forms
   ------------------------------------------------------------------ */
input, textarea, select {
  background-color: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-light) !important;
  border-radius: 4px !important;
  padding: 0.75rem 1rem !important;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif !important;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--logo-blue) !important;
  background-color: var(--bg-primary) !important;
  box-shadow: 0 0 0 2px var(--logo-blue-glow) !important;
}

/* ------------------------------------------------------------------
   13. Hiding/Placement CSS Rules
   ------------------------------------------------------------------ */
/* Hide original Costa Rica badge in the hero at the top of main */
main .border-turquoise\/20, 
main [class*="border-turquoise"],
main [class*="bg-turquoise\/10"] {
  display: none !important;
}

/* Styling for Bottom Costa Rica badge */
.cr-badge-footer {
  display: flex !important;
  justify-content: center;
  align-items: center;
  padding: 1.5rem 0;
  margin-top: 1rem;
}

.cr-badge-footer-pill {
  display: inline-flex !important;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--bg-secondary) !important;
  border: 1px solid var(--border-medium) !important;
  border-radius: 9999px !important;
  padding: 0.5rem 1.25rem !important;
  color: var(--text-primary) !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 0.85rem !important;
  font-weight: 500 !important;
  box-shadow: var(--shadow-sm) !important;
  transition: all 0.3s ease !important;
}

.cr-badge-footer-pill:hover {
  transform: translateY(-2px);
  border-color: var(--logo-blue) !important;
  box-shadow: var(--shadow-md) !important;
}

/* Hide specific dark background shapes/divs that might conflict */
[class*="blur-3xl"], [class*="bg-gradient-to-"] {
  opacity: 0.15 !important;
}

/* Force visibility of React mount root element */
#root {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Force display of the Hero container */
section:first-of-type .container.mx-auto {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Force Hero video to render as a premium dark device */
section:first-of-type video {
  mix-blend-mode: normal !important;
  background-color: #0A0E17 !important;
  border-radius: 16px !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* General helper for visibility overrides */
.visible {
  visibility: visible !important;
}

/* Hide floating WhatsApp button */
a[href*="wa.me"].fixed.bottom-8 {
  display: none !important;
}

/* Enlarge and style footer social icons */
footer a.rounded-full {
  width: 44px !important;
  height: 44px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid var(--border-medium) !important;
  background-color: var(--bg-secondary) !important;
  color: var(--text-secondary) !important;
  border-radius: 50% !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  text-decoration: none !important;
  margin-right: 0.75rem !important;
}

footer a.rounded-full:hover {
  background-color: var(--logo-blue) !important;
  color: #FFFFFF !important;
  border-color: var(--logo-blue) !important;
  transform: translateY(-3px) !important;
  box-shadow: 0 5px 15px var(--logo-blue-glow) !important;
}

footer a.rounded-full svg {
  width: 20px !important;
  height: 20px !important;
  transition: transform 0.3s ease !important;
}

footer a.rounded-full:hover svg {
  transform: scale(1.1);
}

/* ============================================================
   14. Web AI Chat Widget (Antigravity Light Theme)
   ============================================================ */

/* Chat Trigger Bubble */
.webchat-trigger {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #FFFFFF !important; /* White background to make logo pop */
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(10, 14, 23, 0.15) !important;
  cursor: pointer;
  z-index: 9999;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1.5px solid rgba(10, 14, 23, 0.08);
  padding: 8px; /* Breathing room for the logo image */
}

.webchat-trigger:hover {
  border-color: var(--logo-blue) !important;
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 15px 35px var(--logo-blue-glow) !important;
}

.webchat-trigger img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.webchat-trigger:hover img {
  transform: scale(1.1);
}

/* Chat Window */
.webchat-window {
  position: fixed;
  bottom: 6.5rem;
  right: 2rem;
  width: 410px; /* Opened wider as requested */
  height: 580px; /* Taller as requested */
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(10, 14, 23, 0.08) !important;
  box-shadow: 0 20px 50px rgba(10, 14, 23, 0.12) !important;
  display: flex;
  flex-direction: column;
  z-index: 9999;
  overflow: hidden;
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.webchat-window.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  visibility: visible;
}

/* Chat Header */
.webchat-header {
  padding: 1.25rem;
  background: var(--bg-secondary) !important;
  border-bottom: 1px solid var(--border-medium) !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.webchat-header-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Premium Discord-Style Online Indicator Badge */
.webchat-avatar-container {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--border-light) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  border: 1.5px solid var(--border-medium);
  flex-shrink: 0;
}

.webchat-avatar-svg {
  width: 20px;
  height: 20px;
}

.webchat-header-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background-color: #10B981; /* Green status dot */
  border: 2px solid var(--bg-secondary); /* Cutout border */
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.webchat-header-title {
  font-family: 'Syncopate', sans-serif !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase;
  color: var(--text-primary);
}

.webchat-header-subtitle {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.webchat-close-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.webchat-close-btn:hover {
  color: var(--text-primary);
}

/* Messages Area */
.webchat-messages {
  flex: 1;
  padding: 1.25rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background-color: rgba(255, 255, 255, 0.4) !important;
}

/* Message Bubble Wrapper with side-by-side avatar support */
.webchat-message-wrapper {
  display: flex;
  width: 100%;
  gap: 10px;
}

.webchat-message-wrapper.agent {
  justify-content: flex-start;
}

.webchat-message-wrapper.user {
  justify-content: flex-end;
}

/* Small message avatar bubble */
.webchat-message-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  flex-shrink: 0;
  align-self: flex-end; /* Align avatar with the bottom of the bubble */
}

.webchat-message-avatar svg {
  width: 14px;
  height: 14px;
}

/* Single Message Bubble */
.webchat-message {
  max-width: 75%;
  padding: 0.85rem 1.1rem;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.45;
  word-wrap: break-word;
}

.webchat-message.agent {
  background-color: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  align-self: flex-start;
  border-bottom-left-radius: 4px; /* Curve adjustments */
  border: 1px solid var(--border-light);
}

.webchat-message.user {
  background-color: var(--logo-blue) !important;
  color: #FFFFFF !important;
  align-self: flex-end;
  border-bottom-right-radius: 4px; /* Curve adjustments */
  box-shadow: 0 4px 12px var(--logo-blue-glow) !important;
}

/* Input Area */
.webchat-input-container {
  padding: 1rem;
  background: var(--bg-primary) !important;
  border-top: 1px solid var(--border-medium) !important;
  display: flex;
  gap: 0.75rem;
}

.webchat-input {
  flex: 1;
  background-color: var(--bg-secondary) !important;
  border: 1px solid var(--border-light) !important;
  border-radius: 9999px !important; /* Pill style */
  padding: 0.65rem 1.25rem !important;
  font-size: 0.9rem !important;
  color: var(--text-primary) !important;
  outline: none;
  transition: all 0.3s ease;
}

.webchat-input:focus {
  border-color: var(--logo-blue) !important;
  background-color: #FFFFFF !important;
  box-shadow: 0 0 0 2px var(--logo-blue-glow) !important;
}

.webchat-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--text-primary) !important;
  color: #FFFFFF !important;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.webchat-send-btn:hover {
  background-color: var(--logo-blue) !important;
  box-shadow: 0 5px 15px var(--logo-blue-glow) !important;
  transform: scale(1.05);
}

.webchat-send-btn svg {
  width: 18px;
  height: 18px;
}

/* Bouncing Typing Indicator */
.typing-indicator {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 4px 8px;
}

.typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--text-secondary);
  animation: typing-bounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing-bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* Hide non-functional agent button wrapper in the bottom-left */
.fixed.bottom-8.left-8.z-50 {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Webchat Responsive Styling */
@media (max-width: 480px) {
  .webchat-window {
    width: calc(100vw - 2rem) !important;
    right: 1rem !important;
    bottom: 5.5rem !important;
    height: 70vh !important;
  }
  .webchat-trigger {
    right: 1rem !important;
    bottom: 1rem !important;
  }
}

/* Responsive Hero Headline Typography (Slightly Smaller & Clean) */
h1 {
  font-size: clamp(1.8rem, 4.2vw, 3.2rem) !important;
  line-height: 1.15 !important;
  letter-spacing: -0.01em !important;
}

@media (max-width: 768px) {
  h1 {
    font-size: 1.8rem !important;
    line-height: 1.2 !important;
  }
}




