/* ==========================================================================
   Rivinsure Limited - Premium CSS Framework
   ========================================================================== */

   :root {
    /* Color Palette - Deep Dark Theme with Neon Accents */
    --bg-main: #060608;
    --bg-secondary: #0d0d12;
    --bg-card: rgba(20, 20, 28, 0.6);
    --border-color: rgba(255, 255, 255, 0.08);
    
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #6b6b7a;
    
    --accent-1: #6366f1; /* Indigo */
    --accent-2: #ec4899; /* Pink */
    --accent-3: #8b5cf6; /* Violet */
    --accent-glow: rgba(99, 102, 241, 0.4);
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Transitions & Shadows */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --shadow-glow: 0 0 20px var(--accent-glow);
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: var(--bg-secondary);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--border-color);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

ul {
    list-style: none;
}

/* Utility Classes */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-padding {
    padding: 6rem 0;
}

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

/* ==========================================================================
   UI Components
   ========================================================================== */

/* Glassmorphism Card */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
    border-color: rgba(99, 102, 241, 0.3);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-3));
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(5px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: all var(--transition-normal);
}

.navbar.scrolled {
    background: rgba(6, 6, 8, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    border-radius: 8px;
    display: inline-block;
    position: relative;
}
.logo-icon::after {
    content: '';
    position: absolute;
    inset: 4px;
    background: var(--bg-main);
    border-radius: 4px;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-1);
    transition: width var(--transition-normal);
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    transition: all var(--transition-fast);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    overflow: hidden;
}

.hero-bg-gradient {
    position: absolute;
    top: -20%;
    left: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(6, 6, 8, 0) 70%);
    filter: blur(60px);
    z-index: -1;
}

.hero-bg-gradient::after {
    content: '';
    position: absolute;
    bottom: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.1) 0%, rgba(6, 6, 8, 0) 70%);
    filter: blur(60px);
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 50px;
    color: var(--accent-1);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.hero-title {
    font-size: 4rem;
    letter-spacing: -1px;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

/* Hero Visuals - Abstract Mockups */
.hero-visual {
    position: relative;
    height: 500px;
}

.mock-app-1 {
    position: absolute;
    top: 50%;
    left: 40%;
    transform: translate(-50%, -50%);
    width: 320px;
    height: 400px;
    z-index: 2;
    background: linear-gradient(145deg, rgba(30, 30, 40, 0.8), rgba(20, 20, 28, 0.9));
}

.mock-app-2 {
    position: absolute;
    top: 60%;
    left: 70%;
    transform: translate(-50%, -50%);
    width: 250px;
    height: 280px;
    z-index: 1;
    background: linear-gradient(145deg, rgba(40, 30, 50, 0.6), rgba(20, 20, 28, 0.8));
    animation: float 6s ease-in-out infinite;
}

.mock-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.dots {
    display: flex;
    gap: 6px;
}
.dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
}
.dots span:nth-child(1) { background: #ff5f56; }
.dots span:nth-child(2) { background: #ffbd2e; }
.dots span:nth-child(3) { background: #27c93f; }

.mock-line {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    margin-bottom: 1rem;
}
.w-80 { width: 80%; }
.w-60 { width: 60%; }
.w-40 { width: 40%; }
.w-full { width: 100%; }

.mock-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--border-color);
    margin-bottom: 1.5rem;
}

.mock-chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 120px;
    margin-top: 2rem;
}

.bar {
    flex: 1;
    background: linear-gradient(to top, var(--accent-1), var(--accent-3));
    border-radius: 4px 4px 0 0;
    opacity: 0.8;
}
.h-30 { height: 30%; }
.h-60 { height: 60%; }
.h-40 { height: 40%; }
.h-80 { height: 80%; background: linear-gradient(to top, var(--accent-2), var(--accent-1)); opacity: 1; }
.h-50 { height: 50%; }

@keyframes float {
    0% { transform: translate(-50%, -50%) translateY(0px); }
    50% { transform: translate(-50%, -50%) translateY(-20px); }
    100% { transform: translate(-50%, -50%) translateY(0px); }
}

/* ==========================================================================
   Services Section
   ========================================================================== */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-desc {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

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

.service-card {
    text-align: left;
    padding: 2.5rem;
}

.service-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    position: relative;
}

.service-icon::before {
    content: '';
    position: absolute;
    inset: 12px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: invert(50%) sepia(90%) saturate(3000%) hue-rotate(220deg);
}

.icon-enterprise::before { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="2" y="3" width="20" height="14" rx="2"/><line x1="8" y1="21" x2="16" y2="21"/><line x1="12" y1="17" x2="12" y2="21"/></svg>'); }
.icon-ai::before { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 2a10 10 0 1 0 10 10H12V2z"/><path d="M12 12 2.1 7.1"/><path d="M12 12l9.9 4.9"/></svg>'); }
.icon-saas::before { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z"/></svg>'); }


/* ==========================================================================
   Products specific layout
   ========================================================================== */
.page-header {
    padding: 120px 0 60px;
    text-align: center;
    background: radial-gradient(ellipse at top, rgba(99, 102, 241, 0.1) 0%, var(--bg-main) 70%);
}

.product-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 6rem;
}

.product-item:nth-child(even) {
    direction: rtl;
}

.product-item:nth-child(even) .product-content {
    direction: ltr;
}

.product-image {
    width: 100%;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.product-item:hover .product-image img {
    transform: scale(1.05);
}

.product-extended {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease, margin 0.4s ease;
}

.product-item.expanded .product-extended {
    max-height: 2500px; /* Large enough to hold content */
    opacity: 1;
    margin-top: 1.5rem;
}

.expand-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-1);
    font-weight: 600;
    cursor: pointer;
    margin-top: 1rem;
    padding: 0.5rem 0;
    transition: color var(--transition-fast);
    user-select: none;
    font-size: 0.95rem;
}

.expand-toggle:hover {
    color: var(--accent-2);
}

.expand-toggle svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.product-item.expanded .expand-toggle svg {
    transform: rotate(180deg);
}

.product-item {
    cursor: pointer; /* Suggests the whole area is clickable */
}


.tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.tag {
    font-size: 0.8rem;
    padding: 0.2rem 0.8rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-secondary);
}

/* ==========================================================================
   Document Styles (Terms & Privacy)
   ========================================================================== */
.document-content {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.document-content h2 {
    margin-top: 2rem;
    color: var(--accent-1);
}

.document-content p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

/* ==========================================================================
   CTA Section
   ========================================================================== */
.cta-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(30, 30, 40, 0.8), rgba(20, 20, 28, 0.9));
    border-color: rgba(99, 102, 241, 0.3);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
    background: rgba(6, 6, 8, 0.9);
}

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

.footer-brand p {
    color: var(--text-secondary);
    margin-top: 1rem;
    max-width: 300px;
}

.footer-links h4 {
    color: white;
    margin-bottom: 1.5rem;
}

.footer-links ul li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--text-secondary);
}

.footer-links a:hover {
    color: var(--accent-1);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-subtitle {
        margin: 0 auto 2.5rem;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-visual {
        margin-top: 2rem;
    }
    
    .mock-app-1 {
        left: 50%;
    }
    .mock-app-2 {
        left: 65%;
    }

    .product-item {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .product-item:nth-child(even) {
        direction: ltr;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--bg-main);
        flex-direction: column;
        align-items: center;
        padding-top: 2rem;
        transition: left var(--transition-normal);
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .cta-box {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* Custom Cursor Glow */
.glow-pointer {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(99,102,241,0.1) 0%, rgba(0,0,0,0) 70%);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s;
    opacity: 0;
}
