/* --- Reflex Design System --- */
:root {
    /* Palette - Premium Tech (Deep Navy & Vibrant Accents) */
    --color-bg: #0f172a;
    /* Slate 900 */
    --color-bg-alt: #1e293b;
    /* Slate 800 */
    --color-text-main: #f8fafc;
    /* Slate 50 */
    --color-text-muted: #94a3b8;
    /* Slate 400 */

    --color-primary: #3b82f6;
    /* Blue 500 */
    --color-primary-glow: rgba(59, 130, 246, 0.5);

    --color-accent: #06b6d4;
    /* Cyan 500 */
    --color-accent-glow: rgba(6, 182, 212, 0.5);

    --color-danger: #ef4444;
    --color-warning: #f59e0b;

    --color-border: rgba(255, 255, 255, 0.1);
    --color-card-bg: rgba(30, 41, 59, 0.7);
    /* Glassy */

    --font-main: 'Inter', sans-serif;

    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html.lenis {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.lenis.lenis-scrolling iframe {
    pointer-events: none;
}

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

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* --- Typography --- */
h1,
h2,
h3,
h4,
h5 {
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.03em;
}

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

/* --- Components --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: white;
    font-weight: 600;
    border-radius: 100px;
    transition: transform 0.3s var(--ease-out-expo), box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-accent), var(--color-primary));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.btn span,
.btn svg {
    position: relative;
    z-index: 2;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--color-primary-glow);
}

.btn:hover::before {
    opacity: 1;
}

/* --- Navigation --- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 24px 0;
    z-index: 100;
    transition: padding 0.3s ease, background 0.3s ease;
}

.nav.scrolled {
    padding: 16px 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-cta {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--color-border);
    border-radius: 50px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.nav-cta:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 80px;
    overflow: hidden;
}

.hero-bg-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--color-primary-glow) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.4;
    filter: blur(80px);
    z-index: -1;
}

.hero-content {
    text-align: center;
    max-width: 900px;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 100px;
    color: var(--color-primary);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 32px;
    opacity: 0;
    /* For GSAP */
    transform: translateY(20px);
}

.hero h1 {
    font-size: clamp(3rem, 6vw, 5rem);
    margin-bottom: 24px;
    color: white;
    opacity: 0;
    /* For GSAP */
    transform: translateY(30px);
}

.hero h1 span {
    background: linear-gradient(180deg, #22d3ee 0%, #0891b2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    text-shadow: 0 0 30px rgba(34, 211, 238, 0.3);
}

.hero p {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    color: var(--color-text-muted);
    margin-bottom: 48px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    /* For GSAP */
    transform: translateY(30px);
}

.hero-actions {
    opacity: 0;
    /* For GSAP */
    transform: translateY(30px);
}

/* --- Infographic (3D-ish) --- */
.infographic-wrapper {
    margin-top: 80px;
    perspective: 1000px;
    perspective-origin: center center;
    opacity: 0;
    transform: translateY(50px);
    display: flex;
    justify-content: center;
}

.infographic {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    position: relative;
    transform-style: preserve-3d;
    transform: rotateX(10deg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 900px;
}

.info-col {
    flex: 1;
    text-align: center;
}

.info-col h5 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: white;
}

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

.reflex-core {
    width: 100px;
    height: 100px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.core-circle {
    position: absolute;
    border-radius: 50%;
    border: 2px solid var(--color-accent);
    box-shadow: 0 0 20px var(--color-accent-glow);
}

.c1 {
    width: 100%;
    height: 100%;
    animation: spin 10s linear infinite;
    border-style: dashed;
}

.c2 {
    width: 70%;
    height: 70%;
    animation: spin 7s linear infinite reverse;
    border-color: var(--color-primary);
}

.c3 {
    width: 40%;
    height: 40%;
    background: white;
    box-shadow: 0 0 30px white;
}

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

/* --- Problem Section --- */
.section {
    padding: 120px 0;
}

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

.section-header h3 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 16px;
}

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

.card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    padding: 40px;
    border-radius: 24px;
    transition: transform 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-10px);
    border-color: var(--color-primary);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: var(--color-accent);
}

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

/* --- Failure Analysis Section (NEW) --- */
.failure-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 64px;
}

.failure-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--color-border);
    padding: 40px;
    border-radius: 24px;
    position: relative;
    overflow: hidden;
}

.failure-card.rpa {
    border-color: rgba(239, 68, 68, 0.3);
}

.failure-card.ai {
    border-color: rgba(245, 158, 11, 0.3);
}

.card h4,
.failure-card h4 {
    margin-bottom: 16px;
    font-size: 1.25rem;
    min-height: 3.5rem;
    /* Ensure 2 lines of space for alignment */
}

.failure-card p {
    color: var(--color-text-muted);
    font-size: 1rem;
}

.f-icon {
    margin-bottom: 24px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
}

.rpa .f-icon {
    color: var(--color-danger);
}

.ai .f-icon {
    color: var(--color-warning);
}

.status-badge {
    position: absolute;
    top: 24px;
    right: 24px;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-badge.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-badge.warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--color-warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.reflex-solution-block {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(59, 130, 246, 0.1));
    border: 1px solid var(--color-accent);
    border-radius: 24px;
    padding: 48px;
    display: flex;
    align-items: center;
    gap: 48px;
    box-shadow: 0 0 50px rgba(6, 182, 212, 0.1);
}

.rs-content {
    flex: 2;
}

.rs-content h4 {
    font-size: 1.75rem;
    margin-bottom: 16px;
}

.rs-content p {
    font-size: 1.1rem;
    line-height: 1.7;
}

.rs-visual {
    flex: 1;
    height: 150px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stable-core {
    width: 60px;
    height: 60px;
    background: var(--color-text-main);
    border-radius: 12px;
    box-shadow: 0 0 30px var(--color-accent-glow);
    z-index: 2;
}

.orbit-ring {
    position: absolute;
    width: 140px;
    height: 140px;
    border: 2px solid var(--color-accent);
    border-radius: 50%;
    animation: spin 15s linear infinite;
}

.orbit-ring::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    width: 12px;
    height: 12px;
    background: var(--color-accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--color-accent);
}

.orbit-ring-2 {
    position: absolute;
    width: 200px;
    height: 200px;
    border: 1px dashed var(--color-primary);
    border-radius: 50%;
    animation: spin 25s linear infinite reverse;
    opacity: 0.6;
}

.orbit-ring-3 {
    position: absolute;
    width: 260px;
    height: 260px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: spin 40s linear infinite;
}

.orbit-ring-3::after {
    content: '';
    position: absolute;
    bottom: 15%;
    right: 15%;
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 15px white;
}

.core-pulse {
    width: 100%;
    height: 100%;
    background: var(--color-accent);
    border-radius: 12px;
    opacity: 0.5;
    animation: pulse-core 3s ease-in-out infinite;
}

@keyframes pulse-core {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.2;
    }
}


/* --- Solution Section --- */
.solution-box {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
    border: 1px solid var(--color-border);
    border-radius: 32px;
    padding: 60px;
    display: flex;
    flex-direction: column;
    gap: 40px;
    position: relative;
    overflow: hidden;
}

.solution-box::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--color-accent-glow), transparent 70%);
    opacity: 0.2;
    pointer-events: none;
}

.feature-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.feature h4 {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

/* --- Testimonials --- */
.testimonial-card {
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    padding: 32px;
    border-radius: 20px;
}

.testimonial-card blockquote {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--color-text-main);
    margin-bottom: 24px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 48px;
    height: 48px;
    background: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* --- Footer --- */
.footer {
    padding: 80px 0 40px;
    border-top: 1px solid var(--color-border);
    text-align: center;
    color: var(--color-text-muted);
}

.cta-section {
    text-align: center;
    padding: 100px 0;
    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .infographic {
        flex-direction: column;
        transform: none;
    }

    .feature-list {
        grid-template-columns: 1fr;
    }

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

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

    .reflex-solution-block {
        flex-direction: column;
        text-align: center;
        gap: 32px;
    }
}

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

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

.modal-container {
    background: #0f172a;
    /* Solid dark background for better contrast */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 48px;
    width: 100%;
    max-width: 500px;
    position: relative;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-overlay.active .modal-container {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text);
}

.modal-header {
    text-align: center;
    margin-bottom: 32px;
}

.modal-header h3 {
    font-size: 1.75rem;
    margin-bottom: 8px;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.form-group {
    margin-bottom: 24px;
}

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

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    color: var(--color-text);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s;
    appearance: none;
    /* Remove default arrow */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

/* --- FLUID INTELLIGENCE DESIGN OVERRIDES (High Contrast) --- */

:root {
    --color-bg: #020408;
    /* Deeper, truer black */
    --color-card-bg: rgba(10, 15, 30, 0.6);
    /* Darker, more opaque cards */
    --color-text: #ffffff;
    --color-text-muted: #cbd5e1;
    /* Brighter muted text */

    /* Dual Color Scheme: Violet + Muted Cyan */
    --color-primary: #8b5cf6;
    /* Violet (Reintroduced) */
    --color-secondary: #0891b2;
    /* Cyan 600 (Reduced intensity) */
    --color-accent: var(--color-secondary);
    --color-accent-glow: rgba(8, 145, 178, 0.5);
}

body {
    background: #020408;
    background-attachment: fixed;
    color: var(--color-text);
}

/* Animated Aurora Background - More subtle, less "washed out" */
body::before {
    content: '';
    position: fixed;
    top: -20%;
    left: -20%;
    width: 140%;
    height: 140%;
    background:
        radial-gradient(circle at 20% 30%, rgba(139, 92, 246, 0.15), transparent 40%),
        /* Violet Orb */
        radial-gradient(circle at 80% 70%, rgba(8, 145, 178, 0.12), transparent 40%);
    /* Cyan Orb */
    filter: blur(60px);
    z-index: -1;
    animation: aurora 20s infinite alternate ease-in-out;
    pointer-events: none;
}

@keyframes aurora {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.1);
    }
}

/* Softer, Rounder Shapes */
.btn,
.card,
.failure-card,
.solution-box,
.testimonial-card,
.modal-container,
.form-group input,
.form-group select {
    border-radius: 24px !important;
    /* Slightly tighter than 32px for better structure */
}

/* High Contrast Glass Cards */
.card,
.failure-card,
.solution-box,
.testimonial-card {
    background: rgba(15, 23, 42, 0.6);
    /* Darker slate base */
    border: 1px solid rgba(255, 255, 255, 0.12);
    /* Sharper border */
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    /* Deeper shadow */
    backdrop-filter: blur(16px);
}

.card:hover,
.failure-card:hover {
    background: rgba(30, 41, 59, 0.7);
    border-color: var(--color-secondary);
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.2);
    transform: translateY(-4px);
}

/* Typography & Readability */
h1,
h2,
h3 {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    /* Lift text off background */
}

p {
    line-height: 1.7;
    font-weight: 400;
    /* Ensure text isn't too thin */
}

/* Single Color Text - Cyan/Teal */
/* Monochromatic Gradient - Cyan to Teal */
.gradient-text {
    background: linear-gradient(180deg, #22d3ee 0%, #0891b2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    text-shadow: 0 0 30px rgba(34, 211, 238, 0.3);
}

/* Button Glows - Using Secondary Color */
.btn {
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.15), rgba(139, 92, 246, 0.15));
    border: 1px solid rgba(8, 145, 178, 0.4);
    box-shadow: 0 0 15px rgba(8, 145, 178, 0.2);
    color: #fff;
}

.btn:hover {
    background: linear-gradient(135deg, rgba(8, 145, 178, 0.25), rgba(139, 92, 246, 0.25));
    border-color: var(--color-secondary);
    box-shadow: 0 0 30px rgba(8, 145, 178, 0.5);
}

/* Testimonial Gap Fix - Robust Flexbox */
.testimonials-grid {
    display: flex !important;
    flex-wrap: wrap;
    gap: 2rem !important;
    justify-content: center;
}

.testimonial-card {
    flex: 1 1 300px;
    margin: 0 !important;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-accent);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.1);
}

.btn-block {
    width: 100%;
    justify-content: center;
    margin-top: 8px;
    padding: 16px;
    font-size: 1.05rem;
}

.success-message {
    text-align: center;
    padding: 20px 0;
}

.success-icon {
    margin-bottom: 24px;
    display: inline-flex;
    padding: 16px;
    background: rgba(56, 189, 248, 0.1);
    border-radius: 50%;
    color: var(--color-accent);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text);
    margin-top: 24px;
    width: 100%;
    padding: 12px;
    border-radius: 100px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--color-text-muted);
}