﻿/* =========================================================
   NEXUS ENGINEERING GROUP — Global Design System
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Orbitron:wght@400;600;700;900&display=swap');

/* ── CSS Custom Properties ──────────────────────────────── */
:root {
  /* Brand Colors */
  --nexus-blue:       #0A84FF;
  --nexus-blue-dim:   #0866CC;
  --nexus-blue-glow:  rgba(10,132,255,0.35);
  --deep-navy:        #08121E;
  --slate-dark:       #121D2C;
  --slate-mid:        #1B283A;
  --steel-dark:       #141D29;
  --medium-grey:      #8A9BB0;
  --light-grey:       #B8C8D8;
  --pure-white:       #F0F4FF;
  --off-white:        #CBD8E8;
  --neon-cyan:        #00E5FF;
  --neon-cyan-glow:   rgba(0,229,255,0.3);
  --neon-green:       #39FF14;
  --neon-green-glow:  rgba(57,255,20,0.25);

  /* Biomedical palette */
  --bio-bg:           #F4F8FF;
  --bio-surface:      #FFFFFF;
  --bio-blue:         #0058CC;
  --bio-blue-light:   #EBF4FF;
  --bio-text:         #0A1628;
  --bio-muted:        #5A7A9A;

  /* Industrial palette */
  --ind-bg:           #0A0E14;
  --ind-surface:      #111820;
  --ind-accent:       #3A4A5C;
  --ind-orange:       #FF6B35;
  --ind-text:         #E0E8F0;
  --ind-muted:        #6A7A8A;

  /* Typography */
  --font-body:    'Inter', system-ui, sans-serif;
  --font-display: 'Orbitron', 'Inter', sans-serif;

  /* Spacing scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --space-5xl: 8rem;

  /* Border radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  /* Transitions */
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out:    cubic-bezier(0.0, 0.0, 0.2, 1);
  --dur-fast:    150ms;
  --dur-mid:     300ms;
  --dur-slow:    600ms;

  /* Shadows */
  --shadow-sm:   0 2px 8px rgba(0,0,0,0.15);
  --shadow-md:   0 8px 24px rgba(0,0,0,0.25);
  --shadow-lg:   0 20px 60px rgba(0,0,0,0.4);
  --shadow-blue: 0 0 30px rgba(10,132,255,0.3);
  --shadow-cyan: 0 0 30px rgba(0,229,255,0.3);

  /* Layout */
  --max-width: 1280px;
  --header-h: 72px;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ── Page Transition Overlay ─────────────────────────────── */
#page-transition {
  position: fixed;
  inset: 0;
  background: var(--deep-navy);
  z-index: 9999;
  pointer-events: none;
  transform: scaleY(0);
  transform-origin: bottom;
}

/* ── Shared Navigation ───────────────────────────────────── */
.nav-global {
  position: fixed;
  top: 0; left: 0; width: 100%;
  padding: 1rem 0;
  z-index: 1000;
  transition: all 0.4s var(--ease-out);
  background: #ffffff;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.nav-global.scrolled {
  padding: 0.8rem 0;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(15px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #1A202C;
}

.nav-logo img,
.footer-logo img {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  object-fit: contain;
}

.nav-logo .logo-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--nexus-blue), var(--neon-cyan));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  font-weight: 900;
  color: white;
  box-shadow: 0 0 20px var(--nexus-blue-glow);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  margin-left: auto;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: #4A5568;
  letter-spacing: 0.02em;
  transition: color var(--dur-fast) var(--ease-smooth);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--nexus-blue);
  transition: width var(--dur-mid) var(--ease-smooth);
  border-radius: 2px;
}

.nav-links a:hover { color: #000; }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--nexus-blue); }
.nav-links a.active::after { width: 100%; }

.nav-cta {
  margin-left: var(--space-lg);
  padding: 0.5rem 1.25rem;
  background: var(--nexus-blue);
  color: white !important;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.875rem;
  transition: background var(--dur-mid) var(--ease-smooth),
              box-shadow var(--dur-mid) var(--ease-smooth),
              transform var(--dur-fast) var(--ease-bounce) !important;
}

.nav-cta:hover {
  background: var(--nexus-blue-dim) !important;
  box-shadow: var(--shadow-blue) !important;
  transform: translateY(-1px);
}

.nav-cta::after { display: none !important; }

/* Mobile hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  margin-left: auto;
  padding: 8px;
}
.nav-hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: #1A202C;
  border-radius: 2px;
  transition: all var(--dur-mid) var(--ease-smooth);
}

/* ── Section Utilities ───────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--nexus-blue);
  margin-bottom: var(--space-md);
}

.section-label::before {
  content: '';
  width: 20px; height: 2px;
  background: var(--nexus-blue);
  border-radius: 2px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.section-body {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--medium-grey);
  max-width: 640px;
  margin-top: var(--space-lg);
}

/* ── Reveal animations (initial state) ───────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}
.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}
.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* Staggered children */
.stagger > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.stagger.visible > *:nth-child(1) { opacity:1; transform:translateY(0); transition-delay: 0.05s; }
.stagger.visible > *:nth-child(2) { opacity:1; transform:translateY(0); transition-delay: 0.15s; }
.stagger.visible > *:nth-child(3) { opacity:1; transform:translateY(0); transition-delay: 0.25s; }
.stagger.visible > *:nth-child(4) { opacity:1; transform:translateY(0); transition-delay: 0.35s; }
.stagger.visible > *:nth-child(5) { opacity:1; transform:translateY(0); transition-delay: 0.45s; }
.stagger.visible > *:nth-child(6) { opacity:1; transform:translateY(0); transition-delay: 0.55s; }

/* ── FOOTER ──────────────────────────────────────────────── */
.footer-global {
  background: #f8f9fa;
  padding: var(--space-4xl) 0 var(--space-xl);
  border-top: 1px solid rgba(0,0,0,0.05);
  color: #4A5568;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-3xl);
  align-items: start;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: var(--space-lg);
  color: #1A202C;
  line-height: 1.2;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer-brand p {
  max-width: 270px;
  margin-bottom: var(--space-lg);
  font-size: 0.875rem;
  line-height: 1.65;
  color: #4A5568;
}

.footer-social {
  display: flex;
  gap: var(--space-sm);
}
.footer-social a {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(0,0,0,0.06);
  display: flex; align-items: center; justify-content: center;
  color: #4A5568;
  transition: background var(--dur-mid), color var(--dur-mid);
  font-size: 0.85rem;
}
.footer-social a:hover {
  background: var(--nexus-blue);
  color: white;
}

.footer-col h4,
.footer-col-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #0F172A;
  margin-bottom: var(--space-lg);
}
.footer-links { display: flex; flex-direction: column; gap: var(--space-sm); }
.footer-links a, .footer-col ul a {
  font-size: 0.9rem;
  color: #4A5568;
  transition: color var(--dur-mid);
}
.footer-links a:hover, .footer-col ul a:hover { color: var(--nexus-blue); }

.footer-contact { display: flex; flex-direction: column; gap: var(--space-sm); }
.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.875rem;
  color: #4A5568;
  line-height: 1.5;
}
.footer-contact .c-icon { flex-shrink: 0; }

.footer-col .contact-item {
  display: flex;
  gap: var(--space-sm);
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: var(--space-sm);
  color: #4A5568;
}
.footer-col .contact-item strong { color: #0F172A; }

.footer-bottom {
  border-top: 1px solid rgba(0,0,0,0.08);
  padding-top: var(--space-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #718096;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.875rem 2rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  transition: all var(--dur-mid) var(--ease-smooth);
  white-space: nowrap;
}

.btn-primary {
  background: var(--nexus-blue);
  color: white;
  box-shadow: 0 4px 20px var(--nexus-blue-glow);
}
.btn-primary:hover {
  background: var(--nexus-blue-dim);
  box-shadow: 0 8px 30px var(--nexus-blue-glow);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--pure-white);
  border: 1.5px solid rgba(255,255,255,0.2);
}
.btn-outline:hover {
  border-color: var(--nexus-blue);
  color: var(--nexus-blue);
  box-shadow: 0 0 20px var(--nexus-blue-glow);
}

.btn-cyan {
  background: linear-gradient(135deg, var(--neon-cyan), #00AABB);
  color: var(--deep-navy);
  font-weight: 700;
  box-shadow: 0 4px 24px var(--neon-cyan-glow);
}
.btn-cyan:hover {
  box-shadow: 0 8px 40px var(--neon-cyan-glow);
  transform: translateY(-2px);
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --header-h: 60px; }
  .container { padding: 0 var(--space-lg); }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: rgba(5,13,26,0.97);
    backdrop-filter: blur(20px);
    padding: var(--space-xl);
    gap: var(--space-lg);
    align-items: flex-start;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-2xl); }
  .footer-bottom { flex-direction: column; gap: var(--space-md); text-align: center; }
}

@media (max-width: 480px) {
  .nav-logo span { display: none; }
}

/* ── Scrollbar styling ───────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--deep-navy); }
::-webkit-scrollbar-thumb { background: var(--slate-mid); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--nexus-blue); }

/* ── Selection ───────────────────────────────────────────── */
::selection { background: var(--nexus-blue); color: white; }

/* LIGHT THEME OVERRIDES */
:root {
  --deep-navy: #F8FAFC;
  --slate-dark: #F1F5F9;
  --slate-mid: #E2E8F0;
  --steel-dark: #CBD5E1;
  --medium-grey: #475569;
  --light-grey: #64748B;
  --pure-white: #0F172A;
}
body { background: var(--deep-navy); color: var(--pure-white); }
.btn-outline { border-color: rgba(0,0,0,0.15); color: var(--pure-white); }
.btn-outline:hover { background: rgba(0,0,0,0.05); }
.social-icon { background: rgba(0,0,0,0.05); color: #0F172A; }
.social-icon:hover { color: #fff; }
.nav-global { background: rgba(248, 250, 252, 0.9); border-bottom: 1px solid rgba(0,0,0,0.05); }
.nav-global.scrolled { background: rgba(255,255,255,0.95); box-shadow: 0 4px 20px rgba(0,0,0,0.05); }


/* =========================================================
   SOCIAL MEDIA ICONS � Circle outline style
   ========================================================= */
.footer-social {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: var(--space-md);
}

.social-icon {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1.5px solid rgba(0,0,0,0.18);
  color: #2D2D2D;
  font-size: 1rem;
  text-decoration: none;
  flex-shrink: 0;
  transition: transform 0.22s cubic-bezier(0.34,1.56,0.64,1),
              border-color 0.22s ease,
              box-shadow 0.22s ease,
              color 0.22s ease,
              background 0.22s ease;
}
.social-icon i { pointer-events: none; line-height: 1; }

/* Facebook hover */
.social-fb:hover {
  background: #1877F2;
  border-color: #1877F2;
  color: #fff;
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 6px 20px rgba(24,119,242,0.35);
}

/* Instagram hover */
.social-ig:hover {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
  border-color: #d6249f;
  color: #fff;
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 6px 20px rgba(214,36,159,0.35);
}

/* TikTok hover */
.social-tt:hover {
  background: #010101;
  border-color: #010101;
  color: #fff;
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* Footer gap fix - prevent footer floating when content sections load async */
#ind-services:empty,
#bio-services:empty { min-height: 60vh; }

/* =========================================================
   GLOBAL MOBILE FIXES (max 480px)
   ========================================================= */
@media (max-width: 480px) {
  /* Footer — single column, properly spaced */
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: var(--space-xl);
  }
  .footer-brand { margin-bottom: var(--space-md); }
  .footer-col h4, .footer-col-title { margin-top: var(--space-lg); }

  /* Social icons spacing */
  .footer-social { margin-top: var(--space-sm); }

  /* Containers */
  .container { padding: 0 var(--space-lg); }

  /* Section titles */
  .section-title { font-size: clamp(1.4rem, 7vw, 2rem); }
}
