﻿/* ========================================
   RiskBow Website — Custom Styles
   ======================================== */

/* ── Base & Reset ── */
*, *::before, *::after {
    box-sizing: border-box;
}

::selection {
    background: rgba(37, 99, 235, 0.3);
    color: white;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}


/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #020617;
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #334155;
}


/* ── Typography ── */
.text-gradient {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 50%, #818cf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-accent {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


/* ── Buttons ── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    padding: 0.625rem 1.5rem;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25), inset 0 1px 0 rgba(255,255,255,0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35), inset 0 1px 0 rgba(255,255,255,0.15);
    transform: translateY(-1px);
}
.btn-primary:active {
    transform: translateY(0);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    padding: 0.625rem 1.5rem;
    border-radius: 0.75rem;
    color: #cbd5e1;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    border: 1px solid rgba(51, 65, 85, 0.5);
    background: rgba(15, 23, 42, 0.5);
}
.btn-ghost:hover {
    color: white;
    border-color: rgba(100, 116, 139, 0.5);
    background: rgba(30, 41, 59, 0.5);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    padding: 0.625rem 1.5rem;
    border-radius: 0.75rem;
    color: #e2e8f0;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    border: 1px solid rgba(51, 65, 85, 0.7);
    background: transparent;
}
.btn-outline:hover {
    color: white;
    border-color: #3b82f6;
    background: rgba(37, 99, 235, 0.05);
}

.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1rem;
    border-radius: 0.875rem;
}


/* ── Navbar ── */
#navbar {
    background: rgba(2, 6, 23, 0.7);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid transparent;
}
#navbar.scrolled {
    background: rgba(2, 6, 23, 0.9);
    border-bottom-color: rgba(30, 41, 59, 0.5);
}

.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.875rem;
    border-radius: 0.5rem;
    color: #94a3b8;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s ease;
    cursor: pointer;
    background: none;
    border: none;
}
.nav-link:hover {
    color: white;
    background: rgba(30, 41, 59, 0.5);
}
.nav-link[aria-current="page"] {
    color: white;
    background: rgba(30, 41, 59, 0.5);
}

/* Dropdown */
.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    width: 480px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(30, 41, 59, 0.7);
    border-radius: 1rem;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 50;
}
.group:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.625rem;
    transition: all 0.15s ease;
}
.dropdown-item:hover {
    background: rgba(30, 41, 59, 0.5);
}

.dropdown-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.625rem;
    flex-shrink: 0;
}


/* ── Hero ── */
.hero-grid {
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.15) 1px, transparent 1px);
    background-size: 60px 60px;
}

.stat-card {
    padding: 0.75rem;
    border-radius: 0.75rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(30, 41, 59, 0.5);
}


/* ── Feature Cards ── */
.feature-card {
    position: relative;
    padding: 1.75rem;
    border-radius: 1.25rem;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(30, 41, 59, 0.5);
    transition: all 0.3s ease;
    overflow: hidden;
}
.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.feature-card:hover {
    border-color: rgba(59, 130, 246, 0.2);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}
.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 0.875rem;
    margin-bottom: 1.25rem;
    transition: all 0.3s ease;
}


/* ── Algorithm Steps ── */
.algorithm-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(30, 41, 59, 0.5);
    transition: all 0.3s ease;
}
.algorithm-step:hover {
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(15, 23, 42, 0.6);
}

.algorithm-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.625rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.15) 0%, rgba(37, 99, 235, 0.05) 100%);
    color: #60a5fa;
    font-weight: 700;
    font-size: 0.75rem;
    flex-shrink: 0;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.algorithm-formula {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: rgba(96, 165, 250, 0.5);
    background: rgba(37, 99, 235, 0.05);
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    white-space: nowrap;
    align-self: center;
    flex-shrink: 0;
}


/* ── Module Cards ── */
.module-card {
    padding: 1.75rem;
    border-radius: 1.25rem;
    background: rgba(15, 23, 42, 0.3);
    border: 1px solid rgba(30, 41, 59, 0.5);
    transition: all 0.3s ease;
}
.module-card:hover {
    border-color: rgba(59, 130, 246, 0.2);
    background: rgba(15, 23, 42, 0.5);
    transform: translateY(-2px);
}

.module-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
    margin-bottom: 1.25rem;
}

.module-tag {
    display: inline-flex;
    padding: 0.25rem 0.625rem;
    border-radius: 0.375rem;
    background: rgba(30, 41, 59, 0.5);
    color: #94a3b8;
    font-size: 0.6875rem;
    font-weight: 500;
}


/* ── Step Cards ── */
.step-card {
    position: relative;
    padding: 2rem;
    border-radius: 1.25rem;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(30, 41, 59, 0.5);
    height: 100%;
}

.step-number {
    position: absolute;
    top: -0.75rem;
    left: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.625rem;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    font-weight: 800;
    font-size: 0.75rem;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.step-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
    background: rgba(37, 99, 235, 0.08);
    color: #60a5fa;
    margin-bottom: 1.25rem;
    margin-top: 0.5rem;
}


/* ── Tech Items ── */
.tech-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem;
    border-radius: 0.875rem;
    background: rgba(15, 23, 42, 0.3);
    border: 1px solid rgba(30, 41, 59, 0.3);
    transition: all 0.2s ease;
}
.tech-item:hover {
    border-color: rgba(51, 65, 85, 0.5);
    background: rgba(15, 23, 42, 0.5);
}

.tech-icon {
    font-size: 1.25rem;
    width: 2rem;
    text-align: center;
    flex-shrink: 0;
}


/* ── Pricing ── */
.pricing-card {
    position: relative;
    border-radius: 1.5rem;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(30, 41, 59, 0.5);
    transition: all 0.3s ease;
    overflow: visible;
}
.pricing-card:hover {
    border-color: rgba(51, 65, 85, 0.7);
    transform: translateY(-4px);
}

.pricing-featured {
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(15, 23, 42, 0.6);
    box-shadow: 0 0 60px rgba(37, 99, 235, 0.08);
}
.pricing-featured:hover {
    border-color: rgba(59, 130, 246, 0.5);
}

.pricing-feature {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.875rem;
    color: #cbd5e1;
}


/* ── Screenshot Tabs ── */
.screenshot-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748b;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.screenshot-tab:hover {
    color: #94a3b8;
    background: rgba(30, 41, 59, 0.3);
}

.screenshot-tab.active {
    color: #60a5fa;
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.2);
}

/* ── Screenshot Panels ── */
.screenshot-panel {
    display: none;
    animation: screenshot-fade 0.35s ease;
}

.screenshot-panel.active {
    display: block;
}

@keyframes screenshot-fade {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Sidebar Items ── */
.sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.6875rem;
    color: #64748b;
    cursor: default;
    transition: all 0.15s ease;
}

.sidebar-item.active {
    color: #60a5fa;
    background: rgba(37, 99, 235, 0.08);
}


/* ── Animations ── */
@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.animate-fade-in {
    animation: fade-in 0.6s ease forwards;
}

.animate-fade-in-up {
    animation: fade-in-up 0.7s ease forwards;
    opacity: 0;
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

.animation-delay-200 { animation-delay: 0.2s; }
.animation-delay-300 { animation-delay: 0.3s; }
.animation-delay-400 { animation-delay: 0.4s; }
.animation-delay-600 { animation-delay: 0.6s; }
.animation-delay-1000 { animation-delay: 1s; }


/* ── Scroll Reveal ── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}


/* ── Responsive ── */

/* iOS / Android touch fixes */
html {
    -webkit-text-size-adjust: 100%;
}

a, button {
    -webkit-tap-highlight-color: transparent;
}

/* Hide scrollbar for horizontal scroll areas */
.scrollbar-none {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.scrollbar-none::-webkit-scrollbar {
    display: none;
}

/* Safe area padding for notched devices (iPhone X+, Dynamic Island) */
#navbar {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

footer {
    padding-bottom: env(safe-area-inset-bottom);
}

/* Restrict hover transforms to real hover devices (no "stuck" states on mobile) */
@media (hover: hover) and (pointer: fine) {
    .feature-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    }
    .module-card:hover {
        transform: translateY(-2px);
    }
    .pricing-card:hover {
        transform: translateY(-4px);
    }
    .btn-primary:hover {
        transform: translateY(-1px);
    }
}

/* Remove transforms for touch-only devices */
@media (hover: none) {
    .feature-card:hover,
    .module-card:hover,
    .pricing-card:hover,
    .btn-primary:hover {
        transform: none;
    }
}

/* Reduce heavy blur effects on mobile for performance */
@media (max-width: 767px) {
    [class*="blur-[128px]"],
    [class*="blur-[140px]"],
    [class*="blur-[100px]"] {
        display: none !important;
    }
    #hero-canvas {
        display: none;
    }
}

/* Screenshot tabs: horizontal scroll on small screens */
@media (max-width: 639px) {
    .screenshot-tab {
        white-space: nowrap;
        flex-shrink: 0;
    }
}

@media (max-width: 1023px) {
    .nav-dropdown {
        display: none !important;
    }

    .algorithm-formula {
        display: none;
    }
}

@media (max-width: 639px) {
    .algorithm-step {
        flex-direction: column;
        gap: 0.75rem;
    }

    .algorithm-number {
        align-self: flex-start;
    }
}
