/* ========================================
   MIRA - Premium Design System
   $10,000 Quality Website Styling
   ======================================== */

/* CSS Variables for Premium Theme */
:root {
    --primary: #1e40af;
    --primary-light: #3b82f6;
    --primary-dark: #1e3a8a;
    --accent: #06b6d4;
    --accent-glow: rgba(6, 182, 212, 0.4);
    --dark: #0f172a;
    --light: #f8fafc;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    --shadow-md: 0 10px 40px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.3);
    --shadow-color: rgba(30, 64, 175, 0.2);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --font-display: 'Poppins', system-ui, sans-serif;
}

/* Base Styles */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-light) transparent;
}

*::-webkit-scrollbar {
    width: 8px;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 4px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    overflow-x: hidden;
    background: var(--light);
}

/* Premium Hero Section */
.hero-gradient {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #0ea5e9 100%);
    position: relative;
    overflow: hidden;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.hero-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(6, 182, 212, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(14, 165, 233, 0.1) 0%, transparent 30%);
    pointer-events: none;
}

.hero-gradient::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    animation: heroPattern 60s linear infinite;
    pointer-events: none;
}

@keyframes heroPattern {
    from { transform: translate(0, 0); }
    to { transform: translate(30px, 30px); }
}

.hero-gradient img {
    height: auto;
    max-height: 70vh;
    border-radius: 24px;
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 0 100px rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 2;
    animation: floatImage 6s ease-in-out infinite;
}

@keyframes floatImage {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* Typography Enhancements */
h1 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

h2 {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* Premium Navigation */
header.sticky {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

header.sticky.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

header .logo img {
    transition: var(--transition);
}

header:hover .logo img {
    transform: scale(1.05);
}

/* Navigation Links */
nav a {
    position: relative;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: var(--transition);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 2px;
}

nav a:hover::after {
    width: 80%;
}

nav a:hover {
    color: var(--accent);
}

/* Premium Buttons */
.download-btn {
    position: relative;
    overflow: hidden;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none;
    border: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.download-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.download-btn:hover::before {
    left: 100%;
}

.download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(30, 64, 175, 0.35);
}

.download-btn:active {
    transform: translateY(-1px);
}

/* Primary Button Style */
.bg-blue-100.text-blue-800 {
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.1) 0%, rgba(59, 130, 246, 0.15) 100%);
    border: 1px solid rgba(30, 64, 175, 0.2);
    transition: var(--transition);
}

.bg-blue-100.text-blue-800:hover {
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.2) 0%, rgba(59, 130, 246, 0.25) 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(30, 64, 175, 0.25);
}

/* Pulse Animation - Refined */
.pulse-animation {
    animation: pulsePremium 3s infinite;
}

@keyframes pulsePremium {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(59, 130, 246, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

/* Premium Feature Cards */
.feature-card {
    background: white;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.feature-card:hover {
    transform: translateY(-12px);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(30, 64, 175, 0.1);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

/* Feature Icons */
.feature-card i {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: var(--transition);
}

.feature-card:hover i {
    transform: scale(1.15);
    filter: drop-shadow(0 0 10px rgba(6, 182, 212, 0.5));
}

/* How It Works - Step Cards */
#how-it-works .bg-blue-100 {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    transition: var(--transition);
}

#how-it-works .bg-blue-100:hover {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
}

/* Privacy Section - Premium Cards */
#privacy .bg-white {
    background: white;
    border-radius: 24px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    overflow: hidden;
    position: relative;
}

#privacy .bg-white::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 100%);
    pointer-events: none;
}

#privacy .bg-white:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

#privacy i.text-blue-600,
#privacy i.text-cyan-500 {
    background: linear-gradient(135deg, var(--primary) 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 20px rgba(6, 182, 212, 0.3));
}

/* Coverage Section - Map Container */
#coverage .bg-gray-100 {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 24px;
    padding: 8px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

#coverage iframe {
    border-radius: 18px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* CTA Section - Premium */
section.bg-blue-800,
section.bg-blue-900 {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #0ea5e9 100%);
    position: relative;
    overflow: hidden;
}

section.bg-blue-800::before,
section.bg-blue-900::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 10% 90%, rgba(6, 182, 212, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 90% 10%, rgba(59, 130, 246, 0.2) 0%, transparent 40%);
    pointer-events: none;
}

section.bg-blue-800 .container,
section.bg-blue-900 .container {
    position: relative;
    z-index: 2;
}

/* Footer - Premium Dark */
footer {
    background: linear-gradient(180deg, #0f172a 0%, #020617 100%);
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.5), transparent);
}

footer h3 {
    font-family: var(--font-display);
    font-weight: 600;
    color: #e2e8f0;
}

footer a {
    transition: var(--transition);
    position: relative;
}

footer a:hover {
    color: var(--accent) !important;
    padding-left: 5px;
}

/* Social Icons */
footer .fab {
    transition: var(--transition);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

footer .fab:hover {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

/* Mobile Menu Button */
.md\:hidden.text-blue-800 {
    transition: var(--transition);
}

.md\:hidden.text-blue-800:hover {
    transform: scale(1.1);
    color: var(--accent);
}

/* Section Headers */
h2.text-3xl.font-bold.text-center {
    position: relative;
    display: inline-block;
}

h2.text-3xl.font-bold.text-center::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
}

/* Image Container Effects */
.img-container {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
}

.img-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    animation: shimmer 3s infinite;
    z-index: 1;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

/* List Items - Privacy Section */
#privacy ul li {
    transition: var(--transition);
    padding: 8px 0;
}

#privacy ul li:hover {
    transform: translateX(5px);
}

#privacy ul li i {
    transition: var(--transition);
}

#privacy ul li:hover i {
    transform: scale(1.2);
}

/* Coverage Stats */
.coverage-stat {
    position: relative;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

/* Animated Background for Sections */
.bg-gray-50, .bg-gray-100 {
    position: relative;
}

/* Decorative Elements */
.decorative-circle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(6, 182, 212, 0.05) 100%);
    z-index: 0;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Card Hover Lift Effect */
.card-lift {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Numbered Steps */
.step-number {
    position: relative;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
    box-shadow: 0 10px 20px rgba(30, 64, 175, 0.3);
}

.step-number::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px dashed var(--primary-light);
    animation: rotateDash 20s linear infinite;
    opacity: 0.3;
}

@keyframes rotateDash {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Contact Cards */
.contact-card {
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
    border: 1px solid rgba(30, 64, 175, 0.2);
    border-radius: 16px;
    padding: 16px 24px;
    transition: var(--transition);
}

.contact-card:hover {
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.15) 0%, rgba(59, 130, 246, 0.15) 100%);
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(30, 64, 175, 0.2);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-gradient {
        min-height: auto;
        padding: 60px 0;
    }
    
    .hero-gradient img {
        max-height: 40vh;
        margin-top: 30px;
    }
    
    header .container {
        padding-top: 10px;
        padding-bottom: 10px;
    }
    
    nav {
        display: none;
    }
    
    .feature-card {
        margin-bottom: 20px;
    }
    
    h1 {
        font-size: 2rem !important;
    }
    
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* Smooth Page Load Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-gradient > .container {
    animation: fadeInUp 1s ease-out;
}

#features .feature-card {
    animation: fadeInUp 0.8s ease-out backwards;
}

#features .feature-card:nth-child(1) { animation-delay: 0.1s; }
#features .feature-card:nth-child(2) { animation-delay: 0.2s; }
#features .feature-card:nth-child(3) { animation-delay: 0.3s; }

/* Enhanced Focus States for Accessibility */
a:focus,
button:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Selection Color */
::selection {
    background: var(--primary);
    color: white;
}

/* Logo Animation on Hover */
.logo-container {
    position: relative;
    overflow: hidden;
}

.logo-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.logo-container:hover::after {
    left: 100%;
}

/* Contact Form Styles */
#contact-form input:focus,
#contact-form textarea:focus,
#contact-form select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

#contact-form button {
    background: linear-gradient(135deg, var(--primary) 0%, #06b6d4 100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#contact-form button:hover {
    background: linear-gradient(135deg, #1e3a8a 0%, #0891b2 100%);
}

#form-success {
    animation: fadeInUp 0.5s ease-out;
}

/* Footer Logo */
footer .logo-footer {
    transition: var(--transition);
}

footer .logo-footer:hover {
    transform: scale(1.05);
}

/* Province Tags */
.province-tag {
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
    border: 1px solid rgba(30, 64, 175, 0.2);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary);
    transition: var(--transition);
}

.province-tag:hover {
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.2) 0%, rgba(6, 182, 212, 0.2) 100%);
    transform: translateY(-2px);
}

/* Stats Counter Animation */
.stat-number {
    font-family: var(--font-display);
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Loading Spinner */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.fa-spin {
    animation: spin 1s linear infinite;
}

/* Scroll to top button (optional enhancement) */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(30, 64, 175, 0.3);
    transition: var(--transition);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(30, 64, 175, 0.4);
}
