/**
 * Locksmith Halifax - Main Stylesheet (style.css)
 * Box-Based / Modular / Glass UI System (2028 Modern Design Language)
 */

/* ==========================================================================
   1. Design Tokens & CSS Custom Properties
   ========================================================================== */
:root {
    /* Brand Colors (Canadian Red & Brand Yellow) */
    --color-primary: #D80621;
    --color-primary-hover: #B7051C;
    --color-primary-light: rgba(216, 6, 33, 0.08);
    --color-primary-glow: rgba(216, 6, 33, 0.25);
    
    --color-secondary: #F5A623;
    --color-secondary-hover: #D98E16;
    --color-secondary-light: rgba(245, 166, 35, 0.12);

    /* Backgrounds & Canvas */
    --bg-body: #F8FAFC;
    --bg-white: #FFFFFF;
    --bg-subtle: #F1F5F9;
    --bg-dark: #0B1120;
    --bg-dark-surface: #0F172A;
    --bg-dark-card: #1E293B;

    /* Glassmorphic Surfaces */
    --glass-bg: rgba(255, 255, 255, 0.82);
    --glass-bg-hover: rgba(255, 255, 255, 0.95);
    --glass-dark-bg: rgba(15, 23, 42, 0.85);
    --glass-border: rgba(226, 232, 240, 0.85);
    --glass-border-hover: rgba(203, 213, 225, 1);
    --glass-dark-border: rgba(255, 255, 255, 0.12);
    --glass-blur: blur(14px);

    /* Typography & Text Colors - WCAG AAA High Contrast */
    --text-main: #1A1A1A;        /* Dark Charcoal / Near Black */
    --text-muted: #334155;       /* Slate Dark Grey */
    --text-subtle: #475569;      /* Medium Dark Grey */
    --text-light: #64748B;       /* Medium Slate */
    --text-white: #FFFFFF;
    --text-white-muted: #CBD5E1;

    /* Status Colors */
    --color-success: #10B981;
    --color-warning: #F59E0B;
    --color-error: #EF4444;

    /* Shadows & Elevations */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 2px 4px -1px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.10), 0 10px 10px -5px rgba(15, 23, 42, 0.04);
    --shadow-glass: 0 12px 32px 0 rgba(15, 23, 42, 0.06);
    --shadow-glow: 0 0 24px rgba(216, 6, 33, 0.35);

    /* Radii & Geometry */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-pill: 9999px;

    /* Typography Scale */
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

    /* Container Max Width */
    --container-width: 1200px;
    --header-height: 80px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   2. CSS Reset & Base Elements
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--bg-body);
    background-image: 
        radial-gradient(at 0% 0%, rgba(216, 6, 33, 0.03) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(245, 166, 35, 0.03) 0px, transparent 50%);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    padding-bottom: 70px; /* Space for mobile sticky CTA */
}

@media (min-width: 1024px) {
    body {
        padding-bottom: 0;
    }
}

img, svg, picture, video {
    display: block;
    max-width: 100%;
    height: auto;
}

input, button, textarea, select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    background: none;
    border: none;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-hover);
}

ul, ol {
    list-style: none;
}

/* Accessibility Focus States */
:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 20px;
    background: var(--color-primary);
    color: var(--text-white);
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    z-index: 99999;
    font-weight: 700;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: 20px;
}

/* ==========================================================================
   3. Typography & Headings
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-main);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.1rem, 4vw + 1rem, 3.25rem);
    margin-bottom: 1.25rem;
}

h2 {
    font-size: clamp(1.6rem, 2.5vw + 0.5rem, 2.25rem);
    margin-bottom: 1rem;
}

h3 {
    font-size: clamp(1.25rem, 1.5vw + 0.25rem, 1.5rem);
    margin-bottom: 0.75rem;
}

h4 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

p:last-child {
    margin-bottom: 0;
}

.text-gradient {
    background: linear-gradient(135deg, var(--color-primary) 0%, #FF334B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.lead-text {
    font-size: 1.15rem;
    line-height: 1.65;
    color: var(--text-muted);
}

/* ==========================================================================
   4. Layout Containers & Grid Utilities
   ========================================================================== */
.site-container {
    width: 100%;
    max-width: var(--container-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.section-spacing {
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
}

.section-spacing-sm {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

.section-header {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 3.5rem auto;
}

.section-header .section-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--color-primary-light);
    color: var(--color-primary);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 1rem;
    border: 1px solid rgba(216, 6, 33, 0.15);
}

.section-header h2 {
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* ==========================================================================
   5. Top Info Bar & Dispatch Status
   ========================================================================== */
.top-info-bar {
    background: var(--bg-dark-surface);
    color: var(--text-white-muted);
    font-size: 0.85rem;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.top-info-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.dispatch-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.status-pulse {
    width: 8px;
    height: 8px;
    background-color: var(--color-success);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.top-phone-link {
    color: var(--text-white);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color var(--transition-fast);
}

.top-phone-link:hover {
    color: var(--color-secondary);
}

.top-phone-link strong {
    color: var(--color-secondary);
}

/* ==========================================================================
   6. Site Header & Navigation
   ========================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    transition: all var(--transition-base);
}

.site-header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

.brand-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.brand-logo-img {
    height: 52px;
    width: auto;
    object-fit: contain;
}

/* Desktop Navigation */
.desktop-nav-wrap {
    display: none;
}

@media (min-width: 1024px) {
    .desktop-nav-wrap {
        display: block;
    }
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-fast);
}

.nav-link:hover, .nav-item.active .nav-link {
    color: var(--color-primary);
    background: var(--color-primary-light);
}

/* Dropdown Menu */
.dropdown-toggle {
    cursor: pointer;
}

.dropdown-icon {
    transition: transform var(--transition-fast);
}

.nav-item.has-dropdown:hover .dropdown-icon,
.nav-item.has-dropdown.open .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 240px;
    background: var(--bg-white);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 8px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all var(--transition-base);
    z-index: 1010;
}

.nav-item.has-dropdown:hover .dropdown-menu,
.nav-item.has-dropdown:focus-within .dropdown-menu,
.nav-item.has-dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    margin-bottom: 2px;
}

.dropdown-item:last-child {
    margin-bottom: 0;
}

.dropdown-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.dropdown-link:hover, .dropdown-item.active .dropdown-link {
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-weight: 600;
}

.location-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-primary);
    opacity: 0.5;
}

.dropdown-link:hover .location-dot {
    opacity: 1;
    transform: scale(1.3);
}

/* Header Action Call Button */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-call-header {
    display: none;
}

@media (min-width: 640px) {
    .btn-call-header {
        display: inline-flex;
    }
}

.btn-call-header .btn-text {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.15;
}

.btn-call-header .btn-subtext {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.9;
}

.btn-call-header .btn-maintext {
    font-size: 0.95rem;
    font-weight: 800;
}

/* Mobile Hamburger Button */
.mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: var(--bg-subtle);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    transition: all var(--transition-fast);
}

@media (min-width: 1024px) {
    .mobile-menu-toggle {
        display: none;
    }
}

.mobile-menu-toggle:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.hamburger-box {
    width: 22px;
    height: 16px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger-line {
    display: block;
    width: 100%;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform var(--transition-fast), opacity var(--transition-fast);
}

/* ==========================================================================
   7. Pre-Footer & Global Footer
   ========================================================================== */
.pre-footer-cta-section {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.cta-banner-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 3.5rem 2.5rem;
    border-radius: var(--radius-xl);
    text-align: center;
    box-shadow: var(--shadow-glass);
    position: relative;
    overflow: hidden;
}

.cta-banner-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(216, 6, 33, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.cta-banner-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.cta-banner-card .cta-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--color-primary-light);
    border: 1px solid rgba(216, 6, 33, 0.25);
    color: var(--color-primary);
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.cta-banner-card .pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--color-primary);
    border-radius: 50%;
}

.cta-banner-heading {
    color: var(--text-main) !important;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.cta-banner-desc {
    color: var(--text-muted) !important;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.cta-banner-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Main Footer Container */
.site-footer {
    background: var(--bg-dark);
    color: var(--text-white-muted);
    padding-top: 4.5rem;
    padding-bottom: 2.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin-bottom: 3.5rem;
}

@media (min-width: 640px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    }
}

.footer-col-brand .footer-logo {
    margin-bottom: 1.25rem;
    display: inline-block;
}

.footer-about-text {
    color: var(--text-white-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.footer-phone-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    display: inline-block;
}

.footer-phone-box .phone-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-white-muted);
    margin-bottom: 2px;
}

.footer-phone-box .footer-phone-link {
    color: var(--color-secondary);
    font-size: 1.2rem;
    font-weight: 800;
}

.footer-heading {
    color: var(--text-white);
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    position: relative;
    padding-bottom: 8px;
}

.footer-heading::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 32px;
    height: 2px;
    background: var(--color-primary);
    border-radius: 2px;
}

.footer-links li {
    margin-bottom: 0.65rem;
}

.footer-links a {
    color: var(--text-white-muted);
    font-size: 0.92rem;
    transition: all var(--transition-fast);
}

.footer-links a:hover {
    color: var(--text-white);
    padding-left: 4px;
}

.footer-meta-line {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.92rem;
    color: var(--text-white-muted);
    margin-bottom: 1rem;
}

.footer-meta-line .meta-icon {
    color: var(--color-primary);
    flex-shrink: 0;
    margin-top: 3px;
}

.footer-cta-pill {
    margin-top: 1.25rem;
}

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    font-size: 0.88rem;
    text-align: center;
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.footer-legal-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-legal-links a {
    color: var(--text-white-muted);
}

.footer-legal-links a:hover {
    color: var(--text-white);
}

.sep-dot {
    color: rgba(255, 255, 255, 0.2);
}

.footer-credit p {
    font-size: 0.85rem;
    color: var(--text-light);
}
