/* =============================================
   NIIFAM — Modern UI layer
   Loaded after style.css. Keeps the brand palette and markup hooks,
   improves contrast, typography, spacing, focus and small-screen behaviour.
   ============================================= */

:root {
  /* Text-safe brand tints (the base #1428a0 is too dark to read on the dark theme) */
  --text-muted:      #a9b6c9;
  --surface:         #121a2e;
  --surface-hover:   #17213a;
  --ring:            #7fb2ff;
  --radius:          20px;
  --section-y:       clamp(64px, 8vw, 104px);
  --nav-h:           76px;
}

/* ---- Base ---- */
html { scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-text-size-adjust: 100%; }
body { font-size: 1rem; line-height: 1.65; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
main { display: block; }
::selection { background: rgba(6, 137, 216, 0.45); color: #fff; }

h1, h2, h3, h4 { text-wrap: balance; letter-spacing: -0.01em; }
p, li { text-wrap: pretty; }
p { max-width: 70ch; }

/* ---- Accessibility ---- */
.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 10000;
  padding: 12px 18px; border-radius: 10px;
  background: #fff; color: #0b0f1e; font-weight: 700;
  transform: translateY(-160%); transition: transform .2s ease;
}
.skip-link:focus { transform: translateY(0); outline: 3px solid var(--ring); outline-offset: 2px; }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible,
select:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 3px;
  border-radius: 8px;
}
input:focus-visible, textarea:focus-visible, select:focus-visible { outline-offset: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  [data-aos] { opacity: 1 !important; transform: none !important; }
}

/* ---- Contrast fixes: brand blue used as text ---- */

/* ---- Layout rhythm ---- */
.section { padding: var(--section-y) 0; }
.container { padding-left: clamp(16px, 4vw, 24px); padding-right: clamp(16px, 4vw, 24px); }

/* ---- Navbar ---- */
.navbar {
  background: rgba(6, 16, 31, 0.86);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
}
.navbar.scrolled { background: rgba(6, 16, 31, 0.94); }
.nav-link { min-height: 40px; }
.nav-link:not(.active) { color: rgba(255, 255, 255, 0.82); }
.nav-link.active { box-shadow: 0 4px 16px rgba(20, 40, 160, 0.4); }
.hamburger { min-width: 44px; min-height: 44px; }
/* header uses the Alpine class "active"; style.css only knew "open" */
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-menu a, .mobile-menu .nav-cta { min-height: 48px; display: flex; align-items: center; }

/* ---- Buttons ---- */
.btn, .nav-cta { min-height: 46px; }
.btn:focus-visible, .nav-cta:focus-visible { outline-offset: 4px; border-radius: 100px; }

/* ---- Cards ---- */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: clamp(22px, 3vw, 32px);
}
.card:hover {
  transform: translateY(-4px);
  background: var(--surface-hover);
  border-color: rgba(127, 178, 255, 0.35);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

/* ---- Hero ---- */

/* ---- Stats ---- */

/* ---- Readable long-form copy (replaces justified text) ---- */

/* ---- Floating actions: WhatsApp sits bottom-left; scroll-to-top bottom-right ---- */
.whatsapp-float { left: 24px; right: auto; bottom: 24px; flex-direction: row-reverse; }
.wa-label { transform: translateX(-10px); }
.whatsapp-float:hover .wa-label, .whatsapp-float:focus-visible .wa-label { opacity: 1; transform: translateX(0); }
.scroll-top { right: 24px; bottom: 24px; }
.wa-icon { width: 54px; height: 54px; }

/* ---- Footer ---- */

/* ---- Forms ---- */
input, textarea, select { font-size: 16px; } /* prevents iOS zoom-on-focus */
input:not([type=checkbox]):not([type=radio]), textarea, select { min-height: 48px; }

/* ---- Images ---- */
img { height: auto; }
.logo-img { height: auto; max-height: 44px; }

/* ---- Small screens ---- */
@media (max-width: 768px) {
  :root { --nav-h: 68px; }
  .whatsapp-float { left: 16px; right: auto; bottom: 16px; }
  .wa-icon { width: 50px; height: 50px; }
  .scroll-top { right: 16px; bottom: 16px; width: 44px; height: 44px; }
}
main:focus { outline: none; }

.mobile-menu a, .mobile-menu .nav-cta, .nav-cta { gap: 10px; }

/* =============================================
   Engagement sections (home)
   ============================================= */

/* =============================================
   Trust strip, process steps, mobile sticky CTA
   ============================================= */

/* Sticky quick-action bar (phones only) */
.mobile-cta { display: none; }
@media (max-width: 768px) {
  .mobile-cta {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 8500;
    display: flex; gap: 10px; align-items: center;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: rgba(6, 16, 31, .94);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-top: 1px solid rgba(255,255,255,.1);
    box-shadow: 0 -8px 24px rgba(0,0,0,.35);
  }
  .mobile-cta-icon {
    flex: 0 0 48px; height: 48px; display: grid; place-items: center; border-radius: 14px;
    background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); color: #fff; font-size: 1.1rem;
  }
  .mobile-cta-wa { background: #25d366; border-color: #25d366; font-size: 1.3rem; }
  .mobile-cta-main {
    flex: 1; height: 48px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--gradient); color: #fff; font-weight: 700; font-size: 1rem;
    box-shadow: 0 6px 18px rgba(20,40,160,.45);
  }
  /* the bar already offers WhatsApp; free the corner and keep content clear of the bar */
  .whatsapp-float { display: none; }
  .scroll-top { bottom: 84px; }
  body { padding-bottom: 72px; }
}
