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

:root {
    --primary-color: #4f46e5;
    --primary-dark: #4338ca;
    --secondary-color: #06b6d4;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --error-color: #ef4444;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: white;
    background-color: #0a0e27;
    position: relative;
    min-height: 100vh;
}

/* Global Neural Network Background */
#globalNeuralCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Navigation */
.navbar {
    background-color: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

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

.logo {
    margin-left: -1rem;
}

.logo h1 {
    font-size: 2.5rem;
    color: #818cf8;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 5rem;
    margin-left: auto;
    margin-right: auto;
    padding-right: 150px;
}

.nav-link {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    font-size: 1.5rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #818cf8;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #818cf8;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    margin-top: 80px;
    padding: 4rem 2rem;
    color: white;
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 2;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 3rem;
    opacity: 0.95;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Demo Section Title */
.demo-section-title {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    color: #818cf8;
    margin: 3rem 0 2rem 0;
}

/* Demo Container Grid */
.demo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.demo-card {
    background-color: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(99, 102, 241, 0.3);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    color: white;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.demo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 35px -5px rgba(0, 0, 0, 0.4);
    border-color: rgba(99, 102, 241, 0.5);
}

.demo-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: #818cf8;
    text-align: center;
    min-height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.demo-card p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
    font-size: 1.15rem;
}

.demo-subtitle {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem !important;
    color: rgba(255, 255, 255, 0.95);
}

.demo-capabilities {
    font-size: 14px !important;
    margin-bottom: 1.5rem;
    padding-bottom: 0;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
    font-family: 'Verdana', 'Geneva', sans-serif;
    text-transform: capitalize;
}

.demo-capabilities strong {
    color: #818cf8;
    font-weight: 600;
}

.demo-languages {
    font-size: 13px !important;
    margin-top: 1rem;
    margin-bottom: 0;
    padding-top: 1rem;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
    text-align: center;
    border-top: 1px solid rgba(99, 102, 241, 0.2);
    font-family: 'Verdana', 'Geneva', sans-serif;
    text-transform: capitalize;
}

.demo-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    width: 100%;
    transition: all 0.3s ease;
}

.demo-button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.demo-button:active {
    transform: translateY(0);
}

.demo-note {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

.voice-demo {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: auto;
}

.demo-status {
    padding: 0.75rem 1rem;
    background-color: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-radius: 0.5rem;
    text-align: center;
    font-weight: 500;
    color: #818cf8;
    font-size: 1rem;
    display: none;
    margin-bottom: 1rem;
}

.demo-button.secondary {
    background-color: #ef4444;
    margin-top: 0.5rem;
}

.demo-button.secondary:hover {
    background-color: #dc2626;
}

.demo-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.transcript {
    margin-top: 1rem;
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
    font-size: 0.9rem;
}

.transcript div {
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    border-radius: 0.25rem;
}

.transcript .message-user {
    background-color: rgba(99, 102, 241, 0.2);
    color: #c7d2fe;
}

.transcript .message-ai {
    background-color: rgba(16, 185, 129, 0.2);
    color: #a7f3d0;
}

/* Services Section */
.services {
    padding: 5rem 2rem;
    position: relative;
}

.services-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.section-title {
    font-size: 3.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: white;
}

.section-subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.35rem;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

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

.service-card {
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(99, 102, 241, 0.2);
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
    border-color: rgba(99, 102, 241, 0.5);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-card h3 {
    font-size: 1.85rem;
    margin-bottom: 0.75rem;
    color: white;
}

.service-card p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    font-size: 1.1rem;
}

/* Contact Section */
.contact {
    padding: 5rem 2rem;
    position: relative;
}

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

/* Flip Card Container */
.flip-card {
    margin-top: 3rem;
    perspective: 1500px;
    width: 100%;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    transition: transform 0.8s cubic-bezier(0.4, 0.0, 0.2, 1);
    transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    width: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 0.75rem;
}

.flip-card-front {
    position: relative;
    transform: rotateY(0deg);
}

.flip-card-back {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    transform: rotateY(180deg);
}

.contact-form {
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(99, 102, 241, 0.2);
    padding: 2.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: white;
}

.required {
    color: var(--error-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid rgba(99, 102, 241, 0.3);
    background-color: rgba(15, 23, 42, 0.5);
    color: white;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #818cf8;
    background-color: rgba(15, 23, 42, 0.7);
}

.form-group textarea {
    resize: vertical;
}

.error-message {
    display: block;
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    min-height: 1.25rem;
}

.submit-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 0.5rem;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
}

.submit-button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.submit-button:active {
    transform: translateY(0);
}

.submit-button:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
}

.submit-button:disabled:hover {
    background-color: #9ca3af;
    transform: none;
    box-shadow: none;
}

.success-message {
    display: none;
    margin-top: 1rem;
    padding: 1rem;
    background-color: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.5);
    color: #6ee7b7;
    border-radius: 0.5rem;
    text-align: center;
    font-weight: 500;
}

/* Success Message Card (Back of flip card) */
.success-message-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(139, 92, 246, 0.3) 100%);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(99, 102, 241, 0.4);
    padding: 4rem 2.5rem;
    border-radius: 0.75rem;
    text-align: center;
    min-height: 550px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.2);
}

.success-icon {
    font-size: 5rem;
    margin-bottom: 2rem;
    animation: bounce 1s ease-in-out;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.success-message-card h3 {
    font-size: 2rem;
    color: #818cf8;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.success-message-card p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
    max-width: 500px;
    margin-bottom: 2rem;
}

.reset-button {
    background-color: rgba(99, 102, 241, 0.3);
    color: white;
    border: 2px solid rgba(99, 102, 241, 0.5);
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.reset-button:hover {
    background-color: rgba(99, 102, 241, 0.5);
    border-color: rgba(99, 102, 241, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.3);
}

.reset-button:active {
    transform: translateY(0);
}

/* Footer */
.footer {
    background-color: rgba(10, 14, 39, 0.95);
    border-top: 1px solid rgba(99, 102, 241, 0.2);
    color: rgba(255, 255, 255, 0.7);
    padding: 2rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(10px);
        width: 100%;
        text-align: center;
        transition: left 0.3s ease;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.3);
        border-bottom: 1px solid rgba(99, 102, 241, 0.2);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

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

    .contact-form {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 1rem;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .hero {
        padding: 3rem 1rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .demo-card {
        padding: 1.5rem;
    }

    .services {
        padding: 3rem 1rem;
    }

    .contact {
        padding: 3rem 1rem;
    }

    .success-message-card {
        padding: 2rem 1.5rem;
        min-height: 600px;
    }

    .success-icon {
        font-size: 4rem;
        margin-bottom: 1.5rem;
    }

    .success-message-card h3 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .success-message-card p {
        font-size: 1rem;
        line-height: 1.6;
    }
}
