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

/* =========================================
   OnlinePDFPro - Premium Midnight Aurora Design System
   ========================================= */

:root {
    /* Core Palette: Midnight Aurora */
    --midnight: #020617;
    /* Deep Slate Background */
    --aurora-violet: #8b5cf6;
    /* Electric Violet Accents */
    --aurora-azure: #0ea5e9;
    /* Azure Accents */
    --aurora-glow: #7c3aed;

    /* Semantic Colors */
    --primary: var(--aurora-violet);
    --secondary: var(--aurora-azure);
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;

    /* Surface Colors (Dark Mode Native) */
    --surface-0: #020617;
    --surface-1: #0f172a;
    --surface-2: #1e293b;
    --surface-3: #334155;

    /* Text Colors */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* Glassmorphism & Borders */
    --glass-bg: rgba(15, 23, 42, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-glow: rgba(139, 92, 246, 0.15);

    /* Spacing & Sizing */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --container-max: 1280px;
    --nav-height: 72px;

    /* Animation Tokens */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --transition-base: 0.3s var(--ease-out);
}

/* Light Mode Override (Sophisticated Grey/Azure) */
[data-theme="light"] {
    --midnight: #f8fafc;
    --surface-0: #f8fafc;
    --surface-1: #ffffff;
    --surface-2: #f1f5f9;
    --surface-3: #e2e8f0;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;

    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(0, 0, 0, 0.08);
    --glass-glow: rgba(139, 92, 246, 0.1);
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--midnight);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(139, 92, 246, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(14, 165, 233, 0.05) 0%, transparent 40%);
}

h1,
h2,
h3,
h4,
.logo-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Shared Components & Utilities */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    transition: var(--transition-base);
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(15, 23, 42, 0.8);
}

/* Layout: Header Refined */
.header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: var(--container-max);
    height: var(--nav-height);
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    padding: 0 32px;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    font-size: 1.75rem;
}

.logo-text {
    font-size: 1.25rem;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav {
    display: flex;
    gap: 32px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9375rem;
    transition: var(--transition-base);
}

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

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Premium Buttons */
.btn {
    border-radius: var(--radius-full);
    font-weight: 600;
    padding: 12px 24px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    transition: var(--transition-base);
    font-size: 0.9375rem;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--aurora-violet);
    color: white;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: var(--aurora-glow);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
    background: var(--surface-2);
    color: var(--text-primary);
    border-color: var(--glass-border);
}

.btn-secondary:hover {
    background: var(--surface-3);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Improved Hero Section */
.hero {
    padding: 160px 0 100px;
    text-align: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 400px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
    z-index: -1;
    filter: blur(60px);
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero-title .highlight {
    background: linear-gradient(135deg, var(--aurora-violet), var(--aurora-azure));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto 40px;
}

/* Bento-Inspired Grid (Tools) */
.popular-tools {
    padding: 60px 0;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 48px;
}

.tool-card {
    padding: 32px;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
}

.tool-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(139, 92, 246, 0.08) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tool-card:hover::after {
    opacity: 1;
}

.tool-icon {
    font-size: 2.5rem;
    margin-bottom: 24px;
    display: block;
}

.tool-name {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.tool-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Feature Sections Redesign */
.section {
    padding: 100px 0;
}

.section-tag {
    color: var(--aurora-violet);
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
    display: block;
}

/* Footer Facelift */
.footer {
    padding: 80px 0 40px;
    background: var(--surface-1);
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr repeat(2, 1fr);
    gap: 60px;
}

.footer-links-group h4 {
    margin-bottom: 24px;
    font-size: 1rem;
    color: var(--text-primary);
}

.footer-links-group ul {
    list-style: none;
}

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

.footer-links-group a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    transition: var(--transition-base);
}

.footer-links-group a:hover {
    color: var(--text-primary);
}

/* Responsive Overrides */
@media (max-width: 768px) {
    .header {
        top: 0;
        width: 100%;
        border-radius: 0;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .nav {
        display: none;
        /* Mobile menu logic to be implemented next */
    }
}

/* Animation Utilities */
.fade-in {
    opacity: 0;
    animation: fadeIn 0.8s var(--ease-out) forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}