:root {
    --bg-dark: #0f172a;
    --bg-surface: #1e293b;
    --bg-alt: #0a0f1d;
    --accent: #06b6d4;
    --accent-glow: rgba(6, 182, 212, 0.3);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --error: #ef4444;
    --success: #10b981;
    --border: rgba(255, 255, 255, 0.08);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --font-main: 'Inter', sans-serif;
}

/* Base Setup */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body { 
    background-color: var(--bg-dark); 
    color: var(--text-primary); 
    font-family: var(--font-main); 
    line-height: 1.6; 
    overflow-x: hidden;
}

/* Neural Network Background Canvas */
#neural-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
    background: var(--bg-dark);
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.max-800 { max-width: 800px; margin: 0 auto; }
.text-center { text-align: center; }
.hidden { display: none !important; }

/* Typography */
h1, h2, h3, h4 { font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 1rem; }
h1 { font-size: 5rem; }
h2 { font-size: 2.5rem; text-transform: uppercase; }
p { margin-bottom: 1.25rem; }
.accent { color: var(--accent); text-shadow: 0 0 30px var(--accent-glow); }

/* Gradient Titles */
.gradient-title {
    background: linear-gradient(to right, #fff, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Header */
.main-header {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border);
    position: fixed;
    top: 0; width: 100%; z-index: 1000;
    padding: 1rem 0;
}

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

.logo { display: flex; align-items: center; gap: 0.75rem; }
.logo-orb { width: 1.25rem; height: 1.25rem; background: var(--accent); border-radius: 50%; box-shadow: 0 0 15px var(--accent); }
.logo h1 { font-size: 1.5rem; margin: 0; }
.logo h1 span { color: var(--accent); }

.online-status { font-size: 0.7rem; font-weight: 900; letter-spacing: 0.1em; color: var(--text-secondary); display: flex; align-items: center; gap: 0.5rem; }
.pulse { width: 8px; height: 8px; background: var(--success); border-radius: 50%; box-shadow: 0 0 10px var(--success); animation: pulse-anim 2s infinite; }

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

/* Hero & Visual Pulse */
.hero { padding: 12rem 0 8rem; position: relative; min-height: 80vh; display: flex; align-items: center; overflow: hidden; }
.hero-bg-glow { 
    position: absolute; top: -100px; left: 50%; transform: translateX(-50%); 
    width: 120vw; height: 600px; 
    background: radial-gradient(circle at center, var(--accent-glow) 0%, transparent 60%); 
    z-index: -1; pointer-events: none; 
}

.hero-content { position: relative; z-index: 5; }

/* Visual Pulse Area */
.hero-pulse-container {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.pulse-snapshot {
    position: absolute;
    width: 160px;
    height: 200px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 0 20px var(--accent-glow);
    animation: floating-snap 8s infinite ease-in-out, pulse-glow 4s infinite ease-in-out;
}

.pulse-snapshot::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 200%;
    height: 200%;
    background: linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, 0.15) 50%, transparent 60%);
    transform: rotate(25deg);
    animation: sweep 6s infinite;
}

.pulse-snapshot img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.85); transition: filter 0.3s ease; }
.pulse-snapshot:hover img { filter: brightness(1.1); }

.s1 { top: 20%; left: 10%; transform: rotate(-10deg); animation-delay: 0s, 0s; }
.s2 { top: 60%; left: 5%; transform: rotate(5deg); animation-delay: 2s, 1s; }
.s3 { top: 15%; right: 10%; transform: rotate(12deg); animation-delay: 4s, 2s; }
.s4 { top: 55%; right: 5%; transform: rotate(-8deg); animation-delay: 6s, 3s; }

@keyframes floating-snap {
    0%, 100% { transform: translateY(0) rotate(inherit); }
    50% { transform: translateY(-20px) rotate(inherit); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px var(--accent-glow); }
    50% { box-shadow: 0 0 40px var(--accent); }
}

@keyframes sweep {
    0% { left: -100%; }
    20% { left: 100%; }
    100% { left: 100%; }
}

@media (max-width: 1024px) {
    .hero-pulse-container { display: none; }
    .hero { min-height: auto; }
}

.hero-subtitle { font-size: 1.25rem; color: var(--text-secondary); max-width: 650px; margin: 0 auto 3rem; }
.badge { 
    display: inline-block; padding: 0.5rem 1rem; background: rgba(6, 182, 212, 0.1); 
    border: 1px solid var(--accent); border-radius: 99px; color: var(--accent); 
    font-size: 0.65rem; font-weight: 900; letter-spacing: 0.2em; margin-bottom: 2rem; 
}

.gatekeeper-box {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    padding: 2.5rem; border-radius: 2.5rem;
    max-width: 550px; margin: 0 auto;
    box-shadow: 0 30px 60px -12px rgba(0,0,0,0.6);
    transition: var(--transition);
}

.gatekeeper-box.error-shake {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
    border-color: var(--error);
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.2);
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* Custom Checkbox */
.checkbox-container { display: flex; gap: 1.25rem; text-align: left; margin-bottom: 2rem; }
.hidden-checkbox { display: none; }
.custom-checkbox {
    width: 28px; height: 28px; border: 2px solid var(--text-muted); border-radius: 8px;
    flex-shrink: 0; cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: var(--transition); background: var(--bg-dark);
}
.hidden-checkbox:checked + .custom-checkbox { background: var(--accent); border-color: var(--accent); }
.checkmark { width: 14px; height: 8px; border-left: 3px solid white; border-bottom: 3px solid white; transform: rotate(-45deg); opacity: 0; transition: var(--transition); margin-top: -3px; }
.hidden-checkbox:checked + .custom-checkbox .checkmark { opacity: 1; }

.agreement-text h3 { font-size: 0.9rem; color: white; margin-bottom: 0.25rem; }
.agreement-text p { font-size: 0.8rem; color: var(--text-muted); margin: 0; }
.agreement-text a { color: var(--accent); text-decoration: none; font-weight: 700; }

/* Enhanced CTA Button */
.btn-primary {
    position: relative;
    width: 100%; padding: 1.25rem; 
    background: linear-gradient(135deg, var(--accent) 0%, #0891b2 100%); 
    color: white;
    border: none; border-radius: 1rem; font-weight: 900; font-size: 1.1rem;
    cursor: pointer; letter-spacing: 0.05em; transition: var(--transition);
    box-shadow: 0 0 15px var(--accent-glow);
    overflow: hidden;
    will-change: transform, box-shadow;
}

.cta-heartbeat {
    animation: heartbeat 2s infinite ease-in-out, glow-wave 3s infinite alternate;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -100%;
    width: 200%;
    height: 200%;
    background: linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, 0.4) 50%, transparent 60%);
    transform: rotate(25deg);
    transition: none;
}

.btn-primary:hover { 
    transform: translateY(-4px) scale(1.02); 
    box-shadow: 0 20px 40px var(--accent-glow); 
    filter: brightness(1.2); 
}

.btn-primary:hover::after {
    animation: sweep 0.8s forwards;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    10% { transform: scale(1.04); }
}

@keyframes glow-wave {
    0% { box-shadow: 0 0 10px var(--accent-glow); }
    100% { box-shadow: 0 0 30px var(--accent); }
}

/* Global Connections Carousel */
.connections-carousel { padding: 6rem 0; background: transparent; }
.carousel-container { 
    position: relative; 
    max-width: 1000px; 
    margin: 0 auto; 
    overflow: hidden; 
    border-radius: 24px;
    border: 1px solid var(--border);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    background: var(--bg-surface);
}

.carousel-slider {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1);
}

.carousel-item {
    min-width: 100%;
    position: relative;
    height: 500px;
    overflow: hidden;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1s ease;
}

.carousel-item.active img { transform: scale(1.05); }

.glass-overlay {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    right: 2rem;
    padding: 1.5rem 2rem;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 16px;
    color: white;
}

.glass-overlay figcaption { display: flex; flex-direction: column; gap: 0.25rem; }
.glass-overlay figcaption strong { font-size: 1.25rem; color: var(--accent); }
.glass-overlay figcaption span { font-size: 0.95rem; color: var(--text-secondary); }

/* Carousel Navigation */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10;
}

.carousel-nav:hover { background: var(--accent); color: var(--bg-dark); box-shadow: 0 0 20px var(--accent-glow); border-color: var(--accent); }
.carousel-nav.prev { left: 1rem; }
.carousel-nav.next { right: 1rem; }

/* Pagination Dots */
.carousel-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dot.active {
    background: var(--accent);
    transform: scale(1.3);
    box-shadow: 0 0 10px var(--accent-glow);
}

@media (max-width: 768px) {
    .carousel-item { height: 350px; }
    .glass-overlay { bottom: 1rem; left: 1rem; right: 1rem; padding: 1rem; }
    .glass-overlay figcaption strong { font-size: 1rem; }
}

/* Section Reveals */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.reveal-active { opacity: 1; transform: translateY(0); }

/* Features Section */
section { padding: 8rem 0; }
.grid-6 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.feature-card { background: var(--bg-surface); padding: 3rem; border-radius: 2rem; border: 1px solid var(--border); transition: var(--transition); }
.feature-card:hover { transform: translateY(-10px); border-color: var(--accent); box-shadow: 0 20px 40px rgba(0,0,0,0.4); }
.f-icon { font-size: 2rem; color: var(--accent); font-weight: 900; margin-bottom: 1.5rem; }

/* Vision Section - Optimized Layout */
.vision-card {
    background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-dark) 100%);
    border-radius: 3rem; padding: 5rem; 
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 5rem; align-items: center; border: 1px solid var(--border);
    overflow: hidden;
}
.vision-content { position: relative; z-index: 2; }
.vision-mesh-container { 
    position: relative; 
    height: 400px;
    display: flex; justify-content: center; align-items: center;
    perspective: 1000px;
}
.mesh-visual {
    width: 100%; height: 100%;
    animation: mesh-float 10s infinite ease-in-out;
}
.connectivity-mesh { width: 100%; height: auto; }
.arc { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 400; stroke-dashoffset: 400; animation: draw-arc 6s infinite alternate; opacity: 0.6; }
.a1 { animation-delay: 0s; } .a2 { animation-delay: 2s; } .a3 { animation-delay: 4s; }
.node { fill: var(--accent); filter: drop-shadow(0 0 5px var(--accent)); }
.mesh-glow { position: absolute; width: 250px; height: 250px; background: var(--accent); filter: blur(100px); opacity: 0.15; z-index: -1; }

@keyframes mesh-float { 
    0%, 100% { transform: translateY(0) rotateX(0deg) rotateY(0deg); } 
    50% { transform: translateY(-20px) rotateX(5deg) rotateY(-5deg); } 
}
@keyframes draw-arc { to { stroke-dashoffset: 0; } }

/* Table Section */
.table-wrapper { background: var(--bg-surface); border-radius: 2rem; border: 1px solid var(--border); overflow: hidden; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 1.5rem 2rem; border-bottom: 1px solid var(--border); }
th { font-size: 0.75rem; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.1em; }
.active-col { background: rgba(6, 182, 212, 0.05); color: var(--accent); font-weight: 800; }

/* Safety Section - Optimized Shield */
.safety-grid { display: flex; align-items: center; gap: 5rem; }
.safety-image { flex: 1; display: flex; justify-content: center; }
.holographic-shield-container { 
    position: relative; width: 220px; 
    animation: shield-breath 4s infinite ease-in-out;
}
.holographic-shield { width: 100%; filter: drop-shadow(0 0 25px var(--accent-glow)); }
.scan-line { animation: scan 3s infinite ease-in-out; opacity: 0.8; }
.shield-aura { 
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); 
    width: 180px; height: 180px; border-radius: 50%; background: var(--accent); 
    filter: blur(80px); opacity: 0.1; z-index: -1; 
}

@keyframes shield-breath { 
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 20px var(--accent-glow)); } 
    50% { transform: scale(1.03); filter: drop-shadow(0 0 45px var(--accent)); } 
}
@keyframes scan { 
    0%, 100% { transform: translateY(-40px); } 
    50% { transform: translateY(140px); } 
}

.safety-text { flex: 1.5; }
.point { background: var(--bg-surface); padding: 1.5rem; border-radius: 1rem; margin-bottom: 1rem; border-left: 4px solid var(--accent); }

/* FAQ Section */
.faq-item { margin-bottom: 1rem; border-radius: 1.25rem; overflow: hidden; border: 1px solid var(--border); }
.faq-btn { 
    width: 100%; padding: 1.5rem 2rem; background: var(--bg-surface); border: none; 
    color: white; text-align: left; font-size: 1.1rem; font-weight: 700; cursor: pointer;
    display: flex; justify-content: space-between; align-items: center; transition: var(--transition);
}
.faq-btn::after { content: '+'; color: var(--accent); font-size: 1.5rem; }
.faq-item.active .faq-btn::after { content: '-'; }
.faq-panel { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; padding: 0 2rem; background: var(--bg-surface); }
.faq-item.active .faq-panel { max-height: 500px; padding-bottom: 2rem; }

/* Chat System - Smooth Load */
.chat-system { position: fixed; inset: 0; background: black; z-index: 5000; display: flex; flex-direction: column; }
.chat-header { background: var(--bg-dark); padding: 0.75rem 2rem; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); }
.chat-status { font-family: monospace; font-size: 0.75rem; color: var(--accent); font-weight: bold; }
.btn-exit { padding: 0.5rem 1.5rem; background: var(--bg-surface); border: 1px solid var(--border); border-radius: 0.5rem; color: white; cursor: pointer; font-weight: bold; }

.loading-overlay { 
    position: absolute; inset: 0; background: var(--bg-dark); 
    display: flex; align-items: center; justify-content: center; z-index: 10;
    transition: opacity 0.5s ease;
}
.loader-content { text-align: center; }
.spinner { 
    width: 60px; height: 60px; border: 4px solid rgba(6, 182, 212, 0.1); 
    border-top: 4px solid var(--accent); border-radius: 50%; 
    margin: 0 auto 1.5rem; animation: spin 1s linear infinite; 
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.loader-text { font-size: 1.25rem; font-weight: bold; margin-bottom: 0.5rem; }
.loader-sub { color: var(--text-muted); font-size: 0.85rem; }

.iframe-mount { flex: 1; transition: opacity 0.6s ease-in-out; background: black; }
.iframe-mount iframe { width: 100%; height: 100%; border: none; }

/* Footer */
.main-footer { padding: 6rem 0 3rem; background: var(--bg-alt); border-top: 1px solid var(--border); }
.footer-grid { display: flex; justify-content: space-between; gap: 4rem; margin-bottom: 4rem; flex-wrap: wrap; }
.nav-col { display: flex; flex-direction: column; gap: 1rem; }
.nav-col h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); }
.nav-col a { color: var(--text-secondary); text-decoration: none; font-size: 0.9rem; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 2rem; border-top: 1px solid var(--border); font-size: 0.75rem; color: var(--text-muted); }

/* Responsive */
@media (max-width: 1024px) { 
    h1 { font-size: 3.5rem; } 
    .vision-card { grid-template-columns: 1fr; padding: 3rem; gap: 3rem; text-align: center; } 
}
@media (max-width: 768px) {
    h1 { font-size: 2.75rem; }
    .safety-grid { flex-direction: column; gap: 3rem; text-align: center; }
    .footer-grid { flex-direction: column; gap: 2rem; }
    .footer-bottom { flex-direction: column; gap: 1.5rem; text-align: center; }
}
