/* Modern Reset and Base Styles */
:root {
    /* Modern Color Palette (HSL) */
    --primary-hue: 250;
    --secondary-hue: 320;
    --accent-hue: 190;

    --color-primary: hsl(var(--primary-hue), 85%, 65%);
    --color-primary-dark: hsl(var(--primary-hue), 85%, 55%);
    --color-secondary: hsl(var(--secondary-hue), 85%, 65%);
    --color-accent: hsl(var(--accent-hue), 85%, 60%);

    --bg-body: #f8fafc;
    --bg-surface: rgba(255, 255, 255, 0.7);
    --bg-glass: rgba(255, 255, 255, 0.25);

    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-light: #f1f5f9;

    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --gradient-secondary: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%);
    --gradient-accent: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    --gradient-email: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --gradient-dark: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    --gradient-glass: linear-gradient(145deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.1));

    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);

    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;

    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-body: #0f172a;
    --bg-surface: rgba(30, 41, 59, 0.7);
    --bg-glass: rgba(30, 41, 59, 0.4);

    --text-main: #f8fafc;
    --text-muted: #94a3b8;

    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 25px rgba(168, 85, 247, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a {
    text-decoration: none;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    transition: var(--transition-base);
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image:
        radial-gradient(at 0% 0%, hsla(253, 16%, 7%, 1) 0, transparent 50%),
        radial-gradient(at 50% 0%, hsla(225, 39%, 30%, 1) 0, transparent 50%),
        radial-gradient(at 100% 0%, hsla(339, 49%, 30%, 1) 0, transparent 50%);
    transition: opacity 0.3s ease;
}

[data-theme="light"] body::before {
    background-image:
        radial-gradient(at 40% 20%, hsla(28, 100%, 74%, 1) 0px, transparent 50%),
        radial-gradient(at 80% 0%, hsla(189, 100%, 56%, 1) 0px, transparent 50%),
        radial-gradient(at 0% 50%, hsla(340, 100%, 76%, 1) 0px, transparent 50%);
}



/* Layout */
.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* Removed expensive backdrop-filter */
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--bg-surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition-base);
}

.header-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 40px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Theme Toggle */
.theme-toggle {
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
}

.theme-toggle:hover {
    background: rgba(148, 163, 184, 0.1);
    transform: rotate(15deg);
}

/* Main Content */
.main-content {
    flex: 1;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.intro-section {
    text-align: center;
    margin-bottom: 4rem;
    animation: fadeInDown 0.8s ease-out;
}

.intro-section h2 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.intro-section p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    perspective: 1000px;
}

/* Glassmorphism Cards */
.tool-card {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: 2rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    will-change: transform;
    transform: translateZ(0);
    /* Hardware acceleration */
}

.tool-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-glow);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Card Header */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: white;
    box-shadow: var(--shadow-md);
}

.plane-icon {
    background: var(--gradient-primary);
}

.sop-icon {
    background: var(--gradient-secondary);
}

.blog-icon {
    background: var(--gradient-accent);
}

.email-icon {
    background: var(--gradient-email);
}

.card-badge {
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Card Content */
.card-content h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-main);
}

.card-content p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.6;
}

.features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.feature-tag {
    font-size: 0.85rem;
    padding: 0.35rem 0.75rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--color-primary-dark);
    border-radius: var(--radius-lg);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

[data-theme="dark"] .feature-tag {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
}

.feature-tag i {
    font-size: 0.75rem;
}

/* Buttons */
.card-footer {
    margin-top: auto;
}

.launch-btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: var(--radius-lg);
    background: var(--text-main);
    color: var(--bg-body);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.launch-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.launch-btn:hover::before {
    left: 100%;
}

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

.plane-card .launch-btn {
    background: var(--gradient-primary);
    color: white;
}

.sop-card .launch-btn {
    background: var(--gradient-secondary);
    color: white;
}

.blog-card .launch-btn {
    background: var(--gradient-accent);
    color: white;
}

.email-card .launch-btn {
    background: var(--gradient-email);
    color: white;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--bg-surface);
    backdrop-filter: blur(10px);
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

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

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

.tool-card {
    animation: fadeInUp 0.6s ease-out backwards;
}

.tool-card:nth-child(1) {
    animation-delay: 0.1s;
}

.tool-card:nth-child(2) {
    animation-delay: 0.2s;
}

.tool-card:nth-child(3) {
    animation-delay: 0.3s;
}

/* Responsive Design */
@media (max-width: 768px) {
    .intro-section h2 {
        font-size: 2.5rem;
    }

    .main-content {
        padding: 2rem 1rem;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--bg-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.close-modal {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-full);
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    transform: rotate(90deg);
}

.project-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.project-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    color: var(--text-main);
    transition: var(--transition-base);
}

.project-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
    border-color: rgba(255, 255, 255, 0.2);
}

.project-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
}

.project-info {
    flex: 1;
}

.project-info h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.project-info span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.arrow-icon {
    color: var(--text-muted);
    font-size: 0.9rem;
    opacity: 0;
    transform: translateX(-10px);
    transition: var(--transition-base);
}

.project-item:hover .arrow-icon {
    opacity: 1;
    transform: translateX(0);
}