/* ============================================
   Nordia Precision - Ultra-Premium Design System
   ============================================ */

body {
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
}

/* ---- Custom Cursor ---- */
.custom-cursor {
  position: fixed;
  width: 20px;
  height: 20px;
  border: 2px solid #0b3d93;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, border-color 0.3s, background-color 0.3s;
  mix-blend-mode: difference;
  background: transparent;
}

.custom-cursor.hover {
  width: 50px;
  height: 50px;
  border-color: #B87333;
  background: rgba(184, 115, 51, 0.1);
}

@media (max-width: 768px) {
  .custom-cursor { display: none; }
}

/* ---- Background Mesh ---- */
.bg-mesh {
  background-color: #f6f7f8;
  background-image:
    radial-gradient(at 0% 0%, rgba(11, 61, 147, 0.05) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(184, 115, 51, 0.05) 0px, transparent 50%);
}

/* ---- Hero Slider with Ken Burns ---- */
.slide-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  transform: scale(1);
}

.slide-image.active {
  opacity: 1;
  animation: kenburns 8s ease-in-out forwards;
}

@keyframes kenburns {
  0% { transform: scale(1); }
  100% { transform: scale(1.08); }
}

/* ---- Particles Canvas ---- */
#particles-canvas {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

/* ---- Scroll Reveal Animations ---- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-left {
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(60px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-scale.revealed {
  opacity: 1;
  transform: scale(1);
}

/* Stagger delays for sequential reveals */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }

/* ---- Navbar Shrink ---- */
nav.scrolled {
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: rgba(255, 255, 255, 0.85) !important;
  box-shadow: 0 4px 30px rgba(11, 61, 147, 0.08);
}

nav.scrolled .flex.justify-between {
  height: 4rem !important;
  transition: height 0.3s ease;
}

.dark nav.scrolled {
  background: rgba(16, 23, 34, 0.9) !important;
}

/* ---- 3D Tilt Cards ---- */
.tilt-card {
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(0.03, 0.98, 0.52, 0.99),
              box-shadow 0.4s ease;
}

.tilt-card:hover {
  box-shadow: 0 25px 60px rgba(11, 61, 147, 0.15),
              0 10px 20px rgba(0, 0, 0, 0.08);
}

.tilt-card .tilt-inner {
  transform: translateZ(30px);
  transition: transform 0.4s ease;
}

/* ---- Gradient Animated Border ---- */
.gradient-border {
  position: relative;
  overflow: hidden;
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: conic-gradient(from 0deg, #0b3d93, #B87333, #1e6fd9, #d4a574, #0b3d93);
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.5s ease;
  animation: spin-border 4s linear infinite;
}

.gradient-border:hover::before {
  opacity: 1;
}

.gradient-border::after {
  content: '';
  position: absolute;
  inset: 2px;
  background: inherit;
  border-radius: inherit;
  z-index: -1;
}

@keyframes spin-border {
  to { transform: rotate(360deg); }
}

/* ---- Button Effects ---- */
.btn-glow {
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
}

.btn-glow::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.btn-glow:hover::before {
  transform: translateX(100%);
}

.btn-glow:hover {
  box-shadow: 0 0 30px rgba(11, 61, 147, 0.4),
              0 0 60px rgba(11, 61, 147, 0.1);
}

/* Gradient animated CTA */
.btn-gradient-animated {
  background: linear-gradient(135deg, #0b3d93, #1e6fd9, #B87333, #0b3d93);
  background-size: 300% 300%;
  animation: gradient-shift 4s ease infinite;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Ripple effect */
.ripple {
  position: relative;
  overflow: hidden;
}

.ripple .ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transform: scale(0);
  animation: ripple-anim 0.6s ease-out;
  pointer-events: none;
}

@keyframes ripple-anim {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ---- Animated Underline Links ---- */
.link-animated {
  position: relative;
  text-decoration: none;
}

.link-animated::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #0b3d93, #B87333);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.link-animated:hover::after {
  width: 100%;
}

/* ---- Counter Animation ---- */
.counter {
  display: inline-block;
}

/* ---- Pulse Icon ---- */
.pulse-icon {
  animation: pulse-once 0.6s ease-out;
}

@keyframes pulse-once {
  0% { transform: scale(0.5); opacity: 0; }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

/* ---- Scroll Indicator ---- */
.scroll-indicator {
  animation: scroll-bounce 2s ease-in-out infinite;
}

@keyframes scroll-bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
  40% { transform: translateY(-12px) translateX(-50%); }
  60% { transform: translateY(-6px) translateX(-50%); }
}

/* ---- Typewriter Effect ---- */
.typewriter-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.typewriter-word.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Glassmorphism Utility ---- */
.glass {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.glass-dark {
  background: rgba(6, 29, 74, 0.4);
  backdrop-filter: blur(20px) saturate(200%);
  -webkit-backdrop-filter: blur(20px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ---- Testimonial Quote Glow ---- */
.quote-glow {
  text-shadow: 0 0 40px rgba(184, 115, 51, 0.3);
}

/* ---- Footer Animated Gradient ---- */
.footer-gradient {
  background: linear-gradient(135deg, #020617, #061d4a, #0b3d93, #061d4a, #020617);
  background-size: 400% 400%;
  animation: footer-gradient-shift 15s ease infinite;
}

@keyframes footer-gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  25% { background-position: 100% 50%; }
  50% { background-position: 100% 0%; }
  75% { background-position: 0% 100%; }
}

/* ---- Image Hover Zoom ---- */
.img-hover-zoom {
  overflow: hidden;
}

.img-hover-zoom img {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.img-hover-zoom:hover img {
  transform: scale(1.08);
}

/* ---- Flip Card ---- */
.flip-card {
  perspective: 1000px;
  cursor: pointer;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.flip-card-back {
  transform: rotateY(180deg);
}

/* ---- Material Symbols ---- */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ---- Smooth Page Transitions ---- */
body {
  animation: page-fade-in 0.4s ease-out;
}

@keyframes page-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---- Selection Color ---- */
::selection {
  background: rgba(11, 61, 147, 0.2);
  color: #0b3d93;
}

/* ---- Scrollbar Styling ---- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f6f7f8;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #0b3d93, #B87333);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #1e6fd9, #d4a574);
}
