/* --- Global Reset & Base Styles --- */
:root {
    --primary-color: #2563eb; /* Modern vibrant blue */
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b; /* Slate gray */
    --accent-color: #0ea5e9;
    --content-bg-color: rgba(255, 255, 255, 0.92);
    --glass-bg: rgba(15, 23, 42, 0.65);
    --dark-bg: rgba(15, 23, 42, 0.9);
    --text-color: #0f172a;
    --text-muted: #475569;
    --white: #ffffff;
    --border-color: rgba(226, 232, 240, 0.8);
    --font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --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);
    --radius: 12px;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background-image: url('../images/bg4096.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.15);
    z-index: -1;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: all 0.2s ease;
}

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

/* --- Header and Navigation --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 5%;
    background: var(--dark-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .logo {
    flex: 1;
    display: flex;
    justify-content: flex-start;
}

header .logo h1 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.025em;
}

header .logo-link {
    color: var(--white);
}

.menu-toggle {
    border: none;
    display: none;
    background: transparent;
    cursor: pointer;
    width: 44px;
    height: 44px;
    position: relative;
    z-index: 1001;
    padding: 0;
}

nav {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 0 0 auto;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav ul li a {
    color: #cbd5e1;
    font-weight: 500;
    font-size: 0.95rem;
}

nav ul li a:hover {
    color: var(--white);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: flex-end;
    white-space: nowrap;
    flex: 1;
}

/* --- Language Toggle --- */
.lang-toggle {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-right: 0.5rem;
}

.lang-link {
    color: #94a3b8 !important;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    transition: color 0.2s ease;
}

.lang-link.active {
    color: var(--white) !important;
}

.lang-link:hover {
    color: var(--primary-color) !important;
}

.lang-separator {
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.8rem;
    user-select: none;
}

.cta-button {
    background: var(--primary-color);
    color: var(--white);
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: var(--shadow-sm);
    display: inline-block;
    text-align: center;
}

.cta-button:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    color: var(--white);
}

/* --- Hamburger icon refinements --- */
.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    position: absolute;
    left: 10px;
    top: 21px;
    transition: all 0.3s;
}

.hamburger::before,
.hamburger::after {
    content: '';
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    position: absolute;
    transition: all 0.3s;
}

.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }

/* Hamburger states */
.menu-toggle[aria-expanded="true"] .hamburger {
    background: transparent;
}

.menu-toggle[aria-expanded="true"] .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}

.menu-toggle[aria-expanded="true"] .hamburger::after {
    transform: rotate(-45deg);
    top: 0;
}

/* --- Main Content --- */
main {
    margin-top: 24px;
    flex-grow: 1;
    width: 100%;
}

main section:last-of-type {
    margin-bottom: 0;
}

section {
    padding: 5rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

h2, h3, h4 {
    margin-bottom: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    text-align: center;
}

h2 { font-size: 3rem; }
h3 { font-size: 2.25rem; }

/* --- Hero Section --- */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 75vh;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);   
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    margin-bottom: 60px;
}

.hero-content {
    max-width: 850px;
    animation: fadeInSlideUp 0.8s ease-out forwards;
}

.hero-content h2 {
    color: var(--white);
    text-shadow: 0 4px 12px rgba(0,0,0,0.3);
    line-height: 1.1;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 3rem;
    color: #e2e8f0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    font-weight: 400;
}

.primary-cta, .secondary-cta {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 10px;
    font-weight: 600;
    margin: 0.5rem;
    transition: all 0.2s;
}

.primary-cta {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.4);
}

.primary-cta:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(37, 99, 235, 0.4);
    color: var(--white);
}

.secondary-cta {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
}

.secondary-cta:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

@keyframes fadeInSlideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Features & Demos Section (Glass Cards) --- */
.features-section, .docs-cta, .contact-section {
    background: var(--content-bg-color);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    margin-bottom: 4rem;
}

.feature-list, .demo-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-item, .demo-item {
    padding: 2.5rem;
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid #f1f5f9;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    text-align: center;
}

.feature-item:hover, .demo-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.feature-item h4, .demo-item h4 {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.feature-item p, .demo-item p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* --- Contact Section & Form --- */
.contact-form {
    max-width: 650px;
    margin: 0 auto;
    padding: 3rem;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.contact-form h2 {
    color: var(--text-color);
    margin-bottom: 1rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.submit-button {
    cursor: pointer;
    border: none;
    width: 100%;
    padding: 1rem;
}

/* --- Login Page Specific --- */
body.login-page {
    background-attachment: fixed;
}

body.login-page .contact-section {
    background: transparent;
    box-shadow: none;
    border: none;
    padding-top: 4rem;
}

body.login-page .contact-form {
    background: var(--dark-bg);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--white);
    max-width: 420px;
}

body.login-page .contact-form h2, 
body.login-page .form-group label {
    color: var(--white);
}

body.login-page .form-group input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--white);
}

body.login-page .form-group input:focus {
    background: rgba(255, 255, 255, 0.1);
}

body.login-page .contact-form hr {
    opacity: 0.1;
    margin-bottom: 2rem;
}

/* --- Footer --- */
footer {
    padding: 4rem 5%;
    background: var(--dark-bg);
    color: #94a3b8;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    width: 100%;
    margin-top: 1.5rem;
}

.footer-links {
    margin-bottom: 1.5rem;
}

.footer-links a {
    color: #cbd5e1;
    margin: 0 1rem;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--white);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    h2 { font-size: 2.25rem; }
    
    header {
        padding: 0.75rem 4%;
    }

    header .logo h1 {
        font-size: 1.25rem;
    }

    .header-actions {
        gap: 0.35rem;
    }

    .lang-toggle {
        margin-right: 0.2rem;
    }

    .cta-button {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 1001;
        width: 40px;
    }

    nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        background: var(--dark-bg);
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        z-index: 999;
        display: flex;
        visibility: hidden;
    }

    nav.is-open {
        transform: translateX(0);
        visibility: visible;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 2.5rem;
        margin-top: 80px; /* Space for header */
    }

    nav ul li a {
        font-size: 1.5rem;
    }

    .hero-content h2 {
        font-size: 2.5rem;
    }

    .primary-cta, .secondary-cta {
        width: 100%;
        margin: 0.5rem 0;
    }

    .login-section {
        padding-top: 0 !important;
    }
}