/* Global Custom Styles for CP HR Advisory */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem; /* Account for h-20 fixed header */
    font-family: 'Inter', sans-serif;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Premium Glassmorphism Utility */
.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-dark {
    background: rgba(28, 25, 23, 0.85); /* Warm stone color */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Horizontal Scrolling Animation for Logos */
.scroller {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    -webkit-mask: linear-gradient(
        90deg,
        transparent,
        white 20%,
        white 80%,
        transparent
    );
    mask: linear-gradient(90deg, transparent, white 20%, white 80%, transparent);
}
.scroller::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.scroller__inner {
    display: flex;
    flex-wrap: nowrap;
    gap: 3rem;
    animation: scroll 40s forwards linear infinite;
}

.scroller__inner:hover {
    animation-play-state: paused;
}

@keyframes scroll {
    to {
        transform: translate(calc(-50% - 1.5rem));
    }
}

/* Value-Add Curve Graph Specific Styles */
.value-curve-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 1rem;
    position: relative;
}

/* Fade in animation for intersection observer */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    visibility: hidden;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, visibility;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: none;
    visibility: visible;
}

/* Custom Gradients */
.bg-gradient-premium {
    background: linear-gradient(135deg, #1c1917 0%, #431407 100%);
}

.text-gradient-gold {
    background: linear-gradient(to right, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Custom Cursor */
body {
    cursor: auto; /* Reverting to auto so native pointers work better, but keeping custom cursor */
}

a, button, .interactive, [role="button"] {
    cursor: pointer !important;
}

.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: #f59e0b; /* Amber */
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(245, 158, 11, 0.5); /* Amber with opacity */
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

/* Cursor Hover State */
a:hover ~ .cursor-outline,
button:hover ~ .cursor-outline,
.interactive:hover ~ .cursor-outline {
    width: 60px;
    height: 60px;
    background-color: rgba(245, 158, 11, 0.1);
}

/* Animated Counters */
.counter-box {
    position: relative;
    overflow: hidden;
}

.counter-box::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(245,158,11,0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.counter-box:hover::after {
    opacity: 1;
}

/* Image Hover effects */
.hover-scale {
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.hover-scale:hover {
    transform: scale(1.02);
}

/* AOS overrides */
[data-aos] {
    pointer-events: none;
}
[data-aos].aos-animate {
    pointer-events: auto;
}

/* Scrollytelling & Sticky Layouts */
.sticky-container {
    position: relative;
}
.sticky-element {
    position: sticky;
    top: 6rem;
}

/* Timeline specific styles */
.timeline-line {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(245, 158, 11, 0.5), rgba(245, 158, 11, 0.5), transparent);
    z-index: 0;
}
.timeline-item {
    position: relative;
    z-index: 10;
}
@media (max-width: 768px) {
    .timeline-line {
        left: 20px;
    }
}

/* Editorial Layouts */
.editorial-quote {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: rgba(15, 23, 42, 0.85);
}

/* Interactive Accordion */
.accordion-content {
    transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease, padding 0.4s ease;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}
.accordion-content.expanded {
    max-height: 1000px;
    opacity: 1;
}

/* Differentiator Text Gradients */
.text-gradient-slate {
    background: linear-gradient(to right, #1c1917, #44403c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* NMSWorks specific styles */
.gradient-text {
    background: linear-gradient(135deg, #fb923c 0%, #e11d48 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.floating-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #00d4ff;
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.particle:nth-child(1) { top: 20%; left: 20%; animation-delay: 0s; }
.particle:nth-child(2) { top: 60%; left: 80%; animation-delay: 2s; }
.particle:nth-child(3) { top: 80%; left: 40%; animation-delay: 4s; }
.particle:nth-child(4) { top: 30%; left: 70%; animation-delay: 1s; }
.particle:nth-child(5) { top: 70%; left: 10%; animation-delay: 3s; }

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 1; }
    50% { transform: translateY(-20px) rotate(180deg); opacity: 0.5; }
}

/* NMSWorks Grid Background */
.grid-bg::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23fb923c" stroke-width="0.5" opacity="0.15"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.6;
    pointer-events: none;
    z-index: 0;
}
