/* ============================================================================
   ARTICLE VISUAL ENHANCEMENTS
   "Neural Data Flow" Design System
   
   A sophisticated tech aesthetic inspired by neural network visualizations.
   Import this file AFTER article-styles-new.css to enhance any article.
   ============================================================================ */

/* Import Sora font for distinctive headings */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&display=swap');

/* ============================================================================
   CSS Custom Properties (extend existing variables)
   ============================================================================ */
:root {
    /* Typography */
    --font-heading: 'Sora', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Enhanced Colors */
    --glow-primary: rgba(64, 192, 240, 0.5);
    --glow-secondary: rgba(0, 178, 169, 0.4);
    --glow-soft: rgba(64, 192, 240, 0.15);
    --accent-pulse: #00ffcc;
    
    /* Animation Timing */
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
    
    /* Gradients */
    --gradient-glow: linear-gradient(135deg, var(--glow-primary), var(--glow-secondary));
    --gradient-mesh: 
        radial-gradient(ellipse at 20% 0%, rgba(64, 192, 240, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(0, 178, 169, 0.08) 0%, transparent 50%);
}

/* ============================================================================
   TYPOGRAPHY ENHANCEMENTS
   ============================================================================ */

/* Hero Title */
.hero h1 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    background: linear-gradient(135deg, #ffffff 0%, #e8f4fc 50%, #40c0f0 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: titleGradient 8s ease infinite;
}

@keyframes titleGradient {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 200% center; }
}

/* Section Headings */
.section h2 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.01em;
    position: relative;
    display: inline-block;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--gradient-glow);
    border-radius: 2px;
    animation: lineGlow 3s ease-in-out infinite;
}

@keyframes lineGlow {
    0%, 100% { opacity: 0.7; width: 60px; }
    50% { opacity: 1; width: 80px; }
}

.section h3 {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: -0.005em;
}

/* ============================================================================
   HERO SECTION ENHANCEMENTS
   ============================================================================ */

.hero {
    position: relative;
    overflow: hidden;
    background: 
        var(--gradient-mesh),
        linear-gradient(135deg, rgba(0, 0, 0, 0.5), rgba(26, 40, 68, 0.4));
}

/* Animated Grid Background */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(64, 192, 240, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(64, 192, 240, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
    animation: gridPulse 6s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes gridPulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.02); }
}

/* Glowing Top Border */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 15%;
    right: 15%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #40c0f0, #00b2a9, #40c0f0, transparent);
    animation: borderFlow 4s linear infinite;
    z-index: 1;
}

@keyframes borderFlow {
    0% { opacity: 0.4; filter: blur(0px); }
    50% { opacity: 1; filter: blur(1px); }
    100% { opacity: 0.4; filter: blur(0px); }
}

/* Hero Content Z-Index */
.hero > * {
    position: relative;
    z-index: 2;
}

/* Hero Image Enhancement */
.hero-image {
    position: relative;
    box-shadow: 
        0 25px 60px -15px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(64, 192, 240, 0.1),
        0 0 40px rgba(64, 192, 240, 0.1);
    animation: imageFloat 6s ease-in-out infinite, imageReveal 1s var(--ease-expo) forwards;
}

@keyframes imageReveal {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
        filter: blur(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0);
    }
}

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

/* Scan Line Effect on Image Container */
.hero picture {
    position: relative;
    display: block;
}

.hero picture::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 15px;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 3px,
        rgba(64, 192, 240, 0.015) 3px,
        rgba(64, 192, 240, 0.015) 6px
    );
    pointer-events: none;
    animation: scanMove 8s linear infinite;
}

@keyframes scanMove {
    from { transform: translateY(0); }
    to { transform: translateY(6px); }
}

/* ============================================================================
   STATISTICS CARDS - GLOWING NUMBER PULSE
   ============================================================================ */

.stats-grid {
    perspective: 1000px;
}

.stat-card {
    animation: statReveal 0.6s var(--ease-expo) backwards;
    transform-style: preserve-3d;
}

/* Staggered Animation Delays */
.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }
.stat-card:nth-child(5) { animation-delay: 0.5s; }
.stat-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes statReveal {
    from {
        opacity: 0;
        transform: translateY(30px) rotateX(-10deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotateX(0);
    }
}

/* Enhanced Stat Number with Glow */
.stat-number {
    font-family: var(--font-heading);
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #40c0f0, #00b2a9);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: numberPulse 3s ease-in-out infinite;
    filter: drop-shadow(0 0 8px var(--glow-soft));
}

@keyframes numberPulse {
    0%, 100% {
        filter: drop-shadow(0 0 8px var(--glow-soft));
    }
    50% {
        filter: drop-shadow(0 0 20px var(--glow-primary));
    }
}

/* Stat Card Hover Enhancement */
.stat-card {
    transition: all 0.4s var(--ease-smooth);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-glow);
    transform: scaleX(0);
    transition: transform 0.4s var(--ease-expo);
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 30px var(--glow-soft);
}

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

/* ============================================================================
   EXECUTIVE SUMMARY ENHANCEMENT
   ============================================================================ */

.executive-summary {
    position: relative;
    overflow: hidden;
    animation: summaryReveal 0.8s var(--ease-expo) 0.3s backwards;
}

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

.executive-summary::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    width: 4px;
    height: 0;
    background: linear-gradient(180deg, #40c0f0, #00b2a9);
    animation: lineGrow 0.8s var(--ease-expo) 0.5s forwards;
}

@keyframes lineGrow {
    to { height: calc(100% - 40px); }
}

.executive-summary h3 {
    font-family: var(--font-heading);
    display: flex;
    align-items: center;
    gap: 12px;
}

.executive-summary h3::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #40c0f0;
    border-radius: 50%;
    box-shadow: 0 0 12px var(--glow-primary);
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.7; }
}

/* ============================================================================
   SECTION ENTRANCE ANIMATIONS
   ============================================================================ */

.section {
    animation: sectionReveal 0.8s var(--ease-expo) backwards;
    position: relative;
}

/* Staggered section animations based on position */
.section:nth-of-type(1) { animation-delay: 0.1s; }
.section:nth-of-type(2) { animation-delay: 0.15s; }
.section:nth-of-type(3) { animation-delay: 0.2s; }
.section:nth-of-type(4) { animation-delay: 0.25s; }
.section:nth-of-type(5) { animation-delay: 0.3s; }
.section:nth-of-type(6) { animation-delay: 0.35s; }
.section:nth-of-type(7) { animation-delay: 0.4s; }
.section:nth-of-type(8) { animation-delay: 0.45s; }

@keyframes sectionReveal {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================================
   TABLE ENHANCEMENTS
   ============================================================================ */

.tech-table,
.benchmark-table {
    position: relative;
    animation: tableReveal 0.6s var(--ease-expo) backwards;
}

@keyframes tableReveal {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Glowing Header */
.tech-table thead,
.benchmark-table thead {
    position: relative;
}

.tech-table thead::after,
.benchmark-table thead::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #40c0f0, transparent);
    animation: headerGlow 3s ease-in-out infinite;
}

@keyframes headerGlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

/* Table Header Typography */
.tech-table th,
.benchmark-table th {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-size: 0.85rem;
}

/* Row Hover with Glow */
.tech-table tr:hover td,
.benchmark-table tr:hover td {
    background: rgba(64, 192, 240, 0.08);
}

/* Benchmark Highlight Enhancement */
.benchmark-highlight {
    position: relative;
    background: rgba(0, 178, 169, 0.15) !important;
}

.benchmark-highlight::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #00b2a9;
    animation: highlightPulse 2s ease-in-out infinite;
}

@keyframes highlightPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; box-shadow: 0 0 10px var(--glow-secondary); }
}

/* ============================================================================
   INFO BOX ENHANCEMENTS
   ============================================================================ */

.info-box {
    position: relative;
    overflow: hidden;
    animation: infoReveal 0.6s var(--ease-expo) backwards;
}

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

.info-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(64, 192, 240, 0.05), transparent 50%);
    pointer-events: none;
}

.info-box h4 {
    font-family: var(--font-heading);
    font-weight: 600;
}

/* ============================================================================
   MODE CARDS ENHANCEMENT
   ============================================================================ */

.mode-card {
    transition: all 0.4s var(--ease-smooth);
    animation: modeReveal 0.6s var(--ease-expo) backwards;
}

.mode-card:nth-child(1) { animation-delay: 0.1s; }
.mode-card:nth-child(2) { animation-delay: 0.2s; }
.mode-card:nth-child(3) { animation-delay: 0.3s; }
.mode-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes modeReveal {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.mode-card:hover {
    transform: translateY(-6px);
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.3),
        0 0 30px var(--glow-soft);
}

.mode-card h4 {
    font-family: var(--font-heading);
    font-weight: 600;
}

.mode-badge {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: 0.05em;
    animation: badgePulse 3s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 0 0 rgba(0, 178, 169, 0); }
    50% { box-shadow: 0 0 15px rgba(0, 178, 169, 0.3); }
}

/* ============================================================================
   CTA SECTION ENHANCEMENT
   ============================================================================ */

.cta-section {
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(64, 192, 240, 0.1) 0%, transparent 50%);
    animation: ctaGlow 8s ease-in-out infinite;
}

@keyframes ctaGlow {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(10%, 10%); }
    50% { transform: translate(0, 20%); }
    75% { transform: translate(-10%, 10%); }
}

.cta-section h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.cta-button {
    font-family: var(--font-heading);
    font-weight: 600;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.cta-button::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: left 0.5s ease;
}

.cta-button:hover::before {
    left: 100%;
}

/* ============================================================================
   FAQ SECTION ENHANCEMENT
   ============================================================================ */

.faq-item {
    transition: all 0.3s var(--ease-smooth);
    animation: faqReveal 0.5s var(--ease-expo) backwards;
}

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

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

.faq-question {
    font-family: var(--font-heading);
    font-weight: 600;
}

.faq-toggle {
    transition: all 0.3s var(--ease-bounce);
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
    color: #00b2a9;
}

.faq-item.active {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2), 0 0 20px var(--glow-soft);
}

/* ============================================================================
   LINKS GRID ENHANCEMENT
   ============================================================================ */

.reading-link {
    font-family: var(--font-heading);
    font-weight: 500;
    transition: all 0.3s var(--ease-smooth);
    position: relative;
    overflow: hidden;
}

.reading-link::before {
    content: '→';
    position: absolute;
    left: 15px;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s var(--ease-expo);
    color: #40c0f0;
}

.reading-link:hover {
    padding-left: 35px;
    border-color: #40c0f0;
    box-shadow: 0 5px 20px rgba(64, 192, 240, 0.2);
}

.reading-link:hover::before {
    opacity: 1;
    transform: translateX(0);
}

/* ============================================================================
   GERMAN/EU IMPACT SECTION
   ============================================================================ */

.german-impact-section,
.eu-impact-section {
    position: relative;
    overflow: hidden;
}

.german-impact-section::after,
.eu-impact-section::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(255, 206, 0, 0.08), transparent 70%);
    pointer-events: none;
}

.german-impact-section h2,
.eu-impact-section h2 {
    font-family: var(--font-heading);
}

/* ============================================================================
   FORMULA BOX
   ============================================================================ */

.formula-box {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    position: relative;
    animation: formulaReveal 0.6s var(--ease-expo) backwards;
}

@keyframes formulaReveal {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.formula-box::before,
.formula-box::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(64, 192, 240, 0.4);
    animation: cornerPulse 3s ease-in-out infinite;
}

.formula-box::before {
    top: 8px;
    left: 8px;
    border-right: none;
    border-bottom: none;
}

.formula-box::after {
    bottom: 8px;
    right: 8px;
    border-left: none;
    border-top: none;
}

@keyframes cornerPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

/* ============================================================================
   HIGHLIGHT ENHANCEMENTS
   ============================================================================ */

.highlight,
.electric-highlight {
    position: relative;
}

.highlight::after,
.electric-highlight::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: currentColor;
    opacity: 0.3;
    transform: scaleX(0);
    transition: transform 0.3s var(--ease-expo);
}

.highlight:hover::after,
.electric-highlight:hover::after {
    transform: scaleX(1);
}

/* ============================================================================
   SUBTITLE AND DESCRIPTION
   ============================================================================ */

.hero .subtitle {
    font-family: var(--font-heading);
    font-weight: 500;
    letter-spacing: 0.01em;
    animation: subtitleReveal 0.8s var(--ease-expo) 0.2s backwards;
}

@keyframes subtitleReveal {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero .description {
    animation: descReveal 0.8s var(--ease-expo) 0.4s backwards;
}

@keyframes descReveal {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@media (max-width: 768px) {
    .hero::before {
        background-size: 30px 30px;
    }
    
    .section h2::after {
        width: 40px;
    }
    
    @keyframes lineGlow {
        0%, 100% { opacity: 0.7; width: 40px; }
        50% { opacity: 1; width: 60px; }
    }
    
    .stat-card:hover {
        transform: translateY(-4px) scale(1.01);
    }
    
    /* Reduce animation intensity on mobile */
    .stat-number {
        animation: none;
        filter: none;
    }
    
    .hero-image {
        animation: imageReveal 0.8s var(--ease-expo) forwards;
    }
}

@media (max-width: 480px) {
    .hero::before {
        display: none;
    }
    
    .section h2::after {
        display: none;
    }
    
    /* Simpler animations on small screens */
    .stat-card,
    .mode-card,
    .faq-item {
        animation: simpleFade 0.5s ease forwards;
    }
    
    @keyframes simpleFade {
        from { opacity: 0; }
        to { opacity: 1; }
    }
}

/* ============================================================================
   REDUCED MOTION SUPPORT
   ============================================================================ */

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

/* ============================================================================
   PRINT STYLES
   ============================================================================ */

@media print {
    .hero::before,
    .hero::after,
    .hero picture::after {
        display: none;
    }
    
    * {
        animation: none !important;
    }
}
