/* ==========================================================================
   IMPECCABLE DESIGN SYSTEM
   Theme: Refinería El Palito (Industrial Coastal)
   ========================================================================== */

:root {
    /* TYPOGRAPHY */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    
    /* MODULAR SCALE */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 2rem;
    --text-4xl: 2.5rem;
    --text-5xl: 3.5rem;
    --text-6xl: 4.5rem;

    /* COLORS - Sophisticated Figma & Neon Dark Theme */
    --bg-page: #07080a; /* Dark Obsidian */
    --bg-surface: rgba(15, 17, 23, 0.6);
    --bg-panel: rgba(15, 17, 23, 0.45);
    
    /* Text */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.6);
    
    /* Accents (Glowing Cyan and Glowing Purple) */
    --color-accent-primary: #00f2fe; /* Neon Cyan */
    --color-accent-secondary: #a855f7; /* Neon Purple */
    
    /* SPACING */
    --space-2: 0.5rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-24: 6rem;
    --space-32: 8rem;

    /* MOTION */
    --ease-snappy: cubic-bezier(0.2, 0.8, 0.2, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    background-color: var(--bg-page);
}

body {
    font-family: var(--font-body);
    background-color: transparent;
    background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 24px 24px;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

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

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

.white-text {
    color: #ffffff;
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(7, 8, 10, 0.5);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.3s var(--ease-smooth);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-4) var(--space-8);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 700;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-8);
}

.nav-link {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.2s var(--ease-snappy);
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-6);
}

.nav-login {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.nav-login:hover {
    color: #ffffff;
}

.btn-nav-demo {
    padding: 10px 24px;
    background: transparent;
    border: 1.5px solid var(--color-accent-secondary);
    color: #ffffff;
    border-radius: 999px;
    font-size: var(--text-sm);
    font-weight: 600;
    transition: all 0.3s var(--ease-snappy);
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.1);
}

.btn-nav-demo:hover {
    background: var(--color-accent-secondary);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.4);
    transform: translateY(-2px);
}

.mobile-actions {
    display: none;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    z-index: 1001;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: transform 0.3s, opacity 0.3s;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
}

.hero-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-8);
    width: 100%;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: var(--space-16);
    align-items: center;
}

.hero-content {
    max-width: 700px;
}

@media (min-width: 1025px) and (max-width: 1399px) {
    .hero-content {
        transform: translateX(-15px);
    }
}

@media (min-width: 1400px) {
    .hero-content {
        transform: translateX(-40px);
    }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-6);
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--color-accent-primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--color-accent-primary);
}

.hero-content h1 {
    font-size: var(--text-5xl);
    line-height: 1.15;
    margin-bottom: var(--space-6);
}

.subtitle-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    margin-bottom: var(--space-12);
}

.hero-subtitle {
    font-size: var(--text-xl);
    color: var(--text-secondary);
    max-width: 550px;
    line-height: 1.5;
}

/* Figma-Style Cursors */
.figma-cursor {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 10;
    pointer-events: none;
    animation: float 4s ease-in-out infinite;
}

.cursor-blue {
    bottom: -15px;
    right: 20%;
}

.cursor-purple {
    bottom: 15%;
    right: 15%;
}

.cursor-arrow {
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.5));
}

.figma-tag {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.bg-blue {
    background: var(--color-accent-primary);
    color: #07080a !important;
}

.bg-purple {
    background: var(--color-accent-secondary);
}

.hero-cta {
    display: flex;
    gap: var(--space-4);
}

/* Neon buttons */
.btn-neon-cyan {
    padding: 16px 32px;
    background: var(--color-accent-primary);
    color: #07080a;
    border-radius: 12px;
    font-weight: 600;
    font-size: var(--text-base);
    transition: all 0.3s var(--ease-snappy);
    box-shadow: 0 0 25px rgba(0, 242, 254, 0.3);
    display: inline-block;
    border: none;
    cursor: pointer;
}

.btn-neon-cyan:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 35px rgba(0, 242, 254, 0.65);
    background: #ffffff;
}

.btn-neon-purple {
    padding: 16px 32px;
    background: transparent;
    border: 2px solid var(--color-accent-secondary);
    color: #ffffff;
    border-radius: 12px;
    font-weight: 600;
    font-size: var(--text-base);
    transition: all 0.3s var(--ease-snappy);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.12);
    display: inline-block;
    cursor: pointer;
}

.btn-neon-purple:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(168, 85, 247, 0.45);
    background: rgba(168, 85, 247, 0.15);
}

/* ==========================================================================
   VISUAL FRAME (3D Widget container)
   ========================================================================== */
.hero-visual {
    width: 100%;
}

.visual-frame {
    position: relative;
    background: rgba(10, 12, 16, 0.55);
    border: 1px solid rgba(0, 242, 254, 0.18);
    border-radius: 16px;
    overflow: hidden;
    padding-top: 36px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7), 0 0 30px rgba(0, 242, 254, 0.03);
    aspect-ratio: 4 / 3.4;
    min-height: 450px;
}

.visual-frame-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 36px;
    background: rgba(15, 17, 23, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 8px;
    z-index: 10;
}

.frame-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.frame-dot.red { background: #ff5f56; }
.frame-dot.yellow { background: #ffbd2e; }
.frame-dot.green { background: #27c93f; }

.frame-title {
    font-family: monospace;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    margin-left: 8px;
}

#webgl-container {
    width: 100%;
    height: calc(100% - 36px);
    position: relative;
    z-index: 2;
}

.visual-frame::before {
    content: '';
    position: absolute;
    top: 36px;
    left: 0;
    width: 100%;
    height: calc(100% - 36px);
    background-image: radial-gradient(rgba(0, 242, 254, 0.04) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
    z-index: 1;
}

/* Floating Specs Labels pointing to 3D parts */
.ui-pointer {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 5;
    pointer-events: none;
}

.pointer-dot {
    width: 6px;
    height: 6px;
    background: var(--color-accent-primary);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--color-accent-primary);
}

.pointer-label {
    background: rgba(7, 8, 10, 0.85);
    border: 1px solid rgba(0, 242, 254, 0.25);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    color: var(--color-accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 12px rgba(0,0,0,0.6);
}

.pointer-sensor { top: 38%; left: 8%; }
.pointer-twins { top: 18%; right: 18%; }
.pointer-transfer { top: 40%; right: 8%; }

/* Animation floats */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
    100% { transform: translateY(0px); }
}

/* ==========================================================================
   SERVICES SECTION
   ========================================================================== */
.services {
    padding: var(--space-32) var(--space-8);
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-16);
}

.section-header h2 {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-4);
}

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

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-8);
}

.service-card {
    background: var(--bg-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: var(--space-8);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: transform 0.4s var(--ease-snappy), background 0.4s, border-color 0.4s;
}

.service-card:hover {
    transform: translateY(-6px);
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(0, 242, 254, 0.2);
}

.service-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(0, 242, 254, 0.1);
    color: var(--color-accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-6);
}

.service-card h3 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-4);
}

.service-card p {
    color: var(--text-secondary);
    font-size: var(--text-base);
}

/* ==========================================================================
   GLASS PANELS (Metric indicators)
   ========================================================================== */
.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    padding: var(--space-6);
}

.feature-section {
    padding: var(--space-24) var(--space-8);
    max-width: 1400px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.feature-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
    align-items: center;
}

.feature-card-stack {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.metric-value {
    font-size: var(--text-5xl);
    font-family: var(--font-heading);
    font-weight: 700;
    background: linear-gradient(to right, #fff, #a0a0a0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.metric-unit {
    font-size: var(--text-xl);
    color: var(--color-accent-primary);
    margin-left: 4px;
}

.metric-label {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

.inline-flex {
    display: inline-flex;
}

/* ==========================================================================
   HOW IT WORKS (PROCESO)
   ========================================================================== */
.how-it-works {
    padding: var(--space-24) var(--space-8);
    max-width: 1400px;
    margin: 0 auto;
}

.how-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-8);
    margin-top: var(--space-12);
}

.how-card {
    position: relative;
    background: rgba(15, 17, 23, 0.4);
    padding: var(--space-8);
    border-radius: 24px;
    transition: all 0.4s var(--ease-smooth);
}

.how-card:hover {
    transform: translateY(-6px);
    border-color: rgba(168, 85, 247, 0.2);
    box-shadow: 0 10px 30px rgba(168, 85, 247, 0.05);
}

.how-step-num {
    font-size: var(--text-5xl);
    font-family: var(--font-heading);
    font-weight: 700;
    color: rgba(255, 255, 255, 0.03);
    line-height: 1;
    margin-bottom: var(--space-4);
    transition: color 0.4s;
}

.how-card:hover .how-step-num {
    color: rgba(168, 85, 247, 0.2);
}

.how-card h3 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-4);
}

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

/* ==========================================================================
   CONTACT / DEMO SECTION
   ========================================================================== */
.contact {
    padding: var(--space-24) var(--space-8);
    max-width: 1400px;
    margin: 0 auto;
}

.contact-container {
    background: rgba(15, 17, 23, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 32px;
    padding: var(--space-16) var(--space-12);
    backdrop-filter: blur(16px);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: var(--space-12);
    align-items: center;
}

.contact-info h2 {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-4);
}

.contact-info p {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    margin-bottom: var(--space-8);
}

.contact-bullets {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.bullet-item {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.bullet-icon {
    color: var(--color-accent-primary);
    font-weight: bold;
    font-size: var(--text-lg);
}

.contact-form-wrapper {
    background: rgba(10, 12, 16, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: var(--space-8);
}

.form-group {
    margin-bottom: var(--space-4);
}

.form-group label {
    display: block;
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

.form-group input, .form-group textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 12px;
    color: #fff;
    font-family: inherit;
    font-size: var(--text-sm);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent-primary);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.15);
    background: rgba(255, 255, 255, 0.04);
}

.w-full { width: 100%; }
.text-center { text-align: center; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(7, 8, 10, 0.95);
    padding: var(--space-8) var(--space-8);
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-4);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-family: var(--font-heading);
    font-weight: 700;
}

.footer-copy {
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

/* ==========================================================================
   RESPONSIVE & RESPONSIVE MENU
   ========================================================================== */
@media (max-width: 1024px) {
    .hero-content h1 { font-size: var(--text-4xl); }
    .hero-grid, .feature-container, .contact-grid { grid-template-columns: 1fr; }
    .hero-content { text-align: center; margin: 0 auto; }
    .hero-cta { justify-content: center; }
    .contact-info { text-align: center; }
    .contact-bullets { align-items: center; }
    .cursor-blue { right: 5%; bottom: -30px; }
}

@media (max-width: 768px) {
    .hero-content h1 { font-size: var(--text-3xl); }
    .hero-subtitle { font-size: var(--text-base); }
    .hero-content { margin-top: 40px; }
    .hero-cta { flex-direction: column; }
    .btn-neon-cyan, .btn-neon-purple { text-align: center; width: 100%; }
    
    /* Navigation burger interaction */
    .nav-actions { display: none; }
    .hamburger { display: flex; }
    
    .nav-links {
        position: fixed;
        top: 72px;
        left: 0;
        width: 100%;
        height: calc(100vh - 72px);
        background: rgba(7, 8, 10, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        gap: var(--space-8);
        padding: var(--space-8);
        transform: translateY(-150%);
        transition: transform 0.5s var(--ease-smooth);
        z-index: 999;
    }
    
    .nav-links.open {
        transform: translateY(0);
    }
    
    .mobile-actions {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: var(--space-4);
        width: 100%;
        margin-top: var(--space-8);
    }
    
    .mobile-actions .btn-nav-demo {
        width: 100%;
        text-align: center;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

/* ==========================================================================
   GLOWING BACKGROUND BLOBS
   ========================================================================== */
.blur-blobs-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    pointer-events: none;
    overflow: hidden;
}

.blur-blob {
    position: absolute;
    width: 45vw;
    height: 45vw;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.12;
    pointer-events: none;
    mix-blend-mode: screen;
}

.cyan-blob {
    background: radial-gradient(circle, var(--color-accent-primary) 0%, rgba(0, 242, 254, 0) 70%);
    top: -10%;
    right: -10%;
    animation: float-blob-cyan 22s ease-in-out infinite alternate;
}

.purple-blob {
    background: radial-gradient(circle, var(--color-accent-secondary) 0%, rgba(168, 85, 247, 0) 70%);
    bottom: -10%;
    left: -10%;
    animation: float-blob-purple 26s ease-in-out infinite alternate;
}

@keyframes float-blob-cyan {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-8vw, 12vh) scale(1.1); }
    100% { transform: translate(-3vw, -5vh) scale(0.95); }
}

@keyframes float-blob-purple {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(10vw, -15vh) scale(0.9); }
    100% { transform: translate(4vw, 5vh) scale(1.15); }
}

/* ==========================================================================
   VERTICAL LASER SCANNER SWEEP EFFECT
   ========================================================================== */
.scanner-line {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, 
        rgba(0, 242, 254, 0) 0%, 
        rgba(0, 242, 254, 0.7) 20%, 
        rgba(168, 85, 247, 0.7) 80%, 
        rgba(168, 85, 247, 0) 100%
    );
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.5), 0 0 24px rgba(168, 85, 247, 0.3);
    pointer-events: none;
    z-index: 9999;
    animation: laser-sweep 8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes laser-sweep {
    0% { transform: translateY(-10vh); opacity: 0; }
    5% { opacity: 0.75; }
    95% { opacity: 0.75; }
    100% { transform: translateY(110vh); opacity: 0; }
}

/* ==========================================================================
   AI AGENTS FLOWCHART SECTION
   ========================================================================== */
.ai-agents {
    padding: var(--space-24) var(--space-8);
    max-width: 1400px;
    margin: 0 auto;
}

.ai-agents-container {
    margin-top: var(--space-12);
}

.agent-workflow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    flex-wrap: nowrap;
}

.workflow-card {
    position: relative;
    flex: 1;
    min-height: 230px;
    background: rgba(10, 12, 16, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: var(--space-6);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.4s var(--ease-snappy);
    overflow: hidden;
}

.workflow-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    pointer-events: none;
    opacity: 0.03;
    transition: opacity 0.4s;
}

.workflow-card:hover .card-glow {
    opacity: 0.08;
}

.card-glow.cian {
    background: radial-gradient(circle, var(--color-accent-primary) 0%, transparent 60%);
}

.card-glow.purple {
    background: radial-gradient(circle, var(--color-accent-secondary) 0%, transparent 60%);
}

.workflow-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-4);
}

.workflow-icon.cian {
    background: rgba(0, 242, 254, 0.1);
    color: var(--color-accent-primary);
}

.workflow-icon.purple {
    background: rgba(168, 85, 247, 0.1);
    color: var(--color-accent-secondary);
}

.workflow-card h4 {
    font-size: var(--text-lg);
    margin-bottom: var(--space-2);
}

.workflow-card p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.5;
    flex-grow: 1;
}

.workflow-badge {
    display: inline-block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    margin-top: var(--space-4);
}

.text-cian { color: var(--color-accent-primary); }
.text-purple { color: var(--color-accent-secondary); }

/* SVG Flow Connector Lines */
.workflow-connector {
    flex: 0.3;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
}

.connector-svg {
    width: 100%;
    height: 20px;
    overflow: visible;
}

/* Pulsing signal dot moving down the connector */
.pulse-dot {
    animation: flow-signal 2s linear infinite;
}

@keyframes flow-signal {
    0% { cx: 0%; opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { cx: 100%; opacity: 0; }
}

@media (max-width: 1024px) {
    .agent-workflow {
        flex-direction: column;
        gap: var(--space-6);
    }
    .workflow-card {
        width: 100%;
        min-height: auto;
    }
    .workflow-connector {
        transform: rotate(90deg);
        height: 40px;
        margin: var(--space-2) 0;
    }
}

/* ==========================================================================
   INDIVIDUAL DIGITAL TWINS SECTIONS
   ========================================================================== */
.twin-section {
    padding: var(--space-32) var(--space-8);
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.twin-section-container {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.twin-section-grid {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: var(--space-16);
    align-items: center;
}

.twin-grid-reverse {
    grid-template-columns: 1.05fr 0.95fr;
}

.twin-grid-reverse .twin-visual {
    order: 1;
}

.twin-grid-reverse .twin-content {
    order: 2;
}

.twin-content {
    max-width: 650px;
}

.twin-content h3 {
    font-size: var(--text-4xl);
    line-height: 1.2;
    margin-bottom: var(--space-6);
}

.twin-content p {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    margin-bottom: var(--space-8);
    line-height: 1.6;
}

.twin-visual {
    width: 100%;
}

.twin-webgl-container {
    width: 100%;
    height: calc(100% - 36px);
    position: relative;
    z-index: 2;
}

/* Specific floating pointers positioning */
.pointer-stress { top: 70%; left: 45%; }
.pointer-seismic { top: 46%; left: 16%; }
.pointer-wind { top: 20%; right: 26%; }

.pointer-robot { top: 75%; left: 35%; }
.pointer-drone { top: 25%; right: 35%; }
.pointer-rack { top: 48%; left: 18%; }

@media (max-width: 1024px) {
    .twin-section {
        min-height: auto;
        padding: var(--space-16) var(--space-8);
    }
    .twin-section-grid {
        grid-template-columns: 1fr !important;
        gap: var(--space-12);
    }
    .twin-grid-reverse .twin-visual {
        order: 1 !important;
    }
    .twin-grid-reverse .twin-content {
        order: 2 !important;
    }
    .twin-content {
        text-align: center;
        margin: 0 auto;
    }
    .twin-content .inline-flex {
        justify-content: center;
    }
}

/* Specific floating pointers for separator & energy grid */
.pointer-inlet { top: 25%; left: 15%; }
.pointer-weir { top: 52%; left: 45%; }
.pointer-valve { bottom: 20%; left: 30%; }

.pointer-turbine { top: 20%; left: 22%; }
.pointer-solar { bottom: 30%; left: 20%; }
.pointer-battery { top: 55%; right: 28%; }

/* Tab buttons active colors for new twins */
.twin-tab-btn[data-twin="separator"].active {
    background: rgba(217, 119, 6, 0.1);
    color: #d97706;
    border-color: #d97706;
    box-shadow: 0 0 15px rgba(217, 119, 6, 0.15);
}

.twin-tab-btn[data-twin="energy"].active {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border-color: #10b981;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.15);
}

/* ==========================================================================
   GLOBAL 3D SCROLL PERSPECTIVE & TRANSITIONS
   ========================================================================== */


section {
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform, opacity;
}

/* 3D hover effect for cards */
.service-card, .workflow-card, .how-card, .contact-form-wrapper {
    transition: transform 0.15s ease-out, box-shadow 0.3s ease;
    transform-style: preserve-3d;
}

.service-card *, .workflow-card *, .how-card *, .contact-form-wrapper * {
    transform-style: preserve-3d;
}

/* ==========================================================================
   3D WEBGL WARP BACKGROUND CANVAS
   ========================================================================== */
#warp-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    opacity: 0.85; /* Clearer background presence for LiDAR scanner */
    background: transparent;
}

/* Reverted to Hero Grid left-aligned */

/* ==========================================================================
   SHOWROOM CAROUSEL GALLERY
   ========================================================================== */
.showroom-section {
    padding: var(--space-24) var(--space-8);
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
}

.showroom-carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: var(--space-12);
    padding: 0 60px; /* Space for buttons */
}

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

.carousel-track {
    display: flex;
    gap: 30px;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}

.showroom-card {
    flex: 0 0 360px;
    background: rgba(10, 12, 16, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: var(--space-6);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    opacity: 0.45;
    transform: scale(0.9);
    cursor: pointer;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1), border-color 0.4s, box-shadow 0.4s;
    overflow: hidden;
    position: relative;
    user-select: none;
}

.showroom-card.active-card {
    opacity: 1;
    transform: scale(1.05);
    border-color: rgba(0, 242, 254, 0.35);
    box-shadow: 0 20px 45px rgba(0, 242, 254, 0.1);
    z-index: 5;
    cursor: default;
}

/* Premium hover glow for all showroom cards */
.showroom-card:hover {
    border-color: rgba(0, 242, 254, 0.4);
    box-shadow:
        0 0 15px rgba(0, 242, 254, 0.15),
        0 0 40px rgba(168, 85, 247, 0.08),
        inset 0 0 20px rgba(0, 242, 254, 0.03);
}

.showroom-card.active-card:hover {
    border-color: rgba(0, 242, 254, 0.6);
    box-shadow:
        0 0 20px rgba(0, 242, 254, 0.25),
        0 0 60px rgba(168, 85, 247, 0.12),
        0 20px 50px rgba(0, 242, 254, 0.15),
        inset 0 0 30px rgba(0, 242, 254, 0.04);
}

@media (max-width: 1024px) {
    .showroom-carousel-wrapper {
        padding: 0 50px;
    }
}

@media (max-width: 768px) {
    .showroom-carousel-wrapper {
        padding: 0 35px;
    }
}

@media (max-width: 480px) {
    .showroom-card {
        flex: 0 0 290px;
        padding: var(--space-4);
    }
}

.card-visual-container {
    position: relative;
    width: 100%;
    height: 220px;
    background: rgba(7, 8, 10, 0.85);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: var(--space-6);
}

.card-canvas {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
}

.card-scan-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 242, 254, 0) 0%,
        rgba(0, 242, 254, 0.04) 50%,
        rgba(0, 242, 254, 0) 100%
    );
    background-size: 100% 200%;
    animation: card-scan 4s linear infinite;
    pointer-events: none;
    z-index: 3;
}

@keyframes card-scan {
    0% { background-position: 0% 0%; }
    100% { background-position: 0% -200%; }
}

.card-details {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.card-primary-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.card-primary-info h3 {
    font-size: var(--text-lg);
    margin: 0;
    font-family: var(--font-heading);
    font-weight: 600;
}

.card-expanded-info {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.5s ease-out, margin-top 0.6s;
    width: 100%;
}

.active-card .card-expanded-info {
    max-height: 250px;
    opacity: 1;
    margin-top: 15px;
}

.card-expanded-info p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: var(--space-4);
}

.card-specs-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: var(--space-6);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 10px;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.spec-label {
    font-family: monospace;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 600;
}

.spec-value {
    font-family: monospace;
    font-size: 10.5px;
    color: var(--color-accent-primary);
    font-weight: 700;
}

.active-card:nth-child(even) .spec-value {
    color: var(--color-accent-secondary);
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
}

.card-status-dot.pulse-green {
    animation: status-pulse 2s infinite;
}

@keyframes status-pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1.15); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.card-status-text {
    font-size: var(--text-xs);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-showroom-action {
    padding: 12px 24px;
    background: transparent;
    border: 1.5px solid var(--color-accent-primary);
    color: var(--color-accent-primary);
    border-radius: 12px;
    font-weight: 600;
    font-size: var(--text-sm);
    transition: all 0.3s var(--ease-snappy);
    cursor: pointer;
}

.btn-showroom-action:hover {
    background: var(--color-accent-primary);
    color: #07080a;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.3);
}

/* Carousel Buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(15, 17, 23, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s var(--ease-snappy);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.carousel-btn:hover {
    background: rgba(0, 242, 254, 0.1);
    border-color: var(--color-accent-primary);
    color: var(--color-accent-primary);
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.2);
}

.prev-btn { left: 0; }
.next-btn { right: 0; }

.carousel-btn:disabled {
    opacity: 0.25;
    pointer-events: none;
}

/* Dots */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: var(--space-6);
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s;
}

.carousel-dot.active {
    background: var(--color-accent-primary);
    box-shadow: 0 0 8px var(--color-accent-primary);
    width: 20px;
    border-radius: 4px;
}

/* ==========================================================================
   FULL-SCREEN HOLOGRAM MODAL (DCS SYSTEM)
   ========================================================================== */
.hologram-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 6, 8, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.hologram-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.hologram-modal-content {
    width: 94vw;
    max-width: 1400px;
    height: 90vh;
    max-height: 850px;
    background: rgba(15, 17, 23, 0.7);
    border: 1px solid rgba(0, 242, 254, 0.2);
    border-radius: 28px;
    padding: var(--space-6);
    display: flex;
    flex-direction: column;
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.8), 0 0 50px rgba(0, 242, 254, 0.05);
    transform: scale(0.95);
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.hologram-modal-overlay.active .hologram-modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: var(--space-4);
    margin-bottom: var(--space-4);
}

.modal-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-title-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-accent-primary);
    box-shadow: 0 0 10px var(--color-accent-primary);
}

.modal-title-dot.pulse-cyan {
    animation: status-pulse-cyan 2s infinite;
}

@keyframes status-pulse-cyan {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 242, 254, 0.7); }
    70% { transform: scale(1.15); box-shadow: 0 0 0 8px rgba(0, 242, 254, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 242, 254, 0); }
}

.modal-title h2 {
    font-size: var(--text-2xl);
    font-weight: 700;
}

.modal-close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2.2rem;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.modal-close-btn:hover {
    color: #ffffff;
}

.modal-body {
    flex: 1;
    display: grid;
    grid-template-columns: 320px 1fr 320px;
    gap: var(--space-6);
    overflow: hidden;
    margin-bottom: var(--space-4);
}

@media (max-width: 1100px) {
    .modal-body {
        grid-template-columns: 1fr;
        grid-template-rows: auto 380px auto;
        overflow-y: auto;
    }
    .modal-hud-left, .modal-hud-right {
        width: 100% !important;
        height: auto !important;
    }
}

.modal-hud-left, .modal-hud-right {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    height: 100%;
}

.hud-box {
    background: rgba(10, 12, 16, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
}

.hud-box h4 {
    font-family: monospace;
    font-size: 11px;
    color: var(--text-secondary);
    letter-spacing: 1.5px;
    margin-bottom: var(--space-4);
    text-transform: uppercase;
}

.mt-4 { margin-top: 1rem; }
.flex-1 { flex: 1; }

#telemetry-chart-canvas {
    width: 100%;
    height: 170px;
    background: rgba(7, 8, 10, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.hud-metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.hud-metric {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.03);
    padding: 10px;
    border-radius: 8px;
}

.hud-metric .metric-label {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 700;
    margin-bottom: 4px;
}

.hud-metric .metric-val {
    font-family: monospace;
    font-size: var(--text-lg);
    font-weight: 700;
}

/* Center Viewport */
.modal-viewport-container {
    position: relative;
    background: rgba(5, 6, 8, 0.9);
    border: 1px solid rgba(0, 242, 254, 0.15);
    border-radius: 20px;
    overflow: hidden;
    height: 100%;
}

#modal-webgl-container {
    width: 100%;
    height: 100%;
    z-index: 2;
    position: relative;
}

.viewport-crosshairs {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle, rgba(0, 242, 254, 0.15) 1px, transparent 1px),
        linear-gradient(rgba(0, 242, 254, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 242, 254, 0.03) 1px, transparent 1px);
    background-size: 100px 100px, 40px 40px, 40px 40px;
    background-position: center;
    pointer-events: none;
    z-index: 1;
    opacity: 0.7;
}

.viewport-scanline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 242, 254, 0) 0%,
        rgba(0, 242, 254, 0.08) 10%,
        rgba(0, 242, 254, 0) 20%
    );
    background-size: 100% 100%;
    pointer-events: none;
    z-index: 3;
    animation: modal-scan 8s linear infinite;
    opacity: 0.5;
}

/* Console logs */
.console-logs {
    font-family: monospace;
    font-size: 10.5px;
    color: #00f2fe;
    overflow-y: auto;
    flex: 1;
    background: rgba(7, 8, 10, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 12px;
    line-height: 1.5;
}

.console-line {
    margin-bottom: 8px;
    word-break: break-all;
}

.console-line .timestamp {
    color: rgba(255, 255, 255, 0.35);
    margin-right: 8px;
}

.console-line.info { color: #00f2fe; }
.console-line.warn { color: #f59e0b; }
.console-line.success { color: #10b981; }

.modal-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: var(--space-4);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: var(--space-4);
}

.btn-modal-control {
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border-radius: 12px;
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-modal-control:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   TELEMETRY RACK PANELS (Scrolling mock indicators)
   ========================================================================== */
.telemetry-panel {
    background: rgba(10, 12, 16, 0.75);
    border: 1px solid rgba(0, 242, 254, 0.15);
    border-radius: 16px;
    padding: var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.telemetry-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.telemetry-item {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    padding-bottom: 8px;
}

.telemetry-label {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.35);
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.telemetry-value {
    font-family: monospace;
    font-size: var(--text-lg);
    font-weight: 700;
}

.telemetry-chart-container {
    width: 100%;
    height: 110px;
    background: rgba(7, 8, 10, 0.7);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    overflow: hidden;
    position: relative;
}

.telemetry-mini-chart {
    width: 100%;
    height: 100%;
    display: block;
}
