/* ============================================
   Leads Sentry Public Website - Design System
   Based on the actual app's CSS variables and design tokens
   ============================================ */

/* Custom Tailwind config overrides */
:root {
    --primary: #0078D4;
    --primary-hover: #0086ed;
    --primary-light: #d3e4ff;
    --teal: #4edea3;
    --teal-dark: #006b49;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #dc2626;
    --dark-bg: #0b1120;
    --dark-surface: #0f172a;
    --dark-card: #1e293b;
    --text-dark: #0f172a;
    --text-medium: #475569;
    --text-light: #94a3b8;
}

/* Base styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Brand utility safety net: keep primary actions in brand blue */
.bg-primary {
    background-color: var(--primary-color, #1060a4) !important;
}

.text-primary {
    color: var(--primary-color, #1060a4) !important;
}

.border-primary {
    border-color: var(--primary-color, #1060a4) !important;
}

.bg-primary-container {
    background-color: var(--secondary-color, #3779bf) !important;
}

.hover\:bg-primary-container:hover {
    background-color: var(--secondary-color, #3779bf) !important;
    color: #ffffff !important;
}

html.menu-open,
body.menu-open {
    overflow: hidden;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Glassmorphic Navbar */
.glass-nav {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.04), inset 0 1px 0 rgba(255,255,255,0.6);
}

/* Glassmorphic Cards */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 1rem;
    box-shadow: 0 2px 10px -3px rgba(0,0,0,0.05), 0 20px 40px -15px rgba(0,120,212,0.05), inset 0 1px 0 rgba(255,255,255,0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.85);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px -5px rgba(0,120,212,0.1), 0 20px 40px -15px rgba(0,120,212,0.08);
}

/* Gradient Backgrounds */
.bg-hero-gradient {
    background-image:
        radial-gradient(at 0% 0%, rgba(0, 120, 212, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(78, 222, 163, 0.06) 0px, transparent 50%),
        radial-gradient(at 50% 0%, rgba(0, 120, 212, 0.04) 0px, transparent 60%);
}

.bg-section-gradient {
    background-image:
        radial-gradient(at 0% 50%, rgba(0, 120, 212, 0.03) 0px, transparent 50%),
        radial-gradient(at 100% 50%, rgba(78, 222, 163, 0.03) 0px, transparent 50%);
}

/* Primary CTA Button */
.btn-primary-brand {
    background: linear-gradient(135deg, #0078D4, #00a8ff);
    color: white;
    font-weight: 600;
    border-radius: 0.75rem;
    padding: 0.75rem 2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(0, 120, 212, 0.25);
}

.btn-primary-brand:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 120, 212, 0.35);
}

/* Secondary Button */
.btn-secondary-brand {
    border: 1.5px solid #e2e8f0;
    color: #0f172a;
    font-weight: 600;
    border-radius: 0.75rem;
    padding: 0.75rem 2rem;
    transition: all 0.3s ease;
    background: white;
}

.btn-secondary-brand:hover {
    border-color: #0078D4;
    color: #0078D4;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0, 120, 212, 0.1);
}

/* Feature Icon Wrapper */
.feature-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background: rgba(0, 120, 212, 0.08);
    color: #0078D4;
    transition: all 0.3s ease;
}

.glass-card:hover .feature-icon {
    background: #0078D4;
    color: white;
    transform: translateY(-2px);
}

/* Teal accent variant */
.feature-icon-teal {
    background: rgba(0, 107, 73, 0.08);
    color: #006b49;
}

.glass-card:hover .feature-icon-teal {
    background: #006b49;
    color: white;
}

/* Step Number */
.step-number {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.125rem;
    background: linear-gradient(135deg, #0078D4, #00a8ff);
    color: white;
    flex-shrink: 0;
}

/* Stat Card */
.stat-card {
    text-align: center;
    padding: 1.5rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, #0078D4, #4edea3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

/* Accuracy Circle SVG */
.accuracy-circle-bg {
    fill: none;
    stroke: rgba(0, 120, 212, 0.1);
    stroke-width: 12;
}

.accuracy-circle-fill {
    fill: none;
    stroke: #0078D4;
    stroke-width: 12;
    stroke-linecap: round;
    stroke-dasharray: 553;
    stroke-dashoffset: 553;
    transition: stroke-dashoffset 2s ease;
}

/* Capability Badge */
.capability-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.capability-badge:hover {
    background: rgba(0, 120, 212, 0.05);
}

.capability-badge .cap-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    background: rgba(0, 120, 212, 0.08);
    color: #0078D4;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.capability-badge:hover .cap-icon {
    background: #0078D4;
    color: white;
    transform: translateY(-2px);
}

/* App Preview Frame */
.app-preview-frame {
    background: white;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0,0,0,0.03);
    overflow: hidden;
}

/* Pricing Card Highlight */
.pricing-highlight {
    border: 2px solid #0078D4;
    position: relative;
}

.pricing-highlight::before {
    content: 'Most Popular';
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #0078D4, #00a8ff);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 1rem;
    border-radius: 2rem;
    letter-spacing: 0.025em;
}

/* Process Connector Line */
.process-line {
    position: absolute;
    top: 1.5rem;
    left: calc(50% + 2rem);
    width: calc(100% - 4rem);
    height: 2px;
    background: linear-gradient(90deg, #0078D4, #4edea3);
    opacity: 0.3;
}

/* Scroll Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Slide from left */
.reveal-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Slide from right */
.reveal-right {
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Scale up */
.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-scale.visible {
    opacity: 1;
    transform: scale(1);
}

/* Fade up with blur */
.reveal-blur {
    opacity: 0;
    transform: translateY(40px);
    filter: blur(8px);
    transition: opacity 0.8s ease, transform 0.8s ease, filter 0.8s ease;
}

.reveal-blur.visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

/* Stagger children */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.4s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.5s; opacity: 1; transform: translateY(0); }

/* Parallax element */
.parallax {
    will-change: transform;
    transition: transform 0.1s linear;
}

/* Floating animation */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

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

/* Counter animation */
.counter-value {
    display: inline-block;
}

/* Gradient text shimmer */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.shimmer-text {
    background: linear-gradient(90deg, #1060a4 0%, #4edea3 25%, #1060a4 50%, #4edea3 75%, #1060a4 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s linear infinite;
}

/* Hero section parallax background */
.hero-parallax {
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
}

/* Smooth page load */
body {
    opacity: 0;
    animation: pageLoad 0.5s ease forwards;
}

@keyframes pageLoad {
    to { opacity: 1; }
}

/* Nav scroll state - keep logo same size */
.nav-scrolled {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

/* Section divider with gradient line */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #1060a4, #4edea3, transparent);
    opacity: 0.2;
    margin: 0 auto;
    max-width: 80%;
}

/* Footer */
.footer-link {
    color: #64748b;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: #0078D4;
}

/* Badge */
.version-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 1rem;
    border-radius: 2rem;
    background: rgba(0, 120, 212, 0.08);
    border: 1px solid rgba(0, 120, 212, 0.15);
    font-size: 0.8125rem;
    font-weight: 600;
    color: #0078D4;
}

.version-badge .pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0078D4;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

/* Mobile Nav */
.mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    height: 100vh;
    width: 100vw;
    background:
        radial-gradient(at 0% 0%, rgba(16, 96, 164, 0.08) 0px, transparent 52%),
        linear-gradient(180deg, #ffffff 0%, #f6fbff 100%);
    padding: 5.5rem 1.1rem 1.35rem;
    z-index: 200;
    overflow-y: auto;
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.22s ease, opacity 0.2s ease, visibility 0.2s ease;
}

@media (max-width: 767.98px) {
    .mobile-menu {
        display: block;
    }
}

.mobile-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Premium mobile header/footer treatment */
.site-header {
    border-bottom: 1px solid rgba(192, 199, 212, 0.45);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.site-mobile-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.7rem;
    padding: 0.58rem 0.95rem;
    border: 1.5px solid rgba(16, 96, 164, 0.24);
    border-radius: 999px;
    background: #ffffff;
    color: #0f3f71;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-decoration: none;
    box-shadow: 0 5px 14px rgba(15, 23, 42, 0.08);
    transition: all 0.2s ease, box-shadow 0.2s ease;
}

.site-mobile-login-btn:hover {
    border-color: rgba(16, 96, 164, 0.5);
    color: #1060a4;
    box-shadow: 0 8px 18px rgba(16, 96, 164, 0.2);
}

.site-mobile-menu-btn {
    width: 2.6rem;
    height: 2.6rem;
    border: 1.5px solid rgba(16, 96, 164, 0.25);
    border-radius: 0.95rem;
    background: linear-gradient(180deg, #ffffff, #f5f9fe);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    box-shadow: 0 8px 18px rgba(16, 96, 164, 0.16);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-mobile-menu-btn:hover {
    border-color: rgba(16, 96, 164, 0.45);
    box-shadow: 0 9px 22px rgba(16, 96, 164, 0.25);
}

@media (max-width: 767.98px) {
    .site-mobile-menu-btn {
        display: inline-flex;
    }
}

.site-mobile-menu-panel {
    border-bottom: none;
    box-shadow: none;
    padding: 0;
}

@media (max-height: 760px) {
    .mobile-menu {
        padding-top: 4.65rem;
    }
    .site-mobile-menu-grid a {
        padding-top: 0.68rem;
        padding-bottom: 0.68rem;
    }
}

.site-mobile-menu-grid a {
    display: block;
    padding: 0.95rem 0.9rem;
    margin-bottom: 0.48rem;
    border: 1px solid rgba(16, 96, 164, 0.22);
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.96);
    color: #0f4c82 !important;
    font-size: 0.82rem !important;
    letter-spacing: 0.11em !important;
    font-weight: 700 !important;
    text-decoration: none;
    transition: all 0.2s ease;
}

.site-mobile-menu-grid a:hover {
    border-color: rgba(16, 96, 164, 0.45);
    background: #e6f2ff;
    color: #1060a4 !important;
}

.site-mobile-menu-grid a.text-primary {
    border-color: rgba(16, 96, 164, 0.6);
    background: linear-gradient(180deg, #e7f2ff, #d9ebff);
    color: #1060a4 !important;
    box-shadow: inset 0 0 0 1px rgba(16, 96, 164, 0.12);
}

.site-mobile-menu-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.7rem;
    margin-top: 1.25rem;
}

.site-mobile-primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 2.8rem;
    padding: 0.58rem 0.75rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #1060a4, #3779bf);
    color: #fff;
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    box-shadow: 0 9px 20px rgba(16, 96, 164, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.site-mobile-primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(16, 96, 164, 0.32);
}

.site-mobile-menu-actions .site-mobile-login-btn {
    width: 100%;
    min-height: 2.8rem;
}

.site-header.mobile-menu-active {
    border-bottom-color: transparent;
    z-index: 210 !important;
}

.site-footer {
    position: relative;
    background: linear-gradient(180deg, #ffffff 0%, #f5f9fe 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.site-footer-links a {
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.mobile-footer-tabs {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    display: none !important;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.25rem;
    padding: 0.45rem 0.55rem calc(0.45rem + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid #dbe7f3;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.08);
}

@media (max-width: 768px) {
    .mobile-footer-tabs {
        display: grid !important;
    }
}

@media (min-width: 769px) {
    .mobile-footer-tabs {
        display: none !important;
    }
}

.mobile-footer-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.22rem;
    min-height: 2.95rem;
    border-radius: 0.72rem;
    color: #3f5f86;
    text-decoration: none;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.mobile-footer-tab i {
    font-size: 0.9rem;
}

.mobile-footer-tab.active {
    color: #1060a4;
    background: #e4f1ff;
}

.mobile-footer-tab:hover {
    color: #1060a4;
    background: #edf6ff;
}

/* Active Nav Link */
.nav-active {
    color: #0078D4 !important;
    font-weight: 600;
}

/* Contact Form */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 0.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: #0078D4;
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.1);
}

.form-input::placeholder {
    color: #94a3b8;
}

/* FAQ Accordion */
.faq-item {
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.faq-question {
    width: 100%;
    padding: 1.25rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9375rem;
    background: white;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Inter', sans-serif;
    color: #0f172a;
    transition: background 0.2s ease;
}

.faq-question:hover {
    background: #f8fafc;
}

.faq-question .chevron {
    transition: transform 0.3s ease;
    color: #94a3b8;
}

.faq-item.open .faq-question .chevron {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.open .faq-answer {
    max-height: 300px;
    padding: 0 1.25rem 1.25rem;
}

/* Docs mobile optimization */
@media (max-width: 768px) {
    .docs-layout {
        overflow-x: hidden;
    }

    .docs-layout table {
        display: block;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
    }

    .docs-layout .code-block {
        font-size: 0.78rem;
    }

    .docs-layout section {
        scroll-margin-top: 6.2rem;
    }
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding-bottom: 5.4rem;
    }

    .stat-value {
        font-size: 2rem;
    }

    .site-header .h-14 {
        height: 2.6rem;
    }

    .site-footer {
        background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    }

    .site-footer > div > div {
        align-items: flex-start !important;
        gap: 1rem !important;
        padding-top: 1.4rem !important;
        padding-bottom: 1.6rem !important;
    }

    .site-footer .site-footer-links {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 0.5rem;
    }

    .site-footer .site-footer-links a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0.4rem 0.7rem;
        border: 1px solid #d8e1ec;
        border-radius: 999px;
        background: #fff;
        font-size: 0.72rem !important;
        font-weight: 600;
        color: #475569 !important;
    }

    .site-footer .site-footer-links a:hover {
        border-color: #1060a4;
        color: #1060a4 !important;
    }

    .site-header .h-14 {
        height: 2.9rem;
    }
}

/* Checkmark list */
.check-list li {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0;
    font-size: 0.9375rem;
    color: #475569;
}

.check-list li i {
    color: #10b981;
    font-size: 0.875rem;
}

/* Hamburger */
.hamburger-line {
    display: block;
    width: 18px;
    height: 2px;
    background: #0f172a;
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease, width 0.2s ease;
}

.site-mobile-menu-btn .hamburger-line:nth-child(2) {
    width: 14px;
}

.site-mobile-menu-btn[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
}

.site-mobile-menu-btn[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
}

.site-mobile-menu-btn[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
}
