/* DosVault Website Styles */
:root {
    /* Colors */
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    
    /* Backgrounds */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #e2e8f0;
    --bg-dark: #1e293b;
    --bg-darker: #0f172a;
    
    /* Text */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;
    
    /* Borders */
    --border-color: #e2e8f0;
    --border-dark: #334155;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Typography */
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* Layout */
    --max-width: 1280px;
    --nav-height: 64px;
    --spacing: 1rem;
    --border-radius: 0.75rem;
    
    /* Transitions */
    --transition: all 0.2s ease-in-out;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 600;
    margin-bottom: 0.5em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 2rem); }
h4 { font-size: clamp(1.125rem, 2.5vw, 1.5rem); }

p {
    margin-bottom: 1em;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
    line-height: 1;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-inverse);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    color: var(--text-inverse);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-kofi {
    background: linear-gradient(135deg, #ff5f5f, #ff813c);
    color: var(--text-inverse);
    border: 2px solid transparent;
}

.btn-kofi:hover {
    background: linear-gradient(135deg, #ff4747, #ff6b24);
    color: var(--text-inverse);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(248, 250, 252, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    height: var(--nav-height);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
}

.logo {
    height: 32px;
    width: auto;
}

.brand-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    position: relative;
    width: 2rem;
    height: 2rem;
    flex-direction: column;
    justify-content: space-around;
}

.nav-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: var(--text-primary);
    transition: var(--transition);
    transform-origin: center;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: var(--transition);
}

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

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--primary-color);
    border-radius: 1px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
    }
    
    .nav-toggle {
        display: flex;
        z-index: 1001;
    }
    
    .nav-toggle:hover {
        background-color: var(--bg-secondary);
    }
    
    .nav-menu {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        height: calc(100vh - var(--nav-height));
        background-color: var(--bg-primary);
        border-top: 1px solid var(--border-color);
        flex-direction: column;
        padding: 2rem 1rem;
        gap: 0;
        transform: translateX(100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease-in-out;
        overflow-y: auto;
        z-index: 1000;
        box-shadow: var(--shadow-lg);
    }
    
    /* Dark mode support for mobile navigation */
    @media (prefers-color-scheme: dark) {
        .nav-menu {
            background-color: var(--bg-dark);
            border-top: 1px solid var(--border-dark);
            color: var(--text-inverse);
        }
        
        .nav-link {
            color: var(--text-inverse);
            border-bottom-color: var(--border-dark);
        }
        
        .nav-link:hover {
            background-color: rgba(255, 255, 255, 0.1);
            color: var(--accent-color);
        }
        
        .nav-link.active {
            color: var(--accent-color);
            background-color: rgba(245, 158, 11, 0.1);
        }
        
        .nav-toggle:hover {
            background-color: rgba(255, 255, 255, 0.1);
        }
        
        .nav-actions {
            border-top-color: var(--border-dark);
        }
        
        .navbar {
            background-color: rgba(30, 41, 59, 0.95);
            border-bottom-color: var(--border-dark);
        }
    }
    
    .nav-menu.active {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 0;
        margin-bottom: 2rem;
    }
    
    .nav-link {
        width: 100%;
        padding: 1.25rem 1rem;
        border-bottom: 1px solid var(--border-color);
        font-size: 1.1rem;
        font-weight: 500;
        transition: var(--transition);
        border-radius: 0;
    }
    
    .nav-link:hover {
        background-color: var(--bg-secondary);
        color: var(--primary-color);
    }
    
    .nav-link.active {
        color: var(--primary-color);
        font-weight: 600;
        background-color: rgba(37, 99, 235, 0.1);
    }
    
    .nav-actions {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
        margin-top: auto;
        padding-top: 2rem;
        border-top: 1px solid var(--border-color);
    }
    
    .nav-actions .btn {
        width: 100%;
        justify-content: center;
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Improved hamburger animation */
    .nav-toggle span {
        transition: all 0.3s ease-in-out;
        transform-origin: center;
    }
    
    /* Body scroll lock when menu is open */
    body.nav-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
    
    /* Improve touch targets for mobile */
    .nav-toggle {
        min-width: 44px;
        min-height: 44px;
    }
    
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    /* Ensure proper spacing on small screens */
    @media (max-width: 480px) {
        .nav-container {
            padding: 0 0.75rem;
        }
        
        .nav-menu {
            padding: 1.5rem 0.75rem;
        }
        
        .brand-text {
            font-size: 1.25rem;
        }
    }
}

/* Main Content */
main {
    margin-top: var(--nav-height);
    min-height: calc(100vh - var(--nav-height));
}

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Section */
.section {
    padding: 4rem 0;
}

.section-large {
    padding: 6rem 0;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    padding: 6rem 0 8rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('/static/images/grid-pattern.svg') repeat;
    opacity: 0.1;
    z-index: 0;
}

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

.hero-title {
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Cards */
.card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-icon {
    width: 3rem;
    height: 3rem;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--text-inverse);
    font-size: 1.25rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.card-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Grid */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

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

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Feature Section */
.features {
    padding: 6rem 0;
    background-color: var(--bg-secondary);
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    padding: 2rem 0;
}

.feature-icon {
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-inverse);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.feature-content h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.feature-content p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.7;
}

/* Screenshot Gallery */
.screenshot-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.screenshot {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.screenshot:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-xl);
}

.screenshot img {
    width: 100%;
    height: auto;
    display: block;
}

/* Code Blocks */
.code-block {
    background-color: var(--bg-dark);
    color: var(--text-inverse);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 1rem 0;
}

.code-block pre {
    margin: 0;
    white-space: pre;
    text-align: left;
}

/* Footer */
.footer {
    background-color: var(--bg-dark);
    color: var(--text-inverse);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h4 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.75rem;
}

.footer-section a {
    color: var(--text-muted);
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--text-inverse);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-brand h3 {
    font-size: 1.5rem;
    margin: 0;
}

.footer-brand p {
    color: var(--text-muted);
    margin: 0;
}

.footer-logo {
    height: 32px;
    width: auto;
    filter: brightness(0) invert(1);
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    font-size: 1.2rem;
    transition: var(--transition);
}

.footer-social a:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        padding: 4rem 0 6rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .feature-item {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .section-large {
        padding: 4rem 0;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.hidden { display: none; }
.visible { display: block; }

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

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Focus States for Accessibility */
a:focus,
button:focus,
.btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --text-secondary: #000000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}