/* VAL - Custom CSS Styles */

/* Root Variables */
:root {
    --val-gray: #262626;
    --val-green: #07E807;
    --val-black: #000000;
    --val-white: #FFFFFF;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Base Styles */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(7, 232, 7, 0.2);
    }
    50% {
        box-shadow: 0 0 15px rgba(7, 232, 7, 0.3);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    0%, 50% {
        border-color: transparent;
    }
    51%, 100% {
        border-color: var(--val-green);
    }
}

@keyframes matrix-rain {
    0% {
        transform: translateY(-100vh);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

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

/* Background Patterns */
.bg-grid-pattern {
    background-image: 
        linear-gradient(rgba(7, 232, 7, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(7, 232, 7, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
}

.bg-circuit-pattern {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2307E807' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3Cpath d='M30 28v4M28 30h4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Hero Background Styles */
.hero-background {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%);
    position: relative;
    min-height: 100vh;
}

.hero-bg-image {
    /* Hero background image */
    background-image: url('img/background_image_home.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    filter: grayscale(100%) contrast(200%) brightness(115%) saturate(0%) blur(0.5px);
    -webkit-filter: grayscale(100%) contrast(200%) brightness(115%) saturate(0%) blur(0.5px);
    opacity: 0.1;
}

.hero-bg-overlay {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.5) 0%,
        rgba(255, 255, 255, 0.45) 30%,
        rgba(255, 255, 255, 0.48) 70%,
        rgba(255, 255, 255, 0.5) 100%
    );
    backdrop-filter: blur(0.1px);
    -webkit-backdrop-filter: blur(0.1px);
}

/* Aviation-themed background animation */
@keyframes float-bg {
    0%, 100% {
        background-position: 0% 0%, 100% 100%, center center;
    }
    33% {
        background-position: 30% 20%, 70% 80%, center center;
    }
    66% {
        background-position: 70% 10%, 30% 90%, center center;
    }
}

/* Typing Effect */
.typing-text {
    display: inline-block;
    min-height: 1.2em;
    border-right: 2px solid var(--val-green);
    padding-right: 0;
}

.typing-text.typing {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    vertical-align: baseline;
    min-height: 1.2em;
    width: 0;
    animation: typewriter 3s steps(13, end) 2s forwards, blink-cursor 1s step-end infinite;
    padding-right: 0;
}

@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 15ch; /* Exact width for 'rocket arrivals' */
    }
}

@keyframes blink-cursor {
    from, to {
        border-color: var(--val-green);
    }
    50% {
        border-color: transparent;
    }
}

/* Navigation Enhancements */
nav {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    z-index: 1000 !important;
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 64px !important;
}

.nav-link {
    position: relative;
    transition: var(--transition-smooth);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 50%;
    background: var(--val-green);
    transition: var(--transition-smooth);
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 100%;
}

/* Button Styles */
.btn-primary {
    background: linear-gradient(135deg, var(--val-green) 0%, #05c205 100%);
    color: var(--val-black);
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition-bounce);
    box-shadow: 0 4px 15px rgba(7, 232, 7, 0.3);
    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%;
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(7, 232, 7, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--val-black);
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 600;
    border: 2px solid var(--val-black);
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--val-black);
    transition: width 0.3s ease;
    z-index: -1;
}

.btn-secondary:hover::before {
    width: 100%;
}

.btn-secondary:hover {
    color: var(--val-white);
    transform: translateY(-2px);
}

/* Card Hover Effects */
.card-hover {
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.card-hover::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--val-green), transparent, var(--val-green));
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.card-hover:hover::before {
    opacity: 1;
}

.card-hover:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--val-green) 0%, #05c205 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    /* animation: gradient-shift 3s ease infinite; */
    background-size: 200% 200%;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(7, 232, 7, 0.3);
    border-top: 3px solid var(--val-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Floating Elements */
.floating {
    animation: float 25s ease-in-out infinite;
}

.floating:nth-child(2) {
    animation-delay: -8s;
}

.floating:nth-child(3) {
    animation-delay: -16s;
}

.floating:nth-child(odd) {
    animation-delay: -10s;
    animation-duration: 30s;
}

.floating:nth-child(even) {
    animation-delay: -20s;
    animation-duration: 35s;
}

/* Stats cards with glassmorphism effect */
.hero-background .bg-val-white\/90 {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Animated Graph Styles */
.graph-container {
    position: relative;
    height: 120px;
    overflow: hidden;
}

.graph-line {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: var(--val-green);
    transform-origin: left;
    animation: drawLine 3s ease-out forwards;
}

.graph-bars {
    display: flex;
    align-items: end;
    height: 80px;
    gap: 4px;
    margin-bottom: 10px;
}

.graph-bar {
    flex: 1;
    background: linear-gradient(to top, var(--val-green), rgba(7, 232, 7, 0.3));
    border-radius: 2px 2px 0 0;
    animation: growBar 2s ease-out forwards;
    transform: scaleY(0);
    transform-origin: bottom;
}

.graph-bar:nth-child(1) { animation-delay: 0.2s; }
.graph-bar:nth-child(2) { animation-delay: 0.4s; }
.graph-bar:nth-child(3) { animation-delay: 0.6s; }
.graph-bar:nth-child(4) { animation-delay: 0.8s; }
.graph-bar:nth-child(5) { animation-delay: 1.0s; }
.graph-bar:nth-child(6) { animation-delay: 1.2s; }
.graph-bar:nth-child(7) { animation-delay: 1.4s; }

.graph-dots {
    position: relative;
    height: 60px;
}

.graph-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--val-green);
    border-radius: 50%;
    opacity: 0;
    animation: showDot 0.5s ease-out forwards;
}

@keyframes drawLine {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

@keyframes growBar {
    from {
        transform: scaleY(0);
    }
    to {
        transform: scaleY(1);
    }
}

@keyframes showDot {
    from {
        opacity: 0;
        transform: scale(0);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Glow Effect */
.glow {
    animation: pulse-glow 8s ease-in-out infinite;
}

/* Matrix Rain Effect */
.matrix-rain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.1;
}

.matrix-rain::before {
    content: '01010101010101010101010101010101';
    position: absolute;
    top: -100vh;
    left: 10%;
    color: var(--val-green);
    font-family: 'Courier New', monospace;
    font-size: 14px;
    animation: matrix-rain 10s linear infinite;
}

.matrix-rain::after {
    content: '11001100110011001100110011001100';
    position: absolute;
    top: -100vh;
    right: 15%;
    color: var(--val-green);
    font-family: 'Courier New', monospace;
    font-size: 12px;
    animation: matrix-rain 8s linear infinite 2s;
}

/* Scroll Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Dashboard Mockup Styles */
.dashboard-mockup {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    position: relative;
}

.dashboard-mockup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 8px;
    padding: 2px;
    background: linear-gradient(135deg, var(--val-green), transparent, var(--val-green));
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0.5;
}

/* AI Processing Animation */
.ai-processing {
    position: relative;
    overflow: hidden;
}

.ai-processing::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(7, 232, 7, 0.3), transparent);
    animation: scan 2s linear infinite;
}

@keyframes scan {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--val-green);
    border-radius: 0px;
}

::-webkit-scrollbar-thumb:hover {
    background: #05c205;
}

/* Form Styles */
.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 4px;
    font-size: 16px;
    transition: var(--transition-smooth);
    background: var(--val-white);
}

.form-input:focus {
    outline: none;
    border-color: var(--val-green);
    box-shadow: 0 0 0 3px rgba(7, 232, 7, 0.1);
    transform: translateY(-1px);
}

.form-input:hover {
    border-color: #9ca3af;
}

/* Risk Level Indicators */
.risk-high {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.risk-medium {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.risk-low {
    background: linear-gradient(135deg, var(--val-green) 0%, #05c205 100%);
}

/* Particle Effect */
.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--val-green);
    border-radius: 50%;
    opacity: 0.6;
    animation: particle-float 8s linear infinite;
}

@keyframes particle-float {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100vh) translateX(100px);
        opacity: 0;
    }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .card-hover:hover {
        transform: translateY(-4px) scale(1.01);
    }
    
    .btn-primary:hover,
    .btn-secondary:hover {
        transform: translateY(-1px) scale(1.02);
    }
    
    .form-input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .typing-text {
        animation: none;
        border-right: none;
    }
}

/* Focus States */
button:focus,
input:focus,
textarea:focus,
select:focus,
a:focus {
    outline: 2px solid var(--val-green);
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .gradient-text {
        background: none;
        -webkit-text-fill-color: var(--val-green);
        color: var(--val-green);
    }
    
    .card-hover::before {
        display: none;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .bg-val-gray {
        background: white !important;
        color: black !important;
    }
    
    .text-val-white {
        color: black !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #ffffff;
        --text-secondary: #a1a1aa;
        --bg-primary: #09090b;
        --bg-secondary: #18181b;
    }
}

/* Performance Optimizations */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Utility Classes */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.backdrop-blur {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.border-gradient {
    border: 2px solid transparent;
    background: linear-gradient(var(--val-white), var(--val-white)) padding-box,
                linear-gradient(135deg, var(--val-green), transparent) border-box;
}
