/* Compan Template - Mobile-First Index with Cards */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700;800&display=swap');

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary: #3b82f6;
    --secondary: #06b6d4;
    --accent: #8b5cf6;
    --text: #0f172a;
    --text-light: #64748b;
    --bg: #f1f5f9;
}

body { 
    font-family: 'Space Grotesk', sans-serif;
    line-height: 1.6; 
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    min-height: 100vh; 
    padding: 16px;
    position: relative;
}

/* Animated gradient orbs */
body::before,
body::after {
    content: "";
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
}

body::before {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--primary), var(--secondary));
    top: -200px;
    right: -200px;
    animation: pulse 15s ease-in-out infinite;
}

body::after {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, var(--accent), var(--primary));
    bottom: -150px;
    left: -150px;
    animation: pulse 20s ease-in-out infinite reverse;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.2); opacity: 0.5; }
}

.container { 
    max-width: 1000px; 
    margin: 0 auto; 
    position: relative;
    z-index: 1;
}

/* Glassmorphism header card */
header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 24px;
    padding: 32px 24px;
    margin-bottom: 24px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    animation: fadeInScale 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

h1 { 
    font-size: 2rem;
    margin-bottom: 12px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.subtitle {
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 24px;
}

/* Compact mobile stats */
.stats {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
    padding: 12px 16px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 12px;
    min-width: 90px;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    display: block;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

nav {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

ul { 
    list-style: none; 
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

li { 
    margin: 0;
}

/* Touch-optimized card links */
a { 
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    text-decoration: none; 
    color: var(--text); 
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid transparent;
    font-size: 0.9375rem;
    font-weight: 500;
    min-height: 72px;
    position: relative;
    overflow: hidden;
}

/* Gradient border on hover */
a::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 14px;
    padding: 2px;
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s;
}

a:hover::before {
    opacity: 1;
}

/* Active state for touch */
a:active {
    transform: scale(0.97);
}

a:hover { 
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.2);
    transform: translateY(-2px);
}

.number {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    min-width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex-shrink: 0;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    position: relative;
}

/* Ripple effect on tap */
.number::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    opacity: 0;
}

a:active .number::after {
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    0% { transform: scale(0); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

a:hover .number {
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

footer {
    margin-top: 24px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    text-align: center;
    color: var(--text-light);
    font-size: 0.875rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

footer p {
    margin-bottom: 8px;
    line-height: 1.6;
}

footer strong {
    color: var(--text);
}

.disclaimer {
    margin-top: 16px;
    padding: 16px;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 12px;
    font-size: 0.75rem;
    text-align: left;
    color: var(--text-light);
    line-height: 1.5;
}

/* Smooth animations for list items */
li {
    animation: slideInLeft 0.5s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

li:nth-child(1) { animation-delay: 0.05s; }
li:nth-child(2) { animation-delay: 0.1s; }
li:nth-child(3) { animation-delay: 0.15s; }
li:nth-child(4) { animation-delay: 0.2s; }
li:nth-child(5) { animation-delay: 0.25s; }

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Desktop enhancements */
@media (min-width: 768px) {
    body {
        padding: 40px 20px;
    }
    
    header {
        padding: 48px 40px;
        border-radius: 32px;
        margin-bottom: 32px;
    }
    
    h1 {
        font-size: 3rem;
        margin-bottom: 16px;
    }
    
    .subtitle {
        font-size: 1.25rem;
        margin-bottom: 32px;
    }
    
    .stats {
        gap: 32px;
    }
    
    .stat {
        padding: 16px 24px;
        min-width: 120px;
    }
    
    .stat-value {
        font-size: 2.5rem;
    }
    
    .stat-label {
        font-size: 0.875rem;
        margin-top: 8px;
    }
    
    nav {
        padding: 32px;
        border-radius: 32px;
    }
    
    ul {
        gap: 16px;
    }
    
    a {
        padding: 20px 24px;
        font-size: 1.0625rem;
        min-height: 80px;
    }
    
    .number {
        min-width: 52px;
        height: 52px;
        font-size: 1.125rem;
    }
    
    footer {
        padding: 32px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --text: #f1f5f9;
        --text-light: #cbd5e0;
        --bg: #0f172a;
    }
    
    body {
        background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    }
    
    header, nav, footer {
        background: rgba(30, 41, 59, 0.9);
        border-color: rgba(71, 85, 105, 0.5);
    }
    
    a {
        background: rgba(30, 41, 59, 0.9);
    }
    
    a:hover {
        background: rgba(30, 41, 59, 1);
    }
}

/* Accessibility - reduce motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
