/* ==========================================================================
   VERTEX - Modern Digital Agency Template
   Premium quality CSS with full design system
   ========================================================================== */

/* ==========================================================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ========================================================================== */

:root {
    /* Brand Colors - Cyan & Blue */
    --color-primary: #06B6D4;
    --color-primary-dark: #0891B2;
    --color-primary-light: #22D3EE;
    --color-secondary: #3B82F6;
    --color-secondary-dark: #2563EB;
    --color-secondary-light: #60A5FA;

    /* Neutral Colors */
    --color-white: #FFFFFF;
    --color-black: #000000;
    --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;

    /* Semantic Colors */
    --color-success: #10B981;
    --color-warning: #F59E0B;
    --color-error: #EF4444;
    --color-info: #3B82F6;

    /* 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-h4: 1.125rem;
    --text-body: 1rem;
    --text-small: 0.875rem;
    --text-xs: 0.75rem;

    /* Spacing Scale (8px base) */
    --space-1: 0.25rem;   /* 4px */
    --space-2: 0.5rem;    /* 8px */
    --space-3: 0.75rem;   /* 12px */
    --space-4: 1rem;      /* 16px */
    --space-5: 1.25rem;   /* 20px */
    --space-6: 1.5rem;    /* 24px */
    --space-8: 2rem;      /* 32px */
    --space-10: 2.5rem;   /* 40px */
    --space-12: 3rem;     /* 48px */
    --space-16: 4rem;     /* 64px */
    --space-20: 5rem;     /* 80px */
    --space-24: 6rem;     /* 96px */
    --space-32: 8rem;     /* 128px */

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

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 40px rgba(6, 182, 212, 0.3);
    --shadow-glow-lg: 0 0 60px rgba(6, 182, 212, 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-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.8s cubic-bezier(0.16, 1, 0.3, 1);

    /* Z-Index Scale */
    --z-dropdown: 10;
    --z-sticky: 20;
    --z-fixed: 30;
    --z-modal-backdrop: 40;
    --z-modal: 50;
    --z-popover: 60;
    --z-tooltip: 70;
}

/* Dark Mode Variables */
[data-theme="dark"],
.dark {
    --color-white: #0A0A0A;
    --color-black: #FFFFFF;
    --color-neutral-50: #171717;
    --color-neutral-100: #262626;
    --color-neutral-200: #404040;
    --color-neutral-300: #525252;
    --color-neutral-400: #737373;
    --color-neutral-500: #A3A3A3;
    --color-neutral-600: #D4D4D4;
    --color-neutral-700: #E5E5E5;
    --color-neutral-800: #F5F5F5;
    --color-neutral-900: #FAFAFA;
    --color-neutral-950: #FFFFFF;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.5);
    --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 40px rgba(6, 182, 212, 0.4);
    --shadow-glow-lg: 0 0 60px rgba(6, 182, 212, 0.5);
}

/* ==========================================================================
   GLOBAL STYLES
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--color-neutral-900);
    background-color: var(--color-white);
}

/* Display font utility */
.font-display {
    font-family: 'Space Grotesk', system-ui, sans-serif;
}

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

/* Screen reader only */
.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;
}

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

/* Focus visible styles */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* Skip to content link */
a[href="#main-content"]:focus {
    position: fixed;
    top: var(--space-4);
    left: var(--space-4);
    z-index: 9999;
    padding: var(--space-3) var(--space-4);
    background-color: var(--color-primary);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-lg);
    font-weight: 500;
    box-shadow: var(--shadow-lg);
}

/* ==========================================================================
   TEXT EFFECTS
   ========================================================================== */

/* Gradient text */
.text-gradient {
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
}

/* Animated gradient text */
.text-gradient-animated {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary), var(--color-primary));
    background-size: 200% 200%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shift 8s ease infinite;
}

/* Text glow effect */
.text-glow {
    text-shadow: 0 0 20px rgba(6, 182, 212, 0.5);
}

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

/* Fade up (default) */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--transition-smooth),
                transform var(--transition-smooth);
}

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

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

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

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

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

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

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

/* Blur in */
.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);
}

/* Rotate in */
.reveal-rotate {
    opacity: 0;
    transform: rotate(-5deg) scale(0.95);
    transition: all var(--transition-smooth);
}

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

/* Stagger delays for grid items */
.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; }
.stagger-7 { transition-delay: 0.7s; }
.stagger-8 { transition-delay: 0.8s; }

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

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

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

.dark .hover-lift:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* Card lift subtle */
.hover-lift-sm {
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hover-lift-sm:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Image zoom */
.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);
}

/* Image zoom with overlay */
.hover-zoom-overlay {
    position: relative;
    overflow: hidden;
}

.hover-zoom-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.hover-zoom-overlay:hover::after {
    opacity: 1;
}

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

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

/* Shine effect */
.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%;
}

/* Border glow on hover */
.hover-glow {
    transition: box-shadow var(--transition-base);
}

.hover-glow:hover {
    box-shadow: var(--shadow-glow);
}

/* Link arrow animation */
.hover-arrow {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    transition: gap var(--transition-base);
}

.hover-arrow:hover {
    gap: var(--space-4);
}

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

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

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

/* Floating slow */
@keyframes float-slow {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(2deg); }
}

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

/* Pulse ring */
@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;
}

/* Gradient shift */
@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;
}

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

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

/* Spin slow */
@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-spin-slow {
    animation: spin-slow 20s linear infinite;
}

/* Scale pulse */
@keyframes scale-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.animate-scale-pulse {
    animation: scale-pulse 3s ease-in-out infinite;
}

/* Shimmer effect */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.animate-shimmer {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    background-size: 200% 100%;
    animation: shimmer 2s ease-in-out infinite;
}

/* ==========================================================================
   DECORATIVE ELEMENTS
   ========================================================================== */

/* Gradient background mesh */
.bg-mesh {
    background:
        radial-gradient(at 40% 20%, rgba(6, 182, 212, 0.15) 0px, transparent 50%),
        radial-gradient(at 80% 0%, rgba(59, 130, 246, 0.15) 0px, transparent 50%),
        radial-gradient(at 0% 50%, rgba(6, 182, 212, 0.1) 0px, transparent 50%),
        radial-gradient(at 80% 100%, rgba(59, 130, 246, 0.1) 0px, transparent 50%);
}

.dark .bg-mesh {
    background:
        radial-gradient(at 40% 20%, rgba(6, 182, 212, 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(6, 182, 212, 0.15) 0px, transparent 50%),
        radial-gradient(at 80% 100%, rgba(59, 130, 246, 0.15) 0px, transparent 50%);
}

/* Grid pattern background */
.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);
}

/* Dot pattern background */
.bg-dots {
    background-image: radial-gradient(rgba(0, 0, 0, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

.dark .bg-dots {
    background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
}

/* Noise texture overlay */
.bg-noise {
    position: relative;
}

.bg-noise::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
}

/* Glow effects */
.glow {
    box-shadow: var(--shadow-glow);
}

.glow-lg {
    box-shadow: var(--shadow-glow-lg);
}

/* ==========================================================================
   FILTER BUTTONS (Work Page)
   ========================================================================== */

.filter-btn {
    background-color: transparent;
    color: var(--color-neutral-500);
    border: 1px solid var(--color-neutral-200);
    transition: all var(--transition-base);
}

.dark .filter-btn {
    color: var(--color-neutral-400);
    border-color: var(--color-neutral-700);
}

.filter-btn:hover {
    background-color: var(--color-neutral-100);
    color: var(--color-neutral-900);
    border-color: var(--color-neutral-300);
}

.dark .filter-btn:hover {
    background-color: var(--color-neutral-800);
    color: var(--color-white);
    border-color: var(--color-neutral-600);
}

.filter-btn.active {
    background-color: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.filter-btn.active:hover {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
}

/* ==========================================================================
   BUTTON STYLES
   ========================================================================== */

/* Primary button glow */
.btn-primary-glow {
    position: relative;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    overflow: hidden;
}

.btn-primary-glow::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-secondary-light));
    opacity: 0;
    transition: opacity var(--transition-base);
}

.btn-primary-glow:hover::before {
    opacity: 1;
}

/* Button border animation */
.btn-border-animate {
    position: relative;
    overflow: hidden;
}

.btn-border-animate::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary)) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

/* ==========================================================================
   CARD STYLES
   ========================================================================== */

/* Glass card */
.card-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.2);
}

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

/* Gradient border card */
.card-gradient-border {
    position: relative;
    background: var(--color-white);
    border-radius: var(--radius-2xl);
}

.card-gradient-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: calc(var(--radius-2xl) + 2px);
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    z-index: -1;
}

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

/* ==========================================================================
   FORM STYLES
   ========================================================================== */

input:focus-visible,
textarea:focus-visible,
select:focus-visible,
button:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Form input styling */
.form-input {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    background: var(--color-neutral-50);
    border: 1px solid var(--color-neutral-200);
    border-radius: var(--radius-xl);
    transition: all var(--transition-base);
}

.form-input:focus {
    background: var(--color-white);
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.dark .form-input {
    background: var(--color-neutral-900);
    border-color: var(--color-neutral-700);
}

.dark .form-input:focus {
    background: var(--color-neutral-800);
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
}

/* Form success/error states */
.form-success {
    color: var(--color-success);
}

.form-error {
    color: var(--color-error);
}

/* ==========================================================================
   NAVIGATION STYLES
   ========================================================================== */

/* Nav link hover underline */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width var(--transition-base);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* ==========================================================================
   SCROLLBAR STYLES
   ========================================================================== */

::-webkit-scrollbar {
    width: 10px;
    height: 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-300);
    border-radius: 5px;
}

.dark ::-webkit-scrollbar-thumb {
    background: var(--color-neutral-600);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-neutral-400);
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: var(--color-neutral-500);
}

/* ==========================================================================
   SELECTION STYLES
   ========================================================================== */

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

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

/* Content visibility for long pages */
section {
    content-visibility: auto;
    contain-intrinsic-size: 0 500px;
}

/* GPU acceleration hints */
.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform;
}

/* ==========================================================================
   REDUCED MOTION (REQUIRED FOR 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;
    }

    html {
        scroll-behavior: auto;
    }

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

    .hover-lift:hover,
    .hover-lift-sm:hover {
        transform: none;
    }

    .hover-zoom:hover img,
    .hover-zoom-overlay:hover img {
        transform: none;
    }

    .hover-shine::before {
        display: none;
    }
}

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

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

    body {
        background: white;
        color: black;
    }

    a {
        text-decoration: underline;
    }
}
