/* ================================
    ULTRA PREMIUM OS-LEVEL DESIGN
    ================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --accent-light: rgba(99, 102, 241, 0.1);
    --accent-glow: rgba(99, 102, 241, 0.4);
    
    --bg-primary: #0a0a0f;
    --bg-secondary: #121218;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --border: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.04);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --text-tertiary: rgba(255, 255, 255, 0.4);
    
    --gradient-accent: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
    --gradient-dark: linear-gradient(180deg, #0a0a0f 0%, #121218 100%);
    --gradient-card: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 120px rgba(99, 102, 241, 0.3);
    --shadow-glow-accent: 0 0 60px rgba(139, 92, 246, 0.4);
    
    --radius-sm: 12px;
    --radius: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-full: 9999px;
    
    --transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-bounce: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.7);
    --bg-card-hover: #ffffff;
    --border: rgba(0, 0, 0, 0.06);
    --border-light: rgba(0, 0, 0, 0.04);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;
    --shadow-glow: 0 0 80px rgba(99, 102, 241, 0.15);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ================================
    DYNAMIC BACKGROUND
    ================================ */

.bg-canvas {
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
}

.bg-canvas::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.25) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 60%, rgba(139, 92, 246, 0.15) 0%, transparent 40%),
        radial-gradient(ellipse 50% 30% at 20% 80%, rgba(217, 70, 239, 0.1) 0%, transparent 40%);
    animation: bgPulse 15s ease-in-out infinite;
}

@keyframes bgPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

.bg-grid {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image: 
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 20%, transparent 70%);
}

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

/* ================================
    FLOATING NAVIGATION
    ================================ */

.nav {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(18, 18, 24, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-md);
}

[data-theme="light"] .nav {
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.nav-item {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-item:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.nav-item.active {
    background: var(--gradient-accent);
    color: white;
    box-shadow: var(--shadow-glow-accent);
}

.nav-divider {
    width: 1px;
    height: 24px;
    background: var(--border);
}

/* ================================
    MAIN CONTAINER
    ================================ */

.main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 140px 32px 100px;
}

.section {
    display: none;
    animation: fadeIn 0.6s ease;
}

.section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ================================
    HERO SECTION - ULTRA PREMIUM
    ================================ */

.hero {
    min-height: calc(100vh - 240px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    padding: 60px 20px;
}

.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 600px;
    background: radial-gradient(ellipse, rgba(99, 102, 241, 0.2) 0%, transparent 60%);
    filter: blur(100px);
    animation: glowPulse 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
}

.hero-rings {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    pointer-events: none;
}

.hero-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 50%;
    animation: ringRotate 20s linear infinite;
}

.hero-ring:nth-child(1) { width: 200px; height: 200px; }
.hero-ring:nth-child(2) { width: 400px; height: 400px; animation-direction: reverse; animation-duration: 25s; }
.hero-ring:nth-child(3) { width: 600px; height: 600px; animation-duration: 30s; }

@keyframes ringRotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.hero-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #a5b4fc;
    padding: 10px 20px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-full);
    margin-bottom: 32px;
    animation: badgeBreathe 3s ease-in-out infinite;
}

@keyframes badgeBreathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.hero-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #6366f1;
    border-radius: 50%;
    box-shadow: 0 0 12px #6366f1;
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.5); }
}

.hero-title {
    position: relative;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(48px, 10vw, 96px);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.04em;
    margin-bottom: 24px;
}

.hero-title-main {
    display: block;
    background: linear-gradient(135deg, #ffffff 0%, #c7d2fe 30%, #a5b4fc 60%, #818cf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleShimmer 3s ease-in-out infinite;
    background-size: 200% 100%;
}

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

.hero-title-sub {
    display: block;
    font-size: clamp(28px, 5vw, 48px);
    font-weight: 400;
    margin-top: 12px;
    background: linear-gradient(135deg, rgba(255,255,255,0.7), rgba(255,255,255,0.4));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(18px, 3vw, 24px);
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

.hero-desc {
    font-size: 16px;
    color: var(--text-tertiary);
    max-width: 480px;
    margin-bottom: 48px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
}

/* ================================
    PREMIUM BUTTONS
    ================================ */

.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: none;
    text-decoration: none;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-accent);
    color: white;
    box-shadow: 
        0 4px 24px rgba(99, 102, 241, 0.4),
        0 0 0 0 rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 
        0 12px 40px rgba(99, 102, 241, 0.5),
        0 0 40px rgba(99, 102, 241, 0.3);
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.btn-primary:hover::before {
    transform: translateX(100%);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(99, 102, 241, 0.5);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow-accent);
}

/* ================================
    FLOATING SHAPES
    ================================ */

.floating-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.shape {
    position: absolute;
    opacity: 0.15;
    animation: floatShape 20s ease-in-out infinite;
}

.shape-1 {
    top: 15%;
    left: 10%;
    width: 80px;
    height: 80px;
    border: 2px solid #6366f1;
    border-radius: 20px;
    transform: rotate(45deg);
    animation-delay: 0s;
}

.shape-2 {
    top: 25%;
    right: 15%;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #8b5cf6, #d946ef);
    border-radius: 50%;
    animation-delay: -5s;
    filter: blur(1px);
}

.shape-3 {
    bottom: 30%;
    left: 20%;
    width: 100px;
    height: 100px;
    border: 2px solid rgba(217, 70, 239, 0.5);
    border-radius: 30px;
    animation-delay: -10s;
}

.shape-4 {
    bottom: 20%;
    right: 10%;
    width: 40px;
    height: 40px;
    background: #6366f1;
    border-radius: 10px;
    animation-delay: -15s;
    filter: blur(2px);
}

.shape-5 {
    top: 40%;
    left: 5%;
    width: 120px;
    height: 120px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 50%;
    animation-delay: -7s;
}

@keyframes floatShape {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-20px) rotate(5deg); }
    50% { transform: translateY(0) rotate(0deg); }
    75% { transform: translateY(20px) rotate(-5deg); }
}

/* ================================
    FEATURE CARDS
    ================================ */

.features {
    margin-top: 80px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.feature-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    text-align: center;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-accent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.feature-card:hover {
    transform: translateY(-12px) scale(1.02);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 
        var(--shadow-lg),
        0 0 60px rgba(99, 102, 241, 0.15);
}

.feature-card:hover::before {
    opacity: 0.05;
}

.feature-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin-bottom: 24px;
    background: var(--gradient-accent);
    border-radius: 24px;
    font-size: 32px;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.3);
    transition: all 0.5s var(--transition-bounce);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 16px 48px rgba(99, 102, 241, 0.4);
}

.feature-card h3 {
    position: relative;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.feature-card p {
    position: relative;
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.feature-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.6s ease;
}

.feature-card:hover .feature-shine {
    left: 100%;
}

/* ================================
    SECTION STYLES
    ================================ */

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(36px, 6vw, 56px);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-desc {
    font-size: 18px;
    color: var(--text-tertiary);
    max-width: 500px;
    margin: 0 auto;
}

/* ================================
    CARDS GRID
    ================================ */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 32px;
    display: flex;
    flex-direction: column;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-accent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 
        var(--shadow-lg),
        0 0 40px rgba(99, 102, 241, 0.15);
}

.card:hover::before {
    opacity: 0.03;
}

.card-content {
    position: relative;
    z-index: 1;
}

.card-emoji {
    font-size: 40px;
    margin-bottom: 20px;
    display: block;
    transition: transform 0.5s var(--transition-bounce);
}

.card:hover .card-emoji {
    transform: scale(1.15) rotate(-5deg);
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.card-text {
    font-size: 14px;
    color: var(--text-secondary);
    flex: 1;
    line-height: 1.6;
}

.card-tag {
    display: inline-block;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #a5b4fc;
    background: rgba(99, 102, 241, 0.15);
    border-radius: var(--radius-full);
    margin-bottom: 16px;
}

.card-footer {
    position: relative;
    z-index: 1;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-tertiary);
}

/* ================================
    THEME TOGGLE
    ================================ */

.theme-toggle {
    position: fixed;
    top: 24px;
    right: 24px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(18, 18, 24, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1001;
}

[data-theme="light"] .theme-toggle {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: var(--shadow-glow-accent);
}

/* ================================
    FOOTER
    ================================ */

.footer {
    text-align: center;
    padding: 60px 32px;
    color: var(--text-tertiary);
    font-size: 14px;
    border-top: 1px solid var(--border-light);
    margin-top: 80px;
}

.footer a {
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #6366f1;
}

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

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

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.5);
}

/* ================================
    RESPONSIVE
    ================================ */

@media (max-width: 768px) {
    .nav {
        top: 16px;
        padding: 6px 10px;
        gap: 4px;
    }
    
    .nav-item {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    .main {
        padding: 120px 20px 60px;
    }
    
    .hero {
        padding: 40px 16px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
    }
    
    .features-grid, .card-grid {
        grid-template-columns: 1fr;
    }
    
    .shape {
        display: none;
    }
    
    .hero-rings {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 36px;
    }
    
    .hero-title-sub {
        font-size: 22px;
    }
    
    .section-title {
        font-size: 28px;
    }
}

/* ================================
    ANIMATIONS - ENHANCED
    ================================ */

[data-aos] {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-aos].aos-visible {
    opacity: 1;
    transform: translateY(0);
}

.aos-delay-1 { transition-delay: 0.1s; }
.aos-delay-2 { transition-delay: 0.2s; }
.aos-delay-3 { transition-delay: 0.3s; }
.aos-delay-4 { transition-delay: 0.4s; }

/* Selection */
::selection {
    background: rgba(99, 102, 241, 0.3);
    color: white;
}