/* SLoop Design System - World Class Polish */
:root {
    /* Brand Colors - Shifted from Void Black to "Expensive Midnight" */
    --clr-bg-main: #0B0E14; 
    --clr-bg-gradient-start: #0f172a;
    --clr-bg-gradient-end: #020617;
    
    /* Primary: Electric Violet */
    --clr-primary: #8b5cf6;
    --clr-primary-glow: #a78bfa;
    
    /* Accent: Signal Yellow */
    --clr-accent: #fbbf24;
    
    /* Glassmorphism */
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(15, 23, 42, 0.4);
    
    --ease-elastic: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--clr-bg-main);
    color: #f8fafc;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    
    /* Moving Grid Background */
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: panGrid 20s linear infinite;
}

@keyframes panGrid {
    0% { background-position: 0 0; }
    100% { background-position: 50px 50px; }
}

/* 3. Shine/Shimmer Effect for Buttons */
@keyframes shimmer {
    0% { background-position: 200% center; }
    100% { background-position: -200% center; }
}

/* 4. Flux Core Animation (Holographic Reactor) */
.flux-core-container {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
    z-index: 2;
}

.flux-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: var(--clr-primary);
    border-bottom-color: var(--clr-accent);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
    animation: rotateRing 8s linear infinite;
}

.ring-1 { width: 100%; height: 100%; border-width: 2px; animation-duration: 12s; }
.ring-2 { width: 80%; height: 80%; border-width: 3px; animation-duration: 8s; border-left-color: var(--clr-primary); border-right-color: transparent; animation-direction: reverse; }
.ring-3 { width: 60%; height: 60%; border-width: 1px; animation-duration: 5s; border-color: rgba(255, 255, 255, 0.3); border-top-color: var(--clr-accent); }

/* Glowing Core */
.core-sphere {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, #fff, var(--clr-accent));
    border-radius: 50%;
    box-shadow: 0 0 40px var(--clr-accent), 0 0 80px var(--clr-primary);
    animation: pulseCore 2s ease-in-out infinite alternate;
}

@keyframes rotateRing {
    0% { transform: rotateX(60deg) rotateY(0deg) rotateZ(0deg); }
    100% { transform: rotateX(60deg) rotateY(360deg) rotateZ(360deg); }
}

@keyframes pulseCore {
    0% { transform: scale(0.9); opacity: 0.8; }
    100% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 60px var(--clr-accent), 0 0 100px var(--clr-primary); }
}

/* 5. Sector Cards (Who Is It For?) */
.sector-card {
    position: relative;
    height: 250px;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    transition: 0.5s var(--ease-elastic);
    /* Gradient Backgrounds */
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0), rgba(15, 23, 42, 0.9));
}

.sector-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: 0.5s;
    z-index: -1;
    opacity: 0.5;
}

/* Specific Backgrounds (using gradients/patterns for now, replace with images if available) */
.sector-edu::before { background-image: radial-gradient(circle at top right, #3b82f6, transparent), linear-gradient(#0f172a, #0f172a); }
.sector-health::before { background-image: radial-gradient(circle at top right, #22c55e, transparent), linear-gradient(#0f172a, #0f172a); }
.sector-chain::before { background-image: radial-gradient(circle at top right, #f59e0b, transparent), linear-gradient(#0f172a, #0f172a); }
.sector-service::before { background-image: radial-gradient(circle at top right, #8b5cf6, transparent), linear-gradient(#0f172a, #0f172a); }

.sector-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.6);
}

.sector-card:hover::before {
    transform: scale(1.1);
    opacity: 0.8;
}

.sector-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
}

/* 6. Difference Cards (Why SLoop?) */
.diff-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    transition: 0.4s;
    position: relative;
    overflow: hidden;
}

.diff-card:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-5px);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.15);
    border-color: var(--clr-primary);
}

/* Glowing corner effect */
.diff-card::after {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 100px;
    height: 100px;
    background: var(--clr-primary);
    filter: blur(60px);
    opacity: 0;
    transition: 0.4s;
}

.diff-card:hover::after {
    opacity: 0.6;
}

/* --- HERO SPOTLIGHT & BEAMS --- */
.hero-glow-container {
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
    filter: blur(80px);
    border-radius: 50%;
}

.conic-beam {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: conic-gradient(from 0deg at 50% 50%, transparent 0deg, rgba(255, 255, 255, 0.03) 60deg, transparent 120deg);
    animation: rotateBeam 20s linear infinite;
    transform-origin: center;
    mask-image: radial-gradient(circle, transparent 20%, black 100%);
}

@keyframes rotateBeam {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* --- TYPOGRAPHY --- */
h1 {
    font-size: clamp(3.5rem, 8vw, 6rem);
    line-height: 1.1;
    letter-spacing: -0.04em;
    font-weight: 800;
    text-align: center;
    
    /* "Expensive" Text Gradient */
    background: linear-gradient(180deg, #FFFFFF 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 30px rgba(255,255,255,0.1));
}

.text-gradient-purple {
    background: linear-gradient(to right, #a78bfa, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-gold {
    background: linear-gradient(to right, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- UI COMPONENTS --- */

/* 1. Header (Fixed Fixed) */
.header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translate(-50%, -50px); /* Start hidden above */
    width: 90%;
    max-width: 900px;
    padding: 0.8rem 1.5rem;
    
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: transform 0.8s var(--ease-elastic), opacity 0.8s;
    opacity: 0;
    box-shadow: 0 20px 40px -20px rgba(0,0,0,0.5);
}

.header.active {
    transform: translate(-50%, 0);
    opacity: 1;
}

/* 2. Primary Button (Shiny) */
.btn {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 2.5rem;
    border-radius: 100px;
    font-weight: 600;
    text-decoration: none;
    transition: 0.3s;
    overflow: hidden;
}

.btn-primary {
    background: #0f172a;
    border: 1px solid rgba(139, 92, 246, 0.4);
    color: white;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.2), inset 0 0 20px rgba(139, 92, 246, 0.1);
}

/* Shine sweep animation */
.btn-primary::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: skewX(-20deg);
    transition: 0.5s;
}

.btn-primary:hover::after {
    left: 150%;
    transition: 0.7s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.5);
    border-color: #a78bfa;
}

/* 7. Testimonials */
.testimonial-card {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: 20px;
    position: relative;
}

.testimonial-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.testimonial-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--clr-primary);
    display: grid;
    place-items: center;
    font-weight: 700;
    color: white;
}

.stars { color: #fbbf24; font-size: 0.9rem; }

/* 8. FAQ Accordion */
.faq-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: 0.3s;
}

.faq-item:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.faq-summary {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    list-style: none; /* Hide default arrow */
    color: #e2e8f0;
}

.faq-summary::-webkit-details-marker { display: none; }

.faq-summary::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--clr-primary);
    transition: 0.3s;
}

details[open] .faq-summary::after {
    transform: rotate(45deg);
}

.faq-content {
    padding: 0 1.5rem 1.5rem 1.5rem;
    color: #94a3b8;
    line-height: 1.6;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* 9. Footer */
.footer {
    border-top: 1px solid var(--glass-border);
    background: #020617;
    padding: 4rem 0 2rem 0;
    font-size: 0.9rem;
    color: #64748b;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer h4 { color: white; margin-bottom: 1rem; }
.footer ul { list-style: none; }
.footer li { margin-bottom: 0.5rem; }
.footer a { color: #94a3b8; text-decoration: none; transition: 0.2s; }
.footer a:hover { color: var(--clr-primary); }

@media (max-width: 768px) {
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; text-align: center; }
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: 0.3s var(--ease-elastic);
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 15px 30px rgba(37, 211, 102, 0.6);
}

.whatsapp-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    background: #25d366;
    border-radius: 50%;
    z-index: -1;
    opacity: 0.6;
    animation: pulseHelp 2s infinite;
}

@keyframes pulseHelp {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.6); opacity: 0; }
}

/* 3. Cards with 3D Tilt */
.card-container {
    perspective: 1000px;
}

.card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.4) 0%, rgba(15, 23, 42, 0.6) 100%);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 24px;
    transition: all 0.4s ease;
    height: 100%;
}

.card:hover {
    transform: translateY(-10px);
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.8) 100%);
    border-color: rgba(255,255,255,0.15);
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.4);
}

/* --- UTILITIES & LAYOUTS --- */
.section {
    padding: 6rem 0;
}

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

.text-accent {
    color: var(--clr-accent);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

/* Solution Flow Steps */
.flow-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 4rem;
}

.flow-card {
    position: relative;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: 0.3s;
}

.flow-card:hover {
    transform: translateY(-5px);
    border-color: var(--clr-primary);
    background: rgba(15, 23, 42, 0.8);
}

.flow-number {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: var(--clr-primary);
    color: white;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 700;
    box-shadow: 0 5px 15px rgba(139, 92, 246, 0.4);
}

/* --- SECTIONS --- */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-top: 120px;
    position: relative;
}

/* Dashboard Mockup Container */
.dashboard-preview {
    margin-top: 4rem;
    width: 100%;
    max-width: 1000px;
    height: 500px;
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 
        0 0 0 1px rgba(255,255,255,0.05),
        0 50px 100px -20px rgba(0,0,0,0.7),
        0 0 60px rgba(139, 92, 246, 0.1); /* Subtle purple backlit */
    
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
    
    /* 3D Transform Start */
    transform: perspective(2000px) rotateX(10deg) scale(0.9);
    opacity: 0;
    transition: 1s var(--ease-elastic);
}

.dashboard-preview.active {
    transform: perspective(2000px) rotateX(0deg) scale(1);
    opacity: 1;
}

/* Animations */
.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s var(--ease-elastic);
}

.fade-up.active {
    opacity: 1;
    transform: translateY(0);
}

.float {
    animation: floating 4s ease-in-out infinite;
}

@keyframes floating {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

/* Stats Badges */
.stat-badge {
    position: absolute;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 1rem;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    display: flex;
    gap: 1rem;
    align-items: center;
    z-index: 10;
}

/* --- HERO SPOTLIGHT & BEAMS --- */
.hero-glow-container {
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%; /* Changed from 100vw to prevent scrollbar */
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

/* ... existing glow css ... */

/* Responsive & Mobile Fixes */
@media (max-width: 968px) {
    .hero { grid-template-columns: 1fr; text-align: center; padding-top: 150px; }
    .hero-media { order: -1; }
    .flow-steps { grid-template-columns: repeat(2, 1fr); } /* 2 cols on tablet */
    .grid-2 { grid-template-columns: 1fr; }
    h1 { font-size: 3rem; }
}

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    
    /* Dashboard Mobile Fix */
    .dashboard-preview { 
        height: 350px; 
        width: 100%;
        transform: none !important; /* Disable 3D tilt on mobile for clarity */
        margin-top: 2rem;
    }
    
    /* Flux Core Scale Down */
    .flux-core-container {
        transform: scale(0.7);
    }
    
    .stat-badge {
        transform: scale(0.8);
        padding: 0.5rem;
    }
    
    /* Stack Flow Steps */
    .flow-steps { grid-template-columns: 1fr; }
    
    /* Logo Styles & Animation */
.logo-svg {
    height: 40px;
    width: auto;
    overflow: visible;
}

/* Logo Styles & Animation */
.logo-svg {
    height: 40px;
    width: 116px; /* Explicit width based on aspect ratio (789/273) to prevent 0px collapse */
    display: block; /* Ensure it behaves as a block for sizing */
    overflow: visible;
}

.logo-path {
    fill: #fbbf24;
    fill-opacity: 0;
    stroke: #fbbf24;
    stroke-width: 20; 
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 20000;
    stroke-dashoffset: 20000;
    animation: logoDraw 3s ease-out forwards, logoFadeIn 1s ease 2.5s forwards;
}

@keyframes logoDraw {
    to { stroke-dashoffset: 0; }
}

@keyframes logoFadeIn {
    to { fill-opacity: 1; stroke-opacity: 0; }
}

.logo-svg:hover .logo-path {
    filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.8));
}

/* Header padding safety */
    .header {
        width: 95%;
        padding: 0.8rem 1rem;
    }
}

/* V2 Holographic Orbit System */
.orbit-system {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 600px; /* Reduced Orbit Diameter to be closer to core */
    height: 600px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 5;
    animation: orbitRotate 60s linear infinite; /* Slow rotation of the entire system */
}

/* Individual Orbit Nodes (Satellites) */
.orbit-node {
    position: absolute;
    top: 50%;
    left: 50%;
    /* Calculate position on circle based on angle */
    transform: rotate(var(--angle)) translate(var(--distance)) rotate(calc(-1 * var(--angle))); /* Counter-rotate to keep icon upright */
}

/* Glass Chip Design */
.glass-chip {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03); /* Very subtle glass */
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 8px 32px 0 rgba(0, 0, 0, 0.5),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05),
        0 0 20px var(--glow); /* Brand color glow */
    display: flex;
    justify-content: center;
    align-items: center;
    animation: nodeFloat 4s ease-in-out infinite;
    animation-delay: var(--delay);
}

.glass-chip svg path {
    fill: var(--glow); /* Icon takes the brand color */
    filter: drop-shadow(0 0 5px var(--glow)); /* Neon effect on icon */
}

/* Laser Line Connection */
.laser-line {
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--distance); /* Connects to center */
    height: 2px;
    background: linear-gradient(90deg, var(--glow), transparent);
    transform-origin: left center;
    transform: translate(-100%, -50%) rotate(var(--angle)); /* Point towards center */
    opacity: 0.3;
    z-index: -1;
    /* Mask/Clip to create dashed laser effect */
    mask-image: linear-gradient(to right, black 50%, transparent 50%);
    mask-size: 20px 100%;
    animation: laserFlow 1s linear infinite;
}

/* Animations */
@keyframes orbitRotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes nodeFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.05); }
}

@keyframes laserFlow {
    from { mask-position: 0 0; }
    to { mask-position: -40px 0; }
}

/* Mobile Fix for Orbits */
@media (max-width: 768px) {
    .orbit-system {
        width: 300px;
        height: 300px;
    }
    .orbit-node {
        --distance: 100px !important; /* Tighter orbit on mobile */
    }
    .glass-chip {
        width: 40px;
        height: 40px;
    }
}
