/* ==========================================================================
   Variables & Theme
   ========================================================================== */
   :root {
    /* Color Palette */
    --color-bg-main: #f8fafc; /* Light gray almost white */
    --color-bg-alt: #f1f5f9;
    --color-primary: #0284c7; /* Darker cyan for contrast */
    --color-primary-hover: #0369a1;
    --color-secondary: #059669; /* Darker Emerald Green for contrast */
    --color-text: #0f172a;
    --color-text-muted: #475569;
    --color-border: #e2e8f0;
    --color-glass-bg: rgba(255, 255, 255, 0.7);
    --color-glass-border: rgba(0, 0, 0, 0.05);
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Layout */
    --container-max-width: 1200px;
    --section-spacing: 6rem;
    --border-radius: 12px;
    --border-radius-lg: 24px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Scroll Reveal
   ========================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all var(--transition-slow);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ==========================================================================
   Reset & Base
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg-main);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

ul {
    list-style: none;
}

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: var(--section-spacing) 0;
    position: relative;
    overflow: hidden;
}

.bg-alt {
    background-color: var(--color-bg-alt);
}

.bg-pattern {
    background-image: radial-gradient(var(--color-border) 1px, transparent 1px);
    background-size: 24px 24px;
}

.glow-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.6;
}
.glow-primary {
    background: rgba(2, 132, 199, 0.12);
}
.glow-secondary {
    background: rgba(5, 150, 105, 0.12);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(to right, var(--color-text), var(--color-text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    display: inline-block;
}

.section-header h2::before,
.section-header h2::after {
    content: '+';
    position: absolute;
    font-weight: 300;
    color: var(--color-primary);
    opacity: 0.5;
    font-size: 1.5rem;
    top: -10px;
}

.section-header h2::before {
    left: -24px;
}

.section-header h2::after {
    right: -24px;
}

.section-header p {
    color: var(--color-text-muted);
    font-size: 1.125rem;
}

.highlight-cyan {
    color: var(--color-primary);
}

/* ==========================================================================
   Grid System
   ========================================================================== */
.grid {
    display: grid;
    gap: 2rem;
}

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

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: all var(--transition-normal);
    cursor: pointer;
    border: none;
    font-family: inherit;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.3);
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.4);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text);
}

.btn-outline:hover {
    border-color: var(--color-text);
    background: rgba(0, 0, 0, 0.05);
}

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

.btn-full {
    width: 100%;
}

/* ==========================================================================
   Glassmorphism Utilities
   ========================================================================== */
.glass-card {
    background: var(--color-glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--color-glass-border);
    border-radius: var(--border-radius-lg);
}

/* ==========================================================================
   Navbar
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--color-glass-border);
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
    gap: 0.5rem;
}

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

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

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

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
}

.mobile-menu-btn span {
    width: 30px;
    height: 2px;
    background-color: var(--color-text);
    transition: var(--transition-fast);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    position: relative;
    padding: 12rem 0 8rem;
    text-align: left;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg-glow {
    position: absolute;
    top: -10%;
    left: 50%;
    transform: translateX(-50%);
    width: 80vw;
    height: 500px;
    background: radial-gradient(circle, rgba(2, 132, 199, 0.15) 0%, rgba(5, 150, 105, 0.05) 50%, transparent 70%);
    z-index: -1;
}

.hero-container {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.hero-text {
    flex: 1;
}

.hero-graphic {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-svg,
.hero-image {
    width: 100%;
    max-width: 500px;
    height: auto;
    object-fit: contain;
}

/* SVG Animations */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes spin-reverse {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

.spin-slow {
    transform-origin: center;
    animation: spin 40s linear infinite;
}

.spin-reverse {
    transform-origin: center;
    animation: spin-reverse 25s linear infinite;
}

.pulse {
    transform-origin: center;
    animation: pulse 2s ease-in-out infinite;
}

.pulse-core {
    transform-origin: center;
    animation: pulse 4s ease-in-out infinite;
}

.float {
    animation: float 4s ease-in-out infinite;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero-title span {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    max-width: 800px;
    margin: 0 0 3rem 0;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    justify-content: flex-start;
}

/* ==========================================================================
   About Us Section
   ========================================================================== */
.about-us {
    padding: 8rem 0;
    background-color: var(--color-bg-main);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 2.5fr;
    gap: 4rem;
    align-items: flex-start;
}

.about-header h2 {
    font-size: 3.5rem;
    line-height: 1.1;
    color: var(--color-text);
    margin-bottom: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.about-accent-line {
    width: 60px;
    height: 5px;
    background: var(--color-primary);
    border-radius: 2px;
}

.about-body .lead-text {
    font-size: 2.25rem;
    line-height: 1.4;
    font-weight: 400;
    color: var(--color-text);
    margin-bottom: 1.5rem;
    letter-spacing: -0.5px;
}

.about-body .lead-text strong {
    font-weight: 700;
    color: var(--color-primary);
}

.about-body .sub-text {
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--color-text-muted);
    max-width: 800px;
}

@media (max-width: 992px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .about-header h2 {
        font-size: 3rem;
    }
    .about-body .lead-text {
        font-size: 1.75rem;
    }
}

/* ==========================================================================
   Problems Section
   ========================================================================== */
.problem-card {
    background: var(--color-bg-alt);
    padding: 2.5rem;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--color-border);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    position: relative;
}

.problem-card:hover {
    transform: translateY(-8px);
    border-color: var(--color-primary);
    box-shadow: 0 20px 40px rgba(2, 132, 199, 0.08);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    background-color: rgba(2, 132, 199, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
}

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

.problem-card p {
    color: var(--color-text-muted);
}

/* ==========================================================================
   Solution Section
   ========================================================================== */
.solution-container {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.solution-content {
    flex: 1;
}

.solution-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.solution-content p {
    color: var(--color-text-muted);
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature-list li {
    display: flex;
    flex-direction: column;
}

.feature-list strong {
    color: var(--color-secondary);
    font-size: 1.1rem;
}

.solution-visual {
    flex: 1;
    width: 100%;
    min-width: 0;
}

.code-panel {
    background: #0f172a;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.code-header {
    background: #1e293b;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.dot.red { background: #ef4444; }
.dot.yellow { background: #eab308; }
.dot.green { background: #22c55e; }

.filename {
    margin-left: auto;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-family: monospace;
}

.code-panel pre {
    padding: 1.5rem;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #f8fafc; /* Ensure visibility on dark background */
}

.code-panel .keyword { color: #c678dd; }
.code-panel .comment { color: #5c6370; font-style: italic; }
.code-panel .number { color: #d19a66; }

/* Typewriter Effect */
.typewriter {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid var(--color-primary);
    animation: 
        typing 4s steps(44, end) infinite,
        blink-caret 0.75s step-end infinite;
    vertical-align: bottom;
    width: 0;
}

@keyframes typing {
    0%, 20% { width: 0; }
    60%, 90% { width: 44ch; }
    100% { width: 0; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--color-primary); }
}

/* ==========================================================================
   Workflow (Timeline)
   ========================================================================== */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--color-border);
}

.timeline-item {
    display: flex;
    gap: 2rem;
    position: relative;
}

.timeline-marker {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--color-bg-alt);
    border: 2px solid var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    z-index: 1;
    flex-shrink: 0;
}

.timeline-content {
    padding: 2rem;
    flex: 1;
}

.timeline-content h3 {
    margin-bottom: 0.5rem;
    color: var(--color-primary);
}

.timeline-content p {
    color: var(--color-text-muted);
}

/* ==========================================================================
   Use Cases
   ========================================================================== */
.use-case-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card-image {
    height: 200px;
    background-color: #1e293b;
    background-size: cover;
    background-position: center;
}

.fintech-bg { background: linear-gradient(135deg, #bfdbfe, #f1f5f9); }
.healthtech-bg { background: linear-gradient(135deg, #a7f3d0, #f1f5f9); }
.retail-bg { background: linear-gradient(135deg, #fbcfe8, #f1f5f9); }

.card-body {
    padding: 2rem;
}

.card-body h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.card-body p {
    color: var(--color-text-muted);
}

/* ==========================================================================
   Tech Stack Marquee
   ========================================================================== */
.tech-marquee {
    display: flex;
    overflow: hidden;
    user-select: none;
    gap: 1.5rem;
    padding: 1rem 0;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.tech-marquee-content {
    display: flex;
    flex-shrink: 0;
    gap: 1.5rem;
    animation: scroll 30s linear infinite;
}

.tech-marquee-content:hover {
    animation-play-state: paused;
}

@keyframes scroll {
    from { transform: translateX(0); }
    to { transform: translateX(calc(-100% - 1.5rem)); }
}

.tech-item {
    padding: 1rem 2.5rem;
    background: var(--color-glass-bg);
    border: 1px solid var(--color-border);
    border-radius: 100px;
    font-weight: 600;
    color: var(--color-text-muted);
    transition: all var(--transition-fast);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tech-item:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: scale(1.05);
    background: rgba(255,255,255,1);
    box-shadow: 0 10px 20px rgba(2, 132, 199, 0.1);
}

/* ==========================================================================
   FAQ Accordion
   ========================================================================== */
.accordion {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.accordion-item {
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.accordion-header {
    width: 100%;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    color: var(--color-text);
    font-size: 1.1rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    transition: background var(--transition-fast);
}

.accordion-header:hover {
    background: rgba(0, 0, 0, 0.02);
}

.accordion-icon {
    font-size: 1.5rem;
    color: var(--color-primary);
    transition: transform var(--transition-normal);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal);
}

.accordion-content p {
    padding: 0 1.5rem 1.5rem;
    color: var(--color-text-muted);
}

.accordion-item.active .accordion-content {
    max-height: 500px;
}

.accordion-item.active .accordion-icon {
    transform: rotate(45deg);
}

/* ==========================================================================
   Contact Form
   ========================================================================== */
.contact-container {
    display: flex;
    gap: 4rem;
    align-items: flex-start;
}

.contact-info {
    flex: 1;
}

.contact-info h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--color-text-muted);
    font-size: 1.125rem;
}

.contact-form-wrapper {
    flex: 1;
    padding: 2.5rem;
    width: 100%;
}

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

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.error-msg {
    display: none;
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.form-group.error .error-msg {
    display: block;
}

.form-group.error input,
.form-group.error textarea {
    border-color: #ef4444;
}

.form-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-secondary);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    margin-top: 1rem;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.hidden {
    display: none;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background: #f1f5f9;
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--color-border);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 3rem;
    margin-bottom: 3rem;
}

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

.footer-brand p {
    color: var(--color-text-muted);
    margin-top: 1rem;
}

.footer-links h4,
.footer-social h4 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.footer-links a,
.footer-social a {
    display: block;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
}

.footer-links a:hover,
.footer-social a:hover {
    color: var(--color-primary);
}

.footer-bottom {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--color-border);
    padding-top: 2rem;
}

/* ==========================================================================
   Responsive Design (Mobile First adjustments - handled max-width down)
   ========================================================================== */
@media (max-width: 992px) {
    .solution-container,
    .contact-container {
        flex-direction: column;
    }
    
    .hero-container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-subtitle {
        margin: 0 auto 3rem;
    }
    
    .hero-cta {
        justify-content: center;
    }

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

@media (max-width: 768px) {
    .nav-links {
        display: none; /* In a real app, toggle with JS */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--color-bg-main);
        flex-direction: column;
        padding: 2rem;
        border-bottom: 1px solid var(--color-border);
    }
    
    .nav-links.active {
        display: flex;
    }

    .navbar .btn {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }

    .timeline::before {
        left: 20px;
    }
    
    .timeline-marker {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* ==========================================================================
   Preloader styles
   ========================================================================== */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.preloader-logo {
    width: 120px;
    height: auto;
    animation: preloader-pulse 2s ease-in-out infinite;
}

.preloader-text {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: 2px;
    margin: 0;
    background: linear-gradient(135deg, #0284c7, #059669);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: preloader-fadeInUp 1s ease-out;
}

.preloader-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(15, 23, 42, 0.08);
    border-top-color: #0284c7;
    border-radius: 50%;
    animation: preloader-spin 1s linear infinite;
    margin-top: 0.5rem;
}

@keyframes preloader-spin {
    to { transform: rotate(360deg); }
}

@keyframes preloader-pulse {
    0% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.08); opacity: 1; filter: drop-shadow(0 0 15px rgba(2, 132, 199, 0.4)); }
    100% { transform: scale(1); opacity: 0.9; }
}

@keyframes preloader-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.loading {
    overflow: hidden !important;
}
