/* Base Reset & Professional Foundation */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0d2951;
    --primary-light: #1a3d6e;
    --primary-dark: #071832;
    --secondary: #54D800;
    --secondary-dark: #45b300;
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--primary-dark);
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
    /* Smooth rendering for 4K displays */
    image-rendering: -webkit-optimize-contrast;
}

/* 4K Quality & Smoothness Enhancements */
* {
    -webkit-tap-highlight-color: transparent;
}

.reveal, .reveal-left, .reveal-right, .reveal-fast, .btn-premium, .card-premium {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform-style: preserve-3d;
}

/* Fluid Typography */
h1 { font-size: clamp(2.5rem, 8vw, 5rem); line-height: 1.1; font-weight: 800; }
h2 { font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.2; font-weight: 700; }
h3 { font-size: clamp(1.5rem, 3vw, 2.25rem); line-height: 1.3; font-weight: 700; }

/* Custom Utilities */
.text-gradient {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mesh-bg {
    background-color: var(--primary-dark);
    background-image: 
        radial-gradient(at 0% 0%, rgba(13, 41, 81, 0.5) 0, transparent 50%), 
        radial-gradient(at 50% 0%, rgba(84, 216, 0, 0.05) 0, transparent 50%),
        radial-gradient(at 100% 0%, rgba(13, 41, 81, 0.5) 0, transparent 50%);
}

/* Responsive Containers */
.container {
    width: 100%;
    margin-right: auto;
    margin-left: auto;
    padding-right: 1.5rem;
    padding-left: 1.5rem;
}

@media (min-width: 640px) { .container { max-width: 640px; } }
@media (min-width: 768px) { .container { max-width: 768px; } }
@media (min-width: 1024px) { .container { max-width: 1024px; } }
@media (min-width: 1280px) { .container { max-width: 1200px; } }

/* Premium Components */
.btn-premium {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    transition: var(--transition-base);
    position: relative;
    z-index: 1;
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(84, 216, 0, 0.4);
}

.btn-premium:active {
    transform: translateY(0);
}

.card-premium {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    padding: 2rem;
    transition: var(--transition-base);
    will-change: transform, opacity;
}

.card-premium:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(84, 216, 0, 0.3);
    transform: translateY(-5px);
}

/* Animations & Transitions */
.reveal, .reveal-left, .reveal-right, .reveal-fast {
    opacity: 0;
    will-change: transform, opacity;
}

.reveal {
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal-left {
    transform: translateX(-30px);
    transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal-right {
    transform: translateX(30px);
    transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal-fast {
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.active, .reveal-left.active, .reveal-right.active, .reveal-fast.active {
    opacity: 1;
    transform: translate(0, 0);
}

/* Background Animations */
.morph-shape {
    animation: morph 15s ease-in-out infinite alternate;
}

@keyframes morph {
    0% { border-radius: 40% 60% 60% 40% / 40% 40% 60% 60%; transform: rotate(0deg) scale(1); }
    33% { border-radius: 60% 40% 40% 60% / 60% 60% 40% 40%; transform: rotate(5deg) scale(1.05); }
    100% { border-radius: 40% 60% 70% 30% / 50% 30% 70% 50%; transform: rotate(-5deg) scale(1); }
}

.fade-in {
    opacity: 0;
    transition: opacity 0.8s ease-out;
}

.fade-in.active {
    opacity: 1;
}

/* AI-themed specialized effects (Optimized) */
.ai-border {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ai-border::after {
    content: '';
    position: absolute;
    inset: -1px;
    background: radial-gradient(circle at center, rgba(84, 216, 0, 0.15) 0%, transparent 70%);
    z-index: -1;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.ai-border:hover::after {
    opacity: 1;
}

/* 4K & Premium Motion */
::selection {
    background: var(--secondary);
    color: var(--primary-dark);
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--primary-dark);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

/* Fix for mobile "dirty" clicks */
button, a {
    -webkit-tap-highlight-color: transparent;
    outline: none !important;
}

/* Sub-pixel rendering for ultra-crisp text on 4K */
@media screen and (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    body {
        -webkit-font-smoothing: subpixel-antialiased;
    }
}

/* Animation Delays */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-500 { transition-delay: 500ms; }

