/* ============================================================
   JUKA — Custom Styles
   Palette: #2563EB (Juka Blue), #0A0A0A (Ink), #F8FAFC (Mist)
============================================================ */

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

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Text gradient ---------- */
.text-gradient {
  background: linear-gradient(135deg, #2563EB 0%, #60A5FA 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- Clip paths for diagonal sections ---------- */
.clip-diagonal {
  clip-path: polygon(15% 0, 100% 0, 100% 100%, 0% 100%);
}
.clip-diagonal-sm {
  clip-path: polygon(20% 0, 100% 0, 100% 100%, 0% 100%);
}
.clip-diagonal-left {
  clip-path: polygon(0 0, 85% 0, 100% 100%, 0 100%);
}
.clip-diagonal-right {
  clip-path: polygon(0 0, 100% 0, 80% 100%, 0 100%);
}

/* ---------- Navbar ---------- */
#navbar {
  background: transparent;
}
#navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(10, 10, 10, 0.06);
}
#navbar.scrolled .nav-link,
#navbar.scrolled a {
  color: #0A0A0A;
}
/* Force nav links white on dark hero.
   Targets ALL desktop anchor links (not just dropdown triggers)
   when nav is transparent. Light-hero pages use data-nav-light
   which immediately adds .scrolled, so this rule never fires there. */
#navbar:not(.scrolled) .nav-link {
  color: rgba(255, 255, 255, 0.7);
}
#navbar:not(.scrolled) .nav-link:hover {
  color: #fff;
}
#navbar:not(.scrolled) .hamburger-line {
  background-color: #fff;
}
/* Logo: white on dark hero, natural on light bg */
#navbar:not(.scrolled) .nav-logo {
  filter: brightness(0) invert(1);
}
#navbar.scrolled .nav-logo {
  filter: none;
}
/* Mobile nav: white background when menu is open */
#navbar.menu-open {
  background-color: #ffffff;
}

/* Mobile nav accordion */
details.mobile-nav-group summary::-webkit-details-marker { display: none; }
details.mobile-nav-group[open] .mobile-chevron { transform: rotate(180deg); }

/* Mobile menu links: always dark on white background */
#navbar #mobile-menu a:not(.btn-primary) {
  color: #0A0A0A !important;
}
#navbar #mobile-menu .mobile-nav-sub {
  color: rgba(10, 10, 10, 0.75) !important;
}
#navbar #mobile-menu a:not(.btn-primary):hover {
  color: #2563EB !important;
}
#navbar #mobile-menu .mobile-nav-item {
  color: #0A0A0A !important;
}

/* Footer email link — explicit color so it shows on dark bg
   regardless of which Tailwind version is on the server */
footer a[href^="mailto:"] {
  color: #60A5FA;
}
footer a[href^="mailto:"]:hover {
  color: #fff;
}

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #2563EB;
  color: #fff;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.625rem 1.375rem;
  border-radius: 0.75rem;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 12px rgba(37, 99, 235, 0.35);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary:hover {
  background: #1D4ED8;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.45);
}
.btn-primary:active { transform: translateY(0); }

.btn-primary-hero {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  background: #2563EB;
  color: #fff;
  font-weight: 700;
  font-size: 0.9375rem;
  padding: 0.875rem 1.875rem;
  border-radius: 0.875rem;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 24px rgba(37, 99, 235, 0.4);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary-hero:hover {
  background: #1D4ED8;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(37, 99, 235, 0.5);
}
.btn-primary-hero:active { transform: translateY(0); }

.btn-ghost-hero {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.875rem 1.875rem;
  border-radius: 0.875rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
  backdrop-filter: blur(8px);
}
.btn-ghost-hero:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

/* ---------- Scroll-reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  will-change: opacity, transform;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Service cards ---------- */
.service-card {
  will-change: transform;
}

/* ---------- Process steps ---------- */
.process-step .step-number {
  position: relative;
}
.process-step .step-number::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 100%;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, #2563EB40, transparent);
  display: none;
}
@media (min-width: 1024px) {
  .process-step:not(:last-child) .step-number::after {
    display: block;
  }
}

/* ---------- Testimonials ---------- */
.testimonial-card {
  will-change: transform;
}

/* ---------- Mobile menu animations ---------- */
#mobile-menu {
  animation: slideDown 0.3s ease forwards;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Hamburger open state ---------- */
.menu-open .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.menu-open .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.menu-open .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
  width: 1.5rem;
  align-self: auto;
}

/* ---------- Mobile nav items ---------- */
.mobile-nav-item {
  display: block;
  text-decoration: none;
  transition: color 0.15s, padding-left 0.2s;
}
.mobile-nav-item:hover {
  color: #2563EB;
  padding-left: 0.5rem;
}

/* ---------- Footer links ---------- */
.footer-link {
  text-decoration: none;
  transition: color 0.15s, padding-left 0.2s;
}
.footer-link:hover { padding-left: 4px; }

/* ---------- Social icons ---------- */
.social-icon {
  text-decoration: none;
}

/* ---------- Trust logos ---------- */
.logo-trust {
  font-family: 'Inter', sans-serif;
  transition: opacity 0.2s;
}
.logo-trust:hover { opacity: 0.7; }

/* ---------- Industry tags ---------- */
.industry-tag {
  transition: transform 0.15s, box-shadow 0.15s;
}
.industry-tag:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}

/* ---------- Geo shapes (floating dots/rings) ---------- */
.geo-shape { pointer-events: none; }

/* ---------- Pain cards hover ---------- */
.pain-card { transition: transform 0.2s ease; }
.pain-card:hover { transform: translateX(4px); }

/* ---------- Custom scrollbar ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #2563EB40;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: #2563EB80; }

/* ---------- Form inputs focus ring ---------- */
input:focus, textarea:focus, select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

/* ---------- Form inputs on dark backgrounds ----------
   Browsers override Tailwind's bg-white/8 (too low opacity)
   with their native white input background. This forces the
   correct dark appearance on all 19 contact forms.        */
.bg-juka-ink input,
.bg-juka-ink textarea,
.bg-juka-ink select {
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.15);
}
.bg-juka-ink input::placeholder,
.bg-juka-ink textarea::placeholder {
  color: rgba(255, 255, 255, 0.45) !important;
}
.bg-juka-ink select {
  color: rgba(255, 255, 255, 0.5) !important;
  /* Custom dropdown arrow — replaces native arrow removed by appearance-none.
     Fixes Firefox where the select renders without any chevron indicator. */
  -moz-appearance: none !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23ffffff' stroke-opacity='0.4' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.75rem center !important;
  background-size: 1.25rem !important;
  padding-right: 2.5rem !important;
}
.bg-juka-ink input:focus,
.bg-juka-ink textarea:focus,
.bg-juka-ink select:focus {
  background-color: rgba(255, 255, 255, 0.10) !important;
}

/* Firefox: grid children containing form elements need min-width:0 to
   prevent select/input from overflowing their column and misaligning. */
form .grid > div { min-width: 0; }

/* ---------- Toast ---------- */
#toast.show {
  transform: translateY(0) !important;
  opacity: 1 !important;
}

/* ---------- Background pattern override for white bg ---------- */
.bg-grid-juka {
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%232563EB' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ---------- Responsive utilities ---------- */
@media (max-width: 640px) {
  .btn-primary-hero, .btn-ghost-hero {
    width: 100%;
    justify-content: center;
  }
}

/* ---------- Selection color ---------- */
::selection {
  background: #2563EB;
  color: #fff;
}
::-moz-selection {
  background: #2563EB;
  color: #fff;
}

/* ---------- Dropdown animation ---------- */
.group:hover .group-hover\:opacity-100 {
  transition-delay: 0.05s;
}

/* ---------- Print styles ---------- */
@media print {
  #navbar, .animate-float, .animate-pulse-slow { display: none; }
  .reveal { opacity: 1; transform: none; }
}

