/* ===========================================================================
   FOOTER - DARK GLASSMORPHIC CHARCOAL
   Version: 4.1 - BORDER SHORTHAND FIX
   Updated: March 2026

   CHANGES FROM v4.0:
   ✅ FIXED: Replaced border: var(--glass-border) shorthand with explicit values.
             Using a CSS variable that resolves to a full border shorthand
             (e.g. "1px solid rgba(...)") is fragile — if the variable ever
             loses a component the border silently breaks. Explicit values are
             more resilient.
   ✅ FIXED: footer-logo-glass now uses explicit size at 480px so the correct
             40px is deliberate rather than an accidental cascade win.
   ✅ KEPT:  .footer-column h3::after { display: none } — suppresses any
             future h3 underline treatment that 02-base.css might add.
   ✅ Maintained: All WCAG 2.1 AA compliance

   WCAG 2.1 AA Compliant
   =========================================================================== */

.site-footer {
    background: var(--glass-dark-charcoal, rgba(21, 29, 45, 0.65));
    backdrop-filter: var(--glass-blur-heavy, blur(8px));
    -webkit-backdrop-filter: var(--glass-blur-heavy, blur(8px));
    /* FIX v4.1: Explicit border value — was border-top: var(--glass-border) */
    border-top: 1px solid rgba(183, 148, 246, 0.15);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.6), 0 0 20px rgba(183, 148, 246, 0.15);
    color: var(--text-secondary, #e0e4ea);
    padding: 3rem 0 2rem;
    margin-top: var(--space-xxl, 3rem);
}

@supports not (backdrop-filter: blur(8px)) {
    .site-footer {
        background: rgba(21, 29, 45, 0.98);
    }
}

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

/* ============================================
   FOOTER COLUMNS
   ============================================ */
.footer-column {
    display: flex;
    flex-direction: column;
}

.footer-column h3 {
    background: linear-gradient(135deg, var(--color-primary-400), var(--color-primary-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.125rem;
    margin-bottom: var(--space-md, 1rem);
    font-weight: 600;
    text-align: left;
}

/*
 * Suppress the h2-style underline from 02-base.css — footer column headings
 * use gradient text instead and should not have the purple bar beneath them.
 * This also defends against any future h3::after added in 02-base.css.
 */
.footer-column h3::after {
    display: none;
}

/* ============================================
   FOOTER BRAND (Glassmorphic Logo)
   ============================================ */
.footer-brand {
    max-width: 300px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: var(--space-md, 1rem);
}

/*
 * NOTE: .footer-logo-glass is the canonical definition for this element.
 * 11-utilities.css previously redefined it with a glass background, which
 * overrode this gradient. That block has been removed from 11-utilities.css.
 */
.footer-logo-glass {
    width: 44px;
    height: 44px;
    min-width: 44px;
    background: linear-gradient(135deg, var(--color-primary-500, #b794f6), var(--color-primary-600, #9333ea));
    border-radius: var(--radius-md, 0.5rem);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(183, 148, 246, 0.15);
    flex-shrink: 0;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.footer-logo-glass:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(183, 148, 246, 0.25);
}

/*
 * NOTE: .footer-logo-icon canonical definition.
 * stroke: white is correct here — the icon sits on a purple gradient background.
 * 11-utilities.css previously overrode this to lavender. That block is removed.
 */
.footer-logo-icon {
    width: 26px;
    height: 26px;
    stroke: white;
    stroke-width: 2;
}

.footer-logo-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.footer-logo-name {
    font-size: 1.375rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-primary-400), var(--color-primary-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.footer-logo-tagline {
    font-size: 0.75rem;
    color: var(--color-primary-400, #ddd6fe);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 500;
    line-height: 1.1;
}

.footer-description {
    font-size: 0.9375rem;
    color: var(--text-secondary, #e0e4ea);
    line-height: 1.6;
    margin-bottom: var(--space-md, 1rem);
}

.footer-social {
    display: flex;
    gap: var(--space-md, 1rem);
    margin-top: var(--space-sm, 0.5rem);
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--glass-card-default, rgba(15, 22, 35, 0.6));
    /* FIX v4.1: Explicit border — was border: var(--glass-border) */
    border: 1px solid rgba(183, 148, 246, 0.15);
    border-radius: var(--radius-sm, 0.375rem);
    color: var(--color-primary-400, #ddd6fe);
    transition: all var(--transition-fast);
}

.footer-social a:hover {
    background: var(--glass-card-hover, rgba(21, 29, 45, 0.75));
    /* FIX v4.1: Explicit border — was border: var(--glass-border-strong) */
    border: 1px solid rgba(183, 148, 246, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(183, 148, 246, 0.15);
}

.footer-social svg {
    width: 20px;
    height: 20px;
}

/* ============================================
   FOOTER LINKS
   ============================================ */
.footer-links,
.footer-contact,
.footer-locations {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li,
.footer-locations li {
    margin-bottom: var(--space-sm, 0.5rem);
}

.footer-links a,
.footer-contact a {
    color: var(--text-secondary, #e0e4ea);
    text-decoration: none;
    transition: all var(--transition-fast);
    font-size: 0.9375rem;
    display: inline-block;
    padding: var(--space-xs, 0.25rem) 0;
}

.footer-links a:hover,
.footer-contact a:hover {
    color: var(--color-primary-400, #ddd6fe);
    transform: translateX(4px);
}

.footer-locations li {
    color: var(--text-secondary, #e0e4ea);
    font-size: 0.9375rem;
    padding-left: var(--space-md, 1rem);
    position: relative;
    line-height: 1.6;
}

.footer-locations li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--color-primary-500, #b794f6);
    font-weight: bold;
}

/* ============================================
   FOOTER CONTACT (With Icons)
   ============================================ */
.footer-contact li {
    display: flex;
    align-items: center;
    gap: var(--space-sm, 0.5rem);
    margin-bottom: var(--space-md, 1rem);
}

/*
 * NOTE: .footer-icon canonical definition.
 * 20×20px with primary-500 (stronger purple) as per design.
 * 11-utilities.css previously overrode to 18×18px and primary-400.
 * That block has been removed from 11-utilities.css.
 */
.footer-icon {
    width: 20px;
    height: 20px;
    stroke: var(--color-primary-500, #b794f6);
    stroke-width: 2;
    flex-shrink: 0;
}

.footer-contact span,
.footer-contact a {
    color: var(--text-secondary, #e0e4ea);
    font-size: 0.9375rem;
}

/* ============================================
   FOOTER BOTTOM
   ============================================ */
.footer-bottom {
    /* FIX v4.1: Explicit border — was border-top: var(--glass-border) */
    border-top: 1px solid rgba(183, 148, 246, 0.15);
    padding: var(--space-lg, 1.5rem) 0;
    margin-top: var(--space-xl, 2rem);
}

.footer-bottom-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg, 1.5rem);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md, 1rem);
}

.footer-copyright,
.footer-tagline {
    color: var(--color-primary-400, #ddd6fe);
    font-size: 0.875rem;
    margin: 0;
    font-weight: 500;
}

.footer-tagline {
    font-style: italic;
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .site-footer {
        padding: var(--space-xl, 2rem) 0 var(--space-lg, 1.5rem);
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: var(--space-lg, 1.5rem);
    }

    .footer-brand {
        max-width: 100%;
    }

    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .site-footer {
        padding: var(--space-lg, 1.5rem) 0 var(--space-md, 1rem);
    }

    .footer-container {
        padding: 0 var(--space-md, 1rem);
    }

    .footer-logo-name {
        font-size: 1.25rem;
    }

    /* FIX v4.1: Made explicit — was previously only correct by accident
       because the 480px footer rule fired after 11-utilities.css base rule */
    .footer-logo-glass {
        width: 40px;
        height: 40px;
        min-width: 40px;
    }

    .footer-logo-icon {
        width: 24px;
        height: 24px;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .footer-links a:hover,
    .footer-contact a:hover,
    .footer-social a:hover,
    .footer-logo-glass:hover {
        transform: none !important;
    }
}

.footer-links a:focus-visible,
.footer-contact a:focus-visible,
.footer-social a:focus-visible {
    outline: 3px solid var(--color-accent-500, #f97316);
    outline-offset: 2px;
}