/* Custom scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #64748b; }

/* Smooth scroll */
html { scroll-behavior: smooth; }

/* ===== FLOATING PARTICLES (Hero) ===== */
.particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.08;
    animation: float linear infinite;
}
.particle-1 { width: 300px; height: 300px; background: #FCD34D; top: 10%; left: -5%; animation-duration: 20s; }
.particle-2 { width: 200px; height: 200px; background: #FBBF24; bottom: 20%; right: -5%; animation-duration: 25s; animation-delay: -5s; }
.particle-3 { width: 150px; height: 150px; background: #fff; top: 50%; left: 50%; animation-duration: 15s; animation-delay: -10s; }
.particle-4 { width: 100px; height: 100px; background: #D97706; top: 30%; right: 20%; animation-duration: 18s; animation-delay: -8s; }
.particle-5 { width: 80px; height: 80px; background: #fff; bottom: 30%; left: 20%; animation-duration: 22s; animation-delay: -3s; }

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); }
    25% { transform: translate(50px, -50px) scale(1.1) rotate(5deg); }
    50% { transform: translate(-30px, 50px) scale(0.9) rotate(-5deg); }
    75% { transform: translate(30px, 30px) scale(1.05) rotate(3deg); }
}

/* ===== HEADER ===== */
.header-scrolled {
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
    backdrop-filter: blur(20px) !important;
}

/* ===== TESTIMONIAL CAROUSEL ===== */
.testimonial-slide { display: none; opacity: 0; transition: opacity 0.8s ease-in-out; }
.testimonial-slide.active { display: block; opacity: 1; }

/* ===== PAGE TRANSITION ===== */
main { animation: pageIn 0.6s ease-out; }
@keyframes pageIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== TEXT GRADIENT ===== */
.text-gradient {
    background: linear-gradient(135deg, #D97706, #2F5249);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== CARD SHINE EFFECT ===== */
.card-shine { position: relative; overflow: hidden; }
.card-shine::after {
    content: '';
    position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: linear-gradient(to bottom right, rgba(255,255,255,0) 0%, rgba(255,255,255,0) 40%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0) 60%, rgba(255,255,255,0) 100%);
    transform: rotate(30deg) translate(-100%, -100%);
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    pointer-events: none;
}
.card-shine:hover::after {
    transform: rotate(30deg) translate(50%, 50%);
}

/* ===== MAGNETIC BUTTON ===== */
.btn-magnetic {
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.3s ease;
}
.btn-magnetic:hover {
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

/* ===== TILT CARD ===== */
.tilt-card {
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    transform-style: preserve-3d;
}
.tilt-card:hover {
    transform: perspective(1000px) rotateY(-3deg) rotateX(3deg) translateY(-8px);
}

/* ===== GLOWING BORDER ===== */
.glow-border {
    position: relative;
}
.glow-border::before {
    content: '';
    position: absolute; inset: -2px;
    background: linear-gradient(45deg, #FBBF24, #2F5249, #D97706, #457067);
    background-size: 300% 300%;
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
    animation: gradientBorder 4s ease infinite;
}
.glow-border:hover::before { opacity: 1; }
@keyframes gradientBorder {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ===== TYPING CURSOR ===== */
.typing-cursor::after {
    content: '|';
    animation: blink 0.8s step-end infinite;
    color: #FBBF24;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ===== MORPHING BLOB ===== */
.morph-blob {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation: morph 8s ease-in-out infinite;
}
@keyframes morph {
    0% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    25% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
    50% { border-radius: 40% 60% 60% 40% / 70% 30% 60% 50%; }
    75% { border-radius: 70% 30% 50% 50% / 40% 70% 40% 60%; }
    100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
}

/* ===== SVG ILLUSTRATION ANIMATIONS ===== */
.animate-pulse-slow { animation: pulseSlow 3s ease-in-out infinite; }
@keyframes pulseSlow {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

.animate-bounce-slow { animation: bounceSlow 2s ease-in-out infinite; }
@keyframes bounceSlow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.animate-float-dot { animation: floatDot 4s ease-in-out infinite; }
@keyframes floatDot {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(5px, -8px); }
    50% { transform: translate(-3px, 5px); }
    75% { transform: translate(4px, 3px); }
}

.animate-spin-very-slow { animation: spinSlow 30s linear infinite; }
@keyframes spinSlow { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.animate-spin-very-slow-reverse { animation: spinSlowReverse 25s linear infinite; }
@keyframes spinSlowReverse { from { transform: rotate(360deg); } to { transform: rotate(0deg); } }

.animate-glow { animation: glow 2s ease-in-out infinite; }
@keyframes glow {
    0%, 100% { filter: drop-shadow(0 0 4px rgba(251,191,36,0.4)); }
    50% { filter: drop-shadow(0 0 16px rgba(251,191,36,0.8)); }
}

.animate-sparkle { animation: sparkle 2s ease-in-out infinite; }
@keyframes sparkle {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.7; }
    50% { transform: scale(1.3) rotate(15deg); opacity: 1; }
}

.animate-twinkle { animation: twinkle 2.5s ease-in-out infinite; }
@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.5); }
}

.animate-flame { animation: flame 0.4s ease-in-out infinite alternate; }
@keyframes flame {
    from { transform: scaleY(1) scaleX(1); }
    to { transform: scaleY(1.15) scaleX(0.9); }
}

.animate-rocket-float { animation: rocketFloat 3s ease-in-out infinite; }
@keyframes rocketFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.animate-cloud { animation: cloudDrift 6s ease-in-out infinite; }
@keyframes cloudDrift {
    0%, 100% { transform: translateX(0); opacity: 0.3; }
    50% { transform: translateX(20px); opacity: 0.5; }
}

.animate-climber { animation: climberBob 2s ease-in-out infinite; }
@keyframes climberBob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.animate-slide-doc { animation: slideDoc 1s ease-out forwards; }
@keyframes slideDoc {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.animate-letter-pop { animation: letterPop 2s ease-in-out infinite; }
@keyframes letterPop {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.animate-fly-plane { animation: flyPlane 6s linear infinite; }
@keyframes flyPlane {
    0% { transform: translate(0, 0) rotate(0deg); opacity: 0; }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { transform: translate(100px, -60px) rotate(10deg); opacity: 0; }
}

/* SVG bar grow animation */
.svg-bar {
    animation: barGrow 1s ease-out forwards;
    transform-origin: bottom;
    transform: scaleY(0);
}
@keyframes barGrow {
    to { transform: scaleY(1); }
}

/* SVG line draw animation */
.svg-draw-line {
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    animation: drawLine 2s ease-out forwards;
}
@keyframes drawLine {
    to { stroke-dashoffset: 0; }
}

/* ===== SCROLL PROGRESS BAR ===== */
#scroll-progress {
    position: fixed; top: 0; left: 0; height: 3px; z-index: 9999;
    background: linear-gradient(90deg, #FBBF24, #D97706);
    transition: width 0.1s linear;
}

/* ===== BACK TO TOP ===== */
#back-to-top {
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}
#back-to-top.visible {
    opacity: 1; transform: translateY(0);
}
#back-to-top:not(.visible) {
    opacity: 0; transform: translateY(20px); pointer-events: none;
}

/* ===== ANIMATED UNDERLINE ===== */
.animated-underline {
    position: relative; display: inline-block;
}
.animated-underline::after {
    content: '';
    position: absolute; bottom: -4px; left: 0; width: 0; height: 3px;
    background: linear-gradient(90deg, #FBBF24, #D97706);
    border-radius: 2px;
    transition: width 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}
.animated-underline:hover::after { width: 100%; }

/* ===== STAGGER CHILDREN ===== */
.stagger-children > * {
    opacity: 0; transform: translateY(20px);
    animation: staggerIn 0.6s ease-out forwards;
}
.stagger-children > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.6s; }
@keyframes staggerIn {
    to { opacity: 1; transform: translateY(0); }
}

/* ===== PARALLAX SECTIONS ===== */
.parallax-bg {
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
}

/* ===== DECORATIVE GRID PATTERN ===== */
.grid-pattern {
    background-image:
        linear-gradient(rgba(47,82,73,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(47,82,73,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* ===== SECTION DECORATIVE DOTS ===== */
.dot-pattern {
    background-image: radial-gradient(rgba(47,82,73,0.08) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* ===== GRADIENT MESH ===== */
.gradient-mesh {
    background:
        radial-gradient(at 20% 80%, rgba(251,191,36,0.08) 0, transparent 50%),
        radial-gradient(at 80% 20%, rgba(47,82,73,0.08) 0, transparent 50%),
        radial-gradient(at 50% 50%, rgba(214,230,227,0.1) 0, transparent 70%);
}

/* ===== HOVER ICON BOUNCE ===== */
.icon-bounce:hover i {
    animation: iconBounce 0.5s ease;
}
@keyframes iconBounce {
    0% { transform: scale(1); }
    40% { transform: scale(1.3) rotate(-5deg); }
    60% { transform: scale(0.9) rotate(5deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* ===== COUNTER NUMBER ===== */
.counter-number {
    font-variant-numeric: tabular-nums;
    transition: all 0.3s ease;
}

/* ===== RESPONSIVE FIXES ===== */
@media (max-width: 768px) {
    .particle { display: none; }
    .tilt-card:hover { transform: none; }
}
