/* 1. Variables */
:root {
    --primary: #6200EA;
    --secondary: #03DAC6;
    --dark: #262626; /* 25% less dark than #1a1a1a */
    --light: #FFFFFF;
    --gradient: linear-gradient(135deg, #6200EA, #03DAC6);
    --transition: all 0.3s ease;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    --border-radius: 12px;
}

/* Performance optimizations */
* {
    will-change: auto;
}

/* Preload critical fonts */
@font-face {
    font-family: 'Inter';
    font-display: swap;
}

/* 2. Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', 'Roboto', 'Arial', sans-serif;
}

/* Utility classes */
.mt-3 {
    margin-top: 1rem;
}

body {
    background-color: var(--dark);
    color: var(--light);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-smooth: always;
}

/* Flex utility classes */
.flex-row {
    display: flex;
    flex-direction: row;
}
.flex-col {
    display: flex;
    flex-direction: column;
}
.flex-wrap {
    flex-wrap: wrap;
}
.align-center {
    align-items: center;
}
.justify-center {
    justify-content: center;
}
.space-between {
    justify-content: space-between;
}

/* 3. Layout & Containers */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.section {
    padding: 100px 0;
    position: relative;
    scroll-margin-top: 100px;
}

/* 4. Typography */
.feature-card p,
.tech-item p,
.tech-content p,
.section-header p,
.step p,
.faq-answer p,
.contact p,
.tech-item h4,
.step h3,
.tech-content h3,
.form-control::placeholder,
.form-control {
    color: var(--light);
}

/* 5. Components */
/* Header & Navigation */
header {
    position: fixed;
    width: 100%;
    top: 20px;
    z-index: 1000;
    padding: 0;
    display: flex;
    justify-content: center;
}

header .container {
    background-color: rgba(18, 18, 18, 0.3);
    backdrop-filter: blur(5px);
    border-radius: 50px;
    margin: 0 20px;
    padding: 20px 40px;
    max-width: calc(1200px - 40px);
    width: 100%;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 7px;
}

.logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--light) !important;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    color: var(--secondary);
}

.cta-button {
    background: var(--gradient);
    color: var(--light);
    padding: 10px 25px;
    border: none;
    border-radius: 25px;
    font-weight: 500;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(98, 0, 234, 0.3);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    background: radial-gradient(circle at center, rgba(98, 0, 234, 0.2), transparent 70%),
                linear-gradient(to bottom, var(--dark), transparent);
    position: relative;
    overflow: hidden;
    margin-top: 50px;
    padding-bottom: 100px;
}

#hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to bottom, transparent, var(--dark));
    pointer-events: none;
    z-index: 1;
}

.hero-content {
    width: 50%;
    z-index: 2;
}

.hero h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero p {
    font-size: 18px;
    margin-bottom: 30px;
}

.hero-image {
    position: absolute;
    right: 0;
    width: 50%;
    height: 75%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.hero-image img {
    max-width: 100%;
    animation: float 6s ease-in-out infinite;
}

.scroll-arrow {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    cursor: pointer;
}

.scroll-arrow img {
    width: 40px;
    height: auto;
    filter: brightness(0) invert(1);
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 700;
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gradient);
}

.section-header p {
    font-size: 18px;
    max-width: 700px;
    margin: 0 auto;
}

/* Features Section */
#features {
    position: relative;
    margin-top: 0;
    padding-top: 100px;
    background: linear-gradient(to bottom, transparent, var(--dark) 50px);
}
.features {
    gap: 30px;
}

.feature-card {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 30px;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex: 1 1 300px;
    min-width: 280px;
    max-width: 400px;
    margin: 0 auto;
}

.feature-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 20px;
}

.feature-icon img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    transition: var(--transition);
    margin-left: 0;
    object-fit: contain;
    filter: brightness(0) invert(1);
    transition: var(--transition);
    margin-left: 0;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
    text-align: center;
}

/* How It Works Section */
.how-it-works {
    position: relative;
}

.steps {
    position: relative;
    gap: 30px;
    width: 100%;
    justify-content: center;
}

.steps-line {
    position: absolute;
    top: 35px;
    left: 10%;
    width: 80%;
    height: 3px;
    background: var(--gradient);
    z-index: 1;
}

.step {
    flex: 1 1 200px;
    min-width: 200px;
    max-width: 300px;
    text-align: left;
    align-items: center;
    position: relative;
    z-index: 2;
}

.step-number {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    margin: 0 auto 20px auto;
    position: relative;
    z-index: 2;
}

.step h3 {
    margin-bottom: 15px;
    font-size: 20px;
    text-align: left;
    width: 100%;
}

.step p {
    text-align: left;
    width: 100%;
}

@media (max-width: 768px) {
    .steps {
        flex-direction: column;
        gap: 30px;
        align-items: center;
    }
    .step {
        width: 100%;
        align-items: flex-start;
        text-align: left;
        flex-direction: column;
        display: flex;
        gap: 0;
    }
    .step-header {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 10px;
        width: 100%;
    }
    .step-number {
        width: 36px;
        height: 36px;
        font-size: 16px;
        margin: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }
    .step h3 {
        margin-bottom: 0;
        font-size: 18px;
        display: flex;
        align-items: center;
        gap: 10px;
    }
    .step p {
        margin-top: 5px;
        margin-left: 0;
        width: 100%;
    }
    .steps-line {
        display: none;
    }
}

/* Technical Section */
.tech-details {
    display: flex;
    flex-direction: row;
    gap: 50px;
    width: 100%;
    flex-wrap: nowrap;
    min-height: 400px;
    align-items: center;
}

.tech-image {
    width: 45%;
    flex: 0 0 45%;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    max-height: 100%;
}

.tech-image img {
    width: 100%;
    height: auto;
    max-height: 100%;
    border-radius: 15px;
    object-fit: contain;
}

.tech-content {
    width: 55%;
    flex: 0 0 55%;
}

.tech-list {
    margin-top: 30px;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    margin-bottom: 20px;
    padding-left: 0;
    position: relative;
}

.tech-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
}

.tech-item::before {
    display: none;
}

.tech-header::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    background: var(--gradient);
    border-radius: 50%;
    flex-shrink: 0;
}

.tech-item h4 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.tech-item p {
    margin: 5px 0 0 0;
    font-size: 16px;
    color: var(--light);
}

@media (max-width: 768px) {
    .tech-header {
        gap: 10px;
    }
    .tech-header::before {
        width: 16px;
        height: 16px;
    }
    .tech-item h4 {
        font-size: 18px;
    }
    .tech-item p {
        font-size: 15px;
    }
}
@media (max-width: 992px) {
    .tech-details {
        flex-direction: column;
        gap: 30px;
    }
    
    .tech-image, .tech-content {
        width: 100%;
    }
}

/* FAQ Section */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.faq-question {
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.05);
    font-weight: 600;
    cursor: pointer;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question::after {
    content: '+';
    font-size: 24px;
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item.active .faq-question::after {
    content: '-';
}

.faq-item.active .faq-answer {
    padding: 20px;
    max-height: 500px;
}

/* Contact Section */
.contact {
    background: linear-gradient(to bottom, var(--dark), #1a1a1a);
}

.contact-container {
    display: flex;
    gap: 50px;
}

.contact-info {
    width: 40%;
}

.contact-info h3 {
    font-size: 24px;
    margin-bottom: 20px;
}

.contact-detail {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.contact-icon {
    margin-right: 15px;
    font-size: 24px;
    color: var(--secondary);
}

.contact-form {
    width: 100%;
    margin: 0 auto;
    max-width: 800px;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
    width: 100%;
}

.form-control {
    width: 100%;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--light);
    font-size: 16px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 2px rgba(3, 218, 198, 0.2);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

#contactForm {
    display: flex;
    flex-direction: column;
    width: 100%;
}

#contactForm .cta-button {
    align-self: flex-start;
    margin-top: 10px;
}

/* Footer */
.footer {
    background-color: rgba(18, 18, 18, 0.9);
    backdrop-filter: blur(10px);
    color: #fff;
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 30px;
    margin-bottom: 40px;
    width: 100%;
}

.footer-brand,
.footer-links {
    width: 100%;
    min-width: 0;
}

.footer-brand {
    align-items: flex-start !important;
    text-align: left !important;
}

.footer-brand img {
    max-height: 40px;
    width: auto;
    object-fit: contain;
    margin-bottom: 20px;
    align-self: flex-start;
}

.footer-brand p {
    color: var(--light);
    margin-bottom: 20px;
    line-height: 1.6;
}

.footer-brand .cta-button {
    margin-top: 15px;
    font-size: 14px;
    padding: 8px 20px;
    display: inline-block;
    text-decoration: none;
    align-self: flex-start !important;
}

.footer-brand .cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(98, 0, 234, 0.3);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--light);
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--light);
    color: var(--dark);
    transform: translateY(-3px);
}

.social-link svg {
    width: 16px;
    height: 16px;
}

.footer-links h4 {
    color: var(--light);
    margin-bottom: 20px;
    font-size: 18px;
}

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

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

.footer-links a {
    color: var(--light);
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.copyright {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    padding: 20px 0;
    margin-top: 40px;
    position: relative;
}

.copyright::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.language-selector {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.5rem;
}

.language-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: var(--light);
    cursor: pointer;
    padding: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.language-btn img {
    max-width: 20px;
    max-height: 20px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.language-btn:hover {
    opacity: 1;
}

.language-dropdown {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(18, 18, 18, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0.5rem;
    display: none;
    min-width: 120px;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.3);
    z-index: 1000;
    text-align: center;
    flex-direction: column;
}

.language-dropdown a {
    padding: 0.5rem;
    text-decoration: none;
    color: var(--light);
    transition: background 0.2s;
    white-space: nowrap;
    width: 100%;
    text-align: center;
}

.language-selector:hover .language-dropdown {
    display: flex;
}

.language-dropdown a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.language-dropdown a.active {
    color: var(--secondary);
    font-weight: 500;
}

/* Security Badge */
.security-badge {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: flex-start;
}

.security-badge img {
    max-height: 35px;
    width: auto;
    object-fit: contain;
}

/* 404 Page Styles */
.error-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
}

.content-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.error-content {
    background: rgba(255, 255, 255, 0);
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
}

.error-content h1 {
    font-size: 5rem;
    font-weight: 900;
    margin-bottom: 10px;
    color: var(--primary);
}

.error-content h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.error-content p {
    margin-bottom: 20px;
    color: var(--light);
}

.error-content ul {
    text-align: left;
    margin: 0 auto 20px auto;
    max-width: 400px;
    color: var(--light);
}

.error-actions {
    margin-top: 30px;
}

.error-actions .cta-button {
    font-size: 1rem;
    padding: 12px 32px;
}

/* 7. Animations */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

/*8. Media Queries */

/* Medium Screens */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    nav .cta-button {
        display: none;
    }
}

/* Small Screens */
@media (max-width: 768px) {
    nav {
        justify-content: center;
    }
    .logo {
        margin: 0 auto;
    }
    .nav-links {
        display: none;
    }
    .hero {
        text-align: center;
        height: auto;
        padding-top: 100px;
        padding-bottom: 100px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .hero .container {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 20px 20px;
    }
    .hero-content {
        width: 100%;
        text-align: center;
        margin-bottom: 30px;
    }
    .hero h1 {
        font-size: 32px;
        margin-bottom: 15px;
        text-align: center;
    }
    .hero p {
        font-size: 16px;
        margin-bottom: 25px;
        text-align: left;
    }
    .scroll-arrow {
        display: none;
    }
    #features {
        margin-top: 0; /* Remove negative margin */
        padding-top: 100px; /* Match .section default */
    }
    #hero::after {
        height: 100px; /* Smaller gradient on mobile */
    }
    .hero-image {
        display: none;
    }
    .hero-image img {
        max-width: 80%;
        margin: auto;
    }
    .features {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .steps::before {
        display: none;
    }
    .steps {
        flex-direction: column;
        gap: 30px;
    }
    .step {
        width: 100%;
    }
    .tech-details {
        flex-direction: column;
    }
    .tech-image {
        display: none;
    }
    .tech-content {
        width: 100%;
    }
    .contact-container {
        flex-direction: column;
    }
    .contact-info, 
    .contact-form {
        width: 100%;
    }
    .faq-container, .contact-form {
        max-width: 100%;
        padding: 0 15px;
    }
    .section {
        padding: 50px 0;
    }
    .container {
        padding: 0 10px;
    }
    .feature-card {
        padding: 15px;
    }
    .tech-item {
        padding-left: 20px;
    }
    .faq-question {
        padding: 10px;
    }
    .faq-item.active .faq-answer {
        padding: 10px;
    }
    header {
        top: 10px;
    }
    header .container {
        margin: 0 10px;
        padding: 15px 20px;
        border-radius: 25px;
    }
    .scroll-arrow {
        display: none;
    }
    .language-selector {
        margin-left: 0;
        margin-top: 1rem;
    }
    .language-btn {
        padding: 0.25rem;
    }
    .copyright {
        padding: 15px 0;
        margin-top: 20px;
    }
    .section-header h2 {
        text-align: center;
        width: 100%;
    }
    .language-selector {
        margin-top: 0.5rem;
        margin-bottom: 0;
    }
}

/* Extra Small Screens */
@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .social-links {
        justify-content: flex-start;
    }
    .security-badge {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    .security-badge img {
        max-width: 100px;
        max-height: 30px;
        height: auto;
        width: auto;
        object-fit: contain;
    }
    .security-badge a {
        display: flex;
        justify-content: flex-start;
    }
    .contact-form {
        padding: 0 10px;
    }
    
    #contactForm .cta-button {
        align-self: center;
        width: 100%;
        max-width: 250px;
    }
    
    .form-control {
        padding: 12px;
    }
    
    textarea.form-control {
        min-height: 120px;
    }
}

/* Section Transitions */

/* Section specific scroll margin adjustments */
section {
    scroll-margin-top: 80px;
}
@media (max-width: 768px) {
    section {
        scroll-margin-top: 50px;
    }
}