@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-dark: #f8fafc; /* Professional Light background matching login/dashboard */
    --bg-card: #ffffff; /* Clean white card layout */
    --border-glass: #e2e8f0; /* Soft light-gray borders */
    --text-white: #0f172a; /* Dark slate headings */
    --text-gray: #475569; /* Slate-gray body text */
    --text-muted: #64748b; /* Muted text */
    --primary: #4f46e5; /* Professional Indigo */
    --primary-hover: #4338ca;
    --primary-glow: rgba(79, 70, 229, 0.08);
    
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.08);
    --warning: #f59e0b;
    --warning-glow: rgba(245, 158, 11, 0.08);
    
    --font-inter: 'Inter', sans-serif;
}

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

html, body.home-body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
}

body.home-body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    font-family: var(--font-inter);
    min-height: 100vh;
    position: relative;
}

/* Background glowing orbs - Highly subtle and professional */
.orb {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(160px);
    z-index: -1;
    opacity: 0.03; /* Extremely subtle in light mode */
    pointer-events: none;
}
.orb-1 {
    top: -250px;
    left: -200px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
}
.orb-2 {
    bottom: -150px;
    right: -100px;
    background: radial-gradient(circle, #4f46e5 0%, transparent 70%);
}
.orb-3 {
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, #4f46e5 0%, transparent 70%);
    width: 400px;
    height: 400px;
    opacity: 0.02;
}

/* Navbar */
header.home-header {
    width: 100%;
    padding: 1rem 2rem;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    background: rgba(248, 250, 252, 0.85); /* Semi-transparent light background */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-glass);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-white);
    text-decoration: none;
    letter-spacing: -0.025em;
}

.logo i {
    color: var(--primary);
}

.nav-links {
    display: none;
    align-items: center;
    gap: 2rem;
}

@media (min-width: 768px) {
    .nav-links { display: flex; }
}

.nav-links a {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text-white);
}

.nav-ctas {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

@media (max-width: 480px) {
    #btn-nav-register { display: none; }
    .nav-ctas { gap: 0.5rem; }
    .logo { font-size: 1.1rem; }
}

.btn-home {
    padding: 0.5rem 1.1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
}

.btn-home-outline {
    background: transparent;
    border: 1px solid #cbd5e1;
    color: #334155;
}

.btn-home-outline:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.btn-home-primary {
    background: var(--primary);
    color: #ffffff; /* Explicit white color for primary buttons in light mode */
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-home-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.25);
}

/* Sections Base */
section.home-section {
    padding: 7rem 1.5rem 3.5rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

/* Hero Section */
.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 992px) {
    .hero-grid {
        grid-template-columns: 1.15fr 0.85fr;
    }
}

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

@media (min-width: 992px) {
    .hero-content {
        text-align: left;
    }
}

.badge-featured {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(79, 70, 229, 0.06);
    border: 1px solid rgba(79, 70, 229, 0.15);
    color: var(--primary);
    padding: 0.4rem 0.9rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    max-width: 100%;
    white-space: normal;
    text-align: left;
    word-break: break-word;
}

.badge-featured i {
    color: #f59e0b;
}

.hero-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, #818cf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn-hero {
    padding: 0.8rem 2rem;
    font-size: 1rem;
}

.glowing-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

.hero-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.25rem;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #0f172a 60%, #475569 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

@media (min-width: 576px) {
    .hero-content h1 { font-size: 3.25rem; }
}

.hero-content p {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-gray);
    margin-bottom: 2.25rem;
    max-width: 580px;
}

@media (max-width: 991px) {
    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }
}

.hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

@media (min-width: 992px) {
    .hero-ctas {
        justify-content: flex-start;
    }
}

/* Glass Card Showcase */
.hero-visual {
    position: relative;
    width: 100%;
}

.glass-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 1.25rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 0.5rem;
}

.panel-title {
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-white);
}

.panel-title i {
    color: var(--primary);
}

.pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    position: relative;
}

.pulse-dot::after {
    content: '';
    position: absolute;
    top: -3px; left: -3px; right: -3px; bottom: -3px;
    border-radius: 50%;
    border: 1.5px solid var(--success);
    animation: pulse-ring 2s infinite;
}

/* Map Grid Animation */
.map-canvas {
    height: 260px;
    background: #ffffff; /* Clean white canvas background */
    border-radius: 8px;
    border: 1px solid var(--border-glass);
    position: relative;
    overflow: hidden;
}

/* Landmarked points */
.map-node {
    position: absolute;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ffffff; /* Light node background */
    border: 1px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
    font-size: 0.8rem;
    z-index: 10;
    transition: all 0.3s;
}

.map-node.active {
    background: var(--primary);
    border-color: #818cf8;
    color: #ffffff; /* White text for active node */
    box-shadow: 0 0 12px rgba(79, 70, 229, 0.3);
}

.map-node.completed {
    background: var(--success);
    border-color: #6ee7b7;
    color: #ffffff; /* White text for completed node */
}

.node-warehouse { top: 75%; left: 10%; }
.node-transit { top: 25%; left: 40%; }
.node-delivery { top: 65%; left: 65%; }
.node-destination { top: 20%; left: 85%; }

.node-label {
    position: absolute;
    bottom: -1.5rem;
    font-size: 0.6rem;
    font-weight: 600;
    white-space: nowrap;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.active .node-label { color: var(--primary); }
.completed .node-label { color: var(--success); }

/* Connecting Grid Lines */
.map-line {
    position: absolute;
    background: rgba(0, 0, 0, 0.04);
    z-index: 1;
}

/* Specific connector SVG path overlay for animation */
.svg-connectors {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 2;
    pointer-events: none;
}

.connector-path {
    fill: none;
    stroke: rgba(0, 0, 0, 0.06); /* Subtle light stroke */
    stroke-width: 2;
    stroke-linecap: round;
    stroke-dasharray: 4 3;
}

.connector-fill {
    fill: none;
    stroke: var(--primary);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    transition: stroke-dashoffset 1s ease-out;
}

/* Courier Car Indicator */
.courier-vehicle {
    position: absolute;
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    z-index: 20;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.25);
    pointer-events: none;
    transition: all 1s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform: translate(-50%, -50%);
}

.courier-vehicle.delivered {
    background: var(--success);
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.25);
}

/* Simulation Controls Panel */
.simulator-panel {
    margin-top: 1rem;
    background: #f8fafc; /* Professional light panel bg */
    border-radius: 8px;
    padding: 0.75rem;
    border: 1px solid var(--border-glass);
}

.sim-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-gray);
}

.sim-status {
    font-weight: 600;
    color: var(--text-white);
}

.sim-btn-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.btn-sim {
    padding: 0.45rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.15s;
    text-align: center;
}

.btn-sim-primary {
    background: var(--primary);
    color: white;
}
.btn-sim-primary:hover { background: var(--primary-hover); }

.btn-sim-secondary {
    background: #ffffff;
    color: #334155;
    border: 1px solid #cbd5e1;
}
.btn-sim-secondary:hover { background: #f1f5f9; }

/* Simulated proof popup */
.proof-popup {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 120px;
    background: #ffffff; /* Clean white popup background */
    border: 1px solid var(--success);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.1);
    border-radius: 6px;
    padding: 0.4rem;
    z-index: 50;
    animation: popUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

@keyframes popUp {
    from { transform: scale(0.8) translateY(10px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.proof-img {
    width: 100%;
    height: 60px;
    border-radius: 3px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #cbd5e1;
    object-fit: cover;
    margin-bottom: 0.25rem;
}

.proof-text {
    font-size: 0.5rem;
    font-weight: 700;
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 0.2rem;
    text-transform: uppercase;
}

/* Features Grid Section */
.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-top: 2.5rem;
}

@media (min-width: 576px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 992px) {
    .features-grid { grid-template-columns: repeat(3, 1fr); }
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 1.75rem;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-2px);
    border-color: rgba(79, 70, 229, 0.25);
    background: #ffffff; /* Clean white background on hover */
    box-shadow: 0 12px 20px -8px rgba(79, 70, 229, 0.1);
}

.feat-icon {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    background: rgba(79, 70, 229, 0.06);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(79, 70, 229, 0.15);
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 650;
    margin-bottom: 0.5rem;
    color: var(--text-white);
    letter-spacing: -0.01em;
}

.feature-card p {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-gray);
}

/* Interactive Persona Switcher (RBX Section) */
.rbx-section {
    padding: 5rem 1.5rem 3.5rem;
    background: linear-gradient(180deg, transparent 0%, rgba(241, 245, 249, 0.5) 50%, transparent 100%);
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-header p {
    font-size: 0.95rem;
    color: var(--text-gray);
    max-width: 550px;
    margin: 0 auto;
}

.rbx-switcher-container {
    max-width: 900px;
    margin: 0 auto;
}

.rbx-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: #f1f5f9; /* Clean light slate background */
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.25rem;
    margin-bottom: 1.5rem;
    gap: 0.25rem;
}

.rbx-btn {
    padding: 0.65rem 0.5rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    border: none;
    background: transparent;
    color: var(--text-gray);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

@media (max-width: 480px) {
    .rbx-buttons { grid-template-columns: 1fr; }
}

.rbx-btn.active {
    background: var(--primary);
    color: #ffffff; /* White text for active tab button */
}

.rbx-display-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 2rem;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    transition: opacity 0.2s, transform 0.2s;
}

.rbx-display-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
}

@media (min-width: 768px) {
    .rbx-display-grid {
        grid-template-columns: 1.25fr 0.75fr;
    }
}

.rbx-info h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: -0.015em;
}

.rbx-info p {
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--text-gray);
    margin-bottom: 1.25rem;
}

.rbx-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.rbx-tag {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
}

.rbx-preview {
    background: #0f172a; /* Keep terminal slate black for excellent contrast */
    border: 1px solid #1e293b;
    border-radius: 8px;
    padding: 1rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-family: monospace;
    font-size: 0.7rem;
    color: #a5b4fc;
    overflow: hidden;
}

.preview-header {
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 0.4rem;
    color: #64748b;
    display: flex;
    justify-content: space-between;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.toast {
    background: #ffffff; /* Clean white toast in light mode */
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.82rem;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
    animation: slideInToast 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1);
    min-width: 260px;
    max-width: 340px;
}

@keyframes slideInToast {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0);   opacity: 1; }
}

footer.home-footer {
    padding: 2.5rem 1.5rem;
    border-top: 1px solid var(--border-glass);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    position: relative;
    z-index: 5;
}

/* Animations */
@keyframes pulse-ring {
    0% { transform: scale(0.33); opacity: 1; }
    80%, 100% { transform: scale(1.6); opacity: 0; }
}

/* Mobile Responsiveness Overrides for Navbar and Content */
@media (max-width: 768px) {
    .orb {
        display: none !important; /* Hide massive glowing orbs on mobile to prevent overflow */
    }
    section.home-section {
        padding: 5.5rem 1rem 2.5rem; /* Reduce padding on mobile */
    }
    .hero-content h1 {
        font-size: 2.2rem; /* Scale down hero title */
    }
    .hero-content p {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 640px) {
    header.home-header {
        padding: 0.75rem 1rem;
    }
    .nav-ctas {
        gap: 0.4rem;
    }
    .btn-home {
        padding: 0.4rem 0.75rem;
        font-size: 0.75rem;
        border-radius: 4px;
    }
    .logo {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.8rem; /* Scale down further on very small screens */
    }
    .badge-featured {
        font-size: 0.72rem;
        padding: 0.35rem 0.75rem;
        text-align: center;
    }
    .hero-ctas {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }
    .hero-ctas .btn-home {
        width: 100%;
        text-align: center;
    }
    .btn-hero {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 400px) {
    #btn-nav-register {
        display: none !important;
    }
}
