/* FlightAtom - Shared Styles */

/* --- CSS VARIABLES --- */
:root {
    /* Color Palette */
    --bg: #080d19;
    --bg-secondary: #0d1424;
    --surface: rgba(30, 41, 59, 0.5);
    --surface-solid: #1e293b;
    --surface-hover: rgba(51, 65, 85, 0.6);
    --surface-border: rgba(56, 189, 248, 0.1);

    --text: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;

    --accent: #38bdf8;
    --accent-secondary: #0ea5e9;
    --accent-glow: rgba(56, 189, 248, 0.15);
    --accent-glow-strong: rgba(56, 189, 248, 0.3);

    /* Gradient Colors */
    --gradient-start: #38bdf8;
    --gradient-end: #818cf8;
    --gradient-text: linear-gradient(135deg, #38bdf8 0%, #7dd3fc 100%);

    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(56, 189, 248, 0.3);

    --radius: 16px;
    --radius-sm: 10px;
    --radius-lg: 24px;

    --nav-height: 72px;

    /* Timing Functions */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- RESET & BASE --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
    padding-top: var(--nav-height);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* --- NAVIGATION --- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--nav-height);
    padding: 0 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: rgba(8, 13, 25, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
    transition: all 0.4s var(--ease-out-expo);
}

nav.scrolled {
    background: rgba(8, 13, 25, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    border-bottom-color: var(--surface-border);
}

/* Logo */
.logo {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--text);
    letter-spacing: -0.5px;
    text-decoration: none;
    z-index: 1002;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.3s var(--ease-out-expo);
}

.logo:hover {
    transform: scale(1.02);
}

.logo-atom {
    position: relative;
    width: 36px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-orbit {
    position: absolute;
    top: 50%; left: 0;
    width: 100%;
    height: 40%;
    border: 1.5px solid rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    transform: translateY(-50%);
    transition: all 0.3s var(--ease-out-expo);
}

.logo-orbit:nth-child(1) { transform: translateY(-50%) rotate(50deg); }
.logo-orbit:nth-child(2) { transform: translateY(-50%) rotate(-50deg); }

.logo:hover .logo-orbit {
    border-color: var(--accent);
}

.logo-nucleus {
    position: absolute;
    width: 7px;
    height: 7px;
    background: #fff;
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 0 12px rgba(255,255,255,0.6);
    transition: all 0.3s var(--ease-out-expo);
}

.logo:hover .logo-nucleus {
    background: var(--accent);
    box-shadow: 0 0 20px var(--accent);
}

/* Nav Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links > a,
.nav-links .dropdown > a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    transition: all 0.3s var(--ease-out-expo);
    position: relative;
}

.nav-links > a:hover,
.nav-links .dropdown:hover > a {
    color: var(--text);
    background: var(--surface);
}

.nav-links > a.nav-cta {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
}

.nav-links > a.nav-cta:hover {
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 260px;
    padding: 12px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s var(--ease-out-expo);
    z-index: 1001;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px var(--accent-glow);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s var(--ease-out-expo);
}

.dropdown-menu a:hover {
    background: var(--surface);
    color: var(--text);
    transform: translateX(4px);
}

.dropdown-menu a.active {
    background: var(--accent-glow);
    color: var(--accent);
}

.dropdown-menu .menu-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent);
    padding: 12px 16px 8px;
    font-weight: 600;
}

.dropdown-menu .menu-label:not(:first-child) {
    margin-top: 8px;
    border-top: 1px solid var(--border);
    padding-top: 16px;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    padding: 10px;
    background: none;
    border: none;
    z-index: 1002;
}

.hamburger span,
.hamburger .bar {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s var(--ease-out-expo);
}

.hamburger.active span:nth-child(1),
.hamburger.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2),
.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3),
.hamburger.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* --- FOOTER --- */
footer {
    padding: 40px 48px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--surface-border);
}

footer a {
    color: var(--accent);
    text-decoration: none;
    transition: opacity 0.2s;
}

footer a:hover {
    opacity: 0.8;
}

/* --- COMMON ANIMATIONS --- */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    nav {
        padding: 0 24px;
    }

    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg);
        flex-direction: column;
        padding: 32px 24px;
        gap: 8px;
        transform: translateX(-100%);
        transition: transform 0.4s var(--ease-out-expo);
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-links > a,
    .nav-links .dropdown > a {
        width: 100%;
        padding: 16px;
        font-size: 1rem;
    }

    .nav-cta {
        margin-top: 16px;
        text-align: center;
    }

    .dropdown-menu {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0 0 0 16px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s var(--ease-out-expo);
    }

    .dropdown.active .dropdown-menu {
        max-height: 500px;
    }

    footer {
        padding: 30px 24px;
    }
}

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