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

:root {
    /* Default - Light Theme */
    --primary: #1e3a8a;
    --primary-light: #3b82f6;
    --accent-blue: #1e3a8a;
    --accent-green: #10b981;
    --accent-orange: #df8b2c;
    
    --bg-main: #f8fafc;
    --bg-nav: rgba(248, 250, 252, 0.8);
    --bg-nav-rgb: 248, 250, 252;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-card: rgba(15, 23, 42, 0.08);
    --shadow-premium: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* Spacing */
    --space-s: 1rem;
    --space-m: 2rem;
    --space-l: 4rem;
    --space-xl: 8rem;
    
    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-main: #020617;
    --bg-nav: rgba(15, 23, 42, 0.8);
    --bg-nav-rgb: 15, 23, 42;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-card: rgba(255, 255, 255, 0.08);
    --shadow-premium: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Base reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    transition: background-color 0.3s ease;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Typography */
h1, h2, h3, h4 {
    line-height: 1.2;
    font-weight: 700;
}

h1 { font-size: clamp(2.5rem, 8vw, 4.5rem); }
h2 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: var(--space-m); }
h3 { font-size: 1.5rem; }

p {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 60ch;
}

/* Layout Utilities */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-m);
}

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

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.grid {
    display: grid;
    gap: var(--space-m);
}

/* Glassmorphism */
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-card);
    border-radius: 24px;
    box-shadow: var(--shadow-premium);
}

/* Navbar */
.nav-container {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 1200px;
    z-index: 1000;
    padding: 0.8rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.nav-container.scrolled {
    top: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 0;
    padding: 0.6rem 2rem;
    background: rgba(var(--bg-nav-rgb), 0.9);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 0.25rem 0;
    transition: var(--transition-fast);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-blue);
    transition: width 0.3s ease;
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--accent-blue);
}

/* Dropdowns */
.nav-group {
    position: relative;
    cursor: pointer;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    padding: 0.75rem;
    margin-top: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-premium);
    z-index: 1001;
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}

.nav-group:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    color: var(--text-muted) !important;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue) !important;
    padding-left: 1.25rem;
}

/* Mobile Toggle */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    background: none;
    border: none;
    z-index: 2001;
    padding: 0.5rem;
}

.hamburger span {
    width: 28px;
    height: 2px;
    background: var(--text-main);
    border-radius: 2px;
    transition: 0.3s;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-fast);
    cursor: pointer;
    border: none;
    font-size: 1rem;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue), #2563eb);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-card);
}

.btn-outline:hover {
    background: var(--border-card);
}

/* Theme & Language */
.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle, .lang-switcher {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid var(--border-card);
    background: var(--bg-card);
    color: var(--text-main);
    transition: all 0.3s;
}

.lang-switcher {
    width: auto;
    padding: 0 0.75rem;
    gap: 0.5rem;
    position: relative;
    border-radius: 9999px;
}

.lang-dropdown {
    position: absolute;
    top: 110%;
    right: 0;
    min-width: 120px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-card);
    border-radius: 12px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-premium);
}

.lang-switcher:hover .lang-dropdown {
    display: flex;
}

.lang-item {
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lang-item:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
}

/* Pricing Section */
.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 24px;
    padding: 2rem;
    transition: all 0.3s;
}

.mobile-pricing-cards {
    display: none;
}

/* Responiveness */
@media (max-width: 1024px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--bg-main);
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        padding: 4rem 2rem;
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 2000;
        overflow-y: auto;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.5rem;
        margin: 1rem 0;
        width: 100%;
    }

    .hamburger { display: flex; }
    
    .nav-group { width: 100%; margin: 1rem 0; }
    .nav-group span { 
        font-size: 1.5rem; 
        font-weight: 600; 
        display: flex; 
        align-items: center; 
        justify-content: space-between;
        border-bottom: 1px solid var(--border-card); 
        padding-bottom: 0.75rem; 
        margin-bottom: 0.5rem; 
        color: var(--text-main);
    }

    .nav-group i {
        transition: transform 0.3s;
    }

    .nav-group.active i {
        transform: rotate(180deg);
    }
    
    .dropdown-menu { 
        position: static; 
        display: none !important; 
        width: 100%; 
        box-shadow: none; 
        background: transparent; 
        border: none;
        padding-left: 1rem;
        margin-top: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .nav-group.active .dropdown-menu {
        display: flex !important;
        animation: slideDown 0.3s ease-out;
    }

    .dropdown-item { 
        font-size: 1.1rem !important; 
        padding: 0.5rem 0;
    }

    .hero { text-align: center; padding-top: 8rem; }
    .hero .flex-center { flex-direction: column; gap: 1rem; }
}

@media (max-width: 768px) {
    .section { padding: var(--space-l) 0; }
    
    .pricing-table-wrapper { display: none; }
    .mobile-pricing-cards { display: flex; flex-direction: column; gap: 1.5rem; }
    
    .estimator-box { grid-template-columns: 1fr; gap: 1.5rem; padding: 1.5rem; }
    .estimator-result { text-align: center; margin-top: 1rem; }
    .est-cost { font-size: 2rem; }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; max-height: 0; }
    to { opacity: 1; max-height: 500px; }
}

.fade-in { opacity: 0; transform: translateY(20px); transition: all 0.6s ease-out; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

.text-gradient {
    background: linear-gradient(135deg, var(--text-main) 0%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
