/**
 * Inspace Landing Page Footer Styles - Enterprise Edition
 * 
 * Unified, mobile-first footer design across all landing pages.
 * Features: Newsletter signup, social links, trust badges, multi-column navigation.
 * 
 * @version 3.0.0
 * @updated 2025-01-20
 * 
 * Structure:
 * 1. CSS Variables
 * 2. Base Footer Styles
 * 3. Newsletter Section
 * 4. Main Footer Grid
 * 5. Footer Columns
 * 6. Social Links
 * 7. Trust Badges
 * 8. Footer Bottom
 * 9. Responsive Breakpoints
 * 10. Persona Variations
 * 11. Utilities & Animations
 * 12. Print & Accessibility
 */

/* =============================================================================
   1. CSS Variables
   ============================================================================= */

:root {
    /* Footer dimensions */
    --footer-padding-y: 2.5rem;
    --footer-padding-y-lg: 4rem;
    --footer-padding-x: 1.25rem;
    --footer-padding-x-lg: 2rem;
    --footer-max-width: 1280px;
    
    /* Footer colors (dark theme default) */
    --footer-bg: #0a0a0f;
    --footer-bg-secondary: rgba(255, 255, 255, 0.03);
    --footer-text: rgba(255, 255, 255, 0.75);
    --footer-text-muted: rgba(255, 255, 255, 0.45);
    --footer-heading: #ffffff;
    --footer-accent: #2748ff;
    --footer-accent-hover: #4a6aff;
    --footer-border: rgba(255, 255, 255, 0.08);
    --footer-link-hover: #ffffff;
    
    /* Newsletter */
    --newsletter-bg: rgba(255, 255, 255, 0.04);
    --newsletter-input-bg: rgba(255, 255, 255, 0.06);
    --newsletter-input-border: rgba(255, 255, 255, 0.12);
    
    /* Trust badges */
    --trust-badge-bg: rgba(255, 255, 255, 0.04);
    --trust-badge-border: rgba(255, 255, 255, 0.08);
    
    /* Transitions */
    --footer-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}


/* =============================================================================
   2. Base Footer Styles
   ============================================================================= */

.landing-footer,
.main-footer,
footer.enterprise-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: var(--footer-padding-y) var(--footer-padding-x);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.footer-container {
    max-width: var(--footer-max-width);
    margin: 0 auto;
    width: 100%;
}

/* Logo Styling */
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    margin-bottom: 1rem;
}

.footer-logo img {
    height: 32px;
    width: auto;
    filter: brightness(0) invert(1);
    transition: opacity var(--footer-transition);
}

.footer-logo:hover img {
    opacity: 0.85;
}

.footer-brand-text {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--footer-heading);
}

.footer-brand-text span {
    color: var(--footer-accent);
}


/* =============================================================================
   3. Newsletter Section
   ============================================================================= */

.footer-newsletter {
    background: var(--newsletter-bg);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2.5rem;
    border: 1px solid var(--footer-border);
}

.newsletter-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.newsletter-text {
    flex: 1;
}

.newsletter-text h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--footer-heading);
    margin: 0 0 0.375rem 0;
}

.newsletter-text p {
    font-size: 0.875rem;
    color: var(--footer-text-muted);
    margin: 0;
}

.newsletter-form {
    flex: 1;
    max-width: 100%;
}

.newsletter-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.newsletter-input-group input {
    flex: 1;
    padding: 0.875rem 1rem;
    background: var(--newsletter-input-bg);
    border: 1px solid var(--newsletter-input-border);
    border-radius: 10px;
    color: var(--footer-heading);
    font-size: 0.9375rem;
    transition: border-color var(--footer-transition), background var(--footer-transition);
}

.newsletter-input-group input::placeholder {
    color: var(--footer-text-muted);
}

.newsletter-input-group input:focus {
    outline: none;
    border-color: var(--footer-accent);
    background: rgba(255, 255, 255, 0.08);
}

.newsletter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: var(--footer-accent);
    color: #fff;
    font-weight: 600;
    font-size: 0.9375rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all var(--footer-transition);
    white-space: nowrap;
}

.newsletter-btn:hover {
    background: var(--footer-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(39, 72, 255, 0.35);
}

.newsletter-btn i {
    font-size: 1rem;
}

.newsletter-consent {
    font-size: 0.75rem;
    color: var(--footer-text-muted);
    margin-top: 0.75rem;
}

.newsletter-consent a {
    color: var(--footer-text);
    text-decoration: underline;
    text-underline-offset: 2px;
}


/* =============================================================================
   4. Main Footer Grid
   ============================================================================= */

.footer-main {
    margin-bottom: 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

/* Brand column */
.footer-brand-col {
    margin-bottom: 0.5rem;
}

.footer-brand-col .footer-tagline {
    font-size: 0.875rem;
    color: var(--footer-text-muted);
    max-width: 280px;
    margin: 0 0 1.25rem 0;
    line-height: 1.65;
}


/* =============================================================================
   5. Footer Columns
   ============================================================================= */

.footer-col {
    min-width: 0;
}

.footer-col h4 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--footer-heading);
    margin: 0 0 1rem 0;
}

.footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 0.625rem;
}

.footer-col ul li:last-child {
    margin-bottom: 0;
}

.footer-col ul li a {
    color: var(--footer-text);
    text-decoration: none;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    transition: color var(--footer-transition), transform var(--footer-transition);
}

.footer-col ul li a:hover {
    color: var(--footer-link-hover);
    transform: translateX(3px);
}

.footer-col ul li a i {
    font-size: 0.8125rem;
    opacity: 0.6;
}

/* Link with badge */
.footer-col .footer-link-badge {
    display: inline-flex;
    padding: 0.125rem 0.5rem;
    background: var(--footer-accent);
    color: #fff;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 999px;
    margin-left: 0.5rem;
}


/* =============================================================================
   6. Social Links
   ============================================================================= */

.footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    margin-top: 0.5rem;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--footer-bg-secondary);
    border: 1px solid var(--footer-border);
    border-radius: 10px;
    color: var(--footer-text);
    font-size: 1.125rem;
    text-decoration: none;
    transition: all var(--footer-transition);
}

.footer-social a:hover {
    background: var(--footer-accent);
    border-color: var(--footer-accent);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(39, 72, 255, 0.3);
}

/* Social link brand colors on hover (optional) */
.footer-social a[aria-label="LinkedIn"]:hover {
    background: #0a66c2;
    border-color: #0a66c2;
}

.footer-social a[aria-label="Twitter"]:hover,
.footer-social a[aria-label="X"]:hover {
    background: #000;
    border-color: #333;
}

.footer-social a[aria-label="Instagram"]:hover {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    border-color: transparent;
}

.footer-social a[aria-label="YouTube"]:hover {
    background: #ff0000;
    border-color: #ff0000;
}


/* =============================================================================
   7. Trust Badges
   ============================================================================= */

.footer-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--footer-border);
    border-bottom: 1px solid var(--footer-border);
}

.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    background: var(--trust-badge-bg);
    border: 1px solid var(--trust-badge-border);
    border-radius: 8px;
    font-size: 0.75rem;
    color: var(--footer-text-muted);
    white-space: nowrap;
}

.trust-badge i {
    font-size: 0.875rem;
    color: var(--footer-accent);
}

.trust-badge.verified i {
    color: #10b981;
}

.trust-badge.secure i {
    color: #10b981;
}


/* =============================================================================
   8. Footer Bottom
   ============================================================================= */

.footer-bottom {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--footer-border);
    text-align: center;
}

.footer-copyright {
    font-size: 0.8125rem;
    color: var(--footer-text-muted);
    margin: 0;
}

.footer-copyright a {
    color: var(--footer-text);
    text-decoration: none;
}

.footer-copyright a:hover {
    color: var(--footer-link-hover);
}

.footer-legal-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.25rem;
}

.footer-legal-links a {
    font-size: 0.8125rem;
    color: var(--footer-text-muted);
    text-decoration: none;
    transition: color var(--footer-transition);
}

.footer-legal-links a:hover {
    color: var(--footer-link-hover);
}

.footer-made-with {
    font-size: 0.8125rem;
    color: var(--footer-text-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.footer-made-with i {
    color: #ef4444;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    14% { transform: scale(1.15); }
    28% { transform: scale(1); }
    42% { transform: scale(1.15); }
    70% { transform: scale(1); }
}


/* =============================================================================
   9. Responsive Breakpoints
   ============================================================================= */

/* Small tablets and up */
@media (min-width: 480px) {
    .newsletter-input-group {
        flex-direction: row;
    }
    
    .newsletter-btn {
        flex-shrink: 0;
    }
    
    .footer-trust {
        justify-content: center;
    }
}

/* Tablets */
@media (min-width: 640px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem 1.5rem;
    }
    
    .footer-brand-col {
        grid-column: span 2;
    }
    
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        text-align: left;
    }
    
    .footer-legal-links {
        justify-content: flex-end;
    }
}

/* Desktop */
@media (min-width: 768px) {
    .landing-footer,
    .main-footer,
    footer.enterprise-footer {
        padding: var(--footer-padding-y-lg) var(--footer-padding-x-lg);
    }
    
    .footer-newsletter {
        padding: 2rem 2.5rem;
    }
    
    .newsletter-content {
        flex-direction: row;
        align-items: center;
        gap: 2rem;
    }
    
    .newsletter-form {
        max-width: 420px;
    }
    
    .newsletter-consent {
        text-align: right;
    }
    
    .footer-grid {
        grid-template-columns: 1.4fr repeat(4, 1fr);
        gap: 2.5rem;
    }
    
    .footer-brand-col {
        grid-column: span 1;
    }
}

/* Large desktop */
@media (min-width: 1024px) {
    .footer-grid {
        gap: 3.5rem;
    }
    
    .footer-newsletter {
        padding: 2.5rem 3rem;
    }
}


/* =============================================================================
   10. Persona Variations
   ============================================================================= */

/* ---- Main Homepage (default blue accent) ---- */
/* Uses default variables */

/* ---- Business - Gold/Amber Accent ---- */
[data-landing-persona="business"] {
    --footer-accent: #d4a853;
    --footer-accent-hover: #e6bc6a;
}

[data-landing-persona="business"] .footer-brand-text span {
    color: #d4a853;
}

[data-landing-persona="business"] .trust-badge i {
    color: #d4a853;
}

/* ---- Designers - Terracotta Accent ---- */
[data-landing-persona="designers"] {
    --footer-accent: #c4775c;
    --footer-accent-hover: #d68b70;
}

[data-landing-persona="designers"] .footer-brand-text span {
    color: #c4775c;
}

/* ---- Resellers - Lime/Neon Accent ---- */
[data-landing-persona="resellers"] {
    --footer-accent: #c8ff00;
    --footer-accent-hover: #d8ff4d;
}

[data-landing-persona="resellers"] .footer-brand-text span {
    color: #c8ff00;
}

[data-landing-persona="resellers"] .newsletter-btn {
    color: #0a0a0f;
}

[data-landing-persona="resellers"] .footer-social a:hover {
    color: #0a0a0f;
}

/* ---- Manufacturers - Blue-Purple Gradient ---- */
[data-landing-persona="manufacturers"] {
    --footer-accent: #6366f1;
    --footer-accent-hover: #818cf8;
}

[data-landing-persona="manufacturers"] .footer-brand-text span {
    background: linear-gradient(135deg, #3b82f6, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-landing-persona="manufacturers"] .newsletter-btn {
    background: linear-gradient(135deg, #3b82f6, #a855f7);
}

[data-landing-persona="manufacturers"] .newsletter-btn:hover {
    background: linear-gradient(135deg, #60a5fa, #c084fc);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
}

[data-landing-persona="manufacturers"] .footer-social a:hover {
    background: linear-gradient(135deg, #3b82f6, #a855f7);
    border-color: transparent;
}

/* ---- Light Theme Override (for pages with light footers) ---- */
[data-footer-theme="light"] {
    --footer-bg: #fafafa;
    --footer-bg-secondary: rgba(0, 0, 0, 0.03);
    --footer-text: rgba(0, 0, 0, 0.7);
    --footer-text-muted: rgba(0, 0, 0, 0.5);
    --footer-heading: #111;
    --footer-border: rgba(0, 0, 0, 0.08);
    --footer-link-hover: #000;
    --newsletter-bg: rgba(0, 0, 0, 0.03);
    --newsletter-input-bg: #fff;
    --newsletter-input-border: rgba(0, 0, 0, 0.1);
    --trust-badge-bg: rgba(0, 0, 0, 0.03);
    --trust-badge-border: rgba(0, 0, 0, 0.08);
}

[data-footer-theme="light"] .footer-logo img {
    filter: none;
}

[data-footer-theme="light"] .footer-social a:hover {
    color: #fff;
}


/* =============================================================================
   11. Utilities & Animations
   ============================================================================= */

/* Text gradient utility */
.text-gradient {
    background: linear-gradient(135deg, #3b82f6, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hide on mobile / show on desktop */
.footer-hide-mobile {
    display: none;
}

@media (min-width: 768px) {
    .footer-hide-mobile {
        display: block;
    }
    
    .footer-hide-desktop {
        display: none;
    }
}

/* Fade in animation for footer sections */
.footer-animate {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.footer-animate.visible {
    opacity: 1;
    transform: translateY(0);
}


/* =============================================================================
   12. Print & Accessibility
   ============================================================================= */

/* Focus styles */
.footer-col ul li a:focus-visible,
.footer-social a:focus-visible,
.newsletter-btn:focus-visible,
.newsletter-input-group input:focus-visible,
.footer-legal-links a:focus-visible {
    outline: 2px solid var(--footer-accent);
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .footer-social a,
    .footer-col ul li a,
    .newsletter-btn,
    .footer-logo img,
    .footer-animate {
        transition: none;
    }
    
    .footer-made-with i {
        animation: none;
    }
}

/* Print styles */
@media print {
    .landing-footer,
    .main-footer,
    footer.enterprise-footer {
        background: #fff !important;
        color: #000 !important;
        padding: 1rem 0;
    }
    
    .footer-newsletter,
    .footer-social,
    .newsletter-form {
        display: none !important;
    }
    
    .footer-col ul li a,
    .footer-copyright,
    .footer-legal-links a {
        color: #000 !important;
    }
    
    .footer-logo img {
        filter: none !important;
    }
}
