/* Global Styles & Layout */
*, *::before, *::after { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
}

html { 
  scroll-behavior: smooth; 
}

body { 
  background: var(--bg-page); 
  color: var(--fg-1); 
  font-family: var(--font-body); 
  -webkit-font-smoothing: antialiased; 
  overflow-x: hidden;
}

::selection { 
  background: rgba(0, 184, 230, 0.25); 
  color: var(--fg-1); 
}

/* Custom Scrollbar */
::-webkit-scrollbar { 
  width: 6px; 
}

::-webkit-scrollbar-track { 
  background: var(--bg-page); 
}

::-webkit-scrollbar-thumb { 
  background: #1E2B3F; 
  border-radius: 3px; 
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-cyan-700);
}

/* Accessibility & Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Premium Footer Layout & Typography */
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.8fr 1fr;
  gap: 48px;
}

.footer-heading {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-primary);
  margin-bottom: 24px;
  position: relative;
  display: inline-block;
}

.footer-heading::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 16px;
  height: 2px;
  background: var(--cyan);
  border-radius: 1px;
  transition: width 200ms ease;
}

.footer-column:hover .footer-heading::after {
  width: 28px;
}

.footer-link {
  font-family: var(--font-body);
  font-size: 13.5px;
  color: var(--fg-secondary);
  text-decoration: none;
  transition: all 200ms var(--ease);
  display: inline-flex;
  align-items: center;
}

.footer-link:hover {
  color: var(--cyan);
  transform: translateX(4px);
}

.footer-text-item {
  font-family: var(--font-body);
  font-size: 13.5px;
  color: var(--fg-secondary);
  display: inline-flex;
  align-items: center;
  transition: color 200ms ease;
}

.footer-column:hover .footer-text-item {
  color: var(--fg-primary);
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* Responsive Grid & Layout System */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(440px, 1fr));
  gap: 20px;
}

@media (max-width: 960px) {
  .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  }
}

@media (max-width: 520px) {
  .services-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
}

@media (max-width: 868px) {
  .why-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

.credentials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

@media (max-width: 600px) {
  .credentials-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
}

@media (max-width: 960px) {
  .contact-grid {
    gap: 48px;
  }
}

@media (max-width: 868px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 520px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 64px;
  border-top: 1px solid var(--border);
  padding-top: 32px;
}

.hero-stat-item {
  border-right: 1px solid var(--border);
  padding: 0 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero-stat-item:last-child {
  border-right: none;
}

@media (max-width: 868px) {
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 0;
  }
  .hero-stat-item {
    border-right: none;
    padding: 0 16px;
  }
  .hero-stat-item:nth-child(odd) {
    border-right: 1px solid var(--border);
  }
}

@media (max-width: 480px) {
  .hero-stats {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .hero-stat-item {
    border-right: none !important;
    padding: 0 0 16px 0 !important;
    border-bottom: 1px solid var(--border);
  }
  .hero-stat-item:last-child {
    border-bottom: none;
    padding-bottom: 0 !important;
  }
}

/* Mobile Header / Navigation Elements */
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--fg-2);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  transition: all 200ms ease;
}

.mobile-menu-btn:hover {
  background: var(--bg-elevated);
  color: var(--fg-1);
}

@media (max-width: 868px) {
  .desktop-nav {
    display: none;
  }
  .mobile-menu-btn {
    display: flex;
  }
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
  position: fixed;
  top: 84px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-page);
  z-index: 99;
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  overflow-y: auto;
  border-top: 1px solid var(--border);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  transform: translateY(-20px);
  opacity: 0;
  visibility: hidden;
  transition: all 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-nav-overlay.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.mobile-nav-link {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--fg-2);
  text-decoration: none;
  background: none;
  border: none;
  text-align: left;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-muted);
  cursor: pointer;
  width: 100%;
  transition: all 200ms ease;
}

.mobile-nav-link:hover {
  color: var(--cyan);
  padding-left: 8px;
}

.deliverable-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  align-items: start;
}

@media (max-width: 868px) {
  .deliverable-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* ─── ENTER ENTRANCE ANIMATIONS ─────────────────────────── */

/* Staggered fade-up for components */
@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-up {
  opacity: 0;
  animation: heroFadeUp 900ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Delay modifiers */
.delay-1 { animation-delay: 150ms; }
.delay-2 { animation-delay: 300ms; }
.delay-3 { animation-delay: 450ms; }
.delay-4 { animation-delay: 600ms; }
.delay-5 { animation-delay: 750ms; }

/* HUD Right Coordinator Slide-in */
@keyframes hudCoordSlide {
  from {
    opacity: 0;
    transform: translateX(32px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-coord {
  opacity: 0;
  animation: hudCoordSlide 1100ms cubic-bezier(0.16, 1, 0.3, 1) forwards 100ms;
}

/* Ambient cybernetic sweep scanline */
@keyframes hudScan {
  0% {
    top: 0%;
    opacity: 0;
  }
  5% {
    opacity: 0.8;
  }
  85% {
    opacity: 0.8;
  }
  100% {
    top: 100%;
    opacity: 0;
  }
}

.hud-scanline {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  box-shadow: 0 0 10px var(--cyan), 0 0 20px var(--cyan);
  pointer-events: none;
  z-index: 10;
  opacity: 0;
  animation: hudScan 2.2s cubic-bezier(0.16, 1, 0.3, 1) forwards 200ms;
}

/* ─── SCROLL REVEAL ANIMATIONS ──────────────────────────── */

.scroll-reveal {
  opacity: 0;
  transition: opacity 900ms cubic-bezier(0.16, 1, 0.3, 1), transform 900ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

/* 1. Services: Sequential Hardware Init Scan */
.reveal-services {
  transform: translateY(40px);
}
.reveal-services.in-view {
  opacity: 1;
  transform: translateY(0);
}
.reveal-services .service-card {
  opacity: 0;
  transform: scale(0.96) translateY(24px);
  transition: opacity 800ms cubic-bezier(0.16, 1, 0.3, 1), transform 800ms cubic-bezier(0.16, 1, 0.3, 1), border-color 250ms ease, background-color 250ms ease, box-shadow 250ms ease;
}
.reveal-services.in-view .service-card:nth-child(1) { transition-delay: 150ms; opacity: 1; transform: scale(1) translateY(0); }
.reveal-services.in-view .service-card:nth-child(2) { transition-delay: 300ms; opacity: 1; transform: scale(1) translateY(0); }
.reveal-services.in-view .service-card:nth-child(3) { transition-delay: 450ms; opacity: 1; transform: scale(1) translateY(0); }
.reveal-services.in-view .service-card:nth-child(4) { transition-delay: 600ms; opacity: 1; transform: scale(1) translateY(0); }

/* 2. Advantage: Technical Blueprint Slide-in */
.reveal-advantage-left {
  transform: translateX(-40px);
}
.reveal-advantage-right {
  transform: translateX(40px);
}
.reveal-advantage-left.in-view,
.reveal-advantage-right.in-view {
  opacity: 1;
  transform: translateX(0);
}

/* 3. Credentials: Grid Telemetry Bootstrap */
.reveal-credentials {
  transform: translateY(30px);
}
.reveal-credentials.in-view {
  opacity: 1;
  transform: translateY(0);
}
.reveal-credentials .credential-card-wrapper {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms cubic-bezier(0.16, 1, 0.3, 1), transform 700ms cubic-bezier(0.16, 1, 0.3, 1), border-color 250ms ease, background-color 250ms ease;
}
.reveal-credentials.in-view .credential-card-wrapper:nth-child(1) { transition-delay: 50ms; opacity: 1; transform: translateY(0); }
.reveal-credentials.in-view .credential-card-wrapper:nth-child(2) { transition-delay: 150ms; opacity: 1; transform: translateY(0); }
.reveal-credentials.in-view .credential-card-wrapper:nth-child(3) { transition-delay: 250ms; opacity: 1; transform: translateY(0); }
.reveal-credentials.in-view .credential-card-wrapper:nth-child(4) { transition-delay: 350ms; opacity: 1; transform: translateY(0); }
.reveal-credentials.in-view .credential-card-wrapper:nth-child(5) { transition-delay: 450ms; opacity: 1; transform: translateY(0); }
.reveal-credentials.in-view .credential-card-wrapper:nth-child(6) { transition-delay: 550ms; opacity: 1; transform: translateY(0); }

/* 4. Contact: Console Terminal Unlocking */
.reveal-contact-left {
  transform: scale(0.97) translateX(-24px);
}
.reveal-contact-right {
  transform: scale(0.97) translateY(24px);
}
.reveal-contact-left.in-view,
.reveal-contact-right.in-view {
  opacity: 1;
  transform: scale(1) translate(0);
}


