/* AGS Global — supplemental styles (Tailwind CDN handles the rest) */

:root {
  --primary: #0d7ff2;
  --bg-light: #f5f7f8;
  --bg-dark: #101922;
}

html { scroll-behavior: smooth; }
body { overflow-x: hidden; }

/* Fade-in-up animation used in heroes */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-in-up { animation: fadeInUp 0.8s ease-out both; }

/* Stagger helper */
.animate-fade-in-up.delay-1 { animation-delay: .1s; }
.animate-fade-in-up.delay-2 { animation-delay: .2s; }
.animate-fade-in-up.delay-3 { animation-delay: .3s; }
.animate-fade-in-up.delay-4 { animation-delay: .4s; }

/* Material symbol baseline */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Subtle background grid for hero accents */
.bg-grid {
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* Smooth link underline */
a.link-underline { position: relative; }
a.link-underline::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 1px; width: 0;
  background: currentColor; transition: width .25s ease;
}
a.link-underline:hover::after { width: 100%; }

/* Focus styles */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ============ MOBILE-SPECIFIC IMPROVEMENTS ============ */

/* Prevent horizontal overflow */
html, body { max-width: 100%; overflow-x: hidden; }

/* Prevent iOS zoom on input focus (font-size must be >= 16px) */
input, select, textarea {
  font-size: 16px !important;
}
@media (min-width: 768px) {
  input, select, textarea { font-size: 0.95rem !important; }
}

/* Better tap targets — all clickable elements at least 44x44 */
a, button {
  -webkit-tap-highlight-color: rgba(13, 127, 242, 0.15);
}

/* Smooth scroll for anchor links */
html { scroll-behavior: smooth; }

/* Better word wrap on small screens for long headlines */
h1, h2, h3 {
  word-break: break-word;
  overflow-wrap: break-word;
}

/* text-balance / text-pretty fallback for older browsers */
.text-balance { text-wrap: balance; }
.text-pretty  { text-wrap: pretty; }

/* Improve mobile nav button — bigger tap area + active state */
[data-mobile-nav-toggle] {
  padding: 8px;
  margin: -8px;
  border-radius: 8px;
}
[data-mobile-nav-toggle]:active {
  background-color: rgba(0,0,0,0.05);
}
.dark [data-mobile-nav-toggle]:active {
  background-color: rgba(255,255,255,0.05);
}

/* Mobile nav menu animation when shown */
[data-mobile-nav]:not(.hidden) {
  animation: slideDown 0.2s ease-out;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Better stealth badge sizing on mobile */
@media (max-width: 640px) {
  .animate-fade-in-up {
    animation-duration: 0.6s;
  }
}

/* Make sticky header sit a bit smaller on mobile */
@media (max-width: 640px) {
  header.sticky h2 { font-size: 1.05rem; }
}

/* Slightly smaller hero badge on phones */
@media (max-width: 480px) {
  .px-3.py-1.text-xs { font-size: 0.65rem; padding: 0.2rem 0.6rem; }
}

/* iPhone safe-area insets */
@supports (padding: max(0px)) {
  body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
}
