/* Flygrow Africa – public site utilities */

html {
  scroll-behavior: smooth;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #BF9004;
  outline-offset: 2px;
}

/* Header shadow on scroll */
#header.scrolled {
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.08), 0 1px 2px -1px rgb(0 0 0 / 0.08);
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .group:hover img {
    transform: none;
  }
}

/* Aspect ratio helper for older browsers if needed */
.aspect-video {
  aspect-ratio: 16 / 9;
}

/* Print */
@media print {
  header,
  footer,
  #menu-btn {
    display: none !important;
  }
  main {
    padding-top: 0 !important;
  }
}

/* Realistic laptop frame for dashboard screenshots */
.laptop-frame {
  position: relative;
  padding: 0 2%;
  filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.35));
}
.laptop-screen {
  background: #1a1a1a;
  border-radius: 12px 12px 0 0;
  padding: 12px 12px 0;
  border: 2px solid #333;
  border-bottom: none;
  overflow: hidden;
}
.laptop-screen img {
  border-radius: 4px 4px 0 0;
  display: block;
  width: 100%;
  height: auto;
}
.laptop-base {
  height: 14px;
  background: linear-gradient(180deg, #c8c8c8 0%, #a0a0a0 40%, #888 100%);
  border-radius: 0 0 8px 8px;
  position: relative;
  margin: 0 -3%;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
}
.laptop-base::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 3px;
  width: 18%;
  height: 4px;
  background: #666;
  border-radius: 0 0 3px 3px;
}
.laptop-notch {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  background: #444;
  border-radius: 50%;
  z-index: 2;
  box-shadow: 0 0 0 2px #222;
}
@media (min-width: 768px) {
  .laptop-screen {
    padding: 16px 16px 0;
    border-radius: 16px 16px 0 0;
  }
  .laptop-base {
    height: 18px;
  }
}

/* Phone CTA in header */
.nav-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  border-radius: 9999px;
  background: #e6f0e6;
  color: #034400;
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1.25;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}
.nav-phone:hover {
  background: #034400;
  color: #fff;
  box-shadow: 0 4px 12px rgba(3, 68, 0, 0.25);
}
.nav-phone svg {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
}

/* Smartphone frame for field app */
.phone-frame {
  position: relative;
  width: 260px;
  max-width: 100%;
  margin: 0 auto;
  background: #111;
  border-radius: 36px;
  padding: 12px;
  box-shadow:
    0 0 0 3px #2a2a2a,
    0 25px 60px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(255,255,255,0.08);
}
.phone-frame::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 72px;
  height: 8px;
  background: #1a1a1a;
  border-radius: 9999px;
  z-index: 2;
}
.phone-screen {
  border-radius: 26px;
  overflow: hidden;
  background: #f5f5f5;
  aspect-ratio: 9 / 19.5;
}
.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}
.phone-home-bar {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: rgba(255,255,255,0.35);
  border-radius: 9999px;
}

/* Modest fade-up animation */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade-up {
  animation: fadeUp 0.6s ease-out both;
}
@media (prefers-reduced-motion: reduce) {
  .animate-fade-up { animation: none; }
}

/* Soft icon float */
@keyframes softPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}
.icon-pulse:hover {
  animation: softPulse 0.6s ease-in-out;
}

/* Floating WhatsApp chat button – bottom left */
.wa-float {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  background: #25D366;
  color: #fff !important;
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1.25;
  padding: 0.75rem 1.125rem;
  border-radius: 9999px;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
  text-decoration: none !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.wa-float:hover {
  background: #1ebe57;
  color: #fff !important;
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 12px 28px rgba(37, 211, 102, 0.55);
}
.wa-float:focus-visible {
  outline: 2px solid #034400;
  outline-offset: 3px;
}
.wa-float svg {
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  fill: currentColor;
}
.wa-float-label {
  padding-right: 0.25rem;
}
@media (max-width: 480px) {
  .wa-float-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .wa-float {
    padding: 0.875rem;
    right: 1rem;
    left: auto;
    bottom: 1rem;
  }
}
@keyframes waPulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
  70% { box-shadow: 0 0 0 12px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}
.wa-float {
  animation: waPulse 2.5s infinite;
}
@media (prefers-reduced-motion: reduce) {
  .wa-float { animation: none; }
}
