:root {
    /* Colors */
    --color-bg-main: #0a0a0d;
    /* Deep dark grey/black */
    --color-bg-card: #141419;
    --color-text-primary: #ffffff;
    --color-text-secondary: #a0a0b0;
    --color-accent-purple: #9d4edd;
    --color-accent-green: #2ec4b6;
    --color-accent-gradient: linear-gradient(135deg, var(--color-accent-purple), var(--color-accent-green));

    /* Typography */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;

    /* Spacing */
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 4rem;

    /* Borders */
    --border-radius-sm: 16px;
    --border-radius-md: 24px;
    --border-radius-lg: 32px;
}

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

html {
    background-color: var(--color-bg-main);
}

body {
    background: radial-gradient(circle at bottom, #1a1a2e 0%, var(--color-bg-main) 70%);
    background-attachment: fixed;
    color: var(--color-text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

a:hover {
    opacity: 0.8;
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.grid {
    display: grid;
    gap: var(--spacing-lg);
}

/* Buttons */
@keyframes btn-pulse {
    0% {
        box-shadow: 0 4px 15px rgba(46, 196, 182, 0.4);
    }

    50% {
        box-shadow: 0 4px 25px rgba(46, 196, 182, 0.7);
    }

    100% {
        box-shadow: 0 4px 15px rgba(46, 196, 182, 0.4);
    }
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    font-size: 1rem;
    /* Fix for <button> elements */
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* Slightly adjusted for snappier feel */
}

body .btn:hover {
    transform: translateY(-2px) scale(1.05);
    opacity: 1;
}

.btn-primary {
    background: var(--color-accent-green);
    color: #000;
}

body .btn-primary:hover {
    animation: btn-pulse 2s infinite ease-in-out;
    filter: brightness(1.1);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

body .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px) scale(1.05);
}

/* Navigation */
header {
    margin: 1rem auto;
    padding: 0.5rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    background-color: rgba(10, 10, 13, 0.6);
    backdrop-filter: blur(15px);
    position: sticky;
    top: 1rem;
    z-index: 100;
    max-width: 900px;
    width: calc(100% - 2rem);
    display: flex;
    justify-content: center;
}

header .container {
    width: 100%;
    padding: 0;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--color-text-primary);
    margin: 5px 0;
    transition: 0.3s;
}

nav ul {
    list-style: none;
    display: flex;
    gap: var(--spacing-lg);
}

nav a {
    font-weight: 500;
    color: var(--color-text-secondary);
}

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

.logo {
    font-weight: 700;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
}

/* Hero Section */
.hero {
    padding: 8rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero img {
    animation: logo-glow 3s infinite alternate ease-in-out;
}

@keyframes logo-glow {
    0% {
        filter: drop-shadow(0 0 10px rgba(157, 78, 221, 0.3));
    }

    100% {
        filter: drop-shadow(0 0 25px rgba(46, 196, 182, 0.6));
    }
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: var(--spacing-md);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.hero p.subtitle {
    font-size: 1.5rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.gradient-text {
    background: var(--color-accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Footer */
footer {
    padding: var(--spacing-xl) 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: var(--spacing-xl);
    text-align: center;
    color: var(--color-text-secondary);
}

footer .partners {
    display: flex;
    justify-content: center;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
    opacity: 0.7;
}

/* Sections */
section {
    padding: var(--spacing-xl) 0;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

.card {
    background: var(--color-bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-lg);
    transition: transform 0.2s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Tool Card Specifics */
.card-tool {
    height: auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    text-align: center;
}

.card-tool-image {
    width: 100%;
    height: auto;
    aspect-ratio: 512 / 388;
    object-fit: cover;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.card-tool-content {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.card-tool .tool-logo {
    width: auto;
    height: 60px;
    object-fit: contain;
    margin: 1rem auto 1rem;
}

.card-tool-content h2 {
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}

.card-tool-content p {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    color: var(--color-text-secondary);
}

/* Q&A */
.qa-item {
    margin-bottom: var(--spacing-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: var(--spacing-md);
}

.qa-item h3 {
    margin-bottom: var(--spacing-sm);
    color: var(--color-accent-green);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 0 var(--spacing-md);
    }

    header {
        border-radius: 20px;
        /* Slightly less rounded on mobile to save space if needed, or keep 50px */
        padding: 0.8rem 1.5rem;
    }

    header .container {
        flex-wrap: wrap;
    }

    .mobile-menu-btn {
        display: block;
    }

    nav {
        width: 100%;
    }

    nav ul {
        flex-direction: column;
        width: 100%;
        gap: var(--spacing-md);

        /* Start with zero spacing to avoid taking space when closed */
        padding-top: 0;
        padding-bottom: 0;
        margin-top: 0;
        border-top: 1px solid transparent;

        /* Animation properties */
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        transition:
            max-height 0.4s ease-in-out,
            opacity 0.4s ease-in-out,
            margin-top 0.4s ease-in-out,
            padding-top 0.4s ease-in-out,
            padding-bottom 0.4s ease-in-out,
            border-color 0.4s ease-in-out;
    }

    nav ul.show {
        max-height: 400px;
        /* Approximate max height */
        opacity: 1;
        margin-top: var(--spacing-sm);
        padding-top: var(--spacing-md);
        padding-bottom: var(--spacing-md);
        border-top-color: rgba(255, 255, 255, 0.05);
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p.subtitle {
        font-size: 1.1rem;
    }

    .grid {
        grid-template-columns: 1fr !important;
    }

    footer .partners {
        flex-direction: column;
        gap: var(--spacing-lg);
    }
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Fix: Restore button transition speed after fade-in */
.btn.fade-in-up.visible {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.modal-content {
    background-color: var(--color-bg-card);
    margin: auto;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 90%;
    max-width: 500px;
    border-radius: var(--border-radius-md);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.close-modal {
    color: var(--color-text-secondary);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 15px;
    right: 20px;
    transition: color 0.2s;
    line-height: 1;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--color-text-primary);
    text-decoration: none;
}

.modal h2 {
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
    text-align: left;
}

.modal p {
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--color-text-primary);
}

.form-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(0, 0, 0, 0.3);
    color: var(--color-text-primary);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: border-color 0.2s, background-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-accent-green);
    background-color: rgba(0, 0, 0, 0.5);
}

.error-message {
    color: #ff4d4d;
    font-size: 0.85rem;
    margin-top: 0.4rem;
    display: block;
    min-height: 1.2em;
    /* Reserve space */
}

/* Success Message Styles */
#modal-success-message h3 {
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

/* Cookie Consent Banner */
.cookie-banner {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    left: 2rem;
    max-width: 600px;
    margin: 0 auto;
    background-color: rgba(10, 10, 13, 0.9);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
    z-index: 2000;
    display: none;
    /* Hidden by default */
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

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

.cookie-content {
    flex: 1;
    min-width: 250px;
}

.cookie-content p {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
    margin-bottom: 0;
}

.cookie-actions {
    display: flex;
    gap: 0.5rem;
}

.cookie-actions .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
}

@media (max-width: 600px) {
    .cookie-banner {
        right: 1rem;
        left: 1rem;
        bottom: 1rem;
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-actions {
        justify-content: flex-end;
        margin-top: 0.5rem;
    }
}