/* ==========================================================================
   Puncture Solution - Sleek Black Animated Intro & Seamless Navbar Docking
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;600;700&family=Montserrat:wght@400;500;600&display=swap');

:root {
  --ps-gold: #fdb819;
  --ps-gold-light: #ffe066;
  --ps-gold-dark: #d49500;
  --ps-gold-glow: rgba(253, 184, 25, 0.5);
  --ps-black-bg: #000000;
  --ps-transition-curve: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Prevent body scroll during intro */
body.ps-intro-locked {
  overflow: hidden !important;
  height: 100vh !important;
  touch-action: none !important;
}

/* --------------------------------------------------------------------------
   Intro Overlay Main Container (Sleek Black Foundation)
   -------------------------------------------------------------------------- */
#ps-intro-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--ps-black-bg);
  background-image: 
    radial-gradient(circle at 50% 50%, rgba(253, 184, 25, 0.1) 0%, rgba(10, 10, 10, 0.9) 45%, #000000 80%);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.6s var(--ps-transition-curve), visibility 0.6s var(--ps-transition-curve);
  perspective: 1200px;
  overflow: hidden;
  user-select: none;
  contain: strict;
}

/* Overlay Dismissing State */
#ps-intro-overlay.ps-overlay-exit {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

#ps-intro-overlay.ps-hidden {
  display: none !important;
}

/* --------------------------------------------------------------------------
   Ambient Nanotech Canvas
   -------------------------------------------------------------------------- */
#ps-intro-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.75;
}

/* --------------------------------------------------------------------------
   Central Stage & Flying Logo Container
   -------------------------------------------------------------------------- */
.ps-intro-stage {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 680px;
  padding: 20px;
  text-align: center;
  transform-style: preserve-3d;
}

/* The Animated Flying Logo Container */
#ps-flying-logo-container,
.ps-intro-logo-box {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
  will-change: transform, opacity;
  animation: psLogoEntrance 1.1s var(--ps-transition-curve) forwards;
}

/* Smooth Entrance Fade-In Keyframes */
@keyframes psLogoEntrance {
  0% {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
    filter: blur(6px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0px);
    filter: blur(0px);
  }
}

/* Active flight state during FLIP transition to navbar */
#ps-flying-logo-flight-clone,
.ps-in-flight {
  position: fixed !important;
  z-index: 10000000 !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: none !important;
  animation: none !important;
  background: transparent !important;
  overflow: visible !important;
  will-change: transform !important;
  backface-visibility: hidden !important;
  -webkit-backface-visibility: hidden !important;
  transform-style: preserve-3d !important;
}

/* The Actual Logo Image */
.ps-intro-logo-img {
  display: block;
  width: auto;
  max-width: min(85vw, 420px);
  height: 84px;
  object-fit: contain;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.6));
  position: relative;
  z-index: 2;
}

#ps-flying-logo-flight-clone .ps-intro-logo-img,
.ps-in-flight .ps-intro-logo-img {
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35)) !important;
  max-width: 100% !important;
  width: 100% !important;
  height: 100% !important;
}

/* Holographic Specular Shine / Light Beam Sweep */
.ps-logo-shine {
  display: none !important;
}

@keyframes psLogoGentleHover {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-6px);
  }
}

/* --------------------------------------------------------------------------
   Loading Bar & Subheading Module (Directly Beneath Logo)
   -------------------------------------------------------------------------- */
.ps-intro-hud {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 340px;
  z-index: 10;
  transition: opacity 0.4s ease, transform 0.4s var(--ps-transition-curve);
  animation: psHudFadeIn 0.8s var(--ps-transition-curve) 0.2s forwards;
  opacity: 0;
}

@keyframes psHudFadeIn {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0px);
  }
}

.ps-hud-fade-out {
  opacity: 0 !important;
  transform: translateY(14px) scale(0.97) !important;
  pointer-events: none !important;
}

/* Loading Bar Track & Glowing Fill */
.ps-progress-wrapper {
  width: 100%;
  position: relative;
  margin-bottom: 16px;
}

.ps-progress-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.ps-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
  background: linear-gradient(90deg, #c98c00 0%, var(--ps-gold) 60%, var(--ps-gold-light) 100%);
  border-radius: 999px;
  box-shadow: 0 0 8px var(--ps-gold);
}

.ps-progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 12px;
  height: 100%;
  background: #ffffff;
  box-shadow: 0 0 8px #ffffff, 0 0 14px var(--ps-gold);
  border-radius: 50%;
}

/* Subheading: "Permanent Puncture Solution Loading…" */
.ps-subheading-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ps-subheading-text {
  font-family: 'Rajdhani', 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #e0e6ed;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9), 0 0 12px rgba(253, 184, 25, 0.3);
  display: inline-flex;
  align-items: center;
}

.ps-dots {
  display: inline-block;
  color: var(--ps-gold);
  margin-left: 2px;
  animation: psDotsBlink 1.4s infinite;
}

@keyframes psDotsBlink {
  0%, 20% { opacity: 0.2; }
  50% { opacity: 1; text-shadow: 0 0 8px var(--ps-gold); }
  100% { opacity: 0.2; }
}

/* --------------------------------------------------------------------------
   Skip Button
   -------------------------------------------------------------------------- */
.ps-skip-btn {
  display: none !important;
  position: absolute;
  bottom: 30px;
  right: 36px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: rgba(20, 20, 20, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 30px;
  color: #a6b3c4;
  font-family: 'Rajdhani', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.ps-skip-btn:hover {
  background: rgba(253, 184, 25, 0.2);
  border-color: var(--ps-gold);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6), 0 0 15px rgba(253, 184, 25, 0.35);
}

.ps-skip-btn i {
  font-size: 14px;
  color: var(--ps-gold);
  transition: transform 0.3s ease;
}

.ps-skip-btn:hover i {
  transform: translateX(3px);
}

/* --------------------------------------------------------------------------
   Navbar Target Highlight & Welcome Ping Effect
   -------------------------------------------------------------------------- */
.ps-navbar-docked-ping {
  position: relative;
}

.ps-navbar-docked-ping::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%) scale(1);
  border-radius: 12px;
  border: 2px solid var(--ps-gold);
  box-shadow: 0 0 22px var(--ps-gold);
  pointer-events: none;
  animation: psDockPing 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes psDockPing {
  0% {
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.6);
    opacity: 0;
  }
}

/* Clean Desktop Navbar Logo Presentation */
.main-nav .footer-logo,
.main-nav .navbar-brand {
  display: inline-flex !important;
  align-items: center !important;
  height: 65px !important;
  margin: 0 !important;
  position: relative !important;
  z-index: 100 !important;
}

.main-nav .footer-logo img,
.main-nav .navbar-brand img {
  height: 60px !important;
  width: auto !important;
  max-width: 270px !important;
  object-fit: contain !important;
  display: block !important;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.45));
  transition: transform 0.3s ease, filter 0.3s ease;
}

.main-nav .footer-logo:hover img,
.main-nav .navbar-brand:hover img {
  transform: scale(1.03);
  filter: drop-shadow(0 4px 14px rgba(253, 184, 25, 0.45));
}

/* Mobile Navbar Logo Presentation */
.mobile-nav .logo img,
.mobile-nav .centerInMobile .logo img {
  height: 36px !important;
  max-height: 36px !important;
  width: auto !important;
  max-width: 180px !important;
  object-fit: contain !important;
}

/* Replay Trigger */
.ps-intro-replay-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(253, 184, 25, 0.12);
  border: 1px solid rgba(253, 184, 25, 0.3);
  color: var(--ps-gold);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.5px;
}

.ps-intro-replay-btn:hover {
  background: var(--ps-gold);
  color: #000;
  box-shadow: 0 0 12px rgba(253, 184, 25, 0.4);
}

/* --------------------------------------------------------------------------
   Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .ps-intro-logo-img {
    max-width: min(80vw, 300px);
    height: 60px;
  }
  
  .ps-intro-hud {
    max-width: 280px;
    margin-top: 22px;
  }
  
  .ps-subheading-text {
    font-size: 11.5px;
    letter-spacing: 1.5px;
  }
  
  .ps-skip-btn {
    bottom: 20px;
    right: 20px;
    padding: 6px 14px;
    font-size: 10.5px;
  }
}

@media (max-width: 480px) {
  .ps-intro-logo-img {
    max-width: 250px;
    height: 52px;
  }
  
  .ps-intro-hud {
    max-width: 250px;
    margin-top: 18px;
  }
  
  .ps-subheading-text {
    font-size: 10.5px;
    letter-spacing: 1.2px;
  }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  #ps-intro-overlay {
    transition: opacity 0.2s ease;
  }
  .ps-logo-shine,
  #ps-flying-logo-container {
    animation: none !important;
  }
}
