/* =========================================
   JACTAI - Advanced Cinematic Architecture
   ========================================= */

:root {
    --bg-dark: #020204;
    --bg-surface: rgba(255, 255, 255, 0.015);
    --border-glass: rgba(255, 255, 255, 0.04);
    --text-primary: #ffffff;
    --text-secondary: #8892b0;
    
    --neon-blue: #00f2fe;
    --neon-purple: #b100ff;
    --gradient-primary: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
    
    --font-sans: 'Inter', -apple-system, sans-serif;
    --font-display: 'Space Grotesk', var(--font-sans);
    --transition-smooth: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; background-color: var(--bg-dark); color: var(--text-primary); font-family: var(--font-sans); }
body { overflow-x: hidden; line-height: 1.6; }
a { text-decoration: none; color: inherit; }

/* Cinematic Preloader */
#preloader { position: fixed; inset: 0; background: var(--bg-dark); z-index: 10000; display: flex; flex-direction: column; justify-content: center; align-items: center; transition: opacity 0.8s ease-in-out, visibility 0.8s; }
.loader-core { width: 40px; height: 40px; background: var(--gradient-primary); border-radius: 50%; animation: pulse-core 1.5s infinite alternate; box-shadow: 0 0 50px var(--neon-blue); }
.loader-ring { position: absolute; width: 80px; height: 80px; border: 1px solid rgba(0,242,254,0.3); border-radius: 50%; animation: spin-ring 2s linear infinite; }
.loader-text { margin-top: 30px; font-family: monospace; font-size: 0.85rem; color: var(--neon-blue); letter-spacing: 4px; animation: glitch-text 2s infinite; }
.preloader-hidden { opacity: 0; visibility: hidden; }

/* Page Transition Overlay */
.page-transition { position: fixed; inset: 0; background: var(--bg-dark); z-index: 9999; transform: translateY(100%); transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1); }
.page-transition.active { transform: translateY(0); }

/* Neural Canvas & Ambient Mesh */
#neural-canvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.6; }
.ambient-mesh { position: fixed; inset: 0; background: radial-gradient(circle at 50% 0%, rgba(177, 0, 255, 0.04) 0%, transparent 70%); z-index: 0; pointer-events: none; }

/* Typography & Core */
h1, h2, h3, h4, .brand { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.04em; line-height: 1.1; position: relative; z-index: 1; }
.text-gradient { background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.animated-gradient { background-size: 200% auto; animation: shine 4s linear infinite; }
.container { max-width: 1300px; margin: 0 auto; padding: 0 5%; position: relative; z-index: 2; }
.grid { display: grid; gap: 2.5rem; }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.section-header { text-align: center; margin-bottom: 5rem; }
.section-header h2 { font-size: clamp(2.5rem, 5vw, 3.5rem); }

/* Glass Navigation with Animated Underlines */
.glass-nav { position: fixed; top: 0; width: 100%; z-index: 1000; background: rgba(2, 2, 4, 0.4); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border-bottom: 1px solid var(--border-glass); padding: 1.5rem 0; transition: var(--transition-smooth); }
.nav-container { display: flex; justify-content: space-between; align-items: center; }
.brand { font-size: 1.75rem; color: #fff; display: flex; align-items: center; gap: 4px; }
.glow-dot { color: var(--neon-blue); text-shadow: 0 0 10px var(--neon-blue); }
.nav-links { display: flex; gap: 3rem; }
.hover-link { position: relative; color: var(--text-secondary); font-size: 0.9rem; font-weight: 500; transition: color 0.3s; }
.hover-link::after { content: ''; position: absolute; width: 0; height: 1px; bottom: -4px; left: 0; background: var(--gradient-primary); transition: width 0.3s ease; }
.hover-link:hover { color: #fff; }
.hover-link:hover::after { width: 100%; }

/* Buttons */
.btn { display: inline-block; padding: 1rem 2.5rem; border-radius: 100px; font-weight: 600; font-size: 0.95rem; transition: var(--transition-smooth); cursor: pointer; text-align: center; border: none; outline: none; position: relative; overflow: hidden; }
.btn-primary { background: #fff; color: #000; box-shadow: 0 0 20px rgba(255,255,255,0.1); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(255,255,255,0.2); }
.btn-secondary { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.2); backdrop-filter: blur(10px); }

/* Hero */
.hero { min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; padding-top: 6rem; }
.ai-badge { display: inline-flex; padding: 0.5rem 1.25rem; border-radius: 100px; background: rgba(0, 242, 254, 0.05); color: var(--neon-blue); font-size: 0.85rem; border: 1px solid rgba(0, 242, 254, 0.2); margin-bottom: 2rem; letter-spacing: 1px; text-transform: uppercase; }
.pulse-border { animation: border-pulse 3s infinite; }
.hero-title { font-size: clamp(3.5rem, 7vw, 7rem); margin-bottom: 1.5rem; }
.hero-subtitle { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--text-secondary); max-width: 700px; margin: 0 auto 3.5rem; }
.hero-actions { display: flex; gap: 1.5rem; justify-content: center; }

/* 3D Tilt Cards & Ecosystem Grid */
.industries, .infrastructure { padding: 10rem 0; }
.perspective-grid { perspective: 1000px; }
.tilt-card { transform-style: preserve-3d; will-change: transform; transition: transform 0.1s; position: relative; }
.glass-card { background: var(--bg-surface); backdrop-filter: blur(20px); border: 1px solid var(--border-glass); border-radius: 24px; padding: 2.5rem 2rem; position: relative; overflow: hidden; display: block; text-align: left; }
.card-content { transform: translateZ(30px); } /* 3D pop effect on text */
.card-border-glow { position: absolute; inset: 0; border-radius: 24px; padding: 2px; background: conic-gradient(from var(--angle), transparent 70%, var(--neon-blue), var(--neon-purple)); -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity 0.5s; pointer-events: none; }
@property --angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
.glass-card:hover .card-border-glow { opacity: 1; animation: spin-border 4s linear infinite; }
.card-icon { font-size: 2.5rem; margin-bottom: 1.5rem; filter: drop-shadow(0 0 10px rgba(0,242,254,0.3)); }
.industry-card h4 { font-size: 1.3rem; margin-bottom: 0.75rem; color: #fff; }
.industry-card p { font-size: 0.95rem; color: var(--text-secondary); }

/* Infrastructure Hologram UI */
.split-layout { display: flex; align-items: center; gap: 6rem; }
.showcase-text, .showcase-visual { flex: 1; }
.showcase-text h2 { font-size: 3.5rem; margin-bottom: 1.5rem; }
.feature-list { list-style: none; margin-top: 2rem; }
.feature-list li { margin-bottom: 1.25rem; display: flex; align-items: center; color: #fff; font-size: 1.05rem; }
.feature-list li::before { content: '✓'; width: 24px; height: 24px; background: rgba(0, 242, 254, 0.1); color: var(--neon-blue); border-radius: 50%; margin-right: 15px; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; }

.hologram-ui { background: rgba(10, 10, 15, 0.6); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 20px; padding: 2rem; box-shadow: 0 30px 60px rgba(0,0,0,0.5), inset 0 0 30px rgba(0, 242, 254, 0.05); display: flex; flex-direction: column; gap: 1.5rem; backdrop-filter: blur(30px); }
.ui-header { display: flex; align-items: center; gap: 8px; margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid rgba(255,255,255,0.05); }
.dot { width: 12px; height: 12px; border-radius: 50%; } .red{background:#ff5f56;} .yellow{background:#ffbd2e;} .green{background:#27c93f;}
.ui-title { margin-left: 10px; font-family: monospace; color: var(--text-secondary); font-size: 0.85rem; }
.chat-bubble { padding: 1rem 1.5rem; border-radius: 12px; font-size: 0.95rem; max-width: 90%; transform: translateZ(20px); }
.chat-bubble.ai { background: rgba(0, 242, 254, 0.05); border: 1px solid rgba(0, 242, 254, 0.2); color: #fff; align-self: flex-start; }
.chat-bubble.user { background: rgba(255, 255, 255, 0.05); color: #fff; align-self: flex-end; }
.cyber-graph { height: 60px; background: linear-gradient(90deg, transparent, rgba(0,242,254,0.2) 50%, transparent); margin-top: 1rem; border-radius: 8px; position: relative; overflow: hidden; }
.cyber-graph::after { content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%; background: linear-gradient(90deg, transparent, rgba(0,242,254,0.4), transparent); animation: scanline 2s infinite; }

/* Contact Forms */
.contact { padding: 8rem 0; border-top: 1px solid var(--border-glass); }
.input-group { position: relative; margin-bottom: 2.5rem; }
.input-group input, .input-group textarea { width: 100%; background: transparent; border: none; border-bottom: 1px solid rgba(255,255,255,0.2); padding: 1rem 0; color: #fff; font-size: 1.05rem; font-family: var(--font-sans); outline: none; resize: none; transition: var(--transition-smooth); }
.input-group input:focus, .input-group textarea:focus { border-bottom-color: var(--neon-purple); }
.input-group label { position: absolute; top: 1rem; left: 0; color: var(--text-secondary); transition: var(--transition-smooth); pointer-events: none; }
.input-group input:focus ~ label, .input-group input:not(:placeholder-shown) ~ label, .input-group textarea:focus ~ label, .input-group textarea:not(:placeholder-shown) ~ label { top: -1.25rem; font-size: 0.75rem; color: var(--neon-purple); letter-spacing: 1px; text-transform: uppercase; }

/* Custom Cursors */
@media (pointer: fine) {
    .cursor, .cursor-ring { position: fixed; pointer-events: none; z-index: 9999; transform: translate(-50%, -50%); transition: transform 0.15s ease; }
    .cursor { width: 6px; height: 6px; background: var(--neon-blue); border-radius: 50%; box-shadow: 0 0 10px var(--neon-blue); }
    .cursor-ring { width: 40px; height: 40px; border: 1px solid rgba(0, 242, 254, 0.4); border-radius: 50%; transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
    .cursor.active { transform: translate(-50%, -50%) scale(0); }
    .cursor-ring.active { transform: translate(-50%, -50%) scale(1.5); background: rgba(0, 242, 254, 0.05); border-color: transparent; }
}

/* Animations */
@keyframes pulse-core { to { transform: scale(1.2); box-shadow: 0 0 80px var(--neon-purple); } }
@keyframes spin-ring { 100% { transform: rotate(360deg); } }
@keyframes shine { to { background-position: 200% center; } }
@keyframes border-pulse { 50% { border-color: rgba(0, 242, 254, 0.6); box-shadow: 0 0 20px rgba(0,242,254,0.2); } }
@keyframes spin-border { to { --angle: 360deg; } }
@keyframes scanline { 100% { left: 200%; } }
.floating { animation: float 8s ease-in-out infinite alternate; }
@keyframes float { 0% { transform: translateY(0); } 100% { transform: translateY(-20px); } }

/* Hardware Reveal Classes */
.reveal-up { opacity: 0; transform: translateY(40px); transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1); will-change: opacity, transform; }
.reveal-left { opacity: 0; transform: translateX(-40px); transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal-right { opacity: 0; transform: translateX(40px); transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1); }
.is-visible { opacity: 1; transform: translate(0); }

/* Mobile Optimizations */
@media (max-width: 1024px) {
    .split-layout { flex-direction: column; text-align: center; }
    .nav-links { display: none; }
    .hero-title { font-size: 3rem; }
    .cursor, .cursor-ring { display: none; }
    .tilt-card { transform: none !important; } /* Disable 3D tilt on touch for performance */
}