/* 
   VE Inc: Premium Design System 
   Focus: Speed, Visual Excellence, AI/SEO Friendly
*/

:root {
    /* Color Palette - Patriotic but Premium */
    --primary-h: 210;
    --primary-s: 100%;
    --primary-l: 25%;
    --primary: hsl(var(--primary-h), var(--primary-s), var(--primary-l));
    --primary-light: hsl(var(--primary-h), var(--primary-s), 40%);

    --accent-h: 0;
    --accent-s: 85%;
    --accent-l: 45%;
    --accent: hsl(var(--accent-h), var(--accent-s), var(--accent-l));

    --text-main: #1a1a1a;
    --text-muted: #4a4a4a;
    --bg-main: #ffffff;
    --bg-alt: #f8faff;

    --glass: rgba(255, 255, 255, 0.8);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    --radius-sm: 4px;
    --radius-md: 12px;
    --radius-lg: 24px;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-weight: 800;
    line-height: 1.2;
    color: var(--primary);
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
}

p {
    margin-bottom: 1.5rem;
}

/* Navigation Placeholder Design */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 40px;
    transition: var(--transition);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--accent);
}

/* Dropdown Support */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: white;
    min-width: 240px;
    box-shadow: var(--shadow-lg);
    z-index: 1001;
    border-radius: var(--radius-md);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-top: 0; /* Removed gap */
    padding-top: 0; 
    top: 100%;
    animation: fadeIn 0.15s ease-out;
}

/* Invisible bridge to keep menu open while moving mouse from link to dropdown */
.dropdown::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 15px; /* Bridges the gap */
    display: none;
}

.dropdown:hover::after {
    display: block;
}

.dropdown-content a {
    color: var(--text-main);
    padding: 1rem 1.5rem;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    border-bottom: 1px solid rgba(0, 0, 0, 0.02);
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background-color: var(--bg-alt);
    color: var(--accent);
    padding-left: 2rem;
}

.dropdown:hover .dropdown-content {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(5px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1001;
    /* Keep above nav items */
}

.menu-toggle .bar {
    height: 3px;
    width: 100%;
    background-color: var(--text-main);
    border-radius: 3px;
    transition: var(--transition);
}

/* Hamburger animation into 'X' */
.menu-toggle.active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-accent {
    background-color: var(--accent);
    color: white;
}

.btn-accent:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Hero Section */
.hero {
    position: relative;
    height: 90vh;
    /* Full viewport height for 3D */
    background: #000;
    overflow: hidden;
}

#canvas3d {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0;
    transition: opacity 1s ease;
}

/* Aggressively hide Spline watermark */
#canvas3d+div,
.hero>div[style*="position: absolute"]:last-child {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

#canvas3d.loaded {
    opacity: 1;
}

/* Mobile Fallback Container - Hidden by default on Desktop where 3D is active */
.mobile-fallback-text {
    display: none;
    position: relative;
    z-index: 5;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

/* Visually Hidden H1 for SEO */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 3D Pill Button with Moving Light */
.btn-3d-pill {
    position: relative;
    padding: 1.2rem 3rem;
    border-radius: 100px;
    background: #000;
    color: white;
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 1.5px;
    border: none;
    cursor: pointer;
    overflow: hidden;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.btn-3d-pill::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 2px;
    /* Border thickness */
    border-radius: 100px;
    background: linear-gradient(var(--angle, 0deg),
            transparent 20%,
            var(--accent) 50%,
            transparent 80%);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    animation: rotate-border 3s linear infinite;
}

.btn-3d-pill::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.btn-3d-pill:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(255, 0, 0, 0.2);
    background: #111;
}

.btn-3d-pill:hover::after {
    opacity: 1;
}

@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes rotate-border {
    to {
        --angle: 360deg;
    }
}

@keyframes flow {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 200% 50%;
    }
}

.hero-overlay {
    position: absolute;
    bottom: 22%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    text-align: center;
    width: 100%;
}

/* 3D Loader */
.spline-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0a0a;
    z-index: 10;
    transition: opacity 0.5s ease;
}

.spline-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Cards & Sections */
section {
    padding: 6rem 2rem;
}

.section-alt {
    background-color: var(--bg-alt);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Footer */
footer {
    background-color: var(--primary);
    color: white;
    padding: 4rem 2rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 4rem;
}

.footer-bottom {
    text-align: center;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

/* Utilities */
.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    header {
        padding: 0.25rem 0;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-main);
        flex-direction: column;
        align-items: center;
        gap: 0;
        padding: 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        box-shadow: var(--shadow-md);
        transform: translateY(-150%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
        visibility: hidden;
        overflow-y: auto;
        max-height: 80vh;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    }

    .nav-links a {
        display: block;
        padding: 1.25rem;
        font-size: 1.1rem;
    }

    /* Mobile Dropdown Refinements */
    .dropdown {
        width: 100%;
    }

    .dropdown-content {
        position: static;
        display: block;
        transform: none;
        width: 100%;
        box-shadow: none;
        border: none;
        background-color: var(--bg-alt);
        margin-top: 0;
        animation: none;
    }

    .dropdown-content a {
        padding: 1rem 2rem;
        background-color: var(--bg-alt);
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .dropbtn {
        background-color: rgba(0,0,0,0.02);
        color: var(--accent) !important;
    }

    .nav-links.active {
        transform: translateY(0);
        visibility: visible;
    }

    .hero {
        height: 60vh;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 2rem;
        background: radial-gradient(circle, var(--text-muted) 0%, #000 80%);
    }

    .mobile-fallback-text {
        display: block;
    }

    .hero-overlay {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
    }

    #canvas3d {
        display: none !important;
    }

    footer .footer-container {
        gap: 2rem;
        text-align: center;
    }
}