
/* Global Font Fix (Ensures privacy.html and others don't fall back to default serif) */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
html { scroll-behavior: smooth; }
/* Performax 1 - Global Design Tokens */
:root {
    /* Core Brand Colors */
    --bg-primary: #0A0A0A;
    --bg-surface: #171717;
    --bg-surface-hover: #262626;
    
    --color-primary: #E61919;
    --color-primary-hover: #FF3333;
    --color-secondary: #1A66FF;
    --color-accent: #00E5FF;
    
    --text-primary: #FFFFFF;
    --text-secondary: #A3A3A3;
    --text-muted: #737373;
    
    /* Legacy Template Mappings (to ensure everything updates to red/black) */
    --black: var(--bg-primary);
    --black-light: var(--bg-surface);
    --black-medium: var(--bg-surface);
    --black-soft: var(--bg-surface-hover);
    
    --green-primary: var(--color-primary);
    --green-bright: var(--color-primary-hover);
    --green-dark: #b30000;
    --green-glow: rgba(230, 25, 25, 0.15);
    --green-subtle: rgba(230, 25, 25, 0.08);
    
    --primary-glow: var(--green-glow);
    --primary-subtle: var(--green-subtle);
    
    --white: var(--text-primary);
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-300: #d4d4d4;
    --gray-400: var(--text-secondary);
    --gray-500: var(--text-muted);
    --gray-600: #525252;
    --gray-700: #404040;
    --gray-800: #262626;
    
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}


/* Force uniform button colors */
.nav-cta, .btn-primary, .cta-button { color: #ffffff !important; }

/* --- Mobile Fixes --- */
@media (max-width: 768px) {
    .nav-cta { padding: 8px 12px !important; font-size: 13px !important; }
    .footer-content, .footer-bottom, .footer-links, .social-links { flex-direction: column !important; align-items: center !important; text-align: center !important; justify-content: center !important; width: 100%; }
    .footer-logo { margin: 0 auto 1.5rem auto !important; display: flex; justify-content: center; }
    .footer-links, .footer-bottom { gap: 1.2rem !important; }
}


/* --- Mobile Footer Centering --- */
@media (max-width: 768px) {
    footer > div:first-of-type {
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        gap: 1.5rem !important;
    }
    
    footer > div > div {
        justify-content: center !important;
        width: 100% !important;
    }

    /* Stack logo and copyright, remove left border */
    footer > div > div:first-of-type {
        flex-direction: column !important;
        gap: 0.8rem !important;
    }
    
    footer > div > div:first-of-type p {
        border-left: none !important;
        padding-left: 0 !important;
    }
}


/* Brand Text Highlight */
.brand-text {
    color: var(--color-primary);
    font-weight: 800;
    font-size: 1.05em;
}


/* Mobile Fixes added via Script */
@media (max-width: 768px) {
    .founder-card { padding: 30px 20px !important; margin: 0 auto !important; max-width: 100% !important; overflow: hidden !important; }
    .press-logos { gap: 20px !important; padding: 0 15px !important; }
    .founder-name { text-align: left !important; }
}

/* ========================================================= */
/* LIQUID GLASS STYLE OVERRIDES (GLASSMORPHISM + RED GLOW)   */
/* ========================================================= */
.case-card, .detail-card, .contact-card, .founder-card, .info-card, .pricing-card, 
.process-card, .service-card, .service-detail-card, .testimonial-card, 
.value-card, .who-card {
    background: rgba(255, 255, 255, 0.02) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-left: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3) !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: var(--radius-lg, 16px) !important; /* Make edges slightly softer for glass */
}

/* Hover Red Glow */
.case-card:hover, .detail-card:hover, .founder-card:hover, .info-card:hover, 
.pricing-card:hover, .process-card:hover, .service-card:hover, 
.service-detail-card:hover, .testimonial-card:hover, .value-card:hover, 
.who-card:hover, .contact-card:hover, .story-image:hover, .phase-card:hover {
    transform: translateY(-6px) !important;
    border-color: rgba(230, 25, 25, 0.4) !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), 0 0 35px rgba(230, 25, 25, 0.18) !important;
}

/* Disable old gradient top-borders to keep the glass effect clean */
.case-card::before, .detail-card::before, .founder-card::before, .info-card::before, 
.pricing-card::before, .process-card::before, .service-card::before, 
.service-detail-card::before, .testimonial-card::before, .value-card::before, 
.who-card::before {
    opacity: 0 !important;
    visibility: hidden !important;
}


/* ========================================================= */
/* LIGHT THEME (DAY MODE) OVERRIDES                          */
/* ========================================================= */
[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-hover: #f1f5f9;
    
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    
    --black-medium: #ffffff;
    --black: #f8fafc;
    --black-light: #ffffff;
    --black-soft: #f1f5f9;
    --white: #0f172a; /* Invert explicit whites */
}

/* Toggle Icon Visibility */
[data-theme="light"] #theme-toggle .sun-icon { display: block !important; }
[data-theme="light"] #theme-toggle .moon-icon { display: none !important; }

/* Light Theme Navbar */
[data-theme="light"] #navbar {
    background: rgba(255, 255, 255, 0.8) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
}

/* Light Theme Cards (Solid) */
[data-theme="light"] .case-card, [data-theme="light"] .detail-card, 
[data-theme="light"] .founder-card, [data-theme="light"] .info-card, 
[data-theme="light"] .pricing-card, [data-theme="light"] .process-card, 
[data-theme="light"] .service-card, [data-theme="light"] .service-detail-card, 
[data-theme="light"] .testimonial-card, [data-theme="light"] .value-card, 
[data-theme="light"] .who-card, [data-theme="light"] .contact-card, [data-theme="light"] .story-image, [data-theme="light"] .phase-card {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
}

/* Light Theme Hover */
[data-theme="light"] .case-card:hover, [data-theme="light"] .detail-card:hover, 
[data-theme="light"] .founder-card:hover, [data-theme="light"] .info-card:hover, 
[data-theme="light"] .pricing-card:hover, [data-theme="light"] .process-card:hover, 
[data-theme="light"] .service-card:hover, [data-theme="light"] .service-detail-card:hover, 
[data-theme="light"] .testimonial-card:hover, [data-theme="light"] .value-card:hover, 
[data-theme="light"] .who-card:hover, [data-theme="light"] .contact-card:hover, .story-image:hover, .phase-card:hover {
    border-color: rgba(230, 25, 25, 0.4) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), 0 0 20px rgba(230, 25, 25, 0.15) !important;
}

/* General overrides for text on white */
[data-theme="light"] .section-subtitle, 
[data-theme="light"] .founder-bio, 
[data-theme="light"] p:not(.founder-title):not(.brand-text) {
    color: var(--text-secondary) !important;
}

.story-image { transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important; }

/* ========================================================= */
/* THEME LOGO SWAPPING                                       */
/* ========================================================= */
.theme-logo.light-logo { display: none !important; }
[data-theme="light"] .theme-logo.dark-logo { display: none !important; }
[data-theme="light"] .theme-logo.light-logo { display: inline-block !important; }

/* ========================================================= */
/* GLASSMORPHISM RESTORED                                    */
/* ========================================================= */
/* Base Glass (Dark Mode) */
.case-card, .detail-card, .founder-card, .info-card, .pricing-card, 
.process-card, .service-card, .service-detail-card, .testimonial-card, 
.value-card, .who-card, .contact-card, .story-image, .phase-card {
    background: rgba(255, 255, 255, 0.02) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-left: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: var(--radius-lg, 16px) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3) !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Light Mode Glass (Frosted) */
[data-theme="light"] .case-card, [data-theme="light"] .detail-card, 
[data-theme="light"] .founder-card, [data-theme="light"] .info-card, 
[data-theme="light"] .pricing-card, [data-theme="light"] .process-card, 
[data-theme="light"] .service-card, [data-theme="light"] .service-detail-card, 
[data-theme="light"] .testimonial-card, [data-theme="light"] .value-card, 
[data-theme="light"] .who-card, [data-theme="light"] .contact-card, 
[data-theme="light"] .story-image, [data-theme="light"] .phase-card {
    background: rgba(255, 255, 255, 0.5) !important; 
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.4) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.4) !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05) !important;
}

/* Light Mode Hover Glass */
[data-theme="light"] .case-card:hover, [data-theme="light"] .detail-card:hover, 
[data-theme="light"] .founder-card:hover, [data-theme="light"] .info-card:hover, 
[data-theme="light"] .pricing-card:hover, [data-theme="light"] .process-card:hover, 
[data-theme="light"] .service-card:hover, [data-theme="light"] .service-detail-card:hover, 
[data-theme="light"] .testimonial-card:hover, [data-theme="light"] .value-card:hover, 
[data-theme="light"] .who-card:hover, [data-theme="light"] .contact-card:hover, 
[data-theme="light"] .story-image:hover, [data-theme="light"] .phase-card:hover {
    background: rgba(255, 255, 255, 0.8) !important;
}

/* ========================================================= */
/* MOBILE FIXES FOR NAVBAR SQUISH                            */
/* ========================================================= */
@media (max-width: 768px) {
    #navbar .logo img { height: 42px !important; }
    #theme-toggle { padding: 8px !important; margin-right: 8px !important; min-width: 44px; min-height: 44px; }
    .nav-cta { padding: 12px 16px !important; font-size: 14px !important; white-space: nowrap !important; }
    .nav-content { padding: 0 10px !important; }
}

/* ========================================================= */
/* SCROLL TO TOP BUTTON                                      */
/* ========================================================= */
#scrollToTopBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    box-shadow: 0 4px 15px rgba(230, 25, 25, 0.4);
}
#scrollToTopBtn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
#scrollToTopBtn:hover {
    background: var(--color-primary-hover);
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(230, 25, 25, 0.6);
}
@media (max-width: 768px) {
    #scrollToTopBtn {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
}

/* Global Nav CTA styles */
.nav-cta {
    background: var(--color-primary);
    color: #ffffff !important;
    padding: 12px 24px;
    border-radius: var(--radius-md, 8px);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.nav-cta:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 0 50px var(--green-glow);
}


/* Mobile Footer Fixes */
@media (max-width: 768px) {
    .social-wrapper {
        border-left: none !important;
        padding-left: 0 !important;
        justify-content: center !important;
        width: 100%;
        margin-top: 1rem;
    }
    footer > div > div {
        flex: 1 1 100% !important;
        justify-content: center !important;
        text-align: center;
        margin-bottom: 1rem;
    }
}

/* Navbar Mobile Fixes */
@media (max-width: 480px) {
    .nav-cta {
        padding: 12px 16px !important;
        font-size: 14px !important;
    }
    .theme-logo {
        height: 28px !important;
    }
    nav .container {
        padding: 0 10px !important;
    }
}

/* About Page Typography Fix */
.hero h1, .section-title, .story-text h2 {
    font-family: 'Inter', -apple-system, sans-serif !important;
    line-height: 1.25 !important;
}

/* Contact Page Mobile Alignment */
@media (max-width: 768px) {
    /* Align headers to left to match form/cards on mobile */
    .hero-content, .section-header, .founder-section, .founder-cta {
        text-align: left !important;
    }
    
    /* Make founder card stretch full width to match others */
    .founder-card {
        max-width: 100% !important;
        width: 100% !important;
    }
}

/* Navbar Button Fix (Prevent text wrapping) */
.nav-cta {
    white-space: nowrap !important;
}

/* Form and Page Alignment on Mobile (Force Left Alignment for Consistency) */
@media (max-width: 768px) {
    .cta-content, .hero-subtitle, .founder-section, .founder-card {
        text-align: left !important;
    }
    
    /* Make sure all contact forms and cards align properly */
    section#contact-form > div {
        align-items: flex-start !important;
    }
}

/* Universal Mobile Overflow Fixes */
html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* Contact Page Mobile Form Constraints Fixes */
@media (max-width: 768px) {
    .contact-form-wrapper {
        padding: 24px 20px !important;
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
    }
    
    .contact-grid {
        gap: 32px !important;
    }
    
    .container {
        padding: 0 16px !important;
    }
}

/* Cards Mobile Spacing Fixes */
@media (max-width: 768px) {
    /* Ensure cards have breathing room and don't touch screen edges */
    .contact-card a {
        word-break: break-all;
        white-space: normal !important;
    }
}
    .info-card, .founder-card {
        padding: 24px 20px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 auto 16px auto !important;
        max-width: calc(100vw - 32px) !important;
    }
    
    .contact-form-wrapper {
        max-width: calc(100vw - 32px) !important;
        margin: 0 auto !important;
    }
    
    /* Make the grids single column with proper gaps */
    .contact-info, .founders-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
        width: 100% !important;
    }
}

/* ========================================================= */
/* FOUNDER CARD — Contact Link Hover Effects                  */
/* ========================================================= */
.founder-contact-row {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    transition: transform 0.25s ease, color 0.25s ease;
    cursor: default;
}

.founder-contact-row a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: clamp(0.75rem, 4vw, 0.95rem);
    white-space: nowrap;
    transition: color 0.25s ease;
}

.founder-contact-row svg {
    flex-shrink: 0;
    min-width: 18px;
    transition: fill 0.25s ease, stroke 0.25s ease, transform 0.25s ease;
}

.founder-contact-row:hover {
    transform: translateY(-3px);
}

.founder-contact-row:hover a {
    color: var(--color-primary);
}

.founder-contact-row:hover svg {
    fill: var(--color-primary);
    stroke: var(--color-primary);
    transform: scale(1.15);
}
