:root {
    /* Brand Colors */
    --primary-blue: #2e1589;
    --primary-blue-hover: #3f1fb8;
    --primary-blue-light: rgba(46, 21, 137, 0.1);

    /* Neutral Colors */
    --bg-light: #f8f9fc;
    --bg-white: #ffffff;
    --text-dark: #111827;
    --text-muted: #6b7280;

    /* Header Specific */
    --header-bg: rgba(255, 255, 255, 0.96);
    --header-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);

    /* Layout */
    --max-width: 1200px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* =========================================
   TOP GLOW EFFECT
========================================= */
.top-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background: linear-gradient(to bottom, rgba(46, 21, 137, 0.2) 0%, rgba(46, 21, 137, 0) 100%);
    z-index: 10;
    pointer-events: none;
}

/* =========================================
   FLOATING HEADER (leo.amazon.com style)
========================================= */
.main-header {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    /* Make it wider based on image */
    max-width: 1280px;
    height: 72px;
    /* A bit taller */
    background-color: var(--header-bg);
    border-radius: 14px;
    /* Squared corners like the reference */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px 0 32px;
    /* Increased padding */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
    /* Deeper but softer drop shadow */
    z-index: 1000;
    backdrop-filter: blur(12px);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.7);
}

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

.logo-img {
    height: 36px;
    width: auto;
    object-fit: contain;
    /* Since the user provided a white logo, it won't be visible on a white header.
       This filter roughly converts white to the requested #2e1589 */
    filter: brightness(0) saturate(100%) invert(18%) sepia(91%) saturate(3002%) hue-rotate(252deg) brightness(50%) contrast(101%);
    transition: all 0.3s ease;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.5px;
}

.desktop-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.desktop-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 36px;
    /* Wider spacing between words */
}

.desktop-nav a {
    text-decoration: none;
    color: #111111;
    /* Dark text */
    font-weight: 600;
    /* Bolder font width */
    font-size: 1.05rem;
    /* Larger font size */
    padding: 8px 0;
    /* Remove side padding */
    border-radius: 0;
    transition: all 0.2s ease;
}

.desktop-nav a:hover {
    color: #7b2cbf;
    /* Purple hover */
}

.desktop-nav a.active {
    color: #7b2cbf;
    /* Purple active color from reference */
    font-weight: 700;
}

.divider {
    width: 1.5px;
    height: 24px;
    background-color: #7b2cbf;
    /* Purple vertical line */
    margin: 0;
}

.header-cta {
    margin-left: auto;
}

.btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, #a63ff5 0%, #6818f0 100%);
    /* Vivid purple gradient */
    color: white;
    text-decoration: none;
    padding: 12px 32px;
    border-radius: 40px;
    /* Full pill shape for button alone */
    font-weight: 600;
    font-size: 1.05rem;
    transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(104, 24, 240, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #962aeb 0%, #580ddf 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(104, 24, 240, 0.4);
}

.btn-secondary {
    display: inline-block;
    background-color: white;
    color: var(--text-dark);
    text-decoration: none;
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background-color 0.2s ease, transform 0.1s ease;
    border: 1px solid #e5e7eb;
}

.btn-secondary:hover {
    background-color: #f3f4f6;
    transform: translateY(-1px);
}

.btn-primary.large,
.btn-secondary.large {
    padding: 14px 32px;
    font-size: 1.05rem;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    margin-right: 0;
    z-index: 1001;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 3px;
    background-color: #7b2cbf;
    border-radius: 3px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-menu-btn.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-btn.open span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* =========================================
   HERO SECTION
========================================= */
.hero-section {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 20px 60px;
    text-align: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('hero_bg.webp') center/cover no-repeat;
    z-index: -2;
}

.hero-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><filter id="noiseFilter"><feTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23noiseFilter)" opacity="0.05"/></svg>');
    z-index: -1;
    pointer-events: none;
}

.hero-content {
    max-width: 900px;
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 700;
    color: white;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.hero-content p {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* =========================================
   SERVICES SECTION
========================================= */
.container {
    width: 90%;
    max-width: var(--max-width);
    margin: 0 auto;
}

.services-section {
    padding: 100px 0;
    background-color: var(--bg-white);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 16px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.section-header p {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--bg-light);
    border-radius: 24px;
    padding: 40px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-blue);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
    background: var(--bg-white);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.card-icon {
    width: 64px;
    height: 64px;
    background-color: var(--primary-blue-light);
    color: var(--primary-blue);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.service-card h3 {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.service-card p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* =========================================
   TECH SHOWCASE
========================================= */
.tech-showcase {
    padding: 100px 0;
    background-color: var(--bg-light);
}

.container-flex {
    display: flex;
    align-items: center;
    gap: 60px;
}

.tech-content {
    flex: 1;
}

.tech-content h2 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.tech-content p {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.feature-list {
    list-style: none;
}

.feature-list li {
    position: relative;
    padding-left: 32px;
    margin-bottom: 16px;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-dark);
}

.feature-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-color: var(--primary-blue);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.tech-visual {
    flex: 1;
    position: relative;
    min-height: 400px;
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(46, 21, 137, 0.05) 0%, rgba(46, 21, 137, 0.15) 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.abstract-shape {
    width: 60%;
    height: 60%;
    background: linear-gradient(135deg, var(--primary-blue), #5e3fd0);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: morphing 10s infinite alternate;
    box-shadow: 0 20px 40px rgba(46, 21, 137, 0.3);
}

@keyframes morphing {
    0% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }

    25% {
        border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%;
    }

    50% {
        border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%;
    }

    75% {
        border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%;
    }

    100% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
}

/* =========================================
   FOOTER
========================================= */
.main-footer {
    background-color: #0b071e;
    /* Extremely dark blue/black */
    color: white;
    padding: 80px 0 30px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-brand {
    max-width: 300px;
}

.footer-logo-img {
    height: 48px;
    width: auto;
    object-fit: contain;
    margin-bottom: 16px;
    /* No filter needed here because the footer is dark and the logo is white */
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

.footer-links {
    display: flex;
    gap: 80px;
    flex-wrap: wrap;
}

.link-group h4 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.link-group ul {
    list-style: none;
}

.link-group li {
    margin-bottom: 12px;
}

.link-group a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 0.95rem;
}

.link-group a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

/* =========================================
   CONTACT MODAL
========================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background-color: #0b071e;
    color: white;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: 12px;
    padding: 40px;
    position: relative;
    overflow-y: auto;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal-overlay.open .modal-container {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: white;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 30px;
}

.modal-tabs {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
    justify-content: center;
}

.tab-btn {
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: rgba(255, 255, 255, 0.8);
    padding: 10px 48px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    max-width: 200px;
    outline: none;
}

.tab-btn:hover {
    border-color: rgba(255, 255, 255, 0.7);
    color: white;
}

.tab-btn.active {
    background-color: white;
    color: black;
    border-color: white;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px 40px;
    margin-bottom: 40px;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 4px;
}

.input-group input,
.input-group select {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 0;
    font-size: 1rem;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s;
}

.input-group select {
    appearance: none;
    cursor: pointer;
}

.input-group select option {
    background-color: #0b071e;
    color: white;
}

.input-group input:focus,
.input-group select:focus {
    border-bottom-color: #7b2cbf;
}

.checkbox-group {
    display: flex;
    justify-content: flex-end;
    flex-direction: column;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    position: relative;
    padding-left: 28px;
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    height: 18px;
    width: 18px;
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    transition: all 0.2s;
}

.custom-checkbox:hover input~.checkmark {
    border-color: white;
}

.custom-checkbox input:checked~.checkmark {
    background-color: #7b2cbf;
    border-color: #7b2cbf;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.custom-checkbox input:checked~.checkmark:after {
    display: block;
}

.custom-checkbox .checkmark:after {
    left: 6px;
    top: 2px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.form-terms {
    margin-bottom: 40px;
}

.form-terms p {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 16px;
    line-height: 1.5;
}

.form-terms p:last-child {
    margin-bottom: 0;
}

.form-actions {
    display: flex;
    justify-content: center;
}

.form-submit {
    min-width: 200px;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

/* Success View */
.success-view {
    padding: 60px 40px;
}

.success-view h2 {
    font-size: 2.2rem;
    font-weight: 500;
    margin-bottom: 30px;
    letter-spacing: -0.5px;
}

.success-view p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    line-height: 1.6;
    max-width: 500px;
}

.success-view .social-text {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: white;
}

.social-icons {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.social-icons a {
    color: white;
    transition: color 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-icons a:hover {
    color: #a63ff5;
    transform: translateY(-2px);
}

.success-divider {
    height: 1px;
    width: 60%;
    background: linear-gradient(90deg, #7b2cbf 0%, rgba(123, 44, 191, 0) 100%);
    margin-top: 10px;
}

/* =========================================
   MOBILE NAV DEFAULT STATE
========================================= */
.mobile-nav {
    display: none;
}

/* =========================================
   RESPONSIVE DESIGN
========================================= */
@media (max-width: 900px) {
    .container-flex {
        flex-direction: column;
    }

    .tech-visual {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .main-header {
        width: 95%;
        padding: 0 16px;
    }

    .desktop-nav {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
        order: 1;
        margin-right: 12px;
    }

    .logo {
        order: 2;
        margin-right: auto;
    }

    .header-cta {
        display: block;
        order: 3;
    }

    .header-cta .btn-primary {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    /* Mobile Nav Dropdown Media Queries */
    .mobile-nav {
        display: none;
        position: absolute;
        top: 85px;
        left: 0;
        width: 100%;
        background-color: var(--header-bg);
        border-radius: 14px;
        box-shadow: var(--header-shadow);
        padding: 16px 0;
        backdrop-filter: blur(12px);
        border: 1px solid rgba(255, 255, 255, 0.7);
        flex-direction: column;
    }

    .mobile-nav.open {
        display: flex;
    }

    .mobile-nav ul {
        list-style: none;
        display: flex;
        flex-direction: column;
    }

    .mobile-nav a {
        display: block;
        padding: 12px 24px;
        text-decoration: none;
        color: var(--text-dark);
        font-weight: 600;
        font-size: 1.05rem;
    }

    .mobile-nav a:hover,
    .mobile-nav a.active {
        color: #7b2cbf;
        background-color: rgba(123, 44, 191, 0.05);
    }

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

    .hero-section {
        padding-top: 140px;
    }

    .footer-links {
        gap: 40px;
    }

    /* Modal responsive */
    .form-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .modal-container {
        padding: 30px 20px;
    }

    .modal-tabs {
        flex-direction: column;
    }

    .tab-btn {
        max-width: none;
    }
}