/* ==========================================================================
   HIREHUB - PREMIUM HR/RECRUITMENT PLATFORM TEMPLATE
   Design Tokens, Animations, Components
   ========================================================================== */

/* ==========================================================================
   CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   ========================================================================== */

:root {
    /* Colors - Warm Professional Palette */
    --color-teal-50: #f0fdfa;
    --color-teal-100: #ccfbf1;
    --color-teal-200: #99f6e4;
    --color-teal-300: #5eead4;
    --color-teal-400: #2dd4bf;
    --color-teal-500: #14b8a6;
    --color-teal-600: #0d9488;
    --color-teal-700: #0f766e;
    --color-teal-800: #115e59;
    --color-teal-900: #134e4a;

    --color-blue-500: #3b82f6;
    --color-blue-600: #2563eb;
    --color-purple-500: #8b5cf6;
    --color-purple-600: #7c3aed;

    --color-orange-500: #f97316;
    --color-orange-600: #ea580c;

    /* Neutral Colors */
    --color-white: #ffffff;
    --color-neutral-50: #fafafa;
    --color-neutral-100: #f5f5f5;
    --color-neutral-200: #e5e5e5;
    --color-neutral-300: #d4d4d4;
    --color-neutral-400: #a3a3a3;
    --color-neutral-500: #737373;
    --color-neutral-600: #525252;
    --color-neutral-700: #404040;
    --color-neutral-800: #262626;
    --color-neutral-900: #171717;
    --color-neutral-950: #0a0a0a;

    /* Typography Scale */
    --text-hero: clamp(3rem, 8vw, 6rem);
    --text-display: clamp(2.5rem, 5vw, 4rem);
    --text-h1: clamp(2rem, 4vw, 3rem);
    --text-h2: clamp(1.5rem, 3vw, 2.25rem);
    --text-h3: clamp(1.25rem, 2vw, 1.5rem);
    --text-body: 1rem;
    --text-small: 0.875rem;
    --text-xs: 0.75rem;

    /* Spacing Scale (8px base) */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    --space-32: 8rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 60px rgba(20, 184, 166, 0.3);
    --shadow-glow-lg: 0 0 100px rgba(20, 184, 166, 0.4);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Mode Colors */
.dark {
    --color-neutral-50: #0a0a0a;
    --color-neutral-100: #171717;
    --color-neutral-200: #262626;
    --color-neutral-300: #404040;
    --color-neutral-400: #525252;
    --color-neutral-500: #737373;
    --color-neutral-600: #a3a3a3;
    --color-neutral-700: #d4d4d4;
    --color-neutral-800: #e5e5e5;
    --color-neutral-900: #f5f5f5;
    --color-neutral-950: #fafafa;
}

/* ==========================================================================
   BASE STYLES
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: var(--text-body);
    line-height: 1.6;
    color: var(--color-neutral-900);
    background-color: var(--color-white);
}

.dark body {
    color: var(--color-neutral-50);
    background-color: #0a0a0a;
}

::selection {
    background-color: var(--color-teal-500);
    color: var(--color-white);
}

/* ==========================================================================
   SCROLL REVEAL ANIMATIONS
   ========================================================================== */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--transition-smooth),
                transform var(--transition-smooth);
}

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

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: all var(--transition-smooth);
}

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

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: all var(--transition-smooth);
}

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

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: all var(--transition-smooth);
}

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

.reveal-blur {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(20px);
    transition: all var(--transition-smooth);
}

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

/* Stagger delays */
.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; }
.stagger-6 { transition-delay: 0.6s; }

/* ==========================================================================
   HOVER ANIMATIONS
   ========================================================================== */

.hover-lift {
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.hover-zoom {
    overflow: hidden;
}

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

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

.hover-shine {
    position: relative;
    overflow: hidden;
}

.hover-shine::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.hover-shine:hover::before {
    left: 100%;
}

/* ==========================================================================
   CONTINUOUS ANIMATIONS
   ========================================================================== */

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

.animate-float {
    animation: float 6s ease-in-out infinite;
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.animate-float-slow {
    animation: float-slow 8s ease-in-out infinite;
}

@keyframes pulse-ring {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.5); opacity: 0; }
}

.pulse-ring {
    animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient-shift 8s ease infinite;
}

@keyframes subtle-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.animate-bounce-subtle {
    animation: subtle-bounce 2s ease-in-out infinite;
}

@keyframes counter-up {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   GRADIENT BACKGROUNDS
   ========================================================================== */

.bg-gradient-warm {
    background: linear-gradient(135deg,
        var(--color-teal-500) 0%,
        var(--color-blue-500) 50%,
        var(--color-purple-500) 100%);
}

.bg-gradient-teal {
    background: linear-gradient(135deg,
        var(--color-teal-600) 0%,
        var(--color-teal-400) 100%);
}

.bg-mesh-warm {
    background:
        radial-gradient(at 40% 20%, rgba(20, 184, 166, 0.3) 0px, transparent 50%),
        radial-gradient(at 80% 0%, rgba(59, 130, 246, 0.3) 0px, transparent 50%),
        radial-gradient(at 0% 50%, rgba(139, 92, 246, 0.2) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(20, 184, 166, 0.2) 0px, transparent 50%);
}

.dark .bg-mesh-warm {
    background:
        radial-gradient(at 40% 20%, rgba(20, 184, 166, 0.2) 0px, transparent 50%),
        radial-gradient(at 80% 0%, rgba(59, 130, 246, 0.2) 0px, transparent 50%),
        radial-gradient(at 0% 50%, rgba(139, 92, 246, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(20, 184, 166, 0.15) 0px, transparent 50%);
}

.bg-grid {
    background-image:
        linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

.dark .bg-grid {
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
}

.text-gradient {
    background: linear-gradient(135deg,
        var(--color-teal-500) 0%,
        var(--color-blue-500) 50%,
        var(--color-purple-500) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradient-shift 8s ease infinite;
}

/* ==========================================================================
   GLASSMORPHISM COMPONENTS
   ========================================================================== */

.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.dark .glass {
    background: rgba(10, 10, 10, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-strong {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.dark .glass-strong {
    background: rgba(10, 10, 10, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* ==========================================================================
   GLOWING EFFECTS
   ========================================================================== */

.glow {
    box-shadow: 0 0 60px rgba(20, 184, 166, 0.3);
}

.glow-lg {
    box-shadow: 0 0 100px rgba(20, 184, 166, 0.4);
}

.glow-teal {
    box-shadow: 0 0 40px rgba(20, 184, 166, 0.4),
                0 0 80px rgba(20, 184, 166, 0.2);
}

.glow-blue {
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.4),
                0 0 80px rgba(59, 130, 246, 0.2);
}

.glow-purple {
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.4),
                0 0 80px rgba(139, 92, 246, 0.2);
}

/* ==========================================================================
   PIPELINE VISUALIZATION
   ========================================================================== */

.pipeline-step {
    position: relative;
    padding: 1.5rem;
    background: white;
    border-radius: var(--radius-xl);
    border: 2px solid var(--color-neutral-200);
    transition: all var(--transition-base);
}

.dark .pipeline-step {
    background: var(--color-neutral-800);
    border-color: var(--color-neutral-700);
}

.pipeline-step:hover {
    border-color: var(--color-teal-500);
    box-shadow: 0 8px 30px rgba(20, 184, 166, 0.2);
    transform: translateY(-4px);
}

.pipeline-connector {
    position: absolute;
    top: 50%;
    right: -2rem;
    width: 2rem;
    height: 2px;
    background: var(--color-neutral-300);
}

.dark .pipeline-connector {
    background: var(--color-neutral-700);
}

.pipeline-connector::after {
    content: '';
    position: absolute;
    right: -6px;
    top: -4px;
    width: 0;
    height: 0;
    border-left: 6px solid var(--color-neutral-300);
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
}

.dark .pipeline-connector::after {
    border-left-color: var(--color-neutral-700);
}

/* ==========================================================================
   METRIC CARDS
   ========================================================================== */

.metric-card {
    position: relative;
    padding: 2rem;
    background: white;
    border-radius: var(--radius-2xl);
    border: 1px solid var(--color-neutral-200);
    overflow: hidden;
    transition: all var(--transition-base);
}

.dark .metric-card {
    background: var(--color-neutral-900);
    border-color: var(--color-neutral-800);
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg,
        var(--color-teal-500),
        var(--color-blue-500),
        var(--color-purple-500));
}

.metric-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

/* ==========================================================================
   MOCKUP STYLES
   ========================================================================== */

.mockup-window {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    border: 1px solid var(--color-neutral-200);
}

.dark .mockup-window {
    background: var(--color-neutral-900);
    border-color: var(--color-neutral-800);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.mockup-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--color-neutral-100);
    border-bottom: 1px solid var(--color-neutral-200);
}

.dark .mockup-header {
    background: var(--color-neutral-800);
    border-bottom-color: var(--color-neutral-700);
}

.mockup-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-neutral-400);
}

.mockup-dot:nth-child(1) { background: #ff5f57; }
.mockup-dot:nth-child(2) { background: #febc2e; }
.mockup-dot:nth-child(3) { background: #28c840; }

/* ==========================================================================
   BADGE COMPONENTS
   ========================================================================== */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: var(--text-small);
    font-weight: 500;
}

.badge-teal {
    background: rgba(20, 184, 166, 0.1);
    color: var(--color-teal-700);
}

.dark .badge-teal {
    background: rgba(20, 184, 166, 0.2);
    color: var(--color-teal-300);
}

.badge-blue {
    background: rgba(59, 130, 246, 0.1);
    color: var(--color-blue-700);
}

.dark .badge-blue {
    background: rgba(59, 130, 246, 0.2);
    color: var(--color-blue-300);
}

.badge-purple {
    background: rgba(139, 92, 246, 0.1);
    color: var(--color-purple-700);
}

.dark .badge-purple {
    background: rgba(139, 92, 246, 0.2);
    color: var(--color-purple-300);
}

/* ==========================================================================
   PERFORMANCE OPTIMIZATIONS
   ========================================================================== */

section {
    content-visibility: auto;
    contain-intrinsic-size: 0 500px;
}

.animated {
    transform: translateZ(0);
    will-change: transform, opacity;
}

/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.focus\:not-sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    padding: 0;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

:focus-visible {
    outline: 2px solid var(--color-teal-500);
    outline-offset: 2px;
}

/* ==========================================================================
   SCROLLBAR STYLING
   ========================================================================== */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-neutral-100);
}

.dark ::-webkit-scrollbar-track {
    background: var(--color-neutral-900);
}

::-webkit-scrollbar-thumb {
    background: var(--color-neutral-400);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-teal-500);
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
    body {
        background: white;
        color: black;
    }

    .no-print {
        display: none !important;
    }
}

/* ==========================================================================
   REDUCED MOTION (ACCESSIBILITY)
   ========================================================================== */

@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;
    }

    .reveal, .reveal-left, .reveal-right, .reveal-scale, .reveal-blur {
        opacity: 1;
        transform: none;
        filter: none;
    }
}
