/* TruthSignal - Steve Jobs Edition Base Styles */
/* Following design system from CLAUDE.md */

/* ============================================
   GLOBAL RESET & FOUNDATION
   ============================================ */

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

:root {
    /* Color System */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F5F5F7;
    --bg-tertiary: #FAFAFA;
    --text-primary: #1D1D1F;
    --text-secondary: #6E6E73;
    --text-tertiary: #98989D;

    /* Brand Colors */
    --truth-blue: #007AFF;
    --credible-green: #34C759;
    --uncertain-orange: #FF9500;
    --false-red: #FF3B30;

    /* Spacing Scale (8px based) */
    --space-xs: 0.5rem;   /* 8px */
    --space-sm: 1rem;     /* 16px */
    --space-md: 1.5rem;   /* 24px */
    --space-lg: 2rem;     /* 32px */
    --space-xl: 3rem;     /* 48px */
    --space-2xl: 4rem;    /* 64px */

    /* Typography */
    --font-primary: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #000000;
        --bg-secondary: #1C1C1E;
        --bg-tertiary: #2C2C2E;
        --text-primary: #FFFFFF;
        --text-secondary: #98989D;
        --text-tertiary: #6E6E73;
    }
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--font-primary);
    color: var(--text-primary);
    background: var(--bg-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ============================================
   MINIMAL GLOBAL NAVIGATION
   ============================================ */

.nav-minimal-global {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 0.5px solid rgba(0, 0, 0, 0.05);
}

@media (prefers-color-scheme: dark) {
    .nav-minimal-global {
        background: rgba(0, 0, 0, 0.8);
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
}

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

.logo-jobs {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
    transition: opacity 0.2s ease;
}

.logo-jobs:hover {
    opacity: 0.7;
}

.nav-actions-global {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link-subtle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.938rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-link-subtle:hover {
    color: var(--truth-blue);
}

.x-icon-nav {
    width: 14px;
    height: 14px;
}

/* Mobile Menu Toggle (Hamburger) */
.mobile-menu-toggle {
    display: none; /* Hidden on desktop */
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
}

.hamburger-line {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hamburger animation when menu is open */
.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */

.main-content-jobs {
    margin-top: 60px; /* Account for fixed nav */
    min-height: calc(100vh - 60px - 200px);
}

/* ============================================
   MINIMAL GLOBAL FOOTER
   ============================================ */

.footer-minimal-global {
    background: var(--bg-secondary);
    border-top: 0.5px solid rgba(0, 0, 0, 0.05);
    padding: var(--space-xl) var(--space-md);
    margin-top: var(--space-2xl);
}

@media (prefers-color-scheme: dark) {
    .footer-minimal-global {
        background: var(--bg-secondary);
        border-top-color: rgba(255, 255, 255, 0.1);
    }
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.footer-brand {
    flex: 1;
}

.footer-logo-jobs {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.footer-tagline-jobs {
    font-size: 0.938rem;
    color: var(--text-secondary);
}

.footer-links {
    display: flex;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.footer-link-jobs {
    font-size: 0.938rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-link-jobs:hover {
    color: var(--truth-blue);
}

.footer-bottom-jobs {
    text-align: center;
    padding-top: var(--space-lg);
    border-top: 0.5px solid rgba(0, 0, 0, 0.05);
    font-size: 0.813rem;
    color: var(--text-tertiary);
}

@media (prefers-color-scheme: dark) {
    .footer-bottom-jobs {
        border-top-color: rgba(255, 255, 255, 0.1);
    }
}

/* ============================================
   RESPONSIVE BEHAVIOR
   ============================================ */

@media (max-width: 768px) {
    .nav-container {
        padding: 0.875rem 1rem;
        position: relative;
    }

    .logo-jobs {
        font-size: 1.125rem;
    }

    /* Show hamburger button on mobile */
    .mobile-menu-toggle {
        display: flex;
    }

    /* Hide nav links by default on mobile */
    .nav-actions-global {
        position: fixed;
        top: 57px; /* Below navbar */
        left: 0;
        right: 0;
        background: var(--bg-primary);
        border-bottom: 0.5px solid rgba(0, 0, 0, 0.05);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                    opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    }

    /* Dark mode support for mobile menu */
    @media (prefers-color-scheme: dark) {
        .nav-actions-global {
            background: var(--bg-secondary);
            border-bottom-color: rgba(255, 255, 255, 0.1);
        }
    }

    /* Show nav when menu is open */
    .nav-actions-global.nav-open {
        max-height: 400px;
        opacity: 1;
    }

    /* Style links in mobile menu */
    .nav-actions-global .nav-link-subtle {
        padding: 1rem 1.5rem;
        font-size: 1rem;
        border-bottom: 0.5px solid rgba(0, 0, 0, 0.05);
        justify-content: flex-start;
    }

    @media (prefers-color-scheme: dark) {
        .nav-actions-global .nav-link-subtle {
            border-bottom-color: rgba(255, 255, 255, 0.05);
        }
    }

    .nav-actions-global .nav-link-subtle:last-child {
        border-bottom: none;
    }

    /* Footer responsive */
    .footer-main {
        flex-direction: column;
        gap: var(--space-md);
    }

    .footer-links {
        gap: var(--space-md);
    }

    .footer-minimal-global {
        padding: var(--space-lg) var(--space-md);
    }
}

/* ============================================
   ACCESSIBILITY & MOTION
   ============================================ */

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

/* Focus states for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--truth-blue);
    outline-offset: 2px;
}
