/* =================================================================
MODERN RESPONSIVE CSS - BORING STUDIO INC.
Mobile-First Approach with Progressive Enhancement
================================================================= */

/* =================================================================
1. CSS RESET & CUSTOM PROPERTIES
================================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --primary-red: #dc2626;
    --red-accent: #cb2020;
    --red-glow: rgba(203, 32, 32, 0.5);
    --dark-bg: #030712;
    --card-bg: rgba(17, 24, 39, 0.7);
    --text-gray: #9ca3af;
    --border-color: #1f2937;
    --text-white: #ffffff;

    /* Typography - Fluid Responsive Sizes */
    --fs-hero: clamp(2.5rem, 5vw + 1rem, 3.75rem);
    --fs-h2: clamp(1.75rem, 4vw, 2.5rem);
    --fs-h3: clamp(1.25rem, 3vw, 1.75rem);
    --fs-h4: clamp(1.1rem, 2.5vw, 1.5rem);
    --fs-body: clamp(0.95rem, 1.5vw, 1.125rem);
    --fs-small: clamp(0.85rem, 1.2vw, 0.95rem);

    /* Spacing - Responsive */
    --spacing-xs: clamp(0.5rem, 1vw, 0.75rem);
    --spacing-sm: clamp(1rem, 2vw, 1.5rem);
    --spacing-md: clamp(1.5rem, 3vw, 2.5rem);
    --spacing-lg: clamp(2rem, 4vw, 4rem);
    --spacing-xl: clamp(3rem, 6vw, 6rem);

    /* Container widths */
    --container-max: 1280px;
    --container-padding: clamp(1rem, 4vw, 2rem);
}

/* =================================================================
2. BASE STYLES
================================================================= */
html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--dark-bg);
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Justified text for better readability */
p,
.text-content {
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    -ms-hyphens: auto;
}

/* Mobile: Center-align headings for better mobile appearance */
@media (max-width: 768px) {

    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        text-align: center;
    }
}

/* =================================================================
3. ANIMATED BACKGROUND - Desktop Only
================================================================= */
@media (min-width: 769px) {
    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background:
            radial-gradient(circle at 20% 50%, rgba(220, 38, 38, 0.1) 0%, transparent 50%),
            radial-gradient(circle at 80% 80%, rgba(220, 38, 38, 0.05) 0%, transparent 50%),
            radial-gradient(circle at 40% 20%, rgba(220, 38, 38, 0.08) 0%, transparent 50%);
        animation: backgroundShift 20s ease-in-out infinite;
        z-index: -1;
    }
}

/* Simplified background for mobile */
@media (max-width: 768px) {
    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(135deg, rgba(220, 38, 38, 0.05) 0%, transparent 100%);
        z-index: -1;
    }
}

@keyframes backgroundShift {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(-20px, -20px) scale(1.1);
    }

    66% {
        transform: translate(20px, -10px) scale(0.95);
    }
}

/* =================================================================
4. FLOATING PARTICLES - Desktop Only
================================================================= */
.particles {
    display: none;
    /* Hidden by default (mobile-first) */
}

@media (min-width: 1024px) {
    .particles {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        pointer-events: none;
        z-index: 1;
    }

    .particle {
        position: absolute;
        width: 4px;
        height: 4px;
        background: rgba(220, 38, 38, 0.7);
        border-radius: 50%;
        animation: float 20s infinite linear;
    }

    .particle.red {
        background: var(--red-glow);
        box-shadow: 0 0 6px var(--red-glow);
    }
}

@keyframes float {
    from {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    to {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

/* =================================================================
5. CONTAINER & LAYOUT
================================================================= */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    position: relative;
    z-index: 10;
}

/* =================================================================
6. NAVIGATION - Mobile Optimized
================================================================= */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    transition: all 0.3s ease;
    backdrop-filter: blur(0px);
    background-color: rgba(0, 0, 0, 0.95);
}

nav.scrolled {
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-content {
    display: flex;
    justify-content: center;
    align-items: center;
    height: clamp(64px, 10vw, 96px);
    padding: 0 var(--spacing-sm);
}

/* Add padding to body to account for fixed nav */
body {
    padding-top: clamp(64px, 10vw, 96px);
}

.logo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.logo-section h1 {
    font-size: clamp(1rem, 3vw, 2rem);
    font-weight: 800;
    letter-spacing: 0.01em;
    color: #fff;
    line-height: 1.05;
}

.logo-section .tagline {
    font-size: clamp(0.5rem, 1vw, 0.9rem);
    font-weight: 600;
    color: var(--red-accent);
    letter-spacing: 0.1em;
    margin-top: 4px;
    opacity: 0;
    animation: fadeInUp 1s ease forwards 0.5s;
}

/* Hide tagline on very small screens */
@media (max-width: 480px) {
    .logo-section .tagline {
        display: none;
    }
}

/* =================================================================
7. HERO SECTION - Fully Responsive
================================================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: linear-gradient(135deg, #030712 0%, #0a0f1c 50%, #030712 100%);
    overflow: hidden;
    padding: var(--spacing-xl) 0;
}

/* Canvas background - hidden on mobile for performance */
#geometric-bg {
    display: none;
}

@media (min-width: 769px) {
    #geometric-bg {
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        opacity: 0.7;
    }
}

.hero-content {
    max-width: 1024px;
    position: relative;
    z-index: 10;
    text-align: center;
}

@media (min-width: 769px) {
    .hero-content {
        text-align: left;
    }
}

.hero-label {
    color: var(--primary-red);
    font-weight: bold;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: var(--spacing-md);
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-sm);
    border: 1px solid var(--primary-red);
    background: rgba(220, 38, 38, 0.1);
    backdrop-filter: blur(10px);
    font-size: var(--fs-small);
}

.hero h2 {
    font-size: var(--fs-hero);
    font-weight: 300;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    opacity: 0;
    animation: fadeInScale 1s ease forwards 0.3s;
}

.hero h2 span {
    display: block;
    font-weight: 400;
    color: var(--red-accent);
}

.hero p {
    font-size: var(--fs-body);
    color: var(--text-gray);
    font-weight: 300;
    max-width: 768px;
    margin: 0 auto var(--spacing-lg);
    line-height: 1.8;
    opacity: 0;
    animation: fadeInUp 1s ease forwards 0.6s;
    text-align: justify;
}

/* =================================================================
8. BUTTONS - Touch Optimized
================================================================= */
.btn-group {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    justify-content: center;
    opacity: 0;
    animation: fadeInUp 1s ease forwards 0.9s;
}

@media (min-width: 769px) {
    .btn-group {
        justify-content: flex-start;
    }
}

.btn-primary,
.btn-secondary {
    padding: clamp(0.875rem, 2vw, 1rem) clamp(1.5rem, 3vw, 2rem);
    font-size: var(--fs-small);
    text-decoration: none;
    font-weight: 300;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    border-radius: 0;
    /* Touch target minimum 44px */
    min-height: 44px;
    touch-action: manipulation;
}

.btn-primary {
    background: linear-gradient(45deg, #dc2626, #ef4444);
    color: white;
    border: none;
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.3);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.5s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(220, 38, 38, 0.5);
}

.btn-secondary {
    border: 1px solid rgba(220, 38, 38, 0.5);
    color: white;
    background: rgba(220, 38, 38, 0.05);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    border-color: var(--primary-red);
    background: rgba(220, 38, 38, 0.1);
    transform: translateY(-2px);
}

/* Disable hover effects on touch devices */
@media (hover: none) {

    .btn-primary:hover,
    .btn-secondary:hover {
        transform: none;
    }
}

/* =================================================================
9. SECTIONS - Responsive Spacing
================================================================= */
.section {
    padding: var(--spacing-xl) 0;
    border-top: 1px solid var(--border-color);
    position: relative;
    overflow: visible;
    /* Changed from hidden to visible */
    min-height: auto;
    /* Ensure content determines height */
}

/* Special handling for policy pages */
.section:has(.policy-content) {
    overflow: visible !important;
    min-height: 100vh;
}

/* Animated border - desktop only */
@media (min-width: 769px) {
    .section::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 1px;
        background: linear-gradient(90deg, transparent, var(--red-accent), var(--primary-red), transparent);
        animation: lineMove 4s ease infinite;
    }
}

@keyframes lineMove {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* Section Labels */
.section-label {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section-label h2 {
    font-size: var(--fs-h2);
    font-weight: 300;
    letter-spacing: 0.1em;
    color: var(--primary-red);
}

/* =================================================================
10. FADE-IN ANIMATIONS
================================================================= */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Force visibility for policy content */
.policy-content.fade-in {
    opacity: 1 !important;
    transform: none !important;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .fade-in {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* =================================================================
11. SOLUTION CARDS - Mobile Optimized
================================================================= */
.solution-item {
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.8), rgba(17, 24, 39, 0.4));
    padding: var(--spacing-md);
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    backdrop-filter: blur(10px);
}

/* Simplified hover for desktop only */
@media (min-width: 769px) {
    .solution-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 20px 40px rgba(220, 38, 38, 0.2);
    }

    .solution-item::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(45deg, transparent 30%, rgba(220, 38, 38, 0.1) 50%, transparent 70%);
        opacity: 0;
        transition: opacity 0.3s;
    }

    .solution-item:hover::before {
        opacity: 1;
    }
}

.solution-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: var(--spacing-sm);
    align-items: start;
}

/* Stack on mobile */
@media (max-width: 768px) {
    .solution-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

.solution-number {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 100;
    color: #374151;
    transition: all 0.3s;
}

.solution-item:hover .solution-number {
    color: var(--primary-red);
}

/* Disable text shadow on mobile for performance */
@media (min-width: 769px) {
    .solution-item:hover .solution-number {
        text-shadow: 0 0 20px rgba(220, 38, 38, 0.5);
    }
}

/* =================================================================
12. FOOTER - Fully Responsive
================================================================= */
footer {
    background: linear-gradient(to bottom, #000000, #030712);
    padding: var(--spacing-lg) 0 var(--spacing-md);
    position: relative;
}

/* Mobile-first footer styling */
.footer-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: var(--spacing-lg) !important;
    padding-bottom: var(--spacing-lg) !important;
    border-bottom: 1px solid var(--border-color) !important;
    align-items: center !important;
    text-align: center !important;
    grid-template-columns: none !important;
}

/* Desktop grid layout */
@media (min-width: 769px) {
    footer {
        padding: var(--spacing-xl) 0 var(--spacing-lg);
    }

    .footer-grid {
        display: grid !important;
        grid-template-columns: 2fr 1fr 1fr !important;
        gap: var(--spacing-lg) !important;
        align-items: start !important;
        text-align: left !important;
        flex-direction: unset !important;
    }
}

/* First column - Brand section */
.footer-grid>div:first-child {
    order: 1;
    width: 100%;
    text-align: center !important;
}

/* Hide description text on mobile */
.footer-grid>div:first-child>p {
    display: none;
}

@media (min-width: 769px) {
    .footer-grid>div:first-child {
        text-align: left !important;
        width: auto;
    }

    .footer-grid>div:first-child>p {
        display: block;
        color: #fff;
        font-size: 14px;
        line-height: 1.7;
        margin-bottom: 24px;
        max-width: 250px;
        text-align: left;
    }
}

/* Brand section */
.footer-brand {
    margin-bottom: var(--spacing-sm);
}

.footer-brand h4 {
    font-size: clamp(1.125rem, 3vw, 1.25rem);
    font-weight: 600;
    color: var(--red-accent);
    margin-bottom: 0.25rem;
}

.footer-brand p {
    font-size: clamp(0.625rem, 1.5vw, 0.75rem);
    color: #fff;
    letter-spacing: 0.15em;
}

/* Incorporated section - simplified on mobile */
.footer-grid>div:first-child>div {
    margin-top: var(--spacing-sm);
}

.footer-grid>div:first-child>div>p:first-child {
    font-size: clamp(0.75rem, 2vw, 1.25rem);
    color: var(--red-accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.25rem;
}

@media (max-width: 768px) {

    /* Center brand, tagline, city */
    .footer-brand,
    .footer-brand h4,
    .footer-brand p,
    .footer-grid>div:first-child>div>p:last-child {
        text-align: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
        width: 100% !important;
        display: block !important;
    }

    /* Hide company section */
    .footer-grid>div:nth-child(2) {
        display: none !important;
    }

    /* Footer bottom layout */
    .footer-bottom {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 0.5rem !important;
    }

    .footer-bottom .copyright {
        margin-bottom: 0.5rem !important;
        width: 100%;
        text-align: center !important;
    }

    .footer-legal {
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100%;
        gap: 0.5rem !important;
    }

    .footer-legal span {
        display: inline !important;
    }

    .footer-legal a {
        font-size: 1rem;
        padding: 0 0.25rem;
    }
}


.footer-grid>div:first-child>div>p:last-child {
    font-size: clamp(0.875rem, 1.5vw, 1rem);
    color: #ffffff;
}

/* Second column - Company links */
.footer-grid>div:nth-child(2) {
    order: 3;
}

.footer-heading {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    font-weight: 500;
    letter-spacing: 0.1em;
    color: var(--red-accent);
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
}

/* Footer links */
.footer-links {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links li {
    margin-bottom: 0;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
    font-size: clamp(0.875rem, 1.5vw, 1rem);
    transition: all 0.3s;
    display: inline-block;
    padding: 0.5rem 1rem;
    /* Better touch targets on mobile */
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-links a:hover {
    color: var(--primary-red);
}

/* Third column - Contact */
.footer-grid>div:nth-child(3) {
    order: 2;
}

/* Contact links container */
.footer-grid>div:nth-child(3)>div {
    display: flex !important;
    flex-direction: column !important;
    gap: var(--spacing-xs) !important;
    align-items: center !important;
}

.footer-grid>div:nth-child(3) a {
    font-size: clamp(0.875rem, 1.5vw, 1rem);
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    min-height: 44px;
}

.footer-grid>div:nth-child(3) a span {
    color: var(--red-accent);
    font-size: 1.25rem;
}

/* Desktop alignment adjustments */
@media (min-width: 769px) {
    .footer-grid>div {
        width: auto !important;
    }

    .footer-grid>div:first-child {
        order: unset;
        text-align: left !important;
    }

    .footer-grid>div:nth-child(2) {
        order: unset;
        text-align: center !important;
    }

    .footer-grid>div:nth-child(3) {
        order: unset;
        text-align: right !important;
    }

    .footer-grid>div:nth-child(3)>div {
        align-items: flex-end !important;
    }

    .footer-links {
        gap: 0;
    }

    .footer-links a {
        padding: 0.25rem 0;
        justify-content: center;
        font-size: 14px;
    }

    .footer-grid>div:nth-child(3) a {
        font-size: 14px;
    }
}

/* Footer bottom - simplified for mobile */
.footer-bottom {
    display: flex !important;
    flex-direction: column !important;
    gap: var(--spacing-xs) !important;
    align-items: center !important;
    padding-top: var(--spacing-md) !important;
    font-size: clamp(0.75rem, 1.5vw, 0.875rem) !important;
    color: var(--red-accent) !important;
    text-align: center !important;
    justify-content: center !important;
}

/* Hide copyright details on very small screens */
@media (max-width: 480px) {

    .footer-bottom>div:first-child>span:nth-child(2),
    .footer-bottom>div:first-child>span:nth-child(3) {
        display: none;
    }
}

/* Legal links - simplified */
.footer-legal {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    justify-content: center !important;
    align-items: center !important;
    flex-direction: column !important;
}

@media (min-width: 769px) {
    .footer-legal {
        flex-direction: row !important;
    }
}

.footer-legal a {
    color: var(--red-accent);
    text-decoration: none;
    transition: color 0.2s;
    padding: 0.5rem;
    font-size: clamp(0.75rem, 1.5vw, 0.875rem);
}

.footer-legal span {
    color: #fff;
    font-size: 0.75rem;
}

/* Hide separators on mobile */
@media (max-width: 768px) {
    .footer-legal span {
        display: none;
    }
}

.footer-legal a:hover {
    color: #fff;
}

/* Desktop footer bottom layout */
@media (min-width: 769px) {
    .footer-bottom {
        flex-direction: row !important;
        justify-content: space-between !important;
        text-align: left !important;
        font-size: 14px !important;
    }

    .footer-legal {
        gap: 8px;
    }

    .footer-legal a {
        padding: 0.25rem;
        font-size: 14px;
    }

    .footer-legal span {
        display: inline;
    }
}

/* =================================================================
13. POLICY PAGES - Mobile Optimized
================================================================= */
.policy-content {
    color: #fff !important;
    font-size: var(--fs-body);
    line-height: 1.8;
    max-width: 800px;
    /* Increased from 65ch for better compatibility */
    margin: 0 auto;
    padding: var(--spacing-sm);
    /* Add padding for mobile */
    display: block !important;
    /* Force display */
    visibility: visible !important;
    /* Force visibility */
    opacity: 1 !important;
    /* Override any fade-in issues */
}

.policy-content * {
    color: #fff !important;
    /* Ensure all child elements are visible */
    visibility: visible !important;
}

.policy-content p {
    margin-bottom: var(--spacing-sm);
    text-align: justify;
    hyphens: auto;
    display: block !important;
}

/* Left-align on mobile for better readability */
@media (max-width: 768px) {
    .policy-content p {
        text-align: left;
    }
}

/* Policy page container styles */
.section>.container>div {
    display: block !important;
    visibility: visible !important;
}

/* Policy article content */
article.policy-content {
    display: block !important;
    position: relative;
    z-index: 10;
    background-color: transparent;
}

.policy-content h2,
.policy-content h3,
.policy-content h4 {
    color: var(--primary-red);
    font-weight: 600;
    letter-spacing: 0.03em;
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
    display: block !important;
    visibility: visible !important;
}

.policy-content h2 {
    font-size: var(--fs-h2);
}

.policy-content h3 {
    font-size: var(--fs-h3);
}

.policy-content h4 {
    font-size: var(--fs-h4);
    color: var(--red-accent);
}

.policy-content ul {
    margin: 0 0 var(--spacing-sm) var(--spacing-md);
    padding: 0;
    list-style: disc outside;
    display: block !important;
    visibility: visible !important;
}

/* Mobile-specific policy page adjustments */
@media (max-width: 768px) {
    .policy-content ul {
        margin-left: var(--spacing-sm);
    }
}

.policy-content li {
    margin-bottom: var(--spacing-xs);
    line-height: 1.8;
    display: list-item !important;
    visibility: visible !important;
}

.policy-content a,
.footer-legal a {
    color: var(--red-accent) !important;
    text-decoration: underline;
    transition: color 0.2s;
    word-break: break-word;
    /* Better than break-all */
}

.policy-content a:hover,
.footer-legal a:hover {
    color: #fff !important;
    text-decoration: underline;
}

/* =================================================================
14. MODALS - Mobile Optimized
================================================================= */
#careers-modal,
#investor-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(20, 24, 29, 0.95);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm);
}

#careers-modal>div,
#investor-modal>div {
    background: #111827;
    color: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
    padding: var(--spacing-lg) var(--spacing-md);
    max-width: min(90vw, 400px);
    text-align: center;
    border: 2px solid var(--red-accent);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

/* Modal close button - touch optimized */
#careers-modal span,
#investor-modal span {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    cursor: pointer;
    color: var(--red-accent);
    font-size: 1.5rem;
    font-weight: bold;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

#careers-modal span:hover,
#investor-modal span:hover {
    background: rgba(220, 38, 38, 0.1);
}

/* Modal button */
#careers-modal button,
#investor-modal button {
    margin-top: var(--spacing-sm);
    background: var(--red-accent);
    color: #fff;
    border: none;
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: 8px;
    font-size: var(--fs-small);
    cursor: pointer;
    min-height: 44px;
    transition: background 0.2s;
}

#careers-modal button:hover,
#investor-modal button:hover {
    background: var(--primary-red);
}

/* =================================================================
15. LOADING SCREEN
================================================================= */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-inner {
    width: clamp(40px, 10vw, 60px);
    height: clamp(40px, 10vw, 60px);
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* =================================================================
16. ANIMATIONS - Mobile Optimized
================================================================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* =================================================================
17. ACCESSIBILITY & PERFORMANCE
================================================================= */

/* Focus styles for keyboard navigation */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--primary-red);
    outline-offset: 2px;
}

/* Skip to content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-red);
    color: white;
    padding: var(--spacing-xs) var(--spacing-sm);
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Reduce animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* =================================================================
18. PRINT STYLES
================================================================= */
@media print {
    body {
        background: white;
        color: black;
    }

    nav,
    .particles,
    #geometric-bg,
    .loader,
    footer {
        display: none !important;
    }

    .section {
        page-break-inside: avoid;
    }

    a {
        color: black;
        text-decoration: underline;
    }

    a[href^="http"]:after {
        content: " (" attr(href) ")";
    }
}

/* =================================================================
19. UTILITIES
================================================================= */
.text-gray {
    color: var(--text-white);
}

.text-gray-larger {
    font-size: 18px;
}

.text-center {
    text-align: center;
}

.text-justify {
    text-align: justify;
}

/* Mobile visibility utilities */
.hidden-mobile {
    display: none !important;
}

.visible-mobile {
    display: block !important;
}

@media (min-width: 769px) {
    .hidden-mobile {
        display: block !important;
    }

    .visible-mobile {
        display: none !important;
    }
}

/* Hide on very small screens */
@media (max-width: 480px) {
    .hidden-xs {
        display: none !important;
    }
}

/* Hide on tablets and below */
@media (max-width: 1024px) {
    .hidden-tablet {
        display: none !important;
    }
}

/* =================================================================
20. CUSTOM SCROLLBAR - Desktop Only
================================================================= */
@media (min-width: 1024px) {

    /* Webkit browsers */
    ::-webkit-scrollbar {
        width: 10px;
    }

    ::-webkit-scrollbar-track {
        background: var(--dark-bg);
    }

    ::-webkit-scrollbar-thumb {
        background: var(--red-accent);
        border-radius: 5px;
    }

    ::-webkit-scrollbar-thumb:hover {
        background: var(--primary-red);
    }

    /* Firefox */
    * {
        scrollbar-width: thin;
        scrollbar-color: var(--red-accent) var(--dark-bg);
    }
}

@media (max-width: 768px) {
    .footer-grid>div:nth-child(2) {
        display: none !important;
    }
}

@media (max-width: 768px) {
  .footer-legal {
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0.5rem !important;
  }
  .footer-legal span {
    display: inline !important;
    margin: 0 0.25em;
  }
  .footer-legal a {
    padding: 0 0.1em;
    font-size: 10px;
    text-decoration: none;
  }
}
