/* High-end CSS for OpenCare OS */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

html {
    scroll-behavior: smooth;
    font-family: 'Inter', 'Noto Sans SC', sans-serif;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Utilities */
.text-justify-inter {
    text-align: justify;
    text-justify: inter-ideograph;
}

/* Glassmorphism */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.glass-dark {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-100 {
    animation-delay: 100ms;
}

.delay-200 {
    animation-delay: 200ms;
}

.delay-300 {
    animation-delay: 300ms;
}

/* Grid Background */
.bg-grid-slate-100 {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' width='32' height='32' fill='none' stroke='%23f1f5f9'%3e%3cpath d='M0 .5H31.5V32'/%3e%3c/svg%3e");
}

/* Hover Cards */
.hover-card-rise {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-card-rise:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Image Masks */
.mask-gradient-b {
    mask-image: linear-gradient(to bottom, black 0%, black 70%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 0%, black 70%, transparent 100%);
}

/* --- Advanced Visual Effects --- */

/* 1. Ken Burns Effect (Slow Zoom) */
@keyframes ken-burns {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.1);
    }
}

.animate-ken-burns {
    animation: ken-burns 20s ease-out infinite alternate;
}

/* 2. Noise Texture for Glassmorphism */
.bg-noise {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
}

/* 3. Utilities for Scroll Animations */
.chart-bar {
    transition: height 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.counter-value {
    font-variant-numeric: tabular-nums;
    /* Prevent jitter when numbers change */
}

/* Enhance existing glass classes with noise if desired, or add manually */
.glass {
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    background: rgba(255, 255, 255, 0.7);
}

/* ... existing styles ... */

/* --- Advanced Card Interactions --- */

/* 1. Spotlight Effect */
.card-spotlight {
    position: relative;
    overflow: hidden;
    /* Ensure border is visible on top if needed, or handle z-index */
}

.card-spotlight::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(600px circle at var(--mouse-x) var(--mouse-y), var(--spotlight-color, rgba(14, 165, 233, 0.1)), transparent 40%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 20;
    /* Above content */
}

.card-spotlight:hover::after {
    opacity: 1;
}

/* 2. 3D Tilt Effect */
.tilt-card {
    transition: transform 0.1s ease-out;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    will-change: transform;
}

.tilt-glare {
    position: absolute;
    inset: 0;
    background: linear-gradient(125deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0) 40%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 30;
    mix-blend-mode: overlay;
}