/* ==========================================================================
   Kaxo Technologies — Shared Styles
   Variables, reset, navigation, mobile menu, footer, utilities
   ========================================================================== */

/* ===== CSS VARIABLES ===== */
:root {
    /* Core palette */
    --navy: #0a1628;
    --navy-mid: #0d1e38;
    --navy-light: #122a4e;
    --gold: #d4af37;
    --gold-light: #e5c565;
    --gold-glow: rgba(212, 175, 55, 0.6);
    --white: #ffffff;
    --gray-light: #94a3b8;
    --gray-dark: #64748b;

    /* Semantic aliases (used by insights/single.html) */
    --color-bg-primary: #0a1628;
    --color-bg-secondary: #0d1d2d;
    --color-text-primary: #ffffff;
    --color-text-secondary: #c0c0c0;
    --color-text-muted: #a0a0a0;
    --color-border: #1a2d42;
    --color-accent: #D4AF37;
    --color-accent-hover: #e5c354;
}

/* ===== RESET ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--navy);
    color: var(--white);
    line-height: 1.6;
    min-height: 100vh;
}

/* ===== UTILITIES ===== */
.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;
}

/* ===== NAVIGATION (default: opaque, fixed) ===== */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0.75rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    transition: all 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}

/* Transparent nav modifier — homepage only */
nav.nav--transparent {
    background: transparent;
    backdrop-filter: none;
    border-bottom: none;
    padding: 1.25rem 3rem;
}

nav.nav--transparent.scrolled {
    padding: 0.75rem 3rem;
    background: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.nav-logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.nav-logo-container img {
    height: 100px;
    width: auto;
}

.nav-links {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--gray-light);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--gold);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--gold);
}

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

/* ===== NAV CTA BUTTON ===== */
.nav-cta {
    background: var(--gold);
    color: var(--navy);
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-cta:hover {
    background: var(--gold-light);
    transform: translateY(-1px);
}

/* Homepage only: hide nav CTA until hero scrolls out */
nav[data-hero-cta-reveal] .nav-cta {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

nav[data-hero-cta-reveal] .nav-cta.visible {
    opacity: 1;
    pointer-events: auto;
}

/* ===== HAMBURGER MENU BUTTON ===== */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    position: relative;
    transition: background 0.3s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--white);
    left: 0;
    transition: all 0.3s ease;
}

.hamburger::before { top: -7px; }
.hamburger::after { bottom: -7px; }

.nav-toggle.active .hamburger { background: transparent; }
.nav-toggle.active .hamburger::before { top: 0; transform: rotate(45deg); }
.nav-toggle.active .hamburger::after { bottom: 0; transform: rotate(-45deg); }

/* ===== MOBILE MENU OVERLAY ===== */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 22, 40, 0.98);
    backdrop-filter: blur(20px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.mobile-nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    gap: 2rem;
    padding: 0;
    margin: 0;
}

.mobile-nav-links li {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.mobile-menu.active .mobile-nav-links li {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu.active .mobile-nav-links li:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.active .mobile-nav-links li:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu.active .mobile-nav-links li:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu.active .mobile-nav-links li:nth-child(4) { transition-delay: 0.25s; }
.mobile-menu.active .mobile-nav-links li:nth-child(5) { transition-delay: 0.3s; }

.mobile-nav-links a {
    color: var(--white);
    text-decoration: none;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.75rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.mobile-nav-links a:hover {
    color: var(--gold);
}

/* ===== SIMPLE FOOTER (inner pages) ===== */
footer {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--gray-dark);
    font-size: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

footer a {
    color: var(--gray-light);
    text-decoration: none;
}

footer a:hover {
    color: var(--gold);
}

/* ===== RESPONSIVE — NAV COLLAPSE ===== */
@media (max-width: 768px) {
    nav {
        padding: 0.75rem 1.5rem;
    }

    nav.nav--transparent {
        padding: 0.75rem 1.5rem;
    }

    .nav-logo-container img {
        height: 70px;
    }

    .nav-links {
        display: none;
    }

    .nav-cta {
        display: none;
    }

    .nav-toggle {
        display: block;
    }

    .mobile-menu {
        display: block;
    }
}
