:root {
    /* Colors - Brand & Palette */
    --primary: #0077B6;
    --primary-dark: #023E8A;
    --primary-light: #0096C7;
    --secondary: #90E0EF;
    --secondary-dark: #48CAE4;
    --accent: #FFB703;
    --accent-hover: #FB8500;
    
    /* Colors - Status */
    --success: #10B981;
    --error: #EF4444;
    --warning: #F59E0B;
    
    /* Colors - Neutral */
    --white: #ffffff;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --dark: #111827;

    /* Typography */
    --font-main: 'Plus Jakarta Sans', sans-serif;
    --lh-base: 1.6;
    --lh-tight: 1.25;
    --lh-heading: 1.15;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
    --space-xxl: 6rem;
    
    /* Borders & Shadows */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 30px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Layout */
    --container-max: 1200px;
    --header-height: 80px;
}

/* 1. RESET & BASE */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-main);
    background-color: var(--white);
    color: var(--gray-700);
    line-height: var(--lh-base);
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    color: var(--dark);
    line-height: var(--lh-heading);
    font-weight: 800;
    letter-spacing: -0.025em;
}

h1 { font-size: clamp(2.5rem, 7vw, 4rem); }
h2 { font-size: clamp(2rem, 5vw, 2.75rem); margin-bottom: var(--space-md); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }

p { margin-bottom: var(--space-sm); color: var(--gray-600); }

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

ul { list-style: none; }

img { max-width: 100%; height: auto; border-radius: var(--radius-md); }

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* 2. TOP BAR */
.top-bar {
    background-color: var(--dark);
    color: var(--white);
    padding: 8px 0;
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 1001;
    position: relative;
}

.top-bar-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    text-align: center;
}

.badge-prime {
    background: var(--accent);
    color: var(--dark);
    padding: 2px 10px;
    border-radius: var(--radius-sm);
    font-weight: 800;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
}

.top-bar-link {
    color: var(--secondary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
}

.top-bar-link:hover {
    color: var(--white);
    transform: translateX(3px);
}

/* 3. HEADER & NAVIGATION */
.main-header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    height: var(--header-height);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--gray-100);
    transition: all 0.3s ease;
}

.main-header.scrolled {
    height: 70px;
    box-shadow: var(--shadow-sm);
}

.main-header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: var(--shadow-md);
}

.brand-name {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--dark);
    line-height: 1;
}

.brand-name span { color: var(--primary); }

.brand-tagline {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray-400);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    font-weight: 700;
    color: var(--gray-600);
    position: relative;
    font-size: 0.95rem;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

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

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

/* 4. BUTTONS & CTA */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 32px;
    border-radius: var(--radius-md);
    font-weight: 800;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 10px 20px -10px var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-4px);
    box-shadow: 0 15px 30px -10px var(--primary);
}

.btn-outline {
    background: transparent;
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-4px);
}

.btn-accent {
    background: var(--accent);
    color: var(--dark);
    box-shadow: 0 10px 20px -10px var(--accent);
}

.btn-accent:hover {
    background: var(--accent-hover);
    transform: translateY(-4px);
    box-shadow: 0 15px 30px -10px var(--accent-hover);
}

.btn-pulse {
    animation: btnPulse 2.5s infinite;
}

@keyframes btnPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 119, 182, 0.5); }
    70% { transform: scale(1.03); box-shadow: 0 0 0 15px rgba(0, 119, 182, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 119, 182, 0); }
}

/* 5. HERO SECTION */
.hero {
    position: relative;
    padding: var(--space-xxl) 0;
    background: var(--gray-50);
    overflow: hidden;
    text-align: center;
}

.hero::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--secondary) 0%, transparent 70%);
    top: -300px;
    right: -200px;
    opacity: 0.4;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 850px;
    margin: 0 auto;
}

.hero h1 {
    margin-bottom: var(--space-md);
    background: linear-gradient(to right, var(--dark), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: var(--gray-600);
    margin-bottom: var(--space-lg);
    font-weight: 500;
}

/* 6. COMPARISON TABLE */
.comparison-container {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    border: 1px solid var(--gray-100);
    margin: var(--space-lg) 0;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
}

.comparison-table th {
    background: var(--gray-50);
    padding: 24px;
    text-align: left;
    font-weight: 800;
    color: var(--gray-800);
    border-bottom: 2px solid var(--gray-100);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.comparison-table td {
    padding: 24px;
    border-bottom: 1px solid var(--gray-50);
    vertical-align: middle;
    font-size: 1rem;
}

.comparison-table tr:hover {
    background: var(--gray-50);
}

.brand-cell {
    display: flex;
    flex-direction: column;
}

.brand-name-table {
    font-weight: 900;
    color: var(--primary);
    font-size: 1.2rem;
}

.model-name {
    font-size: 0.85rem;
    color: var(--gray-500);
    font-weight: 600;
}

.tag-prime {
    display: inline-flex;
    align-items: center;
    background: #DCFCE7;
    color: #166534;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 800;
}

.rating {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 800;
    color: var(--dark);
}

/* 7. CARDS & WIDGET */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-lg);
}

.card {
    background: white;
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-100);
    transition: all 0.4s ease;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.card-icon {
    width: 64px;
    height: 64px;
    background: var(--gray-50);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: var(--space-md);
    transition: all 0.3s ease;
}

.card:hover .card-icon {
    background: var(--primary);
    color: white;
    transform: rotate(10deg);
}

.widget-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    padding: var(--space-xxl) 0;
    color: white;
    position: relative;
}

.widget-box-container {
    background: white;
    padding: var(--space-md);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
}

/* 8. FOOTER */
.main-footer {
    background: var(--dark);
    color: var(--gray-400);
    padding: var(--space-xxl) 0 var(--space-lg);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.footer-brand .logo {
    margin-bottom: var(--space-md);
}

.footer-brand .logo span { color: white; }

.footer-links h4 {
    color: white;
    margin-bottom: var(--space-lg);
    font-size: 1.1rem;
    position: relative;
    padding-bottom: 12px;
}

.footer-links h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary);
}

.footer-links ul li {
    margin-bottom: 14px;
}

.footer-links ul li a:hover {
    color: white;
    transform: translateX(6px);
}

.footer-bottom {
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255,255,255,0.05);
    font-size: 0.9rem;
    text-align: center;
}

/* 9. UTILS & ANIMATIONS */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* 10. RESPONSIVE */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }

    .main-header nav {
        padding: 0 var(--space-sm);
    }

    .nav-links {
        display: none; /* Mobile menu logic in JS */
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 24px;
        box-shadow: var(--shadow-lg);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-toggle {
        display: block;
        background: none;
        border: none;
        color: var(--dark);
        font-size: 1.5rem;
    }

    .header-actions .btn {
        display: none;
    }

    .hero {
        padding: var(--space-xl) 0;
    }

    .comparison-container {
        margin: var(--space-md) -1rem;
        border-radius: 0;
        overflow-x: auto;
    }
    
    .comparison-table {
        min-width: 800px;
    }
}