:root {
    /* Modern Color Palette */
    --primary: #4f46e5;
    /* Indigo 600 */
    --primary-dark: #4338ca;
    --primary-light: #818cf8;
    --secondary: #0ea5e9;
    /* Sky 500 */
    --accent: #f59e0b;
    /* Amber 500 */
    --background: #0f172a;
    /* Slate 900 */
    --surface: #1e293b;
    /* Slate 800 */
    --surface-light: #334155;
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --border: #334155;
    --error: #ef4444;
    --success: #10b981;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-pro: 0 0 15px rgba(245, 158, 11, 0.2);

    /* Radius */
    --radius-sm: 0.5rem;
    --radius: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

img,
svg {
    display: block;
    max-width: 100%;
}

/* Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

@media (min-width: 768px) {
    .container {
        padding: 0 2rem;
    }
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    color: var(--text);
}

h1 {
    font-size: 2.25rem;
    letter-spacing: -0.025em;
}

h2 {
    font-size: 1.875rem;
    letter-spacing: -0.025em;
}

h3 {
    font-size: 1.5rem;
}

@media (min-width: 768px) {
    h1 {
        font-size: 3.5rem;
    }

    h2 {
        font-size: 2.5rem;
    }

    h3 {
        font-size: 1.75rem;
    }
}

p {
    margin-bottom: var(--spacing-md);
}

/* Utilities */
.text-center {
    text-align: center;
}

.text-primary {
    color: var(--primary);
}

.text-muted {
    color: var(--text-muted);
}

.hidden {
    display: none !important;
}

.mb-2 {
    margin-bottom: var(--spacing-sm);
}

.mb-4 {
    margin-bottom: var(--spacing-lg);
}

.mt-4 {
    margin-top: var(--spacing-lg);
}

.flex {
    display: flex;
}

.gap-2 {
    gap: var(--spacing-sm);
}

.items-center {
    align-items: center;
}

/* Navigation */
.navbar {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo svg {
    color: var(--primary);
}

.nav-links {
    display: none;
    gap: 2rem;
    align-items: center;
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }
}

/* Mobile Menu Active State */
@media (max-width: 767px) {
    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        padding: 1.5rem;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
        gap: 1.5rem;
        animation: slideDown 0.3s ease-out forwards;
    }

    .nav-links.active .nav-link {
        width: 100%;
        text-align: center;
        padding: 0.75rem;
        border-radius: var(--radius);
        transition: background 0.2s;
    }

    .nav-links.active .nav-link:hover {
        background: rgba(255, 255, 255, 0.05);
    }

    /* Override utility classes for auth-links in mobile menu */
    .nav-links.active .auth-links {
        width: 100%;
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links.active .auth-links .btn {
        width: 100%;
        justify-content: center;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-link {
    font-weight: 500;
    color: var(--text-muted);
}

.nav-link:hover {
    color: var(--text);
}

/* Hero Section */
.hero {
    padding: 6rem 0 4rem;
    text-align: center;
    background: radial-gradient(circle at top center, rgba(79, 70, 229, 0.15), transparent 60%);
}

.hero-title {
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}

/* Hero Stats - New Design */
.hero-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

@media (min-width: 640px) {
    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-align: left;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: var(--radius);
    transition: var(--transition);
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.stat-icon-wrapper {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary-light);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-text {
    display: flex;
    flex-direction: column;
}

.stat-text strong {
    font-size: 0.9375rem;
    color: var(--text);
}

.stat-text span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Tool Cards */
.tool-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.tool-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.tool-icon {
    width: 48px;
    height: 48px;
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.tool-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
}

.tool-card p {
    font-size: 0.9375rem;
    color: var(--text-muted);
    flex-grow: 1;
}

/* Badges */
.tool-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 99px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-pro {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    box-shadow: var(--shadow-pro);
}

.badge-image,
.badge-text,
.badge-generator,
.badge-pdf {
    background: var(--surface-light);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    line-height: 1;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    border-color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
}

.btn-ghost:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

/* Footer */
.footer {
    border-top: 1px solid var(--border);
    padding: 4rem 0 2rem;
    margin-top: 6rem;
    background: #0b1120;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.footer h4 {
    font-size: 0.9375rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text);
    margin-bottom: 1.25rem;
}

.footer ul {
    list-style: none;
}

.footer li {
    margin-bottom: 0.75rem;
}

.footer a {
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.footer a:hover {
    color: var(--primary-light);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    /* Add hidden by default */
    background: transparent;
    border: none;
    color: var(--text);
}

@media (max-width: 767px) {
    .mobile-menu-btn {
        display: block;
    }
}

/* Features Section (Grid) */
.features-section {
    padding: 4rem 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
}

.feature-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1.5rem;
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}