/* ============================================================
   UPGRADES CSS — 2-Column Vertical Staggered Hero
   ============================================================ */

/* ============ Mobile Header ============== */
.mobile-logo-top {
  display: none;
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1001;
  height: 32px;
}

.mobile-logo-top img {
  height: 100%;
  width: auto;
}

body.light .mobile-logo-top .logo-dark {
  display: none;
}

body.light .mobile-logo-top .logo-light {
  display: block;
}

body:not(.light) .mobile-logo-top .logo-dark {
  display: block;
}

body:not(.light) .mobile-logo-top .logo-light {
  display: none;
}

/* ============ Global Elements ============== */
.service-card .img-wrap {
  width: 100%;
  aspect-ratio: 16 / 9 !important;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
}

.service-image {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

/* ============ HERO SECTION (REDESIGNED CAROUSEL V2) ============ */
.hero-split {
  position: relative;
  min-height: 100vh;
  background-color: var(--dark-bg);
  /* Strict Army Green */
  display: flex;
  align-items: center;
  overflow-x: clip;
  padding: 130px 0 80px;
  z-index: 10;
}

.hero-bg-elements {
  display: none;
  /* Removed orbs and noise for plane background */
}

.hero-split-container {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 60px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.hero-split-left {
  flex: 0 0 45%;
  position: relative;
  height: 720px;
}

.hero-carousel {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel-card {
  position: absolute;
  width: 320px;
  left: 50%;
  margin-left: -160px;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: #000;
  border: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  will-change: transform, opacity;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
  /* Force browser to rasterize at full resolution before scaling */
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  /* Prevent subpixel blur during animation */
  -webkit-font-smoothing: antialiased;
  image-rendering: crisp-edges;
  image-rendering: -webkit-optimize-contrast;
}

.carousel-card.active-card {
  border-color: var(--green-1);
  border-width: 3px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 30px rgba(138, 154, 91, 0.3);
  z-index: 10;
}

.carousel-card .card-inner {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-color: var(--dark-bg);
  /* Force GPU layer at full resolution — eliminates scale blur */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  image-rendering: crisp-edges;
  image-rendering: -webkit-optimize-contrast;
}

.hero-split-right {
  flex: 1;
  padding-left: 100px;
  padding-top: 40px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 24px;
  justify-content: center;
  /* Center to match box group */
  min-height: 620px;
  position: relative;
}

.hero-split-right::before {
  content: '';
  position: absolute;
  left: 50px;
  top: 20%;
  bottom: 40px;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--green-1), transparent);
  opacity: 0.3;
}

.hero-split-headline {
  font-family: 'Bebas Neue', cursive;
  font-size: clamp(2.8rem, 5.5vw, 4.8rem);
  font-weight: 700;
  background: linear-gradient(135deg, #ffffff 0%, #a3b18a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 0.95;
  text-transform: uppercase;
  margin: 0;
  opacity: 1;
  filter: drop-shadow(0 4px 12px rgba(138, 154, 91, 0.2));
}

body.light .hero-split-headline {
  background: linear-gradient(135deg, #1b2412 0%, #4b5320 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: none;
}

.hero-split-subhead {
  font-family: 'Poppins', sans-serif;
  font-size: 20px;
  font-weight: 500;
  color: #8A9A5B;
  margin-top: 0;
  display: block;
  opacity: 1;
}

.hero-split-subhead::before,
.hero-split-subhead::after {
  display: none !important;
}

.hero-split-desc {
  font-family: 'Poppins', sans-serif;
  font-size: 1.15rem;
  /* Larger font */
  color: #B8BFA8;
  line-height: 1.8;
  max-width: 580px;
  margin-top: 0;
  opacity: 1;
}

/* Infographic Cards */
.hero-infographics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 600px;
}

.h-info-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

body.light .h-info-card {
  background: rgba(27, 36, 18, 0.04);
  border-color: rgba(27, 36, 18, 0.1);
}

.h-info-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--green-1);
  transform: translateY(-2px);
}

.h-info-icon {
  font-size: 1.5rem;
}

.h-info-text {
  display: flex;
  flex-direction: column;
}

.h-info-text strong {
  font-family: var(--font-head);
  font-size: 1.4rem;
  /* Larger metric size */
  color: var(--green-1);
  letter-spacing: 1px;
  line-height: 1;
}

.h-info-text span {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

.hero-split-btns {
  display: flex;
  gap: 16px;
  margin-top: 0;
  opacity: 1;
}

.hero-split .hero-carousel,
.hero-split .hero-infographics {
  opacity: 1;
}

.btn-split-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #8A9A5B, #A3B18A);
  color: #000;
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 600;
  padding: 16px 40px;
  border-radius: 50px;
  text-decoration: none;
  border: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-split-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(138, 154, 91, 0.4);
}

.btn-split-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #8A9A5B;
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 600;
  padding: 14px 40px;
  border-radius: 50px;
  text-decoration: none;
  border: 2px solid #8A9A5B;
  transition: all 0.3s ease;
}

.btn-split-secondary:hover {
  background: rgba(138, 154, 91, 0.1);
  color: #fff;
}

/* Preloader (Keep) */
#preloader {
  position: fixed;
  inset: 0;
  background: #0D1108;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .hero-split {
    padding: 100px 0 60px;
    text-align: center;
  }

  .hero-split-container {
    flex-direction: column;
    gap: 30px;
    padding: 0 16px;
  }

  .hero-split-left {
    width: 100%;
    order: 1;
    height: 240px;
    margin-top: 90px;
    margin-bottom: 50px;
    overflow: hidden;
    isolation: isolate;
    position: relative;
    z-index: 1;
  }

  .carousel-card {
    width: 240px;
    margin-left: -120px;
  }

  .hero-split-right {
    width: 100%;
    order: 2;
    padding: 0;
    margin-top: 0;
    align-items: center;
    text-align: center;
    min-height: unset;
    position: relative;
    z-index: 2;
    /* Ensure text is always above the image visually */
  }

  .hero-split-headline {
    font-size: 48px;
    /* Make headline big as requested */
    text-align: center;
    line-height: 1.05;
    margin-bottom: 8px;
    /* Slight push for subline */
  }

  .hero-split-subhead {
    font-size: 16px;
    /* Decrease subheadline size */
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-split-desc {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    font-size: 14px;
    /* Slightly scale down description to fit mobile nicely */
  }

  .hero-infographics {
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-split-btns {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .btn-split-primary,
  .btn-split-secondary {
    width: 100%;
    max-width: 320px;
  }

  .hero-split-right::before {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero-split-left {
    height: 240px;
    margin-top: 80px;
    margin-bottom: 50px;
  }

  .hero-split-headline {
    font-size: 42px;
  }
}

/* 1. Logo — Just the logo in mobile */
.mobile-logo-top {
  display: none;
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1001;
}

@media (max-width: 900px) {
  .mobile-logo-top {
    display: block;
  }
}

.mobile-logo-top img {
  height: 36px;
  width: auto;
}

/* About page — smaller profile picture */
@media (max-width: 768px) {
  .about-avatar {
    width: 80px;
    height: 80px;
  }
}

/* Hero visibility fallback: keeps the first screen usable if JS or GSAP does not run. */
.hero-split .hero-split-headline,
.hero-split .hero-split-subhead,
.hero-split .hero-split-desc,
.hero-split .hero-infographics,
.hero-split .hero-split-btns,
.hero-split .hero-carousel,
.hero-split .carousel-card {
  opacity: 1;
  visibility: visible;
}

.hero-split .carousel-card:nth-child(1) {
  transform: translate3d(-300px, 20px, 0) scale(0.75);
  z-index: 1;
}

.hero-split .carousel-card:nth-child(2) {
  transform: translate3d(0, 275px, 0) scale(1.9);
  z-index: 3;
}

.hero-split .carousel-card:nth-child(3) {
  transform: translate3d(-300px, 531px, 0) scale(0.75);
  z-index: 2;
}

.hero-split .carousel-card:nth-child(n+4) {
  opacity: 0;
}

@media (max-width: 900px) {
  .hero-split {
    min-height: auto;
  }

  .hero-split .carousel-card {
    display: none;
  }

  .hero-split .carousel-card:nth-child(1) {
    display: block;
    left: 50%;
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
  }
}
