:root {
  --midnight: #000000;
  --lime: #6DB955;
  --electric: #23A306;
  --teal: #15A292;
  --facet: #39AE79;
  --mint: #B5D9C4;
  --forest: #1D543B;
  --slate: #0E1210;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: var(--midnight);
  color: #fff;
  overflow-x: hidden;
}

::selection {
  background: rgba(109, 185, 85, 0.4);
  color: #fff;
}

.glass-header {
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid rgba(109, 185, 85, 0.18);
}

.hero-banner {
  background:
    radial-gradient(ellipse 70% 55% at 90% 15%, rgba(21, 162, 146, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse 55% 45% at 8% 85%, rgba(29, 84, 59, 0.55) 0%, transparent 50%),
    radial-gradient(ellipse 40% 35% at 50% 0%, rgba(109, 185, 85, 0.08) 0%, transparent 60%),
    linear-gradient(180deg, #000000 0%, #0A1510 45%, #000000 100%);
  border-bottom-left-radius: 3rem;
  border-bottom-right-radius: 3rem;
  position: relative;
  overflow: hidden;
}

.hero-wave {
  position: absolute;
  inset: auto 0 0 0;
  height: 120px;
  background: linear-gradient(180deg, transparent 0%, rgba(29, 84, 59, 0.5) 55%, rgba(16, 41, 29, 0.85) 100%);
  pointer-events: none;
}

.hero-wave::before {
  content: '';
  position: absolute;
  bottom: -20px;
  left: -5%;
  width: 110%;
  height: 80px;
  background:
    radial-gradient(ellipse at 30% 100%, rgba(109, 185, 85, 0.12), transparent 60%),
    radial-gradient(ellipse at 70% 100%, rgba(21, 162, 146, 0.2), transparent 55%);
  border-radius: 100% 100% 0 0;
}

.page-hero {
  background:
    radial-gradient(ellipse 60% 50% at 85% 20%, rgba(21, 162, 146, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 45% 40% at 10% 80%, rgba(29, 84, 59, 0.45) 0%, transparent 50%),
    linear-gradient(180deg, #000000 0%, #0A1510 100%);
  border-bottom-left-radius: 2.5rem;
  border-bottom-right-radius: 2.5rem;
}

.btn-lime {
  background: linear-gradient(135deg, #6DB955 0%, #23A306 55%, #15A292 130%);
  color: #000000;
  font-weight: 700;
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}
.btn-lime:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(109, 185, 85, 0.4);
  filter: brightness(1.06);
}

.service-card {
  background: #0E1210;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
  width: 100%;
  min-width: 0;
}
.service-card:hover {
  border-color: rgba(109, 185, 85, 0.55);
  box-shadow: 0 0 0 1px rgba(109, 185, 85, 0.25), 0 0 40px rgba(21, 162, 146, 0.12);
  transform: translateY(-4px);
}

/* Explicit services grid — do not rely only on Tailwind CDN */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  width: 100%;
}
@media (min-width: 640px) {
  .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
  }
}
@media (min-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
  }
  /* Center the last row when 5 cards (2 leftovers) */
  .services-grid > .service-card:nth-child(4):nth-last-child(2) {
    grid-column: 1 / span 1;
  }
  .services-grid > .service-card:nth-child(5):nth-last-child(1) {
    grid-column: 2 / span 1;
  }
}

.tech-block {
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(57, 174, 121, 0.35);
  font-family: 'Fira Code', ui-monospace, monospace;
}

.form-input {
  background: rgba(14, 18, 16, 0.95);
  border: 1px solid rgba(181, 217, 196, 0.18);
  color: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-input:focus {
  outline: none;
  border-color: #6DB955;
  box-shadow: 0 0 0 3px rgba(109, 185, 85, 0.22);
}
.form-input::placeholder { color: rgba(181, 217, 196, 0.45); }

.logo-muted {
  filter: grayscale(1) brightness(1.4) opacity(0.45);
  transition: filter 0.3s ease, opacity 0.3s ease;
}
.logo-muted:hover {
  filter: grayscale(0) brightness(1) opacity(0.9);
}

.metric-glow {
  text-shadow: 0 0 24px rgba(109, 185, 85, 0.5);
}

.nav-link {
  position: relative;
  color: #B5D9C4;
  transition: color 0.2s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #6DB955, #15A292);
  transition: width 0.25s ease;
}
.nav-link:hover,
.nav-link.active { color: #fff; }
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

.nav-dropdown {
  position: relative;
  padding-bottom: 0.85rem; /* hover bridge so cursor can reach the menu */
  margin-bottom: -0.85rem;
}
.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  min-width: 15.5rem;
  padding: 0.5rem;
  background: rgba(8, 12, 10, 0.96);
  border: 1px solid rgba(109, 185, 85, 0.22);
  border-radius: 1rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  z-index: 60;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown-menu a {
  display: block;
  padding: 0.65rem 0.85rem;
  border-radius: 0.65rem;
  font-size: 0.875rem;
  color: #B5D9C4;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.active {
  background: rgba(109, 185, 85, 0.12);
  color: #fff;
}

.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.mobile-menu.open { max-height: 720px; }

.mobile-services {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.mobile-services.open { max-height: 360px; }

.prose-dark p { color: #B5D9C4; line-height: 1.75; }
.prose-dark h2 { color: #fff; font-weight: 800; }
.prose-dark h3 { color: #fff; font-weight: 700; }
.prose-dark ul { color: #B5D9C4; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

.creative-frame {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: #050805;
}
.creative-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.25) 100%);
}
.creative-frame::after {
  content: '';
  position: absolute;
  inset: auto -8% -18% auto;
  width: 45%;
  height: 45%;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(circle, rgba(21,162,146,0.22), transparent 70%);
  filter: blur(32px);
}
.creative-frame img {
  position: relative;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.creative-frame img[src$=".svg"] {
  transform: none;
  background: #000;
}
.service-card .creative-frame {
  background: #050805;
}
.hero-visual.creative-frame {
  box-shadow: 0 0 0 1px rgba(109,185,85,0.22), 0 24px 80px rgba(0,0,0,0.55), 0 0 60px rgba(21,162,146,0.12);
}

/* ------------------------------------------------------------------ */
/* FAQ Chatbot                                                        */
/* ------------------------------------------------------------------ */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.chatbot-root {
  position: fixed;
  z-index: 60;
  right: 1rem;
  bottom: 1rem;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}

.chatbot-launcher {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  border: 1px solid rgba(109, 185, 85, 0.45);
  background: linear-gradient(145deg, var(--electric), var(--lime));
  color: #000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 36px rgba(35, 163, 6, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chatbot-launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(35, 163, 6, 0.45);
}

.chatbot-launcher:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

.chatbot-launcher-icon {
  width: 1.35rem;
  height: 1.35rem;
  display: block;
}

.chatbot-launcher-icon--close { display: none; }
.chatbot-root.is-open .chatbot-launcher-icon--chat { display: none; }
.chatbot-root.is-open .chatbot-launcher-icon--close { display: block; }

.chatbot-panel {
  position: absolute;
  right: 0;
  bottom: calc(3.5rem + 0.75rem);
  width: min(24.5rem, calc(100vw - 2rem));
  height: min(34rem, calc(100vh - 7.5rem));
  display: flex;
  flex-direction: column;
  border-radius: 1.25rem;
  overflow: hidden;
  background: rgba(8, 14, 11, 0.96);
  border: 1px solid rgba(109, 185, 85, 0.22);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65), 0 0 40px rgba(21, 162, 146, 0.08);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.chatbot-root.is-open .chatbot-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.chatbot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.95rem 1rem;
  border-bottom: 1px solid rgba(109, 185, 85, 0.16);
  background:
    radial-gradient(ellipse 80% 120% at 0% 0%, rgba(109, 185, 85, 0.18), transparent 55%),
    linear-gradient(180deg, rgba(16, 41, 29, 0.9), rgba(8, 14, 11, 0.4));
}

.chatbot-eyebrow {
  margin: 0;
  font-family: 'Fira Code', ui-monospace, monospace;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lime);
}

.chatbot-title {
  margin: 0.15rem 0 0;
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.chatbot-close {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--mint);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.chatbot-close:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.chatbot-close svg { width: 1rem; height: 1rem; }

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  scroll-behavior: smooth;
}

.chatbot-msg { display: flex; max-width: 92%; }
.chatbot-msg--user { align-self: flex-end; }
.chatbot-msg--bot { align-self: flex-start; }

.chatbot-bubble {
  padding: 0.7rem 0.85rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #fff;
}

.chatbot-msg--bot .chatbot-bubble {
  background: rgba(14, 18, 16, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom-left-radius: 0.35rem;
  color: var(--mint);
}

.chatbot-msg--user .chatbot-bubble {
  background: linear-gradient(145deg, rgba(35, 163, 6, 0.95), rgba(109, 185, 85, 0.92));
  color: #041006;
  font-weight: 600;
  border-bottom-right-radius: 0.35rem;
}

.chatbot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.65rem;
}

.chatbot-link {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #000;
  background: var(--lime);
  text-decoration: none;
  transition: filter 0.15s ease;
}

.chatbot-link:hover { filter: brightness(1.08); }

.chatbot-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0 0.85rem 0.65rem;
}

.chatbot-chip {
  border: 1px solid rgba(109, 185, 85, 0.35);
  background: rgba(109, 185, 85, 0.08);
  color: var(--mint);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.chatbot-chip:hover {
  background: rgba(109, 185, 85, 0.18);
  color: #fff;
  border-color: rgba(109, 185, 85, 0.55);
}

.chatbot-form {
  display: flex;
  gap: 0.45rem;
  padding: 0.75rem;
  border-top: 1px solid rgba(109, 185, 85, 0.14);
  background: rgba(0, 0, 0, 0.35);
}

.chatbot-input {
  flex: 1;
  min-width: 0;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(14, 18, 16, 0.9);
  color: #fff;
  font-size: 0.875rem;
  padding: 0.65rem 0.95rem;
  outline: none;
}

.chatbot-input::placeholder { color: rgba(181, 217, 196, 0.45); }
.chatbot-input:focus {
  border-color: rgba(109, 185, 85, 0.55);
  box-shadow: 0 0 0 3px rgba(109, 185, 85, 0.15);
}

.chatbot-send {
  flex-shrink: 0;
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 9999px;
  border: none;
  background: var(--lime);
  color: #000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.chatbot-send:hover { filter: brightness(1.06); }
.chatbot-send svg { width: 1.05rem; height: 1.05rem; }

@media (max-width: 480px) {
  .chatbot-root {
    right: 0.75rem;
    bottom: 0.75rem;
  }
  .chatbot-panel {
    width: calc(100vw - 1.5rem);
    height: min(70vh, calc(100vh - 6.5rem));
  }
}
