/* ================================================
   FANTASY FOOTBALL NERDS - ELITE TYPOGRAPHY SYSTEM
   CTO/CMO-Level Design Implementation
   ================================================ */

/* ==========================================
   PHASE 1: SOPHISTICATED HEADER TYPOGRAPHY
   ========================================== */

/* Premium Font Imports */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&display=swap');

/* Typography CSS Variables */
:root {
    --font-sophisticated: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-nerdy: 'JetBrains Mono', 'Courier New', monospace;
    --font-impact: 'Bebas Neue', 'Impact', sans-serif;
    --font-futuristic: 'Orbitron', 'Arial Black', sans-serif;
    
    /* Professional Color Palette */
    --elite-navy: #0a1628;
    --elite-blue: #1e3a8a;
    --elite-electric: #3b82f6;
    --elite-accent: #60a5fa;
    --elite-glow: #93c5fd;
    --nerd-green: #10b981;
    --stat-gold: #f59e0b;
}

/* ==========================================
   HEADER LOGO TEXT - SOPHISTICATED & CLEAN
   ========================================== */

.header-brand-text {
    font-family: var(--font-sophisticated);
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    text-transform: none;
    background: linear-gradient(135deg, var(--elite-navy) 0%, var(--elite-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.header-brand-text::before {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    z-index: -1;
    background: linear-gradient(135deg, var(--elite-electric) 0%, var(--elite-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.header-brand-text:hover::before {
    opacity: 1;
}

.header-brand-text:hover {
    transform: translateY(-1px);
    filter: drop-shadow(0 4px 12px rgba(59, 130, 246, 0.15));
}

/* Professional Load Animation */
@keyframes sophisticatedFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header-brand-text {
    animation: sophisticatedFadeIn 0.6s ease-out;
}

/* ==========================================
   HERO TITLE - NERDY FOOTBALL GENIUS
   ========================================== */

.site-title {
    font-family: var(--font-impact);
    font-size: 88px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 0.9;
    position: relative;
    display: inline-block;
    width: 100%;
    text-align: center;
    padding: 100px 0 80px;
    color: var(--elite-navy);
}

/* Multi-Layer Nerdy Effect */
.site-title::before {
    content: 'FANTASY FOOTBALL NERDS';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-nerdy);
    font-size: 16px;
    font-weight: 700;
    color: var(--nerd-green);
    opacity: 0.1;
    letter-spacing: 0.5em;
    z-index: -2;
    animation: dataStream 20s linear infinite;
}

/* Statistical Grid Overlay */
.site-title::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(0deg, 
            transparent, 
            transparent 2px, 
            rgba(16, 185, 129, 0.03) 2px, 
            rgba(16, 185, 129, 0.03) 4px),
        repeating-linear-gradient(90deg, 
            transparent, 
            transparent 2px, 
            rgba(16, 185, 129, 0.03) 2px, 
            rgba(16, 185, 129, 0.03) 4px);
    pointer-events: none;
    z-index: -1;
    animation: gridPulse 4s ease-in-out infinite;
}

/* Nerdy Text Effects */
.site-title-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.site-title-main {
    position: relative;
    z-index: 2;
}

/* Fantasy "Calculating" Effect */
@keyframes calculateStats {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.95; }
}

.site-title-fantasy {
    display: inline-block;
    position: relative;
    background: linear-gradient(90deg, 
        var(--elite-navy) 0%, 
        var(--elite-blue) 45%, 
        var(--stat-gold) 50%, 
        var(--elite-blue) 55%, 
        var(--elite-navy) 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fantasyShine 3s ease-in-out infinite;
}

.site-title-football {
    display: inline-block;
    position: relative;
    color: var(--elite-navy);
    text-shadow: 
        2px 2px 0 rgba(245, 158, 11, 0.3),
        -1px -1px 0 rgba(16, 185, 129, 0.2),
        3px 3px 8px rgba(10, 22, 40, 0.1);
}

.site-title-nerds {
    display: inline-block;
    position: relative;
    font-family: var(--font-futuristic);
    color: var(--nerd-green);
    font-weight: 900;
    letter-spacing: 0.08em;
    text-shadow: 
        0 0 20px rgba(16, 185, 129, 0.5),
        0 0 40px rgba(16, 185, 129, 0.3),
        2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: nerdGlow 2s ease-in-out infinite alternate;
}

/* Football Stitching Pattern */
.football-stitching {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 2px;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 10px,
        var(--stat-gold) 10px,
        var(--stat-gold) 15px
    );
    opacity: 0.3;
    z-index: 3;
}

/* Playbook Lines Animation */
@keyframes playbookDraw {
    0% { 
        stroke-dashoffset: 1000;
        opacity: 0;
    }
    50% {
        opacity: 0.3;
    }
    100% { 
        stroke-dashoffset: 0;
        opacity: 0.1;
    }
}

.playbook-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.playbook-lines svg {
    width: 100%;
    height: 100%;
    opacity: 0.1;
}

.playbook-lines path {
    stroke: var(--nerd-green);
    stroke-width: 1;
    fill: none;
    stroke-dasharray: 1000;
    animation: playbookDraw 5s ease-in-out infinite;
}

/* Stat Numbers Floating Animation */
@keyframes floatStats {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

.floating-stats {
    position: absolute;
    top: 50%;
    left: 10%;
    font-family: var(--font-nerdy);
    font-size: 12px;
    color: var(--stat-gold);
    opacity: 0.3;
    animation: floatStats 6s ease-in-out infinite;
}

.floating-stats:nth-child(2) {
    left: 85%;
    animation-delay: 2s;
    color: var(--nerd-green);
}

.floating-stats:nth-child(3) {
    left: 45%;
    top: 30%;
    animation-delay: 4s;
    color: var(--elite-electric);
}

/* Animations */
@keyframes fantasyShine {
    0%, 100% { background-position: 200% center; }
    50% { background-position: -200% center; }
}

@keyframes nerdGlow {
    0% { 
        text-shadow: 
            0 0 20px rgba(16, 185, 129, 0.5),
            0 0 40px rgba(16, 185, 129, 0.3),
            2px 2px 4px rgba(0, 0, 0, 0.3);
    }
    100% { 
        text-shadow: 
            0 0 30px rgba(16, 185, 129, 0.7),
            0 0 60px rgba(16, 185, 129, 0.4),
            2px 2px 4px rgba(0, 0, 0, 0.3);
    }
}

@keyframes dataStream {
    0% { transform: translate(-50%, -50%) scaleX(1); }
    50% { transform: translate(-50%, -50%) scaleX(1.1); }
    100% { transform: translate(-50%, -50%) scaleX(1); }
}

@keyframes gridPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Hover Interactions */
.site-title:hover .site-title-nerds {
    animation-duration: 0.5s;
    transform: scale(1.05);
}

.site-title:hover::after {
    animation-duration: 1s;
}

/* Draft Board Style Underline */
.draft-board-underline {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 4px;
    background: linear-gradient(90deg, 
        transparent 0%,
        var(--stat-gold) 20%,
        var(--nerd-green) 50%,
        var(--stat-gold) 80%,
        transparent 100%);
    opacity: 0.8;
    animation: draftPulse 3s ease-in-out infinite;
}

@keyframes draftPulse {
    0%, 100% { transform: translateX(-50%) scaleX(0.8); opacity: 0.6; }
    50% { transform: translateX(-50%) scaleX(1); opacity: 1; }
}

/* ==========================================
   RESPONSIVE ADJUSTMENTS
   ========================================== */

/* Large Desktop Optimization */
@media (min-width: 1400px) {
    .site-title {
        font-size: 96px;
        padding: 120px 0 100px;
    }
    
    .floating-stats {
        font-size: 14px;
    }
}

/* Standard Desktop */
@media (max-width: 1024px) {
    .header-brand-text {
        font-size: 1rem;
    }
    
    .site-title {
        font-size: 72px;
        padding: 80px 0 60px;
    }
    
    .floating-stats {
        font-size: 11px;
    }
}

@media (max-width: 768px) {
    .header-brand-text {
        font-size: 0.95rem;
    }
    
    .site-title {
        font-size: 56px;
        padding: 60px 0 50px;
    }
    
    .site-title::before {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .header-brand-text {
        font-size: 0.875rem;
        letter-spacing: -0.01em;
    }
    
    .site-title {
        font-size: 42px;
        padding: 50px 0 40px;
        letter-spacing: 0.01em;
    }
    
    .site-title::before {
        display: none;
    }
    
    .floating-stats {
        display: none;
    }
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
    .header-brand-text,
    .site-title,
    .site-title::before,
    .site-title::after,
    .site-title-nerds,
    .floating-stats,
    .playbook-lines path {
        animation: none !important;
    }
    
    .header-brand-text:hover {
        transform: none;
    }
}

/* Performance Optimizations */
.site-title,
.header-brand-text {
    will-change: transform;
    contain: layout style;
}

/* Print Styles */
@media print {
    .site-title::before,
    .site-title::after,
    .floating-stats,
    .playbook-lines,
    .football-stitching,
    .draft-board-underline {
        display: none;
    }
    
    .site-title {
        color: black !important;
        text-shadow: none !important;
        padding: 20px 0 !important;
    }
}