/* ===========================
   GLOBAL STYLES - NEO-BRUTALISM DESIGN SYSTEM
   =========================== */

/* CSS Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    line-height: 1.6;
    color: #000000;
    background-color: #FFFEF0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===========================
   DESIGN TOKENS
   =========================== */

:root {
    /* Primary Colors */
    --color-electric-blue: #0066FF;
    --color-cyber-lime: #CCFF00;
    --color-hot-pink: #FF0099;
    --color-pure-black: #000000;
    --color-off-white: #FFFEF0;
    
    /* Secondary Colors */
    --color-tangerine: #FF6B35;
    --color-purple-haze: #7B2CBF;
    --color-mint-green: #00FFB7;
    --color-butter-yellow: #FFE500;
    --color-concrete-gray: #E8E8E8;
    
    /* Typography */
    --font-display: 'Space Grotesk', sans-serif;
    --font-heading: 'Inter', sans-serif;
    --font-body: 'IBM Plex Mono', monospace;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    --spacing-3xl: 6rem;
    
    /* Borders */
    --border-thin: 2px;
    --border-medium: 4px;
    --border-thick: 6px;
    --border-extra-thick: 8px;
    
    /* Shadows */
    --shadow-offset: 8px;
    --shadow-offset-lg: 12px;
    --shadow-offset-xl: 16px;
    
    /* Breakpoints */
    --breakpoint-mobile: 480px;
    --breakpoint-tablet: 768px;
    --breakpoint-desktop: 1024px;
    --breakpoint-wide: 1440px;

    /* Safe area insets (iOS/Android) */
    --safe-top: env(safe-area-inset-top);
    --safe-right: env(safe-area-inset-right);
    --safe-bottom: env(safe-area-inset-bottom);
    --safe-left: env(safe-area-inset-left);
}

/* Accessibility & tap target 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: 0;
}

:focus-visible {
    outline: 3px dashed var(--color-electric-blue);
    outline-offset: 3px;
}

/* Ensure minimum 44px tap targets on interactive elements */
a, button, .nav-link, .filter-btn, .cta-button, .submit-button, .mobile-menu-link,
.social-link, .footer-links a, .tool-tag, .tech-tag {
    min-height: 44px;
    min-width: 44px;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    touch-action: manipulation;
}

/* ===========================
   TYPOGRAPHY
   =========================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 900;
    line-height: 1.1;
    color: var(--color-pure-black);
    text-transform: uppercase;
}

h1 {
    font-size: clamp(3rem, 8vw, 6rem);
}

h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.8;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
}

strong {
    font-weight: 600;
}

/* ===========================
   UTILITY CLASSES
   =========================== */

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-family: var(--font-display);
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: var(--spacing-2xl);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    height: var(--border-thick);
    background: var(--color-pure-black);
}

/* Highlight Boxes */
.highlight-box {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-sm);
    border: var(--border-thick) solid var(--color-pure-black);
    font-weight: 700;
    text-transform: uppercase;
    position: relative;
}

.highlight-box.blue {
    background: var(--color-electric-blue);
    color: white;
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--color-pure-black);
}

.highlight-box.lime {
    background: var(--color-cyber-lime);
    color: var(--color-pure-black);
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--color-pure-black);
}

.highlight-box.pink {
    background: var(--color-hot-pink);
    color: white;
    box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--color-pure-black);
}

/* ===========================
   NAVIGATION
   =========================== */

.nav-main {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--color-off-white);
    border-bottom: var(--border-thick) solid var(--color-pure-black);
    padding: var(--spacing-md) 0;
}

.nav-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 900;
    padding: var(--spacing-xs) var(--spacing-md);
    background: var(--color-pure-black);
    color: var(--color-off-white);
    border: var(--border-medium) solid var(--color-pure-black);
    transform: rotate(-2deg);
    transition: transform 0.2s ease;
}

.logo-text:hover {
    transform: rotate(2deg);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
}

.nav-link {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    padding: var(--spacing-xs) var(--spacing-sm);
    position: relative;
    display: block;
}

.nav-item.active .nav-link,
.nav-link:hover {
    background: var(--color-electric-blue);
    color: white;
    border: var(--border-thin) solid var(--color-pure-black);
    box-shadow: var(--border-medium) var(--border-medium) 0 var(--color-pure-black);
    transform: translate(-2px, -2px);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-sm);
}

.nav-toggle span {
    width: 30px;
    height: 4px;
    background: var(--color-pure-black);
    transition: all 0.3s ease;
}

/* Mobile Menu */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-off-white);
    z-index: 2000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.mobile-menu-overlay.active {
    transform: translateX(0);
}

.mobile-menu-close {
    position: absolute;
    top: var(--spacing-lg);
    right: var(--spacing-lg);
    font-size: 3rem;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 900;
}

.mobile-menu {
    list-style: none;
    padding: var(--spacing-3xl) var(--spacing-lg);
}

.mobile-menu-link {
    display: block;
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 900;
    text-transform: uppercase;
    padding: var(--spacing-md) 0;
    border-bottom: var(--border-thick) solid var(--color-pure-black);
}

/* Edge swipe area to open menu on mobile */
.edge-swipe-area {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 16px; /* small gesture area at screen edge */
    z-index: 1500;
    background: transparent;
}

.mobile-menu li:nth-child(1) .mobile-menu-link {
    color: var(--color-electric-blue);
}

.mobile-menu li:nth-child(2) .mobile-menu-link {
    color: var(--color-hot-pink);
}

.mobile-menu li:nth-child(3) .mobile-menu-link {
    color: var(--color-cyber-lime);
    text-shadow: 2px 2px 0 var(--color-pure-black);
}

.mobile-menu li:nth-child(4) .mobile-menu-link {
    color: var(--color-tangerine);
}

/* ===========================
   BUTTONS
   =========================== */

.cta-button {
    display: inline-block;
    position: relative;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.125rem;
    text-transform: uppercase;
    padding: var(--spacing-md) var(--spacing-xl);
    background: var(--color-cyber-lime);
    color: var(--color-pure-black);
    border: var(--border-thick) solid var(--color-pure-black);
    cursor: pointer;
    transition: all 0.2s ease;
}

.cta-button.primary {
    background: var(--color-hot-pink);
    color: white;
}

.cta-button.secondary {
    background: var(--color-electric-blue);
    color: white;
}

.button-shadow {
    position: absolute;
    top: var(--shadow-offset);
    left: var(--shadow-offset);
    right: calc(var(--shadow-offset) * -1);
    bottom: calc(var(--shadow-offset) * -1);
    background: var(--color-pure-black);
    z-index: -1;
    transition: all 0.2s ease;
}

.cta-button:hover {
    transform: translate(-4px, -4px);
}

.cta-button:hover .button-shadow {
    top: calc(var(--shadow-offset) + 4px);
    left: calc(var(--shadow-offset) + 4px);
}

/* ===========================
   FOOTER
   =========================== */

.footer {
    background: var(--color-off-white);
    border-top: var(--border-extra-thick) solid var(--color-pure-black);
    margin-top: var(--spacing-3xl);
}

.footer-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: var(--spacing-2xl) var(--spacing-lg);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-2xl);
}

.footer-column {
    border-left: var(--border-thick) solid var(--color-pure-black);
    padding-left: var(--spacing-md);
}

.footer-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 900;
    margin-bottom: var(--spacing-sm);
}

.footer-text {
    font-size: 0.875rem;
    margin-bottom: var(--spacing-xs);
}

.footer-links {
    list-style: none;
}

.footer-links a {
    display: block;
    padding: var(--spacing-xs) 0;
    font-weight: 500;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.footer-links a:hover {
    padding-left: var(--spacing-sm);
    color: var(--color-electric-blue);
}

.social-links {
    display: flex;
    gap: var(--spacing-sm);
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border: var(--border-thick) solid var(--color-pure-black);
    background: var(--color-off-white);
    font-weight: 900;
    transition: all 0.2s ease;
}

.social-link:hover {
    background: var(--color-electric-blue);
    color: white;
    transform: rotate(-5deg);
    box-shadow: var(--border-medium) var(--border-medium) 0 var(--color-pure-black);
}

.footer-bottom {
    border-top: var(--border-medium) solid var(--color-pure-black);
    padding: var(--spacing-md);
    text-align: center;
}

.ticker-tape {
    overflow: hidden;
    white-space: nowrap;
    margin-bottom: var(--spacing-md);
}

.ticker-content {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: ticker 20s linear infinite;
}

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

.copyright {
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .container {
        padding: 0 var(--spacing-md);
    }
    
    .footer-container {
        grid-template-columns: 1fr;
    }
    
    .footer-column {
        border-left: none;
        border-top: var(--border-thick) solid var(--color-pure-black);
        padding-left: 0;
        padding-top: var(--spacing-md);
    }
    
    .footer-column:first-child {
        border-top: none;
    }
}

@media (max-width: 480px) {
    :root {
        --shadow-offset: 6px;
        --shadow-offset-lg: 8px;
    }
    
    h1 {
        font-size: clamp(2rem, 10vw, 3rem);
    }
    
    h2 {
        font-size: clamp(1.5rem, 7vw, 2rem);
    }
    
    .cta-button {
        font-size: 1rem;
        padding: var(--spacing-sm) var(--spacing-md);
    }

    /* Provide space for bottom nav */
    body {
        padding-bottom: calc(64px + var(--safe-bottom));
    }
}

/* ===========================
   BOTTOM NAVIGATION (Mobile)
   =========================== */

.bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 64px;
    padding-bottom: var(--safe-bottom);
    background: var(--color-off-white);
    border-top: var(--border-thick) solid var(--color-pure-black);
    display: none;
    z-index: 2500;
}

.bottom-nav .bottom-nav-inner {
    height: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-family: var(--font-body);
    font-weight: 700;
    text-transform: uppercase;
}

.bottom-nav-item .icon {
    font-size: 1.25rem;
    line-height: 1;
}

.bottom-nav-item .label {
    font-size: 0.625rem;
    letter-spacing: 0.5px;
}

.bottom-nav-item.active {
    background: var(--color-cyber-lime);
    border-left: var(--border-thin) solid var(--color-pure-black);
    border-right: var(--border-thin) solid var(--color-pure-black);
}

@media (max-width: 480px) {
    .bottom-nav { display: block; }
}