/*
ParaLaw Main Styles
Custom CSS for animations and components not covered by Tailwind
*/

/* CSS Custom Properties for theming */
:root {
    --color-dark-bg: #0b1220;
    --color-dark-bg-secondary: #0f1626;
    --color-accent-blue: #276ef1;
    --color-danger-red: #e5484d;
    --color-success-green: #22a07a;
    --color-warning-orange: #f5a524;
    --font-heading: 'EB Garamond', serif;
    --font-body: 'Inter', system-ui, sans-serif;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Logo Animation */
.logo-container {
    position: relative;
}

.logo-lawer {
    position: relative;
    transition: all 0.3s ease;
}

/* Logo has no special letter animation in ParaLaw branding */

/* Document diff styles */
.document-diff {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    line-height: 1.6;
    border-radius: 16px;
}

.diff-line {
    margin: 2px 0;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.addition-line {
    background-color: rgba(34, 160, 122, 0.1);
    border-left: 3px solid var(--color-success-green);
}

.deletion-line {
    background-color: rgba(229, 72, 77, 0.1);
    border-left: 3px solid var(--color-danger-red);
}

.context-line {
    background-color: transparent;
}

.diff-line:hover {
    background-color: rgba(39, 110, 241, 0.05);
}

/* Risk profile tabs */
.risk-profile-tabs button {
    position: relative;
    overflow: hidden;
}

.risk-profile-tabs button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.risk-profile-tabs button:hover::before {
    left: 100%;
}

/* Card hover effects */
.hover-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.dark .hover-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.25), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
}

/* Pricing card popular glow effect */
.pricing-popular {
    position: relative;
}

.pricing-popular::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--color-accent-blue), var(--color-success-green), var(--color-accent-blue));
    border-radius: 20px;
    z-index: -1;
    animation: glow 2s linear infinite;
}

@keyframes glow {
    0%,
    100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Gradient backgrounds */
.gradient-bg-light {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 50%, #e0f2fe 100%);
}

.gradient-bg-dark {
    background: linear-gradient(
        135deg,
        var(--color-dark-bg) 0%,
        var(--color-dark-bg-secondary) 50%,
        var(--color-dark-bg) 100%
    );
}

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

/* Hero section animations */
.hero-content {
    animation: slideUp 0.8s ease-out;
}

.hero-cta {
    animation: slideUp 0.8s ease-out 0.2s both;
}

.hero-trust {
    animation: slideUp 0.8s ease-out 0.4s both;
}

/* Feature grid stagger animation */
.feature-grid .feature-card:nth-child(1) {
    animation-delay: 0.1s;
}
.feature-grid .feature-card:nth-child(2) {
    animation-delay: 0.2s;
}
.feature-grid .feature-card:nth-child(3) {
    animation-delay: 0.3s;
}
.feature-grid .feature-card:nth-child(4) {
    animation-delay: 0.4s;
}
.feature-grid .feature-card:nth-child(5) {
    animation-delay: 0.5s;
}
.feature-grid .feature-card:nth-child(6) {
    animation-delay: 0.6s;
}

/* Button animations */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

.dark .skeleton {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200% 100%;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Tooltip styles */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: rgba(0, 0, 0, 0.9);
    color: #fff;
    text-align: center;
    border-radius: 12px;
    padding: 10px 14px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.tooltip .tooltiptext::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.9) transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Responsive video container */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.video-container iframe,
.video-container object,
.video-container embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
.focus-visible:focus-visible {
    outline: 2px solid var(--color-accent-blue);
    outline-offset: 2px;
    border-radius: 12px;
}

/* Hide scrollbar utility for overflow containers */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

/* Mobile adjustments for tight components */
@media (max-width: 640px) {
    .hero-trust {
        row-gap: 0.5rem;
        column-gap: 1rem;
    }

    /* Statistics blocks mobile adaptation */
    .flex.flex-wrap.gap-2 span {
        font-size: 0.8rem;
        white-space: nowrap;
    }

    .flex.flex-wrap.gap-2 span svg {
        flex-shrink: 0;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border-width: 2px;
    }

    .btn-primary {
        border: 2px solid var(--color-accent-blue);
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 8px;
}

.dark ::-webkit-scrollbar-track {
    background: var(--color-dark-bg-secondary);
    border-radius: 8px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 8px;
}

.dark ::-webkit-scrollbar-thumb {
    background: #6b7280;
    border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent-blue);
}
