/* ==========================================================================
   Athletic Utilities - Shared Typography & Effects
   Foundation utilities for the "Stadium Energy" athletic design system
   Used by series-athletic.css, leaderboard-athletic.css, etc.
   ========================================================================== */

/* ==========================================================================
   Typography Utilities
   ========================================================================== */

/* Athletic headings - bold, uppercase, tracking */
.athletic-heading {
    font-family: 'Karla', system-ui, sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.athletic-heading-lg {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    line-height: 1.1;
}

.athletic-heading-md {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    line-height: 1.2;
}

.athletic-heading-sm {
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.3;
}

/* Stat display - for numbers and rankings */
.athletic-stat {
    font-family: 'Karla', system-ui, sans-serif;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.athletic-stat-xl {
    font-size: clamp(2rem, 6vw, 4rem);
    line-height: 1;
}

.athletic-stat-lg {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    line-height: 1.1;
}

.athletic-stat-md {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    line-height: 1.2;
}

/* Label text - smaller, muted */
.athletic-label {
    font-family: 'Karla', system-ui, sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.7;
}

/* ==========================================================================
   Glow & Light Effects
   ========================================================================== */

/* Text glow - uses CSS custom property for color */
.athletic-glow {
    text-shadow:
        0 0 10px var(--glow-color, currentColor),
        0 0 20px var(--glow-color, currentColor),
        0 0 40px color-mix(in srgb, var(--glow-color, currentColor) 50%, transparent);
}

.athletic-glow-subtle {
    text-shadow:
        0 0 8px color-mix(in srgb, var(--glow-color, currentColor) 60%, transparent),
        0 0 16px color-mix(in srgb, var(--glow-color, currentColor) 30%, transparent);
}

/* Box glow for cards/containers */
.athletic-box-glow {
    box-shadow:
        0 0 20px color-mix(in srgb, var(--glow-color, var(--theme-primary)) 30%, transparent),
        0 0 40px color-mix(in srgb, var(--glow-color, var(--theme-primary)) 15%, transparent);
}

/* Border glow */
.athletic-border-glow {
    border: 1px solid color-mix(in srgb, var(--glow-color, var(--theme-primary)) 50%, transparent);
    box-shadow:
        inset 0 0 20px color-mix(in srgb, var(--glow-color, var(--theme-primary)) 10%, transparent),
        0 0 20px color-mix(in srgb, var(--glow-color, var(--theme-primary)) 20%, transparent);
}

/* ==========================================================================
   Gradient Utilities
   ========================================================================== */

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

/* Background gradients */
.athletic-gradient-bg {
    background: var(--gradient, linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-secondary) 100%));
}

.athletic-gradient-overlay {
    position: relative;
}

.athletic-gradient-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
    pointer-events: none;
}

/* ==========================================================================
   Animation Utilities
   ========================================================================== */

/* Pulse animation for highlighting */
@keyframes athletic-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.athletic-pulse {
    animation: athletic-pulse 2s ease-in-out infinite;
}

/* Shimmer effect for loading states */
@keyframes athletic-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.athletic-shimmer {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: athletic-shimmer 2s ease-in-out infinite;
}

/* Slide in animation */
@keyframes athletic-slide-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.athletic-slide-up {
    animation: athletic-slide-up 0.4s ease-out forwards;
}

/* Stagger delay utilities */
.athletic-delay-1 { animation-delay: 0.1s; }
.athletic-delay-2 { animation-delay: 0.2s; }
.athletic-delay-3 { animation-delay: 0.3s; }
.athletic-delay-4 { animation-delay: 0.4s; }
.athletic-delay-5 { animation-delay: 0.5s; }

/* ==========================================================================
   Card & Container Utilities
   ========================================================================== */

/* Glass morphism effect */
.athletic-glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Elevated surface */
.athletic-surface {
    background: var(--surface-color, rgba(26, 31, 46, 0.95));
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.athletic-surface-elevated {
    background: var(--surface-elevated-color, rgba(36, 43, 61, 0.95));
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   Rank & Badge Utilities
   ========================================================================== */

/* Rank badge - circular with number */
.athletic-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.875rem;
    background: var(--rank-bg, rgba(255, 255, 255, 0.1));
    color: var(--rank-color, #ffffff);
}

.athletic-rank-gold {
    --rank-bg: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
    --rank-color: #1a1a1a;
}

.athletic-rank-silver {
    --rank-bg: linear-gradient(135deg, #c0c0c0 0%, #a0a0a0 100%);
    --rank-color: #1a1a1a;
}

.athletic-rank-bronze {
    --rank-bg: linear-gradient(135deg, #cd7f32 0%, #a05a2c 100%);
    --rank-color: #ffffff;
}

/* ==========================================================================
   Spacing & Layout Utilities
   ========================================================================== */

/* Athletic section spacing */
.athletic-section {
    padding: clamp(2rem, 5vw, 4rem) 0;
}

.athletic-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 3vw, 2rem);
}

/* Divider with glow */
.athletic-divider {
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--divider-color, var(--theme-primary)) 50%,
        transparent 100%
    );
    border: none;
    margin: 2rem 0;
}
