
/* ==========================================
   LENIS SMOOTH SCROLL BOILERPLATE
   Prevents jitter and scroll fighting
========================================== */
html.lenis, html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

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

body {
    font-family: 'Poppins', sans-serif;
}

/* Loading Bar Animation */
@keyframes loadBar {
    0% { width: 0%; transform: translateX(-100%); }
    100% { width: 100%; transform: translateX(0%); }
}
.animate-load-bar {
    animation: loadBar 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* 
  Clean Editorial / Minimalist Tech Styles
  With Spring Physics & Dynamic Interactions
*/

:root {
  /* Let Lenis handle the scrolling */
}

body {
  overflow-x: hidden;
  background-color: #FAFAF9; /* stone-50 */
}

/* Subtle grid texture */
.bg-grid-pattern {
  background-size: 32px 32px;
  background-image: 
    linear-gradient(to right, rgba(0,0,0,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0,0,0,0.04) 1px, transparent 1px);
  mask-image: linear-gradient(to bottom, black 20%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 20%, transparent 100%);
}

/* --- DYNAMIC SPRING ANIMATIONS (Anti-kaku) --- */
.spring-interactive {
  transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.2), 
              box-shadow 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.2),
              border-color 0.3s ease;
}

.spring-interactive:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 20px 40px -15px rgba(0,0,0,0.1);
}

.btn-spring {
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.4), background-color 0.2s ease;
}
.btn-spring:hover {
  transform: translateY(-4px) scale(1.05);
}
.btn-spring:active {
  transform: translateY(2px) scale(0.95);
}

/* --- LOAD ANIMATIONS (Cinematic Blur) --- */
.fade-up-enter {
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  filter: blur(8px);
  animation: crispFadeUp 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }

@keyframes crispFadeUp {
  0% {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
    filter: blur(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* --- SCROLL REVEAL (Cinematic Blur) --- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  filter: blur(8px);
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1),
              transform 1.2s cubic-bezier(0.16, 1, 0.3, 1),
              filter 1.2s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.delay-stagger-1 { transition-delay: 100ms; }
.delay-stagger-2 { transition-delay: 200ms; }
.delay-stagger-3 { transition-delay: 300ms; }
.delay-stagger-4 { transition-delay: 400ms; }

/* --- PRECISION CARDS --- */
.tech-card {
  position: relative;
  background: #ffffff;
  border: 1px solid #E7E5E4;
  border-radius: 1rem;
}

/* Elegant floating */
.animate-float-subtle {
  animation: floatSubtle 6s ease-in-out infinite;
}

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

/* Typewriter Cursor Blink */
.animate-blink {
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* --- NAV LOGIC --- */
.nav-hidden {
  transform: translate(-50%, 150%) !important;
  opacity: 0;
}
@media (min-width: 1024px) {
  .nav-hidden {
    transform: translate(-50%, -150%) !important;
  }
}

/* --- CUSTOM SCROLLBAR --- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { 
  background: #D6D3D1; 
  border-radius: 10px; 
}
::-webkit-scrollbar-thumb:hover { background: #A8A29E; }

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
    transform: none !important;
  }
}
/* Theme Transition & Marquee */
.theme-transition, .theme-transition *, .theme-transition *:before, .theme-transition *:after {
    transition: background-color 0.5s ease, border-color 0.5s ease, color 0.5s ease !important;
}

@keyframes marquee {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-50%); }
}

.animate-marquee {
    animation: marquee 30s linear infinite;
    width: 200%;
}

/* Text Outline (Stroke Only) */
.text-outline {
    -webkit-text-fill-color: transparent !important;
    -webkit-text-stroke: 1.5px currentColor;
}

/* Buttery Smooth Easing (Emil Kowalski Standard) */
.ease-spring {
    transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.ease-bounce {
    transition-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

/* Text Outline Thick */
.text-outline-thick {
    -webkit-text-fill-color: transparent !important;
    -webkit-text-stroke: 3px currentColor;
}

/* Performant Legibility Cloud (Replaces heavy blur) */
.legibility-cloud {
    background: radial-gradient(circle at center, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.7) 40%, rgba(255,255,255,0) 75%);
}
.dark .legibility-cloud {
    background: radial-gradient(circle at center, rgba(12,10,9,0.95) 0%, rgba(12,10,9,0.7) 40%, rgba(12,10,9,0) 75%);
}

/* Optimize Marquee rendering */
.animate-marquee {
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
}
