:root {
    --bg-color: #000000;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --accent-primary: #0ea5e9; /* Electric Blue */
    --accent-secondary: #e2e8f0; /* Silver/Chrome */
    --glass-bg: rgba(255, 255, 255, 0.01);
    --glass-border: rgba(255, 255, 255, 0.08);
    --electric-blue: #0ea5e9;
    --neon-glow: rgba(14, 165, 233, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Film Grain Overlay */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.04;
    z-index: 9999;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* --- Preloader --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000000;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), visibility 1s;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.loader-logo-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    /* Apply similar metallic/electric shader-like CSS filter to match the M */
    filter: grayscale(80%) brightness(0.8) contrast(1.5) drop-shadow(0 0 20px rgba(14, 165, 233, 0.4));
    animation: pulseGlow 2s infinite alternate ease-in-out;
}

.loader-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Extra blend to ensure the black background of the jpeg vanishes */
    mix-blend-mode: screen; 
}

@keyframes pulseGlow {
    from {
        filter: grayscale(80%) brightness(0.8) contrast(1.5) drop-shadow(0 0 10px rgba(14, 165, 233, 0.2));
        transform: scale(0.98);
    }
    to {
        filter: grayscale(80%) brightness(0.8) contrast(1.5) drop-shadow(0 0 30px rgba(14, 165, 233, 0.6));
        transform: scale(1.02);
    }
}

.loader-progress {
    width: 200px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.loader-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: var(--electric-blue);
    box-shadow: 0 0 10px var(--electric-blue);
    transition: width 0.3s ease;
}

.loader-text {
    font-size: 0.7rem;
    letter-spacing: 0.4em;
    color: var(--text-secondary);
    font-family: 'Orbitron', sans-serif; /* High-tech feel */
    animation: flicker 2s infinite;
}

@keyframes flicker {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% { opacity: 1; }
    20%, 24%, 55% { opacity: 0.5; }
}

.background-glow {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120vw;
    height: 120vh;
    background: radial-gradient(circle at center, rgba(14, 165, 233, 0.12) 0%, rgba(0, 0, 0, 0) 60%);
    pointer-events: none;
    z-index: -1;
}

.gradient-text {
    background: linear-gradient(to right, #ffffff, var(--electric-blue), #ffffff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientFlow 8s linear infinite;
}

@keyframes gradientFlow {
    to { background-position: 200% center; }
}

.container {
    /* Removed in favor of specific sections */
    display: none; 
}

.main-wrapper {
    width: 100%;
    position: relative; /* Ensure z-index works */
}

.hero-section {
    height: 100svh;
    min-height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 0; 
    overflow: hidden;
}

/* ... (ThreeJS Canvas CSS remains) ... */

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0;
    z-index: 10;
    animation: fadeIn 1s ease 1s forwards;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--electric-blue), transparent);
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    transform: translateY(-100%);
    animation: scrollPulse 2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

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

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

/* Scroll-Synced Animated Angels Container */
.angel-container {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 15vw; /* Decreased border/container size */
    height: 30vh; /* Decreased border/container size */
    z-index: 100; /* Brought to the absolute front layer */
    pointer-events: none; /* Let users click the text/cards in front */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    /* Adjusted mask to match the new scale, keeping the blurred edge smooth */
    -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 35%, rgba(0,0,0,0) 65%);
    mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 35%, rgba(0,0,0,0) 65%);
}

.left-side {
    left: 2%; /* Nudged slightly off the absolute edge */
    animation: floatAngel 6s ease-in-out infinite;
}

.right-side {
    right: 2%;
    animation: floatAngel 6s ease-in-out infinite;
    animation-delay: -3s; /* Asynchronous floating so they don't look robotic */
}

.angel-container canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1.0; /* Fully opaque, bold and clean */
    mix-blend-mode: screen; /* Keeps the black background knocked out */
    /* Aesthetic Unity: Darker metallic silver with high contrast and a subtle electric blue glow */
    filter: grayscale(100%) brightness(0.65) contrast(1.6) drop-shadow(0 0 15px rgba(14, 165, 233, 0.25));
}

/* Fade out angels on small mobile screens to keep layout clean */
@media (max-width: 900px) {
    .angel-container canvas {
        opacity: 0.15; /* Just a very subtle ghostly vibe on phones */
    }
}

.content-section {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8rem 2rem 4rem;
    position: relative;
    z-index: 2; /* Ensure above background */
}

/* 
   Spacer element to create visual padding between the footer 
   and the top of the page when infinite scroll wraps around.
*/
.infinite-scroll-spacer {
    height: 30vh;
    width: 100%;
    pointer-events: none;
    background: transparent;
}

.content-wrapper {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    max-width: 900px;
    transition: opacity 1s ease, transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.about-layout {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 3rem;
    align-items: center;
    text-align: left;
}

.about-intro {
    display: flex;
    flex-direction: column;
    gap: 1.5rem; /* Reset gap to a standard feel */
}

.eyebrow {
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 1.25rem; /* Increased margin to ensure no overlap with heading */
}

body.js .content-wrapper.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px);
}

body.js .content-wrapper.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Removed individual animations on children to prevent conflicts with scroll reveal */
.hero-text {
    font-size: 4.5rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.04em;
    /* animation: fadeUp 1s ... REMOVED */
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 300;
    max-width: 500px;
    line-height: 1.6;
    /* animation: fadeUp 1s ... REMOVED */
}

.cta-button {
    margin-top: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    padding: 1rem 2.5rem;
    border-radius: 9999px;
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(10px);
    /* animation: fadeUp 1s ... REMOVED */
}

.glass-card {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 2px; /* Sharper, more technical look */
    padding: 3rem;
    max-width: 520px;
    width: 100%;
    text-align: left;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.03),
        transparent
    );
    transition: 0.5s;
}

.glass-card:hover::before {
    left: 100%;
}

.glass-card:hover {
    transform: translateY(-8px);
    border-color: rgba(14, 165, 233, 0.4);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5), 0 0 20px rgba(14, 165, 233, 0.1);
}

.click-hint {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-secondary);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0.5;
    transition: all 0.4s ease;
    pointer-events: none;
}

.glass-card:hover .click-hint {
    color: var(--electric-blue);
    opacity: 0.9;
    transform: translateY(-2px);
}

.about-row {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 1.25rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.about-row:last-of-type {
    border-bottom: none;
}

.about-label {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.8);
}

.about-value {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
}

.scroll-link {
    color: var(--accent-secondary); /* Silver/Chrome from root */
    text-decoration: none !important; /* Force remove default underline */
    position: relative;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    font-weight: 600; /* Bolder */
    display: inline-block;
    text-shadow: 0 0 10px rgba(226, 232, 240, 0.2); /* Subtle glow to make it pop */
}

.scroll-link:hover {
    color: #ffffff; /* Bright white on hover */
    transform: translateY(-2px); /* Slight lift */
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.5); /* Enhanced glow on hover */
}

.scroll-link::after {
    display: none; /* Remove any arrows or underlines */
}

.separator {
    color: var(--text-secondary);
    opacity: 0.5;
    margin: 0 4px;
}

.about-card .cta-button {
    margin-top: 2rem;
    width: fit-content;
}

/* Feature Layout Styles */
.feature-layout {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 4rem;
    text-align: left;
}

.feature-header {
    display: flex;
    flex-direction: column;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    width: 100%;
}

.feature-card {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: 100%;
    position: relative;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: rgba(14, 165, 233, 0.4);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5), 0 0 20px rgba(14, 165, 233, 0.1);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.card-description {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.subtitle.full-width {
    max-width: 800px;
    margin-top: 1rem;
}

/* Cinematic Background Text Styles - Centered & Massive */
.cinematic-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.bg-word {
    position: absolute;
    font-size: clamp(4rem, 18vw, 14rem);
    font-weight: 900;
    color: rgba(255, 255, 255, 0.03);
    filter: blur(6px);
    line-height: 0.8;
    letter-spacing: -0.06em;
    user-select: none;
    white-space: nowrap;
    transition: all 1.5s ease;
}

.bg-word:nth-child(1) { 
    top: 10%; 
    left: 5%; 
    transform: rotate(-8deg); 
}
.bg-word:nth-child(2) { 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%) rotate(4deg); 
}
.bg-word:nth-child(3) { 
    bottom: 10%; 
    right: 5%; 
    transform: rotate(-3deg); 
}

/* Evolution Content Styles */
.evolution-content {
    display: flex;
    flex-direction: row; /* Horizontal flow for the modern model */
    gap: 3rem;
    margin: 6rem 0;
    max-width: 1200px;
    width: 100%;
    justify-content: center;
}

.evolution-step {
    flex: 1;
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    border-radius: 4px;
}

.step-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--electric-blue);
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.evolution-step .subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    opacity: 0.9;
}

/* Remove old robust-funnel styles */
.robust-funnel, .funnel-step, .glass-header, .funnel-panel, .funnel-pipe {
    display: none;
}

/* Footer Styles */
.site-footer {
    width: 100%;
    padding: 3rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    z-index: 10;
    position: relative;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    opacity: 0.7;
}

.footer-right {
    display: flex;
    align-items: center;
}

.social-link {
    color: var(--text-secondary);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.social-link:hover {
    color: var(--electric-blue);
    background: rgba(14, 165, 233, 0.1);
    border-color: rgba(14, 165, 233, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(14, 165, 233, 0.1);
}

@media (max-width: 600px) {
    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    .footer-left {
        flex-direction: column;
        gap: 0.5rem;
    }
    .footer-left .separator {
        display: none;
    }
}

@media (max-width: 900px) {
    .robust-funnel.horizontal {
        flex-direction: column;
        gap: 3rem;
    }
    .funnel-step { transform: none !important; }
    .funnel-pipe.horizontal {
        height: 60px;
        width: 2px;
        transform: none !important;
        margin: 1rem 0;
    }
}

@media (max-width: 900px) {
    .robust-funnel.horizontal {
        flex-direction: column;
    }
    .funnel-pipe.horizontal {
        height: 40px;
        width: 2px;
        margin-top: 0;
    }
    .pipe-flow {
        animation: pipeFlow 2s linear infinite;
        width: 100%;
        height: 50%;
        top: -100%;
        left: 0;
    }
}

/* Manual Dots Animation */
.manual-dots {
    display: flex;
    gap: 12px;
}

.manual-dots .dot {
    width: 6px;
    height: 6px;
    background: #475569;
    border-radius: 50%;
    animation: pulseGray 2s infinite ease-in-out;
}

.manual-dots .dot:nth-child(2) { animation-delay: 0.4s; }
.manual-dots .dot:nth-child(3) { animation-delay: 0.8s; }
.manual-dots .dot:nth-child(4) { animation-delay: 1.2s; }

@keyframes pulseGray {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.4); opacity: 1; }
}

/* AI Core Animation */
.ai-processing {
    position: relative;
}

.core-logo {
    font-weight: 900;
    font-size: 1.5rem;
    color: var(--electric-blue);
    z-index: 2;
    text-shadow: 0 0 10px var(--electric-blue);
}

.pulse-ring {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 2px solid var(--electric-blue);
    border-radius: 50%;
    animation: ringExpand 2s infinite;
}

@keyframes ringExpand {
    0% { transform: scale(0.5); opacity: 1; }
    100% { transform: scale(2); opacity: 0; }
}

/* Scale Bars Animation */
.scale-bars {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 40px;
}

.scale-bars .bar {
    width: 12px;
    background: var(--electric-blue);
    animation: barGrow 1.5s infinite ease-in-out;
}

.scale-bars .bar:nth-child(2) { height: 60%; animation-delay: 0.2s; }
.scale-bars .bar:nth-child(3) { height: 100%; animation-delay: 0.4s; }
.scale-bars .bar:nth-child(1) { height: 40%; }

@keyframes barGrow {
    0%, 100% { transform: scaleY(1); opacity: 0.6; }
    50% { transform: scaleY(1.3); opacity: 1; }
}

.cta-button:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(18px) scale(1.02); /* Maintain translateY offset roughly */
    box-shadow: 0 0 30px rgba(14, 165, 233, 0.2);
}

.cta-button svg {
    transition: transform 0.4s ease;
}

.cta-button:hover svg {
    transform: translateX(4px);
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 640px) {
    .hero-text {
        font-size: 3rem;
    }

    .container {
        padding: 1.5rem;
    }
    
    .logo-container {
        width: 140px;
    }
}

@media (max-width: 900px) {
    .about-layout {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-intro {
        align-items: center;
    }

    .subtitle {
        max-width: 100%;
    }

    .glass-card {
        text-align: center;
    }

    .about-row {
        grid-template-columns: 1fr;
        text-align: center;
    }
}
