/* SkyTrade - Custom Styles */

/* Brand Colors - Dark Professional Theme */
:root {
    /* Base dark colors - matching Lovable */
    --dark-bg: #0c0c14;
    --dark-surface: #0f1419;
    --dark-elevated: #151a23;
    --dark-border: #1e2a3a;
    --dark-nav: #0a0a0f;
    
    /* Accent colors */
    --cyan: #00d4aa;
    --cyan-bright: #00ffcc;
    --navy: #001A33;
    --sky-blue: #00AEEF;
    --light-gray: #F5F7FA;
    --gold: #FFD45A;
    --white: #FFFFFF;
    
    /* Text on dark backgrounds */
    --text-primary: #f0f0f5;
    --text-secondary: #8b949e;
    --text-tertiary: #606070;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--sky-blue), var(--navy));
    --gradient-dark: linear-gradient(180deg, var(--dark-bg), var(--dark-surface));
    --gradient-gold: linear-gradient(135deg, var(--gold), #FFC41A);
}

/* Custom Tailwind Configuration */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

/*
 * Defensive nav visibility rules.
 * Prevents both mobile and desktop nav rows from showing simultaneously
 * if Tailwind CSS fails to load or is cached stale (md:hidden / md:flex).
 */
[data-nav-desktop] {
    display: none;
}
@media (min-width: 48rem) {
    [data-nav-mobile] {
        display: none !important;
    }
    [data-nav-desktop] {
        display: flex;
    }
}

body {
    font-family: 'Inter', sans-serif;
}

/* Utility Classes */
.text-navy { color: var(--navy); }
.text-sky { color: var(--sky-blue); }
.text-gold { color: var(--gold); }
.bg-navy { background-color: var(--navy); }
.bg-sky { background-color: var(--sky-blue); }
.bg-light-gray { background-color: var(--light-gray); }
.bg-gold { background-color: var(--gold); }

/* Dark theme utility classes */
.bg-dark { background-color: var(--dark-bg); }
.bg-dark-surface { background-color: var(--dark-surface); }
.bg-dark-elevated { background-color: var(--dark-elevated); }
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }

/* Buttons */
.btn-primary {
    background: var(--gradient-primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 174, 239, 0.3);
}

.btn-secondary {
    background: white;
    color: var(--navy);
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    border: 2px solid var(--navy);
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

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

.btn-outline {
    background: transparent;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    border: 2px solid white;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

.btn-outline:hover {
    background: white;
    color: var(--navy);
    transform: translateY(-2px);
}

/* Hero Section - Dark Theme */
.hero-section {
    background: var(--dark-bg);
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 70% 50%, rgba(0, 174, 239, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

/* Hero Video Container */
.hero-video-container {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 0 60px rgba(0, 174, 239, 0.15);
}

.hero-video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 1rem;
}

/* Demo CTA Button - Cyan like Lovable */
.btn-demo {
    background: var(--cyan);
    color: #0a0a0f;
    padding: 0.875rem 1.75rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    border: none;
}

/* Compact button for mobile nav */
@media (max-width: 768px) {
    nav.fixed .btn-demo {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}

/* Mobile hamburger menu */
.mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: var(--dark-surface);
    border-top: 1px solid rgba(31, 41, 55, 0.4);
}

.mobile-menu.open {
    max-height: 500px;
}

.mobile-menu-link {
    display: block;
    padding: 0.75rem 0.5rem;
    color: #d1d5db;
    font-size: 0.9375rem;
    font-weight: 500;
    border-bottom: 1px solid rgba(31, 41, 55, 0.4);
    transition: color 0.2s ease;
}

.mobile-menu-link:last-child {
    border-bottom: none;
}

.mobile-menu-link:hover {
    color: #ffffff;
}

.btn-demo:hover {
    background: var(--cyan-bright);
    transform: translateY(-1px);
}

/* Large demo button for CTAs */
.btn-demo-lg {
    background: var(--cyan);
    color: #0a0a0f;
    padding: 1rem 2.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1.125rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    border: none;
    min-width: 200px;
}

.btn-demo-lg:hover {
    background: var(--cyan-bright);
    transform: translateY(-1px);
}

/* Legacy animated-bg - kept for compatibility but not used in dark theme */
.animated-bg {
    background: linear-gradient(135deg, #001A33 0%, #00AEEF 100%);
    opacity: 0.95;
    animation: gradientShift 10s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background: linear-gradient(135deg, #001A33 0%, #00AEEF 100%); }
    50% { background: linear-gradient(135deg, #00AEEF 0%, #001A33 100%); }
}

/* Skyline Container */
.skyline-container {
    position: relative;
    animation: float 6s ease-in-out infinite;
}

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

.data-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 174, 239, 0.2), transparent);
    pointer-events: none;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* Capability Cards */
.capability-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.capability-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 174, 239, 0.2);
    border-color: var(--sky-blue);
}

.icon-box {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

/* Drone Statistics Animation */
.drone-stat {
    animation: countUp 2s ease-out forwards;
    opacity: 0;
}

@keyframes countUp {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Governance Diagram */
.governance-diagram {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem 2rem;
}

.central-hub {
    position: relative;
    width: 300px;
    height: 300px;
}

.hub-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 180px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 40px rgba(0, 174, 239, 0.4);
}

/* Improve readability of text inside the hub */
.hub-core p {
    max-width: 150px;
    text-align: center;
    line-height: 1.2;
}

.department-node {
    position: absolute;
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--navy);
    animation: none; /* keep nodes aligned and steady */
    min-width: 220px; /* unify widths so left/right align vertically */
}

.department-node i {
    font-size: 1.5rem;
    color: var(--sky-blue);
}

/* Department nodes connection lines */
.department-node::before {
    content: '';
    position: absolute;
    width: 2px;
    height: 60px;
    background: linear-gradient(to bottom, transparent, var(--sky-blue), transparent);
    animation: connectionPulse 2s ease-in-out infinite;
}

@keyframes connectionPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Scroll Animations */
[data-aos] {
    transition-property: transform, opacity;
}

/* Navigation Scroll Effect - Dark Theme */
nav {
    transition: all 0.3s ease;
}

nav.scrolled {
    background: var(--dark-surface);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Keep the logo link visible even if classes differ */
nav .container > .flex > a:first-child {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    min-width: 120px;
}

nav .container > .flex > a:first-child img {
    display: block;
    height: 42px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

nav .nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--navy);
    text-decoration: none;
    visibility: visible;
    opacity: 1;
}

nav .nav-logo picture {
    display: flex;
    align-items: center;
}

nav .nav-logo img {
    display: block;
    max-height: 42px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

/* Source badges (FAA, White House) */
.source-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.6rem;
    border-radius: 9999px;
    background: var(--light-gray);
    color: var(--navy);
    border: 1px solid #e5e7eb;
    font-weight: 600;
    font-size: 0.85rem;
}

/* Quote styling */
.quote-card {
    background: #ffffff;
    border-left: 4px solid var(--sky-blue);
    padding: 0.75rem 1rem;
    color: #374151;
    font-style: italic;
}

.quote-card .quote-src {
    display: block;
    margin-top: 0.35rem;
    font-style: normal;
    color: #6b7280;
    font-weight: 600;
}

/* Form Styles */
input:focus, textarea:focus {
    border-color: var(--sky-blue);
    box-shadow: 0 0 0 3px rgba(0, 174, 239, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .governance-diagram {
        transform: scale(0.7);
    }
    
    .department-node {
        font-size: 0.875rem;
    }
    
    /* Header nav only - not footer nav */
    nav.fixed {
        position: fixed;
        width: 100%;
        left: 0;
        right: 0;
        box-sizing: border-box;
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    nav.fixed > div,
    nav.fixed .container {
        max-width: 100%;
        width: 100%;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        box-sizing: border-box;
    }
    
    nav.fixed .flex {
        flex-wrap: nowrap;
        gap: 0.5rem;
    }

    /* Ensure logo remains visible and doesn't shrink */
    nav.fixed a.nav-logo {
        display: flex;
        flex-shrink: 0;
        min-width: 140px;
    }
    
    /* Ensure logo doesn't take too much space */
    nav.fixed img {
        max-width: 120px;
        height: auto;
    }
}

/* Chart Container */
canvas {
    max-height: 400px !important;
}

/* Loading Animation */
.loading-spinner {
    border: 3px solid var(--light-gray);
    border-top: 3px solid var(--sky-blue);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

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

/* Custom Scrollbar - Dark Theme */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--dark-surface);
}

::-webkit-scrollbar-thumb {
    background: var(--sky-blue);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--navy);
}

/* Dark theme sections */
.section-dark {
    background: var(--dark-bg);
    color: var(--text-primary);
}

.section-dark-surface {
    background: var(--dark-surface);
    color: var(--text-primary);
}

/* Logo card for credibility strip - like Lovable */
.logo-card {
    background: transparent;
    border: 1px solid var(--dark-border);
    border-radius: 0.5rem;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    min-height: 48px;
}

.logo-card:hover {
    border-color: var(--text-secondary);
}

.logo-card img {
    height: 24px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.logo-card img.no-invert {
    filter: none;
}

.logo-card:hover img {
    opacity: 1;
}

/* Problem cards on dark background - matching Lovable style */
.problem-card {
    background: var(--dark-elevated);
    border: 1px solid var(--dark-border);
    border-radius: 0.75rem;
    padding: 1.25rem;
    transition: all 0.2s ease;
}

.problem-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

/* Problem card icon circles */
.problem-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.problem-icon-red {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.problem-icon-orange {
    background: rgba(249, 115, 22, 0.15);
    border: 1px solid rgba(249, 115, 22, 0.3);
}

/* Pillar cards for solution section - matching Lovable */
.pillar-card {
    background: var(--dark-elevated);
    border: 1px solid var(--dark-border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.2s ease;
}

.pillar-card:hover {
    border-color: var(--cyan);
}

/* Pillar icon box */
.pillar-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    border: 1px solid var(--dark-border);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

/* Tab buttons for screenshots */
.tab-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    border: 1px solid var(--dark-border);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
}

.tab-btn:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

.tab-btn.active {
    background: var(--cyan);
    color: #0a0a0f;
    border-color: var(--cyan);
}

/* Security badges - matching Lovable */
.security-badge {
    background: rgba(0, 212, 170, 0.1);
    border: 1px solid rgba(0, 212, 170, 0.2);
    border-radius: 9999px;
    padding: 0.5rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Cyan text accent - for highlighted words */
.text-cyan {
    color: var(--cyan);
}

/* Make fa-check icons cyan */
.fa-check.text-cyan {
    color: var(--cyan) !important;
}

/* Badge label like "THE PROBLEM" */
.badge-label {
    display: inline-block;
    background: var(--cyan);
    color: #0a0a0f;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Print Styles */
@media print {
    nav, footer, .btn-primary, .btn-secondary, .btn-outline {
        display: none;
    }
    
    .hero-section {
        background: white;
        color: var(--navy);
    }
    
    * {
        animation: none !important;
    }
}
