* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #1e3a8a;
    --dark-blue: #1e40af;
    --royal-blue: #2563eb;
    --light-blue: #3b82f6;
    --accent-blue: #60a5fa;
    --white: #ffffff;
    --black: #000000;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-300: #d1d5db;
    --gray-100: #f3f4f6;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--white);
    background-color: var(--black);
    overflow-x: hidden;
}

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(30, 58, 138, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.nav-logo h2 {
    font-size: 1.8rem;
    font-weight: bold;
    letter-spacing: 2px;
    color: var(--white);
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 1rem;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-blue);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--accent-blue);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.page {
    display: none;
    min-height: 100vh;
}

.page.active {
    display: block;
}

.hero {
    height: 100vh;
    background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(30,58,138,0.8) 50%, rgba(30,64,175,0.8) 100%), 
                url('https://www.lockheedmartin.com/content/dam/lockheed-martin/aero/photo/F-35/22-08928-ADSW_JASSM-LRASM-F-35_AFA_Column-Wrap-V2-1280.jpg.pc-adaptive.full.medium.jpg') center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%23ffffff" stroke-width="0.1" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.2;
}

.hero-content {
    max-width: 800px;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 4rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 3rem;
    opacity: 0.9;
    line-height: 1.6;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 3rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: bold;
    color: var(--accent-blue);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.capabilities {
    padding: 8rem 0;
    background: linear-gradient(rgba(17, 24, 39, 0.95), rgba(17, 24, 39, 0.95)), 
                url('https://prd-sc102-cdn.rtx.com/raytheon/-/media/ray/what-we-do/integrated-air-and-missile-defense/ghosteye/images/ltamds-001rt1-peo-22-018-e021522-stmta_1600x900.jpg?rev=14ecd6c12c174a42955aea637f9529cb') center/cover;
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.capabilities h2 {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--white);
}

.section-subtitle {
    font-size: 1.25rem;
    text-align: center;
    margin-bottom: 4rem;
    opacity: 0.8;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.mission-pillars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-top: 4rem;
}

.pillar {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.15), rgba(17, 24, 39, 0.95));
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 15px;
    text-align: center;
    transition: all 0.4s ease;
    border: 1px solid rgba(96, 165, 250, 0.2);
    position: relative;
    overflow: hidden;
}

.pillar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.1), transparent);
    transition: left 0.5s ease;
}

.pillar:hover::before {
    left: 100%;
}

.pillar:hover {
    transform: translateY(-15px);
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.3), rgba(30, 64, 175, 0.2));
    border-color: var(--accent-blue);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.3);
}

.pillar h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-blue);
    position: relative;
    z-index: 2;
}

.pillar p {
    opacity: 0.9;
    line-height: 1.6;
    position: relative;
    z-index: 2;
}

.cta-section {
    padding: 8rem 0;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
    text-align: center;
}

.cta-section h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.cta-section p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

.cta-button {
    background: var(--white);
    color: var(--primary-blue);
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cta-button:hover {
    background: var(--accent-blue);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.companies-hero {
    padding: 8rem 0 4rem;
    background: linear-gradient(135deg, rgba(0,0,0,0.8) 0%, rgba(30,58,138,0.9) 100%), 
                url('https://coastalmachinesupply.com/wp-content/uploads/4.3.png') center/cover;
    position: relative;
}

.companies-hero h1 {
    font-size: 3.5rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.companies-subtitle {
    font-size: 1.25rem;
    text-align: center;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto 3rem;
}

.back-button {
    background: transparent;
    color: var(--accent-blue);
    border: 2px solid var(--accent-blue);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    display: block;
    margin: 0 auto;
}

.back-button:hover {
    background: var(--accent-blue);
    color: var(--white);
}

.companies-grid {
    padding: 4rem 0 8rem;
    background: var(--gray-900);
}

.companies-grid .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.company-card {
    background: var(--gray-800);
    padding: 2.5rem;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--gray-700);
    position: relative;
    overflow: hidden;
}

.company-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.1), transparent);
    transition: left 0.5s ease;
}

.company-card:hover::before {
    left: 100%;
}

.company-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-blue);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.3);
}

.company-logo {
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
}

.company-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    filter: sepia(1) hue-rotate(200deg) brightness(1.2);
}

.company-logo h3 {
    font-size: 1.5rem;
    color: var(--accent-blue);
    font-weight: bold;
    letter-spacing: 1px;
}

.company-card p {
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.9;
    position: relative;
    z-index: 2;
}

/* Hamburger Menu */
.hamburger-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background: var(--white);
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.hamburger-menu.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-menu.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--black) 0%, var(--primary-blue) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(96, 165, 250, 0.3);
    border-top: 4px solid var(--accent-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 2rem;
}

.loading-text {
    font-size: 2rem;
    font-weight: bold;
    color: var(--white);
    letter-spacing: 3px;
    margin-bottom: 1rem;
}

.loading-progress {
    width: 200px;
    height: 4px;
    background: rgba(96, 165, 250, 0.3);
    border-radius: 2px;
    overflow: hidden;
}

.loading-bar {
    height: 100%;
    background: var(--accent-blue);
    border-radius: 2px;
    animation: loadingProgress 2s ease-in-out infinite;
}

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

@keyframes loadingProgress {
    0% { width: 0%; transform: translateX(-100%); }
    50% { width: 100%; transform: translateX(0%); }
    100% { width: 100%; transform: translateX(100%); }
}

/* Swipe Indicator */
.swipe-indicator {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30, 58, 138, 0.9);
    backdrop-filter: blur(10px);
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--white);
    font-size: 0.9rem;
    z-index: 1000;
    transition: all 0.3s ease;
    border: 1px solid rgba(96, 165, 250, 0.3);
}

.swipe-indicator.hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
    visibility: hidden;
}

.swipe-arrow {
    font-size: 1.2rem;
    animation: swipeHint 2s ease-in-out infinite;
}

.swipe-arrow:last-child {
    animation-delay: 1s;
}

@keyframes swipeHint {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

/* Pull to Refresh */
.pull-refresh {
    position: fixed;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30, 58, 138, 0.95);
    padding: 1rem 2rem;
    border-radius: 0 0 20px 20px;
    color: var(--white);
    text-align: center;
    transition: all 0.3s ease;
    z-index: 1001;
}

.pull-refresh.active {
    top: 0;
}

.refresh-icon {
    font-size: 1.5rem;
    animation: spin 1s linear infinite;
    margin-bottom: 0.5rem;
}

.refresh-text {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Mobile Overlay */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Haptic Feedback */
.haptic-feedback {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(96, 165, 250, 0.2);
    z-index: 1002;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.haptic-feedback.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.5);
}

@media (max-width: 768px) {
    .hamburger-menu {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        right: -300px;
        width: 280px;
        height: calc(100vh - 70px);
        background: rgba(30, 58, 138, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 2rem 1rem;
        gap: 1.5rem;
        transition: all 0.3s ease;
        border-left: 1px solid rgba(96, 165, 250, 0.3);
        z-index: 1000;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-link {
        padding: 1rem 1.5rem;
        font-size: 1rem;
        border-radius: 10px;
        text-align: center;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(96, 165, 250, 0.2);
        transition: all 0.3s ease;
    }
    
    .nav-link:hover,
    .nav-link.active {
        background: rgba(96, 165, 250, 0.3);
        border-color: var(--accent-blue);
        transform: translateX(5px);
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 2rem;
    }
    
    .capabilities h2,
    .cta-section h2,
    .companies-hero h1 {
        font-size: 2.5rem;
    }
    
    .companies-grid .container {
        grid-template-columns: 1fr;
    }
    
    .pillar,
    .company-card {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 1rem;
    }
    
    .nav-menu {
        right: -320px;
        width: 300px;
    }
    
    .loading-text {
        font-size: 1.5rem;
    }
    
    .swipe-indicator {
        font-size: 0.8rem;
        padding: 0.6rem 1.2rem;
    }
    
    .pull-refresh {
        padding: 0.8rem 1.5rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .container {
        padding: 0 1rem;
    }
}

/* Mobile-specific animation enhancements */
.mobile-device .pillar:active,
.mobile-device .company-card:active {
    transform: translateY(-2px) scale(0.98);
}

.mobile-device .nav-link:active {
    transform: scale(0.95);
}

/* Enhanced mobile transitions */
.page {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-device .page.active {
    animation: pageSlideIn 0.4s ease-out;
}

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

/* Performance optimizations for mobile */
.mobile-device * {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.mobile-device .pillar,
.mobile-device .company-card {
    will-change: transform;
}

/* iOS-style bounce effect */
.mobile-device .hero-stats {
    animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}