/**
 * PT SUGI HARTI INDONESIA - CINEMATIC & ELEGANT FRONTEND SYSTEM
 * - Stand-By Sticky Navbar (Always visible & floating cleanly on scroll)
 * - Ultra-Smooth Page Transitions (Soft Fade-In, Top Neon Progress, Zero Jarring Flash)
 * - Sleek Modern Navmenu & Shimmer CTA
 * - Refined Scroll Reveal on Cards
 */

/* ============================================================
   1. GLOBAL SCROLL & VIEW TRANSITIONS
   ============================================================ */
@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: 0.2s cubic-bezier(0.4, 0, 1, 1) both shiViewOut;
}

::view-transition-new(root) {
  animation: 0.25s cubic-bezier(0, 0, 0.2, 1) both shiViewIn;
}

@keyframes shiViewOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes shiViewIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

html {
  scroll-behavior: smooth !important;
  scroll-padding-top: 85px !important;
}

/* Absolute Red Line Suppressor (All screens & devices) */
.navmenu a:before,
.navmenu a::before,
.navmenu > ul > li > a:before,
.navmenu > ul > li > a::before,
.navmenu .active:before,
.navmenu .active::before,
.navmenu a.active:before,
.navmenu a.active::before {
  display: none !important;
  content: none !important;
  width: 0 !important;
  height: 0 !important;
  opacity: 0 !important;
}

html, body {
  overflow-x: clip !important;
  max-width: 100% !important;
}

/* ============================================================
   2. ELEGANT PAGE TRANSITIONS (SOFT FADE & PROGRESS LINE)
   ============================================================ */
@keyframes shiPageFadeIn {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Smooth fade-in for page content */
main.main {
  animation: shiPageFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Page exit state when navigating */
body.shi-page-leaving main.main {
  opacity: 0.3 !important;
  transform: translateY(-6px) !important;
  transition: opacity 0.16s ease, transform 0.16s ease !important;
}

/* Top Neon Progress Line */
.shi-curtain-top-bar {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 3px !important;
  background: transparent !important;
  z-index: 100000 !important;
  pointer-events: none !important;
}

.shi-curtain-top-bar .shi-progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #002F6C, #0088ff, #FFB100);
  box-shadow: 0 0 10px rgba(0, 136, 255, 0.8), 0 0 16px rgba(255, 177, 0, 0.6);
  transition: width 0.2s ease-out;
}

/* Minimalist backdrop transition */
.shi-page-curtain {
  display: none !important; /* Replaced by elegant progress line & soft fade */
}

/* ============================================================
   3. MODERN STAND-BY STICKY NAVBAR (ALWAYS VISIBLE ON SCROLL)
   ============================================================ */
#header.header {
  position: sticky !important;
  top: 0 !important;
  z-index: 9999 !important;
  width: 100% !important;
  background: rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: blur(16px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
  border-bottom: 1px solid rgba(0, 47, 108, 0.08) !important;
  box-shadow: 0 2px 12px rgba(0, 47, 108, 0.04) !important;
  padding: 12px 0 !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Stand-by compact mode on scroll */
#header.header.is-scrolled,
body.scrolled #header.header {
  padding: 8px 0 !important;
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(20px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(190%) !important;
  border-bottom: 1px solid rgba(0, 47, 108, 0.12) !important;
  box-shadow: 0 8px 24px -6px rgba(0, 47, 108, 0.12), 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

/* Logo scaling in stand-by */
#header .logo img {
  max-height: 48px !important;
  width: auto;
  transition: max-height 0.25s ease, transform 0.25s ease !important;
}

#header.header.is-scrolled .logo img,
body.scrolled #header .logo img {
  max-height: 40px !important;
}

#header .logo:hover img {
  transform: scale(1.03);
}

/* ============================================================
   4. CINEMATIC NAVMENU & INTERACTIVE GLOW LINKS
   ============================================================ */
@media (min-width: 1200px) {
  .navmenu {
    padding: 0 !important;
  }

  .navmenu ul {
    display: flex !important;
    gap: 4px !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
  }

  .navmenu > ul > li {
    padding: 0 !important;
  }

  .navmenu a,
  .navmenu a:focus {
    color: #334155 !important;
    font-size: 14.5px !important;
    font-weight: 600 !important;
    letter-spacing: 0.2px !important;
    padding: 8px 16px !important;
    border-radius: 24px !important;
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    text-decoration: none !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    background: transparent !important;
  }

  .navmenu > ul > li > a:before,
  .navmenu > ul > li > a::before {
    display: none !important;
  }

  /* Glow pill underline */
  .navmenu a::after {
    content: '' !important;
    position: absolute !important;
    bottom: 2px !important;
    left: 50% !important;
    width: 0 !important;
    height: 2.5px !important;
    background: linear-gradient(90deg, #002F6C, #0088ff) !important;
    border-radius: 4px !important;
    transform: translateX(-50%) !important;
    transition: width 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease !important;
  }

  /* Hover State */
  .navmenu a:hover {
    color: #002F6C !important;
    background: rgba(0, 47, 108, 0.05) !important;
    transform: translateY(-1px) !important;
  }

  .navmenu a:hover::after {
    width: 22px !important;
    box-shadow: 0 0 8px rgba(0, 136, 255, 0.5) !important;
  }

  /* Active State (Cinematic Pill Highlight with Gold Accent) */
  .navmenu a.active,
  .navmenu a.active:focus {
    color: #002F6C !important;
    font-weight: 700 !important;
    background: rgba(0, 47, 108, 0.08) !important;
  }

  .navmenu a.active::after {
    width: 26px !important;
    background: linear-gradient(90deg, #002F6C, #FFB100) !important;
    box-shadow: 0 0 8px rgba(255, 177, 0, 0.7) !important;
  }
}

/* ============================================================
   5. CTA BUTTON ("MINTA PENAWARAN") CINEMATIC GLOW & SHIMMER
   ============================================================ */
.header .btn-getstarted,
.header .btn-getstarted:focus {
  background: linear-gradient(135deg, #002F6C 0%, #004d99 100%) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  letter-spacing: 0.3px !important;
  border-radius: 50px !important;
  text-decoration: none !important;
  position: relative !important;
  overflow: hidden !important;
  box-shadow: 0 4px 14px rgba(0, 47, 108, 0.25) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
}

@media (min-width: 1200px) {
  .header .btn-getstarted,
  .header .btn-getstarted:focus {
    font-size: 13.5px !important;
    padding: 9px 22px !important;
  }
}

/* Shimmer Light Beam Sweep Effect */
.header .btn-getstarted::before {
  content: '' !important;
  position: absolute !important;
  top: -50% !important;
  left: -70% !important;
  width: 50% !important;
  height: 200% !important;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.45),
    transparent
  ) !important;
  transform: rotate(25deg) !important;
  transition: none !important;
}

.header .btn-getstarted:hover::before {
  left: 150% !important;
  transition: left 0.75s ease-in-out !important;
}

.header .btn-getstarted:hover {
  transform: translateY(-2px) scale(1.02) !important;
  box-shadow: 0 8px 22px rgba(0, 77, 153, 0.38), 0 0 14px rgba(255, 177, 0, 0.3) !important;
  color: #ffffff !important;
}

.header .btn-getstarted:active {
  transform: translateY(0) scale(0.98) !important;
}

/* ============================================================
   6. CINEMATIC MOBILE DRAWER MENU
   ============================================================ */
@media (max-width: 1199px) {
  .mobile-nav-toggle {
    color: #002F6C !important;
    font-size: 30px !important;
    cursor: pointer !important;
    transition: transform 0.3s ease, color 0.2s ease !important;
  }

  body.mobile-nav-active .mobile-nav-toggle {
    color: #ffffff !important;
    transform: rotate(90deg);
  }

  /* Release header containing block in cinematic.css */
  body.mobile-nav-active #header,
  body.mobile-nav-active .header,
  body.mobile-nav-active #header.header {
    position: static !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    filter: none !important;
    transform: none !important;
    contain: none !important;
    perspective: none !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body.mobile-nav-active .navmenu {
    transform: translate3d(0, 0, 0) !important;
  }
}

@keyframes shiFadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

/* ============================================================
   7. REFINED SCROLL REVEAL (CARDS ONLY, ZERO LAYOUT BREAKAGE)
   ============================================================ */
.shi-reveal-init {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.shi-reveal-init.shi-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Card Hover Micro-Lift */
.product-card,
.project-card,
.shi-team-card,
.info-item,
.quality-badge-card {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.product-card:hover,
.project-card:hover,
.shi-team-card:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 14px 30px -8px rgba(0, 47, 108, 0.16) !important;
}

/* Micro click ripple */
.shi-nav-clicked {
  transform: scale(0.96) !important;
  transition: transform 0.1s ease !important;
}
