/**
 * SC NON Core Global Stylesheet
 * Optimized for 60fps animations, mobile responsiveness, and zero-lag rendering.
 */

:root {
    --primary-pink: #ec4899;
    --primary-rose: #f43f5e;
    --primary-purple: #9333ea;
}

/* Base font and smooth scrolling */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

* {
    font-family: 'Google Sans', 'Noto Sans Thai', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    font-family: 'Google Sans', 'Noto Sans Thai', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

code, pre, .font-mono {
    font-family: 'JetBrains Mono', monospace !important;
}

section {
    scroll-margin-top: 5.5rem;
}

/* Hardware accelerated scroll reveal animations */
.reveal,
.reveal-left,
.reveal-right {
    opacity: 0;
    will-change: transform, opacity;
    transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal {
    transform: translate3d(0, 32px, 0);
}

.reveal-left {
    transform: translate3d(-32px, 0, 0);
}

.reveal-right {
    transform: translate3d(32px, 0, 0);
}

.reveal.active,
.reveal-left.active,
.reveal-right.active {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

/* Animation delays */
.delay-75  { transition-delay: 75ms; }
.delay-100 { transition-delay: 100ms; }
.delay-150 { transition-delay: 150ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }
.delay-500 { transition-delay: 500ms; }

/* 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 {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* Background Patterns */
.dot-pattern-bg {
    background-image: radial-gradient(#cbd5e1 1.5px, transparent 1.5px);
    background-size: 24px 24px;
    mask-image: radial-gradient(circle at center, black 50%, transparent 90%);
    -webkit-mask-image: radial-gradient(circle at center, black 50%, transparent 90%);
}

/* Shimmer Skeleton Loading Effect */
@keyframes shimmerAnim {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton-shimmer {
    background: linear-gradient(90deg, rgba(226, 232, 240, 0.6) 25%, rgba(241, 245, 249, 0.9) 50%, rgba(226, 232, 240, 0.6) 75%);
    background-size: 200% 100%;
    animation: shimmerAnim 1.6s infinite ease-in-out;
}

.dark .skeleton-shimmer {
    background: linear-gradient(90deg, rgba(30, 41, 59, 0.8) 25%, rgba(51, 65, 85, 0.9) 50%, rgba(30, 41, 59, 0.8) 75%);
    background-size: 200% 100%;
    animation: shimmerAnim 1.6s infinite ease-in-out;
}

/* Custom Sleek Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.04);
}
::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.5);
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 116, 139, 0.7);
}

/* Touch Optimizations for Mobile */
button, a, input, select, textarea {
    touch-action: manipulation;
}
