/* Modern CSS Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Base styles */
:root {
    /* Core brand */
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --accent-color: #3b82f6;

    /* Text */
    --text-color: #0f172a;

    /* Background & Surfaces */
    --bg-gradient-start: #f9fafb; /* slate-50 */
    --bg-gradient-end: #eef2f7;   /* slate-100-ish */
    --background-color: #eef2f7;  /* fallback for gradient */
    --surface-1: #ffffff;         /* primary surface (cards/hero) */
    --surface-2: #f3f6fb;         /* secondary surface (alt sections) */
    --surface-3: #e8eef8;         /* tertiary surface (accents) */
    --surface-contrast: #cbd5e1;  /* much lighter slate for logo contrast */
    --light-gray: #f3f6fb;        /* legacy alias for surface-2 */
    --divider-color: #e5e7eb;

    /* Layout */
    --border-radius: 12px;
    --spacing-unit: 1rem;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-gradient-end);
    background: linear-gradient(180deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    margin-bottom: var(--spacing-unit);
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2rem;
    font-weight: 600;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

/* Increase specificity to override Tailwind preflight in app */
main h1, main h2, main h3, main h4, main h5, main h6 {
    line-height: 1.2;
    margin-bottom: var(--spacing-unit);
}

main h1 { font-size: 2.5rem; font-weight: 700; }
main h2 { font-size: 2rem; font-weight: 600; }
main h3 { font-size: 1.5rem; font-weight: 600; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: black;
    color: white;
}

.btn-primary:hover {
    background-color: #333333;
}

.btn-secondary {
    background-color: var(--light-gray);
    color: var(--text-color);
}

.btn-secondary:hover {
    background-color: var(--surface-3);
    color: var(--text-color);
}

/* Distinguish demo button */
.demo-form .btn.btn-secondary {
    background-color: transparent;
    border: 1px solid #9ca3af; /* gray-400, slightly more visible */
}

.demo-form .btn.btn-secondary:hover {
    background-color: var(--surface-1);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Layout */
header {
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.75);
    backdrop-filter: saturate(180%) blur(10px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.main-nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px;
    width: auto;
}

.nav-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Slightly more compact buttons in the top bar only */
.nav-actions .btn {
    padding: 0.6rem 1rem;
}

.login-form, .demo-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.demo-form {
    margin-left: 1rem;
}

.login-form input[type="email"] {
    padding: 0.6rem 0.75rem;
    border: 1px solid #CCCCCC; /* gray-500 for stronger contrast */
    border-radius: var(--border-radius);
}

.login-form input[type="email"]:focus {
    outline: none;
    border-color: #4b5563; /* gray-600 */
}

.login-form input[type="email"]:focus {
    outline: none;
    border-color: #9ca3af; /* gray-400 */
}

.form-note {
    color: var(--secondary-color);
    font-size: 0.8rem;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    padding-top: 6rem;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 1rem 1rem 2rem;
    background-color: var(--surface-1);
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: space-around;
}

.hero-content {
    flex: 1;
    padding-right: 10rem;
    text-align: left;
}

.hero-image {
    flex: 1;
    max-width: 40%;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
}

.lead {
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto 1.5rem;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.hero .features {
    grid-template-columns: 1fr;
}

.feature {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.check {
    font-size: 1.5rem;
}

/* AI Chat Section */
.ai-chat {
    padding: 2rem 1.5rem;
    margin-bottom: 4rem;
    background-color: var(--surface-2);
    border-radius: var(--border-radius);
}

.ai-chat-inner {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.ai-chat-image {
    flex: 1;
}

.ai-chat-image img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
}

.ai-chat-text {
    flex: 1;
}

.ai-chat .subtitle {
    font-size: 1rem;
    color: var(--secondary-color);
    margin-top: 0.25rem;
}

/* Demo Section */
.demo-section {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    text-align: center;
    margin-bottom: 10rem;
    margin-top: 10rem;
    background-color: var(--surface-2);
    border-radius: var(--border-radius);
}

.demo-section h2 {
    margin-bottom: 1rem;
}

.carousel {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.carousel-inner {
    width: 100%;
    height: 100%;
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.carousel-item.active {
    opacity: 1;
}

.carousel-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 1rem;
    cursor: pointer;
    font-size: 1.5rem;
    transition: background-color 0.3s ease;
    z-index: 10;
}

.carousel-control:hover {
    background: rgba(0, 0, 0, 0.8);
}

.carousel-control.prev {
    left: 0;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.carousel-control.next {
    right: 0;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.carousel-indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.indicator.active {
    background: white;
}

/* Portals Section */
.portals {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.portal-card {
    padding: 2rem;
    background-color: var(--surface-2);
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.portal-card h2 {
    text-align: center;
    width: 100%;
}

.portal-card p {
    text-align: center;
    width: 100%;
    margin-bottom: 1.25rem;
}

.portal-card .btn {
    margin-top: auto;
}

/* Info Section */
.info-section {
    padding: 4rem 0;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

/* Pricing Section */
.pricing {
    padding: 4rem 0;
    text-align: center;
}

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

.pricing-card {
    padding: 2rem;
    background-color: var(--surface-2);
    border-radius: var(--border-radius);
    transition: transform 0.2s ease;
}

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

.pricing-card.featured {
    background-color: var(--primary-color);
    color: white;
}

.price {
    font-size: 2rem;
    font-weight: 700;
    margin: 1rem 0;
}

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

.faq-item {
    margin-bottom: 1rem;
    padding: 1.5rem;
    background-color: var(--surface-2);
    border-radius: var(--border-radius);
}

.faq-question {
    background-color: var(--surface-2);
    color: var(--text-color);
    cursor: pointer;
    padding: 1.5rem;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 1.2rem;
    font-weight: 600;
    transition: background-color 0.3s ease;
    border-radius: var(--border-radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question:hover {
    background-color: var(--surface-3);
}

.faq-question.active {
    background-color: var(--surface-3);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.faq-icon {
    font-size: 1.5rem;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.faq-question.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 1.5rem;
    background-color: var(--surface-2);
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    border-bottom-left-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
    border-top: 1px solid var(--divider-color);
}

.faq-answer p {
    padding: 1.5rem 0;
}

/* Contact Section */
.contact {
    text-align: center;
    padding: 4rem 0;
    background-color: var(--surface-2);
    border-radius: var(--border-radius);
    margin: 4rem 0;
}

.contact p {
    margin-bottom: 2rem;
}

/* Footer */
footer {
    background: linear-gradient(180deg, #0b1220 0%, #0f172a 100%);
    color: #ffffff;
    padding: 3rem 1rem;
    margin-top: 4rem;
    border-top: 1px solid #1f2937;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.footer-item {
    text-align: center;
}

.footer-social-icons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.footer-item a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

.footer-item a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.footer-item p a {
    font-weight: 500;
}

.footer-social-icons img {
    height: 32px;
    width: auto;
    opacity: 0.8;
    transition: opacity 0.2s ease;
    border-radius: 4px;
}

.footer-social-icons img:hover {
    opacity: 1;
}

/* LinkedIn SVG icon coloring */
.footer-social-icons .linkedin-icon {
    color: #0a66c2; /* LinkedIn brand blue */
    opacity: 0.9;
}

.footer-social-icons a:hover .linkedin-icon {
    opacity: 1;
    filter: drop-shadow(0 2px 4px rgba(10, 102, 194, 0.35));
}

/* Footer Contact Dropdown */
.footer-item.contact-dropdown {
    position: relative;
    display: inline-block;
}

.contact-dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--secondary-color);
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-radius: var(--border-radius);
    padding: 0.5rem 0;
}

.contact-dropdown-content a {
    color: white;
    padding: 0.75rem 1rem;
    text-decoration: none;
    display: block;
    text-align: left;
}

.contact-dropdown-content a:hover {
    background-color: #5a6776;
    text-decoration: none;
}

.footer-item.contact-dropdown:hover .contact-dropdown-content {
    display: block;
}

.footer-item.contact-dropdown > p {
    cursor: default;
}

/* Footer Legal Section */
.footer-legal {
    flex-basis: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-legal h3 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
    color: #ffffff;
}

.footer-legal p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.75rem;
}

.footer-legal-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem 1rem;
    margin-top: 0.5rem;
}

.footer-legal .meta-item {
    display: flex;
    gap: 0.5rem;
    align-items: baseline;
}

.footer-legal .meta-label {
    color: rgba(255, 255, 255, 0.7);
    min-width: 7.5rem;
}

.footer-legal .meta-value {
    color: #ffffff;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .hero {
        padding: 2rem 1rem;
        flex-direction: column;
    }
    
    .hero-content {
        padding-right: 0;
        margin-bottom: 2rem;
        text-align: center;
        width: 100%;
        flex: none;
    }
    
    .hero-image {
        max-width: 80%;
        margin-top: 2rem;
        flex: none;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-item, .footer-social-icons {
        text-align: center;
    }

    .footer-legal-meta {
        grid-template-columns: 1fr;
    }

    .ai-chat-inner {
        flex-direction: column;
        text-align: center;
    }
    .ai-chat-text {
        width: 100%;
    }
    .ai-chat-image {
        width: 100%;
    }
}

/* Partner Logos Carousel */
.partner-logos {
    padding: 80px 0;
    background-color: var(--surface-1);
}

.partner-logos h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 32px;
    font-weight: 700;
    color: #001122;
}

.logo-carousel {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 20px 0;
}

.logo-track {
    display: flex;
    gap: 100px;
    animation: scroll 30s linear infinite;
    width: max-content;
}

.logo-item {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 100px;
    border-radius: 8px;
    padding: 20px;
}

.logo-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    opacity: 1;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Add a gradient mask to fade the edges */
.logo-carousel::before,
.logo-carousel::after {
    content: '';
    position: absolute;
    top: 0;
    width: 150px;
    height: 100%;
    z-index: 2;
}

.logo-carousel::before {
    left: 0;
    background: linear-gradient(to right, var(--surface-1), transparent);
}

.logo-carousel::after {
    right: 0;
    background: linear-gradient(to left, var(--surface-1), transparent);
} 