/* ============================================================
   Sarpada Bioinnovate — Shared Global Styles
   Used across all pages: index, innovation, team, contact
   ============================================================ */

:root {
  --c-primary:   #032F52;
  --c-secondary: #ADCEEF;
  --c-text:      #616161;
  --c-accent:    #CE782E;
  --c-navy:      #1A3D5C;
  --c-bg:        #FCFCFC;
  --c-bg2:       #F6F6F6;
  --c-bg3:       #F0EFE9;
  --c-white:     #FFFFFF;
  --max-w:       1300px;
  --r:           12px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Krub', sans-serif; background: var(--c-bg); color: var(--c-primary); font-size: 16px; line-height: 1.6; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }

/* ============================================================
   NAV
   ============================================================ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 4px 0;
  background: transparent;
  transition: background .35s, box-shadow .35s;
}
nav.scrolled {
  background: rgba(252,252,252,0.97);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(0,0,0,.07);
}
nav.scrolled .nav-links a { color: var(--c-primary); opacity: .75; }
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
}
.nav-logo img {
  height: 64px;
  width: auto;
  display: block;
}
.nav-logo .logo-light { display: block; }
.nav-logo .logo-dark  { display: none; }
nav.scrolled .nav-logo .logo-light { display: none; }
nav.scrolled .nav-logo .logo-dark  { display: block; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  transition: color .2s, opacity .2s;
}
.nav-links a:hover { color: white; }
nav.scrolled .nav-cta:hover { background: var(--c-accent) !important; }

.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: none; border: none; cursor: pointer;
  padding: 4px; border-radius: 8px;
  transition: background .2s;
}
.nav-hamburger:hover { background: rgba(255,255,255,0.12); }
nav.scrolled .nav-hamburger:hover { background: rgba(13,30,46,0.08); }
.nav-hamburger span {
  display: block; width: 22px; height: 2px;
  background: white; border-radius: 2px;
  transition: transform .3s, opacity .3s, background .35s;
}
nav.scrolled .nav-hamburger span { background: var(--c-primary); }
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-nav-drawer {
  display: none; position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(3, 47, 82, 0.72);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
  z-index: 999;
  padding: 80px 40px 48px;
  flex-direction: column; gap: 8px;
  animation: drawerIn .35s cubic-bezier(.22,1,.36,1);
}
.mobile-nav-drawer.open { display: flex; }
/* Fallback for browsers without backdrop-filter — solid navy */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .mobile-nav-drawer { background: var(--c-primary); }
}
@keyframes drawerIn {
  from { opacity: 0; -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0); }
  to { opacity: 1; -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%); }
}
.mobile-nav-drawer a {
  font-family: 'Krub', sans-serif;
  font-size: 28px; color: rgba(255,255,255,0.85);
  padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: color .2s;
}
.mobile-nav-drawer a:hover { color: var(--c-accent); }
.mobile-nav-close {
  position: absolute; top: 20px; right: 24px;
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.10); border: none;
  border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: white;
}
.hl-char { display: inline; color: inherit; transition: none; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}
.footer-brand {
  font-size: 20px;
  font-weight: 700;
  color: white;
  margin-bottom: 16px;
  letter-spacing: -.3px;
  display: flex; align-items: center; gap: 8px;
}
.footer-desc { font-size: 14px; line-height: 1.7; max-width: 280px; margin-bottom: 24px; }
.footer-socials { display: flex; gap: 10px; }
.footer-social:hover { border-color: var(--c-accent); background: var(--c-accent); color: white; }
.footer-col-title {
  font-size: 13px;
  font-weight: 700;
  color: white;
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 14px; color: rgba(255,255,255,.55); transition: color .2s; }
.footer-links a:hover { color: white; }
.footer-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px !important;
  border: 2px solid var(--c-accent) !important;
  border-radius: 4px;
  color: var(--c-accent) !important;
  font-weight: 600;
  font-size: 14px;
  transition: all .3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  position: relative;
  overflow: hidden;
}
.footer-cta-btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: var(--c-accent);
  z-index: -1;
  transition: left .3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.footer-cta-btn:hover {
  color: white !important;
  border-color: var(--c-accent) !important;
}
.footer-cta-btn:hover::before {
  left: 0;
}
.footer-cta-btn svg {
  display: inline-block;
  transition: transform .3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.footer-cta-btn:hover svg {
  transform: translateX(4px);
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.07);
  padding-top: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}
::selection { background: var(--c-accent); color: #fff; }
*:focus { outline: none; }
*:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============================================================
   SCROLL REVEAL — GSAP handles animation; CSS only prevents FOUC
   ============================================================ */
.rev, .rev-left, .rev-right, .rev-scale { opacity: 0; will-change: opacity, transform; }
@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.7); opacity: .45; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* ── 1024px tablet ────────────────────────────────────────── */

/* ── 768px mobile ─────────────────────────────────────────── */

/* ── 480px small mobile ───────────────────────────────────── */

/* ============================================================
   COMPONENT SUPPORT — classes used by sarpada-nav / sarpada-footer
   ============================================================ */
/* Custom elements default to inline — force block so layout matches old <nav>/<footer> */
sarpada-nav, sarpada-footer { display: block; }

/* Footer logo (was inline style="height:80px;width:auto;display:block;margin-bottom:16px;") */
.footer-logo {
  height: 80px;
  width: auto;
  display: block;
  margin-bottom: 16px;
}

/* Footer CTA list item top margin (was inline style="margin-top:16px;") */
.footer-cta-li {
  margin-top: 16px;
}

/* GMAV Technologies credit link (was inline style) */
.footer-credit {
  color: var(--c-accent);
  text-decoration: none;
  font-weight: 600;
}

/* ============================================================
   UTILITY CLASSES — replace recurring inline styles
   ============================================================ */
/* Avatar images: cover container, top-aligned (founder + team cards) */
.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* Generic responsive image (fills container, preserves aspect) */
.img-fluid {
  width: 100%;
  height: auto;
  display: block;
}
.img-fluid-rounded {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--r);
}

/* LinkedIn icon link beside name — replaces inline style + onmouseover hack */
.linkedin-icon-link {
  display: inline-flex;
  align-items: center;
  color: var(--c-accent);
  flex-shrink: 0;
  opacity: 0.85;
  transition: opacity 0.2s;
}
.linkedin-icon-link:hover,
.linkedin-icon-link:focus-visible {
  opacity: 1;
}

/* Name row with inline LinkedIn icon (founder/team cards) */
.name-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Reveal animation delay shorthand */
.rev-delay-1 { transition-delay: .08s; }

/* ============================================================
   RESPONSIVE — small mobile (≤ 480px)
   Collapse 2-column grids, kill horizontal-overflow side effects
   ============================================================ */
@media (max-width: 480px) {
  /* Force two-col layouts to single column */
  .tech-works-inner,
  .challenges-grid,
  .founders-grid,
  .app-cols,
  .footer-inner {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  /* Drop side-by-side spacing on challenges items */
  .challenge-item:nth-child(odd),
  .challenge-item:nth-child(even) {
    padding: 16px 0 !important;
    border-right: none !important;
    border-left: none !important;
  }

  /* Cap any wayward hero/heading horizontal spill */
  h1, h2, .inner-hero-heading, .hero-headline, .section-heading {
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  /* Reduce wrap padding to give content more space */
  .wrap { padding: 0 14px !important; }

  /* Tighten section padding on mobile so dark/light section
     boundaries don't leave large solid-color bands. */
  .problem-section,
  .tech-section,
  .applications-section,
  .about-section,
  .cta-section { padding-top: 56px !important; padding-bottom: 56px !important; }
}

/* ============================================================
   NUCLEAR OVERFLOW GUARD — three layers of defense.
   1. html `overflow: clip` (modern browsers, no scroll context)
   2. fallback `overflow-x: hidden` on html for browsers w/o clip
      support (Safari < 15.4). Doesn't create scroll context at
      html level (only body would), so window.scrollY still works.
   3. wrap container caps at 100% to prevent any rogue child
      from causing body to exceed viewport width.
   ============================================================ */
html {
  overflow-x: hidden;    /* fallback */
  overflow-x: clip;      /* modern */
}
body {
  position: relative;
  width: 100%;
  max-width: 100%;
}
.wrap { max-width: min(var(--max-w), 100%); }

/* ============================================================
   GSAP REVEAL — CSS fallback if JS fails / matchMedia mismatch.
   If GSAP runs, it overrides via inline style (higher specificity).
   If GSAP fails, content shows in final state instead of being
   stuck at initial translate(-52px) etc.
   ============================================================ */
@media (prefers-reduced-motion: reduce), (max-width: 1px) { /* never */ }
.no-js .rev,
.no-js .rev-left,
.no-js .rev-right,
.no-js .rev-scale { opacity: 1 !important; transform: none !important; }

/* Safety fade-in after 3s — if GSAP fails to load/run, content
   becomes visible. We only touch opacity (not transform) so GSAP
   animations still take effect if they fire later. */
@keyframes revSafetyShow { to { opacity: 1; } }
.rev, .rev-left, .rev-right, .rev-scale {
  animation: revSafetyShow 0.4s ease-out 3s forwards;
}

/* ============================================================
   MOBILE — bulletproof at ≤480px
   ============================================================ */
@media (max-width: 480px) {
  /* No element may exceed viewport width */
  body, .hero, .stats-bar, .problem-section, .tech-section,
  .applications-section, .about-section, .cta-section,
  .deliver-section, .industries-section, .research-section,
  .team-section, .innovation-section, .footer-inner,
  section, footer {
    max-width: 100vw;
    overflow-x: clip;
    overflow-x: hidden;
  }

  /* Hero specifically — clip any oversized bg/canvas */
  .hero, .inner-hero { overflow: hidden !important; }

  /* Partners marquee parent */
  .partners-logos-wrap { max-width: 100vw; overflow: hidden; }

  /* MOBILE: kill GSAP horizontal reveals entirely — they cause
     content to render off-canvas if ScrollTrigger fails to fire
     (Safari iOS quirk with fixed nav + viewport meta). Vertical
     reveals + opacity fades stay intact. */
  .rev-left,
  .rev-right {
    transform: none !important;
    opacity: 1 !important;
  }

  /* Stats bar — kill first-child padding-left leftover from 1024
     media query so all 4 stacked items align flush-left. */
  .stats-bar-item,
  .stats-bar-item:first-child,
  .stats-bar-item:last-child {
    padding: 24px 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

/* ============================================================
   MOBILE NAV — fix duplicate close icon
   ============================================================ */
/* When drawer is open, hamburger morphs into an X (via .open class).
   That X handles close. Hide the standalone .mobile-nav-close inside
   the drawer so users don't see two X icons stacked at top-right. */
.mobile-nav-close {
  display: none !important;
}
